configure revision 1.1.1.4 1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf (at] gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="server.cc"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_header_list=
623 gt_needs=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 MAYBE_LIBICONV
627 GNULIB_STDINT_H
628 extra_libraries
629 IPA_DEPFILES
630 srv_xmlfiles
631 srv_xmlbuiltin
632 GDBSERVER_LIBS
633 GDBSERVER_DEPFILES
634 RDYNAMIC
635 REPORT_BUGS_TEXI
636 REPORT_BUGS_TO
637 PKGVERSION
638 WERROR_CFLAGS
639 WARN_CFLAGS
640 ustinc
641 ustlibs
642 CCDEPMODE
643 CONFIG_SRC_SUBDIR
644 CATOBJEXT
645 GENCAT
646 INSTOBJEXT
647 DATADIRNAME
648 CATALOGS
649 INCINTL
650 LIBINTL_DEP
651 POSUB
652 LTLIBINTL
653 LIBINTL
654 INTLLIBS
655 LTLIBICONV
656 LIBICONV
657 INTL_MACOSX_LIBS
658 MSGMERGE
659 XGETTEXT
660 GMSGFMT
661 MSGFMT
662 USE_NLS
663 MKINSTALLDIRS
664 SET_MAKE
665 DEPDIR
666 am__leading_dot
667 host_noncanonical
668 target_noncanonical
669 WIN32APILIBS
670 LTLIBXXHASH
671 LIBXXHASH
672 HAVE_LIBXXHASH
673 LTLIBIPT
674 LIBIPT
675 HAVE_LIBIPT
676 PTHREAD_CFLAGS
677 PTHREAD_LIBS
678 PTHREAD_CC
679 ax_pthread_config
680 SED
681 ALLOCA
682 CXX_DIALECT
683 HAVE_CXX17
684 RANLIB
685 AR
686 INSTALL_DATA
687 INSTALL_SCRIPT
688 INSTALL_PROGRAM
689 target_os
690 target_vendor
691 target_cpu
692 target
693 host_os
694 host_vendor
695 host_cpu
696 host
697 build_os
698 build_vendor
699 build_cpu
700 build
701 INSTALL_STRIP_PROGRAM
702 STRIP
703 install_sh
704 EGREP
705 GREP
706 CPP
707 ac_ct_CXX
708 CXXFLAGS
709 CXX
710 OBJEXT
711 EXEEXT
712 ac_ct_CC
713 CPPFLAGS
714 LDFLAGS
715 CFLAGS
716 CC
717 MAINT
718 MAINTAINER_MODE_FALSE
719 MAINTAINER_MODE_TRUE
720 target_alias
721 host_alias
722 build_alias
723 LIBS
724 ECHO_T
725 ECHO_N
726 ECHO_C
727 DEFS
728 mandir
729 localedir
730 libdir
731 psdir
732 pdfdir
733 dvidir
734 htmldir
735 infodir
736 docdir
737 oldincludedir
738 includedir
739 localstatedir
740 sharedstatedir
741 sysconfdir
742 datadir
743 datarootdir
744 libexecdir
745 sbindir
746 bindir
747 program_transform_name
748 prefix
749 exec_prefix
750 PACKAGE_URL
751 PACKAGE_BUGREPORT
752 PACKAGE_STRING
753 PACKAGE_VERSION
754 PACKAGE_TARNAME
755 PACKAGE_NAME
756 PATH_SEPARATOR
757 SHELL'
758 ac_subst_files=''
759 ac_user_opts='
760 enable_option_checking
761 enable_maintainer_mode
762 enable_largefile
763 enable_threading
764 with_intel_pt
765 with_gnu_ld
766 enable_rpath
767 with_libipt_prefix
768 with_libipt_type
769 with_xxhash
770 with_libxxhash_prefix
771 with_libxxhash_type
772 enable_unit_tests
773 enable_nls
774 with_libiconv_prefix
775 with_libiconv_type
776 with_libintl_prefix
777 with_libintl_type
778 with_ust
779 with_ust_include
780 with_ust_lib
781 enable_werror
782 enable_build_warnings
783 enable_gdb_build_warnings
784 with_pkgversion
785 with_bugurl
786 with_libthread_db
787 enable_inprocess_agent
788 '
789 ac_precious_vars='build_alias
790 host_alias
791 target_alias
792 CC
793 CFLAGS
794 LDFLAGS
795 LIBS
796 CPPFLAGS
797 CXX
798 CXXFLAGS
799 CCC
800 CPP'
801
802
803 # Initialize some variables set by options.
804 ac_init_help=
805 ac_init_version=false
806 ac_unrecognized_opts=
807 ac_unrecognized_sep=
808 # The variables have the same names as the options, with
809 # dashes changed to underlines.
810 cache_file=/dev/null
811 exec_prefix=NONE
812 no_create=
813 no_recursion=
814 prefix=NONE
815 program_prefix=NONE
816 program_suffix=NONE
817 program_transform_name=s,x,x,
818 silent=
819 site=
820 srcdir=
821 verbose=
822 x_includes=NONE
823 x_libraries=NONE
824
825 # Installation directory options.
826 # These are left unexpanded so users can "make install exec_prefix=/foo"
827 # and all the variables that are supposed to be based on exec_prefix
828 # by default will actually change.
829 # Use braces instead of parens because sh, perl, etc. also accept them.
830 # (The list follows the same order as the GNU Coding Standards.)
831 bindir='${exec_prefix}/bin'
832 sbindir='${exec_prefix}/sbin'
833 libexecdir='${exec_prefix}/libexec'
834 datarootdir='${prefix}/share'
835 datadir='${datarootdir}'
836 sysconfdir='${prefix}/etc'
837 sharedstatedir='${prefix}/com'
838 localstatedir='${prefix}/var'
839 includedir='${prefix}/include'
840 oldincludedir='/usr/include'
841 docdir='${datarootdir}/doc/${PACKAGE}'
842 infodir='${datarootdir}/info'
843 htmldir='${docdir}'
844 dvidir='${docdir}'
845 pdfdir='${docdir}'
846 psdir='${docdir}'
847 libdir='${exec_prefix}/lib'
848 localedir='${datarootdir}/locale'
849 mandir='${datarootdir}/man'
850
851 ac_prev=
852 ac_dashdash=
853 for ac_option
854 do
855 # If the previous option needs an argument, assign it.
856 if test -n "$ac_prev"; then
857 eval $ac_prev=\$ac_option
858 ac_prev=
859 continue
860 fi
861
862 case $ac_option in
863 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
864 *=) ac_optarg= ;;
865 *) ac_optarg=yes ;;
866 esac
867
868 # Accept the important Cygnus configure options, so we can diagnose typos.
869
870 case $ac_dashdash$ac_option in
871 --)
872 ac_dashdash=yes ;;
873
874 -bindir | --bindir | --bindi | --bind | --bin | --bi)
875 ac_prev=bindir ;;
876 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
877 bindir=$ac_optarg ;;
878
879 -build | --build | --buil | --bui | --bu)
880 ac_prev=build_alias ;;
881 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
882 build_alias=$ac_optarg ;;
883
884 -cache-file | --cache-file | --cache-fil | --cache-fi \
885 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
886 ac_prev=cache_file ;;
887 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
888 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
889 cache_file=$ac_optarg ;;
890
891 --config-cache | -C)
892 cache_file=config.cache ;;
893
894 -datadir | --datadir | --datadi | --datad)
895 ac_prev=datadir ;;
896 -datadir=* | --datadir=* | --datadi=* | --datad=*)
897 datadir=$ac_optarg ;;
898
899 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
900 | --dataroo | --dataro | --datar)
901 ac_prev=datarootdir ;;
902 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
903 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
904 datarootdir=$ac_optarg ;;
905
906 -disable-* | --disable-*)
907 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
908 # Reject names that are not valid shell variable names.
909 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
910 as_fn_error $? "invalid feature name: $ac_useropt"
911 ac_useropt_orig=$ac_useropt
912 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
913 case $ac_user_opts in
914 *"
915 "enable_$ac_useropt"
916 "*) ;;
917 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
918 ac_unrecognized_sep=', ';;
919 esac
920 eval enable_$ac_useropt=no ;;
921
922 -docdir | --docdir | --docdi | --doc | --do)
923 ac_prev=docdir ;;
924 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
925 docdir=$ac_optarg ;;
926
927 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
928 ac_prev=dvidir ;;
929 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
930 dvidir=$ac_optarg ;;
931
932 -enable-* | --enable-*)
933 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
934 # Reject names that are not valid shell variable names.
935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
936 as_fn_error $? "invalid feature name: $ac_useropt"
937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941 "enable_$ac_useropt"
942 "*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=\$ac_optarg ;;
947
948 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
949 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
950 | --exec | --exe | --ex)
951 ac_prev=exec_prefix ;;
952 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
953 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
954 | --exec=* | --exe=* | --ex=*)
955 exec_prefix=$ac_optarg ;;
956
957 -gas | --gas | --ga | --g)
958 # Obsolete; use --with-gas.
959 with_gas=yes ;;
960
961 -help | --help | --hel | --he | -h)
962 ac_init_help=long ;;
963 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
964 ac_init_help=recursive ;;
965 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
966 ac_init_help=short ;;
967
968 -host | --host | --hos | --ho)
969 ac_prev=host_alias ;;
970 -host=* | --host=* | --hos=* | --ho=*)
971 host_alias=$ac_optarg ;;
972
973 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
974 ac_prev=htmldir ;;
975 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
976 | --ht=*)
977 htmldir=$ac_optarg ;;
978
979 -includedir | --includedir | --includedi | --included | --include \
980 | --includ | --inclu | --incl | --inc)
981 ac_prev=includedir ;;
982 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
983 | --includ=* | --inclu=* | --incl=* | --inc=*)
984 includedir=$ac_optarg ;;
985
986 -infodir | --infodir | --infodi | --infod | --info | --inf)
987 ac_prev=infodir ;;
988 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
989 infodir=$ac_optarg ;;
990
991 -libdir | --libdir | --libdi | --libd)
992 ac_prev=libdir ;;
993 -libdir=* | --libdir=* | --libdi=* | --libd=*)
994 libdir=$ac_optarg ;;
995
996 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
997 | --libexe | --libex | --libe)
998 ac_prev=libexecdir ;;
999 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1000 | --libexe=* | --libex=* | --libe=*)
1001 libexecdir=$ac_optarg ;;
1002
1003 -localedir | --localedir | --localedi | --localed | --locale)
1004 ac_prev=localedir ;;
1005 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1006 localedir=$ac_optarg ;;
1007
1008 -localstatedir | --localstatedir | --localstatedi | --localstated \
1009 | --localstate | --localstat | --localsta | --localst | --locals)
1010 ac_prev=localstatedir ;;
1011 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1012 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1013 localstatedir=$ac_optarg ;;
1014
1015 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1016 ac_prev=mandir ;;
1017 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1018 mandir=$ac_optarg ;;
1019
1020 -nfp | --nfp | --nf)
1021 # Obsolete; use --without-fp.
1022 with_fp=no ;;
1023
1024 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1025 | --no-cr | --no-c | -n)
1026 no_create=yes ;;
1027
1028 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1029 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1030 no_recursion=yes ;;
1031
1032 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1033 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1034 | --oldin | --oldi | --old | --ol | --o)
1035 ac_prev=oldincludedir ;;
1036 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1037 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1038 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1039 oldincludedir=$ac_optarg ;;
1040
1041 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1042 ac_prev=prefix ;;
1043 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1044 prefix=$ac_optarg ;;
1045
1046 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1047 | --program-pre | --program-pr | --program-p)
1048 ac_prev=program_prefix ;;
1049 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1050 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1051 program_prefix=$ac_optarg ;;
1052
1053 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1054 | --program-suf | --program-su | --program-s)
1055 ac_prev=program_suffix ;;
1056 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1057 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1058 program_suffix=$ac_optarg ;;
1059
1060 -program-transform-name | --program-transform-name \
1061 | --program-transform-nam | --program-transform-na \
1062 | --program-transform-n | --program-transform- \
1063 | --program-transform | --program-transfor \
1064 | --program-transfo | --program-transf \
1065 | --program-trans | --program-tran \
1066 | --progr-tra | --program-tr | --program-t)
1067 ac_prev=program_transform_name ;;
1068 -program-transform-name=* | --program-transform-name=* \
1069 | --program-transform-nam=* | --program-transform-na=* \
1070 | --program-transform-n=* | --program-transform-=* \
1071 | --program-transform=* | --program-transfor=* \
1072 | --program-transfo=* | --program-transf=* \
1073 | --program-trans=* | --program-tran=* \
1074 | --progr-tra=* | --program-tr=* | --program-t=*)
1075 program_transform_name=$ac_optarg ;;
1076
1077 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1078 ac_prev=pdfdir ;;
1079 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1080 pdfdir=$ac_optarg ;;
1081
1082 -psdir | --psdir | --psdi | --psd | --ps)
1083 ac_prev=psdir ;;
1084 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1085 psdir=$ac_optarg ;;
1086
1087 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1088 | -silent | --silent | --silen | --sile | --sil)
1089 silent=yes ;;
1090
1091 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1092 ac_prev=sbindir ;;
1093 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1094 | --sbi=* | --sb=*)
1095 sbindir=$ac_optarg ;;
1096
1097 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1098 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1099 | --sharedst | --shareds | --shared | --share | --shar \
1100 | --sha | --sh)
1101 ac_prev=sharedstatedir ;;
1102 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1103 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1104 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1105 | --sha=* | --sh=*)
1106 sharedstatedir=$ac_optarg ;;
1107
1108 -site | --site | --sit)
1109 ac_prev=site ;;
1110 -site=* | --site=* | --sit=*)
1111 site=$ac_optarg ;;
1112
1113 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1114 ac_prev=srcdir ;;
1115 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1116 srcdir=$ac_optarg ;;
1117
1118 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1119 | --syscon | --sysco | --sysc | --sys | --sy)
1120 ac_prev=sysconfdir ;;
1121 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1122 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1123 sysconfdir=$ac_optarg ;;
1124
1125 -target | --target | --targe | --targ | --tar | --ta | --t)
1126 ac_prev=target_alias ;;
1127 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1128 target_alias=$ac_optarg ;;
1129
1130 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1131 verbose=yes ;;
1132
1133 -version | --version | --versio | --versi | --vers | -V)
1134 ac_init_version=: ;;
1135
1136 -with-* | --with-*)
1137 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1138 # Reject names that are not valid shell variable names.
1139 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1140 as_fn_error $? "invalid package name: $ac_useropt"
1141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145 "with_$ac_useropt"
1146 "*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
1149 esac
1150 eval with_$ac_useropt=\$ac_optarg ;;
1151
1152 -without-* | --without-*)
1153 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1154 # Reject names that are not valid shell variable names.
1155 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1156 as_fn_error $? "invalid package name: $ac_useropt"
1157 ac_useropt_orig=$ac_useropt
1158 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1159 case $ac_user_opts in
1160 *"
1161 "with_$ac_useropt"
1162 "*) ;;
1163 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1164 ac_unrecognized_sep=', ';;
1165 esac
1166 eval with_$ac_useropt=no ;;
1167
1168 --x)
1169 # Obsolete; use --with-x.
1170 with_x=yes ;;
1171
1172 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1173 | --x-incl | --x-inc | --x-in | --x-i)
1174 ac_prev=x_includes ;;
1175 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1176 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1177 x_includes=$ac_optarg ;;
1178
1179 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1180 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1181 ac_prev=x_libraries ;;
1182 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1183 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1184 x_libraries=$ac_optarg ;;
1185
1186 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1187 Try \`$0 --help' for more information"
1188 ;;
1189
1190 *=*)
1191 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1192 # Reject names that are not valid shell variable names.
1193 case $ac_envvar in #(
1194 '' | [0-9]* | *[!_$as_cr_alnum]* )
1195 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1196 esac
1197 eval $ac_envvar=\$ac_optarg
1198 export $ac_envvar ;;
1199
1200 *)
1201 # FIXME: should be removed in autoconf 3.0.
1202 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1203 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1204 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1205 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1206 ;;
1207
1208 esac
1209 done
1210
1211 if test -n "$ac_prev"; then
1212 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1213 as_fn_error $? "missing argument to $ac_option"
1214 fi
1215
1216 if test -n "$ac_unrecognized_opts"; then
1217 case $enable_option_checking in
1218 no) ;;
1219 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1220 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1221 esac
1222 fi
1223
1224 # Check all directory arguments for consistency.
1225 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1226 datadir sysconfdir sharedstatedir localstatedir includedir \
1227 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1228 libdir localedir mandir
1229 do
1230 eval ac_val=\$$ac_var
1231 # Remove trailing slashes.
1232 case $ac_val in
1233 */ )
1234 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1235 eval $ac_var=\$ac_val;;
1236 esac
1237 # Be sure to have absolute directory names.
1238 case $ac_val in
1239 [\\/$]* | ?:[\\/]* ) continue;;
1240 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1241 esac
1242 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1243 done
1244
1245 # There might be people who depend on the old broken behavior: `$host'
1246 # used to hold the argument of --host etc.
1247 # FIXME: To remove some day.
1248 build=$build_alias
1249 host=$host_alias
1250 target=$target_alias
1251
1252 # FIXME: To remove some day.
1253 if test "x$host_alias" != x; then
1254 if test "x$build_alias" = x; then
1255 cross_compiling=maybe
1256 elif test "x$build_alias" != "x$host_alias"; then
1257 cross_compiling=yes
1258 fi
1259 fi
1260
1261 ac_tool_prefix=
1262 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1263
1264 test "$silent" = yes && exec 6>/dev/null
1265
1266
1267 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1268 ac_ls_di=`ls -di .` &&
1269 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1270 as_fn_error $? "working directory cannot be determined"
1271 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1272 as_fn_error $? "pwd does not report name of working directory"
1273
1274
1275 # Find the source files, if location was not specified.
1276 if test -z "$srcdir"; then
1277 ac_srcdir_defaulted=yes
1278 # Try the directory containing this script, then the parent directory.
1279 ac_confdir=`$as_dirname -- "$as_myself" ||
1280 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1281 X"$as_myself" : 'X\(//\)[^/]' \| \
1282 X"$as_myself" : 'X\(//\)$' \| \
1283 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1284 $as_echo X"$as_myself" |
1285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\/\)[^/].*/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\/\)$/{
1294 s//\1/
1295 q
1296 }
1297 /^X\(\/\).*/{
1298 s//\1/
1299 q
1300 }
1301 s/.*/./; q'`
1302 srcdir=$ac_confdir
1303 if test ! -r "$srcdir/$ac_unique_file"; then
1304 srcdir=..
1305 fi
1306 else
1307 ac_srcdir_defaulted=no
1308 fi
1309 if test ! -r "$srcdir/$ac_unique_file"; then
1310 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1311 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1312 fi
1313 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1314 ac_abs_confdir=`(
1315 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1316 pwd)`
1317 # When building in place, set srcdir=.
1318 if test "$ac_abs_confdir" = "$ac_pwd"; then
1319 srcdir=.
1320 fi
1321 # Remove unnecessary trailing slashes from srcdir.
1322 # Double slashes in file names in object file debugging info
1323 # mess up M-x gdb in Emacs.
1324 case $srcdir in
1325 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1326 esac
1327 for ac_var in $ac_precious_vars; do
1328 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1329 eval ac_env_${ac_var}_value=\$${ac_var}
1330 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1332 done
1333
1334 #
1335 # Report the --help message.
1336 #
1337 if test "$ac_init_help" = "long"; then
1338 # Omit some internal or obsolete options to make the list less imposing.
1339 # This message is too long to be a string in the A/UX 3.1 sh.
1340 cat <<_ACEOF
1341 \`configure' configures this package to adapt to many kinds of systems.
1342
1343 Usage: $0 [OPTION]... [VAR=VALUE]...
1344
1345 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1346 VAR=VALUE. See below for descriptions of some of the useful variables.
1347
1348 Defaults for the options are specified in brackets.
1349
1350 Configuration:
1351 -h, --help display this help and exit
1352 --help=short display options specific to this package
1353 --help=recursive display the short help of all the included packages
1354 -V, --version display version information and exit
1355 -q, --quiet, --silent do not print \`checking ...' messages
1356 --cache-file=FILE cache test results in FILE [disabled]
1357 -C, --config-cache alias for \`--cache-file=config.cache'
1358 -n, --no-create do not create output files
1359 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1360
1361 Installation directories:
1362 --prefix=PREFIX install architecture-independent files in PREFIX
1363 [$ac_default_prefix]
1364 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1365 [PREFIX]
1366
1367 By default, \`make install' will install all the files in
1368 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1369 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1370 for instance \`--prefix=\$HOME'.
1371
1372 For better control, use the options below.
1373
1374 Fine tuning of the installation directories:
1375 --bindir=DIR user executables [EPREFIX/bin]
1376 --sbindir=DIR system admin executables [EPREFIX/sbin]
1377 --libexecdir=DIR program executables [EPREFIX/libexec]
1378 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1379 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1380 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1381 --libdir=DIR object code libraries [EPREFIX/lib]
1382 --includedir=DIR C header files [PREFIX/include]
1383 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1384 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1385 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1386 --infodir=DIR info documentation [DATAROOTDIR/info]
1387 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1388 --mandir=DIR man documentation [DATAROOTDIR/man]
1389 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1390 --htmldir=DIR html documentation [DOCDIR]
1391 --dvidir=DIR dvi documentation [DOCDIR]
1392 --pdfdir=DIR pdf documentation [DOCDIR]
1393 --psdir=DIR ps documentation [DOCDIR]
1394 _ACEOF
1395
1396 cat <<\_ACEOF
1397
1398 Program names:
1399 --program-prefix=PREFIX prepend PREFIX to installed program names
1400 --program-suffix=SUFFIX append SUFFIX to installed program names
1401 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1402
1403 System types:
1404 --build=BUILD configure for building on BUILD [guessed]
1405 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1406 --target=TARGET configure for building compilers for TARGET [HOST]
1407 _ACEOF
1408 fi
1409
1410 if test -n "$ac_init_help"; then
1411
1412 cat <<\_ACEOF
1413
1414 Optional Features:
1415 --disable-option-checking ignore unrecognized --enable/--with options
1416 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1417 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1418 --enable-maintainer-mode
1419 enable make rules and dependencies not useful (and
1420 sometimes confusing) to the casual installer
1421 --disable-largefile omit support for large files
1422 --enable-threading include support for parallel processing of data
1423 (yes/no)
1424 --disable-rpath do not hardcode runtime library paths
1425 --enable-unit-tests Enable the inclusion of unit tests when compiling
1426 GDB
1427 --disable-nls do not use Native Language Support
1428 --enable-werror treat compile warnings as errors
1429 --enable-build-warnings enable build-time compiler warnings if gcc is used
1430 --enable-gdb-build-warnings
1431 enable GDB specific build-time compiler warnings if
1432 gcc is used
1433 --enable-inprocess-agent
1434 inprocess agent
1435
1436 Optional Packages:
1437 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1438 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1439 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1440 --with-gnu-ld assume the C compiler uses GNU ld default=no
1441 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1442 --without-libipt-prefix don't search for libipt in includedir and libdir
1443 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1444 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1445 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1446 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1447 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1448 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1449 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1450 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1451 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1452 --without-libintl-prefix don't search for libintl in includedir and libdir
1453 --with-libintl-type=TYPE type of library to search for (auto/static/shared)
1454 --with-ust=PATH Specify prefix directory for the installed UST package
1455 Equivalent to --with-ust-include=PATH/include
1456 plus --with-ust-lib=PATH/lib
1457 --with-ust-include=PATH Specify directory for installed UST include files
1458 --with-ust-lib=PATH Specify the directory for the installed UST library
1459 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1460 --with-bugurl=URL Direct users to URL to report a bug
1461 --with-libthread-db=PATH
1462 use given libthread_db directly
1463
1464 Some influential environment variables:
1465 CC C compiler command
1466 CFLAGS C compiler flags
1467 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1468 nonstandard directory <lib dir>
1469 LIBS libraries to pass to the linker, e.g. -l<library>
1470 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1471 you have headers in a nonstandard directory <include dir>
1472 CXX C++ compiler command
1473 CXXFLAGS C++ compiler flags
1474 CPP C preprocessor
1475
1476 Use these variables to override the choices made by `configure' or to help
1477 it to find libraries and programs with nonstandard names/locations.
1478
1479 Report bugs to the package provider.
1480 _ACEOF
1481 ac_status=$?
1482 fi
1483
1484 if test "$ac_init_help" = "recursive"; then
1485 # If there are subdirs, report their specific --help.
1486 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1487 test -d "$ac_dir" ||
1488 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1489 continue
1490 ac_builddir=.
1491
1492 case "$ac_dir" in
1493 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1494 *)
1495 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1496 # A ".." for each directory in $ac_dir_suffix.
1497 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1498 case $ac_top_builddir_sub in
1499 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1501 esac ;;
1502 esac
1503 ac_abs_top_builddir=$ac_pwd
1504 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1505 # for backward compatibility:
1506 ac_top_builddir=$ac_top_build_prefix
1507
1508 case $srcdir in
1509 .) # We are building in place.
1510 ac_srcdir=.
1511 ac_top_srcdir=$ac_top_builddir_sub
1512 ac_abs_top_srcdir=$ac_pwd ;;
1513 [\\/]* | ?:[\\/]* ) # Absolute name.
1514 ac_srcdir=$srcdir$ac_dir_suffix;
1515 ac_top_srcdir=$srcdir
1516 ac_abs_top_srcdir=$srcdir ;;
1517 *) # Relative name.
1518 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1519 ac_top_srcdir=$ac_top_build_prefix$srcdir
1520 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1521 esac
1522 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1523
1524 cd "$ac_dir" || { ac_status=$?; continue; }
1525 # Check for guested configure.
1526 if test -f "$ac_srcdir/configure.gnu"; then
1527 echo &&
1528 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1529 elif test -f "$ac_srcdir/configure"; then
1530 echo &&
1531 $SHELL "$ac_srcdir/configure" --help=recursive
1532 else
1533 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1534 fi || ac_status=$?
1535 cd "$ac_pwd" || { ac_status=$?; break; }
1536 done
1537 fi
1538
1539 test -n "$ac_init_help" && exit $ac_status
1540 if $ac_init_version; then
1541 cat <<\_ACEOF
1542 configure
1543 generated by GNU Autoconf 2.69
1544
1545 Copyright (C) 2012 Free Software Foundation, Inc.
1546 This configure script is free software; the Free Software Foundation
1547 gives unlimited permission to copy, distribute and modify it.
1548 _ACEOF
1549 exit
1550 fi
1551
1552 ## ------------------------ ##
1553 ## Autoconf initialization. ##
1554 ## ------------------------ ##
1555
1556 # ac_fn_c_try_compile LINENO
1557 # --------------------------
1558 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1559 ac_fn_c_try_compile ()
1560 {
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 rm -f conftest.$ac_objext
1563 if { { ac_try="$ac_compile"
1564 case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567 esac
1568 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569 $as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_compile") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } && {
1579 test -z "$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 } && test -s conftest.$ac_objext; then :
1582 ac_retval=0
1583 else
1584 $as_echo "$as_me: failed program was:" >&5
1585 sed 's/^/| /' conftest.$ac_ext >&5
1586
1587 ac_retval=1
1588 fi
1589 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1590 as_fn_set_status $ac_retval
1591
1592 } # ac_fn_c_try_compile
1593
1594 # ac_fn_cxx_try_compile LINENO
1595 # ----------------------------
1596 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1597 ac_fn_cxx_try_compile ()
1598 {
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 rm -f conftest.$ac_objext
1601 if { { ac_try="$ac_compile"
1602 case "(($ac_try" in
1603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1604 *) ac_try_echo=$ac_try;;
1605 esac
1606 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1607 $as_echo "$ac_try_echo"; } >&5
1608 (eval "$ac_compile") 2>conftest.err
1609 ac_status=$?
1610 if test -s conftest.err; then
1611 grep -v '^ *+' conftest.err >conftest.er1
1612 cat conftest.er1 >&5
1613 mv -f conftest.er1 conftest.err
1614 fi
1615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1616 test $ac_status = 0; } && {
1617 test -z "$ac_cxx_werror_flag" ||
1618 test ! -s conftest.err
1619 } && test -s conftest.$ac_objext; then :
1620 ac_retval=0
1621 else
1622 $as_echo "$as_me: failed program was:" >&5
1623 sed 's/^/| /' conftest.$ac_ext >&5
1624
1625 ac_retval=1
1626 fi
1627 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1628 as_fn_set_status $ac_retval
1629
1630 } # ac_fn_cxx_try_compile
1631
1632 # ac_fn_c_try_cpp LINENO
1633 # ----------------------
1634 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1635 ac_fn_c_try_cpp ()
1636 {
1637 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1638 if { { ac_try="$ac_cpp conftest.$ac_ext"
1639 case "(($ac_try" in
1640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1641 *) ac_try_echo=$ac_try;;
1642 esac
1643 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1644 $as_echo "$ac_try_echo"; } >&5
1645 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1646 ac_status=$?
1647 if test -s conftest.err; then
1648 grep -v '^ *+' conftest.err >conftest.er1
1649 cat conftest.er1 >&5
1650 mv -f conftest.er1 conftest.err
1651 fi
1652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1653 test $ac_status = 0; } > conftest.i && {
1654 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1655 test ! -s conftest.err
1656 }; then :
1657 ac_retval=0
1658 else
1659 $as_echo "$as_me: failed program was:" >&5
1660 sed 's/^/| /' conftest.$ac_ext >&5
1661
1662 ac_retval=1
1663 fi
1664 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1665 as_fn_set_status $ac_retval
1666
1667 } # ac_fn_c_try_cpp
1668
1669 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1670 # -------------------------------------------------------
1671 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1672 # the include files in INCLUDES and setting the cache variable VAR
1673 # accordingly.
1674 ac_fn_c_check_header_mongrel ()
1675 {
1676 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1677 if eval \${$3+:} false; then :
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1679 $as_echo_n "checking for $2... " >&6; }
1680 if eval \${$3+:} false; then :
1681 $as_echo_n "(cached) " >&6
1682 fi
1683 eval ac_res=\$$3
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1685 $as_echo "$ac_res" >&6; }
1686 else
1687 # Is the header compilable?
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1689 $as_echo_n "checking $2 usability... " >&6; }
1690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1691 /* end confdefs.h. */
1692 $4
1693 #include <$2>
1694 _ACEOF
1695 if ac_fn_c_try_compile "$LINENO"; then :
1696 ac_header_compiler=yes
1697 else
1698 ac_header_compiler=no
1699 fi
1700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1702 $as_echo "$ac_header_compiler" >&6; }
1703
1704 # Is the header present?
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1706 $as_echo_n "checking $2 presence... " >&6; }
1707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1708 /* end confdefs.h. */
1709 #include <$2>
1710 _ACEOF
1711 if ac_fn_c_try_cpp "$LINENO"; then :
1712 ac_header_preproc=yes
1713 else
1714 ac_header_preproc=no
1715 fi
1716 rm -f conftest.err conftest.i conftest.$ac_ext
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1718 $as_echo "$ac_header_preproc" >&6; }
1719
1720 # So? What about this header?
1721 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1722 yes:no: )
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1724 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1727 ;;
1728 no:yes:* )
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1730 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1732 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1734 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1736 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1738 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1739 ;;
1740 esac
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1742 $as_echo_n "checking for $2... " >&6; }
1743 if eval \${$3+:} false; then :
1744 $as_echo_n "(cached) " >&6
1745 else
1746 eval "$3=\$ac_header_compiler"
1747 fi
1748 eval ac_res=\$$3
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1750 $as_echo "$ac_res" >&6; }
1751 fi
1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1753
1754 } # ac_fn_c_check_header_mongrel
1755
1756 # ac_fn_c_try_run LINENO
1757 # ----------------------
1758 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1759 # that executables *can* be run.
1760 ac_fn_c_try_run ()
1761 {
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 if { { ac_try="$ac_link"
1764 case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767 esac
1768 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769 $as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_link") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1774 { { case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777 esac
1778 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779 $as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_try") 2>&5
1781 ac_status=$?
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; }; }; then :
1784 ac_retval=0
1785 else
1786 $as_echo "$as_me: program exited with status $ac_status" >&5
1787 $as_echo "$as_me: failed program was:" >&5
1788 sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=$ac_status
1791 fi
1792 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1793 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1794 as_fn_set_status $ac_retval
1795
1796 } # ac_fn_c_try_run
1797
1798 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1799 # -------------------------------------------------------
1800 # Tests whether HEADER exists and can be compiled using the include files in
1801 # INCLUDES, setting the cache variable VAR accordingly.
1802 ac_fn_c_check_header_compile ()
1803 {
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806 $as_echo_n "checking for $2... " >&6; }
1807 if eval \${$3+:} false; then :
1808 $as_echo_n "(cached) " >&6
1809 else
1810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811 /* end confdefs.h. */
1812 $4
1813 #include <$2>
1814 _ACEOF
1815 if ac_fn_c_try_compile "$LINENO"; then :
1816 eval "$3=yes"
1817 else
1818 eval "$3=no"
1819 fi
1820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1821 fi
1822 eval ac_res=\$$3
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824 $as_echo "$ac_res" >&6; }
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826
1827 } # ac_fn_c_check_header_compile
1828
1829 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1830 # -------------------------------------------
1831 # Tests whether TYPE exists after having included INCLUDES, setting cache
1832 # variable VAR accordingly.
1833 ac_fn_c_check_type ()
1834 {
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837 $as_echo_n "checking for $2... " >&6; }
1838 if eval \${$3+:} false; then :
1839 $as_echo_n "(cached) " >&6
1840 else
1841 eval "$3=no"
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843 /* end confdefs.h. */
1844 $4
1845 int
1846 main ()
1847 {
1848 if (sizeof ($2))
1849 return 0;
1850 ;
1851 return 0;
1852 }
1853 _ACEOF
1854 if ac_fn_c_try_compile "$LINENO"; then :
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856 /* end confdefs.h. */
1857 $4
1858 int
1859 main ()
1860 {
1861 if (sizeof (($2)))
1862 return 0;
1863 ;
1864 return 0;
1865 }
1866 _ACEOF
1867 if ac_fn_c_try_compile "$LINENO"; then :
1868
1869 else
1870 eval "$3=yes"
1871 fi
1872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873 fi
1874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875 fi
1876 eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878 $as_echo "$ac_res" >&6; }
1879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1880
1881 } # ac_fn_c_check_type
1882
1883 # ac_fn_c_try_link LINENO
1884 # -----------------------
1885 # Try to link conftest.$ac_ext, and return whether this succeeded.
1886 ac_fn_c_try_link ()
1887 {
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 rm -f conftest.$ac_objext conftest$ac_exeext
1890 if { { ac_try="$ac_link"
1891 case "(($ac_try" in
1892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893 *) ac_try_echo=$ac_try;;
1894 esac
1895 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896 $as_echo "$ac_try_echo"; } >&5
1897 (eval "$ac_link") 2>conftest.err
1898 ac_status=$?
1899 if test -s conftest.err; then
1900 grep -v '^ *+' conftest.err >conftest.er1
1901 cat conftest.er1 >&5
1902 mv -f conftest.er1 conftest.err
1903 fi
1904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905 test $ac_status = 0; } && {
1906 test -z "$ac_c_werror_flag" ||
1907 test ! -s conftest.err
1908 } && test -s conftest$ac_exeext && {
1909 test "$cross_compiling" = yes ||
1910 test -x conftest$ac_exeext
1911 }; then :
1912 ac_retval=0
1913 else
1914 $as_echo "$as_me: failed program was:" >&5
1915 sed 's/^/| /' conftest.$ac_ext >&5
1916
1917 ac_retval=1
1918 fi
1919 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1920 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1921 # interfere with the next link command; also delete a directory that is
1922 # left behind by Apple's compiler. We do this before executing the actions.
1923 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925 as_fn_set_status $ac_retval
1926
1927 } # ac_fn_c_try_link
1928
1929 # ac_fn_c_check_func LINENO FUNC VAR
1930 # ----------------------------------
1931 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1932 ac_fn_c_check_func ()
1933 {
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936 $as_echo_n "checking for $2... " >&6; }
1937 if eval \${$3+:} false; then :
1938 $as_echo_n "(cached) " >&6
1939 else
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941 /* end confdefs.h. */
1942 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1943 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1944 #define $2 innocuous_$2
1945
1946 /* System header to define __stub macros and hopefully few prototypes,
1947 which can conflict with char $2 (); below.
1948 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1949 <limits.h> exists even on freestanding compilers. */
1950
1951 #ifdef __STDC__
1952 # include <limits.h>
1953 #else
1954 # include <assert.h>
1955 #endif
1956
1957 #undef $2
1958
1959 /* Override any GCC internal prototype to avoid an error.
1960 Use char because int might match the return type of a GCC
1961 builtin and then its argument prototype would still apply. */
1962 #ifdef __cplusplus
1963 extern "C"
1964 #endif
1965 char $2 ();
1966 /* The GNU C library defines this for functions which it implements
1967 to always fail with ENOSYS. Some functions are actually named
1968 something starting with __ and the normal name is an alias. */
1969 #if defined __stub_$2 || defined __stub___$2
1970 choke me
1971 #endif
1972
1973 int
1974 main ()
1975 {
1976 return $2 ();
1977 ;
1978 return 0;
1979 }
1980 _ACEOF
1981 if ac_fn_c_try_link "$LINENO"; then :
1982 eval "$3=yes"
1983 else
1984 eval "$3=no"
1985 fi
1986 rm -f core conftest.err conftest.$ac_objext \
1987 conftest$ac_exeext conftest.$ac_ext
1988 fi
1989 eval ac_res=\$$3
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991 $as_echo "$ac_res" >&6; }
1992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1993
1994 } # ac_fn_c_check_func
1995
1996 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1997 # ---------------------------------------------
1998 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1999 # accordingly.
2000 ac_fn_c_check_decl ()
2001 {
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003 as_decl_name=`echo $2|sed 's/ *(.*//'`
2004 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2006 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2007 if eval \${$3+:} false; then :
2008 $as_echo_n "(cached) " >&6
2009 else
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h. */
2012 $4
2013 int
2014 main ()
2015 {
2016 #ifndef $as_decl_name
2017 #ifdef __cplusplus
2018 (void) $as_decl_use;
2019 #else
2020 (void) $as_decl_name;
2021 #endif
2022 #endif
2023
2024 ;
2025 return 0;
2026 }
2027 _ACEOF
2028 if ac_fn_c_try_compile "$LINENO"; then :
2029 eval "$3=yes"
2030 else
2031 eval "$3=no"
2032 fi
2033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 fi
2035 eval ac_res=\$$3
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2037 $as_echo "$ac_res" >&6; }
2038 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2039
2040 } # ac_fn_c_check_decl
2041
2042 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2043 # ----------------------------------------------------
2044 # Tries to find if the field MEMBER exists in type AGGR, after including
2045 # INCLUDES, setting cache variable VAR accordingly.
2046 ac_fn_c_check_member ()
2047 {
2048 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2050 $as_echo_n "checking for $2.$3... " >&6; }
2051 if eval \${$4+:} false; then :
2052 $as_echo_n "(cached) " >&6
2053 else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055 /* end confdefs.h. */
2056 $5
2057 int
2058 main ()
2059 {
2060 static $2 ac_aggr;
2061 if (ac_aggr.$3)
2062 return 0;
2063 ;
2064 return 0;
2065 }
2066 _ACEOF
2067 if ac_fn_c_try_compile "$LINENO"; then :
2068 eval "$4=yes"
2069 else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071 /* end confdefs.h. */
2072 $5
2073 int
2074 main ()
2075 {
2076 static $2 ac_aggr;
2077 if (sizeof ac_aggr.$3)
2078 return 0;
2079 ;
2080 return 0;
2081 }
2082 _ACEOF
2083 if ac_fn_c_try_compile "$LINENO"; then :
2084 eval "$4=yes"
2085 else
2086 eval "$4=no"
2087 fi
2088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 fi
2090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091 fi
2092 eval ac_res=\$$4
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2094 $as_echo "$ac_res" >&6; }
2095 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096
2097 } # ac_fn_c_check_member
2098
2099 # ac_fn_cxx_try_link LINENO
2100 # -------------------------
2101 # Try to link conftest.$ac_ext, and return whether this succeeded.
2102 ac_fn_cxx_try_link ()
2103 {
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 rm -f conftest.$ac_objext conftest$ac_exeext
2106 if { { ac_try="$ac_link"
2107 case "(($ac_try" in
2108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2109 *) ac_try_echo=$ac_try;;
2110 esac
2111 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2112 $as_echo "$ac_try_echo"; } >&5
2113 (eval "$ac_link") 2>conftest.err
2114 ac_status=$?
2115 if test -s conftest.err; then
2116 grep -v '^ *+' conftest.err >conftest.er1
2117 cat conftest.er1 >&5
2118 mv -f conftest.er1 conftest.err
2119 fi
2120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2121 test $ac_status = 0; } && {
2122 test -z "$ac_cxx_werror_flag" ||
2123 test ! -s conftest.err
2124 } && test -s conftest$ac_exeext && {
2125 test "$cross_compiling" = yes ||
2126 test -x conftest$ac_exeext
2127 }; then :
2128 ac_retval=0
2129 else
2130 $as_echo "$as_me: failed program was:" >&5
2131 sed 's/^/| /' conftest.$ac_ext >&5
2132
2133 ac_retval=1
2134 fi
2135 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2136 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2137 # interfere with the next link command; also delete a directory that is
2138 # left behind by Apple's compiler. We do this before executing the actions.
2139 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2140 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141 as_fn_set_status $ac_retval
2142
2143 } # ac_fn_cxx_try_link
2144
2145 # ac_fn_cxx_check_func LINENO FUNC VAR
2146 # ------------------------------------
2147 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2148 ac_fn_cxx_check_func ()
2149 {
2150 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2152 $as_echo_n "checking for $2... " >&6; }
2153 if eval \${$3+:} false; then :
2154 $as_echo_n "(cached) " >&6
2155 else
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h. */
2158 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2159 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2160 #define $2 innocuous_$2
2161
2162 /* System header to define __stub macros and hopefully few prototypes,
2163 which can conflict with char $2 (); below.
2164 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2165 <limits.h> exists even on freestanding compilers. */
2166
2167 #ifdef __STDC__
2168 # include <limits.h>
2169 #else
2170 # include <assert.h>
2171 #endif
2172
2173 #undef $2
2174
2175 /* Override any GCC internal prototype to avoid an error.
2176 Use char because int might match the return type of a GCC
2177 builtin and then its argument prototype would still apply. */
2178 #ifdef __cplusplus
2179 extern "C"
2180 #endif
2181 char $2 ();
2182 /* The GNU C library defines this for functions which it implements
2183 to always fail with ENOSYS. Some functions are actually named
2184 something starting with __ and the normal name is an alias. */
2185 #if defined __stub_$2 || defined __stub___$2
2186 choke me
2187 #endif
2188
2189 int
2190 main ()
2191 {
2192 return $2 ();
2193 ;
2194 return 0;
2195 }
2196 _ACEOF
2197 if ac_fn_cxx_try_link "$LINENO"; then :
2198 eval "$3=yes"
2199 else
2200 eval "$3=no"
2201 fi
2202 rm -f core conftest.err conftest.$ac_objext \
2203 conftest$ac_exeext conftest.$ac_ext
2204 fi
2205 eval ac_res=\$$3
2206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2207 $as_echo "$ac_res" >&6; }
2208 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2209
2210 } # ac_fn_cxx_check_func
2211
2212 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2213 # --------------------------------------------
2214 # Tries to find the compile-time value of EXPR in a program that includes
2215 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2216 # computed
2217 ac_fn_c_compute_int ()
2218 {
2219 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220 if test "$cross_compiling" = yes; then
2221 # Depending upon the size, compute the lo and hi bounds.
2222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223 /* end confdefs.h. */
2224 $4
2225 int
2226 main ()
2227 {
2228 static int test_array [1 - 2 * !(($2) >= 0)];
2229 test_array [0] = 0;
2230 return test_array [0];
2231
2232 ;
2233 return 0;
2234 }
2235 _ACEOF
2236 if ac_fn_c_try_compile "$LINENO"; then :
2237 ac_lo=0 ac_mid=0
2238 while :; do
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240 /* end confdefs.h. */
2241 $4
2242 int
2243 main ()
2244 {
2245 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2246 test_array [0] = 0;
2247 return test_array [0];
2248
2249 ;
2250 return 0;
2251 }
2252 _ACEOF
2253 if ac_fn_c_try_compile "$LINENO"; then :
2254 ac_hi=$ac_mid; break
2255 else
2256 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2257 if test $ac_lo -le $ac_mid; then
2258 ac_lo= ac_hi=
2259 break
2260 fi
2261 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2262 fi
2263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264 done
2265 else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267 /* end confdefs.h. */
2268 $4
2269 int
2270 main ()
2271 {
2272 static int test_array [1 - 2 * !(($2) < 0)];
2273 test_array [0] = 0;
2274 return test_array [0];
2275
2276 ;
2277 return 0;
2278 }
2279 _ACEOF
2280 if ac_fn_c_try_compile "$LINENO"; then :
2281 ac_hi=-1 ac_mid=-1
2282 while :; do
2283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284 /* end confdefs.h. */
2285 $4
2286 int
2287 main ()
2288 {
2289 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2290 test_array [0] = 0;
2291 return test_array [0];
2292
2293 ;
2294 return 0;
2295 }
2296 _ACEOF
2297 if ac_fn_c_try_compile "$LINENO"; then :
2298 ac_lo=$ac_mid; break
2299 else
2300 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2301 if test $ac_mid -le $ac_hi; then
2302 ac_lo= ac_hi=
2303 break
2304 fi
2305 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306 fi
2307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308 done
2309 else
2310 ac_lo= ac_hi=
2311 fi
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 fi
2314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315 # Binary search between lo and hi bounds.
2316 while test "x$ac_lo" != "x$ac_hi"; do
2317 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319 /* end confdefs.h. */
2320 $4
2321 int
2322 main ()
2323 {
2324 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2325 test_array [0] = 0;
2326 return test_array [0];
2327
2328 ;
2329 return 0;
2330 }
2331 _ACEOF
2332 if ac_fn_c_try_compile "$LINENO"; then :
2333 ac_hi=$ac_mid
2334 else
2335 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2336 fi
2337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338 done
2339 case $ac_lo in #((
2340 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2341 '') ac_retval=1 ;;
2342 esac
2343 else
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345 /* end confdefs.h. */
2346 $4
2347 static long int longval () { return $2; }
2348 static unsigned long int ulongval () { return $2; }
2349 #include <stdio.h>
2350 #include <stdlib.h>
2351 int
2352 main ()
2353 {
2354
2355 FILE *f = fopen ("conftest.val", "w");
2356 if (! f)
2357 return 1;
2358 if (($2) < 0)
2359 {
2360 long int i = longval ();
2361 if (i != ($2))
2362 return 1;
2363 fprintf (f, "%ld", i);
2364 }
2365 else
2366 {
2367 unsigned long int i = ulongval ();
2368 if (i != ($2))
2369 return 1;
2370 fprintf (f, "%lu", i);
2371 }
2372 /* Do not output a trailing newline, as this causes \r\n confusion
2373 on some platforms. */
2374 return ferror (f) || fclose (f) != 0;
2375
2376 ;
2377 return 0;
2378 }
2379 _ACEOF
2380 if ac_fn_c_try_run "$LINENO"; then :
2381 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2382 else
2383 ac_retval=1
2384 fi
2385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2386 conftest.$ac_objext conftest.beam conftest.$ac_ext
2387 rm -f conftest.val
2388
2389 fi
2390 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2391 as_fn_set_status $ac_retval
2392
2393 } # ac_fn_c_compute_int
2394 cat >config.log <<_ACEOF
2395 This file contains any messages produced by compilers while
2396 running configure, to aid debugging if configure makes a mistake.
2397
2398 It was created by $as_me, which was
2399 generated by GNU Autoconf 2.69. Invocation command line was
2400
2401 $ $0 $@
2402
2403 _ACEOF
2404 exec 5>>config.log
2405 {
2406 cat <<_ASUNAME
2407 ## --------- ##
2408 ## Platform. ##
2409 ## --------- ##
2410
2411 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2412 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2413 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2414 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2415 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2416
2417 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2418 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2419
2420 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2421 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2422 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2423 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2424 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2425 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2426 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2427
2428 _ASUNAME
2429
2430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431 for as_dir in $PATH
2432 do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 $as_echo "PATH: $as_dir"
2436 done
2437 IFS=$as_save_IFS
2438
2439 } >&5
2440
2441 cat >&5 <<_ACEOF
2442
2443
2444 ## ----------- ##
2445 ## Core tests. ##
2446 ## ----------- ##
2447
2448 _ACEOF
2449
2450
2451 # Keep a trace of the command line.
2452 # Strip out --no-create and --no-recursion so they do not pile up.
2453 # Strip out --silent because we don't want to record it for future runs.
2454 # Also quote any args containing shell meta-characters.
2455 # Make two passes to allow for proper duplicate-argument suppression.
2456 ac_configure_args=
2457 ac_configure_args0=
2458 ac_configure_args1=
2459 ac_must_keep_next=false
2460 for ac_pass in 1 2
2461 do
2462 for ac_arg
2463 do
2464 case $ac_arg in
2465 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2466 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2467 | -silent | --silent | --silen | --sile | --sil)
2468 continue ;;
2469 *\'*)
2470 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2471 esac
2472 case $ac_pass in
2473 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2474 2)
2475 as_fn_append ac_configure_args1 " '$ac_arg'"
2476 if test $ac_must_keep_next = true; then
2477 ac_must_keep_next=false # Got value, back to normal.
2478 else
2479 case $ac_arg in
2480 *=* | --config-cache | -C | -disable-* | --disable-* \
2481 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2482 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2483 | -with-* | --with-* | -without-* | --without-* | --x)
2484 case "$ac_configure_args0 " in
2485 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2486 esac
2487 ;;
2488 -* ) ac_must_keep_next=true ;;
2489 esac
2490 fi
2491 as_fn_append ac_configure_args " '$ac_arg'"
2492 ;;
2493 esac
2494 done
2495 done
2496 { ac_configure_args0=; unset ac_configure_args0;}
2497 { ac_configure_args1=; unset ac_configure_args1;}
2498
2499 # When interrupted or exit'd, cleanup temporary files, and complete
2500 # config.log. We remove comments because anyway the quotes in there
2501 # would cause problems or look ugly.
2502 # WARNING: Use '\'' to represent an apostrophe within the trap.
2503 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2504 trap 'exit_status=$?
2505 # Save into config.log some information that might help in debugging.
2506 {
2507 echo
2508
2509 $as_echo "## ---------------- ##
2510 ## Cache variables. ##
2511 ## ---------------- ##"
2512 echo
2513 # The following way of writing the cache mishandles newlines in values,
2514 (
2515 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2516 eval ac_val=\$$ac_var
2517 case $ac_val in #(
2518 *${as_nl}*)
2519 case $ac_var in #(
2520 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2521 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2522 esac
2523 case $ac_var in #(
2524 _ | IFS | as_nl) ;; #(
2525 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2526 *) { eval $ac_var=; unset $ac_var;} ;;
2527 esac ;;
2528 esac
2529 done
2530 (set) 2>&1 |
2531 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2532 *${as_nl}ac_space=\ *)
2533 sed -n \
2534 "s/'\''/'\''\\\\'\'''\''/g;
2535 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2536 ;; #(
2537 *)
2538 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2539 ;;
2540 esac |
2541 sort
2542 )
2543 echo
2544
2545 $as_echo "## ----------------- ##
2546 ## Output variables. ##
2547 ## ----------------- ##"
2548 echo
2549 for ac_var in $ac_subst_vars
2550 do
2551 eval ac_val=\$$ac_var
2552 case $ac_val in
2553 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2554 esac
2555 $as_echo "$ac_var='\''$ac_val'\''"
2556 done | sort
2557 echo
2558
2559 if test -n "$ac_subst_files"; then
2560 $as_echo "## ------------------- ##
2561 ## File substitutions. ##
2562 ## ------------------- ##"
2563 echo
2564 for ac_var in $ac_subst_files
2565 do
2566 eval ac_val=\$$ac_var
2567 case $ac_val in
2568 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2569 esac
2570 $as_echo "$ac_var='\''$ac_val'\''"
2571 done | sort
2572 echo
2573 fi
2574
2575 if test -s confdefs.h; then
2576 $as_echo "## ----------- ##
2577 ## confdefs.h. ##
2578 ## ----------- ##"
2579 echo
2580 cat confdefs.h
2581 echo
2582 fi
2583 test "$ac_signal" != 0 &&
2584 $as_echo "$as_me: caught signal $ac_signal"
2585 $as_echo "$as_me: exit $exit_status"
2586 } >&5
2587 rm -f core *.core core.conftest.* &&
2588 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2589 exit $exit_status
2590 ' 0
2591 for ac_signal in 1 2 13 15; do
2592 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2593 done
2594 ac_signal=0
2595
2596 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2597 rm -f -r conftest* confdefs.h
2598
2599 $as_echo "/* confdefs.h */" > confdefs.h
2600
2601 # Predefined preprocessor variables.
2602
2603 cat >>confdefs.h <<_ACEOF
2604 #define PACKAGE_NAME "$PACKAGE_NAME"
2605 _ACEOF
2606
2607 cat >>confdefs.h <<_ACEOF
2608 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2609 _ACEOF
2610
2611 cat >>confdefs.h <<_ACEOF
2612 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2613 _ACEOF
2614
2615 cat >>confdefs.h <<_ACEOF
2616 #define PACKAGE_STRING "$PACKAGE_STRING"
2617 _ACEOF
2618
2619 cat >>confdefs.h <<_ACEOF
2620 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2621 _ACEOF
2622
2623 cat >>confdefs.h <<_ACEOF
2624 #define PACKAGE_URL "$PACKAGE_URL"
2625 _ACEOF
2626
2627
2628 # Let the site file select an alternate cache file if it wants to.
2629 # Prefer an explicitly selected file to automatically selected ones.
2630 ac_site_file1=NONE
2631 ac_site_file2=NONE
2632 if test -n "$CONFIG_SITE"; then
2633 # We do not want a PATH search for config.site.
2634 case $CONFIG_SITE in #((
2635 -*) ac_site_file1=./$CONFIG_SITE;;
2636 */*) ac_site_file1=$CONFIG_SITE;;
2637 *) ac_site_file1=./$CONFIG_SITE;;
2638 esac
2639 elif test "x$prefix" != xNONE; then
2640 ac_site_file1=$prefix/share/config.site
2641 ac_site_file2=$prefix/etc/config.site
2642 else
2643 ac_site_file1=$ac_default_prefix/share/config.site
2644 ac_site_file2=$ac_default_prefix/etc/config.site
2645 fi
2646 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2647 do
2648 test "x$ac_site_file" = xNONE && continue
2649 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2651 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2652 sed 's/^/| /' "$ac_site_file" >&5
2653 . "$ac_site_file" \
2654 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2656 as_fn_error $? "failed to load site script $ac_site_file
2657 See \`config.log' for more details" "$LINENO" 5; }
2658 fi
2659 done
2660
2661 if test -r "$cache_file"; then
2662 # Some versions of bash will fail to source /dev/null (special files
2663 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2664 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2666 $as_echo "$as_me: loading cache $cache_file" >&6;}
2667 case $cache_file in
2668 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2669 *) . "./$cache_file";;
2670 esac
2671 fi
2672 else
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2674 $as_echo "$as_me: creating cache $cache_file" >&6;}
2675 >$cache_file
2676 fi
2677
2678 as_fn_append ac_header_list " stdlib.h"
2679 as_fn_append ac_header_list " unistd.h"
2680 as_fn_append ac_header_list " sys/param.h"
2681 gt_needs="$gt_needs "
2682 # Check that the precious variables saved in the cache have kept the same
2683 # value.
2684 ac_cache_corrupted=false
2685 for ac_var in $ac_precious_vars; do
2686 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2687 eval ac_new_set=\$ac_env_${ac_var}_set
2688 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2689 eval ac_new_val=\$ac_env_${ac_var}_value
2690 case $ac_old_set,$ac_new_set in
2691 set,)
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2693 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2694 ac_cache_corrupted=: ;;
2695 ,set)
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2697 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2698 ac_cache_corrupted=: ;;
2699 ,);;
2700 *)
2701 if test "x$ac_old_val" != "x$ac_new_val"; then
2702 # differences in whitespace do not lead to failure.
2703 ac_old_val_w=`echo x $ac_old_val`
2704 ac_new_val_w=`echo x $ac_new_val`
2705 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2707 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2708 ac_cache_corrupted=:
2709 else
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2711 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2712 eval $ac_var=\$ac_old_val
2713 fi
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2715 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2717 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2718 fi;;
2719 esac
2720 # Pass precious variables to config.status.
2721 if test "$ac_new_set" = set; then
2722 case $ac_new_val in
2723 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2724 *) ac_arg=$ac_var=$ac_new_val ;;
2725 esac
2726 case " $ac_configure_args " in
2727 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2728 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2729 esac
2730 fi
2731 done
2732 if $ac_cache_corrupted; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2734 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2736 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2737 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2738 fi
2739 ## -------------------- ##
2740 ## Main body of script. ##
2741 ## -------------------- ##
2742
2743 ac_ext=c
2744 ac_cpp='$CPP $CPPFLAGS'
2745 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2746 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2747 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2748
2749
2750
2751
2752
2753
2754
2755 ac_config_headers="$ac_config_headers config.h:config.in"
2756
2757
2758
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2760 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2761 # Check whether --enable-maintainer-mode was given.
2762 if test "${enable_maintainer_mode+set}" = set; then :
2763 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2764 else
2765 USE_MAINTAINER_MODE=no
2766 fi
2767
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2769 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2770 if test $USE_MAINTAINER_MODE = yes; then
2771 MAINTAINER_MODE_TRUE=
2772 MAINTAINER_MODE_FALSE='#'
2773 else
2774 MAINTAINER_MODE_TRUE='#'
2775 MAINTAINER_MODE_FALSE=
2776 fi
2777
2778 MAINT=$MAINTAINER_MODE_TRUE
2779
2780
2781
2782 ac_ext=c
2783 ac_cpp='$CPP $CPPFLAGS'
2784 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2785 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2786 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787 if test -n "$ac_tool_prefix"; then
2788 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2789 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791 $as_echo_n "checking for $ac_word... " >&6; }
2792 if ${ac_cv_prog_CC+:} false; then :
2793 $as_echo_n "(cached) " >&6
2794 else
2795 if test -n "$CC"; then
2796 ac_cv_prog_CC="$CC" # Let the user override the test.
2797 else
2798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799 for as_dir in $PATH
2800 do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
2803 for ac_exec_ext in '' $ac_executable_extensions; do
2804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2805 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2807 break 2
2808 fi
2809 done
2810 done
2811 IFS=$as_save_IFS
2812
2813 fi
2814 fi
2815 CC=$ac_cv_prog_CC
2816 if test -n "$CC"; then
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2818 $as_echo "$CC" >&6; }
2819 else
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821 $as_echo "no" >&6; }
2822 fi
2823
2824
2825 fi
2826 if test -z "$ac_cv_prog_CC"; then
2827 ac_ct_CC=$CC
2828 # Extract the first word of "gcc", so it can be a program name with args.
2829 set dummy gcc; ac_word=$2
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2831 $as_echo_n "checking for $ac_word... " >&6; }
2832 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2833 $as_echo_n "(cached) " >&6
2834 else
2835 if test -n "$ac_ct_CC"; then
2836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2837 else
2838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2839 for as_dir in $PATH
2840 do
2841 IFS=$as_save_IFS
2842 test -z "$as_dir" && as_dir=.
2843 for ac_exec_ext in '' $ac_executable_extensions; do
2844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2845 ac_cv_prog_ac_ct_CC="gcc"
2846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2847 break 2
2848 fi
2849 done
2850 done
2851 IFS=$as_save_IFS
2852
2853 fi
2854 fi
2855 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2856 if test -n "$ac_ct_CC"; then
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2858 $as_echo "$ac_ct_CC" >&6; }
2859 else
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2861 $as_echo "no" >&6; }
2862 fi
2863
2864 if test "x$ac_ct_CC" = x; then
2865 CC=""
2866 else
2867 case $cross_compiling:$ac_tool_warned in
2868 yes:)
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2871 ac_tool_warned=yes ;;
2872 esac
2873 CC=$ac_ct_CC
2874 fi
2875 else
2876 CC="$ac_cv_prog_CC"
2877 fi
2878
2879 if test -z "$CC"; then
2880 if test -n "$ac_tool_prefix"; then
2881 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2882 set dummy ${ac_tool_prefix}cc; ac_word=$2
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884 $as_echo_n "checking for $ac_word... " >&6; }
2885 if ${ac_cv_prog_CC+:} false; then :
2886 $as_echo_n "(cached) " >&6
2887 else
2888 if test -n "$CC"; then
2889 ac_cv_prog_CC="$CC" # Let the user override the test.
2890 else
2891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892 for as_dir in $PATH
2893 do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2898 ac_cv_prog_CC="${ac_tool_prefix}cc"
2899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2900 break 2
2901 fi
2902 done
2903 done
2904 IFS=$as_save_IFS
2905
2906 fi
2907 fi
2908 CC=$ac_cv_prog_CC
2909 if test -n "$CC"; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911 $as_echo "$CC" >&6; }
2912 else
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914 $as_echo "no" >&6; }
2915 fi
2916
2917
2918 fi
2919 fi
2920 if test -z "$CC"; then
2921 # Extract the first word of "cc", so it can be a program name with args.
2922 set dummy cc; ac_word=$2
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924 $as_echo_n "checking for $ac_word... " >&6; }
2925 if ${ac_cv_prog_CC+:} false; then :
2926 $as_echo_n "(cached) " >&6
2927 else
2928 if test -n "$CC"; then
2929 ac_cv_prog_CC="$CC" # Let the user override the test.
2930 else
2931 ac_prog_rejected=no
2932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933 for as_dir in $PATH
2934 do
2935 IFS=$as_save_IFS
2936 test -z "$as_dir" && as_dir=.
2937 for ac_exec_ext in '' $ac_executable_extensions; do
2938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2939 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2940 ac_prog_rejected=yes
2941 continue
2942 fi
2943 ac_cv_prog_CC="cc"
2944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2945 break 2
2946 fi
2947 done
2948 done
2949 IFS=$as_save_IFS
2950
2951 if test $ac_prog_rejected = yes; then
2952 # We found a bogon in the path, so make sure we never use it.
2953 set dummy $ac_cv_prog_CC
2954 shift
2955 if test $# != 0; then
2956 # We chose a different compiler from the bogus one.
2957 # However, it has the same basename, so the bogon will be chosen
2958 # first if we set CC to just the basename; use the full file name.
2959 shift
2960 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2961 fi
2962 fi
2963 fi
2964 fi
2965 CC=$ac_cv_prog_CC
2966 if test -n "$CC"; then
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2968 $as_echo "$CC" >&6; }
2969 else
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2971 $as_echo "no" >&6; }
2972 fi
2973
2974
2975 fi
2976 if test -z "$CC"; then
2977 if test -n "$ac_tool_prefix"; then
2978 for ac_prog in cl.exe
2979 do
2980 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2981 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2983 $as_echo_n "checking for $ac_word... " >&6; }
2984 if ${ac_cv_prog_CC+:} false; then :
2985 $as_echo_n "(cached) " >&6
2986 else
2987 if test -n "$CC"; then
2988 ac_cv_prog_CC="$CC" # Let the user override the test.
2989 else
2990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991 for as_dir in $PATH
2992 do
2993 IFS=$as_save_IFS
2994 test -z "$as_dir" && as_dir=.
2995 for ac_exec_ext in '' $ac_executable_extensions; do
2996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2997 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2999 break 2
3000 fi
3001 done
3002 done
3003 IFS=$as_save_IFS
3004
3005 fi
3006 fi
3007 CC=$ac_cv_prog_CC
3008 if test -n "$CC"; then
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3010 $as_echo "$CC" >&6; }
3011 else
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3013 $as_echo "no" >&6; }
3014 fi
3015
3016
3017 test -n "$CC" && break
3018 done
3019 fi
3020 if test -z "$CC"; then
3021 ac_ct_CC=$CC
3022 for ac_prog in cl.exe
3023 do
3024 # Extract the first word of "$ac_prog", so it can be a program name with args.
3025 set dummy $ac_prog; ac_word=$2
3026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3027 $as_echo_n "checking for $ac_word... " >&6; }
3028 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3029 $as_echo_n "(cached) " >&6
3030 else
3031 if test -n "$ac_ct_CC"; then
3032 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3033 else
3034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3035 for as_dir in $PATH
3036 do
3037 IFS=$as_save_IFS
3038 test -z "$as_dir" && as_dir=.
3039 for ac_exec_ext in '' $ac_executable_extensions; do
3040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3041 ac_cv_prog_ac_ct_CC="$ac_prog"
3042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3043 break 2
3044 fi
3045 done
3046 done
3047 IFS=$as_save_IFS
3048
3049 fi
3050 fi
3051 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3052 if test -n "$ac_ct_CC"; then
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3054 $as_echo "$ac_ct_CC" >&6; }
3055 else
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3057 $as_echo "no" >&6; }
3058 fi
3059
3060
3061 test -n "$ac_ct_CC" && break
3062 done
3063
3064 if test "x$ac_ct_CC" = x; then
3065 CC=""
3066 else
3067 case $cross_compiling:$ac_tool_warned in
3068 yes:)
3069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3070 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3071 ac_tool_warned=yes ;;
3072 esac
3073 CC=$ac_ct_CC
3074 fi
3075 fi
3076
3077 fi
3078
3079
3080 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3082 as_fn_error $? "no acceptable C compiler found in \$PATH
3083 See \`config.log' for more details" "$LINENO" 5; }
3084
3085 # Provide some information about the compiler.
3086 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3087 set X $ac_compile
3088 ac_compiler=$2
3089 for ac_option in --version -v -V -qversion; do
3090 { { ac_try="$ac_compiler $ac_option >&5"
3091 case "(($ac_try" in
3092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3093 *) ac_try_echo=$ac_try;;
3094 esac
3095 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3096 $as_echo "$ac_try_echo"; } >&5
3097 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3098 ac_status=$?
3099 if test -s conftest.err; then
3100 sed '10a\
3101 ... rest of stderr output deleted ...
3102 10q' conftest.err >conftest.er1
3103 cat conftest.er1 >&5
3104 fi
3105 rm -f conftest.er1 conftest.err
3106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3107 test $ac_status = 0; }
3108 done
3109
3110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3111 /* end confdefs.h. */
3112
3113 int
3114 main ()
3115 {
3116
3117 ;
3118 return 0;
3119 }
3120 _ACEOF
3121 ac_clean_files_save=$ac_clean_files
3122 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3123 # Try to create an executable without -o first, disregard a.out.
3124 # It will help us diagnose broken compilers, and finding out an intuition
3125 # of exeext.
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3127 $as_echo_n "checking whether the C compiler works... " >&6; }
3128 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3129
3130 # The possible output files:
3131 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3132
3133 ac_rmfiles=
3134 for ac_file in $ac_files
3135 do
3136 case $ac_file in
3137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3138 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3139 esac
3140 done
3141 rm -f $ac_rmfiles
3142
3143 if { { ac_try="$ac_link_default"
3144 case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147 esac
3148 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3149 $as_echo "$ac_try_echo"; } >&5
3150 (eval "$ac_link_default") 2>&5
3151 ac_status=$?
3152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3153 test $ac_status = 0; }; then :
3154 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3155 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3156 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3157 # so that the user can short-circuit this test for compilers unknown to
3158 # Autoconf.
3159 for ac_file in $ac_files ''
3160 do
3161 test -f "$ac_file" || continue
3162 case $ac_file in
3163 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3164 ;;
3165 [ab].out )
3166 # We found the default executable, but exeext='' is most
3167 # certainly right.
3168 break;;
3169 *.* )
3170 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3171 then :; else
3172 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3173 fi
3174 # We set ac_cv_exeext here because the later test for it is not
3175 # safe: cross compilers may not add the suffix if given an `-o'
3176 # argument, so we may need to know it at that point already.
3177 # Even if this section looks crufty: it has the advantage of
3178 # actually working.
3179 break;;
3180 * )
3181 break;;
3182 esac
3183 done
3184 test "$ac_cv_exeext" = no && ac_cv_exeext=
3185
3186 else
3187 ac_file=''
3188 fi
3189 if test -z "$ac_file"; then :
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3191 $as_echo "no" >&6; }
3192 $as_echo "$as_me: failed program was:" >&5
3193 sed 's/^/| /' conftest.$ac_ext >&5
3194
3195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3196 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3197 as_fn_error 77 "C compiler cannot create executables
3198 See \`config.log' for more details" "$LINENO" 5; }
3199 else
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3201 $as_echo "yes" >&6; }
3202 fi
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3204 $as_echo_n "checking for C compiler default output file name... " >&6; }
3205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3206 $as_echo "$ac_file" >&6; }
3207 ac_exeext=$ac_cv_exeext
3208
3209 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3210 ac_clean_files=$ac_clean_files_save
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3212 $as_echo_n "checking for suffix of executables... " >&6; }
3213 if { { ac_try="$ac_link"
3214 case "(($ac_try" in
3215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216 *) ac_try_echo=$ac_try;;
3217 esac
3218 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3219 $as_echo "$ac_try_echo"; } >&5
3220 (eval "$ac_link") 2>&5
3221 ac_status=$?
3222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3223 test $ac_status = 0; }; then :
3224 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3225 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3226 # work properly (i.e., refer to `conftest.exe'), while it won't with
3227 # `rm'.
3228 for ac_file in conftest.exe conftest conftest.*; do
3229 test -f "$ac_file" || continue
3230 case $ac_file in
3231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3232 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3233 break;;
3234 * ) break;;
3235 esac
3236 done
3237 else
3238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3239 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3240 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3241 See \`config.log' for more details" "$LINENO" 5; }
3242 fi
3243 rm -f conftest conftest$ac_cv_exeext
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3245 $as_echo "$ac_cv_exeext" >&6; }
3246
3247 rm -f conftest.$ac_ext
3248 EXEEXT=$ac_cv_exeext
3249 ac_exeext=$EXEEXT
3250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3251 /* end confdefs.h. */
3252 #include <stdio.h>
3253 int
3254 main ()
3255 {
3256 FILE *f = fopen ("conftest.out", "w");
3257 return ferror (f) || fclose (f) != 0;
3258
3259 ;
3260 return 0;
3261 }
3262 _ACEOF
3263 ac_clean_files="$ac_clean_files conftest.out"
3264 # Check that the compiler produces executables we can run. If not, either
3265 # the compiler is broken, or we cross compile.
3266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3267 $as_echo_n "checking whether we are cross compiling... " >&6; }
3268 if test "$cross_compiling" != yes; then
3269 { { ac_try="$ac_link"
3270 case "(($ac_try" in
3271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3272 *) ac_try_echo=$ac_try;;
3273 esac
3274 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3275 $as_echo "$ac_try_echo"; } >&5
3276 (eval "$ac_link") 2>&5
3277 ac_status=$?
3278 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3279 test $ac_status = 0; }
3280 if { ac_try='./conftest$ac_cv_exeext'
3281 { { case "(($ac_try" in
3282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3283 *) ac_try_echo=$ac_try;;
3284 esac
3285 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3286 $as_echo "$ac_try_echo"; } >&5
3287 (eval "$ac_try") 2>&5
3288 ac_status=$?
3289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3290 test $ac_status = 0; }; }; then
3291 cross_compiling=no
3292 else
3293 if test "$cross_compiling" = maybe; then
3294 cross_compiling=yes
3295 else
3296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3298 as_fn_error $? "cannot run C compiled programs.
3299 If you meant to cross compile, use \`--host'.
3300 See \`config.log' for more details" "$LINENO" 5; }
3301 fi
3302 fi
3303 fi
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3305 $as_echo "$cross_compiling" >&6; }
3306
3307 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3308 ac_clean_files=$ac_clean_files_save
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3310 $as_echo_n "checking for suffix of object files... " >&6; }
3311 if ${ac_cv_objext+:} false; then :
3312 $as_echo_n "(cached) " >&6
3313 else
3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3315 /* end confdefs.h. */
3316
3317 int
3318 main ()
3319 {
3320
3321 ;
3322 return 0;
3323 }
3324 _ACEOF
3325 rm -f conftest.o conftest.obj
3326 if { { ac_try="$ac_compile"
3327 case "(($ac_try" in
3328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3329 *) ac_try_echo=$ac_try;;
3330 esac
3331 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3332 $as_echo "$ac_try_echo"; } >&5
3333 (eval "$ac_compile") 2>&5
3334 ac_status=$?
3335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3336 test $ac_status = 0; }; then :
3337 for ac_file in conftest.o conftest.obj conftest.*; do
3338 test -f "$ac_file" || continue;
3339 case $ac_file in
3340 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3341 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3342 break;;
3343 esac
3344 done
3345 else
3346 $as_echo "$as_me: failed program was:" >&5
3347 sed 's/^/| /' conftest.$ac_ext >&5
3348
3349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3350 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3351 as_fn_error $? "cannot compute suffix of object files: cannot compile
3352 See \`config.log' for more details" "$LINENO" 5; }
3353 fi
3354 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3355 fi
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3357 $as_echo "$ac_cv_objext" >&6; }
3358 OBJEXT=$ac_cv_objext
3359 ac_objext=$OBJEXT
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3361 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3362 if ${ac_cv_c_compiler_gnu+:} false; then :
3363 $as_echo_n "(cached) " >&6
3364 else
3365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3366 /* end confdefs.h. */
3367
3368 int
3369 main ()
3370 {
3371 #ifndef __GNUC__
3372 choke me
3373 #endif
3374
3375 ;
3376 return 0;
3377 }
3378 _ACEOF
3379 if ac_fn_c_try_compile "$LINENO"; then :
3380 ac_compiler_gnu=yes
3381 else
3382 ac_compiler_gnu=no
3383 fi
3384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3385 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3386
3387 fi
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3389 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3390 if test $ac_compiler_gnu = yes; then
3391 GCC=yes
3392 else
3393 GCC=
3394 fi
3395 ac_test_CFLAGS=${CFLAGS+set}
3396 ac_save_CFLAGS=$CFLAGS
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3398 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3399 if ${ac_cv_prog_cc_g+:} false; then :
3400 $as_echo_n "(cached) " >&6
3401 else
3402 ac_save_c_werror_flag=$ac_c_werror_flag
3403 ac_c_werror_flag=yes
3404 ac_cv_prog_cc_g=no
3405 CFLAGS="-g"
3406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3407 /* end confdefs.h. */
3408
3409 int
3410 main ()
3411 {
3412
3413 ;
3414 return 0;
3415 }
3416 _ACEOF
3417 if ac_fn_c_try_compile "$LINENO"; then :
3418 ac_cv_prog_cc_g=yes
3419 else
3420 CFLAGS=""
3421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3422 /* end confdefs.h. */
3423
3424 int
3425 main ()
3426 {
3427
3428 ;
3429 return 0;
3430 }
3431 _ACEOF
3432 if ac_fn_c_try_compile "$LINENO"; then :
3433
3434 else
3435 ac_c_werror_flag=$ac_save_c_werror_flag
3436 CFLAGS="-g"
3437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3438 /* end confdefs.h. */
3439
3440 int
3441 main ()
3442 {
3443
3444 ;
3445 return 0;
3446 }
3447 _ACEOF
3448 if ac_fn_c_try_compile "$LINENO"; then :
3449 ac_cv_prog_cc_g=yes
3450 fi
3451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3452 fi
3453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3454 fi
3455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3456 ac_c_werror_flag=$ac_save_c_werror_flag
3457 fi
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3459 $as_echo "$ac_cv_prog_cc_g" >&6; }
3460 if test "$ac_test_CFLAGS" = set; then
3461 CFLAGS=$ac_save_CFLAGS
3462 elif test $ac_cv_prog_cc_g = yes; then
3463 if test "$GCC" = yes; then
3464 CFLAGS="-g -O2"
3465 else
3466 CFLAGS="-g"
3467 fi
3468 else
3469 if test "$GCC" = yes; then
3470 CFLAGS="-O2"
3471 else
3472 CFLAGS=
3473 fi
3474 fi
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3476 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3477 if ${ac_cv_prog_cc_c89+:} false; then :
3478 $as_echo_n "(cached) " >&6
3479 else
3480 ac_cv_prog_cc_c89=no
3481 ac_save_CC=$CC
3482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483 /* end confdefs.h. */
3484 #include <stdarg.h>
3485 #include <stdio.h>
3486 struct stat;
3487 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3488 struct buf { int x; };
3489 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3490 static char *e (p, i)
3491 char **p;
3492 int i;
3493 {
3494 return p[i];
3495 }
3496 static char *f (char * (*g) (char **, int), char **p, ...)
3497 {
3498 char *s;
3499 va_list v;
3500 va_start (v,p);
3501 s = g (p, va_arg (v,int));
3502 va_end (v);
3503 return s;
3504 }
3505
3506 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3507 function prototypes and stuff, but not '\xHH' hex character constants.
3508 These don't provoke an error unfortunately, instead are silently treated
3509 as 'x'. The following induces an error, until -std is added to get
3510 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3511 array size at least. It's necessary to write '\x00'==0 to get something
3512 that's true only with -std. */
3513 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3514
3515 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3516 inside strings and character constants. */
3517 #define FOO(x) 'x'
3518 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3519
3520 int test (int i, double x);
3521 struct s1 {int (*f) (int a);};
3522 struct s2 {int (*f) (double a);};
3523 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3524 int argc;
3525 char **argv;
3526 int
3527 main ()
3528 {
3529 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3530 ;
3531 return 0;
3532 }
3533 _ACEOF
3534 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3535 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3536 do
3537 CC="$ac_save_CC $ac_arg"
3538 if ac_fn_c_try_compile "$LINENO"; then :
3539 ac_cv_prog_cc_c89=$ac_arg
3540 fi
3541 rm -f core conftest.err conftest.$ac_objext
3542 test "x$ac_cv_prog_cc_c89" != "xno" && break
3543 done
3544 rm -f conftest.$ac_ext
3545 CC=$ac_save_CC
3546
3547 fi
3548 # AC_CACHE_VAL
3549 case "x$ac_cv_prog_cc_c89" in
3550 x)
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3552 $as_echo "none needed" >&6; } ;;
3553 xno)
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3555 $as_echo "unsupported" >&6; } ;;
3556 *)
3557 CC="$CC $ac_cv_prog_cc_c89"
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3559 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3560 esac
3561 if test "x$ac_cv_prog_cc_c89" != xno; then :
3562
3563 fi
3564
3565 ac_ext=c
3566 ac_cpp='$CPP $CPPFLAGS'
3567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3570
3571 ac_ext=cpp
3572 ac_cpp='$CXXCPP $CPPFLAGS'
3573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3574 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3576 if test -z "$CXX"; then
3577 if test -n "$CCC"; then
3578 CXX=$CCC
3579 else
3580 if test -n "$ac_tool_prefix"; then
3581 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3582 do
3583 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3584 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3586 $as_echo_n "checking for $ac_word... " >&6; }
3587 if ${ac_cv_prog_CXX+:} false; then :
3588 $as_echo_n "(cached) " >&6
3589 else
3590 if test -n "$CXX"; then
3591 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3592 else
3593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3594 for as_dir in $PATH
3595 do
3596 IFS=$as_save_IFS
3597 test -z "$as_dir" && as_dir=.
3598 for ac_exec_ext in '' $ac_executable_extensions; do
3599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3600 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3602 break 2
3603 fi
3604 done
3605 done
3606 IFS=$as_save_IFS
3607
3608 fi
3609 fi
3610 CXX=$ac_cv_prog_CXX
3611 if test -n "$CXX"; then
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3613 $as_echo "$CXX" >&6; }
3614 else
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3616 $as_echo "no" >&6; }
3617 fi
3618
3619
3620 test -n "$CXX" && break
3621 done
3622 fi
3623 if test -z "$CXX"; then
3624 ac_ct_CXX=$CXX
3625 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3626 do
3627 # Extract the first word of "$ac_prog", so it can be a program name with args.
3628 set dummy $ac_prog; ac_word=$2
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630 $as_echo_n "checking for $ac_word... " >&6; }
3631 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3632 $as_echo_n "(cached) " >&6
3633 else
3634 if test -n "$ac_ct_CXX"; then
3635 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3636 else
3637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638 for as_dir in $PATH
3639 do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_exec_ext in '' $ac_executable_extensions; do
3643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3644 ac_cv_prog_ac_ct_CXX="$ac_prog"
3645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3646 break 2
3647 fi
3648 done
3649 done
3650 IFS=$as_save_IFS
3651
3652 fi
3653 fi
3654 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3655 if test -n "$ac_ct_CXX"; then
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3657 $as_echo "$ac_ct_CXX" >&6; }
3658 else
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660 $as_echo "no" >&6; }
3661 fi
3662
3663
3664 test -n "$ac_ct_CXX" && break
3665 done
3666
3667 if test "x$ac_ct_CXX" = x; then
3668 CXX="g++"
3669 else
3670 case $cross_compiling:$ac_tool_warned in
3671 yes:)
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3673 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3674 ac_tool_warned=yes ;;
3675 esac
3676 CXX=$ac_ct_CXX
3677 fi
3678 fi
3679
3680 fi
3681 fi
3682 # Provide some information about the compiler.
3683 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3684 set X $ac_compile
3685 ac_compiler=$2
3686 for ac_option in --version -v -V -qversion; do
3687 { { ac_try="$ac_compiler $ac_option >&5"
3688 case "(($ac_try" in
3689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3690 *) ac_try_echo=$ac_try;;
3691 esac
3692 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3693 $as_echo "$ac_try_echo"; } >&5
3694 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3695 ac_status=$?
3696 if test -s conftest.err; then
3697 sed '10a\
3698 ... rest of stderr output deleted ...
3699 10q' conftest.err >conftest.er1
3700 cat conftest.er1 >&5
3701 fi
3702 rm -f conftest.er1 conftest.err
3703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3704 test $ac_status = 0; }
3705 done
3706
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3708 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3709 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3710 $as_echo_n "(cached) " >&6
3711 else
3712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3713 /* end confdefs.h. */
3714
3715 int
3716 main ()
3717 {
3718 #ifndef __GNUC__
3719 choke me
3720 #endif
3721
3722 ;
3723 return 0;
3724 }
3725 _ACEOF
3726 if ac_fn_cxx_try_compile "$LINENO"; then :
3727 ac_compiler_gnu=yes
3728 else
3729 ac_compiler_gnu=no
3730 fi
3731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3732 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3733
3734 fi
3735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3736 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3737 if test $ac_compiler_gnu = yes; then
3738 GXX=yes
3739 else
3740 GXX=
3741 fi
3742 ac_test_CXXFLAGS=${CXXFLAGS+set}
3743 ac_save_CXXFLAGS=$CXXFLAGS
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3745 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3746 if ${ac_cv_prog_cxx_g+:} false; then :
3747 $as_echo_n "(cached) " >&6
3748 else
3749 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3750 ac_cxx_werror_flag=yes
3751 ac_cv_prog_cxx_g=no
3752 CXXFLAGS="-g"
3753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3754 /* end confdefs.h. */
3755
3756 int
3757 main ()
3758 {
3759
3760 ;
3761 return 0;
3762 }
3763 _ACEOF
3764 if ac_fn_cxx_try_compile "$LINENO"; then :
3765 ac_cv_prog_cxx_g=yes
3766 else
3767 CXXFLAGS=""
3768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3769 /* end confdefs.h. */
3770
3771 int
3772 main ()
3773 {
3774
3775 ;
3776 return 0;
3777 }
3778 _ACEOF
3779 if ac_fn_cxx_try_compile "$LINENO"; then :
3780
3781 else
3782 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3783 CXXFLAGS="-g"
3784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3785 /* end confdefs.h. */
3786
3787 int
3788 main ()
3789 {
3790
3791 ;
3792 return 0;
3793 }
3794 _ACEOF
3795 if ac_fn_cxx_try_compile "$LINENO"; then :
3796 ac_cv_prog_cxx_g=yes
3797 fi
3798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3799 fi
3800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3801 fi
3802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3803 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3804 fi
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3806 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3807 if test "$ac_test_CXXFLAGS" = set; then
3808 CXXFLAGS=$ac_save_CXXFLAGS
3809 elif test $ac_cv_prog_cxx_g = yes; then
3810 if test "$GXX" = yes; then
3811 CXXFLAGS="-g -O2"
3812 else
3813 CXXFLAGS="-g"
3814 fi
3815 else
3816 if test "$GXX" = yes; then
3817 CXXFLAGS="-O2"
3818 else
3819 CXXFLAGS=
3820 fi
3821 fi
3822 ac_ext=c
3823 ac_cpp='$CPP $CPPFLAGS'
3824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3827
3828
3829 ac_ext=c
3830 ac_cpp='$CPP $CPPFLAGS'
3831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3835 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3836 # On Suns, sometimes $CPP names a directory.
3837 if test -n "$CPP" && test -d "$CPP"; then
3838 CPP=
3839 fi
3840 if test -z "$CPP"; then
3841 if ${ac_cv_prog_CPP+:} false; then :
3842 $as_echo_n "(cached) " >&6
3843 else
3844 # Double quotes because CPP needs to be expanded
3845 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3846 do
3847 ac_preproc_ok=false
3848 for ac_c_preproc_warn_flag in '' yes
3849 do
3850 # Use a header file that comes with gcc, so configuring glibc
3851 # with a fresh cross-compiler works.
3852 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3853 # <limits.h> exists even on freestanding compilers.
3854 # On the NeXT, cc -E runs the code through the compiler's parser,
3855 # not just through cpp. "Syntax error" is here to catch this case.
3856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3857 /* end confdefs.h. */
3858 #ifdef __STDC__
3859 # include <limits.h>
3860 #else
3861 # include <assert.h>
3862 #endif
3863 Syntax error
3864 _ACEOF
3865 if ac_fn_c_try_cpp "$LINENO"; then :
3866
3867 else
3868 # Broken: fails on valid input.
3869 continue
3870 fi
3871 rm -f conftest.err conftest.i conftest.$ac_ext
3872
3873 # OK, works on sane cases. Now check whether nonexistent headers
3874 # can be detected and how.
3875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3876 /* end confdefs.h. */
3877 #include <ac_nonexistent.h>
3878 _ACEOF
3879 if ac_fn_c_try_cpp "$LINENO"; then :
3880 # Broken: success on invalid input.
3881 continue
3882 else
3883 # Passes both tests.
3884 ac_preproc_ok=:
3885 break
3886 fi
3887 rm -f conftest.err conftest.i conftest.$ac_ext
3888
3889 done
3890 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3891 rm -f conftest.i conftest.err conftest.$ac_ext
3892 if $ac_preproc_ok; then :
3893 break
3894 fi
3895
3896 done
3897 ac_cv_prog_CPP=$CPP
3898
3899 fi
3900 CPP=$ac_cv_prog_CPP
3901 else
3902 ac_cv_prog_CPP=$CPP
3903 fi
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3905 $as_echo "$CPP" >&6; }
3906 ac_preproc_ok=false
3907 for ac_c_preproc_warn_flag in '' yes
3908 do
3909 # Use a header file that comes with gcc, so configuring glibc
3910 # with a fresh cross-compiler works.
3911 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3912 # <limits.h> exists even on freestanding compilers.
3913 # On the NeXT, cc -E runs the code through the compiler's parser,
3914 # not just through cpp. "Syntax error" is here to catch this case.
3915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3916 /* end confdefs.h. */
3917 #ifdef __STDC__
3918 # include <limits.h>
3919 #else
3920 # include <assert.h>
3921 #endif
3922 Syntax error
3923 _ACEOF
3924 if ac_fn_c_try_cpp "$LINENO"; then :
3925
3926 else
3927 # Broken: fails on valid input.
3928 continue
3929 fi
3930 rm -f conftest.err conftest.i conftest.$ac_ext
3931
3932 # OK, works on sane cases. Now check whether nonexistent headers
3933 # can be detected and how.
3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3935 /* end confdefs.h. */
3936 #include <ac_nonexistent.h>
3937 _ACEOF
3938 if ac_fn_c_try_cpp "$LINENO"; then :
3939 # Broken: success on invalid input.
3940 continue
3941 else
3942 # Passes both tests.
3943 ac_preproc_ok=:
3944 break
3945 fi
3946 rm -f conftest.err conftest.i conftest.$ac_ext
3947
3948 done
3949 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3950 rm -f conftest.i conftest.err conftest.$ac_ext
3951 if $ac_preproc_ok; then :
3952
3953 else
3954 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3955 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3956 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3957 See \`config.log' for more details" "$LINENO" 5; }
3958 fi
3959
3960 ac_ext=c
3961 ac_cpp='$CPP $CPPFLAGS'
3962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3965
3966
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3968 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3969 if ${ac_cv_path_GREP+:} false; then :
3970 $as_echo_n "(cached) " >&6
3971 else
3972 if test -z "$GREP"; then
3973 ac_path_GREP_found=false
3974 # Loop through the user's path and test for each of PROGNAME-LIST
3975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3976 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3977 do
3978 IFS=$as_save_IFS
3979 test -z "$as_dir" && as_dir=.
3980 for ac_prog in grep ggrep; do
3981 for ac_exec_ext in '' $ac_executable_extensions; do
3982 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3983 as_fn_executable_p "$ac_path_GREP" || continue
3984 # Check for GNU ac_path_GREP and select it if it is found.
3985 # Check for GNU $ac_path_GREP
3986 case `"$ac_path_GREP" --version 2>&1` in
3987 *GNU*)
3988 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3989 *)
3990 ac_count=0
3991 $as_echo_n 0123456789 >"conftest.in"
3992 while :
3993 do
3994 cat "conftest.in" "conftest.in" >"conftest.tmp"
3995 mv "conftest.tmp" "conftest.in"
3996 cp "conftest.in" "conftest.nl"
3997 $as_echo 'GREP' >> "conftest.nl"
3998 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3999 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4000 as_fn_arith $ac_count + 1 && ac_count=$as_val
4001 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4002 # Best one so far, save it but keep looking for a better one
4003 ac_cv_path_GREP="$ac_path_GREP"
4004 ac_path_GREP_max=$ac_count
4005 fi
4006 # 10*(2^10) chars as input seems more than enough
4007 test $ac_count -gt 10 && break
4008 done
4009 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4010 esac
4011
4012 $ac_path_GREP_found && break 3
4013 done
4014 done
4015 done
4016 IFS=$as_save_IFS
4017 if test -z "$ac_cv_path_GREP"; then
4018 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4019 fi
4020 else
4021 ac_cv_path_GREP=$GREP
4022 fi
4023
4024 fi
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4026 $as_echo "$ac_cv_path_GREP" >&6; }
4027 GREP="$ac_cv_path_GREP"
4028
4029
4030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4031 $as_echo_n "checking for egrep... " >&6; }
4032 if ${ac_cv_path_EGREP+:} false; then :
4033 $as_echo_n "(cached) " >&6
4034 else
4035 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4036 then ac_cv_path_EGREP="$GREP -E"
4037 else
4038 if test -z "$EGREP"; then
4039 ac_path_EGREP_found=false
4040 # Loop through the user's path and test for each of PROGNAME-LIST
4041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4042 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4043 do
4044 IFS=$as_save_IFS
4045 test -z "$as_dir" && as_dir=.
4046 for ac_prog in egrep; do
4047 for ac_exec_ext in '' $ac_executable_extensions; do
4048 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4049 as_fn_executable_p "$ac_path_EGREP" || continue
4050 # Check for GNU ac_path_EGREP and select it if it is found.
4051 # Check for GNU $ac_path_EGREP
4052 case `"$ac_path_EGREP" --version 2>&1` in
4053 *GNU*)
4054 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4055 *)
4056 ac_count=0
4057 $as_echo_n 0123456789 >"conftest.in"
4058 while :
4059 do
4060 cat "conftest.in" "conftest.in" >"conftest.tmp"
4061 mv "conftest.tmp" "conftest.in"
4062 cp "conftest.in" "conftest.nl"
4063 $as_echo 'EGREP' >> "conftest.nl"
4064 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4065 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4066 as_fn_arith $ac_count + 1 && ac_count=$as_val
4067 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4068 # Best one so far, save it but keep looking for a better one
4069 ac_cv_path_EGREP="$ac_path_EGREP"
4070 ac_path_EGREP_max=$ac_count
4071 fi
4072 # 10*(2^10) chars as input seems more than enough
4073 test $ac_count -gt 10 && break
4074 done
4075 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4076 esac
4077
4078 $ac_path_EGREP_found && break 3
4079 done
4080 done
4081 done
4082 IFS=$as_save_IFS
4083 if test -z "$ac_cv_path_EGREP"; then
4084 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4085 fi
4086 else
4087 ac_cv_path_EGREP=$EGREP
4088 fi
4089
4090 fi
4091 fi
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4093 $as_echo "$ac_cv_path_EGREP" >&6; }
4094 EGREP="$ac_cv_path_EGREP"
4095
4096
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4098 $as_echo_n "checking for ANSI C header files... " >&6; }
4099 if ${ac_cv_header_stdc+:} false; then :
4100 $as_echo_n "(cached) " >&6
4101 else
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4103 /* end confdefs.h. */
4104 #include <stdlib.h>
4105 #include <stdarg.h>
4106 #include <string.h>
4107 #include <float.h>
4108
4109 int
4110 main ()
4111 {
4112
4113 ;
4114 return 0;
4115 }
4116 _ACEOF
4117 if ac_fn_c_try_compile "$LINENO"; then :
4118 ac_cv_header_stdc=yes
4119 else
4120 ac_cv_header_stdc=no
4121 fi
4122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4123
4124 if test $ac_cv_header_stdc = yes; then
4125 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4127 /* end confdefs.h. */
4128 #include <string.h>
4129
4130 _ACEOF
4131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4132 $EGREP "memchr" >/dev/null 2>&1; then :
4133
4134 else
4135 ac_cv_header_stdc=no
4136 fi
4137 rm -f conftest*
4138
4139 fi
4140
4141 if test $ac_cv_header_stdc = yes; then
4142 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144 /* end confdefs.h. */
4145 #include <stdlib.h>
4146
4147 _ACEOF
4148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4149 $EGREP "free" >/dev/null 2>&1; then :
4150
4151 else
4152 ac_cv_header_stdc=no
4153 fi
4154 rm -f conftest*
4155
4156 fi
4157
4158 if test $ac_cv_header_stdc = yes; then
4159 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4160 if test "$cross_compiling" = yes; then :
4161 :
4162 else
4163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164 /* end confdefs.h. */
4165 #include <ctype.h>
4166 #include <stdlib.h>
4167 #if ((' ' & 0x0FF) == 0x020)
4168 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4169 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4170 #else
4171 # define ISLOWER(c) \
4172 (('a' <= (c) && (c) <= 'i') \
4173 || ('j' <= (c) && (c) <= 'r') \
4174 || ('s' <= (c) && (c) <= 'z'))
4175 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4176 #endif
4177
4178 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4179 int
4180 main ()
4181 {
4182 int i;
4183 for (i = 0; i < 256; i++)
4184 if (XOR (islower (i), ISLOWER (i))
4185 || toupper (i) != TOUPPER (i))
4186 return 2;
4187 return 0;
4188 }
4189 _ACEOF
4190 if ac_fn_c_try_run "$LINENO"; then :
4191
4192 else
4193 ac_cv_header_stdc=no
4194 fi
4195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4196 conftest.$ac_objext conftest.beam conftest.$ac_ext
4197 fi
4198
4199 fi
4200 fi
4201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4202 $as_echo "$ac_cv_header_stdc" >&6; }
4203 if test $ac_cv_header_stdc = yes; then
4204
4205 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4206
4207 fi
4208
4209 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4210 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4211 inttypes.h stdint.h unistd.h
4212 do :
4213 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4214 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4215 "
4216 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4217 cat >>confdefs.h <<_ACEOF
4218 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4219 _ACEOF
4220
4221 fi
4222
4223 done
4224
4225
4226
4227 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4228 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4229 MINIX=yes
4230 else
4231 MINIX=
4232 fi
4233
4234
4235 if test "$MINIX" = yes; then
4236
4237 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4238
4239
4240 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4241
4242
4243 $as_echo "#define _MINIX 1" >>confdefs.h
4244
4245 fi
4246
4247
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4249 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4250 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4251 $as_echo_n "(cached) " >&6
4252 else
4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254 /* end confdefs.h. */
4255
4256 # define __EXTENSIONS__ 1
4257 $ac_includes_default
4258 int
4259 main ()
4260 {
4261
4262 ;
4263 return 0;
4264 }
4265 _ACEOF
4266 if ac_fn_c_try_compile "$LINENO"; then :
4267 ac_cv_safe_to_define___extensions__=yes
4268 else
4269 ac_cv_safe_to_define___extensions__=no
4270 fi
4271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272 fi
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4274 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4275 test $ac_cv_safe_to_define___extensions__ = yes &&
4276 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4277
4278 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4279
4280 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4281
4282 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4283
4284 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4285
4286
4287 # Check whether --enable-largefile was given.
4288 if test "${enable_largefile+set}" = set; then :
4289 enableval=$enable_largefile;
4290 fi
4291
4292 if test "$enable_largefile" != no; then
4293
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4295 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4296 if ${ac_cv_sys_largefile_CC+:} false; then :
4297 $as_echo_n "(cached) " >&6
4298 else
4299 ac_cv_sys_largefile_CC=no
4300 if test "$GCC" != yes; then
4301 ac_save_CC=$CC
4302 while :; do
4303 # IRIX 6.2 and later do not support large files by default,
4304 # so use the C compiler's -n32 option if that helps.
4305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4306 /* end confdefs.h. */
4307 #include <sys/types.h>
4308 /* Check that off_t can represent 2**63 - 1 correctly.
4309 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4310 since some C++ compilers masquerading as C compilers
4311 incorrectly reject 9223372036854775807. */
4312 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4313 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4314 && LARGE_OFF_T % 2147483647 == 1)
4315 ? 1 : -1];
4316 int
4317 main ()
4318 {
4319
4320 ;
4321 return 0;
4322 }
4323 _ACEOF
4324 if ac_fn_c_try_compile "$LINENO"; then :
4325 break
4326 fi
4327 rm -f core conftest.err conftest.$ac_objext
4328 CC="$CC -n32"
4329 if ac_fn_c_try_compile "$LINENO"; then :
4330 ac_cv_sys_largefile_CC=' -n32'; break
4331 fi
4332 rm -f core conftest.err conftest.$ac_objext
4333 break
4334 done
4335 CC=$ac_save_CC
4336 rm -f conftest.$ac_ext
4337 fi
4338 fi
4339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4340 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4341 if test "$ac_cv_sys_largefile_CC" != no; then
4342 CC=$CC$ac_cv_sys_largefile_CC
4343 fi
4344
4345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4346 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4347 if ${ac_cv_sys_file_offset_bits+:} false; then :
4348 $as_echo_n "(cached) " >&6
4349 else
4350 while :; do
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352 /* end confdefs.h. */
4353 #include <sys/types.h>
4354 /* Check that off_t can represent 2**63 - 1 correctly.
4355 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4356 since some C++ compilers masquerading as C compilers
4357 incorrectly reject 9223372036854775807. */
4358 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4359 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4360 && LARGE_OFF_T % 2147483647 == 1)
4361 ? 1 : -1];
4362 int
4363 main ()
4364 {
4365
4366 ;
4367 return 0;
4368 }
4369 _ACEOF
4370 if ac_fn_c_try_compile "$LINENO"; then :
4371 ac_cv_sys_file_offset_bits=no; break
4372 fi
4373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4375 /* end confdefs.h. */
4376 #define _FILE_OFFSET_BITS 64
4377 #include <sys/types.h>
4378 /* Check that off_t can represent 2**63 - 1 correctly.
4379 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4380 since some C++ compilers masquerading as C compilers
4381 incorrectly reject 9223372036854775807. */
4382 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4383 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4384 && LARGE_OFF_T % 2147483647 == 1)
4385 ? 1 : -1];
4386 int
4387 main ()
4388 {
4389
4390 ;
4391 return 0;
4392 }
4393 _ACEOF
4394 if ac_fn_c_try_compile "$LINENO"; then :
4395 ac_cv_sys_file_offset_bits=64; break
4396 fi
4397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4398 ac_cv_sys_file_offset_bits=unknown
4399 break
4400 done
4401 fi
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4403 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4404 case $ac_cv_sys_file_offset_bits in #(
4405 no | unknown) ;;
4406 *)
4407 cat >>confdefs.h <<_ACEOF
4408 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4409 _ACEOF
4410 ;;
4411 esac
4412 rm -rf conftest*
4413 if test $ac_cv_sys_file_offset_bits = unknown; then
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4415 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4416 if ${ac_cv_sys_large_files+:} false; then :
4417 $as_echo_n "(cached) " >&6
4418 else
4419 while :; do
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421 /* end confdefs.h. */
4422 #include <sys/types.h>
4423 /* Check that off_t can represent 2**63 - 1 correctly.
4424 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4425 since some C++ compilers masquerading as C compilers
4426 incorrectly reject 9223372036854775807. */
4427 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4428 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4429 && LARGE_OFF_T % 2147483647 == 1)
4430 ? 1 : -1];
4431 int
4432 main ()
4433 {
4434
4435 ;
4436 return 0;
4437 }
4438 _ACEOF
4439 if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_sys_large_files=no; break
4441 fi
4442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4444 /* end confdefs.h. */
4445 #define _LARGE_FILES 1
4446 #include <sys/types.h>
4447 /* Check that off_t can represent 2**63 - 1 correctly.
4448 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4449 since some C++ compilers masquerading as C compilers
4450 incorrectly reject 9223372036854775807. */
4451 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4452 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4453 && LARGE_OFF_T % 2147483647 == 1)
4454 ? 1 : -1];
4455 int
4456 main ()
4457 {
4458
4459 ;
4460 return 0;
4461 }
4462 _ACEOF
4463 if ac_fn_c_try_compile "$LINENO"; then :
4464 ac_cv_sys_large_files=1; break
4465 fi
4466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467 ac_cv_sys_large_files=unknown
4468 break
4469 done
4470 fi
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4472 $as_echo "$ac_cv_sys_large_files" >&6; }
4473 case $ac_cv_sys_large_files in #(
4474 no | unknown) ;;
4475 *)
4476 cat >>confdefs.h <<_ACEOF
4477 #define _LARGE_FILES $ac_cv_sys_large_files
4478 _ACEOF
4479 ;;
4480 esac
4481 rm -rf conftest*
4482 fi
4483
4484
4485 fi
4486
4487 ac_aux_dir=
4488 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4489 if test -f "$ac_dir/install-sh"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/install-sh -c"
4492 break
4493 elif test -f "$ac_dir/install.sh"; then
4494 ac_aux_dir=$ac_dir
4495 ac_install_sh="$ac_aux_dir/install.sh -c"
4496 break
4497 elif test -f "$ac_dir/shtool"; then
4498 ac_aux_dir=$ac_dir
4499 ac_install_sh="$ac_aux_dir/shtool install -c"
4500 break
4501 fi
4502 done
4503 if test -z "$ac_aux_dir"; then
4504 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4505 fi
4506
4507 # These three variables are undocumented and unsupported,
4508 # and are intended to be withdrawn in a future Autoconf release.
4509 # They can cause serious problems if a builder's source tree is in a directory
4510 # whose full name contains unusual characters.
4511 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4512 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4513 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4514
4515
4516 # Expand $ac_aux_dir to an absolute path.
4517 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4518
4519 if test x"${install_sh+set}" != xset; then
4520 case $am_aux_dir in
4521 *\ * | *\ *)
4522 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4523 *)
4524 install_sh="\${SHELL} $am_aux_dir/install-sh"
4525 esac
4526 fi
4527
4528 # Installed binaries are usually stripped using 'strip' when the user
4529 # run "make install-strip". However 'strip' might not be the right
4530 # tool to use in cross-compilation environments, therefore Automake
4531 # will honor the 'STRIP' environment variable to overrule this program.
4532 if test "$cross_compiling" != no; then
4533 if test -n "$ac_tool_prefix"; then
4534 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4535 set dummy ${ac_tool_prefix}strip; ac_word=$2
4536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4537 $as_echo_n "checking for $ac_word... " >&6; }
4538 if ${ac_cv_prog_STRIP+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540 else
4541 if test -n "$STRIP"; then
4542 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4543 else
4544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545 for as_dir in $PATH
4546 do
4547 IFS=$as_save_IFS
4548 test -z "$as_dir" && as_dir=.
4549 for ac_exec_ext in '' $ac_executable_extensions; do
4550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4551 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4553 break 2
4554 fi
4555 done
4556 done
4557 IFS=$as_save_IFS
4558
4559 fi
4560 fi
4561 STRIP=$ac_cv_prog_STRIP
4562 if test -n "$STRIP"; then
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4564 $as_echo "$STRIP" >&6; }
4565 else
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567 $as_echo "no" >&6; }
4568 fi
4569
4570
4571 fi
4572 if test -z "$ac_cv_prog_STRIP"; then
4573 ac_ct_STRIP=$STRIP
4574 # Extract the first word of "strip", so it can be a program name with args.
4575 set dummy strip; ac_word=$2
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577 $as_echo_n "checking for $ac_word... " >&6; }
4578 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4579 $as_echo_n "(cached) " >&6
4580 else
4581 if test -n "$ac_ct_STRIP"; then
4582 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4583 else
4584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585 for as_dir in $PATH
4586 do
4587 IFS=$as_save_IFS
4588 test -z "$as_dir" && as_dir=.
4589 for ac_exec_ext in '' $ac_executable_extensions; do
4590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4591 ac_cv_prog_ac_ct_STRIP="strip"
4592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4593 break 2
4594 fi
4595 done
4596 done
4597 IFS=$as_save_IFS
4598
4599 fi
4600 fi
4601 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4602 if test -n "$ac_ct_STRIP"; then
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4604 $as_echo "$ac_ct_STRIP" >&6; }
4605 else
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4607 $as_echo "no" >&6; }
4608 fi
4609
4610 if test "x$ac_ct_STRIP" = x; then
4611 STRIP=":"
4612 else
4613 case $cross_compiling:$ac_tool_warned in
4614 yes:)
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4616 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4617 ac_tool_warned=yes ;;
4618 esac
4619 STRIP=$ac_ct_STRIP
4620 fi
4621 else
4622 STRIP="$ac_cv_prog_STRIP"
4623 fi
4624
4625 fi
4626 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4627
4628
4629 # Set build, build_cpu, build_vendor and build_os.
4630 # Make sure we can run config.sub.
4631 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4632 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4633
4634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4635 $as_echo_n "checking build system type... " >&6; }
4636 if ${ac_cv_build+:} false; then :
4637 $as_echo_n "(cached) " >&6
4638 else
4639 ac_build_alias=$build_alias
4640 test "x$ac_build_alias" = x &&
4641 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4642 test "x$ac_build_alias" = x &&
4643 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4644 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4645 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4646
4647 fi
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4649 $as_echo "$ac_cv_build" >&6; }
4650 case $ac_cv_build in
4651 *-*-*) ;;
4652 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4653 esac
4654 build=$ac_cv_build
4655 ac_save_IFS=$IFS; IFS='-'
4656 set x $ac_cv_build
4657 shift
4658 build_cpu=$1
4659 build_vendor=$2
4660 shift; shift
4661 # Remember, the first character of IFS is used to create $*,
4662 # except with old shells:
4663 build_os=$*
4664 IFS=$ac_save_IFS
4665 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4666
4667
4668
4669 # Set host, host_cpu, host_vendor, and host_os.
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4671 $as_echo_n "checking host system type... " >&6; }
4672 if ${ac_cv_host+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674 else
4675 if test "x$host_alias" = x; then
4676 ac_cv_host=$ac_cv_build
4677 else
4678 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4679 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4680 fi
4681
4682 fi
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4684 $as_echo "$ac_cv_host" >&6; }
4685 case $ac_cv_host in
4686 *-*-*) ;;
4687 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4688 esac
4689 host=$ac_cv_host
4690 ac_save_IFS=$IFS; IFS='-'
4691 set x $ac_cv_host
4692 shift
4693 host_cpu=$1
4694 host_vendor=$2
4695 shift; shift
4696 # Remember, the first character of IFS is used to create $*,
4697 # except with old shells:
4698 host_os=$*
4699 IFS=$ac_save_IFS
4700 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4701
4702
4703
4704 # Set target, target_cpu, target_vendor, and target_os.
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4706 $as_echo_n "checking target system type... " >&6; }
4707 if ${ac_cv_target+:} false; then :
4708 $as_echo_n "(cached) " >&6
4709 else
4710 if test "x$target_alias" = x; then
4711 ac_cv_target=$ac_cv_host
4712 else
4713 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4714 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4715 fi
4716
4717 fi
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4719 $as_echo "$ac_cv_target" >&6; }
4720 case $ac_cv_target in
4721 *-*-*) ;;
4722 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4723 esac
4724 target=$ac_cv_target
4725 ac_save_IFS=$IFS; IFS='-'
4726 set x $ac_cv_target
4727 shift
4728 target_cpu=$1
4729 target_vendor=$2
4730 shift; shift
4731 # Remember, the first character of IFS is used to create $*,
4732 # except with old shells:
4733 target_os=$*
4734 IFS=$ac_save_IFS
4735 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4736
4737
4738 # The aliases save the names the user supplied, while $host etc.
4739 # will get canonicalized.
4740 test -n "$target_alias" &&
4741 test "$program_prefix$program_suffix$program_transform_name" = \
4742 NONENONEs,x,x, &&
4743 program_prefix=${target_alias}-
4744
4745 # Find a good install program. We prefer a C program (faster),
4746 # so one script is as good as another. But avoid the broken or
4747 # incompatible versions:
4748 # SysV /etc/install, /usr/sbin/install
4749 # SunOS /usr/etc/install
4750 # IRIX /sbin/install
4751 # AIX /bin/install
4752 # AmigaOS /C/install, which installs bootblocks on floppy discs
4753 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4754 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4755 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4756 # OS/2's system install, which has a completely different semantic
4757 # ./install, which can be erroneously created by make from ./install.sh.
4758 # Reject install programs that cannot install multiple files.
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4760 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4761 if test -z "$INSTALL"; then
4762 if ${ac_cv_path_install+:} false; then :
4763 $as_echo_n "(cached) " >&6
4764 else
4765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766 for as_dir in $PATH
4767 do
4768 IFS=$as_save_IFS
4769 test -z "$as_dir" && as_dir=.
4770 # Account for people who put trailing slashes in PATH elements.
4771 case $as_dir/ in #((
4772 ./ | .// | /[cC]/* | \
4773 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4774 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4775 /usr/ucb/* ) ;;
4776 *)
4777 # OSF1 and SCO ODT 3.0 have their own names for install.
4778 # Don't use installbsd from OSF since it installs stuff as root
4779 # by default.
4780 for ac_prog in ginstall scoinst install; do
4781 for ac_exec_ext in '' $ac_executable_extensions; do
4782 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4783 if test $ac_prog = install &&
4784 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4785 # AIX install. It has an incompatible calling convention.
4786 :
4787 elif test $ac_prog = install &&
4788 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4789 # program-specific install script used by HP pwplus--don't use.
4790 :
4791 else
4792 rm -rf conftest.one conftest.two conftest.dir
4793 echo one > conftest.one
4794 echo two > conftest.two
4795 mkdir conftest.dir
4796 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4797 test -s conftest.one && test -s conftest.two &&
4798 test -s conftest.dir/conftest.one &&
4799 test -s conftest.dir/conftest.two
4800 then
4801 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4802 break 3
4803 fi
4804 fi
4805 fi
4806 done
4807 done
4808 ;;
4809 esac
4810
4811 done
4812 IFS=$as_save_IFS
4813
4814 rm -rf conftest.one conftest.two conftest.dir
4815
4816 fi
4817 if test "${ac_cv_path_install+set}" = set; then
4818 INSTALL=$ac_cv_path_install
4819 else
4820 # As a last resort, use the slow shell script. Don't cache a
4821 # value for INSTALL within a source directory, because that will
4822 # break other packages using the cache if that directory is
4823 # removed, or if the value is a relative name.
4824 INSTALL=$ac_install_sh
4825 fi
4826 fi
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4828 $as_echo "$INSTALL" >&6; }
4829
4830 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4831 # It thinks the first close brace ends the variable substitution.
4832 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4833
4834 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4835
4836 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4837
4838 if test -n "$ac_tool_prefix"; then
4839 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4840 set dummy ${ac_tool_prefix}ar; ac_word=$2
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842 $as_echo_n "checking for $ac_word... " >&6; }
4843 if ${ac_cv_prog_AR+:} false; then :
4844 $as_echo_n "(cached) " >&6
4845 else
4846 if test -n "$AR"; then
4847 ac_cv_prog_AR="$AR" # Let the user override the test.
4848 else
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850 for as_dir in $PATH
4851 do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
4855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4856 ac_cv_prog_AR="${ac_tool_prefix}ar"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860 done
4861 done
4862 IFS=$as_save_IFS
4863
4864 fi
4865 fi
4866 AR=$ac_cv_prog_AR
4867 if test -n "$AR"; then
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4869 $as_echo "$AR" >&6; }
4870 else
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872 $as_echo "no" >&6; }
4873 fi
4874
4875
4876 fi
4877 if test -z "$ac_cv_prog_AR"; then
4878 ac_ct_AR=$AR
4879 # Extract the first word of "ar", so it can be a program name with args.
4880 set dummy ar; ac_word=$2
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4882 $as_echo_n "checking for $ac_word... " >&6; }
4883 if ${ac_cv_prog_ac_ct_AR+:} false; then :
4884 $as_echo_n "(cached) " >&6
4885 else
4886 if test -n "$ac_ct_AR"; then
4887 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4888 else
4889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890 for as_dir in $PATH
4891 do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
4894 for ac_exec_ext in '' $ac_executable_extensions; do
4895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4896 ac_cv_prog_ac_ct_AR="ar"
4897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898 break 2
4899 fi
4900 done
4901 done
4902 IFS=$as_save_IFS
4903
4904 fi
4905 fi
4906 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4907 if test -n "$ac_ct_AR"; then
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4909 $as_echo "$ac_ct_AR" >&6; }
4910 else
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912 $as_echo "no" >&6; }
4913 fi
4914
4915 if test "x$ac_ct_AR" = x; then
4916 AR=""
4917 else
4918 case $cross_compiling:$ac_tool_warned in
4919 yes:)
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4921 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4922 ac_tool_warned=yes ;;
4923 esac
4924 AR=$ac_ct_AR
4925 fi
4926 else
4927 AR="$ac_cv_prog_AR"
4928 fi
4929
4930 if test -n "$ac_tool_prefix"; then
4931 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4932 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934 $as_echo_n "checking for $ac_word... " >&6; }
4935 if ${ac_cv_prog_RANLIB+:} false; then :
4936 $as_echo_n "(cached) " >&6
4937 else
4938 if test -n "$RANLIB"; then
4939 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4940 else
4941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942 for as_dir in $PATH
4943 do
4944 IFS=$as_save_IFS
4945 test -z "$as_dir" && as_dir=.
4946 for ac_exec_ext in '' $ac_executable_extensions; do
4947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4948 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950 break 2
4951 fi
4952 done
4953 done
4954 IFS=$as_save_IFS
4955
4956 fi
4957 fi
4958 RANLIB=$ac_cv_prog_RANLIB
4959 if test -n "$RANLIB"; then
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4961 $as_echo "$RANLIB" >&6; }
4962 else
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964 $as_echo "no" >&6; }
4965 fi
4966
4967
4968 fi
4969 if test -z "$ac_cv_prog_RANLIB"; then
4970 ac_ct_RANLIB=$RANLIB
4971 # Extract the first word of "ranlib", so it can be a program name with args.
4972 set dummy ranlib; ac_word=$2
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974 $as_echo_n "checking for $ac_word... " >&6; }
4975 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4976 $as_echo_n "(cached) " >&6
4977 else
4978 if test -n "$ac_ct_RANLIB"; then
4979 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4980 else
4981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982 for as_dir in $PATH
4983 do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
4986 for ac_exec_ext in '' $ac_executable_extensions; do
4987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988 ac_cv_prog_ac_ct_RANLIB="ranlib"
4989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990 break 2
4991 fi
4992 done
4993 done
4994 IFS=$as_save_IFS
4995
4996 fi
4997 fi
4998 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4999 if test -n "$ac_ct_RANLIB"; then
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5001 $as_echo "$ac_ct_RANLIB" >&6; }
5002 else
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004 $as_echo "no" >&6; }
5005 fi
5006
5007 if test "x$ac_ct_RANLIB" = x; then
5008 RANLIB=":"
5009 else
5010 case $cross_compiling:$ac_tool_warned in
5011 yes:)
5012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5013 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5014 ac_tool_warned=yes ;;
5015 esac
5016 RANLIB=$ac_ct_RANLIB
5017 fi
5018 else
5019 RANLIB="$ac_cv_prog_RANLIB"
5020 fi
5021
5022
5023 test "$program_prefix" != NONE &&
5024 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5025 # Use a double $ so make ignores it.
5026 test "$program_suffix" != NONE &&
5027 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5028 # Double any \ or $.
5029 # By default was `s,x,x', remove it if useless.
5030 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5031 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5032
5033
5034 # We require a C++17 compiler. Check if one is available, and if
5035 # necessary, set CXX_DIALECT to some -std=xxx switch.
5036
5037 ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true
5038 ac_ext=cpp
5039 ac_cpp='$CXXCPP $CPPFLAGS'
5040 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5041 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5042 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5043 CXX_DIALECT=""
5044 ac_success=no
5045
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features by default" >&5
5047 $as_echo_n "checking whether $CXX supports C++17 features by default... " >&6; }
5048 if ${ax_cv_cxx_compile_cxx17+:} false; then :
5049 $as_echo_n "(cached) " >&6
5050 else
5051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052 /* end confdefs.h. */
5053
5054
5055 // If the compiler admits that it is not ready for C++11, why torture it?
5056 // Hopefully, this will speed up the test.
5057
5058 #ifndef __cplusplus
5059
5060 #error "This is not a C++ compiler"
5061
5062 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
5063 // only set it correctly if /Zc:__cplusplus is specified as well as a
5064 // /std:c++NN switch:
5065 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5066 #elif __cplusplus < 201103L && !defined _MSC_VER
5067
5068 #error "This is not a C++11 compiler"
5069
5070 #else
5071
5072 namespace cxx11
5073 {
5074
5075 namespace test_static_assert
5076 {
5077
5078 template <typename T>
5079 struct check
5080 {
5081 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5082 };
5083
5084 }
5085
5086 namespace test_final_override
5087 {
5088
5089 struct Base
5090 {
5091 virtual ~Base() {}
5092 virtual void f() {}
5093 };
5094
5095 struct Derived : public Base
5096 {
5097 virtual ~Derived() override {}
5098 virtual void f() override {}
5099 };
5100
5101 }
5102
5103 namespace test_double_right_angle_brackets
5104 {
5105
5106 template < typename T >
5107 struct check {};
5108
5109 typedef check<void> single_type;
5110 typedef check<check<void>> double_type;
5111 typedef check<check<check<void>>> triple_type;
5112 typedef check<check<check<check<void>>>> quadruple_type;
5113
5114 }
5115
5116 namespace test_decltype
5117 {
5118
5119 int
5120 f()
5121 {
5122 int a = 1;
5123 decltype(a) b = 2;
5124 return a + b;
5125 }
5126
5127 }
5128
5129 namespace test_type_deduction
5130 {
5131
5132 template < typename T1, typename T2 >
5133 struct is_same
5134 {
5135 static const bool value = false;
5136 };
5137
5138 template < typename T >
5139 struct is_same<T, T>
5140 {
5141 static const bool value = true;
5142 };
5143
5144 template < typename T1, typename T2 >
5145 auto
5146 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5147 {
5148 return a1 + a2;
5149 }
5150
5151 int
5152 test(const int c, volatile int v)
5153 {
5154 static_assert(is_same<int, decltype(0)>::value == true, "");
5155 static_assert(is_same<int, decltype(c)>::value == false, "");
5156 static_assert(is_same<int, decltype(v)>::value == false, "");
5157 auto ac = c;
5158 auto av = v;
5159 auto sumi = ac + av + 'x';
5160 auto sumf = ac + av + 1.0;
5161 static_assert(is_same<int, decltype(ac)>::value == true, "");
5162 static_assert(is_same<int, decltype(av)>::value == true, "");
5163 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5164 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5165 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5166 return (sumf > 0.0) ? sumi : add(c, v);
5167 }
5168
5169 }
5170
5171 namespace test_noexcept
5172 {
5173
5174 int f() { return 0; }
5175 int g() noexcept { return 0; }
5176
5177 static_assert(noexcept(f()) == false, "");
5178 static_assert(noexcept(g()) == true, "");
5179
5180 }
5181
5182 namespace test_constexpr
5183 {
5184
5185 template < typename CharT >
5186 unsigned long constexpr
5187 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5188 {
5189 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5190 }
5191
5192 template < typename CharT >
5193 unsigned long constexpr
5194 strlen_c(const CharT *const s) noexcept
5195 {
5196 return strlen_c_r(s, 0UL);
5197 }
5198
5199 static_assert(strlen_c("") == 0UL, "");
5200 static_assert(strlen_c("1") == 1UL, "");
5201 static_assert(strlen_c("example") == 7UL, "");
5202 static_assert(strlen_c("another\0example") == 7UL, "");
5203
5204 }
5205
5206 namespace test_rvalue_references
5207 {
5208
5209 template < int N >
5210 struct answer
5211 {
5212 static constexpr int value = N;
5213 };
5214
5215 answer<1> f(int&) { return answer<1>(); }
5216 answer<2> f(const int&) { return answer<2>(); }
5217 answer<3> f(int&&) { return answer<3>(); }
5218
5219 void
5220 test()
5221 {
5222 int i = 0;
5223 const int c = 0;
5224 static_assert(decltype(f(i))::value == 1, "");
5225 static_assert(decltype(f(c))::value == 2, "");
5226 static_assert(decltype(f(0))::value == 3, "");
5227 }
5228
5229 }
5230
5231 namespace test_uniform_initialization
5232 {
5233
5234 struct test
5235 {
5236 static const int zero {};
5237 static const int one {1};
5238 };
5239
5240 static_assert(test::zero == 0, "");
5241 static_assert(test::one == 1, "");
5242
5243 }
5244
5245 namespace test_lambdas
5246 {
5247
5248 void
5249 test1()
5250 {
5251 auto lambda1 = [](){};
5252 auto lambda2 = lambda1;
5253 lambda1();
5254 lambda2();
5255 }
5256
5257 int
5258 test2()
5259 {
5260 auto a = [](int i, int j){ return i + j; }(1, 2);
5261 auto b = []() -> int { return '0'; }();
5262 auto c = [=](){ return a + b; }();
5263 auto d = [&](){ return c; }();
5264 auto e = [a, &b](int x) mutable {
5265 const auto identity = [](int y){ return y; };
5266 for (auto i = 0; i < a; ++i)
5267 a += b--;
5268 return x + identity(a + b);
5269 }(0);
5270 return a + b + c + d + e;
5271 }
5272
5273 int
5274 test3()
5275 {
5276 const auto nullary = [](){ return 0; };
5277 const auto unary = [](int x){ return x; };
5278 using nullary_t = decltype(nullary);
5279 using unary_t = decltype(unary);
5280 const auto higher1st = [](nullary_t f){ return f(); };
5281 const auto higher2nd = [unary](nullary_t f1){
5282 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5283 };
5284 return higher1st(nullary) + higher2nd(nullary)(unary);
5285 }
5286
5287 }
5288
5289 namespace test_variadic_templates
5290 {
5291
5292 template <int...>
5293 struct sum;
5294
5295 template <int N0, int... N1toN>
5296 struct sum<N0, N1toN...>
5297 {
5298 static constexpr auto value = N0 + sum<N1toN...>::value;
5299 };
5300
5301 template <>
5302 struct sum<>
5303 {
5304 static constexpr auto value = 0;
5305 };
5306
5307 static_assert(sum<>::value == 0, "");
5308 static_assert(sum<1>::value == 1, "");
5309 static_assert(sum<23>::value == 23, "");
5310 static_assert(sum<1, 2>::value == 3, "");
5311 static_assert(sum<5, 5, 11>::value == 21, "");
5312 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5313
5314 }
5315
5316 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5317 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5318 // because of this.
5319 namespace test_template_alias_sfinae
5320 {
5321
5322 struct foo {};
5323
5324 template<typename T>
5325 using member = typename T::member_type;
5326
5327 template<typename T>
5328 void func(...) {}
5329
5330 template<typename T>
5331 void func(member<T>*) {}
5332
5333 void test();
5334
5335 void test() { func<foo>(0); }
5336
5337 }
5338
5339 } // namespace cxx11
5340
5341 #endif // __cplusplus >= 201103L
5342
5343
5344
5345
5346 // If the compiler admits that it is not ready for C++14, why torture it?
5347 // Hopefully, this will speed up the test.
5348
5349 #ifndef __cplusplus
5350
5351 #error "This is not a C++ compiler"
5352
5353 #elif __cplusplus < 201402L && !defined _MSC_VER
5354
5355 #error "This is not a C++14 compiler"
5356
5357 #else
5358
5359 namespace cxx14
5360 {
5361
5362 namespace test_polymorphic_lambdas
5363 {
5364
5365 int
5366 test()
5367 {
5368 const auto lambda = [](auto&&... args){
5369 const auto istiny = [](auto x){
5370 return (sizeof(x) == 1UL) ? 1 : 0;
5371 };
5372 const int aretiny[] = { istiny(args)... };
5373 return aretiny[0];
5374 };
5375 return lambda(1, 1L, 1.0f, '1');
5376 }
5377
5378 }
5379
5380 namespace test_binary_literals
5381 {
5382
5383 constexpr auto ivii = 0b0000000000101010;
5384 static_assert(ivii == 42, "wrong value");
5385
5386 }
5387
5388 namespace test_generalized_constexpr
5389 {
5390
5391 template < typename CharT >
5392 constexpr unsigned long
5393 strlen_c(const CharT *const s) noexcept
5394 {
5395 auto length = 0UL;
5396 for (auto p = s; *p; ++p)
5397 ++length;
5398 return length;
5399 }
5400
5401 static_assert(strlen_c("") == 0UL, "");
5402 static_assert(strlen_c("x") == 1UL, "");
5403 static_assert(strlen_c("test") == 4UL, "");
5404 static_assert(strlen_c("another\0test") == 7UL, "");
5405
5406 }
5407
5408 namespace test_lambda_init_capture
5409 {
5410
5411 int
5412 test()
5413 {
5414 auto x = 0;
5415 const auto lambda1 = [a = x](int b){ return a + b; };
5416 const auto lambda2 = [a = lambda1(x)](){ return a; };
5417 return lambda2();
5418 }
5419
5420 }
5421
5422 namespace test_digit_separators
5423 {
5424
5425 constexpr auto ten_million = 100'000'000;
5426 static_assert(ten_million == 100000000, "");
5427
5428 }
5429
5430 namespace test_return_type_deduction
5431 {
5432
5433 auto f(int& x) { return x; }
5434 decltype(auto) g(int& x) { return x; }
5435
5436 template < typename T1, typename T2 >
5437 struct is_same
5438 {
5439 static constexpr auto value = false;
5440 };
5441
5442 template < typename T >
5443 struct is_same<T, T>
5444 {
5445 static constexpr auto value = true;
5446 };
5447
5448 int
5449 test()
5450 {
5451 auto x = 0;
5452 static_assert(is_same<int, decltype(f(x))>::value, "");
5453 static_assert(is_same<int&, decltype(g(x))>::value, "");
5454 return x;
5455 }
5456
5457 }
5458
5459 } // namespace cxx14
5460
5461 #endif // __cplusplus >= 201402L
5462
5463
5464
5465
5466 // If the compiler admits that it is not ready for C++17, why torture it?
5467 // Hopefully, this will speed up the test.
5468
5469 #ifndef __cplusplus
5470
5471 #error "This is not a C++ compiler"
5472
5473 #elif __cplusplus < 201703L && !defined _MSC_VER
5474
5475 #error "This is not a C++17 compiler"
5476
5477 #else
5478
5479 #include <initializer_list>
5480 #include <utility>
5481 #include <type_traits>
5482
5483 namespace cxx17
5484 {
5485
5486 namespace test_constexpr_lambdas
5487 {
5488
5489 constexpr int foo = [](){return 42;}();
5490
5491 }
5492
5493 namespace test::nested_namespace::definitions
5494 {
5495
5496 }
5497
5498 namespace test_fold_expression
5499 {
5500
5501 template<typename... Args>
5502 int multiply(Args... args)
5503 {
5504 return (args * ... * 1);
5505 }
5506
5507 template<typename... Args>
5508 bool all(Args... args)
5509 {
5510 return (args && ...);
5511 }
5512
5513 }
5514
5515 namespace test_extended_static_assert
5516 {
5517
5518 static_assert (true);
5519
5520 }
5521
5522 namespace test_auto_brace_init_list
5523 {
5524
5525 auto foo = {5};
5526 auto bar {5};
5527
5528 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
5529 static_assert(std::is_same<int, decltype(bar)>::value);
5530 }
5531
5532 namespace test_typename_in_template_template_parameter
5533 {
5534
5535 template<template<typename> typename X> struct D;
5536
5537 }
5538
5539 namespace test_fallthrough_nodiscard_maybe_unused_attributes
5540 {
5541
5542 int f1()
5543 {
5544 return 42;
5545 }
5546
5547 [[nodiscard]] int f2()
5548 {
5549 [[maybe_unused]] auto unused = f1();
5550
5551 switch (f1())
5552 {
5553 case 17:
5554 f1();
5555 [[fallthrough]];
5556 case 42:
5557 f1();
5558 }
5559 return f1();
5560 }
5561
5562 }
5563
5564 namespace test_extended_aggregate_initialization
5565 {
5566
5567 struct base1
5568 {
5569 int b1, b2 = 42;
5570 };
5571
5572 struct base2
5573 {
5574 base2() {
5575 b3 = 42;
5576 }
5577 int b3;
5578 };
5579
5580 struct derived : base1, base2
5581 {
5582 int d;
5583 };
5584
5585 derived d1 {{1, 2}, {}, 4}; // full initialization
5586 derived d2 {{}, {}, 4}; // value-initialized bases
5587
5588 }
5589
5590 namespace test_general_range_based_for_loop
5591 {
5592
5593 struct iter
5594 {
5595 int i;
5596
5597 int& operator* ()
5598 {
5599 return i;
5600 }
5601
5602 const int& operator* () const
5603 {
5604 return i;
5605 }
5606
5607 iter& operator++()
5608 {
5609 ++i;
5610 return *this;
5611 }
5612 };
5613
5614 struct sentinel
5615 {
5616 int i;
5617 };
5618
5619 bool operator== (const iter& i, const sentinel& s)
5620 {
5621 return i.i == s.i;
5622 }
5623
5624 bool operator!= (const iter& i, const sentinel& s)
5625 {
5626 return !(i == s);
5627 }
5628
5629 struct range
5630 {
5631 iter begin() const
5632 {
5633 return {0};
5634 }
5635
5636 sentinel end() const
5637 {
5638 return {5};
5639 }
5640 };
5641
5642 void f()
5643 {
5644 range r {};
5645
5646 for (auto i : r)
5647 {
5648 [[maybe_unused]] auto v = i;
5649 }
5650 }
5651
5652 }
5653
5654 namespace test_lambda_capture_asterisk_this_by_value
5655 {
5656
5657 struct t
5658 {
5659 int i;
5660 int foo()
5661 {
5662 return [*this]()
5663 {
5664 return i;
5665 }();
5666 }
5667 };
5668
5669 }
5670
5671 namespace test_enum_class_construction
5672 {
5673
5674 enum class byte : unsigned char
5675 {};
5676
5677 byte foo {42};
5678
5679 }
5680
5681 namespace test_constexpr_if
5682 {
5683
5684 template <bool cond>
5685 int f ()
5686 {
5687 if constexpr(cond)
5688 {
5689 return 13;
5690 }
5691 else
5692 {
5693 return 42;
5694 }
5695 }
5696
5697 }
5698
5699 namespace test_selection_statement_with_initializer
5700 {
5701
5702 int f()
5703 {
5704 return 13;
5705 }
5706
5707 int f2()
5708 {
5709 if (auto i = f(); i > 0)
5710 {
5711 return 3;
5712 }
5713
5714 switch (auto i = f(); i + 4)
5715 {
5716 case 17:
5717 return 2;
5718
5719 default:
5720 return 1;
5721 }
5722 }
5723
5724 }
5725
5726 namespace test_template_argument_deduction_for_class_templates
5727 {
5728
5729 template <typename T1, typename T2>
5730 struct pair
5731 {
5732 pair (T1 p1, T2 p2)
5733 : m1 {p1},
5734 m2 {p2}
5735 {}
5736
5737 T1 m1;
5738 T2 m2;
5739 };
5740
5741 void f()
5742 {
5743 [[maybe_unused]] auto p = pair{13, 42u};
5744 }
5745
5746 }
5747
5748 namespace test_non_type_auto_template_parameters
5749 {
5750
5751 template <auto n>
5752 struct B
5753 {};
5754
5755 B<5> b1;
5756 B<'a'> b2;
5757
5758 }
5759
5760 namespace test_structured_bindings
5761 {
5762
5763 int arr[2] = { 1, 2 };
5764 std::pair<int, int> pr = { 1, 2 };
5765
5766 auto f1() -> int(&)[2]
5767 {
5768 return arr;
5769 }
5770
5771 auto f2() -> std::pair<int, int>&
5772 {
5773 return pr;
5774 }
5775
5776 struct S
5777 {
5778 int x1 : 2;
5779 volatile double y1;
5780 };
5781
5782 S f3()
5783 {
5784 return {};
5785 }
5786
5787 auto [ x1, y1 ] = f1();
5788 auto& [ xr1, yr1 ] = f1();
5789 auto [ x2, y2 ] = f2();
5790 auto& [ xr2, yr2 ] = f2();
5791 const auto [ x3, y3 ] = f3();
5792
5793 }
5794
5795 namespace test_exception_spec_type_system
5796 {
5797
5798 struct Good {};
5799 struct Bad {};
5800
5801 void g1() noexcept;
5802 void g2();
5803
5804 template<typename T>
5805 Bad
5806 f(T*, T*);
5807
5808 template<typename T1, typename T2>
5809 Good
5810 f(T1*, T2*);
5811
5812 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
5813
5814 }
5815
5816 namespace test_inline_variables
5817 {
5818
5819 template<class T> void f(T)
5820 {}
5821
5822 template<class T> inline T g(T)
5823 {
5824 return T{};
5825 }
5826
5827 template<> inline void f<>(int)
5828 {}
5829
5830 template<> int g<>(int)
5831 {
5832 return 5;
5833 }
5834
5835 }
5836
5837 } // namespace cxx17
5838
5839 #endif // __cplusplus < 201703L && !defined _MSC_VER
5840
5841
5842
5843 _ACEOF
5844 if ac_fn_cxx_try_compile "$LINENO"; then :
5845 ax_cv_cxx_compile_cxx17=yes
5846 else
5847 ax_cv_cxx_compile_cxx17=no
5848 fi
5849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5850 fi
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx17" >&5
5852 $as_echo "$ax_cv_cxx_compile_cxx17" >&6; }
5853 if test x$ax_cv_cxx_compile_cxx17 = xyes; then
5854 ac_success=yes
5855 fi
5856
5857 if test x$ac_success = xno; then
5858 for alternative in ${ax_cxx_compile_alternatives}; do
5859 switch="-std=gnu++${alternative}"
5860 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
5862 $as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
5863 if eval \${$cachevar+:} false; then :
5864 $as_echo_n "(cached) " >&6
5865 else
5866 ac_save_CXX="$CXX"
5867 CXX="$CXX $switch"
5868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5869 /* end confdefs.h. */
5870
5871
5872 // If the compiler admits that it is not ready for C++11, why torture it?
5873 // Hopefully, this will speed up the test.
5874
5875 #ifndef __cplusplus
5876
5877 #error "This is not a C++ compiler"
5878
5879 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
5880 // only set it correctly if /Zc:__cplusplus is specified as well as a
5881 // /std:c++NN switch:
5882 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5883 #elif __cplusplus < 201103L && !defined _MSC_VER
5884
5885 #error "This is not a C++11 compiler"
5886
5887 #else
5888
5889 namespace cxx11
5890 {
5891
5892 namespace test_static_assert
5893 {
5894
5895 template <typename T>
5896 struct check
5897 {
5898 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5899 };
5900
5901 }
5902
5903 namespace test_final_override
5904 {
5905
5906 struct Base
5907 {
5908 virtual ~Base() {}
5909 virtual void f() {}
5910 };
5911
5912 struct Derived : public Base
5913 {
5914 virtual ~Derived() override {}
5915 virtual void f() override {}
5916 };
5917
5918 }
5919
5920 namespace test_double_right_angle_brackets
5921 {
5922
5923 template < typename T >
5924 struct check {};
5925
5926 typedef check<void> single_type;
5927 typedef check<check<void>> double_type;
5928 typedef check<check<check<void>>> triple_type;
5929 typedef check<check<check<check<void>>>> quadruple_type;
5930
5931 }
5932
5933 namespace test_decltype
5934 {
5935
5936 int
5937 f()
5938 {
5939 int a = 1;
5940 decltype(a) b = 2;
5941 return a + b;
5942 }
5943
5944 }
5945
5946 namespace test_type_deduction
5947 {
5948
5949 template < typename T1, typename T2 >
5950 struct is_same
5951 {
5952 static const bool value = false;
5953 };
5954
5955 template < typename T >
5956 struct is_same<T, T>
5957 {
5958 static const bool value = true;
5959 };
5960
5961 template < typename T1, typename T2 >
5962 auto
5963 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5964 {
5965 return a1 + a2;
5966 }
5967
5968 int
5969 test(const int c, volatile int v)
5970 {
5971 static_assert(is_same<int, decltype(0)>::value == true, "");
5972 static_assert(is_same<int, decltype(c)>::value == false, "");
5973 static_assert(is_same<int, decltype(v)>::value == false, "");
5974 auto ac = c;
5975 auto av = v;
5976 auto sumi = ac + av + 'x';
5977 auto sumf = ac + av + 1.0;
5978 static_assert(is_same<int, decltype(ac)>::value == true, "");
5979 static_assert(is_same<int, decltype(av)>::value == true, "");
5980 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5981 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5982 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5983 return (sumf > 0.0) ? sumi : add(c, v);
5984 }
5985
5986 }
5987
5988 namespace test_noexcept
5989 {
5990
5991 int f() { return 0; }
5992 int g() noexcept { return 0; }
5993
5994 static_assert(noexcept(f()) == false, "");
5995 static_assert(noexcept(g()) == true, "");
5996
5997 }
5998
5999 namespace test_constexpr
6000 {
6001
6002 template < typename CharT >
6003 unsigned long constexpr
6004 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6005 {
6006 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6007 }
6008
6009 template < typename CharT >
6010 unsigned long constexpr
6011 strlen_c(const CharT *const s) noexcept
6012 {
6013 return strlen_c_r(s, 0UL);
6014 }
6015
6016 static_assert(strlen_c("") == 0UL, "");
6017 static_assert(strlen_c("1") == 1UL, "");
6018 static_assert(strlen_c("example") == 7UL, "");
6019 static_assert(strlen_c("another\0example") == 7UL, "");
6020
6021 }
6022
6023 namespace test_rvalue_references
6024 {
6025
6026 template < int N >
6027 struct answer
6028 {
6029 static constexpr int value = N;
6030 };
6031
6032 answer<1> f(int&) { return answer<1>(); }
6033 answer<2> f(const int&) { return answer<2>(); }
6034 answer<3> f(int&&) { return answer<3>(); }
6035
6036 void
6037 test()
6038 {
6039 int i = 0;
6040 const int c = 0;
6041 static_assert(decltype(f(i))::value == 1, "");
6042 static_assert(decltype(f(c))::value == 2, "");
6043 static_assert(decltype(f(0))::value == 3, "");
6044 }
6045
6046 }
6047
6048 namespace test_uniform_initialization
6049 {
6050
6051 struct test
6052 {
6053 static const int zero {};
6054 static const int one {1};
6055 };
6056
6057 static_assert(test::zero == 0, "");
6058 static_assert(test::one == 1, "");
6059
6060 }
6061
6062 namespace test_lambdas
6063 {
6064
6065 void
6066 test1()
6067 {
6068 auto lambda1 = [](){};
6069 auto lambda2 = lambda1;
6070 lambda1();
6071 lambda2();
6072 }
6073
6074 int
6075 test2()
6076 {
6077 auto a = [](int i, int j){ return i + j; }(1, 2);
6078 auto b = []() -> int { return '0'; }();
6079 auto c = [=](){ return a + b; }();
6080 auto d = [&](){ return c; }();
6081 auto e = [a, &b](int x) mutable {
6082 const auto identity = [](int y){ return y; };
6083 for (auto i = 0; i < a; ++i)
6084 a += b--;
6085 return x + identity(a + b);
6086 }(0);
6087 return a + b + c + d + e;
6088 }
6089
6090 int
6091 test3()
6092 {
6093 const auto nullary = [](){ return 0; };
6094 const auto unary = [](int x){ return x; };
6095 using nullary_t = decltype(nullary);
6096 using unary_t = decltype(unary);
6097 const auto higher1st = [](nullary_t f){ return f(); };
6098 const auto higher2nd = [unary](nullary_t f1){
6099 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6100 };
6101 return higher1st(nullary) + higher2nd(nullary)(unary);
6102 }
6103
6104 }
6105
6106 namespace test_variadic_templates
6107 {
6108
6109 template <int...>
6110 struct sum;
6111
6112 template <int N0, int... N1toN>
6113 struct sum<N0, N1toN...>
6114 {
6115 static constexpr auto value = N0 + sum<N1toN...>::value;
6116 };
6117
6118 template <>
6119 struct sum<>
6120 {
6121 static constexpr auto value = 0;
6122 };
6123
6124 static_assert(sum<>::value == 0, "");
6125 static_assert(sum<1>::value == 1, "");
6126 static_assert(sum<23>::value == 23, "");
6127 static_assert(sum<1, 2>::value == 3, "");
6128 static_assert(sum<5, 5, 11>::value == 21, "");
6129 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6130
6131 }
6132
6133 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6134 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6135 // because of this.
6136 namespace test_template_alias_sfinae
6137 {
6138
6139 struct foo {};
6140
6141 template<typename T>
6142 using member = typename T::member_type;
6143
6144 template<typename T>
6145 void func(...) {}
6146
6147 template<typename T>
6148 void func(member<T>*) {}
6149
6150 void test();
6151
6152 void test() { func<foo>(0); }
6153
6154 }
6155
6156 } // namespace cxx11
6157
6158 #endif // __cplusplus >= 201103L
6159
6160
6161
6162
6163 // If the compiler admits that it is not ready for C++14, why torture it?
6164 // Hopefully, this will speed up the test.
6165
6166 #ifndef __cplusplus
6167
6168 #error "This is not a C++ compiler"
6169
6170 #elif __cplusplus < 201402L && !defined _MSC_VER
6171
6172 #error "This is not a C++14 compiler"
6173
6174 #else
6175
6176 namespace cxx14
6177 {
6178
6179 namespace test_polymorphic_lambdas
6180 {
6181
6182 int
6183 test()
6184 {
6185 const auto lambda = [](auto&&... args){
6186 const auto istiny = [](auto x){
6187 return (sizeof(x) == 1UL) ? 1 : 0;
6188 };
6189 const int aretiny[] = { istiny(args)... };
6190 return aretiny[0];
6191 };
6192 return lambda(1, 1L, 1.0f, '1');
6193 }
6194
6195 }
6196
6197 namespace test_binary_literals
6198 {
6199
6200 constexpr auto ivii = 0b0000000000101010;
6201 static_assert(ivii == 42, "wrong value");
6202
6203 }
6204
6205 namespace test_generalized_constexpr
6206 {
6207
6208 template < typename CharT >
6209 constexpr unsigned long
6210 strlen_c(const CharT *const s) noexcept
6211 {
6212 auto length = 0UL;
6213 for (auto p = s; *p; ++p)
6214 ++length;
6215 return length;
6216 }
6217
6218 static_assert(strlen_c("") == 0UL, "");
6219 static_assert(strlen_c("x") == 1UL, "");
6220 static_assert(strlen_c("test") == 4UL, "");
6221 static_assert(strlen_c("another\0test") == 7UL, "");
6222
6223 }
6224
6225 namespace test_lambda_init_capture
6226 {
6227
6228 int
6229 test()
6230 {
6231 auto x = 0;
6232 const auto lambda1 = [a = x](int b){ return a + b; };
6233 const auto lambda2 = [a = lambda1(x)](){ return a; };
6234 return lambda2();
6235 }
6236
6237 }
6238
6239 namespace test_digit_separators
6240 {
6241
6242 constexpr auto ten_million = 100'000'000;
6243 static_assert(ten_million == 100000000, "");
6244
6245 }
6246
6247 namespace test_return_type_deduction
6248 {
6249
6250 auto f(int& x) { return x; }
6251 decltype(auto) g(int& x) { return x; }
6252
6253 template < typename T1, typename T2 >
6254 struct is_same
6255 {
6256 static constexpr auto value = false;
6257 };
6258
6259 template < typename T >
6260 struct is_same<T, T>
6261 {
6262 static constexpr auto value = true;
6263 };
6264
6265 int
6266 test()
6267 {
6268 auto x = 0;
6269 static_assert(is_same<int, decltype(f(x))>::value, "");
6270 static_assert(is_same<int&, decltype(g(x))>::value, "");
6271 return x;
6272 }
6273
6274 }
6275
6276 } // namespace cxx14
6277
6278 #endif // __cplusplus >= 201402L
6279
6280
6281
6282
6283 // If the compiler admits that it is not ready for C++17, why torture it?
6284 // Hopefully, this will speed up the test.
6285
6286 #ifndef __cplusplus
6287
6288 #error "This is not a C++ compiler"
6289
6290 #elif __cplusplus < 201703L && !defined _MSC_VER
6291
6292 #error "This is not a C++17 compiler"
6293
6294 #else
6295
6296 #include <initializer_list>
6297 #include <utility>
6298 #include <type_traits>
6299
6300 namespace cxx17
6301 {
6302
6303 namespace test_constexpr_lambdas
6304 {
6305
6306 constexpr int foo = [](){return 42;}();
6307
6308 }
6309
6310 namespace test::nested_namespace::definitions
6311 {
6312
6313 }
6314
6315 namespace test_fold_expression
6316 {
6317
6318 template<typename... Args>
6319 int multiply(Args... args)
6320 {
6321 return (args * ... * 1);
6322 }
6323
6324 template<typename... Args>
6325 bool all(Args... args)
6326 {
6327 return (args && ...);
6328 }
6329
6330 }
6331
6332 namespace test_extended_static_assert
6333 {
6334
6335 static_assert (true);
6336
6337 }
6338
6339 namespace test_auto_brace_init_list
6340 {
6341
6342 auto foo = {5};
6343 auto bar {5};
6344
6345 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
6346 static_assert(std::is_same<int, decltype(bar)>::value);
6347 }
6348
6349 namespace test_typename_in_template_template_parameter
6350 {
6351
6352 template<template<typename> typename X> struct D;
6353
6354 }
6355
6356 namespace test_fallthrough_nodiscard_maybe_unused_attributes
6357 {
6358
6359 int f1()
6360 {
6361 return 42;
6362 }
6363
6364 [[nodiscard]] int f2()
6365 {
6366 [[maybe_unused]] auto unused = f1();
6367
6368 switch (f1())
6369 {
6370 case 17:
6371 f1();
6372 [[fallthrough]];
6373 case 42:
6374 f1();
6375 }
6376 return f1();
6377 }
6378
6379 }
6380
6381 namespace test_extended_aggregate_initialization
6382 {
6383
6384 struct base1
6385 {
6386 int b1, b2 = 42;
6387 };
6388
6389 struct base2
6390 {
6391 base2() {
6392 b3 = 42;
6393 }
6394 int b3;
6395 };
6396
6397 struct derived : base1, base2
6398 {
6399 int d;
6400 };
6401
6402 derived d1 {{1, 2}, {}, 4}; // full initialization
6403 derived d2 {{}, {}, 4}; // value-initialized bases
6404
6405 }
6406
6407 namespace test_general_range_based_for_loop
6408 {
6409
6410 struct iter
6411 {
6412 int i;
6413
6414 int& operator* ()
6415 {
6416 return i;
6417 }
6418
6419 const int& operator* () const
6420 {
6421 return i;
6422 }
6423
6424 iter& operator++()
6425 {
6426 ++i;
6427 return *this;
6428 }
6429 };
6430
6431 struct sentinel
6432 {
6433 int i;
6434 };
6435
6436 bool operator== (const iter& i, const sentinel& s)
6437 {
6438 return i.i == s.i;
6439 }
6440
6441 bool operator!= (const iter& i, const sentinel& s)
6442 {
6443 return !(i == s);
6444 }
6445
6446 struct range
6447 {
6448 iter begin() const
6449 {
6450 return {0};
6451 }
6452
6453 sentinel end() const
6454 {
6455 return {5};
6456 }
6457 };
6458
6459 void f()
6460 {
6461 range r {};
6462
6463 for (auto i : r)
6464 {
6465 [[maybe_unused]] auto v = i;
6466 }
6467 }
6468
6469 }
6470
6471 namespace test_lambda_capture_asterisk_this_by_value
6472 {
6473
6474 struct t
6475 {
6476 int i;
6477 int foo()
6478 {
6479 return [*this]()
6480 {
6481 return i;
6482 }();
6483 }
6484 };
6485
6486 }
6487
6488 namespace test_enum_class_construction
6489 {
6490
6491 enum class byte : unsigned char
6492 {};
6493
6494 byte foo {42};
6495
6496 }
6497
6498 namespace test_constexpr_if
6499 {
6500
6501 template <bool cond>
6502 int f ()
6503 {
6504 if constexpr(cond)
6505 {
6506 return 13;
6507 }
6508 else
6509 {
6510 return 42;
6511 }
6512 }
6513
6514 }
6515
6516 namespace test_selection_statement_with_initializer
6517 {
6518
6519 int f()
6520 {
6521 return 13;
6522 }
6523
6524 int f2()
6525 {
6526 if (auto i = f(); i > 0)
6527 {
6528 return 3;
6529 }
6530
6531 switch (auto i = f(); i + 4)
6532 {
6533 case 17:
6534 return 2;
6535
6536 default:
6537 return 1;
6538 }
6539 }
6540
6541 }
6542
6543 namespace test_template_argument_deduction_for_class_templates
6544 {
6545
6546 template <typename T1, typename T2>
6547 struct pair
6548 {
6549 pair (T1 p1, T2 p2)
6550 : m1 {p1},
6551 m2 {p2}
6552 {}
6553
6554 T1 m1;
6555 T2 m2;
6556 };
6557
6558 void f()
6559 {
6560 [[maybe_unused]] auto p = pair{13, 42u};
6561 }
6562
6563 }
6564
6565 namespace test_non_type_auto_template_parameters
6566 {
6567
6568 template <auto n>
6569 struct B
6570 {};
6571
6572 B<5> b1;
6573 B<'a'> b2;
6574
6575 }
6576
6577 namespace test_structured_bindings
6578 {
6579
6580 int arr[2] = { 1, 2 };
6581 std::pair<int, int> pr = { 1, 2 };
6582
6583 auto f1() -> int(&)[2]
6584 {
6585 return arr;
6586 }
6587
6588 auto f2() -> std::pair<int, int>&
6589 {
6590 return pr;
6591 }
6592
6593 struct S
6594 {
6595 int x1 : 2;
6596 volatile double y1;
6597 };
6598
6599 S f3()
6600 {
6601 return {};
6602 }
6603
6604 auto [ x1, y1 ] = f1();
6605 auto& [ xr1, yr1 ] = f1();
6606 auto [ x2, y2 ] = f2();
6607 auto& [ xr2, yr2 ] = f2();
6608 const auto [ x3, y3 ] = f3();
6609
6610 }
6611
6612 namespace test_exception_spec_type_system
6613 {
6614
6615 struct Good {};
6616 struct Bad {};
6617
6618 void g1() noexcept;
6619 void g2();
6620
6621 template<typename T>
6622 Bad
6623 f(T*, T*);
6624
6625 template<typename T1, typename T2>
6626 Good
6627 f(T1*, T2*);
6628
6629 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
6630
6631 }
6632
6633 namespace test_inline_variables
6634 {
6635
6636 template<class T> void f(T)
6637 {}
6638
6639 template<class T> inline T g(T)
6640 {
6641 return T{};
6642 }
6643
6644 template<> inline void f<>(int)
6645 {}
6646
6647 template<> int g<>(int)
6648 {
6649 return 5;
6650 }
6651
6652 }
6653
6654 } // namespace cxx17
6655
6656 #endif // __cplusplus < 201703L && !defined _MSC_VER
6657
6658
6659
6660 _ACEOF
6661 if ac_fn_cxx_try_compile "$LINENO"; then :
6662 eval $cachevar=yes
6663 else
6664 eval $cachevar=no
6665 fi
6666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6667 CXX="$ac_save_CXX"
6668 fi
6669 eval ac_res=\$$cachevar
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6671 $as_echo "$ac_res" >&6; }
6672 if eval test x\$$cachevar = xyes; then
6673 CXX_DIALECT="$switch"
6674 CXX="$CXX $switch"
6675 if test -n "$CXXCPP" ; then
6676 CXXCPP="$CXXCPP $switch"
6677 fi
6678 ac_success=yes
6679 break
6680 fi
6681 done
6682 fi
6683
6684 if test x$ac_success = xno; then
6685 for alternative in ${ax_cxx_compile_alternatives}; do
6686 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
6687 if test x"$switch" = xMSVC; then
6688 switch=-std:c++${alternative}
6689 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
6690 else
6691 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
6692 fi
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
6694 $as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
6695 if eval \${$cachevar+:} false; then :
6696 $as_echo_n "(cached) " >&6
6697 else
6698 ac_save_CXX="$CXX"
6699 CXX="$CXX $switch"
6700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6701 /* end confdefs.h. */
6702
6703
6704 // If the compiler admits that it is not ready for C++11, why torture it?
6705 // Hopefully, this will speed up the test.
6706
6707 #ifndef __cplusplus
6708
6709 #error "This is not a C++ compiler"
6710
6711 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
6712 // only set it correctly if /Zc:__cplusplus is specified as well as a
6713 // /std:c++NN switch:
6714 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
6715 #elif __cplusplus < 201103L && !defined _MSC_VER
6716
6717 #error "This is not a C++11 compiler"
6718
6719 #else
6720
6721 namespace cxx11
6722 {
6723
6724 namespace test_static_assert
6725 {
6726
6727 template <typename T>
6728 struct check
6729 {
6730 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6731 };
6732
6733 }
6734
6735 namespace test_final_override
6736 {
6737
6738 struct Base
6739 {
6740 virtual ~Base() {}
6741 virtual void f() {}
6742 };
6743
6744 struct Derived : public Base
6745 {
6746 virtual ~Derived() override {}
6747 virtual void f() override {}
6748 };
6749
6750 }
6751
6752 namespace test_double_right_angle_brackets
6753 {
6754
6755 template < typename T >
6756 struct check {};
6757
6758 typedef check<void> single_type;
6759 typedef check<check<void>> double_type;
6760 typedef check<check<check<void>>> triple_type;
6761 typedef check<check<check<check<void>>>> quadruple_type;
6762
6763 }
6764
6765 namespace test_decltype
6766 {
6767
6768 int
6769 f()
6770 {
6771 int a = 1;
6772 decltype(a) b = 2;
6773 return a + b;
6774 }
6775
6776 }
6777
6778 namespace test_type_deduction
6779 {
6780
6781 template < typename T1, typename T2 >
6782 struct is_same
6783 {
6784 static const bool value = false;
6785 };
6786
6787 template < typename T >
6788 struct is_same<T, T>
6789 {
6790 static const bool value = true;
6791 };
6792
6793 template < typename T1, typename T2 >
6794 auto
6795 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6796 {
6797 return a1 + a2;
6798 }
6799
6800 int
6801 test(const int c, volatile int v)
6802 {
6803 static_assert(is_same<int, decltype(0)>::value == true, "");
6804 static_assert(is_same<int, decltype(c)>::value == false, "");
6805 static_assert(is_same<int, decltype(v)>::value == false, "");
6806 auto ac = c;
6807 auto av = v;
6808 auto sumi = ac + av + 'x';
6809 auto sumf = ac + av + 1.0;
6810 static_assert(is_same<int, decltype(ac)>::value == true, "");
6811 static_assert(is_same<int, decltype(av)>::value == true, "");
6812 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6813 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6814 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6815 return (sumf > 0.0) ? sumi : add(c, v);
6816 }
6817
6818 }
6819
6820 namespace test_noexcept
6821 {
6822
6823 int f() { return 0; }
6824 int g() noexcept { return 0; }
6825
6826 static_assert(noexcept(f()) == false, "");
6827 static_assert(noexcept(g()) == true, "");
6828
6829 }
6830
6831 namespace test_constexpr
6832 {
6833
6834 template < typename CharT >
6835 unsigned long constexpr
6836 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6837 {
6838 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6839 }
6840
6841 template < typename CharT >
6842 unsigned long constexpr
6843 strlen_c(const CharT *const s) noexcept
6844 {
6845 return strlen_c_r(s, 0UL);
6846 }
6847
6848 static_assert(strlen_c("") == 0UL, "");
6849 static_assert(strlen_c("1") == 1UL, "");
6850 static_assert(strlen_c("example") == 7UL, "");
6851 static_assert(strlen_c("another\0example") == 7UL, "");
6852
6853 }
6854
6855 namespace test_rvalue_references
6856 {
6857
6858 template < int N >
6859 struct answer
6860 {
6861 static constexpr int value = N;
6862 };
6863
6864 answer<1> f(int&) { return answer<1>(); }
6865 answer<2> f(const int&) { return answer<2>(); }
6866 answer<3> f(int&&) { return answer<3>(); }
6867
6868 void
6869 test()
6870 {
6871 int i = 0;
6872 const int c = 0;
6873 static_assert(decltype(f(i))::value == 1, "");
6874 static_assert(decltype(f(c))::value == 2, "");
6875 static_assert(decltype(f(0))::value == 3, "");
6876 }
6877
6878 }
6879
6880 namespace test_uniform_initialization
6881 {
6882
6883 struct test
6884 {
6885 static const int zero {};
6886 static const int one {1};
6887 };
6888
6889 static_assert(test::zero == 0, "");
6890 static_assert(test::one == 1, "");
6891
6892 }
6893
6894 namespace test_lambdas
6895 {
6896
6897 void
6898 test1()
6899 {
6900 auto lambda1 = [](){};
6901 auto lambda2 = lambda1;
6902 lambda1();
6903 lambda2();
6904 }
6905
6906 int
6907 test2()
6908 {
6909 auto a = [](int i, int j){ return i + j; }(1, 2);
6910 auto b = []() -> int { return '0'; }();
6911 auto c = [=](){ return a + b; }();
6912 auto d = [&](){ return c; }();
6913 auto e = [a, &b](int x) mutable {
6914 const auto identity = [](int y){ return y; };
6915 for (auto i = 0; i < a; ++i)
6916 a += b--;
6917 return x + identity(a + b);
6918 }(0);
6919 return a + b + c + d + e;
6920 }
6921
6922 int
6923 test3()
6924 {
6925 const auto nullary = [](){ return 0; };
6926 const auto unary = [](int x){ return x; };
6927 using nullary_t = decltype(nullary);
6928 using unary_t = decltype(unary);
6929 const auto higher1st = [](nullary_t f){ return f(); };
6930 const auto higher2nd = [unary](nullary_t f1){
6931 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6932 };
6933 return higher1st(nullary) + higher2nd(nullary)(unary);
6934 }
6935
6936 }
6937
6938 namespace test_variadic_templates
6939 {
6940
6941 template <int...>
6942 struct sum;
6943
6944 template <int N0, int... N1toN>
6945 struct sum<N0, N1toN...>
6946 {
6947 static constexpr auto value = N0 + sum<N1toN...>::value;
6948 };
6949
6950 template <>
6951 struct sum<>
6952 {
6953 static constexpr auto value = 0;
6954 };
6955
6956 static_assert(sum<>::value == 0, "");
6957 static_assert(sum<1>::value == 1, "");
6958 static_assert(sum<23>::value == 23, "");
6959 static_assert(sum<1, 2>::value == 3, "");
6960 static_assert(sum<5, 5, 11>::value == 21, "");
6961 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6962
6963 }
6964
6965 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6966 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6967 // because of this.
6968 namespace test_template_alias_sfinae
6969 {
6970
6971 struct foo {};
6972
6973 template<typename T>
6974 using member = typename T::member_type;
6975
6976 template<typename T>
6977 void func(...) {}
6978
6979 template<typename T>
6980 void func(member<T>*) {}
6981
6982 void test();
6983
6984 void test() { func<foo>(0); }
6985
6986 }
6987
6988 } // namespace cxx11
6989
6990 #endif // __cplusplus >= 201103L
6991
6992
6993
6994
6995 // If the compiler admits that it is not ready for C++14, why torture it?
6996 // Hopefully, this will speed up the test.
6997
6998 #ifndef __cplusplus
6999
7000 #error "This is not a C++ compiler"
7001
7002 #elif __cplusplus < 201402L && !defined _MSC_VER
7003
7004 #error "This is not a C++14 compiler"
7005
7006 #else
7007
7008 namespace cxx14
7009 {
7010
7011 namespace test_polymorphic_lambdas
7012 {
7013
7014 int
7015 test()
7016 {
7017 const auto lambda = [](auto&&... args){
7018 const auto istiny = [](auto x){
7019 return (sizeof(x) == 1UL) ? 1 : 0;
7020 };
7021 const int aretiny[] = { istiny(args)... };
7022 return aretiny[0];
7023 };
7024 return lambda(1, 1L, 1.0f, '1');
7025 }
7026
7027 }
7028
7029 namespace test_binary_literals
7030 {
7031
7032 constexpr auto ivii = 0b0000000000101010;
7033 static_assert(ivii == 42, "wrong value");
7034
7035 }
7036
7037 namespace test_generalized_constexpr
7038 {
7039
7040 template < typename CharT >
7041 constexpr unsigned long
7042 strlen_c(const CharT *const s) noexcept
7043 {
7044 auto length = 0UL;
7045 for (auto p = s; *p; ++p)
7046 ++length;
7047 return length;
7048 }
7049
7050 static_assert(strlen_c("") == 0UL, "");
7051 static_assert(strlen_c("x") == 1UL, "");
7052 static_assert(strlen_c("test") == 4UL, "");
7053 static_assert(strlen_c("another\0test") == 7UL, "");
7054
7055 }
7056
7057 namespace test_lambda_init_capture
7058 {
7059
7060 int
7061 test()
7062 {
7063 auto x = 0;
7064 const auto lambda1 = [a = x](int b){ return a + b; };
7065 const auto lambda2 = [a = lambda1(x)](){ return a; };
7066 return lambda2();
7067 }
7068
7069 }
7070
7071 namespace test_digit_separators
7072 {
7073
7074 constexpr auto ten_million = 100'000'000;
7075 static_assert(ten_million == 100000000, "");
7076
7077 }
7078
7079 namespace test_return_type_deduction
7080 {
7081
7082 auto f(int& x) { return x; }
7083 decltype(auto) g(int& x) { return x; }
7084
7085 template < typename T1, typename T2 >
7086 struct is_same
7087 {
7088 static constexpr auto value = false;
7089 };
7090
7091 template < typename T >
7092 struct is_same<T, T>
7093 {
7094 static constexpr auto value = true;
7095 };
7096
7097 int
7098 test()
7099 {
7100 auto x = 0;
7101 static_assert(is_same<int, decltype(f(x))>::value, "");
7102 static_assert(is_same<int&, decltype(g(x))>::value, "");
7103 return x;
7104 }
7105
7106 }
7107
7108 } // namespace cxx14
7109
7110 #endif // __cplusplus >= 201402L
7111
7112
7113
7114
7115 // If the compiler admits that it is not ready for C++17, why torture it?
7116 // Hopefully, this will speed up the test.
7117
7118 #ifndef __cplusplus
7119
7120 #error "This is not a C++ compiler"
7121
7122 #elif __cplusplus < 201703L && !defined _MSC_VER
7123
7124 #error "This is not a C++17 compiler"
7125
7126 #else
7127
7128 #include <initializer_list>
7129 #include <utility>
7130 #include <type_traits>
7131
7132 namespace cxx17
7133 {
7134
7135 namespace test_constexpr_lambdas
7136 {
7137
7138 constexpr int foo = [](){return 42;}();
7139
7140 }
7141
7142 namespace test::nested_namespace::definitions
7143 {
7144
7145 }
7146
7147 namespace test_fold_expression
7148 {
7149
7150 template<typename... Args>
7151 int multiply(Args... args)
7152 {
7153 return (args * ... * 1);
7154 }
7155
7156 template<typename... Args>
7157 bool all(Args... args)
7158 {
7159 return (args && ...);
7160 }
7161
7162 }
7163
7164 namespace test_extended_static_assert
7165 {
7166
7167 static_assert (true);
7168
7169 }
7170
7171 namespace test_auto_brace_init_list
7172 {
7173
7174 auto foo = {5};
7175 auto bar {5};
7176
7177 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
7178 static_assert(std::is_same<int, decltype(bar)>::value);
7179 }
7180
7181 namespace test_typename_in_template_template_parameter
7182 {
7183
7184 template<template<typename> typename X> struct D;
7185
7186 }
7187
7188 namespace test_fallthrough_nodiscard_maybe_unused_attributes
7189 {
7190
7191 int f1()
7192 {
7193 return 42;
7194 }
7195
7196 [[nodiscard]] int f2()
7197 {
7198 [[maybe_unused]] auto unused = f1();
7199
7200 switch (f1())
7201 {
7202 case 17:
7203 f1();
7204 [[fallthrough]];
7205 case 42:
7206 f1();
7207 }
7208 return f1();
7209 }
7210
7211 }
7212
7213 namespace test_extended_aggregate_initialization
7214 {
7215
7216 struct base1
7217 {
7218 int b1, b2 = 42;
7219 };
7220
7221 struct base2
7222 {
7223 base2() {
7224 b3 = 42;
7225 }
7226 int b3;
7227 };
7228
7229 struct derived : base1, base2
7230 {
7231 int d;
7232 };
7233
7234 derived d1 {{1, 2}, {}, 4}; // full initialization
7235 derived d2 {{}, {}, 4}; // value-initialized bases
7236
7237 }
7238
7239 namespace test_general_range_based_for_loop
7240 {
7241
7242 struct iter
7243 {
7244 int i;
7245
7246 int& operator* ()
7247 {
7248 return i;
7249 }
7250
7251 const int& operator* () const
7252 {
7253 return i;
7254 }
7255
7256 iter& operator++()
7257 {
7258 ++i;
7259 return *this;
7260 }
7261 };
7262
7263 struct sentinel
7264 {
7265 int i;
7266 };
7267
7268 bool operator== (const iter& i, const sentinel& s)
7269 {
7270 return i.i == s.i;
7271 }
7272
7273 bool operator!= (const iter& i, const sentinel& s)
7274 {
7275 return !(i == s);
7276 }
7277
7278 struct range
7279 {
7280 iter begin() const
7281 {
7282 return {0};
7283 }
7284
7285 sentinel end() const
7286 {
7287 return {5};
7288 }
7289 };
7290
7291 void f()
7292 {
7293 range r {};
7294
7295 for (auto i : r)
7296 {
7297 [[maybe_unused]] auto v = i;
7298 }
7299 }
7300
7301 }
7302
7303 namespace test_lambda_capture_asterisk_this_by_value
7304 {
7305
7306 struct t
7307 {
7308 int i;
7309 int foo()
7310 {
7311 return [*this]()
7312 {
7313 return i;
7314 }();
7315 }
7316 };
7317
7318 }
7319
7320 namespace test_enum_class_construction
7321 {
7322
7323 enum class byte : unsigned char
7324 {};
7325
7326 byte foo {42};
7327
7328 }
7329
7330 namespace test_constexpr_if
7331 {
7332
7333 template <bool cond>
7334 int f ()
7335 {
7336 if constexpr(cond)
7337 {
7338 return 13;
7339 }
7340 else
7341 {
7342 return 42;
7343 }
7344 }
7345
7346 }
7347
7348 namespace test_selection_statement_with_initializer
7349 {
7350
7351 int f()
7352 {
7353 return 13;
7354 }
7355
7356 int f2()
7357 {
7358 if (auto i = f(); i > 0)
7359 {
7360 return 3;
7361 }
7362
7363 switch (auto i = f(); i + 4)
7364 {
7365 case 17:
7366 return 2;
7367
7368 default:
7369 return 1;
7370 }
7371 }
7372
7373 }
7374
7375 namespace test_template_argument_deduction_for_class_templates
7376 {
7377
7378 template <typename T1, typename T2>
7379 struct pair
7380 {
7381 pair (T1 p1, T2 p2)
7382 : m1 {p1},
7383 m2 {p2}
7384 {}
7385
7386 T1 m1;
7387 T2 m2;
7388 };
7389
7390 void f()
7391 {
7392 [[maybe_unused]] auto p = pair{13, 42u};
7393 }
7394
7395 }
7396
7397 namespace test_non_type_auto_template_parameters
7398 {
7399
7400 template <auto n>
7401 struct B
7402 {};
7403
7404 B<5> b1;
7405 B<'a'> b2;
7406
7407 }
7408
7409 namespace test_structured_bindings
7410 {
7411
7412 int arr[2] = { 1, 2 };
7413 std::pair<int, int> pr = { 1, 2 };
7414
7415 auto f1() -> int(&)[2]
7416 {
7417 return arr;
7418 }
7419
7420 auto f2() -> std::pair<int, int>&
7421 {
7422 return pr;
7423 }
7424
7425 struct S
7426 {
7427 int x1 : 2;
7428 volatile double y1;
7429 };
7430
7431 S f3()
7432 {
7433 return {};
7434 }
7435
7436 auto [ x1, y1 ] = f1();
7437 auto& [ xr1, yr1 ] = f1();
7438 auto [ x2, y2 ] = f2();
7439 auto& [ xr2, yr2 ] = f2();
7440 const auto [ x3, y3 ] = f3();
7441
7442 }
7443
7444 namespace test_exception_spec_type_system
7445 {
7446
7447 struct Good {};
7448 struct Bad {};
7449
7450 void g1() noexcept;
7451 void g2();
7452
7453 template<typename T>
7454 Bad
7455 f(T*, T*);
7456
7457 template<typename T1, typename T2>
7458 Good
7459 f(T1*, T2*);
7460
7461 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
7462
7463 }
7464
7465 namespace test_inline_variables
7466 {
7467
7468 template<class T> void f(T)
7469 {}
7470
7471 template<class T> inline T g(T)
7472 {
7473 return T{};
7474 }
7475
7476 template<> inline void f<>(int)
7477 {}
7478
7479 template<> int g<>(int)
7480 {
7481 return 5;
7482 }
7483
7484 }
7485
7486 } // namespace cxx17
7487
7488 #endif // __cplusplus < 201703L && !defined _MSC_VER
7489
7490
7491
7492 _ACEOF
7493 if ac_fn_cxx_try_compile "$LINENO"; then :
7494 eval $cachevar=yes
7495 else
7496 eval $cachevar=no
7497 fi
7498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7499 CXX="$ac_save_CXX"
7500 fi
7501 eval ac_res=\$$cachevar
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7503 $as_echo "$ac_res" >&6; }
7504 if eval test x\$$cachevar = xyes; then
7505 CXX_DIALECT="$switch"
7506 CXX="$CXX $switch"
7507 if test -n "$CXXCPP" ; then
7508 CXXCPP="$CXXCPP $switch"
7509 fi
7510 ac_success=yes
7511 break
7512 fi
7513 done
7514 if test x$ac_success = xyes; then
7515 break
7516 fi
7517 done
7518 fi
7519 ac_ext=c
7520 ac_cpp='$CPP $CPPFLAGS'
7521 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7522 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7523 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7524
7525 if test x$ax_cxx_compile_cxx17_required = xtrue; then
7526 if test x$ac_success = xno; then
7527 as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
7528 fi
7529 fi
7530 if test x$ac_success = xno; then
7531 HAVE_CXX17=0
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
7533 $as_echo "$as_me: No compiler with C++17 support was found" >&6;}
7534 else
7535 HAVE_CXX17=1
7536
7537 $as_echo "#define HAVE_CXX17 1" >>confdefs.h
7538
7539 fi
7540
7541
7542
7543
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7545 $as_echo_n "checking for ANSI C header files... " >&6; }
7546 if ${ac_cv_header_stdc+:} false; then :
7547 $as_echo_n "(cached) " >&6
7548 else
7549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7550 /* end confdefs.h. */
7551 #include <stdlib.h>
7552 #include <stdarg.h>
7553 #include <string.h>
7554 #include <float.h>
7555
7556 int
7557 main ()
7558 {
7559
7560 ;
7561 return 0;
7562 }
7563 _ACEOF
7564 if ac_fn_c_try_compile "$LINENO"; then :
7565 ac_cv_header_stdc=yes
7566 else
7567 ac_cv_header_stdc=no
7568 fi
7569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7570
7571 if test $ac_cv_header_stdc = yes; then
7572 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7574 /* end confdefs.h. */
7575 #include <string.h>
7576
7577 _ACEOF
7578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7579 $EGREP "memchr" >/dev/null 2>&1; then :
7580
7581 else
7582 ac_cv_header_stdc=no
7583 fi
7584 rm -f conftest*
7585
7586 fi
7587
7588 if test $ac_cv_header_stdc = yes; then
7589 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7591 /* end confdefs.h. */
7592 #include <stdlib.h>
7593
7594 _ACEOF
7595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7596 $EGREP "free" >/dev/null 2>&1; then :
7597
7598 else
7599 ac_cv_header_stdc=no
7600 fi
7601 rm -f conftest*
7602
7603 fi
7604
7605 if test $ac_cv_header_stdc = yes; then
7606 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7607 if test "$cross_compiling" = yes; then :
7608 :
7609 else
7610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7611 /* end confdefs.h. */
7612 #include <ctype.h>
7613 #include <stdlib.h>
7614 #if ((' ' & 0x0FF) == 0x020)
7615 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7616 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7617 #else
7618 # define ISLOWER(c) \
7619 (('a' <= (c) && (c) <= 'i') \
7620 || ('j' <= (c) && (c) <= 'r') \
7621 || ('s' <= (c) && (c) <= 'z'))
7622 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7623 #endif
7624
7625 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7626 int
7627 main ()
7628 {
7629 int i;
7630 for (i = 0; i < 256; i++)
7631 if (XOR (islower (i), ISLOWER (i))
7632 || toupper (i) != TOUPPER (i))
7633 return 2;
7634 return 0;
7635 }
7636 _ACEOF
7637 if ac_fn_c_try_run "$LINENO"; then :
7638
7639 else
7640 ac_cv_header_stdc=no
7641 fi
7642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7643 conftest.$ac_objext conftest.beam conftest.$ac_ext
7644 fi
7645
7646 fi
7647 fi
7648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7649 $as_echo "$ac_cv_header_stdc" >&6; }
7650 if test $ac_cv_header_stdc = yes; then
7651
7652 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7653
7654 fi
7655
7656
7657 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7658 if test "x$ac_cv_type_size_t" = xyes; then :
7659
7660 else
7661
7662 cat >>confdefs.h <<_ACEOF
7663 #define size_t unsigned int
7664 _ACEOF
7665
7666 fi
7667
7668
7669
7670
7671 for ac_header in $ac_header_list
7672 do :
7673 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7674 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7675 "
7676 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7677 cat >>confdefs.h <<_ACEOF
7678 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7679 _ACEOF
7680
7681 fi
7682
7683 done
7684
7685
7686
7687
7688
7689
7690
7691 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7692 if test "x$ac_cv_type_pid_t" = xyes; then :
7693
7694 else
7695
7696 cat >>confdefs.h <<_ACEOF
7697 #define pid_t int
7698 _ACEOF
7699
7700 fi
7701
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7703 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7704 if ${ac_cv_path_SED+:} false; then :
7705 $as_echo_n "(cached) " >&6
7706 else
7707 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7708 for ac_i in 1 2 3 4 5 6 7; do
7709 ac_script="$ac_script$as_nl$ac_script"
7710 done
7711 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7712 { ac_script=; unset ac_script;}
7713 if test -z "$SED"; then
7714 ac_path_SED_found=false
7715 # Loop through the user's path and test for each of PROGNAME-LIST
7716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7717 for as_dir in $PATH
7718 do
7719 IFS=$as_save_IFS
7720 test -z "$as_dir" && as_dir=.
7721 for ac_prog in sed gsed; do
7722 for ac_exec_ext in '' $ac_executable_extensions; do
7723 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7724 as_fn_executable_p "$ac_path_SED" || continue
7725 # Check for GNU ac_path_SED and select it if it is found.
7726 # Check for GNU $ac_path_SED
7727 case `"$ac_path_SED" --version 2>&1` in
7728 *GNU*)
7729 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7730 *)
7731 ac_count=0
7732 $as_echo_n 0123456789 >"conftest.in"
7733 while :
7734 do
7735 cat "conftest.in" "conftest.in" >"conftest.tmp"
7736 mv "conftest.tmp" "conftest.in"
7737 cp "conftest.in" "conftest.nl"
7738 $as_echo '' >> "conftest.nl"
7739 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7740 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7741 as_fn_arith $ac_count + 1 && ac_count=$as_val
7742 if test $ac_count -gt ${ac_path_SED_max-0}; then
7743 # Best one so far, save it but keep looking for a better one
7744 ac_cv_path_SED="$ac_path_SED"
7745 ac_path_SED_max=$ac_count
7746 fi
7747 # 10*(2^10) chars as input seems more than enough
7748 test $ac_count -gt 10 && break
7749 done
7750 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7751 esac
7752
7753 $ac_path_SED_found && break 3
7754 done
7755 done
7756 done
7757 IFS=$as_save_IFS
7758 if test -z "$ac_cv_path_SED"; then
7759 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7760 fi
7761 else
7762 ac_cv_path_SED=$SED
7763 fi
7764
7765 fi
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7767 $as_echo "$ac_cv_path_SED" >&6; }
7768 SED="$ac_cv_path_SED"
7769 rm -f conftest.sed
7770
7771
7772 if test "X$prefix" = "XNONE"; then
7773 acl_final_prefix="$ac_default_prefix"
7774 else
7775 acl_final_prefix="$prefix"
7776 fi
7777 if test "X$exec_prefix" = "XNONE"; then
7778 acl_final_exec_prefix='${prefix}'
7779 else
7780 acl_final_exec_prefix="$exec_prefix"
7781 fi
7782 acl_save_prefix="$prefix"
7783 prefix="$acl_final_prefix"
7784 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7785 prefix="$acl_save_prefix"
7786
7787
7788 # Check whether --with-gnu-ld was given.
7789 if test "${with_gnu_ld+set}" = set; then :
7790 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7791 else
7792 with_gnu_ld=no
7793 fi
7794
7795 # Prepare PATH_SEPARATOR.
7796 # The user is always right.
7797 if test "${PATH_SEPARATOR+set}" != set; then
7798 echo "#! /bin/sh" >conf$$.sh
7799 echo "exit 0" >>conf$$.sh
7800 chmod +x conf$$.sh
7801 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7802 PATH_SEPARATOR=';'
7803 else
7804 PATH_SEPARATOR=:
7805 fi
7806 rm -f conf$$.sh
7807 fi
7808 ac_prog=ld
7809 if test "$GCC" = yes; then
7810 # Check if gcc -print-prog-name=ld gives a path.
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7812 $as_echo_n "checking for ld used by GCC... " >&6; }
7813 case $host in
7814 *-*-mingw*)
7815 # gcc leaves a trailing carriage return which upsets mingw
7816 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7817 *)
7818 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7819 esac
7820 case $ac_prog in
7821 # Accept absolute paths.
7822 [\\/]* | [A-Za-z]:[\\/]*)
7823 re_direlt='/[^/][^/]*/\.\./'
7824 # Canonicalize the path of ld
7825 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7826 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7827 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7828 done
7829 test -z "$LD" && LD="$ac_prog"
7830 ;;
7831 "")
7832 # If it fails, then pretend we aren't using GCC.
7833 ac_prog=ld
7834 ;;
7835 *)
7836 # If it is relative, then search for the first ld in PATH.
7837 with_gnu_ld=unknown
7838 ;;
7839 esac
7840 elif test "$with_gnu_ld" = yes; then
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7842 $as_echo_n "checking for GNU ld... " >&6; }
7843 else
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7845 $as_echo_n "checking for non-GNU ld... " >&6; }
7846 fi
7847 if ${acl_cv_path_LD+:} false; then :
7848 $as_echo_n "(cached) " >&6
7849 else
7850 if test -z "$LD"; then
7851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7852 for ac_dir in $PATH; do
7853 test -z "$ac_dir" && ac_dir=.
7854 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7855 acl_cv_path_LD="$ac_dir/$ac_prog"
7856 # Check to see if the program is GNU ld. I'd rather use --version,
7857 # but apparently some GNU ld's only accept -v.
7858 # Break only if it was the GNU/non-GNU ld that we prefer.
7859 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
7860 test "$with_gnu_ld" != no && break
7861 else
7862 test "$with_gnu_ld" != yes && break
7863 fi
7864 fi
7865 done
7866 IFS="$ac_save_ifs"
7867 else
7868 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7869 fi
7870 fi
7871
7872 LD="$acl_cv_path_LD"
7873 if test -n "$LD"; then
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7875 $as_echo "$LD" >&6; }
7876 else
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7878 $as_echo "no" >&6; }
7879 fi
7880 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7882 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7883 if ${acl_cv_prog_gnu_ld+:} false; then :
7884 $as_echo_n "(cached) " >&6
7885 else
7886 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7887 if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
7888 acl_cv_prog_gnu_ld=yes
7889 else
7890 acl_cv_prog_gnu_ld=no
7891 fi
7892 fi
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7894 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7895 with_gnu_ld=$acl_cv_prog_gnu_ld
7896
7897
7898
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7900 $as_echo_n "checking for shared library run path origin... " >&6; }
7901 if ${acl_cv_rpath+:} false; then :
7902 $as_echo_n "(cached) " >&6
7903 else
7904
7905 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7906 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7907 . ./conftest.sh
7908 rm -f ./conftest.sh
7909 acl_cv_rpath=done
7910
7911 fi
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7913 $as_echo "$acl_cv_rpath" >&6; }
7914 wl="$acl_cv_wl"
7915 libext="$acl_cv_libext"
7916 shlibext="$acl_cv_shlibext"
7917 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7918 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7919 hardcode_direct="$acl_cv_hardcode_direct"
7920 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7921 # Check whether --enable-rpath was given.
7922 if test "${enable_rpath+set}" = set; then :
7923 enableval=$enable_rpath; :
7924 else
7925 enable_rpath=yes
7926 fi
7927
7928
7929
7930 # Set the 'development' global.
7931 . $srcdir/../bfd/development.sh
7932
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7934 $as_echo_n "checking for ANSI C header files... " >&6; }
7935 if ${ac_cv_header_stdc+:} false; then :
7936 $as_echo_n "(cached) " >&6
7937 else
7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939 /* end confdefs.h. */
7940 #include <stdlib.h>
7941 #include <stdarg.h>
7942 #include <string.h>
7943 #include <float.h>
7944
7945 int
7946 main ()
7947 {
7948
7949 ;
7950 return 0;
7951 }
7952 _ACEOF
7953 if ac_fn_c_try_compile "$LINENO"; then :
7954 ac_cv_header_stdc=yes
7955 else
7956 ac_cv_header_stdc=no
7957 fi
7958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7959
7960 if test $ac_cv_header_stdc = yes; then
7961 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7963 /* end confdefs.h. */
7964 #include <string.h>
7965
7966 _ACEOF
7967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7968 $EGREP "memchr" >/dev/null 2>&1; then :
7969
7970 else
7971 ac_cv_header_stdc=no
7972 fi
7973 rm -f conftest*
7974
7975 fi
7976
7977 if test $ac_cv_header_stdc = yes; then
7978 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7980 /* end confdefs.h. */
7981 #include <stdlib.h>
7982
7983 _ACEOF
7984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7985 $EGREP "free" >/dev/null 2>&1; then :
7986
7987 else
7988 ac_cv_header_stdc=no
7989 fi
7990 rm -f conftest*
7991
7992 fi
7993
7994 if test $ac_cv_header_stdc = yes; then
7995 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7996 if test "$cross_compiling" = yes; then :
7997 :
7998 else
7999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8000 /* end confdefs.h. */
8001 #include <ctype.h>
8002 #include <stdlib.h>
8003 #if ((' ' & 0x0FF) == 0x020)
8004 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8005 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8006 #else
8007 # define ISLOWER(c) \
8008 (('a' <= (c) && (c) <= 'i') \
8009 || ('j' <= (c) && (c) <= 'r') \
8010 || ('s' <= (c) && (c) <= 'z'))
8011 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8012 #endif
8013
8014 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8015 int
8016 main ()
8017 {
8018 int i;
8019 for (i = 0; i < 256; i++)
8020 if (XOR (islower (i), ISLOWER (i))
8021 || toupper (i) != TOUPPER (i))
8022 return 2;
8023 return 0;
8024 }
8025 _ACEOF
8026 if ac_fn_c_try_run "$LINENO"; then :
8027
8028 else
8029 ac_cv_header_stdc=no
8030 fi
8031 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8032 conftest.$ac_objext conftest.beam conftest.$ac_ext
8033 fi
8034
8035 fi
8036 fi
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8038 $as_echo "$ac_cv_header_stdc" >&6; }
8039 if test $ac_cv_header_stdc = yes; then
8040
8041 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8042
8043 fi
8044
8045 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8046 # for constant arguments. Useless!
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8048 $as_echo_n "checking for working alloca.h... " >&6; }
8049 if ${ac_cv_working_alloca_h+:} false; then :
8050 $as_echo_n "(cached) " >&6
8051 else
8052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8053 /* end confdefs.h. */
8054 #include <alloca.h>
8055 int
8056 main ()
8057 {
8058 char *p = (char *) alloca (2 * sizeof (int));
8059 if (p) return 0;
8060 ;
8061 return 0;
8062 }
8063 _ACEOF
8064 if ac_fn_c_try_link "$LINENO"; then :
8065 ac_cv_working_alloca_h=yes
8066 else
8067 ac_cv_working_alloca_h=no
8068 fi
8069 rm -f core conftest.err conftest.$ac_objext \
8070 conftest$ac_exeext conftest.$ac_ext
8071 fi
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8073 $as_echo "$ac_cv_working_alloca_h" >&6; }
8074 if test $ac_cv_working_alloca_h = yes; then
8075
8076 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8077
8078 fi
8079
8080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8081 $as_echo_n "checking for alloca... " >&6; }
8082 if ${ac_cv_func_alloca_works+:} false; then :
8083 $as_echo_n "(cached) " >&6
8084 else
8085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8086 /* end confdefs.h. */
8087 #ifdef __GNUC__
8088 # define alloca __builtin_alloca
8089 #else
8090 # ifdef _MSC_VER
8091 # include <malloc.h>
8092 # define alloca _alloca
8093 # else
8094 # ifdef HAVE_ALLOCA_H
8095 # include <alloca.h>
8096 # else
8097 # ifdef _AIX
8098 #pragma alloca
8099 # else
8100 # ifndef alloca /* predefined by HP cc +Olibcalls */
8101 void *alloca (size_t);
8102 # endif
8103 # endif
8104 # endif
8105 # endif
8106 #endif
8107
8108 int
8109 main ()
8110 {
8111 char *p = (char *) alloca (1);
8112 if (p) return 0;
8113 ;
8114 return 0;
8115 }
8116 _ACEOF
8117 if ac_fn_c_try_link "$LINENO"; then :
8118 ac_cv_func_alloca_works=yes
8119 else
8120 ac_cv_func_alloca_works=no
8121 fi
8122 rm -f core conftest.err conftest.$ac_objext \
8123 conftest$ac_exeext conftest.$ac_ext
8124 fi
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8126 $as_echo "$ac_cv_func_alloca_works" >&6; }
8127
8128 if test $ac_cv_func_alloca_works = yes; then
8129
8130 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8131
8132 else
8133 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8134 # that cause trouble. Some versions do not even contain alloca or
8135 # contain a buggy version. If you still want to use their alloca,
8136 # use ar to extract alloca.o from them instead of compiling alloca.c.
8137
8138 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8139
8140 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8141
8142
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8144 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8145 if ${ac_cv_os_cray+:} false; then :
8146 $as_echo_n "(cached) " >&6
8147 else
8148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8149 /* end confdefs.h. */
8150 #if defined CRAY && ! defined CRAY2
8151 webecray
8152 #else
8153 wenotbecray
8154 #endif
8155
8156 _ACEOF
8157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8158 $EGREP "webecray" >/dev/null 2>&1; then :
8159 ac_cv_os_cray=yes
8160 else
8161 ac_cv_os_cray=no
8162 fi
8163 rm -f conftest*
8164
8165 fi
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8167 $as_echo "$ac_cv_os_cray" >&6; }
8168 if test $ac_cv_os_cray = yes; then
8169 for ac_func in _getb67 GETB67 getb67; do
8170 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8172 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8173
8174 cat >>confdefs.h <<_ACEOF
8175 #define CRAY_STACKSEG_END $ac_func
8176 _ACEOF
8177
8178 break
8179 fi
8180
8181 done
8182 fi
8183
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8185 $as_echo_n "checking stack direction for C alloca... " >&6; }
8186 if ${ac_cv_c_stack_direction+:} false; then :
8187 $as_echo_n "(cached) " >&6
8188 else
8189 if test "$cross_compiling" = yes; then :
8190 ac_cv_c_stack_direction=0
8191 else
8192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8193 /* end confdefs.h. */
8194 $ac_includes_default
8195 int
8196 find_stack_direction (int *addr, int depth)
8197 {
8198 int dir, dummy = 0;
8199 if (! addr)
8200 addr = &dummy;
8201 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8202 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8203 return dir + dummy;
8204 }
8205
8206 int
8207 main (int argc, char **argv)
8208 {
8209 return find_stack_direction (0, argc + !argv + 20) < 0;
8210 }
8211 _ACEOF
8212 if ac_fn_c_try_run "$LINENO"; then :
8213 ac_cv_c_stack_direction=1
8214 else
8215 ac_cv_c_stack_direction=-1
8216 fi
8217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8218 conftest.$ac_objext conftest.beam conftest.$ac_ext
8219 fi
8220
8221 fi
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8223 $as_echo "$ac_cv_c_stack_direction" >&6; }
8224 cat >>confdefs.h <<_ACEOF
8225 #define STACK_DIRECTION $ac_cv_c_stack_direction
8226 _ACEOF
8227
8228
8229 fi
8230
8231
8232 WIN32APILIBS=
8233 case ${host} in
8234 *mingw32*)
8235
8236 $as_echo "#define USE_WIN32API 1" >>confdefs.h
8237
8238 WIN32APILIBS="-lws2_32"
8239 ;;
8240 esac
8241
8242
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8244 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8245 if ${am_cv_langinfo_codeset+:} false; then :
8246 $as_echo_n "(cached) " >&6
8247 else
8248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8249 /* end confdefs.h. */
8250 #include <langinfo.h>
8251 int
8252 main ()
8253 {
8254 char* cs = nl_langinfo(CODESET);
8255 ;
8256 return 0;
8257 }
8258 _ACEOF
8259 if ac_fn_c_try_link "$LINENO"; then :
8260 am_cv_langinfo_codeset=yes
8261 else
8262 am_cv_langinfo_codeset=no
8263 fi
8264 rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
8266
8267 fi
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8269 $as_echo "$am_cv_langinfo_codeset" >&6; }
8270 if test $am_cv_langinfo_codeset = yes; then
8271
8272 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8273
8274 fi
8275
8276
8277 for ac_header in \
8278 dlfcn.h \
8279 linux/elf.h \
8280 linux/perf_event.h \
8281 locale.h \
8282 memory.h \
8283 poll.h \
8284 proc_service.h \
8285 signal.h \
8286 sys/poll.h \
8287 sys/resource.h \
8288 sys/select.h \
8289 sys/socket.h \
8290 sys/un.h \
8291 sys/wait.h \
8292 termios.h \
8293 thread_db.h \
8294 wait.h \
8295
8296 do :
8297 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8298 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8299 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8300 cat >>confdefs.h <<_ACEOF
8301 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8302 _ACEOF
8303
8304 fi
8305
8306 done
8307
8308
8309
8310 for ac_func in getpagesize
8311 do :
8312 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
8313 if test "x$ac_cv_func_getpagesize" = xyes; then :
8314 cat >>confdefs.h <<_ACEOF
8315 #define HAVE_GETPAGESIZE 1
8316 _ACEOF
8317
8318 fi
8319 done
8320
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
8322 $as_echo_n "checking for working mmap... " >&6; }
8323 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
8324 $as_echo_n "(cached) " >&6
8325 else
8326 if test "$cross_compiling" = yes; then :
8327 ac_cv_func_mmap_fixed_mapped=no
8328 else
8329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8330 /* end confdefs.h. */
8331 $ac_includes_default
8332 /* malloc might have been renamed as rpl_malloc. */
8333 #undef malloc
8334
8335 /* Thanks to Mike Haertel and Jim Avera for this test.
8336 Here is a matrix of mmap possibilities:
8337 mmap private not fixed
8338 mmap private fixed at somewhere currently unmapped
8339 mmap private fixed at somewhere already mapped
8340 mmap shared not fixed
8341 mmap shared fixed at somewhere currently unmapped
8342 mmap shared fixed at somewhere already mapped
8343 For private mappings, we should verify that changes cannot be read()
8344 back from the file, nor mmap's back from the file at a different
8345 address. (There have been systems where private was not correctly
8346 implemented like the infamous i386 svr4.0, and systems where the
8347 VM page cache was not coherent with the file system buffer cache
8348 like early versions of FreeBSD and possibly contemporary NetBSD.)
8349 For shared mappings, we should conversely verify that changes get
8350 propagated back to all the places they're supposed to be.
8351
8352 Grep wants private fixed already mapped.
8353 The main things grep needs to know about mmap are:
8354 * does it exist and is it safe to write into the mmap'd area
8355 * how to use it (BSD variants) */
8356
8357 #include <fcntl.h>
8358 #include <sys/mman.h>
8359
8360 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8361 char *malloc ();
8362 #endif
8363
8364 /* This mess was copied from the GNU getpagesize.h. */
8365 #ifndef HAVE_GETPAGESIZE
8366 # ifdef _SC_PAGESIZE
8367 # define getpagesize() sysconf(_SC_PAGESIZE)
8368 # else /* no _SC_PAGESIZE */
8369 # ifdef HAVE_SYS_PARAM_H
8370 # include <sys/param.h>
8371 # ifdef EXEC_PAGESIZE
8372 # define getpagesize() EXEC_PAGESIZE
8373 # else /* no EXEC_PAGESIZE */
8374 # ifdef NBPG
8375 # define getpagesize() NBPG * CLSIZE
8376 # ifndef CLSIZE
8377 # define CLSIZE 1
8378 # endif /* no CLSIZE */
8379 # else /* no NBPG */
8380 # ifdef NBPC
8381 # define getpagesize() NBPC
8382 # else /* no NBPC */
8383 # ifdef PAGESIZE
8384 # define getpagesize() PAGESIZE
8385 # endif /* PAGESIZE */
8386 # endif /* no NBPC */
8387 # endif /* no NBPG */
8388 # endif /* no EXEC_PAGESIZE */
8389 # else /* no HAVE_SYS_PARAM_H */
8390 # define getpagesize() 8192 /* punt totally */
8391 # endif /* no HAVE_SYS_PARAM_H */
8392 # endif /* no _SC_PAGESIZE */
8393
8394 #endif /* no HAVE_GETPAGESIZE */
8395
8396 int
8397 main ()
8398 {
8399 char *data, *data2, *data3;
8400 const char *cdata2;
8401 int i, pagesize;
8402 int fd, fd2;
8403
8404 pagesize = getpagesize ();
8405
8406 /* First, make a file with some known garbage in it. */
8407 data = (char *) malloc (pagesize);
8408 if (!data)
8409 return 1;
8410 for (i = 0; i < pagesize; ++i)
8411 *(data + i) = rand ();
8412 umask (0);
8413 fd = creat ("conftest.mmap", 0600);
8414 if (fd < 0)
8415 return 2;
8416 if (write (fd, data, pagesize) != pagesize)
8417 return 3;
8418 close (fd);
8419
8420 /* Next, check that the tail of a page is zero-filled. File must have
8421 non-zero length, otherwise we risk SIGBUS for entire page. */
8422 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8423 if (fd2 < 0)
8424 return 4;
8425 cdata2 = "";
8426 if (write (fd2, cdata2, 1) != 1)
8427 return 5;
8428 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
8429 if (data2 == MAP_FAILED)
8430 return 6;
8431 for (i = 0; i < pagesize; ++i)
8432 if (*(data2 + i))
8433 return 7;
8434 close (fd2);
8435 if (munmap (data2, pagesize))
8436 return 8;
8437
8438 /* Next, try to mmap the file at a fixed address which already has
8439 something else allocated at it. If we can, also make sure that
8440 we see the same garbage. */
8441 fd = open ("conftest.mmap", O_RDWR);
8442 if (fd < 0)
8443 return 9;
8444 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8445 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8446 return 10;
8447 for (i = 0; i < pagesize; ++i)
8448 if (*(data + i) != *(data2 + i))
8449 return 11;
8450
8451 /* Finally, make sure that changes to the mapped area do not
8452 percolate back to the file as seen by read(). (This is a bug on
8453 some variants of i386 svr4.0.) */
8454 for (i = 0; i < pagesize; ++i)
8455 *(data2 + i) = *(data2 + i) + 1;
8456 data3 = (char *) malloc (pagesize);
8457 if (!data3)
8458 return 12;
8459 if (read (fd, data3, pagesize) != pagesize)
8460 return 13;
8461 for (i = 0; i < pagesize; ++i)
8462 if (*(data + i) != *(data3 + i))
8463 return 14;
8464 close (fd);
8465 return 0;
8466 }
8467 _ACEOF
8468 if ac_fn_c_try_run "$LINENO"; then :
8469 ac_cv_func_mmap_fixed_mapped=yes
8470 else
8471 ac_cv_func_mmap_fixed_mapped=no
8472 fi
8473 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8474 conftest.$ac_objext conftest.beam conftest.$ac_ext
8475 fi
8476
8477 fi
8478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8479 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
8480 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8481
8482 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
8483
8484 fi
8485 rm -f conftest.mmap conftest.txt
8486
8487 for ac_header in vfork.h
8488 do :
8489 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8490 if test "x$ac_cv_header_vfork_h" = xyes; then :
8491 cat >>confdefs.h <<_ACEOF
8492 #define HAVE_VFORK_H 1
8493 _ACEOF
8494
8495 fi
8496
8497 done
8498
8499 for ac_func in fork vfork
8500 do :
8501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8502 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8503 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8504 cat >>confdefs.h <<_ACEOF
8505 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8506 _ACEOF
8507
8508 fi
8509 done
8510
8511 if test "x$ac_cv_func_fork" = xyes; then
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8513 $as_echo_n "checking for working fork... " >&6; }
8514 if ${ac_cv_func_fork_works+:} false; then :
8515 $as_echo_n "(cached) " >&6
8516 else
8517 if test "$cross_compiling" = yes; then :
8518 ac_cv_func_fork_works=cross
8519 else
8520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8521 /* end confdefs.h. */
8522 $ac_includes_default
8523 int
8524 main ()
8525 {
8526
8527 /* By Ruediger Kuhlmann. */
8528 return fork () < 0;
8529
8530 ;
8531 return 0;
8532 }
8533 _ACEOF
8534 if ac_fn_c_try_run "$LINENO"; then :
8535 ac_cv_func_fork_works=yes
8536 else
8537 ac_cv_func_fork_works=no
8538 fi
8539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8540 conftest.$ac_objext conftest.beam conftest.$ac_ext
8541 fi
8542
8543 fi
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8545 $as_echo "$ac_cv_func_fork_works" >&6; }
8546
8547 else
8548 ac_cv_func_fork_works=$ac_cv_func_fork
8549 fi
8550 if test "x$ac_cv_func_fork_works" = xcross; then
8551 case $host in
8552 *-*-amigaos* | *-*-msdosdjgpp*)
8553 # Override, as these systems have only a dummy fork() stub
8554 ac_cv_func_fork_works=no
8555 ;;
8556 *)
8557 ac_cv_func_fork_works=yes
8558 ;;
8559 esac
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8561 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8562 fi
8563 ac_cv_func_vfork_works=$ac_cv_func_vfork
8564 if test "x$ac_cv_func_vfork" = xyes; then
8565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8566 $as_echo_n "checking for working vfork... " >&6; }
8567 if ${ac_cv_func_vfork_works+:} false; then :
8568 $as_echo_n "(cached) " >&6
8569 else
8570 if test "$cross_compiling" = yes; then :
8571 ac_cv_func_vfork_works=cross
8572 else
8573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8574 /* end confdefs.h. */
8575 /* Thanks to Paul Eggert for this test. */
8576 $ac_includes_default
8577 #include <sys/wait.h>
8578 #ifdef HAVE_VFORK_H
8579 # include <vfork.h>
8580 #endif
8581 /* On some sparc systems, changes by the child to local and incoming
8582 argument registers are propagated back to the parent. The compiler
8583 is told about this with #include <vfork.h>, but some compilers
8584 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8585 static variable whose address is put into a register that is
8586 clobbered by the vfork. */
8587 static void
8588 #ifdef __cplusplus
8589 sparc_address_test (int arg)
8590 # else
8591 sparc_address_test (arg) int arg;
8592 #endif
8593 {
8594 static pid_t child;
8595 if (!child) {
8596 child = vfork ();
8597 if (child < 0) {
8598 perror ("vfork");
8599 _exit(2);
8600 }
8601 if (!child) {
8602 arg = getpid();
8603 write(-1, "", 0);
8604 _exit (arg);
8605 }
8606 }
8607 }
8608
8609 int
8610 main ()
8611 {
8612 pid_t parent = getpid ();
8613 pid_t child;
8614
8615 sparc_address_test (0);
8616
8617 child = vfork ();
8618
8619 if (child == 0) {
8620 /* Here is another test for sparc vfork register problems. This
8621 test uses lots of local variables, at least as many local
8622 variables as main has allocated so far including compiler
8623 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8624 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8625 reuse the register of parent for one of the local variables,
8626 since it will think that parent can't possibly be used any more
8627 in this routine. Assigning to the local variable will thus
8628 munge parent in the parent process. */
8629 pid_t
8630 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8631 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8632 /* Convince the compiler that p..p7 are live; otherwise, it might
8633 use the same hardware register for all 8 local variables. */
8634 if (p != p1 || p != p2 || p != p3 || p != p4
8635 || p != p5 || p != p6 || p != p7)
8636 _exit(1);
8637
8638 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8639 from child file descriptors. If the child closes a descriptor
8640 before it execs or exits, this munges the parent's descriptor
8641 as well. Test for this by closing stdout in the child. */
8642 _exit(close(fileno(stdout)) != 0);
8643 } else {
8644 int status;
8645 struct stat st;
8646
8647 while (wait(&status) != child)
8648 ;
8649 return (
8650 /* Was there some problem with vforking? */
8651 child < 0
8652
8653 /* Did the child fail? (This shouldn't happen.) */
8654 || status
8655
8656 /* Did the vfork/compiler bug occur? */
8657 || parent != getpid()
8658
8659 /* Did the file descriptor bug occur? */
8660 || fstat(fileno(stdout), &st) != 0
8661 );
8662 }
8663 }
8664 _ACEOF
8665 if ac_fn_c_try_run "$LINENO"; then :
8666 ac_cv_func_vfork_works=yes
8667 else
8668 ac_cv_func_vfork_works=no
8669 fi
8670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8671 conftest.$ac_objext conftest.beam conftest.$ac_ext
8672 fi
8673
8674 fi
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8676 $as_echo "$ac_cv_func_vfork_works" >&6; }
8677
8678 fi;
8679 if test "x$ac_cv_func_fork_works" = xcross; then
8680 ac_cv_func_vfork_works=$ac_cv_func_vfork
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8682 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8683 fi
8684
8685 if test "x$ac_cv_func_vfork_works" = xyes; then
8686
8687 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8688
8689 else
8690
8691 $as_echo "#define vfork fork" >>confdefs.h
8692
8693 fi
8694 if test "x$ac_cv_func_fork_works" = xyes; then
8695
8696 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8697
8698 fi
8699
8700 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8702 $as_echo_n "checking for library containing socketpair... " >&6; }
8703 if ${ac_cv_search_socketpair+:} false; then :
8704 $as_echo_n "(cached) " >&6
8705 else
8706 ac_func_search_save_LIBS=$LIBS
8707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8708 /* end confdefs.h. */
8709
8710 /* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
8713 #ifdef __cplusplus
8714 extern "C"
8715 #endif
8716 char socketpair ();
8717 int
8718 main ()
8719 {
8720 return socketpair ();
8721 ;
8722 return 0;
8723 }
8724 _ACEOF
8725 for ac_lib in '' socket; do
8726 if test -z "$ac_lib"; then
8727 ac_res="none required"
8728 else
8729 ac_res=-l$ac_lib
8730 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8731 fi
8732 if ac_fn_c_try_link "$LINENO"; then :
8733 ac_cv_search_socketpair=$ac_res
8734 fi
8735 rm -f core conftest.err conftest.$ac_objext \
8736 conftest$ac_exeext
8737 if ${ac_cv_search_socketpair+:} false; then :
8738 break
8739 fi
8740 done
8741 if ${ac_cv_search_socketpair+:} false; then :
8742
8743 else
8744 ac_cv_search_socketpair=no
8745 fi
8746 rm conftest.$ac_ext
8747 LIBS=$ac_func_search_save_LIBS
8748 fi
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8750 $as_echo "$ac_cv_search_socketpair" >&6; }
8751 ac_res=$ac_cv_search_socketpair
8752 if test "$ac_res" != no; then :
8753 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8754
8755 fi
8756
8757 for ac_func in \
8758 fdwalk \
8759 getauxval \
8760 getrlimit \
8761 getrusage \
8762 pipe \
8763 pipe2 \
8764 poll \
8765 ptrace64 \
8766 sbrk \
8767 setns \
8768 setpgid \
8769 setpgrp \
8770 sigaction \
8771 sigaltstack \
8772 sigprocmask \
8773 sigtimedwait \
8774 socketpair \
8775
8776 do :
8777 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8778 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8779 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8780 cat >>confdefs.h <<_ACEOF
8781 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8782 _ACEOF
8783
8784 fi
8785 done
8786
8787
8788 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
8789 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
8790 # only in linux/personality.h.
8791 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
8792 "
8793 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
8794 ac_have_decl=1
8795 else
8796 ac_have_decl=0
8797 fi
8798
8799 cat >>confdefs.h <<_ACEOF
8800 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
8801 _ACEOF
8802
8803
8804 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8805 if test "x$ac_cv_have_decl_strstr" = xyes; then :
8806 ac_have_decl=1
8807 else
8808 ac_have_decl=0
8809 fi
8810
8811 cat >>confdefs.h <<_ACEOF
8812 #define HAVE_DECL_STRSTR $ac_have_decl
8813 _ACEOF
8814
8815
8816 # ----------------------- #
8817 # Checks for structures. #
8818 # ----------------------- #
8819
8820 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8821 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
8822
8823 cat >>confdefs.h <<_ACEOF
8824 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
8825 _ACEOF
8826
8827
8828 fi
8829 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
8830 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
8831
8832 cat >>confdefs.h <<_ACEOF
8833 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
8834 _ACEOF
8835
8836
8837 fi
8838
8839
8840 # On FreeBSD we need libutil for the kinfo_get* functions. On
8841 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8842 # Figure out which one to use.
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8844 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8845 if ${ac_cv_search_kinfo_getfile+:} false; then :
8846 $as_echo_n "(cached) " >&6
8847 else
8848 ac_func_search_save_LIBS=$LIBS
8849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8850 /* end confdefs.h. */
8851
8852 /* Override any GCC internal prototype to avoid an error.
8853 Use char because int might match the return type of a GCC
8854 builtin and then its argument prototype would still apply. */
8855 #ifdef __cplusplus
8856 extern "C"
8857 #endif
8858 char kinfo_getfile ();
8859 int
8860 main ()
8861 {
8862 return kinfo_getfile ();
8863 ;
8864 return 0;
8865 }
8866 _ACEOF
8867 for ac_lib in '' util util-freebsd; do
8868 if test -z "$ac_lib"; then
8869 ac_res="none required"
8870 else
8871 ac_res=-l$ac_lib
8872 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8873 fi
8874 if ac_fn_c_try_link "$LINENO"; then :
8875 ac_cv_search_kinfo_getfile=$ac_res
8876 fi
8877 rm -f core conftest.err conftest.$ac_objext \
8878 conftest$ac_exeext
8879 if ${ac_cv_search_kinfo_getfile+:} false; then :
8880 break
8881 fi
8882 done
8883 if ${ac_cv_search_kinfo_getfile+:} false; then :
8884
8885 else
8886 ac_cv_search_kinfo_getfile=no
8887 fi
8888 rm conftest.$ac_ext
8889 LIBS=$ac_func_search_save_LIBS
8890 fi
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8892 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8893 ac_res=$ac_cv_search_kinfo_getfile
8894 if test "$ac_res" != no; then :
8895 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8896
8897 fi
8898
8899
8900 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
8901 for ac_func in kinfo_getfile
8902 do :
8903 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
8904 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
8905 cat >>confdefs.h <<_ACEOF
8906 #define HAVE_KINFO_GETFILE 1
8907 _ACEOF
8908
8909 fi
8910 done
8911
8912
8913 # ----------------------- #
8914 # Check for threading. #
8915 # ----------------------- #
8916
8917 # Check whether --enable-threading was given.
8918 if test "${enable_threading+set}" = set; then :
8919 enableval=$enable_threading; case "$enableval" in
8920 yes) want_threading=yes ;;
8921 no) want_threading=no ;;
8922 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
8923 esac
8924 else
8925 want_threading=auto
8926 fi
8927
8928
8929 # Check for std::thread. This does not work on some platforms, like
8930 # mingw using the win32 threads model with gcc older than 13, and
8931 # DJGPP.
8932 ac_ext=cpp
8933 ac_cpp='$CXXCPP $CPPFLAGS'
8934 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8935 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8936 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8937
8938
8939
8940
8941
8942 ac_ext=c
8943 ac_cpp='$CPP $CPPFLAGS'
8944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8947
8948 ax_pthread_ok=no
8949
8950 # We used to check for pthread.h first, but this fails if pthread.h
8951 # requires special compiler flags (e.g. on Tru64 or Sequent).
8952 # It gets checked for in the link test anyway.
8953
8954 # First of all, check if the user has set any of the PTHREAD_LIBS,
8955 # etcetera environment variables, and if threads linking works using
8956 # them:
8957 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
8958 ax_pthread_save_CC="$CC"
8959 ax_pthread_save_CFLAGS="$CFLAGS"
8960 ax_pthread_save_LIBS="$LIBS"
8961 if test "x$PTHREAD_CC" != "x"; then :
8962 CC="$PTHREAD_CC"
8963 fi
8964 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8965 LIBS="$PTHREAD_LIBS $LIBS"
8966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8967 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8969 /* end confdefs.h. */
8970
8971 /* Override any GCC internal prototype to avoid an error.
8972 Use char because int might match the return type of a GCC
8973 builtin and then its argument prototype would still apply. */
8974 #ifdef __cplusplus
8975 extern "C"
8976 #endif
8977 char pthread_join ();
8978 int
8979 main ()
8980 {
8981 return pthread_join ();
8982 ;
8983 return 0;
8984 }
8985 _ACEOF
8986 if ac_fn_c_try_link "$LINENO"; then :
8987 ax_pthread_ok=yes
8988 fi
8989 rm -f core conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8992 $as_echo "$ax_pthread_ok" >&6; }
8993 if test "x$ax_pthread_ok" = "xno"; then
8994 PTHREAD_LIBS=""
8995 PTHREAD_CFLAGS=""
8996 fi
8997 CC="$ax_pthread_save_CC"
8998 CFLAGS="$ax_pthread_save_CFLAGS"
8999 LIBS="$ax_pthread_save_LIBS"
9000 fi
9001
9002 # We must check for the threads library under a number of different
9003 # names; the ordering is very important because some systems
9004 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
9005 # libraries is broken (non-POSIX).
9006
9007 # Create a list of thread flags to try. Items starting with a "-" are
9008 # C compiler flags, and other items are library names, except for "none"
9009 # which indicates that we try without any flags at all, and "pthread-config"
9010 # which is a program returning the flags for the Pth emulation library.
9011
9012 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
9013
9014 # The ordering *is* (sometimes) important. Some notes on the
9015 # individual items follow:
9016
9017 # pthreads: AIX (must check this before -lpthread)
9018 # none: in case threads are in libc; should be tried before -Kthread and
9019 # other compiler flags to prevent continual compiler warnings
9020 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
9021 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
9022 # (Note: HP C rejects this with "bad form for `-t' option")
9023 # -pthreads: Solaris/gcc (Note: HP C also rejects)
9024 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
9025 # doesn't hurt to check since this sometimes defines pthreads and
9026 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
9027 # is present but should not be used directly; and before -mthreads,
9028 # because the compiler interprets this as "-mt" + "-hreads")
9029 # -mthreads: Mingw32/gcc, Lynx/gcc
9030 # pthread: Linux, etcetera
9031 # --thread-safe: KAI C++
9032 # pthread-config: use pthread-config program (for GNU Pth library)
9033
9034 case $host_os in
9035
9036 freebsd*)
9037
9038 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
9039 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
9040
9041 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
9042 ;;
9043
9044 hpux*)
9045
9046 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
9047 # multi-threading and also sets -lpthread."
9048
9049 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
9050 ;;
9051
9052 openedition*)
9053
9054 # IBM z/OS requires a feature-test macro to be defined in order to
9055 # enable POSIX threads at all, so give the user a hint if this is
9056 # not set. (We don't define these ourselves, as they can affect
9057 # other portions of the system API in unpredictable ways.)
9058
9059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9060 /* end confdefs.h. */
9061
9062 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
9063 AX_PTHREAD_ZOS_MISSING
9064 # endif
9065
9066 _ACEOF
9067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9068 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
9070 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
9071 fi
9072 rm -f conftest*
9073
9074 ;;
9075
9076 solaris*)
9077
9078 # On Solaris (at least, for some versions), libc contains stubbed
9079 # (non-functional) versions of the pthreads routines, so link-based
9080 # tests will erroneously succeed. (N.B.: The stubs are missing
9081 # pthread_cleanup_push, or rather a function called by this macro,
9082 # so we could check for that, but who knows whether they'll stub
9083 # that too in a future libc.) So we'll check first for the
9084 # standard Solaris way of linking pthreads (-mt -lpthread).
9085
9086 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
9087 ;;
9088 esac
9089
9090 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
9091
9092 if test "x$GCC" = "xyes"; then :
9093 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
9094 fi
9095
9096 # The presence of a feature test macro requesting re-entrant function
9097 # definitions is, on some systems, a strong hint that pthreads support is
9098 # correctly enabled
9099
9100 case $host_os in
9101 darwin* | hpux* | linux* | osf* | solaris*)
9102 ax_pthread_check_macro="_REENTRANT"
9103 ;;
9104
9105 aix*)
9106 ax_pthread_check_macro="_THREAD_SAFE"
9107 ;;
9108
9109 *)
9110 ax_pthread_check_macro="--"
9111 ;;
9112 esac
9113 if test "x$ax_pthread_check_macro" = "x--"; then :
9114 ax_pthread_check_cond=0
9115 else
9116 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
9117 fi
9118
9119 # Are we compiling with Clang?
9120
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
9122 $as_echo_n "checking whether $CC is Clang... " >&6; }
9123 if ${ax_cv_PTHREAD_CLANG+:} false; then :
9124 $as_echo_n "(cached) " >&6
9125 else
9126 ax_cv_PTHREAD_CLANG=no
9127 # Note that Autoconf sets GCC=yes for Clang as well as GCC
9128 if test "x$GCC" = "xyes"; then
9129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9130 /* end confdefs.h. */
9131 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
9132 # if defined(__clang__) && defined(__llvm__)
9133 AX_PTHREAD_CC_IS_CLANG
9134 # endif
9135
9136 _ACEOF
9137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9138 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
9139 ax_cv_PTHREAD_CLANG=yes
9140 fi
9141 rm -f conftest*
9142
9143 fi
9144
9145 fi
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
9147 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
9148 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
9149
9150 ax_pthread_clang_warning=no
9151
9152 # Clang needs special handling, because older versions handle the -pthread
9153 # option in a rather... idiosyncratic way
9154
9155 if test "x$ax_pthread_clang" = "xyes"; then
9156
9157 # Clang takes -pthread; it has never supported any other flag
9158
9159 # (Note 1: This will need to be revisited if a system that Clang
9160 # supports has POSIX threads in a separate library. This tends not
9161 # to be the way of modern systems, but it's conceivable.)
9162
9163 # (Note 2: On some systems, notably Darwin, -pthread is not needed
9164 # to get POSIX threads support; the API is always present and
9165 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
9166 # -pthread does define _REENTRANT, and while the Darwin headers
9167 # ignore this macro, third-party headers might not.)
9168
9169 PTHREAD_CFLAGS="-pthread"
9170 PTHREAD_LIBS=
9171
9172 ax_pthread_ok=yes
9173
9174 # However, older versions of Clang make a point of warning the user
9175 # that, in an invocation where only linking and no compilation is
9176 # taking place, the -pthread option has no effect ("argument unused
9177 # during compilation"). They expect -pthread to be passed in only
9178 # when source code is being compiled.
9179 #
9180 # Problem is, this is at odds with the way Automake and most other
9181 # C build frameworks function, which is that the same flags used in
9182 # compilation (CFLAGS) are also used in linking. Many systems
9183 # supported by AX_PTHREAD require exactly this for POSIX threads
9184 # support, and in fact it is often not straightforward to specify a
9185 # flag that is used only in the compilation phase and not in
9186 # linking. Such a scenario is extremely rare in practice.
9187 #
9188 # Even though use of the -pthread flag in linking would only print
9189 # a warning, this can be a nuisance for well-run software projects
9190 # that build with -Werror. So if the active version of Clang has
9191 # this misfeature, we search for an option to squash it.
9192
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
9194 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
9195 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
9196 $as_echo_n "(cached) " >&6
9197 else
9198 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
9199 # Create an alternate version of $ac_link that compiles and
9200 # links in two steps (.c -> .o, .o -> exe) instead of one
9201 # (.c -> exe), because the warning occurs only in the second
9202 # step
9203 ax_pthread_save_ac_link="$ac_link"
9204 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
9205 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
9206 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
9207 ax_pthread_save_CFLAGS="$CFLAGS"
9208 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
9209 if test "x$ax_pthread_try" = "xunknown"; then :
9210 break
9211 fi
9212 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
9213 ac_link="$ax_pthread_save_ac_link"
9214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215 /* end confdefs.h. */
9216 int main(void){return 0;}
9217 _ACEOF
9218 if ac_fn_c_try_link "$LINENO"; then :
9219 ac_link="$ax_pthread_2step_ac_link"
9220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9221 /* end confdefs.h. */
9222 int main(void){return 0;}
9223 _ACEOF
9224 if ac_fn_c_try_link "$LINENO"; then :
9225 break
9226 fi
9227 rm -f core conftest.err conftest.$ac_objext \
9228 conftest$ac_exeext conftest.$ac_ext
9229
9230 fi
9231 rm -f core conftest.err conftest.$ac_objext \
9232 conftest$ac_exeext conftest.$ac_ext
9233 done
9234 ac_link="$ax_pthread_save_ac_link"
9235 CFLAGS="$ax_pthread_save_CFLAGS"
9236 if test "x$ax_pthread_try" = "x"; then :
9237 ax_pthread_try=no
9238 fi
9239 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
9240
9241 fi
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
9243 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
9244
9245 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
9246 no | unknown) ;;
9247 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
9248 esac
9249
9250 fi # $ax_pthread_clang = yes
9251
9252 if test "x$ax_pthread_ok" = "xno"; then
9253 for ax_pthread_try_flag in $ax_pthread_flags; do
9254
9255 case $ax_pthread_try_flag in
9256 none)
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
9258 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
9259 ;;
9260
9261 -mt,pthread)
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
9263 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
9264 PTHREAD_CFLAGS="-mt"
9265 PTHREAD_LIBS="-lpthread"
9266 ;;
9267
9268 -*)
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
9270 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
9271 PTHREAD_CFLAGS="$ax_pthread_try_flag"
9272 ;;
9273
9274 pthread-config)
9275 # Extract the first word of "pthread-config", so it can be a program name with args.
9276 set dummy pthread-config; ac_word=$2
9277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9278 $as_echo_n "checking for $ac_word... " >&6; }
9279 if ${ac_cv_prog_ax_pthread_config+:} false; then :
9280 $as_echo_n "(cached) " >&6
9281 else
9282 if test -n "$ax_pthread_config"; then
9283 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
9284 else
9285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286 for as_dir in $PATH
9287 do
9288 IFS=$as_save_IFS
9289 test -z "$as_dir" && as_dir=.
9290 for ac_exec_ext in '' $ac_executable_extensions; do
9291 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292 ac_cv_prog_ax_pthread_config="yes"
9293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294 break 2
9295 fi
9296 done
9297 done
9298 IFS=$as_save_IFS
9299
9300 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
9301 fi
9302 fi
9303 ax_pthread_config=$ac_cv_prog_ax_pthread_config
9304 if test -n "$ax_pthread_config"; then
9305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
9306 $as_echo "$ax_pthread_config" >&6; }
9307 else
9308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309 $as_echo "no" >&6; }
9310 fi
9311
9312
9313 if test "x$ax_pthread_config" = "xno"; then :
9314 continue
9315 fi
9316 PTHREAD_CFLAGS="`pthread-config --cflags`"
9317 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
9318 ;;
9319
9320 *)
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
9322 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
9323 PTHREAD_LIBS="-l$ax_pthread_try_flag"
9324 ;;
9325 esac
9326
9327 ax_pthread_save_CFLAGS="$CFLAGS"
9328 ax_pthread_save_LIBS="$LIBS"
9329 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9330 LIBS="$PTHREAD_LIBS $LIBS"
9331
9332 # Check for various functions. We must include pthread.h,
9333 # since some functions may be macros. (On the Sequent, we
9334 # need a special flag -Kthread to make this header compile.)
9335 # We check for pthread_join because it is in -lpthread on IRIX
9336 # while pthread_create is in libc. We check for pthread_attr_init
9337 # due to DEC craziness with -lpthreads. We check for
9338 # pthread_cleanup_push because it is one of the few pthread
9339 # functions on Solaris that doesn't have a non-functional libc stub.
9340 # We try pthread_create on general principles.
9341
9342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9343 /* end confdefs.h. */
9344 #include <pthread.h>
9345 # if $ax_pthread_check_cond
9346 # error "$ax_pthread_check_macro must be defined"
9347 # endif
9348 static void routine(void *a) { a = 0; }
9349 static void *start_routine(void *a) { return a; }
9350 int
9351 main ()
9352 {
9353 pthread_t th; pthread_attr_t attr;
9354 pthread_create(&th, 0, start_routine, 0);
9355 pthread_join(th, 0);
9356 pthread_attr_init(&attr);
9357 pthread_cleanup_push(routine, 0);
9358 pthread_cleanup_pop(0) /* ; */
9359 ;
9360 return 0;
9361 }
9362 _ACEOF
9363 if ac_fn_c_try_link "$LINENO"; then :
9364 ax_pthread_ok=yes
9365 fi
9366 rm -f core conftest.err conftest.$ac_objext \
9367 conftest$ac_exeext conftest.$ac_ext
9368
9369 CFLAGS="$ax_pthread_save_CFLAGS"
9370 LIBS="$ax_pthread_save_LIBS"
9371
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9373 $as_echo "$ax_pthread_ok" >&6; }
9374 if test "x$ax_pthread_ok" = "xyes"; then :
9375 break
9376 fi
9377
9378 PTHREAD_LIBS=""
9379 PTHREAD_CFLAGS=""
9380 done
9381 fi
9382
9383 # Various other checks:
9384 if test "x$ax_pthread_ok" = "xyes"; then
9385 ax_pthread_save_CFLAGS="$CFLAGS"
9386 ax_pthread_save_LIBS="$LIBS"
9387 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9388 LIBS="$PTHREAD_LIBS $LIBS"
9389
9390 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
9392 $as_echo_n "checking for joinable pthread attribute... " >&6; }
9393 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
9394 $as_echo_n "(cached) " >&6
9395 else
9396 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
9397 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399 /* end confdefs.h. */
9400 #include <pthread.h>
9401 int
9402 main ()
9403 {
9404 int attr = $ax_pthread_attr; return attr /* ; */
9405 ;
9406 return 0;
9407 }
9408 _ACEOF
9409 if ac_fn_c_try_link "$LINENO"; then :
9410 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
9411 fi
9412 rm -f core conftest.err conftest.$ac_objext \
9413 conftest$ac_exeext conftest.$ac_ext
9414 done
9415
9416 fi
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
9418 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
9419 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
9420 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
9421 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
9422
9423 cat >>confdefs.h <<_ACEOF
9424 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
9425 _ACEOF
9426
9427 ax_pthread_joinable_attr_defined=yes
9428
9429 fi
9430
9431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
9432 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
9433 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
9434 $as_echo_n "(cached) " >&6
9435 else
9436 ax_cv_PTHREAD_SPECIAL_FLAGS=no
9437 case $host_os in
9438 solaris*)
9439 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
9440 ;;
9441 esac
9442
9443 fi
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
9445 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
9446 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
9447 test "x$ax_pthread_special_flags_added" != "xyes"; then :
9448 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
9449 ax_pthread_special_flags_added=yes
9450 fi
9451
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
9453 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
9454 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
9455 $as_echo_n "(cached) " >&6
9456 else
9457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9458 /* end confdefs.h. */
9459 #include <pthread.h>
9460 int
9461 main ()
9462 {
9463 int i = PTHREAD_PRIO_INHERIT;
9464 ;
9465 return 0;
9466 }
9467 _ACEOF
9468 if ac_fn_c_try_link "$LINENO"; then :
9469 ax_cv_PTHREAD_PRIO_INHERIT=yes
9470 else
9471 ax_cv_PTHREAD_PRIO_INHERIT=no
9472 fi
9473 rm -f core conftest.err conftest.$ac_objext \
9474 conftest$ac_exeext conftest.$ac_ext
9475
9476 fi
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
9478 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
9479 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
9480 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
9481
9482 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
9483
9484 ax_pthread_prio_inherit_defined=yes
9485
9486 fi
9487
9488 CFLAGS="$ax_pthread_save_CFLAGS"
9489 LIBS="$ax_pthread_save_LIBS"
9490
9491 # More AIX lossage: compile with *_r variant
9492 if test "x$GCC" != "xyes"; then
9493 case $host_os in
9494 aix*)
9495 case "x/$CC" in #(
9496 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
9497 #handle absolute path differently from PATH based program lookup
9498 case "x$CC" in #(
9499 x/*) :
9500 if as_fn_executable_p ${CC}_r; then :
9501 PTHREAD_CC="${CC}_r"
9502 fi ;; #(
9503 *) :
9504 for ac_prog in ${CC}_r
9505 do
9506 # Extract the first word of "$ac_prog", so it can be a program name with args.
9507 set dummy $ac_prog; ac_word=$2
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509 $as_echo_n "checking for $ac_word... " >&6; }
9510 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
9511 $as_echo_n "(cached) " >&6
9512 else
9513 if test -n "$PTHREAD_CC"; then
9514 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
9515 else
9516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517 for as_dir in $PATH
9518 do
9519 IFS=$as_save_IFS
9520 test -z "$as_dir" && as_dir=.
9521 for ac_exec_ext in '' $ac_executable_extensions; do
9522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523 ac_cv_prog_PTHREAD_CC="$ac_prog"
9524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525 break 2
9526 fi
9527 done
9528 done
9529 IFS=$as_save_IFS
9530
9531 fi
9532 fi
9533 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
9534 if test -n "$PTHREAD_CC"; then
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
9536 $as_echo "$PTHREAD_CC" >&6; }
9537 else
9538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539 $as_echo "no" >&6; }
9540 fi
9541
9542
9543 test -n "$PTHREAD_CC" && break
9544 done
9545 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9546 ;;
9547 esac ;; #(
9548 *) :
9549 ;;
9550 esac
9551 ;;
9552 esac
9553 fi
9554 fi
9555
9556 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9557
9558
9559
9560
9561
9562 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
9563 if test "x$ax_pthread_ok" = "xyes"; then
9564 threads=yes
9565 :
9566 else
9567 ax_pthread_ok=no
9568 threads=no
9569 fi
9570 ac_ext=cpp
9571 ac_cpp='$CXXCPP $CPPFLAGS'
9572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9575
9576
9577 save_LIBS="$LIBS"
9578 LIBS="$PTHREAD_LIBS $LIBS"
9579 save_CXXFLAGS="$CXXFLAGS"
9580 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
9581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
9582 $as_echo_n "checking for std::thread... " >&6; }
9583 if ${gdb_cv_cxx_std_thread+:} false; then :
9584 $as_echo_n "(cached) " >&6
9585 else
9586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9587 /* end confdefs.h. */
9588 #if defined (__MINGW32__) || defined (__CYGWIN__)
9589 # ifdef _WIN32_WINNT
9590 # if _WIN32_WINNT < 0x0501
9591 # undef _WIN32_WINNT
9592 # define _WIN32_WINNT 0x0501
9593 # endif
9594 # else
9595 # define _WIN32_WINNT 0x0501
9596 # endif
9597 #endif /* __MINGW32__ || __CYGWIN__ */
9598 #include <thread>
9599 #include <mutex>
9600 void callback() { }
9601 int
9602 main ()
9603 {
9604 std::thread t(callback);
9605 ;
9606 return 0;
9607 }
9608 _ACEOF
9609 if ac_fn_cxx_try_compile "$LINENO"; then :
9610 gdb_cv_cxx_std_thread=yes
9611 else
9612 gdb_cv_cxx_std_thread=no
9613 fi
9614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9615 fi
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
9617 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
9618
9619 if test "$threads" = "yes"; then
9620 # This check must be here, while LIBS includes any necessary
9621 # threading library.
9622 for ac_func in pthread_sigmask pthread_setname_np
9623 do :
9624 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9625 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
9626 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9627 cat >>confdefs.h <<_ACEOF
9628 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9629 _ACEOF
9630
9631 fi
9632 done
9633
9634 fi
9635 LIBS="$save_LIBS"
9636 CXXFLAGS="$save_CXXFLAGS"
9637
9638 if test "$want_threading" != "no"; then
9639 if test "$gdb_cv_cxx_std_thread" = "yes"; then
9640
9641 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
9642
9643 else
9644 if test "$want_threading" = "yes"; then
9645 as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
9646 else
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
9648 $as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
9649 fi
9650 fi
9651 fi
9652 ac_ext=c
9653 ac_cpp='$CPP $CPPFLAGS'
9654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9657
9658
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
9660 $as_echo_n "checking for sigsetjmp... " >&6; }
9661 if ${gdb_cv_func_sigsetjmp+:} false; then :
9662 $as_echo_n "(cached) " >&6
9663 else
9664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9665 /* end confdefs.h. */
9666 #include <setjmp.h>
9667 int
9668 main ()
9669 {
9670 sigjmp_buf env;
9671 while (! sigsetjmp (env, 1))
9672 siglongjmp (env, 1);
9673
9674 ;
9675 return 0;
9676 }
9677 _ACEOF
9678 if ac_fn_c_try_compile "$LINENO"; then :
9679 gdb_cv_func_sigsetjmp=yes
9680 else
9681 gdb_cv_func_sigsetjmp=no
9682
9683 fi
9684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9685
9686 fi
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
9688 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
9689 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
9690
9691 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
9692
9693 fi
9694
9695
9696 # Check whether --with-intel_pt was given.
9697 if test "${with_intel_pt+set}" = set; then :
9698 withval=$with_intel_pt;
9699 else
9700 with_intel_pt=auto
9701 fi
9702
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
9704 $as_echo_n "checking whether to use intel pt... " >&6; }
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
9706 $as_echo "$with_intel_pt" >&6; }
9707
9708 if test "${with_intel_pt}" = no; then
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
9710 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
9711 HAVE_LIBIPT=no
9712 else
9713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714 /* end confdefs.h. */
9715
9716 #include <linux/perf_event.h>
9717 #ifndef PERF_ATTR_SIZE_VER5
9718 # error
9719 #endif
9720
9721 _ACEOF
9722 if ac_fn_c_try_cpp "$LINENO"; then :
9723 perf_event=yes
9724 else
9725 perf_event=no
9726 fi
9727 rm -f conftest.err conftest.i conftest.$ac_ext
9728 if test "$perf_event" != yes; then
9729 if test "$with_intel_pt" = yes; then
9730 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
9731 else
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
9733 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
9734 fi
9735 fi
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745 use_additional=yes
9746
9747 acl_save_prefix="$prefix"
9748 prefix="$acl_final_prefix"
9749 acl_save_exec_prefix="$exec_prefix"
9750 exec_prefix="$acl_final_exec_prefix"
9751
9752 eval additional_includedir=\"$includedir\"
9753 eval additional_libdir=\"$libdir\"
9754
9755 exec_prefix="$acl_save_exec_prefix"
9756 prefix="$acl_save_prefix"
9757
9758
9759 # Check whether --with-libipt-prefix was given.
9760 if test "${with_libipt_prefix+set}" = set; then :
9761 withval=$with_libipt_prefix;
9762 if test "X$withval" = "Xno"; then
9763 use_additional=no
9764 else
9765 if test "X$withval" = "X"; then
9766
9767 acl_save_prefix="$prefix"
9768 prefix="$acl_final_prefix"
9769 acl_save_exec_prefix="$exec_prefix"
9770 exec_prefix="$acl_final_exec_prefix"
9771
9772 eval additional_includedir=\"$includedir\"
9773 eval additional_libdir=\"$libdir\"
9774
9775 exec_prefix="$acl_save_exec_prefix"
9776 prefix="$acl_save_prefix"
9777
9778 else
9779 additional_includedir="$withval/include"
9780 additional_libdir="$withval/lib"
9781 fi
9782 fi
9783
9784 fi
9785
9786
9787 # Check whether --with-libipt-type was given.
9788 if test "${with_libipt_type+set}" = set; then :
9789 withval=$with_libipt_type; with_libipt_type=$withval
9790 else
9791 with_libipt_type=auto
9792 fi
9793
9794 lib_type=`eval echo \$with_libipt_type`
9795
9796 LIBIPT=
9797 LTLIBIPT=
9798 INCIPT=
9799 rpathdirs=
9800 ltrpathdirs=
9801 names_already_handled=
9802 names_next_round='ipt '
9803 while test -n "$names_next_round"; do
9804 names_this_round="$names_next_round"
9805 names_next_round=
9806 for name in $names_this_round; do
9807 already_handled=
9808 for n in $names_already_handled; do
9809 if test "$n" = "$name"; then
9810 already_handled=yes
9811 break
9812 fi
9813 done
9814 if test -z "$already_handled"; then
9815 names_already_handled="$names_already_handled $name"
9816 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9817 eval value=\"\$HAVE_LIB$uppername\"
9818 if test -n "$value"; then
9819 if test "$value" = yes; then
9820 eval value=\"\$LIB$uppername\"
9821 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
9822 eval value=\"\$LTLIB$uppername\"
9823 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
9824 else
9825 :
9826 fi
9827 else
9828 found_dir=
9829 found_la=
9830 found_so=
9831 found_a=
9832 if test $use_additional = yes; then
9833 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9834 found_dir="$additional_libdir"
9835 found_so="$additional_libdir/lib$name.$shlibext"
9836 if test -f "$additional_libdir/lib$name.la"; then
9837 found_la="$additional_libdir/lib$name.la"
9838 fi
9839 elif test x$lib_type != xshared; then
9840 if test -f "$additional_libdir/lib$name.$libext"; then
9841 found_dir="$additional_libdir"
9842 found_a="$additional_libdir/lib$name.$libext"
9843 if test -f "$additional_libdir/lib$name.la"; then
9844 found_la="$additional_libdir/lib$name.la"
9845 fi
9846 fi
9847 fi
9848 fi
9849 if test "X$found_dir" = "X"; then
9850 for x in $LDFLAGS $LTLIBIPT; do
9851
9852 acl_save_prefix="$prefix"
9853 prefix="$acl_final_prefix"
9854 acl_save_exec_prefix="$exec_prefix"
9855 exec_prefix="$acl_final_exec_prefix"
9856 eval x=\"$x\"
9857 exec_prefix="$acl_save_exec_prefix"
9858 prefix="$acl_save_prefix"
9859
9860 case "$x" in
9861 -L*)
9862 dir=`echo "X$x" | sed -e 's/^X-L//'`
9863 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9864 found_dir="$dir"
9865 found_so="$dir/lib$name.$shlibext"
9866 if test -f "$dir/lib$name.la"; then
9867 found_la="$dir/lib$name.la"
9868 fi
9869 elif test x$lib_type != xshared; then
9870 if test -f "$dir/lib$name.$libext"; then
9871 found_dir="$dir"
9872 found_a="$dir/lib$name.$libext"
9873 if test -f "$dir/lib$name.la"; then
9874 found_la="$dir/lib$name.la"
9875 fi
9876 fi
9877 fi
9878 ;;
9879 esac
9880 if test "X$found_dir" != "X"; then
9881 break
9882 fi
9883 done
9884 fi
9885 if test "X$found_dir" != "X"; then
9886 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
9887 if test "X$found_so" != "X"; then
9888 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9889 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9890 else
9891 haveit=
9892 for x in $ltrpathdirs; do
9893 if test "X$x" = "X$found_dir"; then
9894 haveit=yes
9895 break
9896 fi
9897 done
9898 if test -z "$haveit"; then
9899 ltrpathdirs="$ltrpathdirs $found_dir"
9900 fi
9901 if test "$hardcode_direct" = yes; then
9902 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9903 else
9904 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9905 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9906 haveit=
9907 for x in $rpathdirs; do
9908 if test "X$x" = "X$found_dir"; then
9909 haveit=yes
9910 break
9911 fi
9912 done
9913 if test -z "$haveit"; then
9914 rpathdirs="$rpathdirs $found_dir"
9915 fi
9916 else
9917 haveit=
9918 for x in $LDFLAGS $LIBIPT; do
9919
9920 acl_save_prefix="$prefix"
9921 prefix="$acl_final_prefix"
9922 acl_save_exec_prefix="$exec_prefix"
9923 exec_prefix="$acl_final_exec_prefix"
9924 eval x=\"$x\"
9925 exec_prefix="$acl_save_exec_prefix"
9926 prefix="$acl_save_prefix"
9927
9928 if test "X$x" = "X-L$found_dir"; then
9929 haveit=yes
9930 break
9931 fi
9932 done
9933 if test -z "$haveit"; then
9934 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
9935 fi
9936 if test "$hardcode_minus_L" != no; then
9937 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9938 else
9939 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9940 fi
9941 fi
9942 fi
9943 fi
9944 else
9945 if test "X$found_a" != "X"; then
9946 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
9947 else
9948 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
9949 fi
9950 fi
9951 additional_includedir=
9952 case "$found_dir" in
9953 */lib | */lib/)
9954 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9955 additional_includedir="$basedir/include"
9956 ;;
9957 esac
9958 if test "X$additional_includedir" != "X"; then
9959 if test "X$additional_includedir" != "X/usr/include"; then
9960 haveit=
9961 if test "X$additional_includedir" = "X/usr/local/include"; then
9962 if test -n "$GCC"; then
9963 case $host_os in
9964 linux*) haveit=yes;;
9965 esac
9966 fi
9967 fi
9968 if test -z "$haveit"; then
9969 for x in $CPPFLAGS $INCIPT; do
9970
9971 acl_save_prefix="$prefix"
9972 prefix="$acl_final_prefix"
9973 acl_save_exec_prefix="$exec_prefix"
9974 exec_prefix="$acl_final_exec_prefix"
9975 eval x=\"$x\"
9976 exec_prefix="$acl_save_exec_prefix"
9977 prefix="$acl_save_prefix"
9978
9979 if test "X$x" = "X-I$additional_includedir"; then
9980 haveit=yes
9981 break
9982 fi
9983 done
9984 if test -z "$haveit"; then
9985 if test -d "$additional_includedir"; then
9986 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
9987 fi
9988 fi
9989 fi
9990 fi
9991 fi
9992 if test -n "$found_la"; then
9993 save_libdir="$libdir"
9994 case "$found_la" in
9995 */* | *\\*) . "$found_la" ;;
9996 *) . "./$found_la" ;;
9997 esac
9998 libdir="$save_libdir"
9999 for dep in $dependency_libs; do
10000 case "$dep" in
10001 -L*)
10002 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10003 if test "X$additional_libdir" != "X/usr/lib"; then
10004 haveit=
10005 if test "X$additional_libdir" = "X/usr/local/lib"; then
10006 if test -n "$GCC"; then
10007 case $host_os in
10008 linux*) haveit=yes;;
10009 esac
10010 fi
10011 fi
10012 if test -z "$haveit"; then
10013 haveit=
10014 for x in $LDFLAGS $LIBIPT; do
10015
10016 acl_save_prefix="$prefix"
10017 prefix="$acl_final_prefix"
10018 acl_save_exec_prefix="$exec_prefix"
10019 exec_prefix="$acl_final_exec_prefix"
10020 eval x=\"$x\"
10021 exec_prefix="$acl_save_exec_prefix"
10022 prefix="$acl_save_prefix"
10023
10024 if test "X$x" = "X-L$additional_libdir"; then
10025 haveit=yes
10026 break
10027 fi
10028 done
10029 if test -z "$haveit"; then
10030 if test -d "$additional_libdir"; then
10031 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10032 fi
10033 fi
10034 haveit=
10035 for x in $LDFLAGS $LTLIBIPT; do
10036
10037 acl_save_prefix="$prefix"
10038 prefix="$acl_final_prefix"
10039 acl_save_exec_prefix="$exec_prefix"
10040 exec_prefix="$acl_final_exec_prefix"
10041 eval x=\"$x\"
10042 exec_prefix="$acl_save_exec_prefix"
10043 prefix="$acl_save_prefix"
10044
10045 if test "X$x" = "X-L$additional_libdir"; then
10046 haveit=yes
10047 break
10048 fi
10049 done
10050 if test -z "$haveit"; then
10051 if test -d "$additional_libdir"; then
10052 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10053 fi
10054 fi
10055 fi
10056 fi
10057 ;;
10058 -R*)
10059 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10060 if test "$enable_rpath" != no; then
10061 haveit=
10062 for x in $rpathdirs; do
10063 if test "X$x" = "X$dir"; then
10064 haveit=yes
10065 break
10066 fi
10067 done
10068 if test -z "$haveit"; then
10069 rpathdirs="$rpathdirs $dir"
10070 fi
10071 haveit=
10072 for x in $ltrpathdirs; do
10073 if test "X$x" = "X$dir"; then
10074 haveit=yes
10075 break
10076 fi
10077 done
10078 if test -z "$haveit"; then
10079 ltrpathdirs="$ltrpathdirs $dir"
10080 fi
10081 fi
10082 ;;
10083 -l*)
10084 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10085 ;;
10086 *.la)
10087 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10088 ;;
10089 *)
10090 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10091 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10092 ;;
10093 esac
10094 done
10095 fi
10096 else
10097 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10098 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10099 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10100 else
10101 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
10102 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
10103 fi
10104 fi
10105 fi
10106 fi
10107 done
10108 done
10109 if test "X$rpathdirs" != "X"; then
10110 if test -n "$hardcode_libdir_separator"; then
10111 alldirs=
10112 for found_dir in $rpathdirs; do
10113 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10114 done
10115 acl_save_libdir="$libdir"
10116 libdir="$alldirs"
10117 eval flag=\"$hardcode_libdir_flag_spec\"
10118 libdir="$acl_save_libdir"
10119 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10120 else
10121 for found_dir in $rpathdirs; do
10122 acl_save_libdir="$libdir"
10123 libdir="$found_dir"
10124 eval flag=\"$hardcode_libdir_flag_spec\"
10125 libdir="$acl_save_libdir"
10126 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10127 done
10128 fi
10129 fi
10130 if test "X$ltrpathdirs" != "X"; then
10131 for found_dir in $ltrpathdirs; do
10132 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10133 done
10134 fi
10135
10136
10137 ac_save_CPPFLAGS="$CPPFLAGS"
10138
10139 for element in $INCIPT; do
10140 haveit=
10141 for x in $CPPFLAGS; do
10142
10143 acl_save_prefix="$prefix"
10144 prefix="$acl_final_prefix"
10145 acl_save_exec_prefix="$exec_prefix"
10146 exec_prefix="$acl_final_exec_prefix"
10147 eval x=\"$x\"
10148 exec_prefix="$acl_save_exec_prefix"
10149 prefix="$acl_save_prefix"
10150
10151 if test "X$x" = "X$element"; then
10152 haveit=yes
10153 break
10154 fi
10155 done
10156 if test -z "$haveit"; then
10157 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10158 fi
10159 done
10160
10161
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10163 $as_echo_n "checking for libipt... " >&6; }
10164 if ${ac_cv_libipt+:} false; then :
10165 $as_echo_n "(cached) " >&6
10166 else
10167
10168 ac_save_LIBS="$LIBS"
10169 LIBS="$LIBS $LIBIPT"
10170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10171 /* end confdefs.h. */
10172 #include "intel-pt.h"
10173 int
10174 main ()
10175 {
10176 pt_insn_alloc_decoder (0);
10177 ;
10178 return 0;
10179 }
10180 _ACEOF
10181 if ac_fn_c_try_link "$LINENO"; then :
10182 ac_cv_libipt=yes
10183 else
10184 ac_cv_libipt=no
10185 fi
10186 rm -f core conftest.err conftest.$ac_objext \
10187 conftest$ac_exeext conftest.$ac_ext
10188 LIBS="$ac_save_LIBS"
10189
10190 fi
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10192 $as_echo "$ac_cv_libipt" >&6; }
10193 if test "$ac_cv_libipt" = yes; then
10194 HAVE_LIBIPT=yes
10195
10196 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10197
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10199 $as_echo_n "checking how to link with libipt... " >&6; }
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10201 $as_echo "$LIBIPT" >&6; }
10202 else
10203 HAVE_LIBIPT=no
10204 CPPFLAGS="$ac_save_CPPFLAGS"
10205 LIBIPT=
10206 LTLIBIPT=
10207 fi
10208
10209
10210
10211
10212
10213
10214 if test "$HAVE_LIBIPT" != yes; then
10215 if test "$with_intel_pt" = yes; then
10216 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
10217 else
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10219 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10220 fi
10221 else
10222 save_LIBS=$LIBS
10223 LIBS="$LIBS $LIBIPT"
10224 for ac_func in pt_insn_event
10225 do :
10226 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
10227 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
10228 cat >>confdefs.h <<_ACEOF
10229 #define HAVE_PT_INSN_EVENT 1
10230 _ACEOF
10231
10232 fi
10233 done
10234
10235 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
10236 "
10237 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
10238
10239 cat >>confdefs.h <<_ACEOF
10240 #define HAVE_STRUCT_PT_INSN_ENABLED 1
10241 _ACEOF
10242
10243
10244 fi
10245 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
10246 "
10247 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
10248
10249 cat >>confdefs.h <<_ACEOF
10250 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
10251 _ACEOF
10252
10253
10254 fi
10255
10256 ac_fn_c_check_member "$LINENO" "struct pt_event" "variant.ptwrite" "ac_cv_member_struct_pt_event_variant_ptwrite" "#include <intel-pt.h>
10257 "
10258 if test "x$ac_cv_member_struct_pt_event_variant_ptwrite" = xyes; then :
10259
10260 cat >>confdefs.h <<_ACEOF
10261 #define HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE 1
10262 _ACEOF
10263
10264
10265 fi
10266
10267 LIBS=$save_LIBS
10268 fi
10269 fi
10270
10271 # Check if the compiler and runtime support printing long longs.
10272
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
10274 $as_echo_n "checking for long long support in printf... " >&6; }
10275 if ${gdb_cv_printf_has_long_long+:} false; then :
10276 $as_echo_n "(cached) " >&6
10277 else
10278 if test "$cross_compiling" = yes; then :
10279 gdb_cv_printf_has_long_long=no
10280 else
10281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10282 /* end confdefs.h. */
10283 $ac_includes_default
10284 int
10285 main ()
10286 {
10287 char buf[32];
10288 long long l = 0;
10289 l = (l << 16) + 0x0123;
10290 l = (l << 16) + 0x4567;
10291 l = (l << 16) + 0x89ab;
10292 l = (l << 16) + 0xcdef;
10293 sprintf (buf, "0x%016llx", l);
10294 return (strcmp ("0x0123456789abcdef", buf));
10295 ;
10296 return 0;
10297 }
10298 _ACEOF
10299 if ac_fn_c_try_run "$LINENO"; then :
10300 gdb_cv_printf_has_long_long=yes
10301 else
10302 gdb_cv_printf_has_long_long=no
10303 fi
10304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10305 conftest.$ac_objext conftest.beam conftest.$ac_ext
10306 fi
10307
10308 fi
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
10310 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
10311 if test "$gdb_cv_printf_has_long_long" = yes; then
10312
10313 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
10314
10315 fi
10316
10317
10318 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
10319
10320 for ac_header in sys/procfs.h
10321 do :
10322 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
10323 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
10324 cat >>confdefs.h <<_ACEOF
10325 #define HAVE_SYS_PROCFS_H 1
10326 _ACEOF
10327
10328 fi
10329
10330 done
10331
10332 if test "$ac_cv_header_sys_procfs_h" = yes; then
10333
10334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10335 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10336 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
10337 $as_echo_n "(cached) " >&6
10338 else
10339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10340 /* end confdefs.h. */
10341
10342 #define _SYSCALL32
10343 #include <sys/procfs.h>
10344 int
10345 main ()
10346 {
10347 gregset_t avar
10348 ;
10349 return 0;
10350 }
10351 _ACEOF
10352 if ac_fn_c_try_compile "$LINENO"; then :
10353 bfd_cv_have_sys_procfs_type_gregset_t=yes
10354 else
10355 bfd_cv_have_sys_procfs_type_gregset_t=no
10356
10357 fi
10358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10359 fi
10360
10361 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
10362
10363 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
10364
10365 fi
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10367 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
10368
10369
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10371 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10372 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
10373 $as_echo_n "(cached) " >&6
10374 else
10375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10376 /* end confdefs.h. */
10377
10378 #define _SYSCALL32
10379 #include <sys/procfs.h>
10380 int
10381 main ()
10382 {
10383 fpregset_t avar
10384 ;
10385 return 0;
10386 }
10387 _ACEOF
10388 if ac_fn_c_try_compile "$LINENO"; then :
10389 bfd_cv_have_sys_procfs_type_fpregset_t=yes
10390 else
10391 bfd_cv_have_sys_procfs_type_fpregset_t=no
10392
10393 fi
10394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10395 fi
10396
10397 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
10398
10399 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
10400
10401 fi
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10403 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
10404
10405
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10407 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10408 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
10409 $as_echo_n "(cached) " >&6
10410 else
10411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10412 /* end confdefs.h. */
10413
10414 #define _SYSCALL32
10415 #include <sys/procfs.h>
10416 int
10417 main ()
10418 {
10419 prgregset_t avar
10420 ;
10421 return 0;
10422 }
10423 _ACEOF
10424 if ac_fn_c_try_compile "$LINENO"; then :
10425 bfd_cv_have_sys_procfs_type_prgregset_t=yes
10426 else
10427 bfd_cv_have_sys_procfs_type_prgregset_t=no
10428
10429 fi
10430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10431 fi
10432
10433 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
10434
10435 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
10436
10437 fi
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10439 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
10440
10441
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10443 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10444 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
10445 $as_echo_n "(cached) " >&6
10446 else
10447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h. */
10449
10450 #define _SYSCALL32
10451 #include <sys/procfs.h>
10452 int
10453 main ()
10454 {
10455 prfpregset_t avar
10456 ;
10457 return 0;
10458 }
10459 _ACEOF
10460 if ac_fn_c_try_compile "$LINENO"; then :
10461 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
10462 else
10463 bfd_cv_have_sys_procfs_type_prfpregset_t=no
10464
10465 fi
10466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10467 fi
10468
10469 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
10470
10471 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
10472
10473 fi
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10475 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
10476
10477
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10479 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10480 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
10481 $as_echo_n "(cached) " >&6
10482 else
10483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10484 /* end confdefs.h. */
10485
10486 #define _SYSCALL32
10487 #include <sys/procfs.h>
10488 int
10489 main ()
10490 {
10491 prgregset32_t avar
10492 ;
10493 return 0;
10494 }
10495 _ACEOF
10496 if ac_fn_c_try_compile "$LINENO"; then :
10497 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
10498 else
10499 bfd_cv_have_sys_procfs_type_prgregset32_t=no
10500
10501 fi
10502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10503 fi
10504
10505 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
10506
10507 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
10508
10509 fi
10510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10511 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
10512
10513
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10515 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10516 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
10517 $as_echo_n "(cached) " >&6
10518 else
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520 /* end confdefs.h. */
10521
10522 #define _SYSCALL32
10523 #include <sys/procfs.h>
10524 int
10525 main ()
10526 {
10527 lwpid_t avar
10528 ;
10529 return 0;
10530 }
10531 _ACEOF
10532 if ac_fn_c_try_compile "$LINENO"; then :
10533 bfd_cv_have_sys_procfs_type_lwpid_t=yes
10534 else
10535 bfd_cv_have_sys_procfs_type_lwpid_t=no
10536
10537 fi
10538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10539 fi
10540
10541 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
10542
10543 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10544
10545 fi
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
10547 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
10548
10549
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
10551 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
10552 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
10553 $as_echo_n "(cached) " >&6
10554 else
10555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10556 /* end confdefs.h. */
10557
10558 #define _SYSCALL32
10559 #include <sys/procfs.h>
10560 int
10561 main ()
10562 {
10563 psaddr_t avar
10564 ;
10565 return 0;
10566 }
10567 _ACEOF
10568 if ac_fn_c_try_compile "$LINENO"; then :
10569 bfd_cv_have_sys_procfs_type_psaddr_t=yes
10570 else
10571 bfd_cv_have_sys_procfs_type_psaddr_t=no
10572
10573 fi
10574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10575 fi
10576
10577 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
10578
10579 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10580
10581 fi
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
10583 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
10584
10585
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
10587 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
10588 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
10589 $as_echo_n "(cached) " >&6
10590 else
10591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10592 /* end confdefs.h. */
10593
10594 #define _SYSCALL32
10595 #include <sys/procfs.h>
10596 int
10597 main ()
10598 {
10599 elf_fpregset_t avar
10600 ;
10601 return 0;
10602 }
10603 _ACEOF
10604 if ac_fn_c_try_compile "$LINENO"; then :
10605 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
10606 else
10607 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
10608
10609 fi
10610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10611 fi
10612
10613 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
10614
10615 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
10616
10617 fi
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
10619 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
10620
10621 fi
10622
10623 # Check for xxhash
10624
10625 # Check whether --with-xxhash was given.
10626 if test "${with_xxhash+set}" = set; then :
10627 withval=$with_xxhash;
10628 else
10629 with_xxhash=auto
10630 fi
10631
10632
10633 if test "x$with_xxhash" != "xno"; then
10634
10635
10636
10637
10638
10639
10640
10641
10642 use_additional=yes
10643
10644 acl_save_prefix="$prefix"
10645 prefix="$acl_final_prefix"
10646 acl_save_exec_prefix="$exec_prefix"
10647 exec_prefix="$acl_final_exec_prefix"
10648
10649 eval additional_includedir=\"$includedir\"
10650 eval additional_libdir=\"$libdir\"
10651
10652 exec_prefix="$acl_save_exec_prefix"
10653 prefix="$acl_save_prefix"
10654
10655
10656 # Check whether --with-libxxhash-prefix was given.
10657 if test "${with_libxxhash_prefix+set}" = set; then :
10658 withval=$with_libxxhash_prefix;
10659 if test "X$withval" = "Xno"; then
10660 use_additional=no
10661 else
10662 if test "X$withval" = "X"; then
10663
10664 acl_save_prefix="$prefix"
10665 prefix="$acl_final_prefix"
10666 acl_save_exec_prefix="$exec_prefix"
10667 exec_prefix="$acl_final_exec_prefix"
10668
10669 eval additional_includedir=\"$includedir\"
10670 eval additional_libdir=\"$libdir\"
10671
10672 exec_prefix="$acl_save_exec_prefix"
10673 prefix="$acl_save_prefix"
10674
10675 else
10676 additional_includedir="$withval/include"
10677 additional_libdir="$withval/lib"
10678 fi
10679 fi
10680
10681 fi
10682
10683
10684 # Check whether --with-libxxhash-type was given.
10685 if test "${with_libxxhash_type+set}" = set; then :
10686 withval=$with_libxxhash_type; with_libxxhash_type=$withval
10687 else
10688 with_libxxhash_type=auto
10689 fi
10690
10691 lib_type=`eval echo \$with_libxxhash_type`
10692
10693 LIBXXHASH=
10694 LTLIBXXHASH=
10695 INCXXHASH=
10696 rpathdirs=
10697 ltrpathdirs=
10698 names_already_handled=
10699 names_next_round='xxhash '
10700 while test -n "$names_next_round"; do
10701 names_this_round="$names_next_round"
10702 names_next_round=
10703 for name in $names_this_round; do
10704 already_handled=
10705 for n in $names_already_handled; do
10706 if test "$n" = "$name"; then
10707 already_handled=yes
10708 break
10709 fi
10710 done
10711 if test -z "$already_handled"; then
10712 names_already_handled="$names_already_handled $name"
10713 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10714 eval value=\"\$HAVE_LIB$uppername\"
10715 if test -n "$value"; then
10716 if test "$value" = yes; then
10717 eval value=\"\$LIB$uppername\"
10718 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
10719 eval value=\"\$LTLIB$uppername\"
10720 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
10721 else
10722 :
10723 fi
10724 else
10725 found_dir=
10726 found_la=
10727 found_so=
10728 found_a=
10729 if test $use_additional = yes; then
10730 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10731 found_dir="$additional_libdir"
10732 found_so="$additional_libdir/lib$name.$shlibext"
10733 if test -f "$additional_libdir/lib$name.la"; then
10734 found_la="$additional_libdir/lib$name.la"
10735 fi
10736 elif test x$lib_type != xshared; then
10737 if test -f "$additional_libdir/lib$name.$libext"; then
10738 found_dir="$additional_libdir"
10739 found_a="$additional_libdir/lib$name.$libext"
10740 if test -f "$additional_libdir/lib$name.la"; then
10741 found_la="$additional_libdir/lib$name.la"
10742 fi
10743 fi
10744 fi
10745 fi
10746 if test "X$found_dir" = "X"; then
10747 for x in $LDFLAGS $LTLIBXXHASH; do
10748
10749 acl_save_prefix="$prefix"
10750 prefix="$acl_final_prefix"
10751 acl_save_exec_prefix="$exec_prefix"
10752 exec_prefix="$acl_final_exec_prefix"
10753 eval x=\"$x\"
10754 exec_prefix="$acl_save_exec_prefix"
10755 prefix="$acl_save_prefix"
10756
10757 case "$x" in
10758 -L*)
10759 dir=`echo "X$x" | sed -e 's/^X-L//'`
10760 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10761 found_dir="$dir"
10762 found_so="$dir/lib$name.$shlibext"
10763 if test -f "$dir/lib$name.la"; then
10764 found_la="$dir/lib$name.la"
10765 fi
10766 elif test x$lib_type != xshared; then
10767 if test -f "$dir/lib$name.$libext"; then
10768 found_dir="$dir"
10769 found_a="$dir/lib$name.$libext"
10770 if test -f "$dir/lib$name.la"; then
10771 found_la="$dir/lib$name.la"
10772 fi
10773 fi
10774 fi
10775 ;;
10776 esac
10777 if test "X$found_dir" != "X"; then
10778 break
10779 fi
10780 done
10781 fi
10782 if test "X$found_dir" != "X"; then
10783 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
10784 if test "X$found_so" != "X"; then
10785 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10786 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10787 else
10788 haveit=
10789 for x in $ltrpathdirs; do
10790 if test "X$x" = "X$found_dir"; then
10791 haveit=yes
10792 break
10793 fi
10794 done
10795 if test -z "$haveit"; then
10796 ltrpathdirs="$ltrpathdirs $found_dir"
10797 fi
10798 if test "$hardcode_direct" = yes; then
10799 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10800 else
10801 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10802 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10803 haveit=
10804 for x in $rpathdirs; do
10805 if test "X$x" = "X$found_dir"; then
10806 haveit=yes
10807 break
10808 fi
10809 done
10810 if test -z "$haveit"; then
10811 rpathdirs="$rpathdirs $found_dir"
10812 fi
10813 else
10814 haveit=
10815 for x in $LDFLAGS $LIBXXHASH; do
10816
10817 acl_save_prefix="$prefix"
10818 prefix="$acl_final_prefix"
10819 acl_save_exec_prefix="$exec_prefix"
10820 exec_prefix="$acl_final_exec_prefix"
10821 eval x=\"$x\"
10822 exec_prefix="$acl_save_exec_prefix"
10823 prefix="$acl_save_prefix"
10824
10825 if test "X$x" = "X-L$found_dir"; then
10826 haveit=yes
10827 break
10828 fi
10829 done
10830 if test -z "$haveit"; then
10831 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
10832 fi
10833 if test "$hardcode_minus_L" != no; then
10834 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10835 else
10836 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10837 fi
10838 fi
10839 fi
10840 fi
10841 else
10842 if test "X$found_a" != "X"; then
10843 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
10844 else
10845 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
10846 fi
10847 fi
10848 additional_includedir=
10849 case "$found_dir" in
10850 */lib | */lib/)
10851 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10852 additional_includedir="$basedir/include"
10853 ;;
10854 esac
10855 if test "X$additional_includedir" != "X"; then
10856 if test "X$additional_includedir" != "X/usr/include"; then
10857 haveit=
10858 if test "X$additional_includedir" = "X/usr/local/include"; then
10859 if test -n "$GCC"; then
10860 case $host_os in
10861 linux*) haveit=yes;;
10862 esac
10863 fi
10864 fi
10865 if test -z "$haveit"; then
10866 for x in $CPPFLAGS $INCXXHASH; do
10867
10868 acl_save_prefix="$prefix"
10869 prefix="$acl_final_prefix"
10870 acl_save_exec_prefix="$exec_prefix"
10871 exec_prefix="$acl_final_exec_prefix"
10872 eval x=\"$x\"
10873 exec_prefix="$acl_save_exec_prefix"
10874 prefix="$acl_save_prefix"
10875
10876 if test "X$x" = "X-I$additional_includedir"; then
10877 haveit=yes
10878 break
10879 fi
10880 done
10881 if test -z "$haveit"; then
10882 if test -d "$additional_includedir"; then
10883 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
10884 fi
10885 fi
10886 fi
10887 fi
10888 fi
10889 if test -n "$found_la"; then
10890 save_libdir="$libdir"
10891 case "$found_la" in
10892 */* | *\\*) . "$found_la" ;;
10893 *) . "./$found_la" ;;
10894 esac
10895 libdir="$save_libdir"
10896 for dep in $dependency_libs; do
10897 case "$dep" in
10898 -L*)
10899 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10900 if test "X$additional_libdir" != "X/usr/lib"; then
10901 haveit=
10902 if test "X$additional_libdir" = "X/usr/local/lib"; then
10903 if test -n "$GCC"; then
10904 case $host_os in
10905 linux*) haveit=yes;;
10906 esac
10907 fi
10908 fi
10909 if test -z "$haveit"; then
10910 haveit=
10911 for x in $LDFLAGS $LIBXXHASH; do
10912
10913 acl_save_prefix="$prefix"
10914 prefix="$acl_final_prefix"
10915 acl_save_exec_prefix="$exec_prefix"
10916 exec_prefix="$acl_final_exec_prefix"
10917 eval x=\"$x\"
10918 exec_prefix="$acl_save_exec_prefix"
10919 prefix="$acl_save_prefix"
10920
10921 if test "X$x" = "X-L$additional_libdir"; then
10922 haveit=yes
10923 break
10924 fi
10925 done
10926 if test -z "$haveit"; then
10927 if test -d "$additional_libdir"; then
10928 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
10929 fi
10930 fi
10931 haveit=
10932 for x in $LDFLAGS $LTLIBXXHASH; do
10933
10934 acl_save_prefix="$prefix"
10935 prefix="$acl_final_prefix"
10936 acl_save_exec_prefix="$exec_prefix"
10937 exec_prefix="$acl_final_exec_prefix"
10938 eval x=\"$x\"
10939 exec_prefix="$acl_save_exec_prefix"
10940 prefix="$acl_save_prefix"
10941
10942 if test "X$x" = "X-L$additional_libdir"; then
10943 haveit=yes
10944 break
10945 fi
10946 done
10947 if test -z "$haveit"; then
10948 if test -d "$additional_libdir"; then
10949 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
10950 fi
10951 fi
10952 fi
10953 fi
10954 ;;
10955 -R*)
10956 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10957 if test "$enable_rpath" != no; then
10958 haveit=
10959 for x in $rpathdirs; do
10960 if test "X$x" = "X$dir"; then
10961 haveit=yes
10962 break
10963 fi
10964 done
10965 if test -z "$haveit"; then
10966 rpathdirs="$rpathdirs $dir"
10967 fi
10968 haveit=
10969 for x in $ltrpathdirs; do
10970 if test "X$x" = "X$dir"; then
10971 haveit=yes
10972 break
10973 fi
10974 done
10975 if test -z "$haveit"; then
10976 ltrpathdirs="$ltrpathdirs $dir"
10977 fi
10978 fi
10979 ;;
10980 -l*)
10981 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10982 ;;
10983 *.la)
10984 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10985 ;;
10986 *)
10987 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
10988 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
10989 ;;
10990 esac
10991 done
10992 fi
10993 else
10994 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10995 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10996 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
10997 else
10998 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
10999 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
11000 fi
11001 fi
11002 fi
11003 fi
11004 done
11005 done
11006 if test "X$rpathdirs" != "X"; then
11007 if test -n "$hardcode_libdir_separator"; then
11008 alldirs=
11009 for found_dir in $rpathdirs; do
11010 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11011 done
11012 acl_save_libdir="$libdir"
11013 libdir="$alldirs"
11014 eval flag=\"$hardcode_libdir_flag_spec\"
11015 libdir="$acl_save_libdir"
11016 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
11017 else
11018 for found_dir in $rpathdirs; do
11019 acl_save_libdir="$libdir"
11020 libdir="$found_dir"
11021 eval flag=\"$hardcode_libdir_flag_spec\"
11022 libdir="$acl_save_libdir"
11023 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
11024 done
11025 fi
11026 fi
11027 if test "X$ltrpathdirs" != "X"; then
11028 for found_dir in $ltrpathdirs; do
11029 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
11030 done
11031 fi
11032
11033
11034 ac_save_CPPFLAGS="$CPPFLAGS"
11035
11036 for element in $INCXXHASH; do
11037 haveit=
11038 for x in $CPPFLAGS; do
11039
11040 acl_save_prefix="$prefix"
11041 prefix="$acl_final_prefix"
11042 acl_save_exec_prefix="$exec_prefix"
11043 exec_prefix="$acl_final_exec_prefix"
11044 eval x=\"$x\"
11045 exec_prefix="$acl_save_exec_prefix"
11046 prefix="$acl_save_prefix"
11047
11048 if test "X$x" = "X$element"; then
11049 haveit=yes
11050 break
11051 fi
11052 done
11053 if test -z "$haveit"; then
11054 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11055 fi
11056 done
11057
11058
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
11060 $as_echo_n "checking for libxxhash... " >&6; }
11061 if ${ac_cv_libxxhash+:} false; then :
11062 $as_echo_n "(cached) " >&6
11063 else
11064
11065 ac_save_LIBS="$LIBS"
11066 LIBS="$LIBS $LIBXXHASH"
11067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11068 /* end confdefs.h. */
11069 #include <xxhash.h>
11070 int
11071 main ()
11072 {
11073 XXH32("foo", 3, 0);
11074
11075 ;
11076 return 0;
11077 }
11078 _ACEOF
11079 if ac_fn_c_try_link "$LINENO"; then :
11080 ac_cv_libxxhash=yes
11081 else
11082 ac_cv_libxxhash=no
11083 fi
11084 rm -f core conftest.err conftest.$ac_objext \
11085 conftest$ac_exeext conftest.$ac_ext
11086 LIBS="$ac_save_LIBS"
11087
11088 fi
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
11090 $as_echo "$ac_cv_libxxhash" >&6; }
11091 if test "$ac_cv_libxxhash" = yes; then
11092 HAVE_LIBXXHASH=yes
11093
11094 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
11095
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
11097 $as_echo_n "checking how to link with libxxhash... " >&6; }
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
11099 $as_echo "$LIBXXHASH" >&6; }
11100 else
11101 HAVE_LIBXXHASH=no
11102 CPPFLAGS="$ac_save_CPPFLAGS"
11103 LIBXXHASH=
11104 LTLIBXXHASH=
11105 fi
11106
11107
11108
11109
11110
11111
11112 if test "$HAVE_LIBXXHASH" != yes; then
11113 if test "$with_xxhash" = yes; then
11114 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
11115 fi
11116 fi
11117 if test "x$with_xxhash" = "xauto"; then
11118 with_xxhash="$HAVE_LIBXXHASH"
11119 fi
11120 fi
11121
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
11123 $as_echo_n "checking whether to use xxhash... " >&6; }
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
11125 $as_echo "$with_xxhash" >&6; }
11126
11127 # This is set by GDB_AC_COMMON.
11128
11129
11130
11131 # Check whether we will enable the inclusion of unit tests when
11132 # compiling GDB.
11133 #
11134 # The default value of this option changes depending whether we're on
11135 # development mode (in which case it's "true") or not (in which case
11136 # it's "false"). The $development variable is set by the GDB_AC_COMMON
11137 # macro, which must therefore be used before GDB_AC_SELFTEST.
11138
11139 if test "x$development" != xtrue && test "x$development" != xfalse; then :
11140 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
11141 fi
11142
11143 # Check whether --enable-unit-tests was given.
11144 if test "${enable_unit_tests+set}" = set; then :
11145 enableval=$enable_unit_tests; case "${enableval}" in
11146 yes) enable_unittests=true ;;
11147 no) enable_unittests=false ;;
11148 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
11149 esac
11150 else
11151 enable_unittests=$development
11152 fi
11153
11154
11155 if $enable_unittests; then
11156
11157 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
11158
11159
11160 fi
11161
11162
11163 case ${build_alias} in
11164 "") build_noncanonical=${build} ;;
11165 *) build_noncanonical=${build_alias} ;;
11166 esac
11167
11168 case ${host_alias} in
11169 "") host_noncanonical=${build_noncanonical} ;;
11170 *) host_noncanonical=${host_alias} ;;
11171 esac
11172
11173 case ${target_alias} in
11174 "") target_noncanonical=${host_noncanonical} ;;
11175 *) target_noncanonical=${target_alias} ;;
11176 esac
11177
11178
11179
11180
11181
11182
11183 # Dependency checking.
11184 rm -rf .tst 2>/dev/null
11185 mkdir .tst 2>/dev/null
11186 if test -d .tst; then
11187 am__leading_dot=.
11188 else
11189 am__leading_dot=_
11190 fi
11191 rmdir .tst 2>/dev/null
11192
11193 DEPDIR="${am__leading_dot}deps"
11194
11195 ac_config_commands="$ac_config_commands depdir"
11196
11197
11198
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
11200 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
11201 set x ${MAKE-make}
11202 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
11203 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
11204 $as_echo_n "(cached) " >&6
11205 else
11206 cat >conftest.make <<\_ACEOF
11207 SHELL = /bin/sh
11208 all:
11209 @echo '@@@%%%=$(MAKE)=@@@%%%'
11210 _ACEOF
11211 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
11212 case `${MAKE-make} -f conftest.make 2>/dev/null` in
11213 *@@@%%%=?*=@@@%%%*)
11214 eval ac_cv_prog_make_${ac_make}_set=yes;;
11215 *)
11216 eval ac_cv_prog_make_${ac_make}_set=no;;
11217 esac
11218 rm -f conftest.make
11219 fi
11220 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11222 $as_echo "yes" >&6; }
11223 SET_MAKE=
11224 else
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11226 $as_echo "no" >&6; }
11227 SET_MAKE="MAKE=${MAKE-make}"
11228 fi
11229
11230
11231 MKINSTALLDIRS=
11232 if test -n "$ac_aux_dir"; then
11233 case "$ac_aux_dir" in
11234 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
11235 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
11236 esac
11237 fi
11238 if test -z "$MKINSTALLDIRS"; then
11239 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
11240 fi
11241
11242
11243
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
11245 $as_echo_n "checking whether NLS is requested... " >&6; }
11246 # Check whether --enable-nls was given.
11247 if test "${enable_nls+set}" = set; then :
11248 enableval=$enable_nls; USE_NLS=$enableval
11249 else
11250 USE_NLS=yes
11251 fi
11252
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
11254 $as_echo "$USE_NLS" >&6; }
11255
11256
11257
11258
11259
11260
11261 # Prepare PATH_SEPARATOR.
11262 # The user is always right.
11263 if test "${PATH_SEPARATOR+set}" != set; then
11264 echo "#! /bin/sh" >conf$$.sh
11265 echo "exit 0" >>conf$$.sh
11266 chmod +x conf$$.sh
11267 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11268 PATH_SEPARATOR=';'
11269 else
11270 PATH_SEPARATOR=:
11271 fi
11272 rm -f conf$$.sh
11273 fi
11274
11275 # Find out how to test for executable files. Don't use a zero-byte file,
11276 # as systems may use methods other than mode bits to determine executability.
11277 cat >conf$$.file <<_ASEOF
11278 #! /bin/sh
11279 exit 0
11280 _ASEOF
11281 chmod +x conf$$.file
11282 if test -x conf$$.file >/dev/null 2>&1; then
11283 ac_executable_p="test -x"
11284 else
11285 ac_executable_p="test -f"
11286 fi
11287 rm -f conf$$.file
11288
11289 # Extract the first word of "msgfmt", so it can be a program name with args.
11290 set dummy msgfmt; ac_word=$2
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11292 $as_echo_n "checking for $ac_word... " >&6; }
11293 if ${ac_cv_path_MSGFMT+:} false; then :
11294 $as_echo_n "(cached) " >&6
11295 else
11296 case "$MSGFMT" in
11297 [\\/]* | ?:[\\/]*)
11298 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
11299 ;;
11300 *)
11301 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11302 for ac_dir in $PATH; do
11303 IFS="$ac_save_IFS"
11304 test -z "$ac_dir" && ac_dir=.
11305 for ac_exec_ext in '' $ac_executable_extensions; do
11306 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11307 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
11308 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11309 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
11310 break 2
11311 fi
11312 fi
11313 done
11314 done
11315 IFS="$ac_save_IFS"
11316 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
11317 ;;
11318 esac
11319 fi
11320 MSGFMT="$ac_cv_path_MSGFMT"
11321 if test "$MSGFMT" != ":"; then
11322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
11323 $as_echo "$MSGFMT" >&6; }
11324 else
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326 $as_echo "no" >&6; }
11327 fi
11328
11329 # Extract the first word of "gmsgfmt", so it can be a program name with args.
11330 set dummy gmsgfmt; ac_word=$2
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11332 $as_echo_n "checking for $ac_word... " >&6; }
11333 if ${ac_cv_path_GMSGFMT+:} false; then :
11334 $as_echo_n "(cached) " >&6
11335 else
11336 case $GMSGFMT in
11337 [\\/]* | ?:[\\/]*)
11338 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
11339 ;;
11340 *)
11341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342 for as_dir in $PATH
11343 do
11344 IFS=$as_save_IFS
11345 test -z "$as_dir" && as_dir=.
11346 for ac_exec_ext in '' $ac_executable_extensions; do
11347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
11349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350 break 2
11351 fi
11352 done
11353 done
11354 IFS=$as_save_IFS
11355
11356 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
11357 ;;
11358 esac
11359 fi
11360 GMSGFMT=$ac_cv_path_GMSGFMT
11361 if test -n "$GMSGFMT"; then
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
11363 $as_echo "$GMSGFMT" >&6; }
11364 else
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11366 $as_echo "no" >&6; }
11367 fi
11368
11369
11370
11371
11372 # Prepare PATH_SEPARATOR.
11373 # The user is always right.
11374 if test "${PATH_SEPARATOR+set}" != set; then
11375 echo "#! /bin/sh" >conf$$.sh
11376 echo "exit 0" >>conf$$.sh
11377 chmod +x conf$$.sh
11378 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11379 PATH_SEPARATOR=';'
11380 else
11381 PATH_SEPARATOR=:
11382 fi
11383 rm -f conf$$.sh
11384 fi
11385
11386 # Find out how to test for executable files. Don't use a zero-byte file,
11387 # as systems may use methods other than mode bits to determine executability.
11388 cat >conf$$.file <<_ASEOF
11389 #! /bin/sh
11390 exit 0
11391 _ASEOF
11392 chmod +x conf$$.file
11393 if test -x conf$$.file >/dev/null 2>&1; then
11394 ac_executable_p="test -x"
11395 else
11396 ac_executable_p="test -f"
11397 fi
11398 rm -f conf$$.file
11399
11400 # Extract the first word of "xgettext", so it can be a program name with args.
11401 set dummy xgettext; ac_word=$2
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11403 $as_echo_n "checking for $ac_word... " >&6; }
11404 if ${ac_cv_path_XGETTEXT+:} false; then :
11405 $as_echo_n "(cached) " >&6
11406 else
11407 case "$XGETTEXT" in
11408 [\\/]* | ?:[\\/]*)
11409 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
11410 ;;
11411 *)
11412 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11413 for ac_dir in $PATH; do
11414 IFS="$ac_save_IFS"
11415 test -z "$ac_dir" && ac_dir=.
11416 for ac_exec_ext in '' $ac_executable_extensions; do
11417 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11418 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11419 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11420 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
11421 break 2
11422 fi
11423 fi
11424 done
11425 done
11426 IFS="$ac_save_IFS"
11427 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
11428 ;;
11429 esac
11430 fi
11431 XGETTEXT="$ac_cv_path_XGETTEXT"
11432 if test "$XGETTEXT" != ":"; then
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
11434 $as_echo "$XGETTEXT" >&6; }
11435 else
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437 $as_echo "no" >&6; }
11438 fi
11439
11440 rm -f messages.po
11441
11442
11443 # Prepare PATH_SEPARATOR.
11444 # The user is always right.
11445 if test "${PATH_SEPARATOR+set}" != set; then
11446 echo "#! /bin/sh" >conf$$.sh
11447 echo "exit 0" >>conf$$.sh
11448 chmod +x conf$$.sh
11449 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11450 PATH_SEPARATOR=';'
11451 else
11452 PATH_SEPARATOR=:
11453 fi
11454 rm -f conf$$.sh
11455 fi
11456
11457 # Find out how to test for executable files. Don't use a zero-byte file,
11458 # as systems may use methods other than mode bits to determine executability.
11459 cat >conf$$.file <<_ASEOF
11460 #! /bin/sh
11461 exit 0
11462 _ASEOF
11463 chmod +x conf$$.file
11464 if test -x conf$$.file >/dev/null 2>&1; then
11465 ac_executable_p="test -x"
11466 else
11467 ac_executable_p="test -f"
11468 fi
11469 rm -f conf$$.file
11470
11471 # Extract the first word of "msgmerge", so it can be a program name with args.
11472 set dummy msgmerge; ac_word=$2
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11474 $as_echo_n "checking for $ac_word... " >&6; }
11475 if ${ac_cv_path_MSGMERGE+:} false; then :
11476 $as_echo_n "(cached) " >&6
11477 else
11478 case "$MSGMERGE" in
11479 [\\/]* | ?:[\\/]*)
11480 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
11481 ;;
11482 *)
11483 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11484 for ac_dir in $PATH; do
11485 IFS="$ac_save_IFS"
11486 test -z "$ac_dir" && ac_dir=.
11487 for ac_exec_ext in '' $ac_executable_extensions; do
11488 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11489 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
11490 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
11491 break 2
11492 fi
11493 fi
11494 done
11495 done
11496 IFS="$ac_save_IFS"
11497 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
11498 ;;
11499 esac
11500 fi
11501 MSGMERGE="$ac_cv_path_MSGMERGE"
11502 if test "$MSGMERGE" != ":"; then
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
11504 $as_echo "$MSGMERGE" >&6; }
11505 else
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507 $as_echo "no" >&6; }
11508 fi
11509
11510
11511 if test "$GMSGFMT" != ":"; then
11512 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
11513 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11514 : ;
11515 else
11516 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
11518 $as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
11519 GMSGFMT=":"
11520 fi
11521 fi
11522
11523 if test "$XGETTEXT" != ":"; then
11524 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11525 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11526 : ;
11527 else
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
11529 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
11530 XGETTEXT=":"
11531 fi
11532 rm -f messages.po
11533 fi
11534
11535 ac_config_commands="$ac_config_commands default-1"
11536
11537
11538
11539
11540
11541
11542
11543
11544 use_additional=yes
11545
11546 acl_save_prefix="$prefix"
11547 prefix="$acl_final_prefix"
11548 acl_save_exec_prefix="$exec_prefix"
11549 exec_prefix="$acl_final_exec_prefix"
11550
11551 eval additional_includedir=\"$includedir\"
11552 eval additional_libdir=\"$libdir\"
11553
11554 exec_prefix="$acl_save_exec_prefix"
11555 prefix="$acl_save_prefix"
11556
11557
11558 # Check whether --with-libiconv-prefix was given.
11559 if test "${with_libiconv_prefix+set}" = set; then :
11560 withval=$with_libiconv_prefix;
11561 if test "X$withval" = "Xno"; then
11562 use_additional=no
11563 else
11564 if test "X$withval" = "X"; then
11565
11566 acl_save_prefix="$prefix"
11567 prefix="$acl_final_prefix"
11568 acl_save_exec_prefix="$exec_prefix"
11569 exec_prefix="$acl_final_exec_prefix"
11570
11571 eval additional_includedir=\"$includedir\"
11572 eval additional_libdir=\"$libdir\"
11573
11574 exec_prefix="$acl_save_exec_prefix"
11575 prefix="$acl_save_prefix"
11576
11577 else
11578 additional_includedir="$withval/include"
11579 additional_libdir="$withval/lib"
11580 fi
11581 fi
11582
11583 fi
11584
11585
11586 # Check whether --with-libiconv-type was given.
11587 if test "${with_libiconv_type+set}" = set; then :
11588 withval=$with_libiconv_type; with_libiconv_type=$withval
11589 else
11590 with_libiconv_type=auto
11591 fi
11592
11593 lib_type=`eval echo \$with_libiconv_type`
11594
11595 LIBICONV=
11596 LTLIBICONV=
11597 INCICONV=
11598 rpathdirs=
11599 ltrpathdirs=
11600 names_already_handled=
11601 names_next_round='iconv '
11602 while test -n "$names_next_round"; do
11603 names_this_round="$names_next_round"
11604 names_next_round=
11605 for name in $names_this_round; do
11606 already_handled=
11607 for n in $names_already_handled; do
11608 if test "$n" = "$name"; then
11609 already_handled=yes
11610 break
11611 fi
11612 done
11613 if test -z "$already_handled"; then
11614 names_already_handled="$names_already_handled $name"
11615 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11616 eval value=\"\$HAVE_LIB$uppername\"
11617 if test -n "$value"; then
11618 if test "$value" = yes; then
11619 eval value=\"\$LIB$uppername\"
11620 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11621 eval value=\"\$LTLIB$uppername\"
11622 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11623 else
11624 :
11625 fi
11626 else
11627 found_dir=
11628 found_la=
11629 found_so=
11630 found_a=
11631 if test $use_additional = yes; then
11632 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11633 found_dir="$additional_libdir"
11634 found_so="$additional_libdir/lib$name.$shlibext"
11635 if test -f "$additional_libdir/lib$name.la"; then
11636 found_la="$additional_libdir/lib$name.la"
11637 fi
11638 elif test x$lib_type != xshared; then
11639 if test -f "$additional_libdir/lib$name.$libext"; then
11640 found_dir="$additional_libdir"
11641 found_a="$additional_libdir/lib$name.$libext"
11642 if test -f "$additional_libdir/lib$name.la"; then
11643 found_la="$additional_libdir/lib$name.la"
11644 fi
11645 fi
11646 fi
11647 fi
11648 if test "X$found_dir" = "X"; then
11649 for x in $LDFLAGS $LTLIBICONV; do
11650
11651 acl_save_prefix="$prefix"
11652 prefix="$acl_final_prefix"
11653 acl_save_exec_prefix="$exec_prefix"
11654 exec_prefix="$acl_final_exec_prefix"
11655 eval x=\"$x\"
11656 exec_prefix="$acl_save_exec_prefix"
11657 prefix="$acl_save_prefix"
11658
11659 case "$x" in
11660 -L*)
11661 dir=`echo "X$x" | sed -e 's/^X-L//'`
11662 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11663 found_dir="$dir"
11664 found_so="$dir/lib$name.$shlibext"
11665 if test -f "$dir/lib$name.la"; then
11666 found_la="$dir/lib$name.la"
11667 fi
11668 elif test x$lib_type != xshared; then
11669 if test -f "$dir/lib$name.$libext"; then
11670 found_dir="$dir"
11671 found_a="$dir/lib$name.$libext"
11672 if test -f "$dir/lib$name.la"; then
11673 found_la="$dir/lib$name.la"
11674 fi
11675 fi
11676 fi
11677 ;;
11678 esac
11679 if test "X$found_dir" != "X"; then
11680 break
11681 fi
11682 done
11683 fi
11684 if test "X$found_dir" != "X"; then
11685 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11686 if test "X$found_so" != "X"; then
11687 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11688 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11689 else
11690 haveit=
11691 for x in $ltrpathdirs; do
11692 if test "X$x" = "X$found_dir"; then
11693 haveit=yes
11694 break
11695 fi
11696 done
11697 if test -z "$haveit"; then
11698 ltrpathdirs="$ltrpathdirs $found_dir"
11699 fi
11700 if test "$hardcode_direct" = yes; then
11701 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11702 else
11703 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11704 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11705 haveit=
11706 for x in $rpathdirs; do
11707 if test "X$x" = "X$found_dir"; then
11708 haveit=yes
11709 break
11710 fi
11711 done
11712 if test -z "$haveit"; then
11713 rpathdirs="$rpathdirs $found_dir"
11714 fi
11715 else
11716 haveit=
11717 for x in $LDFLAGS $LIBICONV; do
11718
11719 acl_save_prefix="$prefix"
11720 prefix="$acl_final_prefix"
11721 acl_save_exec_prefix="$exec_prefix"
11722 exec_prefix="$acl_final_exec_prefix"
11723 eval x=\"$x\"
11724 exec_prefix="$acl_save_exec_prefix"
11725 prefix="$acl_save_prefix"
11726
11727 if test "X$x" = "X-L$found_dir"; then
11728 haveit=yes
11729 break
11730 fi
11731 done
11732 if test -z "$haveit"; then
11733 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11734 fi
11735 if test "$hardcode_minus_L" != no; then
11736 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11737 else
11738 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11739 fi
11740 fi
11741 fi
11742 fi
11743 else
11744 if test "X$found_a" != "X"; then
11745 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11746 else
11747 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11748 fi
11749 fi
11750 additional_includedir=
11751 case "$found_dir" in
11752 */lib | */lib/)
11753 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11754 additional_includedir="$basedir/include"
11755 ;;
11756 esac
11757 if test "X$additional_includedir" != "X"; then
11758 if test "X$additional_includedir" != "X/usr/include"; then
11759 haveit=
11760 if test "X$additional_includedir" = "X/usr/local/include"; then
11761 if test -n "$GCC"; then
11762 case $host_os in
11763 linux*) haveit=yes;;
11764 esac
11765 fi
11766 fi
11767 if test -z "$haveit"; then
11768 for x in $CPPFLAGS $INCICONV; do
11769
11770 acl_save_prefix="$prefix"
11771 prefix="$acl_final_prefix"
11772 acl_save_exec_prefix="$exec_prefix"
11773 exec_prefix="$acl_final_exec_prefix"
11774 eval x=\"$x\"
11775 exec_prefix="$acl_save_exec_prefix"
11776 prefix="$acl_save_prefix"
11777
11778 if test "X$x" = "X-I$additional_includedir"; then
11779 haveit=yes
11780 break
11781 fi
11782 done
11783 if test -z "$haveit"; then
11784 if test -d "$additional_includedir"; then
11785 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11786 fi
11787 fi
11788 fi
11789 fi
11790 fi
11791 if test -n "$found_la"; then
11792 save_libdir="$libdir"
11793 case "$found_la" in
11794 */* | *\\*) . "$found_la" ;;
11795 *) . "./$found_la" ;;
11796 esac
11797 libdir="$save_libdir"
11798 for dep in $dependency_libs; do
11799 case "$dep" in
11800 -L*)
11801 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11802 if test "X$additional_libdir" != "X/usr/lib"; then
11803 haveit=
11804 if test "X$additional_libdir" = "X/usr/local/lib"; then
11805 if test -n "$GCC"; then
11806 case $host_os in
11807 linux*) haveit=yes;;
11808 esac
11809 fi
11810 fi
11811 if test -z "$haveit"; then
11812 haveit=
11813 for x in $LDFLAGS $LIBICONV; do
11814
11815 acl_save_prefix="$prefix"
11816 prefix="$acl_final_prefix"
11817 acl_save_exec_prefix="$exec_prefix"
11818 exec_prefix="$acl_final_exec_prefix"
11819 eval x=\"$x\"
11820 exec_prefix="$acl_save_exec_prefix"
11821 prefix="$acl_save_prefix"
11822
11823 if test "X$x" = "X-L$additional_libdir"; then
11824 haveit=yes
11825 break
11826 fi
11827 done
11828 if test -z "$haveit"; then
11829 if test -d "$additional_libdir"; then
11830 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11831 fi
11832 fi
11833 haveit=
11834 for x in $LDFLAGS $LTLIBICONV; do
11835
11836 acl_save_prefix="$prefix"
11837 prefix="$acl_final_prefix"
11838 acl_save_exec_prefix="$exec_prefix"
11839 exec_prefix="$acl_final_exec_prefix"
11840 eval x=\"$x\"
11841 exec_prefix="$acl_save_exec_prefix"
11842 prefix="$acl_save_prefix"
11843
11844 if test "X$x" = "X-L$additional_libdir"; then
11845 haveit=yes
11846 break
11847 fi
11848 done
11849 if test -z "$haveit"; then
11850 if test -d "$additional_libdir"; then
11851 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11852 fi
11853 fi
11854 fi
11855 fi
11856 ;;
11857 -R*)
11858 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11859 if test "$enable_rpath" != no; then
11860 haveit=
11861 for x in $rpathdirs; do
11862 if test "X$x" = "X$dir"; then
11863 haveit=yes
11864 break
11865 fi
11866 done
11867 if test -z "$haveit"; then
11868 rpathdirs="$rpathdirs $dir"
11869 fi
11870 haveit=
11871 for x in $ltrpathdirs; do
11872 if test "X$x" = "X$dir"; then
11873 haveit=yes
11874 break
11875 fi
11876 done
11877 if test -z "$haveit"; then
11878 ltrpathdirs="$ltrpathdirs $dir"
11879 fi
11880 fi
11881 ;;
11882 -l*)
11883 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11884 ;;
11885 *.la)
11886 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11887 ;;
11888 *)
11889 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11890 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11891 ;;
11892 esac
11893 done
11894 fi
11895 else
11896 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
11897 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11898 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11899 else
11900 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
11901 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
11902 fi
11903 fi
11904 fi
11905 fi
11906 done
11907 done
11908 if test "X$rpathdirs" != "X"; then
11909 if test -n "$hardcode_libdir_separator"; then
11910 alldirs=
11911 for found_dir in $rpathdirs; do
11912 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11913 done
11914 acl_save_libdir="$libdir"
11915 libdir="$alldirs"
11916 eval flag=\"$hardcode_libdir_flag_spec\"
11917 libdir="$acl_save_libdir"
11918 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11919 else
11920 for found_dir in $rpathdirs; do
11921 acl_save_libdir="$libdir"
11922 libdir="$found_dir"
11923 eval flag=\"$hardcode_libdir_flag_spec\"
11924 libdir="$acl_save_libdir"
11925 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11926 done
11927 fi
11928 fi
11929 if test "X$ltrpathdirs" != "X"; then
11930 for found_dir in $ltrpathdirs; do
11931 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11932 done
11933 fi
11934
11935
11936
11937
11938
11939 if test -f ../gettext/uninstalled-config.sh; then
11940 relative_builddir='$(top_builddir)/../gettext'
11941 . ../gettext/uninstalled-config.sh
11942 else
11943 # The sister gettext directory doesn't exist and won't collect information on
11944 # using gettext for us. Call a bundled AM_GNU_GETTEXT.
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11969 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
11970 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
11971 $as_echo_n "(cached) " >&6
11972 else
11973 gt_save_LIBS="$LIBS"
11974 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976 /* end confdefs.h. */
11977 #include <CoreFoundation/CFPreferences.h>
11978 int
11979 main ()
11980 {
11981 CFPreferencesCopyAppValue(NULL, NULL)
11982 ;
11983 return 0;
11984 }
11985 _ACEOF
11986 if ac_fn_c_try_link "$LINENO"; then :
11987 gt_cv_func_CFPreferencesCopyAppValue=yes
11988 else
11989 gt_cv_func_CFPreferencesCopyAppValue=no
11990 fi
11991 rm -f core conftest.err conftest.$ac_objext \
11992 conftest$ac_exeext conftest.$ac_ext
11993 LIBS="$gt_save_LIBS"
11994 fi
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11996 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11997 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11998
11999 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
12000
12001 fi
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
12003 $as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
12004 if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
12005 $as_echo_n "(cached) " >&6
12006 else
12007 gt_save_LIBS="$LIBS"
12008 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010 /* end confdefs.h. */
12011 #include <CoreFoundation/CFLocale.h>
12012 int
12013 main ()
12014 {
12015 CFLocaleCopyPreferredLanguages();
12016 ;
12017 return 0;
12018 }
12019 _ACEOF
12020 if ac_fn_c_try_link "$LINENO"; then :
12021 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
12022 else
12023 gt_cv_func_CFLocaleCopyPreferredLanguages=no
12024 fi
12025 rm -f core conftest.err conftest.$ac_objext \
12026 conftest$ac_exeext conftest.$ac_ext
12027 LIBS="$gt_save_LIBS"
12028 fi
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
12030 $as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
12031 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12032
12033 $as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
12034
12035 fi
12036 INTL_MACOSX_LIBS=
12037 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
12038 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12039 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
12040 fi
12041
12042
12043
12044
12045
12046
12047 LIBINTL=
12048 LTLIBINTL=
12049 POSUB=
12050
12051 case " $gt_needs " in
12052 *" need-formatstring-macros "*) gt_api_version=3 ;;
12053 *" need-ngettext "*) gt_api_version=2 ;;
12054 *) gt_api_version=1 ;;
12055 esac
12056 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
12057 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
12058
12059 if test "$USE_NLS" = "yes"; then
12060 gt_use_preinstalled_gnugettext=no
12061
12062
12063 if test $gt_api_version -ge 3; then
12064 gt_revision_test_code='
12065 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12066 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
12067 #endif
12068 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
12069 '
12070 else
12071 gt_revision_test_code=
12072 fi
12073 if test $gt_api_version -ge 2; then
12074 gt_expression_test_code=' + * ngettext ("", "", 0)'
12075 else
12076 gt_expression_test_code=
12077 fi
12078
12079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
12080 $as_echo_n "checking for GNU gettext in libc... " >&6; }
12081 if eval \${$gt_func_gnugettext_libc+:} false; then :
12082 $as_echo_n "(cached) " >&6
12083 else
12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12085 /* end confdefs.h. */
12086
12087 #include <libintl.h>
12088 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12089 extern int _nl_msg_cat_cntr;
12090 extern int *_nl_domain_bindings;
12091 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
12092 #else
12093 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12094 #endif
12095 $gt_revision_test_code
12096
12097 int
12098 main ()
12099 {
12100
12101 bindtextdomain ("", "");
12102 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12103
12104 ;
12105 return 0;
12106 }
12107 _ACEOF
12108 if ac_fn_c_try_link "$LINENO"; then :
12109 eval "$gt_func_gnugettext_libc=yes"
12110 else
12111 eval "$gt_func_gnugettext_libc=no"
12112 fi
12113 rm -f core conftest.err conftest.$ac_objext \
12114 conftest$ac_exeext conftest.$ac_ext
12115 fi
12116 eval ac_res=\$$gt_func_gnugettext_libc
12117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12118 $as_echo "$ac_res" >&6; }
12119
12120 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
12121
12122
12123
12124
12125
12126 am_save_CPPFLAGS="$CPPFLAGS"
12127
12128 for element in $INCICONV; do
12129 haveit=
12130 for x in $CPPFLAGS; do
12131
12132 acl_save_prefix="$prefix"
12133 prefix="$acl_final_prefix"
12134 acl_save_exec_prefix="$exec_prefix"
12135 exec_prefix="$acl_final_exec_prefix"
12136 eval x=\"$x\"
12137 exec_prefix="$acl_save_exec_prefix"
12138 prefix="$acl_save_prefix"
12139
12140 if test "X$x" = "X$element"; then
12141 haveit=yes
12142 break
12143 fi
12144 done
12145 if test -z "$haveit"; then
12146 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12147 fi
12148 done
12149
12150
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12152 $as_echo_n "checking for iconv... " >&6; }
12153 if ${am_cv_func_iconv+:} false; then :
12154 $as_echo_n "(cached) " >&6
12155 else
12156
12157 am_cv_func_iconv="no, consider installing GNU libiconv"
12158 am_cv_lib_iconv=no
12159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12160 /* end confdefs.h. */
12161
12162 #include <stdlib.h>
12163 #include <iconv.h>
12164
12165 int
12166 main ()
12167 {
12168 iconv_t cd = iconv_open("","");
12169 iconv(cd,NULL,NULL,NULL,NULL);
12170 iconv_close(cd);
12171 ;
12172 return 0;
12173 }
12174 _ACEOF
12175 if ac_fn_c_try_link "$LINENO"; then :
12176 am_cv_func_iconv=yes
12177 fi
12178 rm -f core conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext conftest.$ac_ext
12180 if test "$am_cv_func_iconv" != yes; then
12181 am_save_LIBS="$LIBS"
12182 LIBS="$LIBS $LIBICONV"
12183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12184 /* end confdefs.h. */
12185
12186 #include <stdlib.h>
12187 #include <iconv.h>
12188
12189 int
12190 main ()
12191 {
12192 iconv_t cd = iconv_open("","");
12193 iconv(cd,NULL,NULL,NULL,NULL);
12194 iconv_close(cd);
12195 ;
12196 return 0;
12197 }
12198 _ACEOF
12199 if ac_fn_c_try_link "$LINENO"; then :
12200 am_cv_lib_iconv=yes
12201 am_cv_func_iconv=yes
12202 fi
12203 rm -f core conftest.err conftest.$ac_objext \
12204 conftest$ac_exeext conftest.$ac_ext
12205 LIBS="$am_save_LIBS"
12206 fi
12207
12208 fi
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12210 $as_echo "$am_cv_func_iconv" >&6; }
12211 if test "$am_cv_func_iconv" = yes; then
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12213 $as_echo_n "checking for working iconv... " >&6; }
12214 if ${am_cv_func_iconv_works+:} false; then :
12215 $as_echo_n "(cached) " >&6
12216 else
12217
12218 am_save_LIBS="$LIBS"
12219 if test $am_cv_lib_iconv = yes; then
12220 LIBS="$LIBS $LIBICONV"
12221 fi
12222 am_cv_func_iconv_works=no
12223 for ac_iconv_const in '' 'const'; do
12224 if test "$cross_compiling" = yes; then :
12225 case "$host_os" in
12226 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12227 *) am_cv_func_iconv_works="guessing yes" ;;
12228 esac
12229 else
12230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12231 /* end confdefs.h. */
12232
12233 #include <iconv.h>
12234 #include <string.h>
12235
12236 #ifndef ICONV_CONST
12237 # define ICONV_CONST $ac_iconv_const
12238 #endif
12239
12240 int
12241 main ()
12242 {
12243 int result = 0;
12244 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
12245 successful returns. This is even documented in
12246 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
12247 {
12248 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12249 if (cd_utf8_to_88591 != (iconv_t)(-1))
12250 {
12251 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12252 char buf[10];
12253 ICONV_CONST char *inptr = input;
12254 size_t inbytesleft = strlen (input);
12255 char *outptr = buf;
12256 size_t outbytesleft = sizeof (buf);
12257 size_t res = iconv (cd_utf8_to_88591,
12258 &inptr, &inbytesleft,
12259 &outptr, &outbytesleft);
12260 if (res == 0)
12261 result |= 1;
12262 iconv_close (cd_utf8_to_88591);
12263 }
12264 }
12265 /* Test against Solaris 10 bug: Failures are not distinguishable from
12266 successful returns. */
12267 {
12268 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12269 if (cd_ascii_to_88591 != (iconv_t)(-1))
12270 {
12271 static ICONV_CONST char input[] = "\263";
12272 char buf[10];
12273 ICONV_CONST char *inptr = input;
12274 size_t inbytesleft = strlen (input);
12275 char *outptr = buf;
12276 size_t outbytesleft = sizeof (buf);
12277 size_t res = iconv (cd_ascii_to_88591,
12278 &inptr, &inbytesleft,
12279 &outptr, &outbytesleft);
12280 if (res == 0)
12281 result |= 2;
12282 iconv_close (cd_ascii_to_88591);
12283 }
12284 }
12285 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
12286 {
12287 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12288 if (cd_88591_to_utf8 != (iconv_t)(-1))
12289 {
12290 static ICONV_CONST char input[] = "\304";
12291 static char buf[2] = { (char)0xDE, (char)0xAD };
12292 ICONV_CONST char *inptr = input;
12293 size_t inbytesleft = 1;
12294 char *outptr = buf;
12295 size_t outbytesleft = 1;
12296 size_t res = iconv (cd_88591_to_utf8,
12297 &inptr, &inbytesleft,
12298 &outptr, &outbytesleft);
12299 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12300 result |= 4;
12301 iconv_close (cd_88591_to_utf8);
12302 }
12303 }
12304 #if 0 /* This bug could be worked around by the caller. */
12305 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
12306 {
12307 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12308 if (cd_88591_to_utf8 != (iconv_t)(-1))
12309 {
12310 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12311 char buf[50];
12312 ICONV_CONST char *inptr = input;
12313 size_t inbytesleft = strlen (input);
12314 char *outptr = buf;
12315 size_t outbytesleft = sizeof (buf);
12316 size_t res = iconv (cd_88591_to_utf8,
12317 &inptr, &inbytesleft,
12318 &outptr, &outbytesleft);
12319 if ((int)res > 0)
12320 result |= 8;
12321 iconv_close (cd_88591_to_utf8);
12322 }
12323 }
12324 #endif
12325 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12326 provided. */
12327 {
12328 /* Try standardized names. */
12329 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12330 /* Try IRIX, OSF/1 names. */
12331 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12332 /* Try AIX names. */
12333 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12334 /* Try HP-UX names. */
12335 iconv_t cd4 = iconv_open ("utf8", "eucJP");
12336 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12337 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12338 result |= 16;
12339 if (cd1 != (iconv_t)(-1))
12340 iconv_close (cd1);
12341 if (cd2 != (iconv_t)(-1))
12342 iconv_close (cd2);
12343 if (cd3 != (iconv_t)(-1))
12344 iconv_close (cd3);
12345 if (cd4 != (iconv_t)(-1))
12346 iconv_close (cd4);
12347 }
12348 return result;
12349
12350 ;
12351 return 0;
12352 }
12353 _ACEOF
12354 if ac_fn_c_try_run "$LINENO"; then :
12355 am_cv_func_iconv_works=yes
12356 fi
12357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12358 conftest.$ac_objext conftest.beam conftest.$ac_ext
12359 fi
12360
12361 test "$am_cv_func_iconv_works" = no || break
12362 done
12363 LIBS="$am_save_LIBS"
12364
12365 fi
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12367 $as_echo "$am_cv_func_iconv_works" >&6; }
12368 case "$am_cv_func_iconv_works" in
12369 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12370 *) am_func_iconv=yes ;;
12371 esac
12372 else
12373 am_func_iconv=no am_cv_lib_iconv=no
12374 fi
12375 if test "$am_func_iconv" = yes; then
12376
12377 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
12378
12379 fi
12380 if test "$am_cv_lib_iconv" = yes; then
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12382 $as_echo_n "checking how to link with libiconv... " >&6; }
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12384 $as_echo "$LIBICONV" >&6; }
12385 else
12386 CPPFLAGS="$am_save_CPPFLAGS"
12387 LIBICONV=
12388 LTLIBICONV=
12389 fi
12390
12391
12392
12393
12394
12395
12396 use_additional=yes
12397
12398 acl_save_prefix="$prefix"
12399 prefix="$acl_final_prefix"
12400 acl_save_exec_prefix="$exec_prefix"
12401 exec_prefix="$acl_final_exec_prefix"
12402
12403 eval additional_includedir=\"$includedir\"
12404 eval additional_libdir=\"$libdir\"
12405
12406 exec_prefix="$acl_save_exec_prefix"
12407 prefix="$acl_save_prefix"
12408
12409
12410 # Check whether --with-libintl-prefix was given.
12411 if test "${with_libintl_prefix+set}" = set; then :
12412 withval=$with_libintl_prefix;
12413 if test "X$withval" = "Xno"; then
12414 use_additional=no
12415 else
12416 if test "X$withval" = "X"; then
12417
12418 acl_save_prefix="$prefix"
12419 prefix="$acl_final_prefix"
12420 acl_save_exec_prefix="$exec_prefix"
12421 exec_prefix="$acl_final_exec_prefix"
12422
12423 eval additional_includedir=\"$includedir\"
12424 eval additional_libdir=\"$libdir\"
12425
12426 exec_prefix="$acl_save_exec_prefix"
12427 prefix="$acl_save_prefix"
12428
12429 else
12430 additional_includedir="$withval/include"
12431 additional_libdir="$withval/lib"
12432 fi
12433 fi
12434
12435 fi
12436
12437
12438 # Check whether --with-libintl-type was given.
12439 if test "${with_libintl_type+set}" = set; then :
12440 withval=$with_libintl_type; with_libintl_type=$withval
12441 else
12442 with_libintl_type=auto
12443 fi
12444
12445 lib_type=`eval echo \$with_libintl_type`
12446
12447 LIBINTL=
12448 LTLIBINTL=
12449 INCINTL=
12450 rpathdirs=
12451 ltrpathdirs=
12452 names_already_handled=
12453 names_next_round='intl '
12454 while test -n "$names_next_round"; do
12455 names_this_round="$names_next_round"
12456 names_next_round=
12457 for name in $names_this_round; do
12458 already_handled=
12459 for n in $names_already_handled; do
12460 if test "$n" = "$name"; then
12461 already_handled=yes
12462 break
12463 fi
12464 done
12465 if test -z "$already_handled"; then
12466 names_already_handled="$names_already_handled $name"
12467 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12468 eval value=\"\$HAVE_LIB$uppername\"
12469 if test -n "$value"; then
12470 if test "$value" = yes; then
12471 eval value=\"\$LIB$uppername\"
12472 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12473 eval value=\"\$LTLIB$uppername\"
12474 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12475 else
12476 :
12477 fi
12478 else
12479 found_dir=
12480 found_la=
12481 found_so=
12482 found_a=
12483 if test $use_additional = yes; then
12484 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12485 found_dir="$additional_libdir"
12486 found_so="$additional_libdir/lib$name.$shlibext"
12487 if test -f "$additional_libdir/lib$name.la"; then
12488 found_la="$additional_libdir/lib$name.la"
12489 fi
12490 elif test x$lib_type != xshared; then
12491 if test -f "$additional_libdir/lib$name.$libext"; then
12492 found_dir="$additional_libdir"
12493 found_a="$additional_libdir/lib$name.$libext"
12494 if test -f "$additional_libdir/lib$name.la"; then
12495 found_la="$additional_libdir/lib$name.la"
12496 fi
12497 fi
12498 fi
12499 fi
12500 if test "X$found_dir" = "X"; then
12501 for x in $LDFLAGS $LTLIBINTL; do
12502
12503 acl_save_prefix="$prefix"
12504 prefix="$acl_final_prefix"
12505 acl_save_exec_prefix="$exec_prefix"
12506 exec_prefix="$acl_final_exec_prefix"
12507 eval x=\"$x\"
12508 exec_prefix="$acl_save_exec_prefix"
12509 prefix="$acl_save_prefix"
12510
12511 case "$x" in
12512 -L*)
12513 dir=`echo "X$x" | sed -e 's/^X-L//'`
12514 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12515 found_dir="$dir"
12516 found_so="$dir/lib$name.$shlibext"
12517 if test -f "$dir/lib$name.la"; then
12518 found_la="$dir/lib$name.la"
12519 fi
12520 elif test x$lib_type != xshared; then
12521 if test -f "$dir/lib$name.$libext"; then
12522 found_dir="$dir"
12523 found_a="$dir/lib$name.$libext"
12524 if test -f "$dir/lib$name.la"; then
12525 found_la="$dir/lib$name.la"
12526 fi
12527 fi
12528 fi
12529 ;;
12530 esac
12531 if test "X$found_dir" != "X"; then
12532 break
12533 fi
12534 done
12535 fi
12536 if test "X$found_dir" != "X"; then
12537 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12538 if test "X$found_so" != "X"; then
12539 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12540 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12541 else
12542 haveit=
12543 for x in $ltrpathdirs; do
12544 if test "X$x" = "X$found_dir"; then
12545 haveit=yes
12546 break
12547 fi
12548 done
12549 if test -z "$haveit"; then
12550 ltrpathdirs="$ltrpathdirs $found_dir"
12551 fi
12552 if test "$hardcode_direct" = yes; then
12553 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12554 else
12555 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12556 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12557 haveit=
12558 for x in $rpathdirs; do
12559 if test "X$x" = "X$found_dir"; then
12560 haveit=yes
12561 break
12562 fi
12563 done
12564 if test -z "$haveit"; then
12565 rpathdirs="$rpathdirs $found_dir"
12566 fi
12567 else
12568 haveit=
12569 for x in $LDFLAGS $LIBINTL; do
12570
12571 acl_save_prefix="$prefix"
12572 prefix="$acl_final_prefix"
12573 acl_save_exec_prefix="$exec_prefix"
12574 exec_prefix="$acl_final_exec_prefix"
12575 eval x=\"$x\"
12576 exec_prefix="$acl_save_exec_prefix"
12577 prefix="$acl_save_prefix"
12578
12579 if test "X$x" = "X-L$found_dir"; then
12580 haveit=yes
12581 break
12582 fi
12583 done
12584 if test -z "$haveit"; then
12585 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12586 fi
12587 if test "$hardcode_minus_L" != no; then
12588 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12589 else
12590 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12591 fi
12592 fi
12593 fi
12594 fi
12595 else
12596 if test "X$found_a" != "X"; then
12597 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12598 else
12599 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12600 fi
12601 fi
12602 additional_includedir=
12603 case "$found_dir" in
12604 */lib | */lib/)
12605 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12606 additional_includedir="$basedir/include"
12607 ;;
12608 esac
12609 if test "X$additional_includedir" != "X"; then
12610 if test "X$additional_includedir" != "X/usr/include"; then
12611 haveit=
12612 if test "X$additional_includedir" = "X/usr/local/include"; then
12613 if test -n "$GCC"; then
12614 case $host_os in
12615 linux*) haveit=yes;;
12616 esac
12617 fi
12618 fi
12619 if test -z "$haveit"; then
12620 for x in $CPPFLAGS $INCINTL; do
12621
12622 acl_save_prefix="$prefix"
12623 prefix="$acl_final_prefix"
12624 acl_save_exec_prefix="$exec_prefix"
12625 exec_prefix="$acl_final_exec_prefix"
12626 eval x=\"$x\"
12627 exec_prefix="$acl_save_exec_prefix"
12628 prefix="$acl_save_prefix"
12629
12630 if test "X$x" = "X-I$additional_includedir"; then
12631 haveit=yes
12632 break
12633 fi
12634 done
12635 if test -z "$haveit"; then
12636 if test -d "$additional_includedir"; then
12637 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
12638 fi
12639 fi
12640 fi
12641 fi
12642 fi
12643 if test -n "$found_la"; then
12644 save_libdir="$libdir"
12645 case "$found_la" in
12646 */* | *\\*) . "$found_la" ;;
12647 *) . "./$found_la" ;;
12648 esac
12649 libdir="$save_libdir"
12650 for dep in $dependency_libs; do
12651 case "$dep" in
12652 -L*)
12653 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12654 if test "X$additional_libdir" != "X/usr/lib"; then
12655 haveit=
12656 if test "X$additional_libdir" = "X/usr/local/lib"; then
12657 if test -n "$GCC"; then
12658 case $host_os in
12659 linux*) haveit=yes;;
12660 esac
12661 fi
12662 fi
12663 if test -z "$haveit"; then
12664 haveit=
12665 for x in $LDFLAGS $LIBINTL; do
12666
12667 acl_save_prefix="$prefix"
12668 prefix="$acl_final_prefix"
12669 acl_save_exec_prefix="$exec_prefix"
12670 exec_prefix="$acl_final_exec_prefix"
12671 eval x=\"$x\"
12672 exec_prefix="$acl_save_exec_prefix"
12673 prefix="$acl_save_prefix"
12674
12675 if test "X$x" = "X-L$additional_libdir"; then
12676 haveit=yes
12677 break
12678 fi
12679 done
12680 if test -z "$haveit"; then
12681 if test -d "$additional_libdir"; then
12682 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
12683 fi
12684 fi
12685 haveit=
12686 for x in $LDFLAGS $LTLIBINTL; do
12687
12688 acl_save_prefix="$prefix"
12689 prefix="$acl_final_prefix"
12690 acl_save_exec_prefix="$exec_prefix"
12691 exec_prefix="$acl_final_exec_prefix"
12692 eval x=\"$x\"
12693 exec_prefix="$acl_save_exec_prefix"
12694 prefix="$acl_save_prefix"
12695
12696 if test "X$x" = "X-L$additional_libdir"; then
12697 haveit=yes
12698 break
12699 fi
12700 done
12701 if test -z "$haveit"; then
12702 if test -d "$additional_libdir"; then
12703 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
12704 fi
12705 fi
12706 fi
12707 fi
12708 ;;
12709 -R*)
12710 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12711 if test "$enable_rpath" != no; then
12712 haveit=
12713 for x in $rpathdirs; do
12714 if test "X$x" = "X$dir"; then
12715 haveit=yes
12716 break
12717 fi
12718 done
12719 if test -z "$haveit"; then
12720 rpathdirs="$rpathdirs $dir"
12721 fi
12722 haveit=
12723 for x in $ltrpathdirs; do
12724 if test "X$x" = "X$dir"; then
12725 haveit=yes
12726 break
12727 fi
12728 done
12729 if test -z "$haveit"; then
12730 ltrpathdirs="$ltrpathdirs $dir"
12731 fi
12732 fi
12733 ;;
12734 -l*)
12735 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12736 ;;
12737 *.la)
12738 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12739 ;;
12740 *)
12741 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
12742 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
12743 ;;
12744 esac
12745 done
12746 fi
12747 else
12748 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
12749 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12750 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
12751 else
12752 LIBINTL="${LIBINTL}${LIBINTL:+ }-l:lib$name.$libext"
12753 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l:lib$name.$libext"
12754 fi
12755 fi
12756 fi
12757 fi
12758 done
12759 done
12760 if test "X$rpathdirs" != "X"; then
12761 if test -n "$hardcode_libdir_separator"; then
12762 alldirs=
12763 for found_dir in $rpathdirs; do
12764 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
12765 done
12766 acl_save_libdir="$libdir"
12767 libdir="$alldirs"
12768 eval flag=\"$hardcode_libdir_flag_spec\"
12769 libdir="$acl_save_libdir"
12770 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12771 else
12772 for found_dir in $rpathdirs; do
12773 acl_save_libdir="$libdir"
12774 libdir="$found_dir"
12775 eval flag=\"$hardcode_libdir_flag_spec\"
12776 libdir="$acl_save_libdir"
12777 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12778 done
12779 fi
12780 fi
12781 if test "X$ltrpathdirs" != "X"; then
12782 for found_dir in $ltrpathdirs; do
12783 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12784 done
12785 fi
12786
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12788 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
12789 if eval \${$gt_func_gnugettext_libintl+:} false; then :
12790 $as_echo_n "(cached) " >&6
12791 else
12792 gt_save_CPPFLAGS="$CPPFLAGS"
12793 CPPFLAGS="$CPPFLAGS $INCINTL"
12794 gt_save_LIBS="$LIBS"
12795 LIBS="$LIBS $LIBINTL"
12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797 /* end confdefs.h. */
12798
12799 #include <libintl.h>
12800 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12801 extern int _nl_msg_cat_cntr;
12802 extern
12803 #ifdef __cplusplus
12804 "C"
12805 #endif
12806 const char *_nl_expand_alias (const char *);
12807 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12808 #else
12809 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12810 #endif
12811 $gt_revision_test_code
12812
12813 int
12814 main ()
12815 {
12816
12817 bindtextdomain ("", "");
12818 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12819
12820 ;
12821 return 0;
12822 }
12823 _ACEOF
12824 if ac_fn_c_try_link "$LINENO"; then :
12825 eval "$gt_func_gnugettext_libintl=yes"
12826 else
12827 eval "$gt_func_gnugettext_libintl=no"
12828 fi
12829 rm -f core conftest.err conftest.$ac_objext \
12830 conftest$ac_exeext conftest.$ac_ext
12831 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
12832 LIBS="$LIBS $LIBICONV"
12833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12834 /* end confdefs.h. */
12835
12836 #include <libintl.h>
12837 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12838 extern int _nl_msg_cat_cntr;
12839 extern
12840 #ifdef __cplusplus
12841 "C"
12842 #endif
12843 const char *_nl_expand_alias (const char *);
12844 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12845 #else
12846 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12847 #endif
12848 $gt_revision_test_code
12849
12850 int
12851 main ()
12852 {
12853
12854 bindtextdomain ("", "");
12855 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12856
12857 ;
12858 return 0;
12859 }
12860 _ACEOF
12861 if ac_fn_c_try_link "$LINENO"; then :
12862 LIBINTL="$LIBINTL $LIBICONV"
12863 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12864 eval "$gt_func_gnugettext_libintl=yes"
12865
12866 fi
12867 rm -f core conftest.err conftest.$ac_objext \
12868 conftest$ac_exeext conftest.$ac_ext
12869 fi
12870 CPPFLAGS="$gt_save_CPPFLAGS"
12871 LIBS="$gt_save_LIBS"
12872 fi
12873 eval ac_res=\$$gt_func_gnugettext_libintl
12874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12875 $as_echo "$ac_res" >&6; }
12876 fi
12877
12878 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12879 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
12880 && test "$PACKAGE" != gettext-runtime \
12881 && test "$PACKAGE" != gettext-tools; }; then
12882 gt_use_preinstalled_gnugettext=yes
12883 else
12884 LIBINTL=
12885 LTLIBINTL=
12886 INCINTL=
12887 fi
12888
12889
12890
12891 if test -n "$INTL_MACOSX_LIBS"; then
12892 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12893 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12894 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12895 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12896 fi
12897 fi
12898
12899 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12900 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12901
12902 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
12903
12904 else
12905 USE_NLS=no
12906 fi
12907 fi
12908
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12910 $as_echo_n "checking whether to use NLS... " >&6; }
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12912 $as_echo "$USE_NLS" >&6; }
12913 if test "$USE_NLS" = "yes"; then
12914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12915 $as_echo_n "checking where the gettext function comes from... " >&6; }
12916 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12917 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12918 gt_source="external libintl"
12919 else
12920 gt_source="libc"
12921 fi
12922 else
12923 gt_source="included intl directory"
12924 fi
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12926 $as_echo "$gt_source" >&6; }
12927 fi
12928
12929 if test "$USE_NLS" = "yes"; then
12930
12931 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12932 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12934 $as_echo_n "checking how to link with libintl... " >&6; }
12935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12936 $as_echo "$LIBINTL" >&6; }
12937
12938 for element in $INCINTL; do
12939 haveit=
12940 for x in $CPPFLAGS; do
12941
12942 acl_save_prefix="$prefix"
12943 prefix="$acl_final_prefix"
12944 acl_save_exec_prefix="$exec_prefix"
12945 exec_prefix="$acl_final_exec_prefix"
12946 eval x=\"$x\"
12947 exec_prefix="$acl_save_exec_prefix"
12948 prefix="$acl_save_prefix"
12949
12950 if test "X$x" = "X$element"; then
12951 haveit=yes
12952 break
12953 fi
12954 done
12955 if test -z "$haveit"; then
12956 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12957 fi
12958 done
12959
12960 fi
12961
12962
12963 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
12964
12965
12966 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
12967
12968 fi
12969
12970 POSUB=po
12971 fi
12972
12973
12974
12975 INTLLIBS="$LIBINTL"
12976
12977
12978
12979
12980
12981
12982 fi
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
12995 $as_echo_n "checking whether NLS is requested... " >&6; }
12996 if test x"$USE_NLS" != xyes; then
12997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12998 $as_echo "no" >&6; }
12999 else
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13001 $as_echo "yes" >&6; }
13002
13003 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
13004
13005
13006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
13007 $as_echo_n "checking for catalogs to be installed... " >&6; }
13008 # Look for .po and .gmo files in the source directory.
13009 CATALOGS=
13010 XLINGUAS=
13011 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13012 # If there aren't any .gmo files the shell will give us the
13013 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13014 # weeded out.
13015 case "$cat" in *\**)
13016 continue;;
13017 esac
13018 # The quadruple backslash is collapsed to a double backslash
13019 # by the backticks, then collapsed again by the double quotes,
13020 # leaving us with one backslash in the sed expression (right
13021 # before the dot that mustn't act as a wildcard).
13022 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13023 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13024 # The user is allowed to set LINGUAS to a list of languages to
13025 # install catalogs for. If it's empty that means "all of them."
13026 if test "x$LINGUAS" = x; then
13027 CATALOGS="$CATALOGS $cat"
13028 XLINGUAS="$XLINGUAS $lang"
13029 else
13030 case "$LINGUAS" in *$lang*)
13031 CATALOGS="$CATALOGS $cat"
13032 XLINGUAS="$XLINGUAS $lang"
13033 ;;
13034 esac
13035 fi
13036 done
13037 LINGUAS="$XLINGUAS"
13038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
13039 $as_echo "$LINGUAS" >&6; }
13040
13041
13042 DATADIRNAME=share
13043
13044 INSTOBJEXT=.mo
13045
13046 GENCAT=gencat
13047
13048 CATOBJEXT=.gmo
13049
13050 fi
13051
13052 # Create sub-directories for objects and dependencies.
13053 CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
13054
13055
13056 ac_config_commands="$ac_config_commands gdbdepdir"
13057
13058
13059 depcc="$CC" am_compiler_list=
13060
13061 am_depcomp=$ac_aux_dir/depcomp
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
13063 $as_echo_n "checking dependency style of $depcc... " >&6; }
13064 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
13065 $as_echo_n "(cached) " >&6
13066 else
13067 if test -f "$am_depcomp"; then
13068 # We make a subdir and do the tests there. Otherwise we can end up
13069 # making bogus files that we don't know about and never remove. For
13070 # instance it was reported that on HP-UX the gcc test will end up
13071 # making a dummy file named `D' -- because `-MD' means `put the output
13072 # in D'.
13073 mkdir conftest.dir
13074 # Copy depcomp to subdir because otherwise we won't find it if we're
13075 # using a relative directory.
13076 cp "$am_depcomp" conftest.dir
13077 cd conftest.dir
13078 # We will build objects and dependencies in a subdirectory because
13079 # it helps to detect inapplicable dependency modes. For instance
13080 # both Tru64's cc and ICC support -MD to output dependencies as a
13081 # side effect of compilation, but ICC will put the dependencies in
13082 # the current directory while Tru64 will put them in the object
13083 # directory.
13084 mkdir sub
13085
13086 am_cv_CC_dependencies_compiler_type=none
13087 if test "$am_compiler_list" = ""; then
13088 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13089 fi
13090 for depmode in $am_compiler_list; do
13091 if test $depmode = none; then break; fi
13092
13093 $as_echo "$as_me:$LINENO: trying $depmode" >&5
13094 # Setup a source with many dependencies, because some compilers
13095 # like to wrap large dependency lists on column 80 (with \), and
13096 # we should not choose a depcomp mode which is confused by this.
13097 #
13098 # We need to recreate these files for each test, as the compiler may
13099 # overwrite some of them when testing with obscure command lines.
13100 # This happens at least with the AIX C compiler.
13101 : > sub/conftest.c
13102 for i in 1 2 3 4 5 6; do
13103 echo '#include "conftst'$i'.h"' >> sub/conftest.c
13104 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13105 # Solaris 8's {/usr,}/bin/sh.
13106 touch sub/conftst$i.h
13107 done
13108 echo "include sub/conftest.Po" > confmf
13109
13110 # We check with `-c' and `-o' for the sake of the "dashmstdout"
13111 # mode. It turns out that the SunPro C++ compiler does not properly
13112 # handle `-M -o', and we need to detect this.
13113 depcmd="depmode=$depmode \
13114 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13115 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13116 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
13117 echo "| $depcmd" | sed -e 's/ */ /g' >&5
13118 if env $depcmd > conftest.err 2>&1 &&
13119 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
13120 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
13121 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
13122 # icc doesn't choke on unknown options, it will just issue warnings
13123 # or remarks (even with -Werror). So we grep stderr for any message
13124 # that says an option was ignored or not supported.
13125 # When given -MP, icc 7.0 and 7.1 complain thusly:
13126 # icc: Command line warning: ignoring option '-M'; no argument required
13127 # The diagnosis changed in icc 8.0:
13128 # icc: Command line remark: option '-MP' not supported
13129 if (grep 'ignoring option' conftest.err ||
13130 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13131 am_cv_CC_dependencies_compiler_type=$depmode
13132 $as_echo "$as_me:$LINENO: success" >&5
13133 break
13134 fi
13135 fi
13136 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
13137 sed -e 's/^/| /' < conftest.err >&5
13138 done
13139
13140 cd ..
13141 rm -rf conftest.dir
13142 else
13143 am_cv_CC_dependencies_compiler_type=none
13144 fi
13145
13146 fi
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13148 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13149 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
13150 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
13151 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13152
13153 fi
13154
13155
13156 for ac_header in \
13157 arpa/inet.h \
13158 fcntl.h \
13159 linux/elf.h \
13160 netdb.h \
13161 netinet/in.h \
13162 netinet/tcp.h \
13163 signal.h \
13164 string.h \
13165 sys/file.h \
13166 sys/ioctl.h \
13167 sys/procfs.h \
13168 sys/reg.h \
13169 sys/socket.h \
13170 termios.h \
13171 ws2tcpip.h \
13172
13173 do :
13174 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13175 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13176 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13177 cat >>confdefs.h <<_ACEOF
13178 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13179 _ACEOF
13180
13181 fi
13182
13183 done
13184
13185
13186 for ac_header in vfork.h
13187 do :
13188 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13189 if test "x$ac_cv_header_vfork_h" = xyes; then :
13190 cat >>confdefs.h <<_ACEOF
13191 #define HAVE_VFORK_H 1
13192 _ACEOF
13193
13194 fi
13195
13196 done
13197
13198 for ac_func in fork vfork
13199 do :
13200 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13201 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13202 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13203 cat >>confdefs.h <<_ACEOF
13204 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13205 _ACEOF
13206
13207 fi
13208 done
13209
13210 if test "x$ac_cv_func_fork" = xyes; then
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13212 $as_echo_n "checking for working fork... " >&6; }
13213 if ${ac_cv_func_fork_works+:} false; then :
13214 $as_echo_n "(cached) " >&6
13215 else
13216 if test "$cross_compiling" = yes; then :
13217 ac_cv_func_fork_works=cross
13218 else
13219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13220 /* end confdefs.h. */
13221 $ac_includes_default
13222 int
13223 main ()
13224 {
13225
13226 /* By Ruediger Kuhlmann. */
13227 return fork () < 0;
13228
13229 ;
13230 return 0;
13231 }
13232 _ACEOF
13233 if ac_fn_c_try_run "$LINENO"; then :
13234 ac_cv_func_fork_works=yes
13235 else
13236 ac_cv_func_fork_works=no
13237 fi
13238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13239 conftest.$ac_objext conftest.beam conftest.$ac_ext
13240 fi
13241
13242 fi
13243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13244 $as_echo "$ac_cv_func_fork_works" >&6; }
13245
13246 else
13247 ac_cv_func_fork_works=$ac_cv_func_fork
13248 fi
13249 if test "x$ac_cv_func_fork_works" = xcross; then
13250 case $host in
13251 *-*-amigaos* | *-*-msdosdjgpp*)
13252 # Override, as these systems have only a dummy fork() stub
13253 ac_cv_func_fork_works=no
13254 ;;
13255 *)
13256 ac_cv_func_fork_works=yes
13257 ;;
13258 esac
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13260 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13261 fi
13262 ac_cv_func_vfork_works=$ac_cv_func_vfork
13263 if test "x$ac_cv_func_vfork" = xyes; then
13264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13265 $as_echo_n "checking for working vfork... " >&6; }
13266 if ${ac_cv_func_vfork_works+:} false; then :
13267 $as_echo_n "(cached) " >&6
13268 else
13269 if test "$cross_compiling" = yes; then :
13270 ac_cv_func_vfork_works=cross
13271 else
13272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h. */
13274 /* Thanks to Paul Eggert for this test. */
13275 $ac_includes_default
13276 #include <sys/wait.h>
13277 #ifdef HAVE_VFORK_H
13278 # include <vfork.h>
13279 #endif
13280 /* On some sparc systems, changes by the child to local and incoming
13281 argument registers are propagated back to the parent. The compiler
13282 is told about this with #include <vfork.h>, but some compilers
13283 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13284 static variable whose address is put into a register that is
13285 clobbered by the vfork. */
13286 static void
13287 #ifdef __cplusplus
13288 sparc_address_test (int arg)
13289 # else
13290 sparc_address_test (arg) int arg;
13291 #endif
13292 {
13293 static pid_t child;
13294 if (!child) {
13295 child = vfork ();
13296 if (child < 0) {
13297 perror ("vfork");
13298 _exit(2);
13299 }
13300 if (!child) {
13301 arg = getpid();
13302 write(-1, "", 0);
13303 _exit (arg);
13304 }
13305 }
13306 }
13307
13308 int
13309 main ()
13310 {
13311 pid_t parent = getpid ();
13312 pid_t child;
13313
13314 sparc_address_test (0);
13315
13316 child = vfork ();
13317
13318 if (child == 0) {
13319 /* Here is another test for sparc vfork register problems. This
13320 test uses lots of local variables, at least as many local
13321 variables as main has allocated so far including compiler
13322 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13323 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13324 reuse the register of parent for one of the local variables,
13325 since it will think that parent can't possibly be used any more
13326 in this routine. Assigning to the local variable will thus
13327 munge parent in the parent process. */
13328 pid_t
13329 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13330 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13331 /* Convince the compiler that p..p7 are live; otherwise, it might
13332 use the same hardware register for all 8 local variables. */
13333 if (p != p1 || p != p2 || p != p3 || p != p4
13334 || p != p5 || p != p6 || p != p7)
13335 _exit(1);
13336
13337 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13338 from child file descriptors. If the child closes a descriptor
13339 before it execs or exits, this munges the parent's descriptor
13340 as well. Test for this by closing stdout in the child. */
13341 _exit(close(fileno(stdout)) != 0);
13342 } else {
13343 int status;
13344 struct stat st;
13345
13346 while (wait(&status) != child)
13347 ;
13348 return (
13349 /* Was there some problem with vforking? */
13350 child < 0
13351
13352 /* Did the child fail? (This shouldn't happen.) */
13353 || status
13354
13355 /* Did the vfork/compiler bug occur? */
13356 || parent != getpid()
13357
13358 /* Did the file descriptor bug occur? */
13359 || fstat(fileno(stdout), &st) != 0
13360 );
13361 }
13362 }
13363 _ACEOF
13364 if ac_fn_c_try_run "$LINENO"; then :
13365 ac_cv_func_vfork_works=yes
13366 else
13367 ac_cv_func_vfork_works=no
13368 fi
13369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13370 conftest.$ac_objext conftest.beam conftest.$ac_ext
13371 fi
13372
13373 fi
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13375 $as_echo "$ac_cv_func_vfork_works" >&6; }
13376
13377 fi;
13378 if test "x$ac_cv_func_fork_works" = xcross; then
13379 ac_cv_func_vfork_works=$ac_cv_func_vfork
13380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13381 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13382 fi
13383
13384 if test "x$ac_cv_func_vfork_works" = xyes; then
13385
13386 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13387
13388 else
13389
13390 $as_echo "#define vfork fork" >>confdefs.h
13391
13392 fi
13393 if test "x$ac_cv_func_fork_works" = xyes; then
13394
13395 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13396
13397 fi
13398
13399 for ac_func in \
13400 pread \
13401 pread64 \
13402 pwrite \
13403
13404 do :
13405 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13406 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13407 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13408 cat >>confdefs.h <<_ACEOF
13409 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13410 _ACEOF
13411
13412 fi
13413 done
13414
13415
13416 # Check the return and argument types of ptrace.
13417
13418
13419 for ac_header in sys/ptrace.h ptrace.h
13420 do :
13421 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13422 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13423 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13424 cat >>confdefs.h <<_ACEOF
13425 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13426 _ACEOF
13427
13428 fi
13429
13430 done
13431
13432
13433 gdb_ptrace_headers='
13434 #include <sys/types.h>
13435 #if HAVE_SYS_PTRACE_H
13436 # include <sys/ptrace.h>
13437 #endif
13438 #if HAVE_UNISTD_H
13439 # include <unistd.h>
13440 #endif
13441 '
13442
13443 # Check return type. Varargs (used on GNU/Linux) conflict with the
13444 # empty argument list, so check for that explicitly.
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13446 $as_echo_n "checking return type of ptrace... " >&6; }
13447 if ${gdb_cv_func_ptrace_ret+:} false; then :
13448 $as_echo_n "(cached) " >&6
13449 else
13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13451 /* end confdefs.h. */
13452 $gdb_ptrace_headers
13453 int
13454 main ()
13455 {
13456 extern long ptrace (enum __ptrace_request, ...);
13457
13458 ;
13459 return 0;
13460 }
13461 _ACEOF
13462 if ac_fn_c_try_compile "$LINENO"; then :
13463 gdb_cv_func_ptrace_ret='long'
13464 else
13465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13466 /* end confdefs.h. */
13467 $gdb_ptrace_headers
13468 int
13469 main ()
13470 {
13471 extern int ptrace ();
13472
13473 ;
13474 return 0;
13475 }
13476 _ACEOF
13477 if ac_fn_c_try_compile "$LINENO"; then :
13478 gdb_cv_func_ptrace_ret='int'
13479 else
13480 gdb_cv_func_ptrace_ret='long'
13481
13482 fi
13483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484
13485 fi
13486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13487
13488 fi
13489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13490 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13491
13492
13493 cat >>confdefs.h <<_ACEOF
13494 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13495 _ACEOF
13496
13497
13498 # Check argument types.
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13500 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13501 if ${gdb_cv_func_ptrace_args+:} false; then :
13502 $as_echo_n "(cached) " >&6
13503 else
13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h. */
13506 $gdb_ptrace_headers
13507 int
13508 main ()
13509 {
13510 extern long ptrace (enum __ptrace_request, ...);
13511
13512 ;
13513 return 0;
13514 }
13515 _ACEOF
13516 if ac_fn_c_try_compile "$LINENO"; then :
13517 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13518 else
13519 for gdb_arg1 in 'int' 'long'; do
13520 for gdb_arg2 in 'pid_t' 'int' 'long'; do
13521 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13522 for gdb_arg4 in 'int' 'long' 'void *'; do
13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524 /* end confdefs.h. */
13525 $gdb_ptrace_headers
13526 int
13527 main ()
13528 {
13529 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13530
13531 ;
13532 return 0;
13533 }
13534 _ACEOF
13535 if ac_fn_c_try_compile "$LINENO"; then :
13536 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13537 break 4;
13538
13539 fi
13540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13541
13542 for gdb_arg5 in 'int *' 'int' 'long'; do
13543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13544 /* end confdefs.h. */
13545 $gdb_ptrace_headers
13546 int
13547 main ()
13548 {
13549 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13550
13551 ;
13552 return 0;
13553 }
13554 _ACEOF
13555 if ac_fn_c_try_compile "$LINENO"; then :
13556 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13557 break 5;
13558
13559 fi
13560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13561 done
13562 done
13563 done
13564 done
13565 done
13566 # Provide a safe default value.
13567 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13568
13569 fi
13570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571
13572 fi
13573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13574 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13575
13576 ac_save_IFS=$IFS; IFS=','
13577 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13578 IFS=$ac_save_IFS
13579 shift
13580
13581 cat >>confdefs.h <<_ACEOF
13582 #define PTRACE_TYPE_ARG1 $1
13583 _ACEOF
13584
13585
13586 cat >>confdefs.h <<_ACEOF
13587 #define PTRACE_TYPE_ARG3 $3
13588 _ACEOF
13589
13590
13591 cat >>confdefs.h <<_ACEOF
13592 #define PTRACE_TYPE_ARG4 $4
13593 _ACEOF
13594
13595 if test -n "$5"; then
13596
13597 cat >>confdefs.h <<_ACEOF
13598 #define PTRACE_TYPE_ARG5 $5
13599 _ACEOF
13600
13601 fi
13602
13603
13604 # Check for UST
13605 ustlibs=""
13606 ustinc=""
13607
13608
13609 # Check whether --with-ust was given.
13610 if test "${with_ust+set}" = set; then :
13611 withval=$with_ust;
13612 fi
13613
13614
13615 # Check whether --with-ust_include was given.
13616 if test "${with_ust_include+set}" = set; then :
13617 withval=$with_ust_include;
13618 fi
13619
13620
13621 # Check whether --with-ust_lib was given.
13622 if test "${with_ust_lib+set}" = set; then :
13623 withval=$with_ust_lib;
13624 fi
13625
13626
13627 case $with_ust in
13628 no)
13629 ustlibs=
13630 ustinc=
13631 ;;
13632 "" | yes)
13633 ustlibs=" -lust "
13634 ustinc=""
13635 ;;
13636 *)
13637 ustlibs="-L$with_ust/lib -lust"
13638 ustinc="-I$with_ust/include "
13639 ;;
13640 esac
13641 if test "x$with_ust_include" != x; then
13642 ustinc="-I$with_ust_include "
13643 fi
13644 if test "x$with_ust_lib" != x; then
13645 ustlibs="-L$with_ust_lib -lust"
13646 fi
13647
13648 if test "x$with_ust" != "xno"; then
13649 saved_CFLAGS="$CFLAGS"
13650 CFLAGS="$CFLAGS $ustinc"
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
13652 $as_echo_n "checking for ust... " >&6; }
13653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13654 /* end confdefs.h. */
13655
13656 #define CONFIG_UST_GDB_INTEGRATION
13657 #include <ust/ust.h>
13658
13659 int
13660 main ()
13661 {
13662
13663
13664 ;
13665 return 0;
13666 }
13667 _ACEOF
13668 if ac_fn_c_try_compile "$LINENO"; then :
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13670 $as_echo "yes" >&6; };
13671
13672 $as_echo "#define HAVE_UST 1" >>confdefs.h
13673
13674 else
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13676 $as_echo "no" >&6; }
13677 ustlibs= ; ustinc=
13678
13679 fi
13680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13681 CFLAGS="$saved_CFLAGS"
13682 fi
13683
13684 # Flags needed for UST
13685
13686
13687
13688
13689
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
13691 $as_echo_n "checking the compiler type... " >&6; }
13692 if ${gdb_cv_compiler_type+:} false; then :
13693 $as_echo_n "(cached) " >&6
13694 else
13695 gdb_cv_compiler_type=unknown
13696 if test "$gdb_cv_compiler_type" = unknown; then
13697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13698 /* end confdefs.h. */
13699
13700 int
13701 main ()
13702 {
13703
13704 #if !defined __GNUC__ || defined __clang__
13705 #error not gcc
13706 #endif
13707
13708 ;
13709 return 0;
13710 }
13711 _ACEOF
13712 if ac_fn_c_try_compile "$LINENO"; then :
13713 gdb_cv_compiler_type=gcc
13714 fi
13715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13716 fi
13717
13718 if test "$gdb_cv_compiler_type" = unknown; then
13719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13720 /* end confdefs.h. */
13721
13722 int
13723 main ()
13724 {
13725
13726 #ifndef __clang__
13727 #error not clang
13728 #endif
13729
13730 ;
13731 return 0;
13732 }
13733 _ACEOF
13734 if ac_fn_c_try_compile "$LINENO"; then :
13735 gdb_cv_compiler_type=clang
13736 fi
13737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13738 fi
13739
13740 fi
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
13742 $as_echo "$gdb_cv_compiler_type" >&6; }
13743
13744 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
13745
13746
13747 # Check whether --enable-werror was given.
13748 if test "${enable_werror+set}" = set; then :
13749 enableval=$enable_werror; case "${enableval}" in
13750 yes | y) ERROR_ON_WARNING="yes" ;;
13751 no | n) ERROR_ON_WARNING="no" ;;
13752 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
13753 esac
13754 fi
13755
13756
13757 # Enable -Werror by default when using gcc. Turn it off for releases.
13758 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
13759 ERROR_ON_WARNING=yes
13760 fi
13761
13762 WERROR_CFLAGS=""
13763 if test "${ERROR_ON_WARNING}" = yes ; then
13764 WERROR_CFLAGS="-Werror"
13765 fi
13766
13767 # The options we'll try to enable.
13768 build_warnings="-Wall -Wpointer-arith \
13769 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
13770 -Wno-switch -Wno-char-subscripts \
13771 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
13772 -Wno-sign-compare -Wno-error=maybe-uninitialized \
13773 -Wno-mismatched-tags \
13774 -Wno-error=deprecated-register \
13775 -Wsuggest-override \
13776 -Wimplicit-fallthrough=5 \
13777 -Wduplicated-cond \
13778 -Wshadow=local \
13779 -Wdeprecated-copy \
13780 -Wdeprecated-copy-dtor \
13781 -Wredundant-move \
13782 -Wmissing-declarations \
13783 -Wstrict-null-sentinel \
13784 -Wvla \
13785 "
13786
13787 # The -Wmissing-prototypes flag will be accepted by GCC, but results
13788 # in a warning being printed about the flag not being valid for C++,
13789 # this is something to do with using ccache, and argument ordering.
13790 if test "$GDB_COMPILER_TYPE" != gcc; then
13791 build_warnings="$build_warnings -Wmissing-prototypes"
13792 fi
13793
13794 case "${host}" in
13795 *-*-mingw32*)
13796 # Enable -Wno-format by default when using gcc on mingw since many
13797 # GCC versions complain about %I64.
13798 build_warnings="$build_warnings -Wno-format" ;;
13799 *-*-solaris*)
13800 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
13801 # doesn't understand.
13802 build_warnings="$build_warnings -Wno-unknown-pragmas"
13803 # Solaris 11 <unistd.h> marks vfork deprecated.
13804 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
13805 *)
13806 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
13807 # but there's a special case for this below.
13808 build_warnings="$build_warnings -Wformat-nonliteral" ;;
13809 esac
13810
13811 # Check whether --enable-build-warnings was given.
13812 if test "${enable_build_warnings+set}" = set; then :
13813 enableval=$enable_build_warnings; case "${enableval}" in
13814 yes) ;;
13815 no) build_warnings="-w";;
13816 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13817 build_warnings="${build_warnings} ${t}";;
13818 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13819 build_warnings="${t} ${build_warnings}";;
13820 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13821 esac
13822 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13823 echo "Setting compiler warning flags = $build_warnings" 6>&1
13824 fi
13825 fi
13826 # Check whether --enable-gdb-build-warnings was given.
13827 if test "${enable_gdb_build_warnings+set}" = set; then :
13828 enableval=$enable_gdb_build_warnings; case "${enableval}" in
13829 yes) ;;
13830 no) build_warnings="-w";;
13831 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13832 build_warnings="${build_warnings} ${t}";;
13833 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13834 build_warnings="${t} ${build_warnings}";;
13835 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13836 esac
13837 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13838 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13839 fi
13840 fi
13841
13842 # The set of warnings supported by a C++ compiler is not the same as
13843 # of the C compiler.
13844 ac_ext=cpp
13845 ac_cpp='$CXXCPP $CPPFLAGS'
13846 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13847 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13848 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13849
13850
13851 WARN_CFLAGS=""
13852 if test "x${build_warnings}" != x -a "x$GCC" = xyes
13853 then
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13855 $as_echo_n "checking compiler warning flags... " >&6; }
13856 # Separate out the -Werror flag as some files just cannot be
13857 # compiled with it enabled.
13858 for w in ${build_warnings}; do
13859 # GCC does not complain about -Wno-unknown-warning. Invert
13860 # and test -Wunknown-warning instead.
13861 case $w in
13862 -Wno-*)
13863 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
13864 -Wformat-nonliteral)
13865 # gcc requires -Wformat before -Wformat-nonliteral
13866 # will work, so stick them together.
13867 w="-Wformat $w"
13868 wtest="$w"
13869 ;;
13870 *)
13871 wtest=$w ;;
13872 esac
13873
13874 case $w in
13875 -Werr*) WERROR_CFLAGS=-Werror ;;
13876 *)
13877 # Check whether GCC accepts it.
13878 saved_CFLAGS="$CFLAGS"
13879 CFLAGS="$CFLAGS -Werror $wtest"
13880 saved_CXXFLAGS="$CXXFLAGS"
13881 CXXFLAGS="$CXXFLAGS -Werror $wtest"
13882 if test "x$w" = "x-Wunused-variable"; then
13883 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
13884 # fixed in GCC 4.9. This test is derived from the gdb
13885 # source code that triggered this bug in GCC.
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887 /* end confdefs.h. */
13888 struct scoped_restore_base {};
13889 struct scoped_restore_tmpl : public scoped_restore_base {
13890 ~scoped_restore_tmpl() {}
13891 };
13892 int
13893 main ()
13894 {
13895 const scoped_restore_base &b = scoped_restore_tmpl();
13896
13897 ;
13898 return 0;
13899 }
13900 _ACEOF
13901 if ac_fn_cxx_try_compile "$LINENO"; then :
13902 WARN_CFLAGS="${WARN_CFLAGS} $w"
13903 fi
13904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13905 else
13906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907 /* end confdefs.h. */
13908
13909 int
13910 main ()
13911 {
13912
13913 ;
13914 return 0;
13915 }
13916 _ACEOF
13917 if ac_fn_cxx_try_compile "$LINENO"; then :
13918 WARN_CFLAGS="${WARN_CFLAGS} $w"
13919 fi
13920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13921 fi
13922 CFLAGS="$saved_CFLAGS"
13923 CXXFLAGS="$saved_CXXFLAGS"
13924 esac
13925 done
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13927 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
13928 fi
13929
13930
13931
13932 ac_ext=c
13933 ac_cpp='$CPP $CPPFLAGS'
13934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13937
13938
13939
13940 old_LIBS="$LIBS"
13941 LIBS="$LIBS -ldl"
13942 for ac_func in dladdr
13943 do :
13944 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
13945 if test "x$ac_cv_func_dladdr" = xyes; then :
13946 cat >>confdefs.h <<_ACEOF
13947 #define HAVE_DLADDR 1
13948 _ACEOF
13949
13950 fi
13951 done
13952
13953 LIBS="$old_LIBS"
13954
13955 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
13956 if test "x$ac_cv_have_decl_ffs" = xyes; then :
13957 ac_have_decl=1
13958 else
13959 ac_have_decl=0
13960 fi
13961
13962 cat >>confdefs.h <<_ACEOF
13963 #define HAVE_DECL_FFS $ac_have_decl
13964 _ACEOF
13965
13966 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
13967 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
13968 ac_have_decl=1
13969 else
13970 ac_have_decl=0
13971 fi
13972
13973 cat >>confdefs.h <<_ACEOF
13974 #define HAVE_DECL_ASPRINTF $ac_have_decl
13975 _ACEOF
13976
13977 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
13978 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
13979 ac_have_decl=1
13980 else
13981 ac_have_decl=0
13982 fi
13983
13984 cat >>confdefs.h <<_ACEOF
13985 #define HAVE_DECL_VASPRINTF $ac_have_decl
13986 _ACEOF
13987
13988 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13989 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13990 ac_have_decl=1
13991 else
13992 ac_have_decl=0
13993 fi
13994
13995 cat >>confdefs.h <<_ACEOF
13996 #define HAVE_DECL_SNPRINTF $ac_have_decl
13997 _ACEOF
13998
13999 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
14000 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
14001 ac_have_decl=1
14002 else
14003 ac_have_decl=0
14004 fi
14005
14006 cat >>confdefs.h <<_ACEOF
14007 #define HAVE_DECL_VSNPRINTF $ac_have_decl
14008 _ACEOF
14009
14010 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
14011 if test "x$ac_cv_have_decl_strtol" = xyes; then :
14012 ac_have_decl=1
14013 else
14014 ac_have_decl=0
14015 fi
14016
14017 cat >>confdefs.h <<_ACEOF
14018 #define HAVE_DECL_STRTOL $ac_have_decl
14019 _ACEOF
14020
14021 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
14022 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
14023 ac_have_decl=1
14024 else
14025 ac_have_decl=0
14026 fi
14027
14028 cat >>confdefs.h <<_ACEOF
14029 #define HAVE_DECL_STRTOUL $ac_have_decl
14030 _ACEOF
14031
14032 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
14033 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
14034 ac_have_decl=1
14035 else
14036 ac_have_decl=0
14037 fi
14038
14039 cat >>confdefs.h <<_ACEOF
14040 #define HAVE_DECL_STRTOLL $ac_have_decl
14041 _ACEOF
14042
14043 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
14044 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
14045 ac_have_decl=1
14046 else
14047 ac_have_decl=0
14048 fi
14049
14050 cat >>confdefs.h <<_ACEOF
14051 #define HAVE_DECL_STRTOULL $ac_have_decl
14052 _ACEOF
14053
14054 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
14055 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
14056 ac_have_decl=1
14057 else
14058 ac_have_decl=0
14059 fi
14060
14061 cat >>confdefs.h <<_ACEOF
14062 #define HAVE_DECL_STRVERSCMP $ac_have_decl
14063 _ACEOF
14064
14065 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
14066 if test "x$ac_cv_type_long_long" = xyes; then :
14067
14068 cat >>confdefs.h <<_ACEOF
14069 #define HAVE_LONG_LONG 1
14070 _ACEOF
14071
14072 # The cast to long int works around a bug in the HP C Compiler
14073 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14074 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14075 # This bug is HP SR number 8606223364.
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
14077 $as_echo_n "checking size of long long... " >&6; }
14078 if ${ac_cv_sizeof_long_long+:} false; then :
14079 $as_echo_n "(cached) " >&6
14080 else
14081 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
14082
14083 else
14084 if test "$ac_cv_type_long_long" = yes; then
14085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14086 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14087 as_fn_error 77 "cannot compute sizeof (long long)
14088 See \`config.log' for more details" "$LINENO" 5; }
14089 else
14090 ac_cv_sizeof_long_long=0
14091 fi
14092 fi
14093
14094 fi
14095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
14096 $as_echo "$ac_cv_sizeof_long_long" >&6; }
14097
14098
14099
14100 cat >>confdefs.h <<_ACEOF
14101 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
14102 _ACEOF
14103
14104
14105 fi
14106
14107
14108 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
14109 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
14110 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
14111 ac_have_decl=1
14112 else
14113 ac_have_decl=0
14114 fi
14115
14116 cat >>confdefs.h <<_ACEOF
14117 #define HAVE_DECL_BASENAME $ac_have_decl
14118 _ACEOF
14119
14120
14121
14122
14123
14124
14125 ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
14126 if test "x$ac_cv_have_decl_perror" = xyes; then :
14127 ac_have_decl=1
14128 else
14129 ac_have_decl=0
14130 fi
14131
14132 cat >>confdefs.h <<_ACEOF
14133 #define HAVE_DECL_PERROR $ac_have_decl
14134 _ACEOF
14135 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
14136 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
14137 ac_have_decl=1
14138 else
14139 ac_have_decl=0
14140 fi
14141
14142 cat >>confdefs.h <<_ACEOF
14143 #define HAVE_DECL_VASPRINTF $ac_have_decl
14144 _ACEOF
14145 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
14146 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
14147 ac_have_decl=1
14148 else
14149 ac_have_decl=0
14150 fi
14151
14152 cat >>confdefs.h <<_ACEOF
14153 #define HAVE_DECL_VSNPRINTF $ac_have_decl
14154 _ACEOF
14155
14156
14157 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
14158 #if HAVE_SYS_SOCKET_H
14159 # include <sys/socket.h>
14160 #elif HAVE_WS2TCPIP_H
14161 # include <ws2tcpip.h>
14162 #endif
14163
14164 "
14165 if test "x$ac_cv_type_socklen_t" = xyes; then :
14166
14167 cat >>confdefs.h <<_ACEOF
14168 #define HAVE_SOCKLEN_T 1
14169 _ACEOF
14170
14171
14172 fi
14173
14174
14175 case "${target}" in
14176 *-android*)
14177 # Starting with NDK version 9, <elf.h> actually includes definitions
14178 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
14179 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
14180 # leading to conflicts with the defintions from <linux/elf.h>.
14181 # This makes it impossible for us to include both <elf.h> and
14182 # <linux/elf.h>, which means that, in practice, we do not have
14183 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
14184 # Therefore, do not try to auto-detect availability, as it would
14185 # get it wrong on this platform.
14186 ;;
14187 *)
14188 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
14189
14190 "
14191 if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
14192
14193 cat >>confdefs.h <<_ACEOF
14194 #define HAVE_ELF32_AUXV_T 1
14195 _ACEOF
14196
14197
14198 fi
14199 ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
14200
14201 "
14202 if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
14203
14204 cat >>confdefs.h <<_ACEOF
14205 #define HAVE_ELF64_AUXV_T 1
14206 _ACEOF
14207
14208
14209 fi
14210
14211 esac
14212
14213
14214
14215 # Check whether --with-pkgversion was given.
14216 if test "${with_pkgversion+set}" = set; then :
14217 withval=$with_pkgversion; case "$withval" in
14218 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
14219 no) PKGVERSION= ;;
14220 *) PKGVERSION="($withval) " ;;
14221 esac
14222 else
14223 PKGVERSION="(GDB) "
14224
14225 fi
14226
14227
14228
14229
14230
14231 # Check whether --with-bugurl was given.
14232 if test "${with_bugurl+set}" = set; then :
14233 withval=$with_bugurl; case "$withval" in
14234 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
14235 no) BUGURL=
14236 ;;
14237 *) BUGURL="$withval"
14238 ;;
14239 esac
14240 else
14241 BUGURL="http://www.gnu.org/software/gdb/bugs/"
14242
14243 fi
14244
14245 case ${BUGURL} in
14246 "")
14247 REPORT_BUGS_TO=
14248 REPORT_BUGS_TEXI=
14249 ;;
14250 *)
14251 REPORT_BUGS_TO="<$BUGURL>"
14252 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
14253 ;;
14254 esac;
14255
14256
14257
14258
14259 cat >>confdefs.h <<_ACEOF
14260 #define PKGVERSION "$PKGVERSION"
14261 _ACEOF
14262
14263
14264 cat >>confdefs.h <<_ACEOF
14265 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
14266 _ACEOF
14267
14268
14269 # Check for various supplementary target information (beyond the
14270 # triplet) which might affect the choices in configure.srv.
14271 case "${target}" in
14272 i[34567]86-*-linux*)
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
14274 $as_echo_n "checking if building for x86-64... " >&6; }
14275 if ${gdb_cv_i386_is_x86_64+:} false; then :
14276 $as_echo_n "(cached) " >&6
14277 else
14278 save_CPPFLAGS="$CPPFLAGS"
14279 CPPFLAGS="$CPPFLAGS $CFLAGS"
14280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14281 /* end confdefs.h. */
14282
14283 #if __x86_64__
14284 got it
14285 #endif
14286
14287 _ACEOF
14288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14289 $EGREP "got it" >/dev/null 2>&1; then :
14290 gdb_cv_i386_is_x86_64=yes
14291 else
14292 gdb_cv_i386_is_x86_64=no
14293 fi
14294 rm -f conftest*
14295
14296 CPPFLAGS="$save_CPPFLAGS"
14297 fi
14298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
14299 $as_echo "$gdb_cv_i386_is_x86_64" >&6; }
14300 ;;
14301
14302 x86_64-*-linux*)
14303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
14304 $as_echo_n "checking if building for x32... " >&6; }
14305 if ${gdb_cv_x86_is_x32+:} false; then :
14306 $as_echo_n "(cached) " >&6
14307 else
14308 save_CPPFLAGS="$CPPFLAGS"
14309 CPPFLAGS="$CPPFLAGS $CFLAGS"
14310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14311 /* end confdefs.h. */
14312
14313 #if __x86_64__ && __ILP32__
14314 got it
14315 #endif
14316
14317 _ACEOF
14318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14319 $EGREP "got it" >/dev/null 2>&1; then :
14320 gdb_cv_x86_is_x32=yes
14321 else
14322 gdb_cv_x86_is_x32=no
14323 fi
14324 rm -f conftest*
14325
14326 CPPFLAGS="$save_CPPFLAGS"
14327 fi
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
14329 $as_echo "$gdb_cv_x86_is_x32" >&6; }
14330 ;;
14331
14332 m68k-*-*)
14333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
14334 $as_echo_n "checking if building for Coldfire... " >&6; }
14335 if ${gdb_cv_m68k_is_coldfire+:} false; then :
14336 $as_echo_n "(cached) " >&6
14337 else
14338 save_CPPFLAGS="$CPPFLAGS"
14339 CPPFLAGS="$CPPFLAGS $CFLAGS"
14340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14341 /* end confdefs.h. */
14342
14343 #ifdef __mcoldfire__
14344 got it
14345 #endif
14346
14347 _ACEOF
14348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14349 $EGREP "got it" >/dev/null 2>&1; then :
14350 gdb_cv_m68k_is_coldfire=yes
14351 else
14352 gdb_cv_m68k_is_coldfire=no
14353 fi
14354 rm -f conftest*
14355
14356 CPPFLAGS="$save_CPPFLAGS"
14357 fi
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
14359 $as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
14360 ;;
14361 esac
14362
14363 . ${srcdir}/configure.srv
14364
14365 if test "${srv_mingwce}" = "yes"; then
14366 LIBS="$LIBS -lws2"
14367 elif test "${srv_mingw}" = "yes"; then
14368 # WIN32APILIBS is set by GDB_AC_COMMON.
14369 LIBS="$LIBS $WIN32APILIBS"
14370 fi
14371
14372 if test "${srv_linux_usrregs}" = "yes"; then
14373
14374 $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
14375
14376 fi
14377
14378 if test "${srv_linux_regsets}" = "yes"; then
14379
14380 $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
14381
14382
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14384 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14385 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
14386 $as_echo_n "(cached) " >&6
14387 else
14388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14389 /* end confdefs.h. */
14390 #include <sys/ptrace.h>
14391 int
14392 main ()
14393 {
14394 PTRACE_GETREGS;
14395 ;
14396 return 0;
14397 }
14398 _ACEOF
14399 if ac_fn_c_try_compile "$LINENO"; then :
14400 gdbsrv_cv_have_ptrace_getregs=yes
14401 else
14402 gdbsrv_cv_have_ptrace_getregs=no
14403
14404 fi
14405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406
14407 fi
14408
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
14410 $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
14411 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
14412
14413 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14414
14415 fi
14416
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14418 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14419 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
14420 $as_echo_n "(cached) " >&6
14421 else
14422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14423 /* end confdefs.h. */
14424 #include <sys/ptrace.h>
14425 int
14426 main ()
14427 {
14428 PTRACE_GETFPXREGS;
14429 ;
14430 return 0;
14431 }
14432 _ACEOF
14433 if ac_fn_c_try_compile "$LINENO"; then :
14434 gdbsrv_cv_have_ptrace_getfpxregs=yes
14435 else
14436 gdbsrv_cv_have_ptrace_getfpxregs=no
14437
14438 fi
14439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14440
14441 fi
14442
14443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
14444 $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
14445 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
14446
14447 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14448
14449 fi
14450 fi
14451
14452 if test "${srv_linux_btrace}" = "yes"; then
14453
14454 $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
14455
14456 fi
14457
14458 if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
14460 $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
14461 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
14462 $as_echo_n "(cached) " >&6
14463 else
14464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14465 /* end confdefs.h. */
14466 #include <thread_db.h>
14467 int
14468 main ()
14469 {
14470 lwpid_t avar
14471 ;
14472 return 0;
14473 }
14474 _ACEOF
14475 if ac_fn_c_try_compile "$LINENO"; then :
14476 gdbserver_cv_have_thread_db_type_lwpid_t=yes
14477 else
14478 gdbserver_cv_have_thread_db_type_lwpid_t=no
14479
14480 fi
14481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482
14483 fi
14484
14485 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
14486
14487 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14488
14489 fi
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
14491 $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
14492
14493 fi
14494
14495 if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
14496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
14497 $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
14498 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
14499 $as_echo_n "(cached) " >&6
14500 else
14501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h. */
14503 #include <thread_db.h>
14504 int
14505 main ()
14506 {
14507 psaddr_t avar
14508 ;
14509 return 0;
14510 }
14511 _ACEOF
14512 if ac_fn_c_try_compile "$LINENO"; then :
14513 gdbserver_cv_have_thread_db_type_psaddr_t=yes
14514 else
14515 gdbserver_cv_have_thread_db_type_psaddr_t=no
14516
14517 fi
14518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519
14520 fi
14521
14522 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
14523
14524 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14525
14526 fi
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
14528 $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
14529
14530 fi
14531
14532 old_LIBS="$LIBS"
14533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14534 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14535 if ${ac_cv_lib_dl_dlopen+:} false; then :
14536 $as_echo_n "(cached) " >&6
14537 else
14538 ac_check_lib_save_LIBS=$LIBS
14539 LIBS="-ldl $LIBS"
14540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14541 /* end confdefs.h. */
14542
14543 /* Override any GCC internal prototype to avoid an error.
14544 Use char because int might match the return type of a GCC
14545 builtin and then its argument prototype would still apply. */
14546 #ifdef __cplusplus
14547 extern "C"
14548 #endif
14549 char dlopen ();
14550 int
14551 main ()
14552 {
14553 return dlopen ();
14554 ;
14555 return 0;
14556 }
14557 _ACEOF
14558 if ac_fn_c_try_link "$LINENO"; then :
14559 ac_cv_lib_dl_dlopen=yes
14560 else
14561 ac_cv_lib_dl_dlopen=no
14562 fi
14563 rm -f core conftest.err conftest.$ac_objext \
14564 conftest$ac_exeext conftest.$ac_ext
14565 LIBS=$ac_check_lib_save_LIBS
14566 fi
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14568 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14569 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14570 cat >>confdefs.h <<_ACEOF
14571 #define HAVE_LIBDL 1
14572 _ACEOF
14573
14574 LIBS="-ldl $LIBS"
14575
14576 fi
14577
14578 LIBS="$old_LIBS"
14579
14580 srv_thread_depfiles=
14581 srv_libs=
14582
14583 if test "$srv_linux_thread_db" = "yes"; then
14584 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
14585 srv_libs="-ldl"
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14587 $as_echo_n "checking for the dynamic export flag... " >&6; }
14588 old_LDFLAGS="$LDFLAGS"
14589 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
14590 # supported there.
14591 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14592 LDFLAGS="$LDFLAGS $RDYNAMIC"
14593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14594 /* end confdefs.h. */
14595
14596 int
14597 main ()
14598 {
14599
14600 ;
14601 return 0;
14602 }
14603 _ACEOF
14604 if ac_fn_c_try_link "$LINENO"; then :
14605 found="-Wl,--dynamic-list"
14606 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14607 else
14608 RDYNAMIC="-rdynamic"
14609 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
14610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14611 /* end confdefs.h. */
14612
14613 int
14614 main ()
14615 {
14616
14617 ;
14618 return 0;
14619 }
14620 _ACEOF
14621 if ac_fn_c_try_link "$LINENO"; then :
14622 found="-rdynamic"
14623 else
14624 found="no"
14625 RDYNAMIC=""
14626
14627 fi
14628 rm -f core conftest.err conftest.$ac_objext \
14629 conftest$ac_exeext conftest.$ac_ext
14630
14631 fi
14632 rm -f core conftest.err conftest.$ac_objext \
14633 conftest$ac_exeext conftest.$ac_ext
14634
14635 LDFLAGS="$old_LDFLAGS"
14636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14637 $as_echo "$found" >&6; }
14638 else
14639 srv_libs="-lthread_db"
14640 fi
14641
14642 srv_thread_depfiles="thread-db.o proc-service.o"
14643
14644 $as_echo "#define USE_THREAD_DB 1" >>confdefs.h
14645
14646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
14647 $as_echo_n "checking for TD_VERSION... " >&6; }
14648 if ${gdbsrv_cv_have_td_version+:} false; then :
14649 $as_echo_n "(cached) " >&6
14650 else
14651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652 /* end confdefs.h. */
14653 #include <thread_db.h>
14654 int
14655 main ()
14656 {
14657 TD_VERSION;
14658 ;
14659 return 0;
14660 }
14661 _ACEOF
14662 if ac_fn_c_try_compile "$LINENO"; then :
14663 gdbsrv_cv_have_td_version=yes
14664 else
14665 gdbsrv_cv_have_td_version=no
14666
14667 fi
14668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14669
14670 fi
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
14672 $as_echo "$gdbsrv_cv_have_td_version" >&6; }
14673 if test "$gdbsrv_cv_have_td_version" = yes; then
14674
14675 $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
14676
14677 fi
14678 fi
14679
14680
14681 # Check whether --with-libthread-db was given.
14682 if test "${with_libthread_db+set}" = set; then :
14683 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
14684 srv_libs="$srv_libthread_db_path"
14685
14686 fi
14687
14688
14689 if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
14690
14691 $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
14692
14693 fi
14694
14695 if test "$srv_xmlfiles" != ""; then
14696 srv_xmlbuiltin="xml-builtin.o"
14697
14698 $as_echo "#define USE_XML 1" >>confdefs.h
14699
14700
14701 tmp_xmlfiles=$srv_xmlfiles
14702 srv_xmlfiles=""
14703 for f in $tmp_xmlfiles; do
14704 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
14705 done
14706 fi
14707
14708 GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
14709 GDBSERVER_LIBS="$srv_libs"
14710
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
14712 $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
14713 if ${gdbsrv_cv_have_sync_builtins+:} false; then :
14714 $as_echo_n "(cached) " >&6
14715 else
14716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14717 /* end confdefs.h. */
14718
14719 int
14720 main ()
14721 {
14722 int foo, bar;
14723 bar = __sync_val_compare_and_swap(&foo, 0, 1);
14724
14725 ;
14726 return 0;
14727 }
14728 _ACEOF
14729 if ac_fn_c_try_link "$LINENO"; then :
14730 gdbsrv_cv_have_sync_builtins=yes
14731 else
14732 gdbsrv_cv_have_sync_builtins=no
14733
14734 fi
14735 rm -f core conftest.err conftest.$ac_objext \
14736 conftest$ac_exeext conftest.$ac_ext
14737
14738 fi
14739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
14740 $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
14741 if test "$gdbsrv_cv_have_sync_builtins" = yes; then
14742
14743 $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
14744
14745 fi
14746
14747 saved_cflags="$CFLAGS"
14748 CFLAGS="$CFLAGS -fvisibility=hidden"
14749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14750 /* end confdefs.h. */
14751
14752 int
14753 main ()
14754 {
14755
14756 ;
14757 return 0;
14758 }
14759 _ACEOF
14760 if ac_fn_c_try_compile "$LINENO"; then :
14761 gdbsrv_cv_have_visibility_hidden=yes
14762 else
14763 gdbsrv_cv_have_visibility_hidden=no
14764 fi
14765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14766 CFLAGS="$saved_cflags"
14767
14768 IPA_DEPFILES=""
14769 extra_libraries=""
14770
14771 # check whether to enable the inprocess agent
14772 if test "$ipa_obj" != "" \
14773 -a "$gdbsrv_cv_have_sync_builtins" = yes \
14774 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
14775 have_ipa=true
14776 else
14777 have_ipa=false
14778 fi
14779
14780 # Check whether --enable-inprocess-agent was given.
14781 if test "${enable_inprocess_agent+set}" = set; then :
14782 enableval=$enable_inprocess_agent; case "$enableval" in
14783 yes) want_ipa=true ;;
14784 no) want_ipa=false ;;
14785 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
14786 esac
14787 else
14788 want_ipa=$have_ipa
14789 fi
14790
14791
14792 if $want_ipa ; then
14793 if $have_ipa ; then
14794 IPA_DEPFILES="$ipa_obj"
14795 extra_libraries="$extra_libraries libinproctrace.so"
14796 else
14797 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
14798 fi
14799 fi
14800
14801
14802
14803
14804
14805
14806
14807
14808 GNULIB=../gnulib/import
14809
14810 GNULIB_STDINT_H=
14811 if test x"$STDINT_H" != x; then
14812 GNULIB_STDINT_H=$GNULIB/$STDINT_H
14813 fi
14814
14815
14816 # Check for libiconv. It is a requirement for Linux hosts, and others hosts
14817 # don't use it at all. Define MAYBE_LIBICONV only if the host is Linux.
14818
14819
14820
14821
14822
14823 am_save_CPPFLAGS="$CPPFLAGS"
14824
14825 for element in $INCICONV; do
14826 haveit=
14827 for x in $CPPFLAGS; do
14828
14829 acl_save_prefix="$prefix"
14830 prefix="$acl_final_prefix"
14831 acl_save_exec_prefix="$exec_prefix"
14832 exec_prefix="$acl_final_exec_prefix"
14833 eval x=\"$x\"
14834 exec_prefix="$acl_save_exec_prefix"
14835 prefix="$acl_save_prefix"
14836
14837 if test "X$x" = "X$element"; then
14838 haveit=yes
14839 break
14840 fi
14841 done
14842 if test -z "$haveit"; then
14843 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14844 fi
14845 done
14846
14847
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14849 $as_echo_n "checking for iconv... " >&6; }
14850 if ${am_cv_func_iconv+:} false; then :
14851 $as_echo_n "(cached) " >&6
14852 else
14853
14854 am_cv_func_iconv="no, consider installing GNU libiconv"
14855 am_cv_lib_iconv=no
14856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14857 /* end confdefs.h. */
14858
14859 #include <stdlib.h>
14860 #include <iconv.h>
14861
14862 int
14863 main ()
14864 {
14865 iconv_t cd = iconv_open("","");
14866 iconv(cd,NULL,NULL,NULL,NULL);
14867 iconv_close(cd);
14868 ;
14869 return 0;
14870 }
14871 _ACEOF
14872 if ac_fn_c_try_link "$LINENO"; then :
14873 am_cv_func_iconv=yes
14874 fi
14875 rm -f core conftest.err conftest.$ac_objext \
14876 conftest$ac_exeext conftest.$ac_ext
14877 if test "$am_cv_func_iconv" != yes; then
14878 am_save_LIBS="$LIBS"
14879 LIBS="$LIBS $LIBICONV"
14880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14881 /* end confdefs.h. */
14882
14883 #include <stdlib.h>
14884 #include <iconv.h>
14885
14886 int
14887 main ()
14888 {
14889 iconv_t cd = iconv_open("","");
14890 iconv(cd,NULL,NULL,NULL,NULL);
14891 iconv_close(cd);
14892 ;
14893 return 0;
14894 }
14895 _ACEOF
14896 if ac_fn_c_try_link "$LINENO"; then :
14897 am_cv_lib_iconv=yes
14898 am_cv_func_iconv=yes
14899 fi
14900 rm -f core conftest.err conftest.$ac_objext \
14901 conftest$ac_exeext conftest.$ac_ext
14902 LIBS="$am_save_LIBS"
14903 fi
14904
14905 fi
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14907 $as_echo "$am_cv_func_iconv" >&6; }
14908 if test "$am_cv_func_iconv" = yes; then
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14910 $as_echo_n "checking for working iconv... " >&6; }
14911 if ${am_cv_func_iconv_works+:} false; then :
14912 $as_echo_n "(cached) " >&6
14913 else
14914
14915 am_save_LIBS="$LIBS"
14916 if test $am_cv_lib_iconv = yes; then
14917 LIBS="$LIBS $LIBICONV"
14918 fi
14919 am_cv_func_iconv_works=no
14920 for ac_iconv_const in '' 'const'; do
14921 if test "$cross_compiling" = yes; then :
14922 case "$host_os" in
14923 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14924 *) am_cv_func_iconv_works="guessing yes" ;;
14925 esac
14926 else
14927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14928 /* end confdefs.h. */
14929
14930 #include <iconv.h>
14931 #include <string.h>
14932
14933 #ifndef ICONV_CONST
14934 # define ICONV_CONST $ac_iconv_const
14935 #endif
14936
14937 int
14938 main ()
14939 {
14940 int result = 0;
14941 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14942 successful returns. This is even documented in
14943 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14944 {
14945 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14946 if (cd_utf8_to_88591 != (iconv_t)(-1))
14947 {
14948 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14949 char buf[10];
14950 ICONV_CONST char *inptr = input;
14951 size_t inbytesleft = strlen (input);
14952 char *outptr = buf;
14953 size_t outbytesleft = sizeof (buf);
14954 size_t res = iconv (cd_utf8_to_88591,
14955 &inptr, &inbytesleft,
14956 &outptr, &outbytesleft);
14957 if (res == 0)
14958 result |= 1;
14959 iconv_close (cd_utf8_to_88591);
14960 }
14961 }
14962 /* Test against Solaris 10 bug: Failures are not distinguishable from
14963 successful returns. */
14964 {
14965 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14966 if (cd_ascii_to_88591 != (iconv_t)(-1))
14967 {
14968 static ICONV_CONST char input[] = "\263";
14969 char buf[10];
14970 ICONV_CONST char *inptr = input;
14971 size_t inbytesleft = strlen (input);
14972 char *outptr = buf;
14973 size_t outbytesleft = sizeof (buf);
14974 size_t res = iconv (cd_ascii_to_88591,
14975 &inptr, &inbytesleft,
14976 &outptr, &outbytesleft);
14977 if (res == 0)
14978 result |= 2;
14979 iconv_close (cd_ascii_to_88591);
14980 }
14981 }
14982 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14983 {
14984 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14985 if (cd_88591_to_utf8 != (iconv_t)(-1))
14986 {
14987 static ICONV_CONST char input[] = "\304";
14988 static char buf[2] = { (char)0xDE, (char)0xAD };
14989 ICONV_CONST char *inptr = input;
14990 size_t inbytesleft = 1;
14991 char *outptr = buf;
14992 size_t outbytesleft = 1;
14993 size_t res = iconv (cd_88591_to_utf8,
14994 &inptr, &inbytesleft,
14995 &outptr, &outbytesleft);
14996 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14997 result |= 4;
14998 iconv_close (cd_88591_to_utf8);
14999 }
15000 }
15001 #if 0 /* This bug could be worked around by the caller. */
15002 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
15003 {
15004 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
15005 if (cd_88591_to_utf8 != (iconv_t)(-1))
15006 {
15007 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
15008 char buf[50];
15009 ICONV_CONST char *inptr = input;
15010 size_t inbytesleft = strlen (input);
15011 char *outptr = buf;
15012 size_t outbytesleft = sizeof (buf);
15013 size_t res = iconv (cd_88591_to_utf8,
15014 &inptr, &inbytesleft,
15015 &outptr, &outbytesleft);
15016 if ((int)res > 0)
15017 result |= 8;
15018 iconv_close (cd_88591_to_utf8);
15019 }
15020 }
15021 #endif
15022 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
15023 provided. */
15024 {
15025 /* Try standardized names. */
15026 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
15027 /* Try IRIX, OSF/1 names. */
15028 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
15029 /* Try AIX names. */
15030 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
15031 /* Try HP-UX names. */
15032 iconv_t cd4 = iconv_open ("utf8", "eucJP");
15033 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
15034 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
15035 result |= 16;
15036 if (cd1 != (iconv_t)(-1))
15037 iconv_close (cd1);
15038 if (cd2 != (iconv_t)(-1))
15039 iconv_close (cd2);
15040 if (cd3 != (iconv_t)(-1))
15041 iconv_close (cd3);
15042 if (cd4 != (iconv_t)(-1))
15043 iconv_close (cd4);
15044 }
15045 return result;
15046
15047 ;
15048 return 0;
15049 }
15050 _ACEOF
15051 if ac_fn_c_try_run "$LINENO"; then :
15052 am_cv_func_iconv_works=yes
15053 fi
15054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15055 conftest.$ac_objext conftest.beam conftest.$ac_ext
15056 fi
15057
15058 test "$am_cv_func_iconv_works" = no || break
15059 done
15060 LIBS="$am_save_LIBS"
15061
15062 fi
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
15064 $as_echo "$am_cv_func_iconv_works" >&6; }
15065 case "$am_cv_func_iconv_works" in
15066 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
15067 *) am_func_iconv=yes ;;
15068 esac
15069 else
15070 am_func_iconv=no am_cv_lib_iconv=no
15071 fi
15072 if test "$am_func_iconv" = yes; then
15073
15074 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
15075
15076 fi
15077 if test "$am_cv_lib_iconv" = yes; then
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
15079 $as_echo_n "checking how to link with libiconv... " >&6; }
15080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
15081 $as_echo "$LIBICONV" >&6; }
15082 else
15083 CPPFLAGS="$am_save_CPPFLAGS"
15084 LIBICONV=
15085 LTLIBICONV=
15086 fi
15087
15088
15089
15090 if test "$am_cv_func_iconv" = yes; then
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
15092 $as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
15093 if ${gl_cv_iconv_nonconst+:} false; then :
15094 $as_echo_n "(cached) " >&6
15095 else
15096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097 /* end confdefs.h. */
15098
15099 #include <stdlib.h>
15100 #include <iconv.h>
15101 extern
15102 #ifdef __cplusplus
15103 "C"
15104 #endif
15105 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
15106
15107 int
15108 main ()
15109 {
15110
15111 ;
15112 return 0;
15113 }
15114 _ACEOF
15115 if ac_fn_c_try_compile "$LINENO"; then :
15116 gl_cv_iconv_nonconst=yes
15117 else
15118 gl_cv_iconv_nonconst=no
15119 fi
15120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15121
15122 fi
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
15124 $as_echo "$gl_cv_iconv_nonconst" >&6; }
15125 else
15126 gl_cv_iconv_nonconst=yes
15127 fi
15128 if test $gl_cv_iconv_nonconst = yes; then
15129 iconv_arg1=""
15130 else
15131 iconv_arg1="const"
15132 fi
15133
15134 cat >>confdefs.h <<_ACEOF
15135 #define ICONV_CONST $iconv_arg1
15136 _ACEOF
15137
15138
15139
15140 if test "$am_func_iconv" = yes; then
15141 if test -n "$LIBICONV"; then
15142 am_cv_func_iconv_summary='yes, in libiconv'
15143 else
15144 am_cv_func_iconv_summary='yes, in libc'
15145 fi
15146 else
15147 if test "$am_cv_func_iconv" = yes; then
15148 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
15149 else
15150 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
15151 fi
15152 fi
15153
15154 MAYBE_LIBICONV=
15155 case "$host" in
15156 *linux*)
15157 if test "$am_cv_func_iconv" != yes; then
15158 as_fn_error $? "could not find libiconv (required for host $host)" "$LINENO" 5
15159 fi
15160
15161 MAYBE_LIBICONV="$LIBICONV"
15162 ;;
15163 esac
15164
15165
15166
15167 ac_config_files="$ac_config_files Makefile"
15168
15169
15170 cat >confcache <<\_ACEOF
15171 # This file is a shell script that caches the results of configure
15172 # tests run on this system so they can be shared between configure
15173 # scripts and configure runs, see configure's option --config-cache.
15174 # It is not useful on other systems. If it contains results you don't
15175 # want to keep, you may remove or edit it.
15176 #
15177 # config.status only pays attention to the cache file if you give it
15178 # the --recheck option to rerun configure.
15179 #
15180 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15181 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15182 # following values.
15183
15184 _ACEOF
15185
15186 # The following way of writing the cache mishandles newlines in values,
15187 # but we know of no workaround that is simple, portable, and efficient.
15188 # So, we kill variables containing newlines.
15189 # Ultrix sh set writes to stderr and can't be redirected directly,
15190 # and sets the high bit in the cache file unless we assign to the vars.
15191 (
15192 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15193 eval ac_val=\$$ac_var
15194 case $ac_val in #(
15195 *${as_nl}*)
15196 case $ac_var in #(
15197 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15198 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15199 esac
15200 case $ac_var in #(
15201 _ | IFS | as_nl) ;; #(
15202 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15203 *) { eval $ac_var=; unset $ac_var;} ;;
15204 esac ;;
15205 esac
15206 done
15207
15208 (set) 2>&1 |
15209 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15210 *${as_nl}ac_space=\ *)
15211 # `set' does not quote correctly, so add quotes: double-quote
15212 # substitution turns \\\\ into \\, and sed turns \\ into \.
15213 sed -n \
15214 "s/'/'\\\\''/g;
15215 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15216 ;; #(
15217 *)
15218 # `set' quotes correctly as required by POSIX, so do not add quotes.
15219 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15220 ;;
15221 esac |
15222 sort
15223 ) |
15224 sed '
15225 /^ac_cv_env_/b end
15226 t clear
15227 :clear
15228 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15229 t end
15230 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15231 :end' >>confcache
15232 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15233 if test -w "$cache_file"; then
15234 if test "x$cache_file" != "x/dev/null"; then
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15236 $as_echo "$as_me: updating cache $cache_file" >&6;}
15237 if test ! -f "$cache_file" || test -h "$cache_file"; then
15238 cat confcache >"$cache_file"
15239 else
15240 case $cache_file in #(
15241 */* | ?:*)
15242 mv -f confcache "$cache_file"$$ &&
15243 mv -f "$cache_file"$$ "$cache_file" ;; #(
15244 *)
15245 mv -f confcache "$cache_file" ;;
15246 esac
15247 fi
15248 fi
15249 else
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15251 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15252 fi
15253 fi
15254 rm -f confcache
15255
15256 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15257 # Let make expand exec_prefix.
15258 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15259
15260 DEFS=-DHAVE_CONFIG_H
15261
15262 ac_libobjs=
15263 ac_ltlibobjs=
15264 U=
15265 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15266 # 1. Remove the extension, and $U if already installed.
15267 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15268 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15269 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15270 # will be set to the directory where LIBOBJS objects are built.
15271 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15272 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15273 done
15274 LIBOBJS=$ac_libobjs
15275
15276 LTLIBOBJS=$ac_ltlibobjs
15277
15278
15279 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
15280 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
15281 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15282 fi
15283
15284 : "${CONFIG_STATUS=./config.status}"
15285 ac_write_fail=0
15286 ac_clean_files_save=$ac_clean_files
15287 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15289 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15290 as_write_fail=0
15291 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15292 #! $SHELL
15293 # Generated by $as_me.
15294 # Run this file to recreate the current configuration.
15295 # Compiler output produced by configure, useful for debugging
15296 # configure, is in config.log if it exists.
15297
15298 debug=false
15299 ac_cs_recheck=false
15300 ac_cs_silent=false
15301
15302 SHELL=\${CONFIG_SHELL-$SHELL}
15303 export SHELL
15304 _ASEOF
15305 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15306 ## -------------------- ##
15307 ## M4sh Initialization. ##
15308 ## -------------------- ##
15309
15310 # Be more Bourne compatible
15311 DUALCASE=1; export DUALCASE # for MKS sh
15312 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15313 emulate sh
15314 NULLCMD=:
15315 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15316 # is contrary to our usage. Disable this feature.
15317 alias -g '${1+"$@"}'='"$@"'
15318 setopt NO_GLOB_SUBST
15319 else
15320 case `(set -o) 2>/dev/null` in #(
15321 *posix*) :
15322 set -o posix ;; #(
15323 *) :
15324 ;;
15325 esac
15326 fi
15327
15328
15329 as_nl='
15330 '
15331 export as_nl
15332 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15333 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15334 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15335 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15336 # Prefer a ksh shell builtin over an external printf program on Solaris,
15337 # but without wasting forks for bash or zsh.
15338 if test -z "$BASH_VERSION$ZSH_VERSION" \
15339 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15340 as_echo='print -r --'
15341 as_echo_n='print -rn --'
15342 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15343 as_echo='printf %s\n'
15344 as_echo_n='printf %s'
15345 else
15346 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15347 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15348 as_echo_n='/usr/ucb/echo -n'
15349 else
15350 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15351 as_echo_n_body='eval
15352 arg=$1;
15353 case $arg in #(
15354 *"$as_nl"*)
15355 expr "X$arg" : "X\\(.*\\)$as_nl";
15356 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15357 esac;
15358 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15359 '
15360 export as_echo_n_body
15361 as_echo_n='sh -c $as_echo_n_body as_echo'
15362 fi
15363 export as_echo_body
15364 as_echo='sh -c $as_echo_body as_echo'
15365 fi
15366
15367 # The user is always right.
15368 if test "${PATH_SEPARATOR+set}" != set; then
15369 PATH_SEPARATOR=:
15370 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15371 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15372 PATH_SEPARATOR=';'
15373 }
15374 fi
15375
15376
15377 # IFS
15378 # We need space, tab and new line, in precisely that order. Quoting is
15379 # there to prevent editors from complaining about space-tab.
15380 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15381 # splitting by setting IFS to empty value.)
15382 IFS=" "" $as_nl"
15383
15384 # Find who we are. Look in the path if we contain no directory separator.
15385 as_myself=
15386 case $0 in #((
15387 *[\\/]* ) as_myself=$0 ;;
15388 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15389 for as_dir in $PATH
15390 do
15391 IFS=$as_save_IFS
15392 test -z "$as_dir" && as_dir=.
15393 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15394 done
15395 IFS=$as_save_IFS
15396
15397 ;;
15398 esac
15399 # We did not find ourselves, most probably we were run as `sh COMMAND'
15400 # in which case we are not to be found in the path.
15401 if test "x$as_myself" = x; then
15402 as_myself=$0
15403 fi
15404 if test ! -f "$as_myself"; then
15405 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15406 exit 1
15407 fi
15408
15409 # Unset variables that we do not need and which cause bugs (e.g. in
15410 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15411 # suppresses any "Segmentation fault" message there. '((' could
15412 # trigger a bug in pdksh 5.2.14.
15413 for as_var in BASH_ENV ENV MAIL MAILPATH
15414 do eval test x\${$as_var+set} = xset \
15415 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15416 done
15417 PS1='$ '
15418 PS2='> '
15419 PS4='+ '
15420
15421 # NLS nuisances.
15422 LC_ALL=C
15423 export LC_ALL
15424 LANGUAGE=C
15425 export LANGUAGE
15426
15427 # CDPATH.
15428 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15429
15430
15431 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15432 # ----------------------------------------
15433 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15434 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15435 # script with STATUS, using 1 if that was 0.
15436 as_fn_error ()
15437 {
15438 as_status=$1; test $as_status -eq 0 && as_status=1
15439 if test "$4"; then
15440 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15441 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15442 fi
15443 $as_echo "$as_me: error: $2" >&2
15444 as_fn_exit $as_status
15445 } # as_fn_error
15446
15447
15448 # as_fn_set_status STATUS
15449 # -----------------------
15450 # Set $? to STATUS, without forking.
15451 as_fn_set_status ()
15452 {
15453 return $1
15454 } # as_fn_set_status
15455
15456 # as_fn_exit STATUS
15457 # -----------------
15458 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15459 as_fn_exit ()
15460 {
15461 set +e
15462 as_fn_set_status $1
15463 exit $1
15464 } # as_fn_exit
15465
15466 # as_fn_unset VAR
15467 # ---------------
15468 # Portably unset VAR.
15469 as_fn_unset ()
15470 {
15471 { eval $1=; unset $1;}
15472 }
15473 as_unset=as_fn_unset
15474 # as_fn_append VAR VALUE
15475 # ----------------------
15476 # Append the text in VALUE to the end of the definition contained in VAR. Take
15477 # advantage of any shell optimizations that allow amortized linear growth over
15478 # repeated appends, instead of the typical quadratic growth present in naive
15479 # implementations.
15480 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15481 eval 'as_fn_append ()
15482 {
15483 eval $1+=\$2
15484 }'
15485 else
15486 as_fn_append ()
15487 {
15488 eval $1=\$$1\$2
15489 }
15490 fi # as_fn_append
15491
15492 # as_fn_arith ARG...
15493 # ------------------
15494 # Perform arithmetic evaluation on the ARGs, and store the result in the
15495 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15496 # must be portable across $(()) and expr.
15497 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15498 eval 'as_fn_arith ()
15499 {
15500 as_val=$(( $* ))
15501 }'
15502 else
15503 as_fn_arith ()
15504 {
15505 as_val=`expr "$@" || test $? -eq 1`
15506 }
15507 fi # as_fn_arith
15508
15509
15510 if expr a : '\(a\)' >/dev/null 2>&1 &&
15511 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15512 as_expr=expr
15513 else
15514 as_expr=false
15515 fi
15516
15517 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15518 as_basename=basename
15519 else
15520 as_basename=false
15521 fi
15522
15523 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15524 as_dirname=dirname
15525 else
15526 as_dirname=false
15527 fi
15528
15529 as_me=`$as_basename -- "$0" ||
15530 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15531 X"$0" : 'X\(//\)$' \| \
15532 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15533 $as_echo X/"$0" |
15534 sed '/^.*\/\([^/][^/]*\)\/*$/{
15535 s//\1/
15536 q
15537 }
15538 /^X\/\(\/\/\)$/{
15539 s//\1/
15540 q
15541 }
15542 /^X\/\(\/\).*/{
15543 s//\1/
15544 q
15545 }
15546 s/.*/./; q'`
15547
15548 # Avoid depending upon Character Ranges.
15549 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15550 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15551 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15552 as_cr_digits='0123456789'
15553 as_cr_alnum=$as_cr_Letters$as_cr_digits
15554
15555 ECHO_C= ECHO_N= ECHO_T=
15556 case `echo -n x` in #(((((
15557 -n*)
15558 case `echo 'xy\c'` in
15559 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15560 xy) ECHO_C='\c';;
15561 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15562 ECHO_T=' ';;
15563 esac;;
15564 *)
15565 ECHO_N='-n';;
15566 esac
15567
15568 rm -f conf$$ conf$$.exe conf$$.file
15569 if test -d conf$$.dir; then
15570 rm -f conf$$.dir/conf$$.file
15571 else
15572 rm -f conf$$.dir
15573 mkdir conf$$.dir 2>/dev/null
15574 fi
15575 if (echo >conf$$.file) 2>/dev/null; then
15576 if ln -s conf$$.file conf$$ 2>/dev/null; then
15577 as_ln_s='ln -s'
15578 # ... but there are two gotchas:
15579 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15580 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15581 # In both cases, we have to default to `cp -pR'.
15582 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15583 as_ln_s='cp -pR'
15584 elif ln conf$$.file conf$$ 2>/dev/null; then
15585 as_ln_s=ln
15586 else
15587 as_ln_s='cp -pR'
15588 fi
15589 else
15590 as_ln_s='cp -pR'
15591 fi
15592 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15593 rmdir conf$$.dir 2>/dev/null
15594
15595
15596 # as_fn_mkdir_p
15597 # -------------
15598 # Create "$as_dir" as a directory, including parents if necessary.
15599 as_fn_mkdir_p ()
15600 {
15601
15602 case $as_dir in #(
15603 -*) as_dir=./$as_dir;;
15604 esac
15605 test -d "$as_dir" || eval $as_mkdir_p || {
15606 as_dirs=
15607 while :; do
15608 case $as_dir in #(
15609 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15610 *) as_qdir=$as_dir;;
15611 esac
15612 as_dirs="'$as_qdir' $as_dirs"
15613 as_dir=`$as_dirname -- "$as_dir" ||
15614 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15615 X"$as_dir" : 'X\(//\)[^/]' \| \
15616 X"$as_dir" : 'X\(//\)$' \| \
15617 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15618 $as_echo X"$as_dir" |
15619 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15620 s//\1/
15621 q
15622 }
15623 /^X\(\/\/\)[^/].*/{
15624 s//\1/
15625 q
15626 }
15627 /^X\(\/\/\)$/{
15628 s//\1/
15629 q
15630 }
15631 /^X\(\/\).*/{
15632 s//\1/
15633 q
15634 }
15635 s/.*/./; q'`
15636 test -d "$as_dir" && break
15637 done
15638 test -z "$as_dirs" || eval "mkdir $as_dirs"
15639 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15640
15641
15642 } # as_fn_mkdir_p
15643 if mkdir -p . 2>/dev/null; then
15644 as_mkdir_p='mkdir -p "$as_dir"'
15645 else
15646 test -d ./-p && rmdir ./-p
15647 as_mkdir_p=false
15648 fi
15649
15650
15651 # as_fn_executable_p FILE
15652 # -----------------------
15653 # Test if FILE is an executable regular file.
15654 as_fn_executable_p ()
15655 {
15656 test -f "$1" && test -x "$1"
15657 } # as_fn_executable_p
15658 as_test_x='test -x'
15659 as_executable_p=as_fn_executable_p
15660
15661 # Sed expression to map a string onto a valid CPP name.
15662 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15663
15664 # Sed expression to map a string onto a valid variable name.
15665 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15666
15667
15668 exec 6>&1
15669 ## ----------------------------------- ##
15670 ## Main body of $CONFIG_STATUS script. ##
15671 ## ----------------------------------- ##
15672 _ASEOF
15673 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15674
15675 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15676 # Save the log message, to keep $0 and so on meaningful, and to
15677 # report actual input values of CONFIG_FILES etc. instead of their
15678 # values after options handling.
15679 ac_log="
15680 This file was extended by $as_me, which was
15681 generated by GNU Autoconf 2.69. Invocation command line was
15682
15683 CONFIG_FILES = $CONFIG_FILES
15684 CONFIG_HEADERS = $CONFIG_HEADERS
15685 CONFIG_LINKS = $CONFIG_LINKS
15686 CONFIG_COMMANDS = $CONFIG_COMMANDS
15687 $ $0 $@
15688
15689 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15690 "
15691
15692 _ACEOF
15693
15694 case $ac_config_files in *"
15695 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15696 esac
15697
15698 case $ac_config_headers in *"
15699 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15700 esac
15701
15702
15703 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15704 # Files that config.status was made for.
15705 config_files="$ac_config_files"
15706 config_headers="$ac_config_headers"
15707 config_commands="$ac_config_commands"
15708
15709 _ACEOF
15710
15711 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15712 ac_cs_usage="\
15713 \`$as_me' instantiates files and other configuration actions
15714 from templates according to the current configuration. Unless the files
15715 and actions are specified as TAGs, all are instantiated by default.
15716
15717 Usage: $0 [OPTION]... [TAG]...
15718
15719 -h, --help print this help, then exit
15720 -V, --version print version number and configuration settings, then exit
15721 --config print configuration, then exit
15722 -q, --quiet, --silent
15723 do not print progress messages
15724 -d, --debug don't remove temporary files
15725 --recheck update $as_me by reconfiguring in the same conditions
15726 --file=FILE[:TEMPLATE]
15727 instantiate the configuration file FILE
15728 --header=FILE[:TEMPLATE]
15729 instantiate the configuration header FILE
15730
15731 Configuration files:
15732 $config_files
15733
15734 Configuration headers:
15735 $config_headers
15736
15737 Configuration commands:
15738 $config_commands
15739
15740 Report bugs to the package provider."
15741
15742 _ACEOF
15743 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15744 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15745 ac_cs_version="\\
15746 config.status
15747 configured by $0, generated by GNU Autoconf 2.69,
15748 with options \\"\$ac_cs_config\\"
15749
15750 Copyright (C) 2012 Free Software Foundation, Inc.
15751 This config.status script is free software; the Free Software Foundation
15752 gives unlimited permission to copy, distribute and modify it."
15753
15754 ac_pwd='$ac_pwd'
15755 srcdir='$srcdir'
15756 INSTALL='$INSTALL'
15757 test -n "\$AWK" || AWK=awk
15758 _ACEOF
15759
15760 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15761 # The default lists apply if the user does not specify any file.
15762 ac_need_defaults=:
15763 while test $# != 0
15764 do
15765 case $1 in
15766 --*=?*)
15767 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15768 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15769 ac_shift=:
15770 ;;
15771 --*=)
15772 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15773 ac_optarg=
15774 ac_shift=:
15775 ;;
15776 *)
15777 ac_option=$1
15778 ac_optarg=$2
15779 ac_shift=shift
15780 ;;
15781 esac
15782
15783 case $ac_option in
15784 # Handling of the options.
15785 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15786 ac_cs_recheck=: ;;
15787 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15788 $as_echo "$ac_cs_version"; exit ;;
15789 --config | --confi | --conf | --con | --co | --c )
15790 $as_echo "$ac_cs_config"; exit ;;
15791 --debug | --debu | --deb | --de | --d | -d )
15792 debug=: ;;
15793 --file | --fil | --fi | --f )
15794 $ac_shift
15795 case $ac_optarg in
15796 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15797 '') as_fn_error $? "missing file argument" ;;
15798 esac
15799 as_fn_append CONFIG_FILES " '$ac_optarg'"
15800 ac_need_defaults=false;;
15801 --header | --heade | --head | --hea )
15802 $ac_shift
15803 case $ac_optarg in
15804 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15805 esac
15806 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15807 ac_need_defaults=false;;
15808 --he | --h)
15809 # Conflict between --help and --header
15810 as_fn_error $? "ambiguous option: \`$1'
15811 Try \`$0 --help' for more information.";;
15812 --help | --hel | -h )
15813 $as_echo "$ac_cs_usage"; exit ;;
15814 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15815 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15816 ac_cs_silent=: ;;
15817
15818 # This is an error.
15819 -*) as_fn_error $? "unrecognized option: \`$1'
15820 Try \`$0 --help' for more information." ;;
15821
15822 *) as_fn_append ac_config_targets " $1"
15823 ac_need_defaults=false ;;
15824
15825 esac
15826 shift
15827 done
15828
15829 ac_configure_extra_args=
15830
15831 if $ac_cs_silent; then
15832 exec 6>/dev/null
15833 ac_configure_extra_args="$ac_configure_extra_args --silent"
15834 fi
15835
15836 _ACEOF
15837 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15838 if \$ac_cs_recheck; then
15839 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15840 shift
15841 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15842 CONFIG_SHELL='$SHELL'
15843 export CONFIG_SHELL
15844 exec "\$@"
15845 fi
15846
15847 _ACEOF
15848 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15849 exec 5>>config.log
15850 {
15851 echo
15852 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15853 ## Running $as_me. ##
15854 _ASBOX
15855 $as_echo "$ac_log"
15856 } >&5
15857
15858 _ACEOF
15859 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15860 #
15861 # INIT-COMMANDS
15862 #
15863 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
15864 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
15865 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
15866 # from automake.
15867 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
15868 # Capture the value of LINGUAS because we need it to compute CATALOGS.
15869 LINGUAS="${LINGUAS-%UNSET%}"
15870
15871 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
15872
15873 _ACEOF
15874
15875 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15876
15877 # Handling of arguments.
15878 for ac_config_target in $ac_config_targets
15879 do
15880 case $ac_config_target in
15881 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15882 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15883 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
15884 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
15885 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15886
15887 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15888 esac
15889 done
15890
15891
15892 # If the user did not use the arguments to specify the items to instantiate,
15893 # then the envvar interface is used. Set only those that are not.
15894 # We use the long form for the default assignment because of an extremely
15895 # bizarre bug on SunOS 4.1.3.
15896 if $ac_need_defaults; then
15897 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15898 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15899 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15900 fi
15901
15902 # Have a temporary directory for convenience. Make it in the build tree
15903 # simply because there is no reason against having it here, and in addition,
15904 # creating and moving files from /tmp can sometimes cause problems.
15905 # Hook for its removal unless debugging.
15906 # Note that there is a small window in which the directory will not be cleaned:
15907 # after its creation but before its name has been assigned to `$tmp'.
15908 $debug ||
15909 {
15910 tmp= ac_tmp=
15911 trap 'exit_status=$?
15912 : "${ac_tmp:=$tmp}"
15913 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15914 ' 0
15915 trap 'as_fn_exit 1' 1 2 13 15
15916 }
15917 # Create a (secure) tmp directory for tmp files.
15918
15919 {
15920 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15921 test -d "$tmp"
15922 } ||
15923 {
15924 tmp=./conf$$-$RANDOM
15925 (umask 077 && mkdir "$tmp")
15926 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15927 ac_tmp=$tmp
15928
15929 # Set up the scripts for CONFIG_FILES section.
15930 # No need to generate them if there are no CONFIG_FILES.
15931 # This happens for instance with `./config.status config.h'.
15932 if test -n "$CONFIG_FILES"; then
15933
15934
15935 ac_cr=`echo X | tr X '\015'`
15936 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15937 # But we know of no other shell where ac_cr would be empty at this
15938 # point, so we can use a bashism as a fallback.
15939 if test "x$ac_cr" = x; then
15940 eval ac_cr=\$\'\\r\'
15941 fi
15942 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15943 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15944 ac_cs_awk_cr='\\r'
15945 else
15946 ac_cs_awk_cr=$ac_cr
15947 fi
15948
15949 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15950 _ACEOF
15951
15952
15953 {
15954 echo "cat >conf$$subs.awk <<_ACEOF" &&
15955 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15956 echo "_ACEOF"
15957 } >conf$$subs.sh ||
15958 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15959 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15960 ac_delim='%!_!# '
15961 for ac_last_try in false false false false false :; do
15962 . ./conf$$subs.sh ||
15963 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15964
15965 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15966 if test $ac_delim_n = $ac_delim_num; then
15967 break
15968 elif $ac_last_try; then
15969 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15970 else
15971 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15972 fi
15973 done
15974 rm -f conf$$subs.sh
15975
15976 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15977 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15978 _ACEOF
15979 sed -n '
15980 h
15981 s/^/S["/; s/!.*/"]=/
15982 p
15983 g
15984 s/^[^!]*!//
15985 :repl
15986 t repl
15987 s/'"$ac_delim"'$//
15988 t delim
15989 :nl
15990 h
15991 s/\(.\{148\}\)..*/\1/
15992 t more1
15993 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15994 p
15995 n
15996 b repl
15997 :more1
15998 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15999 p
16000 g
16001 s/.\{148\}//
16002 t nl
16003 :delim
16004 h
16005 s/\(.\{148\}\)..*/\1/
16006 t more2
16007 s/["\\]/\\&/g; s/^/"/; s/$/"/
16008 p
16009 b
16010 :more2
16011 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16012 p
16013 g
16014 s/.\{148\}//
16015 t delim
16016 ' <conf$$subs.awk | sed '
16017 /^[^""]/{
16018 N
16019 s/\n//
16020 }
16021 ' >>$CONFIG_STATUS || ac_write_fail=1
16022 rm -f conf$$subs.awk
16023 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16024 _ACAWK
16025 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16026 for (key in S) S_is_set[key] = 1
16027 FS = ""
16028
16029 }
16030 {
16031 line = $ 0
16032 nfields = split(line, field, "@")
16033 substed = 0
16034 len = length(field[1])
16035 for (i = 2; i < nfields; i++) {
16036 key = field[i]
16037 keylen = length(key)
16038 if (S_is_set[key]) {
16039 value = S[key]
16040 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16041 len += length(value) + length(field[++i])
16042 substed = 1
16043 } else
16044 len += 1 + keylen
16045 }
16046
16047 print line
16048 }
16049
16050 _ACAWK
16051 _ACEOF
16052 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16053 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16054 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16055 else
16056 cat
16057 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16058 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16059 _ACEOF
16060
16061 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16062 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16063 # trailing colons and then remove the whole line if VPATH becomes empty
16064 # (actually we leave an empty line to preserve line numbers).
16065 if test "x$srcdir" = x.; then
16066 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16067 h
16068 s///
16069 s/^/:/
16070 s/[ ]*$/:/
16071 s/:\$(srcdir):/:/g
16072 s/:\${srcdir}:/:/g
16073 s/:@srcdir@:/:/g
16074 s/^:*//
16075 s/:*$//
16076 x
16077 s/\(=[ ]*\).*/\1/
16078 G
16079 s/\n//
16080 s/^[^=]*=[ ]*$//
16081 }'
16082 fi
16083
16084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16085 fi # test -n "$CONFIG_FILES"
16086
16087 # Set up the scripts for CONFIG_HEADERS section.
16088 # No need to generate them if there are no CONFIG_HEADERS.
16089 # This happens for instance with `./config.status Makefile'.
16090 if test -n "$CONFIG_HEADERS"; then
16091 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16092 BEGIN {
16093 _ACEOF
16094
16095 # Transform confdefs.h into an awk script `defines.awk', embedded as
16096 # here-document in config.status, that substitutes the proper values into
16097 # config.h.in to produce config.h.
16098
16099 # Create a delimiter string that does not exist in confdefs.h, to ease
16100 # handling of long lines.
16101 ac_delim='%!_!# '
16102 for ac_last_try in false false :; do
16103 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16104 if test -z "$ac_tt"; then
16105 break
16106 elif $ac_last_try; then
16107 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16108 else
16109 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16110 fi
16111 done
16112
16113 # For the awk script, D is an array of macro values keyed by name,
16114 # likewise P contains macro parameters if any. Preserve backslash
16115 # newline sequences.
16116
16117 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16118 sed -n '
16119 s/.\{148\}/&'"$ac_delim"'/g
16120 t rset
16121 :rset
16122 s/^[ ]*#[ ]*define[ ][ ]*/ /
16123 t def
16124 d
16125 :def
16126 s/\\$//
16127 t bsnl
16128 s/["\\]/\\&/g
16129 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16130 D["\1"]=" \3"/p
16131 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16132 d
16133 :bsnl
16134 s/["\\]/\\&/g
16135 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16136 D["\1"]=" \3\\\\\\n"\\/p
16137 t cont
16138 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16139 t cont
16140 d
16141 :cont
16142 n
16143 s/.\{148\}/&'"$ac_delim"'/g
16144 t clear
16145 :clear
16146 s/\\$//
16147 t bsnlc
16148 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16149 d
16150 :bsnlc
16151 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16152 b cont
16153 ' <confdefs.h | sed '
16154 s/'"$ac_delim"'/"\\\
16155 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16156
16157 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16158 for (key in D) D_is_set[key] = 1
16159 FS = ""
16160 }
16161 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16162 line = \$ 0
16163 split(line, arg, " ")
16164 if (arg[1] == "#") {
16165 defundef = arg[2]
16166 mac1 = arg[3]
16167 } else {
16168 defundef = substr(arg[1], 2)
16169 mac1 = arg[2]
16170 }
16171 split(mac1, mac2, "(") #)
16172 macro = mac2[1]
16173 prefix = substr(line, 1, index(line, defundef) - 1)
16174 if (D_is_set[macro]) {
16175 # Preserve the white space surrounding the "#".
16176 print prefix "define", macro P[macro] D[macro]
16177 next
16178 } else {
16179 # Replace #undef with comments. This is necessary, for example,
16180 # in the case of _POSIX_SOURCE, which is predefined and required
16181 # on some systems where configure will not decide to define it.
16182 if (defundef == "undef") {
16183 print "/*", prefix defundef, macro, "*/"
16184 next
16185 }
16186 }
16187 }
16188 { print }
16189 _ACAWK
16190 _ACEOF
16191 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16192 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16193 fi # test -n "$CONFIG_HEADERS"
16194
16195
16196 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
16197 shift
16198 for ac_tag
16199 do
16200 case $ac_tag in
16201 :[FHLC]) ac_mode=$ac_tag; continue;;
16202 esac
16203 case $ac_mode$ac_tag in
16204 :[FHL]*:*);;
16205 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16206 :[FH]-) ac_tag=-:-;;
16207 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16208 esac
16209 ac_save_IFS=$IFS
16210 IFS=:
16211 set x $ac_tag
16212 IFS=$ac_save_IFS
16213 shift
16214 ac_file=$1
16215 shift
16216
16217 case $ac_mode in
16218 :L) ac_source=$1;;
16219 :[FH])
16220 ac_file_inputs=
16221 for ac_f
16222 do
16223 case $ac_f in
16224 -) ac_f="$ac_tmp/stdin";;
16225 *) # Look for the file first in the build tree, then in the source tree
16226 # (if the path is not absolute). The absolute path cannot be DOS-style,
16227 # because $ac_f cannot contain `:'.
16228 test -f "$ac_f" ||
16229 case $ac_f in
16230 [\\/$]*) false;;
16231 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16232 esac ||
16233 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16234 esac
16235 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16236 as_fn_append ac_file_inputs " '$ac_f'"
16237 done
16238
16239 # Let's still pretend it is `configure' which instantiates (i.e., don't
16240 # use $as_me), people would be surprised to read:
16241 # /* config.h. Generated by config.status. */
16242 configure_input='Generated from '`
16243 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16244 `' by configure.'
16245 if test x"$ac_file" != x-; then
16246 configure_input="$ac_file. $configure_input"
16247 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16248 $as_echo "$as_me: creating $ac_file" >&6;}
16249 fi
16250 # Neutralize special characters interpreted by sed in replacement strings.
16251 case $configure_input in #(
16252 *\&* | *\|* | *\\* )
16253 ac_sed_conf_input=`$as_echo "$configure_input" |
16254 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16255 *) ac_sed_conf_input=$configure_input;;
16256 esac
16257
16258 case $ac_tag in
16259 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16260 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16261 esac
16262 ;;
16263 esac
16264
16265 ac_dir=`$as_dirname -- "$ac_file" ||
16266 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16267 X"$ac_file" : 'X\(//\)[^/]' \| \
16268 X"$ac_file" : 'X\(//\)$' \| \
16269 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16270 $as_echo X"$ac_file" |
16271 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16272 s//\1/
16273 q
16274 }
16275 /^X\(\/\/\)[^/].*/{
16276 s//\1/
16277 q
16278 }
16279 /^X\(\/\/\)$/{
16280 s//\1/
16281 q
16282 }
16283 /^X\(\/\).*/{
16284 s//\1/
16285 q
16286 }
16287 s/.*/./; q'`
16288 as_dir="$ac_dir"; as_fn_mkdir_p
16289 ac_builddir=.
16290
16291 case "$ac_dir" in
16292 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16293 *)
16294 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16295 # A ".." for each directory in $ac_dir_suffix.
16296 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16297 case $ac_top_builddir_sub in
16298 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16299 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16300 esac ;;
16301 esac
16302 ac_abs_top_builddir=$ac_pwd
16303 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16304 # for backward compatibility:
16305 ac_top_builddir=$ac_top_build_prefix
16306
16307 case $srcdir in
16308 .) # We are building in place.
16309 ac_srcdir=.
16310 ac_top_srcdir=$ac_top_builddir_sub
16311 ac_abs_top_srcdir=$ac_pwd ;;
16312 [\\/]* | ?:[\\/]* ) # Absolute name.
16313 ac_srcdir=$srcdir$ac_dir_suffix;
16314 ac_top_srcdir=$srcdir
16315 ac_abs_top_srcdir=$srcdir ;;
16316 *) # Relative name.
16317 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16318 ac_top_srcdir=$ac_top_build_prefix$srcdir
16319 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16320 esac
16321 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16322
16323
16324 case $ac_mode in
16325 :F)
16326 #
16327 # CONFIG_FILE
16328 #
16329
16330 case $INSTALL in
16331 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16332 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16333 esac
16334 _ACEOF
16335
16336 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16337 # If the template does not know about datarootdir, expand it.
16338 # FIXME: This hack should be removed a few years after 2.60.
16339 ac_datarootdir_hack=; ac_datarootdir_seen=
16340 ac_sed_dataroot='
16341 /datarootdir/ {
16342 p
16343 q
16344 }
16345 /@datadir@/p
16346 /@docdir@/p
16347 /@infodir@/p
16348 /@localedir@/p
16349 /@mandir@/p'
16350 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16351 *datarootdir*) ac_datarootdir_seen=yes;;
16352 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16354 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16355 _ACEOF
16356 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16357 ac_datarootdir_hack='
16358 s&@datadir@&$datadir&g
16359 s&@docdir@&$docdir&g
16360 s&@infodir@&$infodir&g
16361 s&@localedir@&$localedir&g
16362 s&@mandir@&$mandir&g
16363 s&\\\${datarootdir}&$datarootdir&g' ;;
16364 esac
16365 _ACEOF
16366
16367 # Neutralize VPATH when `$srcdir' = `.'.
16368 # Shell code in configure.ac might set extrasub.
16369 # FIXME: do we really want to maintain this feature?
16370 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16371 ac_sed_extra="$ac_vpsub
16372 $extrasub
16373 _ACEOF
16374 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16375 :t
16376 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16377 s|@configure_input@|$ac_sed_conf_input|;t t
16378 s&@top_builddir@&$ac_top_builddir_sub&;t t
16379 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16380 s&@srcdir@&$ac_srcdir&;t t
16381 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16382 s&@top_srcdir@&$ac_top_srcdir&;t t
16383 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16384 s&@builddir@&$ac_builddir&;t t
16385 s&@abs_builddir@&$ac_abs_builddir&;t t
16386 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16387 s&@INSTALL@&$ac_INSTALL&;t t
16388 $ac_datarootdir_hack
16389 "
16390 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16391 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16392
16393 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16394 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16395 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16396 "$ac_tmp/out"`; test -z "$ac_out"; } &&
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16398 which seems to be undefined. Please make sure it is defined" >&5
16399 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16400 which seems to be undefined. Please make sure it is defined" >&2;}
16401
16402 rm -f "$ac_tmp/stdin"
16403 case $ac_file in
16404 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16405 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16406 esac \
16407 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16408 ;;
16409 :H)
16410 #
16411 # CONFIG_HEADER
16412 #
16413 if test x"$ac_file" != x-; then
16414 {
16415 $as_echo "/* $configure_input */" \
16416 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16417 } >"$ac_tmp/config.h" \
16418 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16419 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16421 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16422 else
16423 rm -f "$ac_file"
16424 mv "$ac_tmp/config.h" "$ac_file" \
16425 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16426 fi
16427 else
16428 $as_echo "/* $configure_input */" \
16429 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16430 || as_fn_error $? "could not create -" "$LINENO" 5
16431 fi
16432 ;;
16433
16434 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16435 $as_echo "$as_me: executing $ac_file commands" >&6;}
16436 ;;
16437 esac
16438
16439
16440 case $ac_file$ac_mode in
16441 "config.h":H) echo > stamp-h ;;
16442 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16443 "default-1":C)
16444 for ac_file in $CONFIG_FILES; do
16445 # Support "outfile[:infile[:infile...]]"
16446 case "$ac_file" in
16447 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16448 esac
16449 # PO directories have a Makefile.in generated from Makefile.in.in.
16450 case "$ac_file" in */Makefile.in)
16451 # Adjust a relative srcdir.
16452 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16453 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
16454 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16455 # In autoconf-2.13 it is called $ac_given_srcdir.
16456 # In autoconf-2.50 it is called $srcdir.
16457 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16458 case "$ac_given_srcdir" in
16459 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16460 /*) top_srcdir="$ac_given_srcdir" ;;
16461 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
16462 esac
16463 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16464 rm -f "$ac_dir/POTFILES"
16465 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16466 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
16467 POMAKEFILEDEPS="POTFILES.in"
16468 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
16469 # on $ac_dir but don't depend on user-specified configuration
16470 # parameters.
16471 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
16472 # The LINGUAS file contains the set of available languages.
16473 if test -n "$OBSOLETE_ALL_LINGUAS"; then
16474 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
16475 fi
16476 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
16477 # Hide the ALL_LINGUAS assigment from automake.
16478 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
16479 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
16480 else
16481 # The set of available languages was given in configure.ac.
16482 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
16483 fi
16484 case "$ac_given_srcdir" in
16485 .) srcdirpre= ;;
16486 *) srcdirpre='$(srcdir)/' ;;
16487 esac
16488 POFILES=
16489 GMOFILES=
16490 UPDATEPOFILES=
16491 DUMMYPOFILES=
16492 for lang in $ALL_LINGUAS; do
16493 POFILES="$POFILES $srcdirpre$lang.po"
16494 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
16495 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
16496 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
16497 done
16498 # CATALOGS depends on both $ac_dir and the user's LINGUAS
16499 # environment variable.
16500 INST_LINGUAS=
16501 if test -n "$ALL_LINGUAS"; then
16502 for presentlang in $ALL_LINGUAS; do
16503 useit=no
16504 if test "%UNSET%" != "$LINGUAS"; then
16505 desiredlanguages="$LINGUAS"
16506 else
16507 desiredlanguages="$ALL_LINGUAS"
16508 fi
16509 for desiredlang in $desiredlanguages; do
16510 # Use the presentlang catalog if desiredlang is
16511 # a. equal to presentlang, or
16512 # b. a variant of presentlang (because in this case,
16513 # presentlang can be used as a fallback for messages
16514 # which are not translated in the desiredlang catalog).
16515 case "$desiredlang" in
16516 "$presentlang"*) useit=yes;;
16517 esac
16518 done
16519 if test $useit = yes; then
16520 INST_LINGUAS="$INST_LINGUAS $presentlang"
16521 fi
16522 done
16523 fi
16524 CATALOGS=
16525 if test -n "$INST_LINGUAS"; then
16526 for lang in $INST_LINGUAS; do
16527 CATALOGS="$CATALOGS $lang.gmo"
16528 done
16529 fi
16530 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
16531 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
16532 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
16533 if test -f "$f"; then
16534 case "$f" in
16535 *.orig | *.bak | *~) ;;
16536 *) cat "$f" >> "$ac_dir/Makefile" ;;
16537 esac
16538 fi
16539 done
16540 fi
16541 ;;
16542 esac
16543 done ;;
16544 "gdbdepdir":C)
16545 for subdir in ${CONFIG_SRC_SUBDIR}
16546 do
16547 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
16548 done ;;
16549
16550 esac
16551 done # for ac_tag
16552
16553
16554 as_fn_exit 0
16555 _ACEOF
16556 ac_clean_files=$ac_clean_files_save
16557
16558 test $ac_write_fail = 0 ||
16559 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16560
16561
16562 # configure is writing to config.log, and then calls config.status.
16563 # config.status does its own redirection, appending to config.log.
16564 # Unfortunately, on DOS this fails, as config.log is still kept open
16565 # by configure, so config.status won't be able to write to it; its
16566 # output is simply discarded. So we exec the FD to /dev/null,
16567 # effectively closing config.log, so it can be properly (re)opened and
16568 # appended to by config.status. When coming back to configure, we
16569 # need to make the FD available again.
16570 if test "$no_create" != yes; then
16571 ac_cs_success=:
16572 ac_config_status_args=
16573 test "$silent" = yes &&
16574 ac_config_status_args="$ac_config_status_args --quiet"
16575 exec 5>/dev/null
16576 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16577 exec 5>>config.log
16578 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16579 # would make configure fail if this is the last instruction.
16580 $ac_cs_success || as_fn_exit 1
16581 fi
16582 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16583 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16584 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16585 fi
16586
16587