Debian Codegraph @

gdbserver/configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell [email protected] about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="server.cc"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_header_list=
623 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 CCDEPMODE
641 CONFIG_SRC_SUBDIR
642 CATOBJEXT
643 GENCAT
644 INSTOBJEXT
645 DATADIRNAME
646 CATALOGS
647 INCINTL
648 LIBINTL_DEP
649 POSUB
650 LTLIBINTL
651 LIBINTL
652 INTLLIBS
653 LTLIBICONV
654 LIBICONV
655 INTL_MACOSX_LIBS
656 MSGMERGE
657 XGETTEXT
658 GMSGFMT
659 MSGFMT
660 USE_NLS
661 MKINSTALLDIRS
662 SET_MAKE
663 DEPDIR
664 am__leading_dot
665 host_noncanonical
666 target_noncanonical
667 WIN32APILIBS
668 LTLIBXXHASH
669 LIBXXHASH
670 HAVE_LIBXXHASH
671 LTLIBIPT
672 LIBIPT
673 HAVE_LIBIPT
674 PTHREAD_CFLAGS
675 PTHREAD_LIBS
676 PTHREAD_CC
677 ax_pthread_config
678 SED
679 ALLOCA
680 CXX_DIALECT
681 HAVE_CXX17
682 RANLIB
683 AR
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 target_os
688 target_vendor
689 target_cpu
690 target
691 host_os
692 host_vendor
693 host_cpu
694 host
695 build_os
696 build_vendor
697 build_cpu
698 build
699 INSTALL_STRIP_PROGRAM
700 STRIP
701 install_sh
702 EGREP
703 GREP
704 CPP
705 ac_ct_CXX
706 CXXFLAGS
707 CXX
708 OBJEXT
709 EXEEXT
710 ac_ct_CC
711 CPPFLAGS
712 LDFLAGS
713 CFLAGS
714 CC
715 MAINT
716 MAINTAINER_MODE_FALSE
717 MAINTAINER_MODE_TRUE
718 target_alias
719 host_alias
720 build_alias
721 LIBS
722 ECHO_T
723 ECHO_N
724 ECHO_C
725 DEFS
726 mandir
727 localedir
728 libdir
729 psdir
730 pdfdir
731 dvidir
732 htmldir
733 infodir
734 docdir
735 oldincludedir
736 includedir
737 localstatedir
738 sharedstatedir
739 sysconfdir
740 datadir
741 datarootdir
742 libexecdir
743 sbindir
744 bindir
745 program_transform_name
746 prefix
747 exec_prefix
748 PACKAGE_URL
749 PACKAGE_BUGREPORT
750 PACKAGE_STRING
751 PACKAGE_VERSION
752 PACKAGE_TARNAME
753 PACKAGE_NAME
754 PATH_SEPARATOR
755 SHELL'
756 ac_subst_files=''
757 ac_user_opts='
758 enable_option_checking
759 enable_maintainer_mode
760 enable_largefile
761 enable_threading
762 with_intel_pt
763 with_gnu_ld
764 enable_rpath
765 with_libipt_prefix
766 with_libipt_type
767 with_xxhash
768 with_libxxhash_prefix
769 with_libxxhash_type
770 enable_unit_tests
771 enable_nls
772 with_libiconv_prefix
773 with_libiconv_type
774 with_libintl_prefix
775 with_libintl_type
776 enable_werror
777 enable_build_warnings
778 enable_gdb_build_warnings
779 with_pkgversion
780 with_bugurl
781 with_libthread_db
782 enable_inprocess_agent
783 '
784 ac_precious_vars='build_alias
785 host_alias
786 target_alias
787 CC
788 CFLAGS
789 LDFLAGS
790 LIBS
791 CPPFLAGS
792 CXX
793 CXXFLAGS
794 CCC
795 CPP'
796
797
798 # Initialize some variables set by options.
799 ac_init_help=
800 ac_init_version=false
801 ac_unrecognized_opts=
802 ac_unrecognized_sep=
803 # The variables have the same names as the options, with
804 # dashes changed to underlines.
805 cache_file=/dev/null
806 exec_prefix=NONE
807 no_create=
808 no_recursion=
809 prefix=NONE
810 program_prefix=NONE
811 program_suffix=NONE
812 program_transform_name=s,x,x,
813 silent=
814 site=
815 srcdir=
816 verbose=
817 x_includes=NONE
818 x_libraries=NONE
819
820 # Installation directory options.
821 # These are left unexpanded so users can "make install exec_prefix=/foo"
822 # and all the variables that are supposed to be based on exec_prefix
823 # by default will actually change.
824 # Use braces instead of parens because sh, perl, etc. also accept them.
825 # (The list follows the same order as the GNU Coding Standards.)
826 bindir='${exec_prefix}/bin'
827 sbindir='${exec_prefix}/sbin'
828 libexecdir='${exec_prefix}/libexec'
829 datarootdir='${prefix}/share'
830 datadir='${datarootdir}'
831 sysconfdir='${prefix}/etc'
832 sharedstatedir='${prefix}/com'
833 localstatedir='${prefix}/var'
834 includedir='${prefix}/include'
835 oldincludedir='/usr/include'
836 docdir='${datarootdir}/doc/${PACKAGE}'
837 infodir='${datarootdir}/info'
838 htmldir='${docdir}'
839 dvidir='${docdir}'
840 pdfdir='${docdir}'
841 psdir='${docdir}'
842 libdir='${exec_prefix}/lib'
843 localedir='${datarootdir}/locale'
844 mandir='${datarootdir}/man'
845
846 ac_prev=
847 ac_dashdash=
848 for ac_option
849 do
850 # If the previous option needs an argument, assign it.
851 if test -n "$ac_prev"; then
852 eval $ac_prev=\$ac_option
853 ac_prev=
854 continue
855 fi
856
857 case $ac_option in
858 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
859 *=) ac_optarg= ;;
860 *) ac_optarg=yes ;;
861 esac
862
863 # Accept the important Cygnus configure options, so we can diagnose typos.
864
865 case $ac_dashdash$ac_option in
866 --)
867 ac_dashdash=yes ;;
868
869 -bindir | --bindir | --bindi | --bind | --bin | --bi)
870 ac_prev=bindir ;;
871 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
872 bindir=$ac_optarg ;;
873
874 -build | --build | --buil | --bui | --bu)
875 ac_prev=build_alias ;;
876 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
877 build_alias=$ac_optarg ;;
878
879 -cache-file | --cache-file | --cache-fil | --cache-fi \
880 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
881 ac_prev=cache_file ;;
882 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
883 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
884 cache_file=$ac_optarg ;;
885
886 --config-cache | -C)
887 cache_file=config.cache ;;
888
889 -datadir | --datadir | --datadi | --datad)
890 ac_prev=datadir ;;
891 -datadir=* | --datadir=* | --datadi=* | --datad=*)
892 datadir=$ac_optarg ;;
893
894 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
895 | --dataroo | --dataro | --datar)
896 ac_prev=datarootdir ;;
897 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
898 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
899 datarootdir=$ac_optarg ;;
900
901 -disable-* | --disable-*)
902 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
903 # Reject names that are not valid shell variable names.
904 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
905 as_fn_error $? "invalid feature name: $ac_useropt"
906 ac_useropt_orig=$ac_useropt
907 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
908 case $ac_user_opts in
909 *"
910 "enable_$ac_useropt"
911 "*) ;;
912 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
913 ac_unrecognized_sep=', ';;
914 esac
915 eval enable_$ac_useropt=no ;;
916
917 -docdir | --docdir | --docdi | --doc | --do)
918 ac_prev=docdir ;;
919 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
920 docdir=$ac_optarg ;;
921
922 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
923 ac_prev=dvidir ;;
924 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
925 dvidir=$ac_optarg ;;
926
927 -enable-* | --enable-*)
928 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
929 # Reject names that are not valid shell variable names.
930 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
931 as_fn_error $? "invalid feature name: $ac_useropt"
932 ac_useropt_orig=$ac_useropt
933 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
934 case $ac_user_opts in
935 *"
936 "enable_$ac_useropt"
937 "*) ;;
938 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
939 ac_unrecognized_sep=', ';;
940 esac
941 eval enable_$ac_useropt=\$ac_optarg ;;
942
943 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
944 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
945 | --exec | --exe | --ex)
946 ac_prev=exec_prefix ;;
947 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
948 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
949 | --exec=* | --exe=* | --ex=*)
950 exec_prefix=$ac_optarg ;;
951
952 -gas | --gas | --ga | --g)
953 # Obsolete; use --with-gas.
954 with_gas=yes ;;
955
956 -help | --help | --hel | --he | -h)
957 ac_init_help=long ;;
958 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
959 ac_init_help=recursive ;;
960 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
961 ac_init_help=short ;;
962
963 -host | --host | --hos | --ho)
964 ac_prev=host_alias ;;
965 -host=* | --host=* | --hos=* | --ho=*)
966 host_alias=$ac_optarg ;;
967
968 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
969 ac_prev=htmldir ;;
970 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
971 | --ht=*)
972 htmldir=$ac_optarg ;;
973
974 -includedir | --includedir | --includedi | --included | --include \
975 | --includ | --inclu | --incl | --inc)
976 ac_prev=includedir ;;
977 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
978 | --includ=* | --inclu=* | --incl=* | --inc=*)
979 includedir=$ac_optarg ;;
980
981 -infodir | --infodir | --infodi | --infod | --info | --inf)
982 ac_prev=infodir ;;
983 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
984 infodir=$ac_optarg ;;
985
986 -libdir | --libdir | --libdi | --libd)
987 ac_prev=libdir ;;
988 -libdir=* | --libdir=* | --libdi=* | --libd=*)
989 libdir=$ac_optarg ;;
990
991 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
992 | --libexe | --libex | --libe)
993 ac_prev=libexecdir ;;
994 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
995 | --libexe=* | --libex=* | --libe=*)
996 libexecdir=$ac_optarg ;;
997
998 -localedir | --localedir | --localedi | --localed | --locale)
999 ac_prev=localedir ;;
1000 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1001 localedir=$ac_optarg ;;
1002
1003 -localstatedir | --localstatedir | --localstatedi | --localstated \
1004 | --localstate | --localstat | --localsta | --localst | --locals)
1005 ac_prev=localstatedir ;;
1006 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1007 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1008 localstatedir=$ac_optarg ;;
1009
1010 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1011 ac_prev=mandir ;;
1012 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1013 mandir=$ac_optarg ;;
1014
1015 -nfp | --nfp | --nf)
1016 # Obsolete; use --without-fp.
1017 with_fp=no ;;
1018
1019 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1020 | --no-cr | --no-c | -n)
1021 no_create=yes ;;
1022
1023 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1024 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1025 no_recursion=yes ;;
1026
1027 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1028 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1029 | --oldin | --oldi | --old | --ol | --o)
1030 ac_prev=oldincludedir ;;
1031 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1032 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1033 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1034 oldincludedir=$ac_optarg ;;
1035
1036 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1037 ac_prev=prefix ;;
1038 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1039 prefix=$ac_optarg ;;
1040
1041 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1042 | --program-pre | --program-pr | --program-p)
1043 ac_prev=program_prefix ;;
1044 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1045 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1046 program_prefix=$ac_optarg ;;
1047
1048 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1049 | --program-suf | --program-su | --program-s)
1050 ac_prev=program_suffix ;;
1051 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1052 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1053 program_suffix=$ac_optarg ;;
1054
1055 -program-transform-name | --program-transform-name \
1056 | --program-transform-nam | --program-transform-na \
1057 | --program-transform-n | --program-transform- \
1058 | --program-transform | --program-transfor \
1059 | --program-transfo | --program-transf \
1060 | --program-trans | --program-tran \
1061 | --progr-tra | --program-tr | --program-t)
1062 ac_prev=program_transform_name ;;
1063 -program-transform-name=* | --program-transform-name=* \
1064 | --program-transform-nam=* | --program-transform-na=* \
1065 | --program-transform-n=* | --program-transform-=* \
1066 | --program-transform=* | --program-transfor=* \
1067 | --program-transfo=* | --program-transf=* \
1068 | --program-trans=* | --program-tran=* \
1069 | --progr-tra=* | --program-tr=* | --program-t=*)
1070 program_transform_name=$ac_optarg ;;
1071
1072 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1073 ac_prev=pdfdir ;;
1074 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1075 pdfdir=$ac_optarg ;;
1076
1077 -psdir | --psdir | --psdi | --psd | --ps)
1078 ac_prev=psdir ;;
1079 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1080 psdir=$ac_optarg ;;
1081
1082 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1083 | -silent | --silent | --silen | --sile | --sil)
1084 silent=yes ;;
1085
1086 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1087 ac_prev=sbindir ;;
1088 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1089 | --sbi=* | --sb=*)
1090 sbindir=$ac_optarg ;;
1091
1092 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1093 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1094 | --sharedst | --shareds | --shared | --share | --shar \
1095 | --sha | --sh)
1096 ac_prev=sharedstatedir ;;
1097 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1098 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1099 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1100 | --sha=* | --sh=*)
1101 sharedstatedir=$ac_optarg ;;
1102
1103 -site | --site | --sit)
1104 ac_prev=site ;;
1105 -site=* | --site=* | --sit=*)
1106 site=$ac_optarg ;;
1107
1108 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1109 ac_prev=srcdir ;;
1110 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1111 srcdir=$ac_optarg ;;
1112
1113 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1114 | --syscon | --sysco | --sysc | --sys | --sy)
1115 ac_prev=sysconfdir ;;
1116 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1117 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1118 sysconfdir=$ac_optarg ;;
1119
1120 -target | --target | --targe | --targ | --tar | --ta | --t)
1121 ac_prev=target_alias ;;
1122 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1123 target_alias=$ac_optarg ;;
1124
1125 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1126 verbose=yes ;;
1127
1128 -version | --version | --versio | --versi | --vers | -V)
1129 ac_init_version=: ;;
1130
1131 -with-* | --with-*)
1132 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1133 # Reject names that are not valid shell variable names.
1134 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1135 as_fn_error $? "invalid package name: $ac_useropt"
1136 ac_useropt_orig=$ac_useropt
1137 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1138 case $ac_user_opts in
1139 *"
1140 "with_$ac_useropt"
1141 "*) ;;
1142 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1143 ac_unrecognized_sep=', ';;
1144 esac
1145 eval with_$ac_useropt=\$ac_optarg ;;
1146
1147 -without-* | --without-*)
1148 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1149 # Reject names that are not valid shell variable names.
1150 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1151 as_fn_error $? "invalid package name: $ac_useropt"
1152 ac_useropt_orig=$ac_useropt
1153 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1154 case $ac_user_opts in
1155 *"
1156 "with_$ac_useropt"
1157 "*) ;;
1158 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1159 ac_unrecognized_sep=', ';;
1160 esac
1161 eval with_$ac_useropt=no ;;
1162
1163 --x)
1164 # Obsolete; use --with-x.
1165 with_x=yes ;;
1166
1167 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1168 | --x-incl | --x-inc | --x-in | --x-i)
1169 ac_prev=x_includes ;;
1170 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1171 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1172 x_includes=$ac_optarg ;;
1173
1174 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1175 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1176 ac_prev=x_libraries ;;
1177 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1178 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1179 x_libraries=$ac_optarg ;;
1180
1181 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1182 Try \`$0 --help' for more information"
1183 ;;
1184
1185 *=*)
1186 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1187 # Reject names that are not valid shell variable names.
1188 case $ac_envvar in #(
1189 '' | [0-9]* | *[!_$as_cr_alnum]* )
1190 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1191 esac
1192 eval $ac_envvar=\$ac_optarg
1193 export $ac_envvar ;;
1194
1195 *)
1196 # FIXME: should be removed in autoconf 3.0.
1197 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1198 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1199 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1200 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1201 ;;
1202
1203 esac
1204 done
1205
1206 if test -n "$ac_prev"; then
1207 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1208 as_fn_error $? "missing argument to $ac_option"
1209 fi
1210
1211 if test -n "$ac_unrecognized_opts"; then
1212 case $enable_option_checking in
1213 no) ;;
1214 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1215 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1216 esac
1217 fi
1218
1219 # Check all directory arguments for consistency.
1220 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1221 datadir sysconfdir sharedstatedir localstatedir includedir \
1222 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1223 libdir localedir mandir
1224 do
1225 eval ac_val=\$$ac_var
1226 # Remove trailing slashes.
1227 case $ac_val in
1228 */ )
1229 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1230 eval $ac_var=\$ac_val;;
1231 esac
1232 # Be sure to have absolute directory names.
1233 case $ac_val in
1234 [\\/$]* | ?:[\\/]* ) continue;;
1235 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1236 esac
1237 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1238 done
1239
1240 # There might be people who depend on the old broken behavior: `$host'
1241 # used to hold the argument of --host etc.
1242 # FIXME: To remove some day.
1243 build=$build_alias
1244 host=$host_alias
1245 target=$target_alias
1246
1247 # FIXME: To remove some day.
1248 if test "x$host_alias" != x; then
1249 if test "x$build_alias" = x; then
1250 cross_compiling=maybe
1251 elif test "x$build_alias" != "x$host_alias"; then
1252 cross_compiling=yes
1253 fi
1254 fi
1255
1256 ac_tool_prefix=
1257 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1258
1259 test "$silent" = yes && exec 6>/dev/null
1260
1261
1262 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1263 ac_ls_di=`ls -di .` &&
1264 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1265 as_fn_error $? "working directory cannot be determined"
1266 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1267 as_fn_error $? "pwd does not report name of working directory"
1268
1269
1270 # Find the source files, if location was not specified.
1271 if test -z "$srcdir"; then
1272 ac_srcdir_defaulted=yes
1273 # Try the directory containing this script, then the parent directory.
1274 ac_confdir=`$as_dirname -- "$as_myself" ||
1275 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1276 X"$as_myself" : 'X\(//\)[^/]' \| \
1277 X"$as_myself" : 'X\(//\)$' \| \
1278 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1279 $as_echo X"$as_myself" |
1280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1281 s//\1/
1282 q
1283 }
1284 /^X\(\/\/\)[^/].*/{
1285 s//\1/
1286 q
1287 }
1288 /^X\(\/\/\)$/{
1289 s//\1/
1290 q
1291 }
1292 /^X\(\/\).*/{
1293 s//\1/
1294 q
1295 }
1296 s/.*/./; q'`
1297 srcdir=$ac_confdir
1298 if test ! -r "$srcdir/$ac_unique_file"; then
1299 srcdir=..
1300 fi
1301 else
1302 ac_srcdir_defaulted=no
1303 fi
1304 if test ! -r "$srcdir/$ac_unique_file"; then
1305 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1306 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1307 fi
1308 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1309 ac_abs_confdir=`(
1310 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1311 pwd)`
1312 # When building in place, set srcdir=.
1313 if test "$ac_abs_confdir" = "$ac_pwd"; then
1314 srcdir=.
1315 fi
1316 # Remove unnecessary trailing slashes from srcdir.
1317 # Double slashes in file names in object file debugging info
1318 # mess up M-x gdb in Emacs.
1319 case $srcdir in
1320 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1321 esac
1322 for ac_var in $ac_precious_vars; do
1323 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1324 eval ac_env_${ac_var}_value=\$${ac_var}
1325 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1326 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1327 done
1328
1329 #
1330 # Report the --help message.
1331 #
1332 if test "$ac_init_help" = "long"; then
1333 # Omit some internal or obsolete options to make the list less imposing.
1334 # This message is too long to be a string in the A/UX 3.1 sh.
1335 cat <<_ACEOF
1336 \`configure' configures this package to adapt to many kinds of systems.
1337
1338 Usage: $0 [OPTION]... [VAR=VALUE]...
1339
1340 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1341 VAR=VALUE. See below for descriptions of some of the useful variables.
1342
1343 Defaults for the options are specified in brackets.
1344
1345 Configuration:
1346 -h, --help display this help and exit
1347 --help=short display options specific to this package
1348 --help=recursive display the short help of all the included packages
1349 -V, --version display version information and exit
1350 -q, --quiet, --silent do not print \`checking ...' messages
1351 --cache-file=FILE cache test results in FILE [disabled]
1352 -C, --config-cache alias for \`--cache-file=config.cache'
1353 -n, --no-create do not create output files
1354 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1355
1356 Installation directories:
1357 --prefix=PREFIX install architecture-independent files in PREFIX
1358 [$ac_default_prefix]
1359 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1360 [PREFIX]
1361
1362 By default, \`make install' will install all the files in
1363 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1364 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1365 for instance \`--prefix=\$HOME'.
1366
1367 For better control, use the options below.
1368
1369 Fine tuning of the installation directories:
1370 --bindir=DIR user executables [EPREFIX/bin]
1371 --sbindir=DIR system admin executables [EPREFIX/sbin]
1372 --libexecdir=DIR program executables [EPREFIX/libexec]
1373 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1374 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1375 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1376 --libdir=DIR object code libraries [EPREFIX/lib]
1377 --includedir=DIR C header files [PREFIX/include]
1378 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1379 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1380 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1381 --infodir=DIR info documentation [DATAROOTDIR/info]
1382 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1383 --mandir=DIR man documentation [DATAROOTDIR/man]
1384 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1385 --htmldir=DIR html documentation [DOCDIR]
1386 --dvidir=DIR dvi documentation [DOCDIR]
1387 --pdfdir=DIR pdf documentation [DOCDIR]
1388 --psdir=DIR ps documentation [DOCDIR]
1389 _ACEOF
1390
1391 cat <<\_ACEOF
1392
1393 Program names:
1394 --program-prefix=PREFIX prepend PREFIX to installed program names
1395 --program-suffix=SUFFIX append SUFFIX to installed program names
1396 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1397
1398 System types:
1399 --build=BUILD configure for building on BUILD [guessed]
1400 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1401 --target=TARGET configure for building compilers for TARGET [HOST]
1402 _ACEOF
1403 fi
1404
1405 if test -n "$ac_init_help"; then
1406
1407 cat <<\_ACEOF
1408
1409 Optional Features:
1410 --disable-option-checking ignore unrecognized --enable/--with options
1411 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1412 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1413 --enable-maintainer-mode
1414 enable make rules and dependencies not useful (and
1415 sometimes confusing) to the casual installer
1416 --disable-largefile omit support for large files
1417 --enable-threading include support for parallel processing of data
1418 (yes/no)
1419 --disable-rpath do not hardcode runtime library paths
1420 --enable-unit-tests Enable the inclusion of unit tests when compiling
1421 GDB
1422 --disable-nls do not use Native Language Support
1423 --enable-werror treat compile warnings as errors
1424 --enable-build-warnings enable build-time compiler warnings if gcc is used
1425 --enable-gdb-build-warnings
1426 enable GDB specific build-time compiler warnings if
1427 gcc is used
1428 --enable-inprocess-agent
1429 inprocess agent
1430
1431 Optional Packages:
1432 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1433 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1434 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1435 --with-gnu-ld assume the C compiler uses GNU ld default=no
1436 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1437 --without-libipt-prefix don't search for libipt in includedir and libdir
1438 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1439 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1440 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1441 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1442 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1443 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1444 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1445 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1446 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1447 --without-libintl-prefix don't search for libintl in includedir and libdir
1448 --with-libintl-type=TYPE type of library to search for (auto/static/shared)
1449 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1450 --with-bugurl=URL Direct users to URL to report a bug
1451 --with-libthread-db=PATH
1452 use given libthread_db directly
1453
1454 Some influential environment variables:
1455 CC C compiler command
1456 CFLAGS C compiler flags
1457 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1458 nonstandard directory <lib dir>
1459 LIBS libraries to pass to the linker, e.g. -l<library>
1460 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1461 you have headers in a nonstandard directory <include dir>
1462 CXX C++ compiler command
1463 CXXFLAGS C++ compiler flags
1464 CPP C preprocessor
1465
1466 Use these variables to override the choices made by `configure' or to help
1467 it to find libraries and programs with nonstandard names/locations.
1468
1469 Report bugs to the package provider.
1470 _ACEOF
1471 ac_status=$?
1472 fi
1473
1474 if test "$ac_init_help" = "recursive"; then
1475 # If there are subdirs, report their specific --help.
1476 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1477 test -d "$ac_dir" ||
1478 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1479 continue
1480 ac_builddir=.
1481
1482 case "$ac_dir" in
1483 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484 *)
1485 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1486 # A ".." for each directory in $ac_dir_suffix.
1487 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1488 case $ac_top_builddir_sub in
1489 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1491 esac ;;
1492 esac
1493 ac_abs_top_builddir=$ac_pwd
1494 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1495 # for backward compatibility:
1496 ac_top_builddir=$ac_top_build_prefix
1497
1498 case $srcdir in
1499 .) # We are building in place.
1500 ac_srcdir=.
1501 ac_top_srcdir=$ac_top_builddir_sub
1502 ac_abs_top_srcdir=$ac_pwd ;;
1503 [\\/]* | ?:[\\/]* ) # Absolute name.
1504 ac_srcdir=$srcdir$ac_dir_suffix;
1505 ac_top_srcdir=$srcdir
1506 ac_abs_top_srcdir=$srcdir ;;
1507 *) # Relative name.
1508 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1509 ac_top_srcdir=$ac_top_build_prefix$srcdir
1510 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1511 esac
1512 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1513
1514 cd "$ac_dir" || { ac_status=$?; continue; }
1515 # Check for guested configure.
1516 if test -f "$ac_srcdir/configure.gnu"; then
1517 echo &&
1518 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1519 elif test -f "$ac_srcdir/configure"; then
1520 echo &&
1521 $SHELL "$ac_srcdir/configure" --help=recursive
1522 else
1523 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1524 fi || ac_status=$?
1525 cd "$ac_pwd" || { ac_status=$?; break; }
1526 done
1527 fi
1528
1529 test -n "$ac_init_help" && exit $ac_status
1530 if $ac_init_version; then
1531 cat <<\_ACEOF
1532 configure
1533 generated by GNU Autoconf 2.69
1534
1535 Copyright (C) 2012 Free Software Foundation, Inc.
1536 This configure script is free software; the Free Software Foundation
1537 gives unlimited permission to copy, distribute and modify it.
1538 _ACEOF
1539 exit
1540 fi
1541
1542 ## ------------------------ ##
1543 ## Autoconf initialization. ##
1544 ## ------------------------ ##
1545
1546 # ac_fn_c_try_compile LINENO
1547 # --------------------------
1548 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1549 ac_fn_c_try_compile ()
1550 {
1551 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1552 rm -f conftest.$ac_objext
1553 if { { ac_try="$ac_compile"
1554 case "(($ac_try" in
1555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1556 *) ac_try_echo=$ac_try;;
1557 esac
1558 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1559 $as_echo "$ac_try_echo"; } >&5
1560 (eval "$ac_compile") 2>conftest.err
1561 ac_status=$?
1562 if test -s conftest.err; then
1563 grep -v '^ *+' conftest.err >conftest.er1
1564 cat conftest.er1 >&5
1565 mv -f conftest.er1 conftest.err
1566 fi
1567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1568 test $ac_status = 0; } && {
1569 test -z "$ac_c_werror_flag" ||
1570 test ! -s conftest.err
1571 } && test -s conftest.$ac_objext; then :
1572 ac_retval=0
1573 else
1574 $as_echo "$as_me: failed program was:" >&5
1575 sed 's/^/| /' conftest.$ac_ext >&5
1576
1577 ac_retval=1
1578 fi
1579 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1580 as_fn_set_status $ac_retval
1581
1582 } # ac_fn_c_try_compile
1583
1584 # ac_fn_cxx_try_compile LINENO
1585 # ----------------------------
1586 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1587 ac_fn_cxx_try_compile ()
1588 {
1589 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1590 rm -f conftest.$ac_objext
1591 if { { ac_try="$ac_compile"
1592 case "(($ac_try" in
1593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1594 *) ac_try_echo=$ac_try;;
1595 esac
1596 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1597 $as_echo "$ac_try_echo"; } >&5
1598 (eval "$ac_compile") 2>conftest.err
1599 ac_status=$?
1600 if test -s conftest.err; then
1601 grep -v '^ *+' conftest.err >conftest.er1
1602 cat conftest.er1 >&5
1603 mv -f conftest.er1 conftest.err
1604 fi
1605 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1606 test $ac_status = 0; } && {
1607 test -z "$ac_cxx_werror_flag" ||
1608 test ! -s conftest.err
1609 } && test -s conftest.$ac_objext; then :
1610 ac_retval=0
1611 else
1612 $as_echo "$as_me: failed program was:" >&5
1613 sed 's/^/| /' conftest.$ac_ext >&5
1614
1615 ac_retval=1
1616 fi
1617 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1618 as_fn_set_status $ac_retval
1619
1620 } # ac_fn_cxx_try_compile
1621
1622 # ac_fn_c_try_cpp LINENO
1623 # ----------------------
1624 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1625 ac_fn_c_try_cpp ()
1626 {
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 if { { ac_try="$ac_cpp conftest.$ac_ext"
1629 case "(($ac_try" in
1630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1631 *) ac_try_echo=$ac_try;;
1632 esac
1633 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1634 $as_echo "$ac_try_echo"; } >&5
1635 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1636 ac_status=$?
1637 if test -s conftest.err; then
1638 grep -v '^ *+' conftest.err >conftest.er1
1639 cat conftest.er1 >&5
1640 mv -f conftest.er1 conftest.err
1641 fi
1642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1643 test $ac_status = 0; } > conftest.i && {
1644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1645 test ! -s conftest.err
1646 }; then :
1647 ac_retval=0
1648 else
1649 $as_echo "$as_me: failed program was:" >&5
1650 sed 's/^/| /' conftest.$ac_ext >&5
1651
1652 ac_retval=1
1653 fi
1654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1655 as_fn_set_status $ac_retval
1656
1657 } # ac_fn_c_try_cpp
1658
1659 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1660 # -------------------------------------------------------
1661 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1662 # the include files in INCLUDES and setting the cache variable VAR
1663 # accordingly.
1664 ac_fn_c_check_header_mongrel ()
1665 {
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 if eval \${$3+:} false; then :
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1669 $as_echo_n "checking for $2... " >&6; }
1670 if eval \${$3+:} false; then :
1671 $as_echo_n "(cached) " >&6
1672 fi
1673 eval ac_res=\$$3
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1675 $as_echo "$ac_res" >&6; }
1676 else
1677 # Is the header compilable?
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1679 $as_echo_n "checking $2 usability... " >&6; }
1680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1681 /* end confdefs.h. */
1682 $4
1683 #include <$2>
1684 _ACEOF
1685 if ac_fn_c_try_compile "$LINENO"; then :
1686 ac_header_compiler=yes
1687 else
1688 ac_header_compiler=no
1689 fi
1690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1692 $as_echo "$ac_header_compiler" >&6; }
1693
1694 # Is the header present?
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1696 $as_echo_n "checking $2 presence... " >&6; }
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698 /* end confdefs.h. */
1699 #include <$2>
1700 _ACEOF
1701 if ac_fn_c_try_cpp "$LINENO"; then :
1702 ac_header_preproc=yes
1703 else
1704 ac_header_preproc=no
1705 fi
1706 rm -f conftest.err conftest.i conftest.$ac_ext
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1708 $as_echo "$ac_header_preproc" >&6; }
1709
1710 # So? What about this header?
1711 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1712 yes:no: )
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1714 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1717 ;;
1718 no:yes:* )
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1720 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1722 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1724 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1726 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1728 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1729 ;;
1730 esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732 $as_echo_n "checking for $2... " >&6; }
1733 if eval \${$3+:} false; then :
1734 $as_echo_n "(cached) " >&6
1735 else
1736 eval "$3=\$ac_header_compiler"
1737 fi
1738 eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740 $as_echo "$ac_res" >&6; }
1741 fi
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1743
1744 } # ac_fn_c_check_header_mongrel
1745
1746 # ac_fn_c_try_run LINENO
1747 # ----------------------
1748 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749 # that executables *can* be run.
1750 ac_fn_c_try_run ()
1751 {
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
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_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778 sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781 fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1784 as_fn_set_status $ac_retval
1785
1786 } # ac_fn_c_try_run
1787
1788 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1789 # -------------------------------------------------------
1790 # Tests whether HEADER exists and can be compiled using the include files in
1791 # INCLUDES, setting the cache variable VAR accordingly.
1792 ac_fn_c_check_header_compile ()
1793 {
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796 $as_echo_n "checking for $2... " >&6; }
1797 if eval \${$3+:} false; then :
1798 $as_echo_n "(cached) " >&6
1799 else
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801 /* end confdefs.h. */
1802 $4
1803 #include <$2>
1804 _ACEOF
1805 if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807 else
1808 eval "$3=no"
1809 fi
1810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811 fi
1812 eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814 $as_echo "$ac_res" >&6; }
1815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816
1817 } # ac_fn_c_check_header_compile
1818
1819 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1820 # -------------------------------------------
1821 # Tests whether TYPE exists after having included INCLUDES, setting cache
1822 # variable VAR accordingly.
1823 ac_fn_c_check_type ()
1824 {
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827 $as_echo_n "checking for $2... " >&6; }
1828 if eval \${$3+:} false; then :
1829 $as_echo_n "(cached) " >&6
1830 else
1831 eval "$3=no"
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833 /* end confdefs.h. */
1834 $4
1835 int
1836 main ()
1837 {
1838 if (sizeof ($2))
1839 return 0;
1840 ;
1841 return 0;
1842 }
1843 _ACEOF
1844 if ac_fn_c_try_compile "$LINENO"; then :
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846 /* end confdefs.h. */
1847 $4
1848 int
1849 main ()
1850 {
1851 if (sizeof (($2)))
1852 return 0;
1853 ;
1854 return 0;
1855 }
1856 _ACEOF
1857 if ac_fn_c_try_compile "$LINENO"; then :
1858
1859 else
1860 eval "$3=yes"
1861 fi
1862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1863 fi
1864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865 fi
1866 eval ac_res=\$$3
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1868 $as_echo "$ac_res" >&6; }
1869 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1870
1871 } # ac_fn_c_check_type
1872
1873 # ac_fn_c_try_link LINENO
1874 # -----------------------
1875 # Try to link conftest.$ac_ext, and return whether this succeeded.
1876 ac_fn_c_try_link ()
1877 {
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 rm -f conftest.$ac_objext conftest$ac_exeext
1880 if { { ac_try="$ac_link"
1881 case "(($ac_try" in
1882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1883 *) ac_try_echo=$ac_try;;
1884 esac
1885 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1886 $as_echo "$ac_try_echo"; } >&5
1887 (eval "$ac_link") 2>conftest.err
1888 ac_status=$?
1889 if test -s conftest.err; then
1890 grep -v '^ *+' conftest.err >conftest.er1
1891 cat conftest.er1 >&5
1892 mv -f conftest.er1 conftest.err
1893 fi
1894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1895 test $ac_status = 0; } && {
1896 test -z "$ac_c_werror_flag" ||
1897 test ! -s conftest.err
1898 } && test -s conftest$ac_exeext && {
1899 test "$cross_compiling" = yes ||
1900 test -x conftest$ac_exeext
1901 }; then :
1902 ac_retval=0
1903 else
1904 $as_echo "$as_me: failed program was:" >&5
1905 sed 's/^/| /' conftest.$ac_ext >&5
1906
1907 ac_retval=1
1908 fi
1909 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1910 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1911 # interfere with the next link command; also delete a directory that is
1912 # left behind by Apple's compiler. We do this before executing the actions.
1913 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1914 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1915 as_fn_set_status $ac_retval
1916
1917 } # ac_fn_c_try_link
1918
1919 # ac_fn_c_check_func LINENO FUNC VAR
1920 # ----------------------------------
1921 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1922 ac_fn_c_check_func ()
1923 {
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926 $as_echo_n "checking for $2... " >&6; }
1927 if eval \${$3+:} false; then :
1928 $as_echo_n "(cached) " >&6
1929 else
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931 /* end confdefs.h. */
1932 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1933 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1934 #define $2 innocuous_$2
1935
1936 /* System header to define __stub macros and hopefully few prototypes,
1937 which can conflict with char $2 (); below.
1938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1939 <limits.h> exists even on freestanding compilers. */
1940
1941 #ifdef __STDC__
1942 # include <limits.h>
1943 #else
1944 # include <assert.h>
1945 #endif
1946
1947 #undef $2
1948
1949 /* Override any GCC internal prototype to avoid an error.
1950 Use char because int might match the return type of a GCC
1951 builtin and then its argument prototype would still apply. */
1952 #ifdef __cplusplus
1953 extern "C"
1954 #endif
1955 char $2 ();
1956 /* The GNU C library defines this for functions which it implements
1957 to always fail with ENOSYS. Some functions are actually named
1958 something starting with __ and the normal name is an alias. */
1959 #if defined __stub_$2 || defined __stub___$2
1960 choke me
1961 #endif
1962
1963 int
1964 main ()
1965 {
1966 return $2 ();
1967 ;
1968 return 0;
1969 }
1970 _ACEOF
1971 if ac_fn_c_try_link "$LINENO"; then :
1972 eval "$3=yes"
1973 else
1974 eval "$3=no"
1975 fi
1976 rm -f core conftest.err conftest.$ac_objext \
1977 conftest$ac_exeext conftest.$ac_ext
1978 fi
1979 eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981 $as_echo "$ac_res" >&6; }
1982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1983
1984 } # ac_fn_c_check_func
1985
1986 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1987 # ---------------------------------------------
1988 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1989 # accordingly.
1990 ac_fn_c_check_decl ()
1991 {
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 as_decl_name=`echo $2|sed 's/ *(.*//'`
1994 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1996 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1997 if eval \${$3+:} false; then :
1998 $as_echo_n "(cached) " >&6
1999 else
2000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001 /* end confdefs.h. */
2002 $4
2003 int
2004 main ()
2005 {
2006 #ifndef $as_decl_name
2007 #ifdef __cplusplus
2008 (void) $as_decl_use;
2009 #else
2010 (void) $as_decl_name;
2011 #endif
2012 #endif
2013
2014 ;
2015 return 0;
2016 }
2017 _ACEOF
2018 if ac_fn_c_try_compile "$LINENO"; then :
2019 eval "$3=yes"
2020 else
2021 eval "$3=no"
2022 fi
2023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 fi
2025 eval ac_res=\$$3
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027 $as_echo "$ac_res" >&6; }
2028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029
2030 } # ac_fn_c_check_decl
2031
2032 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2033 # ----------------------------------------------------
2034 # Tries to find if the field MEMBER exists in type AGGR, after including
2035 # INCLUDES, setting cache variable VAR accordingly.
2036 ac_fn_c_check_member ()
2037 {
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2040 $as_echo_n "checking for $2.$3... " >&6; }
2041 if eval \${$4+:} false; then :
2042 $as_echo_n "(cached) " >&6
2043 else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h. */
2046 $5
2047 int
2048 main ()
2049 {
2050 static $2 ac_aggr;
2051 if (ac_aggr.$3)
2052 return 0;
2053 ;
2054 return 0;
2055 }
2056 _ACEOF
2057 if ac_fn_c_try_compile "$LINENO"; then :
2058 eval "$4=yes"
2059 else
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h. */
2062 $5
2063 int
2064 main ()
2065 {
2066 static $2 ac_aggr;
2067 if (sizeof ac_aggr.$3)
2068 return 0;
2069 ;
2070 return 0;
2071 }
2072 _ACEOF
2073 if ac_fn_c_try_compile "$LINENO"; then :
2074 eval "$4=yes"
2075 else
2076 eval "$4=no"
2077 fi
2078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 fi
2080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 fi
2082 eval ac_res=\$$4
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2084 $as_echo "$ac_res" >&6; }
2085 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2086
2087 } # ac_fn_c_check_member
2088
2089 # ac_fn_cxx_try_link LINENO
2090 # -------------------------
2091 # Try to link conftest.$ac_ext, and return whether this succeeded.
2092 ac_fn_cxx_try_link ()
2093 {
2094 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095 rm -f conftest.$ac_objext conftest$ac_exeext
2096 if { { ac_try="$ac_link"
2097 case "(($ac_try" in
2098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2099 *) ac_try_echo=$ac_try;;
2100 esac
2101 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2102 $as_echo "$ac_try_echo"; } >&5
2103 (eval "$ac_link") 2>conftest.err
2104 ac_status=$?
2105 if test -s conftest.err; then
2106 grep -v '^ *+' conftest.err >conftest.er1
2107 cat conftest.er1 >&5
2108 mv -f conftest.er1 conftest.err
2109 fi
2110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2111 test $ac_status = 0; } && {
2112 test -z "$ac_cxx_werror_flag" ||
2113 test ! -s conftest.err
2114 } && test -s conftest$ac_exeext && {
2115 test "$cross_compiling" = yes ||
2116 test -x conftest$ac_exeext
2117 }; then :
2118 ac_retval=0
2119 else
2120 $as_echo "$as_me: failed program was:" >&5
2121 sed 's/^/| /' conftest.$ac_ext >&5
2122
2123 ac_retval=1
2124 fi
2125 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2126 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2127 # interfere with the next link command; also delete a directory that is
2128 # left behind by Apple's compiler. We do this before executing the actions.
2129 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2130 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2131 as_fn_set_status $ac_retval
2132
2133 } # ac_fn_cxx_try_link
2134
2135 # ac_fn_cxx_check_func LINENO FUNC VAR
2136 # ------------------------------------
2137 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2138 ac_fn_cxx_check_func ()
2139 {
2140 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2142 $as_echo_n "checking for $2... " >&6; }
2143 if eval \${$3+:} false; then :
2144 $as_echo_n "(cached) " >&6
2145 else
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147 /* end confdefs.h. */
2148 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2149 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2150 #define $2 innocuous_$2
2151
2152 /* System header to define __stub macros and hopefully few prototypes,
2153 which can conflict with char $2 (); below.
2154 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2155 <limits.h> exists even on freestanding compilers. */
2156
2157 #ifdef __STDC__
2158 # include <limits.h>
2159 #else
2160 # include <assert.h>
2161 #endif
2162
2163 #undef $2
2164
2165 /* Override any GCC internal prototype to avoid an error.
2166 Use char because int might match the return type of a GCC
2167 builtin and then its argument prototype would still apply. */
2168 #ifdef __cplusplus
2169 extern "C"
2170 #endif
2171 char $2 ();
2172 /* The GNU C library defines this for functions which it implements
2173 to always fail with ENOSYS. Some functions are actually named
2174 something starting with __ and the normal name is an alias. */
2175 #if defined __stub_$2 || defined __stub___$2
2176 choke me
2177 #endif
2178
2179 int
2180 main ()
2181 {
2182 return $2 ();
2183 ;
2184 return 0;
2185 }
2186 _ACEOF
2187 if ac_fn_cxx_try_link "$LINENO"; then :
2188 eval "$3=yes"
2189 else
2190 eval "$3=no"
2191 fi
2192 rm -f core conftest.err conftest.$ac_objext \
2193 conftest$ac_exeext conftest.$ac_ext
2194 fi
2195 eval ac_res=\$$3
2196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2197 $as_echo "$ac_res" >&6; }
2198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199
2200 } # ac_fn_cxx_check_func
2201
2202 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2203 # --------------------------------------------
2204 # Tries to find the compile-time value of EXPR in a program that includes
2205 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2206 # computed
2207 ac_fn_c_compute_int ()
2208 {
2209 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2210 if test "$cross_compiling" = yes; then
2211 # Depending upon the size, compute the lo and hi bounds.
2212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213 /* end confdefs.h. */
2214 $4
2215 int
2216 main ()
2217 {
2218 static int test_array [1 - 2 * !(($2) >= 0)];
2219 test_array [0] = 0;
2220 return test_array [0];
2221
2222 ;
2223 return 0;
2224 }
2225 _ACEOF
2226 if ac_fn_c_try_compile "$LINENO"; then :
2227 ac_lo=0 ac_mid=0
2228 while :; do
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230 /* end confdefs.h. */
2231 $4
2232 int
2233 main ()
2234 {
2235 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2236 test_array [0] = 0;
2237 return test_array [0];
2238
2239 ;
2240 return 0;
2241 }
2242 _ACEOF
2243 if ac_fn_c_try_compile "$LINENO"; then :
2244 ac_hi=$ac_mid; break
2245 else
2246 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2247 if test $ac_lo -le $ac_mid; then
2248 ac_lo= ac_hi=
2249 break
2250 fi
2251 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2252 fi
2253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2254 done
2255 else
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257 /* end confdefs.h. */
2258 $4
2259 int
2260 main ()
2261 {
2262 static int test_array [1 - 2 * !(($2) < 0)];
2263 test_array [0] = 0;
2264 return test_array [0];
2265
2266 ;
2267 return 0;
2268 }
2269 _ACEOF
2270 if ac_fn_c_try_compile "$LINENO"; then :
2271 ac_hi=-1 ac_mid=-1
2272 while :; do
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274 /* end confdefs.h. */
2275 $4
2276 int
2277 main ()
2278 {
2279 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2280 test_array [0] = 0;
2281 return test_array [0];
2282
2283 ;
2284 return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_c_try_compile "$LINENO"; then :
2288 ac_lo=$ac_mid; break
2289 else
2290 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2291 if test $ac_mid -le $ac_hi; then
2292 ac_lo= ac_hi=
2293 break
2294 fi
2295 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2296 fi
2297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298 done
2299 else
2300 ac_lo= ac_hi=
2301 fi
2302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303 fi
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 # Binary search between lo and hi bounds.
2306 while test "x$ac_lo" != "x$ac_hi"; do
2307 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309 /* end confdefs.h. */
2310 $4
2311 int
2312 main ()
2313 {
2314 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2315 test_array [0] = 0;
2316 return test_array [0];
2317
2318 ;
2319 return 0;
2320 }
2321 _ACEOF
2322 if ac_fn_c_try_compile "$LINENO"; then :
2323 ac_hi=$ac_mid
2324 else
2325 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2326 fi
2327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328 done
2329 case $ac_lo in #((
2330 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2331 '') ac_retval=1 ;;
2332 esac
2333 else
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335 /* end confdefs.h. */
2336 $4
2337 static long int longval () { return $2; }
2338 static unsigned long int ulongval () { return $2; }
2339 #include <stdio.h>
2340 #include <stdlib.h>
2341 int
2342 main ()
2343 {
2344
2345 FILE *f = fopen ("conftest.val", "w");
2346 if (! f)
2347 return 1;
2348 if (($2) < 0)
2349 {
2350 long int i = longval ();
2351 if (i != ($2))
2352 return 1;
2353 fprintf (f, "%ld", i);
2354 }
2355 else
2356 {
2357 unsigned long int i = ulongval ();
2358 if (i != ($2))
2359 return 1;
2360 fprintf (f, "%lu", i);
2361 }
2362 /* Do not output a trailing newline, as this causes \r\n confusion
2363 on some platforms. */
2364 return ferror (f) || fclose (f) != 0;
2365
2366 ;
2367 return 0;
2368 }
2369 _ACEOF
2370 if ac_fn_c_try_run "$LINENO"; then :
2371 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2372 else
2373 ac_retval=1
2374 fi
2375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2376 conftest.$ac_objext conftest.beam conftest.$ac_ext
2377 rm -f conftest.val
2378
2379 fi
2380 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381 as_fn_set_status $ac_retval
2382
2383 } # ac_fn_c_compute_int
2384 cat >config.log <<_ACEOF
2385 This file contains any messages produced by compilers while
2386 running configure, to aid debugging if configure makes a mistake.
2387
2388 It was created by $as_me, which was
2389 generated by GNU Autoconf 2.69. Invocation command line was
2390
2391 $ $0 $@
2392
2393 _ACEOF
2394 exec 5>>config.log
2395 {
2396 cat <<_ASUNAME
2397 ## --------- ##
2398 ## Platform. ##
2399 ## --------- ##
2400
2401 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2402 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2403 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2404 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2405 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2406
2407 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2408 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2409
2410 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2411 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2412 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2413 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2414 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2415 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2416 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2417
2418 _ASUNAME
2419
2420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421 for as_dir in $PATH
2422 do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
2425 $as_echo "PATH: $as_dir"
2426 done
2427 IFS=$as_save_IFS
2428
2429 } >&5
2430
2431 cat >&5 <<_ACEOF
2432
2433
2434 ## ----------- ##
2435 ## Core tests. ##
2436 ## ----------- ##
2437
2438 _ACEOF
2439
2440
2441 # Keep a trace of the command line.
2442 # Strip out --no-create and --no-recursion so they do not pile up.
2443 # Strip out --silent because we don't want to record it for future runs.
2444 # Also quote any args containing shell meta-characters.
2445 # Make two passes to allow for proper duplicate-argument suppression.
2446 ac_configure_args=
2447 ac_configure_args0=
2448 ac_configure_args1=
2449 ac_must_keep_next=false
2450 for ac_pass in 1 2
2451 do
2452 for ac_arg
2453 do
2454 case $ac_arg in
2455 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2456 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2457 | -silent | --silent | --silen | --sile | --sil)
2458 continue ;;
2459 *\'*)
2460 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2461 esac
2462 case $ac_pass in
2463 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2464 2)
2465 as_fn_append ac_configure_args1 " '$ac_arg'"
2466 if test $ac_must_keep_next = true; then
2467 ac_must_keep_next=false # Got value, back to normal.
2468 else
2469 case $ac_arg in
2470 *=* | --config-cache | -C | -disable-* | --disable-* \
2471 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2472 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2473 | -with-* | --with-* | -without-* | --without-* | --x)
2474 case "$ac_configure_args0 " in
2475 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2476 esac
2477 ;;
2478 -* ) ac_must_keep_next=true ;;
2479 esac
2480 fi
2481 as_fn_append ac_configure_args " '$ac_arg'"
2482 ;;
2483 esac
2484 done
2485 done
2486 { ac_configure_args0=; unset ac_configure_args0;}
2487 { ac_configure_args1=; unset ac_configure_args1;}
2488
2489 # When interrupted or exit'd, cleanup temporary files, and complete
2490 # config.log. We remove comments because anyway the quotes in there
2491 # would cause problems or look ugly.
2492 # WARNING: Use '\'' to represent an apostrophe within the trap.
2493 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2494 trap 'exit_status=$?
2495 # Save into config.log some information that might help in debugging.
2496 {
2497 echo
2498
2499 $as_echo "## ---------------- ##
2500 ## Cache variables. ##
2501 ## ---------------- ##"
2502 echo
2503 # The following way of writing the cache mishandles newlines in values,
2504 (
2505 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2506 eval ac_val=\$$ac_var
2507 case $ac_val in #(
2508 *${as_nl}*)
2509 case $ac_var in #(
2510 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2511 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2512 esac
2513 case $ac_var in #(
2514 _ | IFS | as_nl) ;; #(
2515 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2516 *) { eval $ac_var=; unset $ac_var;} ;;
2517 esac ;;
2518 esac
2519 done
2520 (set) 2>&1 |
2521 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2522 *${as_nl}ac_space=\ *)
2523 sed -n \
2524 "s/'\''/'\''\\\\'\'''\''/g;
2525 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2526 ;; #(
2527 *)
2528 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2529 ;;
2530 esac |
2531 sort
2532 )
2533 echo
2534
2535 $as_echo "## ----------------- ##
2536 ## Output variables. ##
2537 ## ----------------- ##"
2538 echo
2539 for ac_var in $ac_subst_vars
2540 do
2541 eval ac_val=\$$ac_var
2542 case $ac_val in
2543 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2544 esac
2545 $as_echo "$ac_var='\''$ac_val'\''"
2546 done | sort
2547 echo
2548
2549 if test -n "$ac_subst_files"; then
2550 $as_echo "## ------------------- ##
2551 ## File substitutions. ##
2552 ## ------------------- ##"
2553 echo
2554 for ac_var in $ac_subst_files
2555 do
2556 eval ac_val=\$$ac_var
2557 case $ac_val in
2558 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2559 esac
2560 $as_echo "$ac_var='\''$ac_val'\''"
2561 done | sort
2562 echo
2563 fi
2564
2565 if test -s confdefs.h; then
2566 $as_echo "## ----------- ##
2567 ## confdefs.h. ##
2568 ## ----------- ##"
2569 echo
2570 cat confdefs.h
2571 echo
2572 fi
2573 test "$ac_signal" != 0 &&
2574 $as_echo "$as_me: caught signal $ac_signal"
2575 $as_echo "$as_me: exit $exit_status"
2576 } >&5
2577 rm -f core *.core core.conftest.* &&
2578 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2579 exit $exit_status
2580 ' 0
2581 for ac_signal in 1 2 13 15; do
2582 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2583 done
2584 ac_signal=0
2585
2586 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2587 rm -f -r conftest* confdefs.h
2588
2589 $as_echo "/* confdefs.h */" > confdefs.h
2590
2591 # Predefined preprocessor variables.
2592
2593 cat >>confdefs.h <<_ACEOF
2594 #define PACKAGE_NAME "$PACKAGE_NAME"
2595 _ACEOF
2596
2597 cat >>confdefs.h <<_ACEOF
2598 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2599 _ACEOF
2600
2601 cat >>confdefs.h <<_ACEOF
2602 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2603 _ACEOF
2604
2605 cat >>confdefs.h <<_ACEOF
2606 #define PACKAGE_STRING "$PACKAGE_STRING"
2607 _ACEOF
2608
2609 cat >>confdefs.h <<_ACEOF
2610 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2611 _ACEOF
2612
2613 cat >>confdefs.h <<_ACEOF
2614 #define PACKAGE_URL "$PACKAGE_URL"
2615 _ACEOF
2616
2617
2618 # Let the site file select an alternate cache file if it wants to.
2619 # Prefer an explicitly selected file to automatically selected ones.
2620 ac_site_file1=NONE
2621 ac_site_file2=NONE
2622 if test -n "$CONFIG_SITE"; then
2623 # We do not want a PATH search for config.site.
2624 case $CONFIG_SITE in #((
2625 -*) ac_site_file1=./$CONFIG_SITE;;
2626 */*) ac_site_file1=$CONFIG_SITE;;
2627 *) ac_site_file1=./$CONFIG_SITE;;
2628 esac
2629 elif test "x$prefix" != xNONE; then
2630 ac_site_file1=$prefix/share/config.site
2631 ac_site_file2=$prefix/etc/config.site
2632 else
2633 ac_site_file1=$ac_default_prefix/share/config.site
2634 ac_site_file2=$ac_default_prefix/etc/config.site
2635 fi
2636 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2637 do
2638 test "x$ac_site_file" = xNONE && continue
2639 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2641 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2642 sed 's/^/| /' "$ac_site_file" >&5
2643 . "$ac_site_file" \
2644 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2645 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2646 as_fn_error $? "failed to load site script $ac_site_file
2647 See \`config.log' for more details" "$LINENO" 5; }
2648 fi
2649 done
2650
2651 if test -r "$cache_file"; then
2652 # Some versions of bash will fail to source /dev/null (special files
2653 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2654 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2656 $as_echo "$as_me: loading cache $cache_file" >&6;}
2657 case $cache_file in
2658 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2659 *) . "./$cache_file";;
2660 esac
2661 fi
2662 else
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2664 $as_echo "$as_me: creating cache $cache_file" >&6;}
2665 >$cache_file
2666 fi
2667
2668 as_fn_append ac_header_list " stdlib.h"
2669 as_fn_append ac_header_list " unistd.h"
2670 as_fn_append ac_header_list " sys/param.h"
2671 gt_needs="$gt_needs "
2672 # Check that the precious variables saved in the cache have kept the same
2673 # value.
2674 ac_cache_corrupted=false
2675 for ac_var in $ac_precious_vars; do
2676 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2677 eval ac_new_set=\$ac_env_${ac_var}_set
2678 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2679 eval ac_new_val=\$ac_env_${ac_var}_value
2680 case $ac_old_set,$ac_new_set in
2681 set,)
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2683 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2684 ac_cache_corrupted=: ;;
2685 ,set)
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2687 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2688 ac_cache_corrupted=: ;;
2689 ,);;
2690 *)
2691 if test "x$ac_old_val" != "x$ac_new_val"; then
2692 # differences in whitespace do not lead to failure.
2693 ac_old_val_w=`echo x $ac_old_val`
2694 ac_new_val_w=`echo x $ac_new_val`
2695 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2697 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2698 ac_cache_corrupted=:
2699 else
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2701 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2702 eval $ac_var=\$ac_old_val
2703 fi
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2705 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2707 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2708 fi;;
2709 esac
2710 # Pass precious variables to config.status.
2711 if test "$ac_new_set" = set; then
2712 case $ac_new_val in
2713 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2714 *) ac_arg=$ac_var=$ac_new_val ;;
2715 esac
2716 case " $ac_configure_args " in
2717 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2718 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2719 esac
2720 fi
2721 done
2722 if $ac_cache_corrupted; then
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2724 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2726 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2727 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2728 fi
2729 ## -------------------- ##
2730 ## Main body of script. ##
2731 ## -------------------- ##
2732
2733 ac_ext=c
2734 ac_cpp='$CPP $CPPFLAGS'
2735 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2736 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2737 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2738
2739
2740
2741
2742
2743
2744
2745 ac_config_headers="$ac_config_headers config.h:config.in"
2746
2747
2748
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2750 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2751 # Check whether --enable-maintainer-mode was given.
2752 if test "${enable_maintainer_mode+set}" = set; then :
2753 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2754 else
2755 USE_MAINTAINER_MODE=no
2756 fi
2757
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2759 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2760 if test $USE_MAINTAINER_MODE = yes; then
2761 MAINTAINER_MODE_TRUE=
2762 MAINTAINER_MODE_FALSE='#'
2763 else
2764 MAINTAINER_MODE_TRUE='#'
2765 MAINTAINER_MODE_FALSE=
2766 fi
2767
2768 MAINT=$MAINTAINER_MODE_TRUE
2769
2770
2771
2772 ac_ext=c
2773 ac_cpp='$CPP $CPPFLAGS'
2774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2777 if test -n "$ac_tool_prefix"; then
2778 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2779 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2781 $as_echo_n "checking for $ac_word... " >&6; }
2782 if ${ac_cv_prog_CC+:} false; then :
2783 $as_echo_n "(cached) " >&6
2784 else
2785 if test -n "$CC"; then
2786 ac_cv_prog_CC="$CC" # Let the user override the test.
2787 else
2788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2789 for as_dir in $PATH
2790 do
2791 IFS=$as_save_IFS
2792 test -z "$as_dir" && as_dir=.
2793 for ac_exec_ext in '' $ac_executable_extensions; do
2794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2795 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2797 break 2
2798 fi
2799 done
2800 done
2801 IFS=$as_save_IFS
2802
2803 fi
2804 fi
2805 CC=$ac_cv_prog_CC
2806 if test -n "$CC"; then
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2808 $as_echo "$CC" >&6; }
2809 else
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2811 $as_echo "no" >&6; }
2812 fi
2813
2814
2815 fi
2816 if test -z "$ac_cv_prog_CC"; then
2817 ac_ct_CC=$CC
2818 # Extract the first word of "gcc", so it can be a program name with args.
2819 set dummy gcc; ac_word=$2
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2821 $as_echo_n "checking for $ac_word... " >&6; }
2822 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2823 $as_echo_n "(cached) " >&6
2824 else
2825 if test -n "$ac_ct_CC"; then
2826 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2827 else
2828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2829 for as_dir in $PATH
2830 do
2831 IFS=$as_save_IFS
2832 test -z "$as_dir" && as_dir=.
2833 for ac_exec_ext in '' $ac_executable_extensions; do
2834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2835 ac_cv_prog_ac_ct_CC="gcc"
2836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2837 break 2
2838 fi
2839 done
2840 done
2841 IFS=$as_save_IFS
2842
2843 fi
2844 fi
2845 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2846 if test -n "$ac_ct_CC"; then
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2848 $as_echo "$ac_ct_CC" >&6; }
2849 else
2850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2851 $as_echo "no" >&6; }
2852 fi
2853
2854 if test "x$ac_ct_CC" = x; then
2855 CC=""
2856 else
2857 case $cross_compiling:$ac_tool_warned in
2858 yes:)
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2860 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2861 ac_tool_warned=yes ;;
2862 esac
2863 CC=$ac_ct_CC
2864 fi
2865 else
2866 CC="$ac_cv_prog_CC"
2867 fi
2868
2869 if test -z "$CC"; then
2870 if test -n "$ac_tool_prefix"; then
2871 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2872 set dummy ${ac_tool_prefix}cc; ac_word=$2
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2874 $as_echo_n "checking for $ac_word... " >&6; }
2875 if ${ac_cv_prog_CC+:} false; then :
2876 $as_echo_n "(cached) " >&6
2877 else
2878 if test -n "$CC"; then
2879 ac_cv_prog_CC="$CC" # Let the user override the test.
2880 else
2881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2882 for as_dir in $PATH
2883 do
2884 IFS=$as_save_IFS
2885 test -z "$as_dir" && as_dir=.
2886 for ac_exec_ext in '' $ac_executable_extensions; do
2887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2888 ac_cv_prog_CC="${ac_tool_prefix}cc"
2889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2890 break 2
2891 fi
2892 done
2893 done
2894 IFS=$as_save_IFS
2895
2896 fi
2897 fi
2898 CC=$ac_cv_prog_CC
2899 if test -n "$CC"; then
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2901 $as_echo "$CC" >&6; }
2902 else
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2904 $as_echo "no" >&6; }
2905 fi
2906
2907
2908 fi
2909 fi
2910 if test -z "$CC"; then
2911 # Extract the first word of "cc", so it can be a program name with args.
2912 set dummy cc; ac_word=$2
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2914 $as_echo_n "checking for $ac_word... " >&6; }
2915 if ${ac_cv_prog_CC+:} false; then :
2916 $as_echo_n "(cached) " >&6
2917 else
2918 if test -n "$CC"; then
2919 ac_cv_prog_CC="$CC" # Let the user override the test.
2920 else
2921 ac_prog_rejected=no
2922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923 for as_dir in $PATH
2924 do
2925 IFS=$as_save_IFS
2926 test -z "$as_dir" && as_dir=.
2927 for ac_exec_ext in '' $ac_executable_extensions; do
2928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2929 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2930 ac_prog_rejected=yes
2931 continue
2932 fi
2933 ac_cv_prog_CC="cc"
2934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2935 break 2
2936 fi
2937 done
2938 done
2939 IFS=$as_save_IFS
2940
2941 if test $ac_prog_rejected = yes; then
2942 # We found a bogon in the path, so make sure we never use it.
2943 set dummy $ac_cv_prog_CC
2944 shift
2945 if test $# != 0; then
2946 # We chose a different compiler from the bogus one.
2947 # However, it has the same basename, so the bogon will be chosen
2948 # first if we set CC to just the basename; use the full file name.
2949 shift
2950 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2951 fi
2952 fi
2953 fi
2954 fi
2955 CC=$ac_cv_prog_CC
2956 if test -n "$CC"; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2958 $as_echo "$CC" >&6; }
2959 else
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2961 $as_echo "no" >&6; }
2962 fi
2963
2964
2965 fi
2966 if test -z "$CC"; then
2967 if test -n "$ac_tool_prefix"; then
2968 for ac_prog in cl.exe
2969 do
2970 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2971 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2973 $as_echo_n "checking for $ac_word... " >&6; }
2974 if ${ac_cv_prog_CC+:} false; then :
2975 $as_echo_n "(cached) " >&6
2976 else
2977 if test -n "$CC"; then
2978 ac_cv_prog_CC="$CC" # Let the user override the test.
2979 else
2980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2981 for as_dir in $PATH
2982 do
2983 IFS=$as_save_IFS
2984 test -z "$as_dir" && as_dir=.
2985 for ac_exec_ext in '' $ac_executable_extensions; do
2986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2987 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2989 break 2
2990 fi
2991 done
2992 done
2993 IFS=$as_save_IFS
2994
2995 fi
2996 fi
2997 CC=$ac_cv_prog_CC
2998 if test -n "$CC"; then
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3000 $as_echo "$CC" >&6; }
3001 else
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3003 $as_echo "no" >&6; }
3004 fi
3005
3006
3007 test -n "$CC" && break
3008 done
3009 fi
3010 if test -z "$CC"; then
3011 ac_ct_CC=$CC
3012 for ac_prog in cl.exe
3013 do
3014 # Extract the first word of "$ac_prog", so it can be a program name with args.
3015 set dummy $ac_prog; ac_word=$2
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3017 $as_echo_n "checking for $ac_word... " >&6; }
3018 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3019 $as_echo_n "(cached) " >&6
3020 else
3021 if test -n "$ac_ct_CC"; then
3022 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3023 else
3024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3025 for as_dir in $PATH
3026 do
3027 IFS=$as_save_IFS
3028 test -z "$as_dir" && as_dir=.
3029 for ac_exec_ext in '' $ac_executable_extensions; do
3030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3031 ac_cv_prog_ac_ct_CC="$ac_prog"
3032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3033 break 2
3034 fi
3035 done
3036 done
3037 IFS=$as_save_IFS
3038
3039 fi
3040 fi
3041 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3042 if test -n "$ac_ct_CC"; then
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3044 $as_echo "$ac_ct_CC" >&6; }
3045 else
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047 $as_echo "no" >&6; }
3048 fi
3049
3050
3051 test -n "$ac_ct_CC" && break
3052 done
3053
3054 if test "x$ac_ct_CC" = x; then
3055 CC=""
3056 else
3057 case $cross_compiling:$ac_tool_warned in
3058 yes:)
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3060 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3061 ac_tool_warned=yes ;;
3062 esac
3063 CC=$ac_ct_CC
3064 fi
3065 fi
3066
3067 fi
3068
3069
3070 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3072 as_fn_error $? "no acceptable C compiler found in \$PATH
3073 See \`config.log' for more details" "$LINENO" 5; }
3074
3075 # Provide some information about the compiler.
3076 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3077 set X $ac_compile
3078 ac_compiler=$2
3079 for ac_option in --version -v -V -qversion; do
3080 { { ac_try="$ac_compiler $ac_option >&5"
3081 case "(($ac_try" in
3082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3083 *) ac_try_echo=$ac_try;;
3084 esac
3085 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3086 $as_echo "$ac_try_echo"; } >&5
3087 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3088 ac_status=$?
3089 if test -s conftest.err; then
3090 sed '10a\
3091 ... rest of stderr output deleted ...
3092 10q' conftest.err >conftest.er1
3093 cat conftest.er1 >&5
3094 fi
3095 rm -f conftest.er1 conftest.err
3096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3097 test $ac_status = 0; }
3098 done
3099
3100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3101 /* end confdefs.h. */
3102
3103 int
3104 main ()
3105 {
3106
3107 ;
3108 return 0;
3109 }
3110 _ACEOF
3111 ac_clean_files_save=$ac_clean_files
3112 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3113 # Try to create an executable without -o first, disregard a.out.
3114 # It will help us diagnose broken compilers, and finding out an intuition
3115 # of exeext.
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3117 $as_echo_n "checking whether the C compiler works... " >&6; }
3118 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3119
3120 # The possible output files:
3121 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3122
3123 ac_rmfiles=
3124 for ac_file in $ac_files
3125 do
3126 case $ac_file in
3127 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3128 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3129 esac
3130 done
3131 rm -f $ac_rmfiles
3132
3133 if { { ac_try="$ac_link_default"
3134 case "(($ac_try" in
3135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136 *) ac_try_echo=$ac_try;;
3137 esac
3138 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3139 $as_echo "$ac_try_echo"; } >&5
3140 (eval "$ac_link_default") 2>&5
3141 ac_status=$?
3142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3143 test $ac_status = 0; }; then :
3144 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3145 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3146 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3147 # so that the user can short-circuit this test for compilers unknown to
3148 # Autoconf.
3149 for ac_file in $ac_files ''
3150 do
3151 test -f "$ac_file" || continue
3152 case $ac_file in
3153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3154 ;;
3155 [ab].out )
3156 # We found the default executable, but exeext='' is most
3157 # certainly right.
3158 break;;
3159 *.* )
3160 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3161 then :; else
3162 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3163 fi
3164 # We set ac_cv_exeext here because the later test for it is not
3165 # safe: cross compilers may not add the suffix if given an `-o'
3166 # argument, so we may need to know it at that point already.
3167 # Even if this section looks crufty: it has the advantage of
3168 # actually working.
3169 break;;
3170 * )
3171 break;;
3172 esac
3173 done
3174 test "$ac_cv_exeext" = no && ac_cv_exeext=
3175
3176 else
3177 ac_file=''
3178 fi
3179 if test -z "$ac_file"; then :
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3181 $as_echo "no" >&6; }
3182 $as_echo "$as_me: failed program was:" >&5
3183 sed 's/^/| /' conftest.$ac_ext >&5
3184
3185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3187 as_fn_error 77 "C compiler cannot create executables
3188 See \`config.log' for more details" "$LINENO" 5; }
3189 else
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3191 $as_echo "yes" >&6; }
3192 fi
3193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3194 $as_echo_n "checking for C compiler default output file name... " >&6; }
3195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3196 $as_echo "$ac_file" >&6; }
3197 ac_exeext=$ac_cv_exeext
3198
3199 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3200 ac_clean_files=$ac_clean_files_save
3201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3202 $as_echo_n "checking for suffix of executables... " >&6; }
3203 if { { ac_try="$ac_link"
3204 case "(($ac_try" in
3205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3206 *) ac_try_echo=$ac_try;;
3207 esac
3208 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3209 $as_echo "$ac_try_echo"; } >&5
3210 (eval "$ac_link") 2>&5
3211 ac_status=$?
3212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3213 test $ac_status = 0; }; then :
3214 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3215 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3216 # work properly (i.e., refer to `conftest.exe'), while it won't with
3217 # `rm'.
3218 for ac_file in conftest.exe conftest conftest.*; do
3219 test -f "$ac_file" || continue
3220 case $ac_file in
3221 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3222 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3223 break;;
3224 * ) break;;
3225 esac
3226 done
3227 else
3228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3229 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3230 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3231 See \`config.log' for more details" "$LINENO" 5; }
3232 fi
3233 rm -f conftest conftest$ac_cv_exeext
3234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3235 $as_echo "$ac_cv_exeext" >&6; }
3236
3237 rm -f conftest.$ac_ext
3238 EXEEXT=$ac_cv_exeext
3239 ac_exeext=$EXEEXT
3240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3241 /* end confdefs.h. */
3242 #include <stdio.h>
3243 int
3244 main ()
3245 {
3246 FILE *f = fopen ("conftest.out", "w");
3247 return ferror (f) || fclose (f) != 0;
3248
3249 ;
3250 return 0;
3251 }
3252 _ACEOF
3253 ac_clean_files="$ac_clean_files conftest.out"
3254 # Check that the compiler produces executables we can run. If not, either
3255 # the compiler is broken, or we cross compile.
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3257 $as_echo_n "checking whether we are cross compiling... " >&6; }
3258 if test "$cross_compiling" != yes; then
3259 { { ac_try="$ac_link"
3260 case "(($ac_try" in
3261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262 *) ac_try_echo=$ac_try;;
3263 esac
3264 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3265 $as_echo "$ac_try_echo"; } >&5
3266 (eval "$ac_link") 2>&5
3267 ac_status=$?
3268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3269 test $ac_status = 0; }
3270 if { ac_try='./conftest$ac_cv_exeext'
3271 { { case "(($ac_try" in
3272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3273 *) ac_try_echo=$ac_try;;
3274 esac
3275 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3276 $as_echo "$ac_try_echo"; } >&5
3277 (eval "$ac_try") 2>&5
3278 ac_status=$?
3279 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3280 test $ac_status = 0; }; }; then
3281 cross_compiling=no
3282 else
3283 if test "$cross_compiling" = maybe; then
3284 cross_compiling=yes
3285 else
3286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3288 as_fn_error $? "cannot run C compiled programs.
3289 If you meant to cross compile, use \`--host'.
3290 See \`config.log' for more details" "$LINENO" 5; }
3291 fi
3292 fi
3293 fi
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3295 $as_echo "$cross_compiling" >&6; }
3296
3297 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3298 ac_clean_files=$ac_clean_files_save
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3300 $as_echo_n "checking for suffix of object files... " >&6; }
3301 if ${ac_cv_objext+:} false; then :
3302 $as_echo_n "(cached) " >&6
3303 else
3304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3305 /* end confdefs.h. */
3306
3307 int
3308 main ()
3309 {
3310
3311 ;
3312 return 0;
3313 }
3314 _ACEOF
3315 rm -f conftest.o conftest.obj
3316 if { { ac_try="$ac_compile"
3317 case "(($ac_try" in
3318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3319 *) ac_try_echo=$ac_try;;
3320 esac
3321 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3322 $as_echo "$ac_try_echo"; } >&5
3323 (eval "$ac_compile") 2>&5
3324 ac_status=$?
3325 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3326 test $ac_status = 0; }; then :
3327 for ac_file in conftest.o conftest.obj conftest.*; do
3328 test -f "$ac_file" || continue;
3329 case $ac_file in
3330 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3331 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3332 break;;
3333 esac
3334 done
3335 else
3336 $as_echo "$as_me: failed program was:" >&5
3337 sed 's/^/| /' conftest.$ac_ext >&5
3338
3339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341 as_fn_error $? "cannot compute suffix of object files: cannot compile
3342 See \`config.log' for more details" "$LINENO" 5; }
3343 fi
3344 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3345 fi
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3347 $as_echo "$ac_cv_objext" >&6; }
3348 OBJEXT=$ac_cv_objext
3349 ac_objext=$OBJEXT
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3351 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3352 if ${ac_cv_c_compiler_gnu+:} false; then :
3353 $as_echo_n "(cached) " >&6
3354 else
3355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356 /* end confdefs.h. */
3357
3358 int
3359 main ()
3360 {
3361 #ifndef __GNUC__
3362 choke me
3363 #endif
3364
3365 ;
3366 return 0;
3367 }
3368 _ACEOF
3369 if ac_fn_c_try_compile "$LINENO"; then :
3370 ac_compiler_gnu=yes
3371 else
3372 ac_compiler_gnu=no
3373 fi
3374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3375 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3376
3377 fi
3378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3379 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3380 if test $ac_compiler_gnu = yes; then
3381 GCC=yes
3382 else
3383 GCC=
3384 fi
3385 ac_test_CFLAGS=${CFLAGS+set}
3386 ac_save_CFLAGS=$CFLAGS
3387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3388 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3389 if ${ac_cv_prog_cc_g+:} false; then :
3390 $as_echo_n "(cached) " >&6
3391 else
3392 ac_save_c_werror_flag=$ac_c_werror_flag
3393 ac_c_werror_flag=yes
3394 ac_cv_prog_cc_g=no
3395 CFLAGS="-g"
3396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3397 /* end confdefs.h. */
3398
3399 int
3400 main ()
3401 {
3402
3403 ;
3404 return 0;
3405 }
3406 _ACEOF
3407 if ac_fn_c_try_compile "$LINENO"; then :
3408 ac_cv_prog_cc_g=yes
3409 else
3410 CFLAGS=""
3411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3412 /* end confdefs.h. */
3413
3414 int
3415 main ()
3416 {
3417
3418 ;
3419 return 0;
3420 }
3421 _ACEOF
3422 if ac_fn_c_try_compile "$LINENO"; then :
3423
3424 else
3425 ac_c_werror_flag=$ac_save_c_werror_flag
3426 CFLAGS="-g"
3427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3428 /* end confdefs.h. */
3429
3430 int
3431 main ()
3432 {
3433
3434 ;
3435 return 0;
3436 }
3437 _ACEOF
3438 if ac_fn_c_try_compile "$LINENO"; then :
3439 ac_cv_prog_cc_g=yes
3440 fi
3441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3442 fi
3443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3444 fi
3445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3446 ac_c_werror_flag=$ac_save_c_werror_flag
3447 fi
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3449 $as_echo "$ac_cv_prog_cc_g" >&6; }
3450 if test "$ac_test_CFLAGS" = set; then
3451 CFLAGS=$ac_save_CFLAGS
3452 elif test $ac_cv_prog_cc_g = yes; then
3453 if test "$GCC" = yes; then
3454 CFLAGS="-g -O2"
3455 else
3456 CFLAGS="-g"
3457 fi
3458 else
3459 if test "$GCC" = yes; then
3460 CFLAGS="-O2"
3461 else
3462 CFLAGS=
3463 fi
3464 fi
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3466 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3467 if ${ac_cv_prog_cc_c89+:} false; then :
3468 $as_echo_n "(cached) " >&6
3469 else
3470 ac_cv_prog_cc_c89=no
3471 ac_save_CC=$CC
3472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473 /* end confdefs.h. */
3474 #include <stdarg.h>
3475 #include <stdio.h>
3476 struct stat;
3477 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3478 struct buf { int x; };
3479 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3480 static char *e (p, i)
3481 char **p;
3482 int i;
3483 {
3484 return p[i];
3485 }
3486 static char *f (char * (*g) (char **, int), char **p, ...)
3487 {
3488 char *s;
3489 va_list v;
3490 va_start (v,p);
3491 s = g (p, va_arg (v,int));
3492 va_end (v);
3493 return s;
3494 }
3495
3496 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3497 function prototypes and stuff, but not '\xHH' hex character constants.
3498 These don't provoke an error unfortunately, instead are silently treated
3499 as 'x'. The following induces an error, until -std is added to get
3500 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3501 array size at least. It's necessary to write '\x00'==0 to get something
3502 that's true only with -std. */
3503 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3504
3505 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3506 inside strings and character constants. */
3507 #define FOO(x) 'x'
3508 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3509
3510 int test (int i, double x);
3511 struct s1 {int (*f) (int a);};
3512 struct s2 {int (*f) (double a);};
3513 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3514 int argc;
3515 char **argv;
3516 int
3517 main ()
3518 {
3519 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3520 ;
3521 return 0;
3522 }
3523 _ACEOF
3524 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3525 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3526 do
3527 CC="$ac_save_CC $ac_arg"
3528 if ac_fn_c_try_compile "$LINENO"; then :
3529 ac_cv_prog_cc_c89=$ac_arg
3530 fi
3531 rm -f core conftest.err conftest.$ac_objext
3532 test "x$ac_cv_prog_cc_c89" != "xno" && break
3533 done
3534 rm -f conftest.$ac_ext
3535 CC=$ac_save_CC
3536
3537 fi
3538 # AC_CACHE_VAL
3539 case "x$ac_cv_prog_cc_c89" in
3540 x)
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3542 $as_echo "none needed" >&6; } ;;
3543 xno)
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3545 $as_echo "unsupported" >&6; } ;;
3546 *)
3547 CC="$CC $ac_cv_prog_cc_c89"
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3549 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3550 esac
3551 if test "x$ac_cv_prog_cc_c89" != xno; then :
3552
3553 fi
3554
3555 ac_ext=c
3556 ac_cpp='$CPP $CPPFLAGS'
3557 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3558 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3559 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3560
3561 ac_ext=cpp
3562 ac_cpp='$CXXCPP $CPPFLAGS'
3563 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3564 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3565 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3566 if test -z "$CXX"; then
3567 if test -n "$CCC"; then
3568 CXX=$CCC
3569 else
3570 if test -n "$ac_tool_prefix"; then
3571 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3572 do
3573 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3574 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3576 $as_echo_n "checking for $ac_word... " >&6; }
3577 if ${ac_cv_prog_CXX+:} false; then :
3578 $as_echo_n "(cached) " >&6
3579 else
3580 if test -n "$CXX"; then
3581 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3582 else
3583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3584 for as_dir in $PATH
3585 do
3586 IFS=$as_save_IFS
3587 test -z "$as_dir" && as_dir=.
3588 for ac_exec_ext in '' $ac_executable_extensions; do
3589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3590 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3592 break 2
3593 fi
3594 done
3595 done
3596 IFS=$as_save_IFS
3597
3598 fi
3599 fi
3600 CXX=$ac_cv_prog_CXX
3601 if test -n "$CXX"; then
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3603 $as_echo "$CXX" >&6; }
3604 else
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3606 $as_echo "no" >&6; }
3607 fi
3608
3609
3610 test -n "$CXX" && break
3611 done
3612 fi
3613 if test -z "$CXX"; then
3614 ac_ct_CXX=$CXX
3615 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3616 do
3617 # Extract the first word of "$ac_prog", so it can be a program name with args.
3618 set dummy $ac_prog; ac_word=$2
3619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3620 $as_echo_n "checking for $ac_word... " >&6; }
3621 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3622 $as_echo_n "(cached) " >&6
3623 else
3624 if test -n "$ac_ct_CXX"; then
3625 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3626 else
3627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628 for as_dir in $PATH
3629 do
3630 IFS=$as_save_IFS
3631 test -z "$as_dir" && as_dir=.
3632 for ac_exec_ext in '' $ac_executable_extensions; do
3633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3634 ac_cv_prog_ac_ct_CXX="$ac_prog"
3635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3636 break 2
3637 fi
3638 done
3639 done
3640 IFS=$as_save_IFS
3641
3642 fi
3643 fi
3644 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3645 if test -n "$ac_ct_CXX"; then
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3647 $as_echo "$ac_ct_CXX" >&6; }
3648 else
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650 $as_echo "no" >&6; }
3651 fi
3652
3653
3654 test -n "$ac_ct_CXX" && break
3655 done
3656
3657 if test "x$ac_ct_CXX" = x; then
3658 CXX="g++"
3659 else
3660 case $cross_compiling:$ac_tool_warned in
3661 yes:)
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3663 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3664 ac_tool_warned=yes ;;
3665 esac
3666 CXX=$ac_ct_CXX
3667 fi
3668 fi
3669
3670 fi
3671 fi
3672 # Provide some information about the compiler.
3673 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3674 set X $ac_compile
3675 ac_compiler=$2
3676 for ac_option in --version -v -V -qversion; do
3677 { { ac_try="$ac_compiler $ac_option >&5"
3678 case "(($ac_try" in
3679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3680 *) ac_try_echo=$ac_try;;
3681 esac
3682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3683 $as_echo "$ac_try_echo"; } >&5
3684 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3685 ac_status=$?
3686 if test -s conftest.err; then
3687 sed '10a\
3688 ... rest of stderr output deleted ...
3689 10q' conftest.err >conftest.er1
3690 cat conftest.er1 >&5
3691 fi
3692 rm -f conftest.er1 conftest.err
3693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3694 test $ac_status = 0; }
3695 done
3696
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3698 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3699 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3700 $as_echo_n "(cached) " >&6
3701 else
3702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3703 /* end confdefs.h. */
3704
3705 int
3706 main ()
3707 {
3708 #ifndef __GNUC__
3709 choke me
3710 #endif
3711
3712 ;
3713 return 0;
3714 }
3715 _ACEOF
3716 if ac_fn_cxx_try_compile "$LINENO"; then :
3717 ac_compiler_gnu=yes
3718 else
3719 ac_compiler_gnu=no
3720 fi
3721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3722 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3723
3724 fi
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3726 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3727 if test $ac_compiler_gnu = yes; then
3728 GXX=yes
3729 else
3730 GXX=
3731 fi
3732 ac_test_CXXFLAGS=${CXXFLAGS+set}
3733 ac_save_CXXFLAGS=$CXXFLAGS
3734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3735 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3736 if ${ac_cv_prog_cxx_g+:} false; then :
3737 $as_echo_n "(cached) " >&6
3738 else
3739 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3740 ac_cxx_werror_flag=yes
3741 ac_cv_prog_cxx_g=no
3742 CXXFLAGS="-g"
3743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3744 /* end confdefs.h. */
3745
3746 int
3747 main ()
3748 {
3749
3750 ;
3751 return 0;
3752 }
3753 _ACEOF
3754 if ac_fn_cxx_try_compile "$LINENO"; then :
3755 ac_cv_prog_cxx_g=yes
3756 else
3757 CXXFLAGS=""
3758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3759 /* end confdefs.h. */
3760
3761 int
3762 main ()
3763 {
3764
3765 ;
3766 return 0;
3767 }
3768 _ACEOF
3769 if ac_fn_cxx_try_compile "$LINENO"; then :
3770
3771 else
3772 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3773 CXXFLAGS="-g"
3774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3775 /* end confdefs.h. */
3776
3777 int
3778 main ()
3779 {
3780
3781 ;
3782 return 0;
3783 }
3784 _ACEOF
3785 if ac_fn_cxx_try_compile "$LINENO"; then :
3786 ac_cv_prog_cxx_g=yes
3787 fi
3788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3789 fi
3790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3791 fi
3792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3793 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3794 fi
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3796 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3797 if test "$ac_test_CXXFLAGS" = set; then
3798 CXXFLAGS=$ac_save_CXXFLAGS
3799 elif test $ac_cv_prog_cxx_g = yes; then
3800 if test "$GXX" = yes; then
3801 CXXFLAGS="-g -O2"
3802 else
3803 CXXFLAGS="-g"
3804 fi
3805 else
3806 if test "$GXX" = yes; then
3807 CXXFLAGS="-O2"
3808 else
3809 CXXFLAGS=
3810 fi
3811 fi
3812 ac_ext=c
3813 ac_cpp='$CPP $CPPFLAGS'
3814 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3815 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3816 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3817
3818
3819 ac_ext=c
3820 ac_cpp='$CPP $CPPFLAGS'
3821 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3822 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3823 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3825 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3826 # On Suns, sometimes $CPP names a directory.
3827 if test -n "$CPP" && test -d "$CPP"; then
3828 CPP=
3829 fi
3830 if test -z "$CPP"; then
3831 if ${ac_cv_prog_CPP+:} false; then :
3832 $as_echo_n "(cached) " >&6
3833 else
3834 # Double quotes because CPP needs to be expanded
3835 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3836 do
3837 ac_preproc_ok=false
3838 for ac_c_preproc_warn_flag in '' yes
3839 do
3840 # Use a header file that comes with gcc, so configuring glibc
3841 # with a fresh cross-compiler works.
3842 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3843 # <limits.h> exists even on freestanding compilers.
3844 # On the NeXT, cc -E runs the code through the compiler's parser,
3845 # not just through cpp. "Syntax error" is here to catch this case.
3846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3847 /* end confdefs.h. */
3848 #ifdef __STDC__
3849 # include <limits.h>
3850 #else
3851 # include <assert.h>
3852 #endif
3853 Syntax error
3854 _ACEOF
3855 if ac_fn_c_try_cpp "$LINENO"; then :
3856
3857 else
3858 # Broken: fails on valid input.
3859 continue
3860 fi
3861 rm -f conftest.err conftest.i conftest.$ac_ext
3862
3863 # OK, works on sane cases. Now check whether nonexistent headers
3864 # can be detected and how.
3865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3866 /* end confdefs.h. */
3867 #include <ac_nonexistent.h>
3868 _ACEOF
3869 if ac_fn_c_try_cpp "$LINENO"; then :
3870 # Broken: success on invalid input.
3871 continue
3872 else
3873 # Passes both tests.
3874 ac_preproc_ok=:
3875 break
3876 fi
3877 rm -f conftest.err conftest.i conftest.$ac_ext
3878
3879 done
3880 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3881 rm -f conftest.i conftest.err conftest.$ac_ext
3882 if $ac_preproc_ok; then :
3883 break
3884 fi
3885
3886 done
3887 ac_cv_prog_CPP=$CPP
3888
3889 fi
3890 CPP=$ac_cv_prog_CPP
3891 else
3892 ac_cv_prog_CPP=$CPP
3893 fi
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3895 $as_echo "$CPP" >&6; }
3896 ac_preproc_ok=false
3897 for ac_c_preproc_warn_flag in '' yes
3898 do
3899 # Use a header file that comes with gcc, so configuring glibc
3900 # with a fresh cross-compiler works.
3901 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3902 # <limits.h> exists even on freestanding compilers.
3903 # On the NeXT, cc -E runs the code through the compiler's parser,
3904 # not just through cpp. "Syntax error" is here to catch this case.
3905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3906 /* end confdefs.h. */
3907 #ifdef __STDC__
3908 # include <limits.h>
3909 #else
3910 # include <assert.h>
3911 #endif
3912 Syntax error
3913 _ACEOF
3914 if ac_fn_c_try_cpp "$LINENO"; then :
3915
3916 else
3917 # Broken: fails on valid input.
3918 continue
3919 fi
3920 rm -f conftest.err conftest.i conftest.$ac_ext
3921
3922 # OK, works on sane cases. Now check whether nonexistent headers
3923 # can be detected and how.
3924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3925 /* end confdefs.h. */
3926 #include <ac_nonexistent.h>
3927 _ACEOF
3928 if ac_fn_c_try_cpp "$LINENO"; then :
3929 # Broken: success on invalid input.
3930 continue
3931 else
3932 # Passes both tests.
3933 ac_preproc_ok=:
3934 break
3935 fi
3936 rm -f conftest.err conftest.i conftest.$ac_ext
3937
3938 done
3939 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3940 rm -f conftest.i conftest.err conftest.$ac_ext
3941 if $ac_preproc_ok; then :
3942
3943 else
3944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3945 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3946 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3947 See \`config.log' for more details" "$LINENO" 5; }
3948 fi
3949
3950 ac_ext=c
3951 ac_cpp='$CPP $CPPFLAGS'
3952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3955
3956
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3958 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3959 if ${ac_cv_path_GREP+:} false; then :
3960 $as_echo_n "(cached) " >&6
3961 else
3962 if test -z "$GREP"; then
3963 ac_path_GREP_found=false
3964 # Loop through the user's path and test for each of PROGNAME-LIST
3965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3966 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3967 do
3968 IFS=$as_save_IFS
3969 test -z "$as_dir" && as_dir=.
3970 for ac_prog in grep ggrep; do
3971 for ac_exec_ext in '' $ac_executable_extensions; do
3972 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3973 as_fn_executable_p "$ac_path_GREP" || continue
3974 # Check for GNU ac_path_GREP and select it if it is found.
3975 # Check for GNU $ac_path_GREP
3976 case `"$ac_path_GREP" --version 2>&1` in
3977 *GNU*)
3978 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3979 *)
3980 ac_count=0
3981 $as_echo_n 0123456789 >"conftest.in"
3982 while :
3983 do
3984 cat "conftest.in" "conftest.in" >"conftest.tmp"
3985 mv "conftest.tmp" "conftest.in"
3986 cp "conftest.in" "conftest.nl"
3987 $as_echo 'GREP' >> "conftest.nl"
3988 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3989 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3990 as_fn_arith $ac_count + 1 && ac_count=$as_val
3991 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3992 # Best one so far, save it but keep looking for a better one
3993 ac_cv_path_GREP="$ac_path_GREP"
3994 ac_path_GREP_max=$ac_count
3995 fi
3996 # 10*(2^10) chars as input seems more than enough
3997 test $ac_count -gt 10 && break
3998 done
3999 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4000 esac
4001
4002 $ac_path_GREP_found && break 3
4003 done
4004 done
4005 done
4006 IFS=$as_save_IFS
4007 if test -z "$ac_cv_path_GREP"; then
4008 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4009 fi
4010 else
4011 ac_cv_path_GREP=$GREP
4012 fi
4013
4014 fi
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4016 $as_echo "$ac_cv_path_GREP" >&6; }
4017 GREP="$ac_cv_path_GREP"
4018
4019
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4021 $as_echo_n "checking for egrep... " >&6; }
4022 if ${ac_cv_path_EGREP+:} false; then :
4023 $as_echo_n "(cached) " >&6
4024 else
4025 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4026 then ac_cv_path_EGREP="$GREP -E"
4027 else
4028 if test -z "$EGREP"; then
4029 ac_path_EGREP_found=false
4030 # Loop through the user's path and test for each of PROGNAME-LIST
4031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4032 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4033 do
4034 IFS=$as_save_IFS
4035 test -z "$as_dir" && as_dir=.
4036 for ac_prog in egrep; do
4037 for ac_exec_ext in '' $ac_executable_extensions; do
4038 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4039 as_fn_executable_p "$ac_path_EGREP" || continue
4040 # Check for GNU ac_path_EGREP and select it if it is found.
4041 # Check for GNU $ac_path_EGREP
4042 case `"$ac_path_EGREP" --version 2>&1` in
4043 *GNU*)
4044 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4045 *)
4046 ac_count=0
4047 $as_echo_n 0123456789 >"conftest.in"
4048 while :
4049 do
4050 cat "conftest.in" "conftest.in" >"conftest.tmp"
4051 mv "conftest.tmp" "conftest.in"
4052 cp "conftest.in" "conftest.nl"
4053 $as_echo 'EGREP' >> "conftest.nl"
4054 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4055 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4056 as_fn_arith $ac_count + 1 && ac_count=$as_val
4057 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4058 # Best one so far, save it but keep looking for a better one
4059 ac_cv_path_EGREP="$ac_path_EGREP"
4060 ac_path_EGREP_max=$ac_count
4061 fi
4062 # 10*(2^10) chars as input seems more than enough
4063 test $ac_count -gt 10 && break
4064 done
4065 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4066 esac
4067
4068 $ac_path_EGREP_found && break 3
4069 done
4070 done
4071 done
4072 IFS=$as_save_IFS
4073 if test -z "$ac_cv_path_EGREP"; then
4074 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4075 fi
4076 else
4077 ac_cv_path_EGREP=$EGREP
4078 fi
4079
4080 fi
4081 fi
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4083 $as_echo "$ac_cv_path_EGREP" >&6; }
4084 EGREP="$ac_cv_path_EGREP"
4085
4086
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4088 $as_echo_n "checking for ANSI C header files... " >&6; }
4089 if ${ac_cv_header_stdc+:} false; then :
4090 $as_echo_n "(cached) " >&6
4091 else
4092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4093 /* end confdefs.h. */
4094 #include <stdlib.h>
4095 #include <stdarg.h>
4096 #include <string.h>
4097 #include <float.h>
4098
4099 int
4100 main ()
4101 {
4102
4103 ;
4104 return 0;
4105 }
4106 _ACEOF
4107 if ac_fn_c_try_compile "$LINENO"; then :
4108 ac_cv_header_stdc=yes
4109 else
4110 ac_cv_header_stdc=no
4111 fi
4112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4113
4114 if test $ac_cv_header_stdc = yes; then
4115 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4117 /* end confdefs.h. */
4118 #include <string.h>
4119
4120 _ACEOF
4121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4122 $EGREP "memchr" >/dev/null 2>&1; then :
4123
4124 else
4125 ac_cv_header_stdc=no
4126 fi
4127 rm -f conftest*
4128
4129 fi
4130
4131 if test $ac_cv_header_stdc = yes; then
4132 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4134 /* end confdefs.h. */
4135 #include <stdlib.h>
4136
4137 _ACEOF
4138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4139 $EGREP "free" >/dev/null 2>&1; then :
4140
4141 else
4142 ac_cv_header_stdc=no
4143 fi
4144 rm -f conftest*
4145
4146 fi
4147
4148 if test $ac_cv_header_stdc = yes; then
4149 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4150 if test "$cross_compiling" = yes; then :
4151 :
4152 else
4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4154 /* end confdefs.h. */
4155 #include <ctype.h>
4156 #include <stdlib.h>
4157 #if ((' ' & 0x0FF) == 0x020)
4158 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4159 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4160 #else
4161 # define ISLOWER(c) \
4162 (('a' <= (c) && (c) <= 'i') \
4163 || ('j' <= (c) && (c) <= 'r') \
4164 || ('s' <= (c) && (c) <= 'z'))
4165 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4166 #endif
4167
4168 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4169 int
4170 main ()
4171 {
4172 int i;
4173 for (i = 0; i < 256; i++)
4174 if (XOR (islower (i), ISLOWER (i))
4175 || toupper (i) != TOUPPER (i))
4176 return 2;
4177 return 0;
4178 }
4179 _ACEOF
4180 if ac_fn_c_try_run "$LINENO"; then :
4181
4182 else
4183 ac_cv_header_stdc=no
4184 fi
4185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4186 conftest.$ac_objext conftest.beam conftest.$ac_ext
4187 fi
4188
4189 fi
4190 fi
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4192 $as_echo "$ac_cv_header_stdc" >&6; }
4193 if test $ac_cv_header_stdc = yes; then
4194
4195 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4196
4197 fi
4198
4199 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4200 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4201 inttypes.h stdint.h unistd.h
4202 do :
4203 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4204 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4205 "
4206 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4207 cat >>confdefs.h <<_ACEOF
4208 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4209 _ACEOF
4210
4211 fi
4212
4213 done
4214
4215
4216
4217 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4218 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4219 MINIX=yes
4220 else
4221 MINIX=
4222 fi
4223
4224
4225 if test "$MINIX" = yes; then
4226
4227 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4228
4229
4230 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4231
4232
4233 $as_echo "#define _MINIX 1" >>confdefs.h
4234
4235 fi
4236
4237
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4239 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4240 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4241 $as_echo_n "(cached) " >&6
4242 else
4243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4244 /* end confdefs.h. */
4245
4246 # define __EXTENSIONS__ 1
4247 $ac_includes_default
4248 int
4249 main ()
4250 {
4251
4252 ;
4253 return 0;
4254 }
4255 _ACEOF
4256 if ac_fn_c_try_compile "$LINENO"; then :
4257 ac_cv_safe_to_define___extensions__=yes
4258 else
4259 ac_cv_safe_to_define___extensions__=no
4260 fi
4261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262 fi
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4264 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4265 test $ac_cv_safe_to_define___extensions__ = yes &&
4266 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4267
4268 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4269
4270 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4271
4272 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4273
4274 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4275
4276
4277 # Check whether --enable-largefile was given.
4278 if test "${enable_largefile+set}" = set; then :
4279 enableval=$enable_largefile;
4280 fi
4281
4282 if test "$enable_largefile" != no; then
4283
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4285 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4286 if ${ac_cv_sys_largefile_CC+:} false; then :
4287 $as_echo_n "(cached) " >&6
4288 else
4289 ac_cv_sys_largefile_CC=no
4290 if test "$GCC" != yes; then
4291 ac_save_CC=$CC
4292 while :; do
4293 # IRIX 6.2 and later do not support large files by default,
4294 # so use the C compiler's -n32 option if that helps.
4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296 /* end confdefs.h. */
4297 #include <sys/types.h>
4298 /* Check that off_t can represent 2**63 - 1 correctly.
4299 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4300 since some C++ compilers masquerading as C compilers
4301 incorrectly reject 9223372036854775807. */
4302 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4303 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4304 && LARGE_OFF_T % 2147483647 == 1)
4305 ? 1 : -1];
4306 int
4307 main ()
4308 {
4309
4310 ;
4311 return 0;
4312 }
4313 _ACEOF
4314 if ac_fn_c_try_compile "$LINENO"; then :
4315 break
4316 fi
4317 rm -f core conftest.err conftest.$ac_objext
4318 CC="$CC -n32"
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_sys_largefile_CC=' -n32'; break
4321 fi
4322 rm -f core conftest.err conftest.$ac_objext
4323 break
4324 done
4325 CC=$ac_save_CC
4326 rm -f conftest.$ac_ext
4327 fi
4328 fi
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4330 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4331 if test "$ac_cv_sys_largefile_CC" != no; then
4332 CC=$CC$ac_cv_sys_largefile_CC
4333 fi
4334
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4336 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4337 if ${ac_cv_sys_file_offset_bits+:} false; then :
4338 $as_echo_n "(cached) " >&6
4339 else
4340 while :; do
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h. */
4343 #include <sys/types.h>
4344 /* Check that off_t can represent 2**63 - 1 correctly.
4345 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4346 since some C++ compilers masquerading as C compilers
4347 incorrectly reject 9223372036854775807. */
4348 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4349 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4350 && LARGE_OFF_T % 2147483647 == 1)
4351 ? 1 : -1];
4352 int
4353 main ()
4354 {
4355
4356 ;
4357 return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361 ac_cv_sys_file_offset_bits=no; break
4362 fi
4363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365 /* end confdefs.h. */
4366 #define _FILE_OFFSET_BITS 64
4367 #include <sys/types.h>
4368 /* Check that off_t can represent 2**63 - 1 correctly.
4369 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4370 since some C++ compilers masquerading as C compilers
4371 incorrectly reject 9223372036854775807. */
4372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4373 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4374 && LARGE_OFF_T % 2147483647 == 1)
4375 ? 1 : -1];
4376 int
4377 main ()
4378 {
4379
4380 ;
4381 return 0;
4382 }
4383 _ACEOF
4384 if ac_fn_c_try_compile "$LINENO"; then :
4385 ac_cv_sys_file_offset_bits=64; break
4386 fi
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388 ac_cv_sys_file_offset_bits=unknown
4389 break
4390 done
4391 fi
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4393 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4394 case $ac_cv_sys_file_offset_bits in #(
4395 no | unknown) ;;
4396 *)
4397 cat >>confdefs.h <<_ACEOF
4398 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4399 _ACEOF
4400 ;;
4401 esac
4402 rm -rf conftest*
4403 if test $ac_cv_sys_file_offset_bits = unknown; then
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4405 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4406 if ${ac_cv_sys_large_files+:} false; then :
4407 $as_echo_n "(cached) " >&6
4408 else
4409 while :; do
4410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411 /* end confdefs.h. */
4412 #include <sys/types.h>
4413 /* Check that off_t can represent 2**63 - 1 correctly.
4414 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4415 since some C++ compilers masquerading as C compilers
4416 incorrectly reject 9223372036854775807. */
4417 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4418 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4419 && LARGE_OFF_T % 2147483647 == 1)
4420 ? 1 : -1];
4421 int
4422 main ()
4423 {
4424
4425 ;
4426 return 0;
4427 }
4428 _ACEOF
4429 if ac_fn_c_try_compile "$LINENO"; then :
4430 ac_cv_sys_large_files=no; break
4431 fi
4432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4434 /* end confdefs.h. */
4435 #define _LARGE_FILES 1
4436 #include <sys/types.h>
4437 /* Check that off_t can represent 2**63 - 1 correctly.
4438 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4439 since some C++ compilers masquerading as C compilers
4440 incorrectly reject 9223372036854775807. */
4441 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4442 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4443 && LARGE_OFF_T % 2147483647 == 1)
4444 ? 1 : -1];
4445 int
4446 main ()
4447 {
4448
4449 ;
4450 return 0;
4451 }
4452 _ACEOF
4453 if ac_fn_c_try_compile "$LINENO"; then :
4454 ac_cv_sys_large_files=1; break
4455 fi
4456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4457 ac_cv_sys_large_files=unknown
4458 break
4459 done
4460 fi
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4462 $as_echo "$ac_cv_sys_large_files" >&6; }
4463 case $ac_cv_sys_large_files in #(
4464 no | unknown) ;;
4465 *)
4466 cat >>confdefs.h <<_ACEOF
4467 #define _LARGE_FILES $ac_cv_sys_large_files
4468 _ACEOF
4469 ;;
4470 esac
4471 rm -rf conftest*
4472 fi
4473
4474
4475 fi
4476
4477 ac_aux_dir=
4478 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4479 if test -f "$ac_dir/install-sh"; then
4480 ac_aux_dir=$ac_dir
4481 ac_install_sh="$ac_aux_dir/install-sh -c"
4482 break
4483 elif test -f "$ac_dir/install.sh"; then
4484 ac_aux_dir=$ac_dir
4485 ac_install_sh="$ac_aux_dir/install.sh -c"
4486 break
4487 elif test -f "$ac_dir/shtool"; then
4488 ac_aux_dir=$ac_dir
4489 ac_install_sh="$ac_aux_dir/shtool install -c"
4490 break
4491 fi
4492 done
4493 if test -z "$ac_aux_dir"; then
4494 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4495 fi
4496
4497 # These three variables are undocumented and unsupported,
4498 # and are intended to be withdrawn in a future Autoconf release.
4499 # They can cause serious problems if a builder's source tree is in a directory
4500 # whose full name contains unusual characters.
4501 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4502 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4503 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4504
4505
4506 # Expand $ac_aux_dir to an absolute path.
4507 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4508
4509 if test x"${install_sh+set}" != xset; then
4510 case $am_aux_dir in
4511 *\ * | *\ *)
4512 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4513 *)
4514 install_sh="\${SHELL} $am_aux_dir/install-sh"
4515 esac
4516 fi
4517
4518 # Installed binaries are usually stripped using 'strip' when the user
4519 # run "make install-strip". However 'strip' might not be the right
4520 # tool to use in cross-compilation environments, therefore Automake
4521 # will honor the 'STRIP' environment variable to overrule this program.
4522 if test "$cross_compiling" != no; then
4523 if test -n "$ac_tool_prefix"; then
4524 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4525 set dummy ${ac_tool_prefix}strip; ac_word=$2
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527 $as_echo_n "checking for $ac_word... " >&6; }
4528 if ${ac_cv_prog_STRIP+:} false; then :
4529 $as_echo_n "(cached) " >&6
4530 else
4531 if test -n "$STRIP"; then
4532 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4533 else
4534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4535 for as_dir in $PATH
4536 do
4537 IFS=$as_save_IFS
4538 test -z "$as_dir" && as_dir=.
4539 for ac_exec_ext in '' $ac_executable_extensions; do
4540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4541 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4543 break 2
4544 fi
4545 done
4546 done
4547 IFS=$as_save_IFS
4548
4549 fi
4550 fi
4551 STRIP=$ac_cv_prog_STRIP
4552 if test -n "$STRIP"; then
4553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4554 $as_echo "$STRIP" >&6; }
4555 else
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4557 $as_echo "no" >&6; }
4558 fi
4559
4560
4561 fi
4562 if test -z "$ac_cv_prog_STRIP"; then
4563 ac_ct_STRIP=$STRIP
4564 # Extract the first word of "strip", so it can be a program name with args.
4565 set dummy strip; ac_word=$2
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567 $as_echo_n "checking for $ac_word... " >&6; }
4568 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4569 $as_echo_n "(cached) " >&6
4570 else
4571 if test -n "$ac_ct_STRIP"; then
4572 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4573 else
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575 for as_dir in $PATH
4576 do
4577 IFS=$as_save_IFS
4578 test -z "$as_dir" && as_dir=.
4579 for ac_exec_ext in '' $ac_executable_extensions; do
4580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4581 ac_cv_prog_ac_ct_STRIP="strip"
4582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4583 break 2
4584 fi
4585 done
4586 done
4587 IFS=$as_save_IFS
4588
4589 fi
4590 fi
4591 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4592 if test -n "$ac_ct_STRIP"; then
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4594 $as_echo "$ac_ct_STRIP" >&6; }
4595 else
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597 $as_echo "no" >&6; }
4598 fi
4599
4600 if test "x$ac_ct_STRIP" = x; then
4601 STRIP=":"
4602 else
4603 case $cross_compiling:$ac_tool_warned in
4604 yes:)
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4606 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4607 ac_tool_warned=yes ;;
4608 esac
4609 STRIP=$ac_ct_STRIP
4610 fi
4611 else
4612 STRIP="$ac_cv_prog_STRIP"
4613 fi
4614
4615 fi
4616 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4617
4618
4619 # Set build, build_cpu, build_vendor and build_os.
4620 # Make sure we can run config.sub.
4621 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4622 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4623
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4625 $as_echo_n "checking build system type... " >&6; }
4626 if ${ac_cv_build+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628 else
4629 ac_build_alias=$build_alias
4630 test "x$ac_build_alias" = x &&
4631 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4632 test "x$ac_build_alias" = x &&
4633 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4634 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4635 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4636
4637 fi
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4639 $as_echo "$ac_cv_build" >&6; }
4640 case $ac_cv_build in
4641 *-*-*) ;;
4642 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4643 esac
4644 build=$ac_cv_build
4645 ac_save_IFS=$IFS; IFS='-'
4646 set x $ac_cv_build
4647 shift
4648 build_cpu=$1
4649 build_vendor=$2
4650 shift; shift
4651 # Remember, the first character of IFS is used to create $*,
4652 # except with old shells:
4653 build_os=$*
4654 IFS=$ac_save_IFS
4655 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4656
4657
4658
4659 # Set host, host_cpu, host_vendor, and host_os.
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4661 $as_echo_n "checking host system type... " >&6; }
4662 if ${ac_cv_host+:} false; then :
4663 $as_echo_n "(cached) " >&6
4664 else
4665 if test "x$host_alias" = x; then
4666 ac_cv_host=$ac_cv_build
4667 else
4668 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4669 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4670 fi
4671
4672 fi
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4674 $as_echo "$ac_cv_host" >&6; }
4675 case $ac_cv_host in
4676 *-*-*) ;;
4677 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4678 esac
4679 host=$ac_cv_host
4680 ac_save_IFS=$IFS; IFS='-'
4681 set x $ac_cv_host
4682 shift
4683 host_cpu=$1
4684 host_vendor=$2
4685 shift; shift
4686 # Remember, the first character of IFS is used to create $*,
4687 # except with old shells:
4688 host_os=$*
4689 IFS=$ac_save_IFS
4690 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4691
4692
4693
4694 # Set target, target_cpu, target_vendor, and target_os.
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4696 $as_echo_n "checking target system type... " >&6; }
4697 if ${ac_cv_target+:} false; then :
4698 $as_echo_n "(cached) " >&6
4699 else
4700 if test "x$target_alias" = x; then
4701 ac_cv_target=$ac_cv_host
4702 else
4703 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4704 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4705 fi
4706
4707 fi
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4709 $as_echo "$ac_cv_target" >&6; }
4710 case $ac_cv_target in
4711 *-*-*) ;;
4712 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4713 esac
4714 target=$ac_cv_target
4715 ac_save_IFS=$IFS; IFS='-'
4716 set x $ac_cv_target
4717 shift
4718 target_cpu=$1
4719 target_vendor=$2
4720 shift; shift
4721 # Remember, the first character of IFS is used to create $*,
4722 # except with old shells:
4723 target_os=$*
4724 IFS=$ac_save_IFS
4725 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4726
4727
4728 # The aliases save the names the user supplied, while $host etc.
4729 # will get canonicalized.
4730 test -n "$target_alias" &&
4731 test "$program_prefix$program_suffix$program_transform_name" = \
4732 NONENONEs,x,x, &&
4733 program_prefix=${target_alias}-
4734
4735 # Find a good install program. We prefer a C program (faster),
4736 # so one script is as good as another. But avoid the broken or
4737 # incompatible versions:
4738 # SysV /etc/install, /usr/sbin/install
4739 # SunOS /usr/etc/install
4740 # IRIX /sbin/install
4741 # AIX /bin/install
4742 # AmigaOS /C/install, which installs bootblocks on floppy discs
4743 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4744 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4745 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4746 # OS/2's system install, which has a completely different semantic
4747 # ./install, which can be erroneously created by make from ./install.sh.
4748 # Reject install programs that cannot install multiple files.
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4750 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4751 if test -z "$INSTALL"; then
4752 if ${ac_cv_path_install+:} false; then :
4753 $as_echo_n "(cached) " >&6
4754 else
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756 for as_dir in $PATH
4757 do
4758 IFS=$as_save_IFS
4759 test -z "$as_dir" && as_dir=.
4760 # Account for people who put trailing slashes in PATH elements.
4761 case $as_dir/ in #((
4762 ./ | .// | /[cC]/* | \
4763 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4764 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4765 /usr/ucb/* ) ;;
4766 *)
4767 # OSF1 and SCO ODT 3.0 have their own names for install.
4768 # Don't use installbsd from OSF since it installs stuff as root
4769 # by default.
4770 for ac_prog in ginstall scoinst install; do
4771 for ac_exec_ext in '' $ac_executable_extensions; do
4772 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4773 if test $ac_prog = install &&
4774 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4775 # AIX install. It has an incompatible calling convention.
4776 :
4777 elif test $ac_prog = install &&
4778 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4779 # program-specific install script used by HP pwplus--don't use.
4780 :
4781 else
4782 rm -rf conftest.one conftest.two conftest.dir
4783 echo one > conftest.one
4784 echo two > conftest.two
4785 mkdir conftest.dir
4786 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4787 test -s conftest.one && test -s conftest.two &&
4788 test -s conftest.dir/conftest.one &&
4789 test -s conftest.dir/conftest.two
4790 then
4791 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4792 break 3
4793 fi
4794 fi
4795 fi
4796 done
4797 done
4798 ;;
4799 esac
4800
4801 done
4802 IFS=$as_save_IFS
4803
4804 rm -rf conftest.one conftest.two conftest.dir
4805
4806 fi
4807 if test "${ac_cv_path_install+set}" = set; then
4808 INSTALL=$ac_cv_path_install
4809 else
4810 # As a last resort, use the slow shell script. Don't cache a
4811 # value for INSTALL within a source directory, because that will
4812 # break other packages using the cache if that directory is
4813 # removed, or if the value is a relative name.
4814 INSTALL=$ac_install_sh
4815 fi
4816 fi
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4818 $as_echo "$INSTALL" >&6; }
4819
4820 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4821 # It thinks the first close brace ends the variable substitution.
4822 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4823
4824 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4825
4826 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4827
4828 if test -n "$ac_tool_prefix"; then
4829 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4830 set dummy ${ac_tool_prefix}ar; ac_word=$2
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832 $as_echo_n "checking for $ac_word... " >&6; }
4833 if ${ac_cv_prog_AR+:} false; then :
4834 $as_echo_n "(cached) " >&6
4835 else
4836 if test -n "$AR"; then
4837 ac_cv_prog_AR="$AR" # Let the user override the test.
4838 else
4839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840 for as_dir in $PATH
4841 do
4842 IFS=$as_save_IFS
4843 test -z "$as_dir" && as_dir=.
4844 for ac_exec_ext in '' $ac_executable_extensions; do
4845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4846 ac_cv_prog_AR="${ac_tool_prefix}ar"
4847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4848 break 2
4849 fi
4850 done
4851 done
4852 IFS=$as_save_IFS
4853
4854 fi
4855 fi
4856 AR=$ac_cv_prog_AR
4857 if test -n "$AR"; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4859 $as_echo "$AR" >&6; }
4860 else
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862 $as_echo "no" >&6; }
4863 fi
4864
4865
4866 fi
4867 if test -z "$ac_cv_prog_AR"; then
4868 ac_ct_AR=$AR
4869 # Extract the first word of "ar", so it can be a program name with args.
4870 set dummy ar; ac_word=$2
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872 $as_echo_n "checking for $ac_word... " >&6; }
4873 if ${ac_cv_prog_ac_ct_AR+:} false; then :
4874 $as_echo_n "(cached) " >&6
4875 else
4876 if test -n "$ac_ct_AR"; then
4877 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4878 else
4879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880 for as_dir in $PATH
4881 do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
4885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4886 ac_cv_prog_ac_ct_AR="ar"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890 done
4891 done
4892 IFS=$as_save_IFS
4893
4894 fi
4895 fi
4896 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4897 if test -n "$ac_ct_AR"; then
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4899 $as_echo "$ac_ct_AR" >&6; }
4900 else
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902 $as_echo "no" >&6; }
4903 fi
4904
4905 if test "x$ac_ct_AR" = x; then
4906 AR=""
4907 else
4908 case $cross_compiling:$ac_tool_warned in
4909 yes:)
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4911 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4912 ac_tool_warned=yes ;;
4913 esac
4914 AR=$ac_ct_AR
4915 fi
4916 else
4917 AR="$ac_cv_prog_AR"
4918 fi
4919
4920 if test -n "$ac_tool_prefix"; then
4921 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4922 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924 $as_echo_n "checking for $ac_word... " >&6; }
4925 if ${ac_cv_prog_RANLIB+:} false; then :
4926 $as_echo_n "(cached) " >&6
4927 else
4928 if test -n "$RANLIB"; then
4929 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4930 else
4931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932 for as_dir in $PATH
4933 do
4934 IFS=$as_save_IFS
4935 test -z "$as_dir" && as_dir=.
4936 for ac_exec_ext in '' $ac_executable_extensions; do
4937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4938 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940 break 2
4941 fi
4942 done
4943 done
4944 IFS=$as_save_IFS
4945
4946 fi
4947 fi
4948 RANLIB=$ac_cv_prog_RANLIB
4949 if test -n "$RANLIB"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4951 $as_echo "$RANLIB" >&6; }
4952 else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954 $as_echo "no" >&6; }
4955 fi
4956
4957
4958 fi
4959 if test -z "$ac_cv_prog_RANLIB"; then
4960 ac_ct_RANLIB=$RANLIB
4961 # Extract the first word of "ranlib", so it can be a program name with args.
4962 set dummy ranlib; ac_word=$2
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964 $as_echo_n "checking for $ac_word... " >&6; }
4965 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4966 $as_echo_n "(cached) " >&6
4967 else
4968 if test -n "$ac_ct_RANLIB"; then
4969 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4970 else
4971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972 for as_dir in $PATH
4973 do
4974 IFS=$as_save_IFS
4975 test -z "$as_dir" && as_dir=.
4976 for ac_exec_ext in '' $ac_executable_extensions; do
4977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978 ac_cv_prog_ac_ct_RANLIB="ranlib"
4979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980 break 2
4981 fi
4982 done
4983 done
4984 IFS=$as_save_IFS
4985
4986 fi
4987 fi
4988 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4989 if test -n "$ac_ct_RANLIB"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4991 $as_echo "$ac_ct_RANLIB" >&6; }
4992 else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994 $as_echo "no" >&6; }
4995 fi
4996
4997 if test "x$ac_ct_RANLIB" = x; then
4998 RANLIB=":"
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001 yes:)
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004 ac_tool_warned=yes ;;
5005 esac
5006 RANLIB=$ac_ct_RANLIB
5007 fi
5008 else
5009 RANLIB="$ac_cv_prog_RANLIB"
5010 fi
5011
5012
5013 test "$program_prefix" != NONE &&
5014 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5015 # Use a double $ so make ignores it.
5016 test "$program_suffix" != NONE &&
5017 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5018 # Double any \ or $.
5019 # By default was `s,x,x', remove it if useless.
5020 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5021 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5022
5023
5024 # We require a C++17 compiler. Check if one is available, and if
5025 # necessary, set CXX_DIALECT to some -std=xxx switch.
5026
5027 ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true
5028 ac_ext=cpp
5029 ac_cpp='$CXXCPP $CPPFLAGS'
5030 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5031 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5032 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5033 CXX_DIALECT=""
5034 ac_success=no
5035
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features by default" >&5
5037 $as_echo_n "checking whether $CXX supports C++17 features by default... " >&6; }
5038 if ${ax_cv_cxx_compile_cxx17+:} false; then :
5039 $as_echo_n "(cached) " >&6
5040 else
5041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5042 /* end confdefs.h. */
5043
5044
5045 // If the compiler admits that it is not ready for C++11, why torture it?
5046 // Hopefully, this will speed up the test.
5047
5048 #ifndef __cplusplus
5049
5050 #error "This is not a C++ compiler"
5051
5052 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
5053 // only set it correctly if /Zc:__cplusplus is specified as well as a
5054 // /std:c++NN switch:
5055 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5056 #elif __cplusplus < 201103L && !defined _MSC_VER
5057
5058 #error "This is not a C++11 compiler"
5059
5060 #else
5061
5062 namespace cxx11
5063 {
5064
5065 namespace test_static_assert
5066 {
5067
5068 template <typename T>
5069 struct check
5070 {
5071 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5072 };
5073
5074 }
5075
5076 namespace test_final_override
5077 {
5078
5079 struct Base
5080 {
5081 virtual ~Base() {}
5082 virtual void f() {}
5083 };
5084
5085 struct Derived : public Base
5086 {
5087 virtual ~Derived() override {}
5088 virtual void f() override {}
5089 };
5090
5091 }
5092
5093 namespace test_double_right_angle_brackets
5094 {
5095
5096 template < typename T >
5097 struct check {};
5098
5099 typedef check<void> single_type;
5100 typedef check<check<void>> double_type;
5101 typedef check<check<check<void>>> triple_type;
5102 typedef check<check<check<check<void>>>> quadruple_type;
5103
5104 }
5105
5106 namespace test_decltype
5107 {
5108
5109 int
5110 f()
5111 {
5112 int a = 1;
5113 decltype(a) b = 2;
5114 return a + b;
5115 }
5116
5117 }
5118
5119 namespace test_type_deduction
5120 {
5121
5122 template < typename T1, typename T2 >
5123 struct is_same
5124 {
5125 static const bool value = false;
5126 };
5127
5128 template < typename T >
5129 struct is_same<T, T>
5130 {
5131 static const bool value = true;
5132 };
5133
5134 template < typename T1, typename T2 >
5135 auto
5136 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5137 {
5138 return a1 + a2;
5139 }
5140
5141 int
5142 test(const int c, volatile int v)
5143 {
5144 static_assert(is_same<int, decltype(0)>::value == true, "");
5145 static_assert(is_same<int, decltype(c)>::value == false, "");
5146 static_assert(is_same<int, decltype(v)>::value == false, "");
5147 auto ac = c;
5148 auto av = v;
5149 auto sumi = ac + av + 'x';
5150 auto sumf = ac + av + 1.0;
5151 static_assert(is_same<int, decltype(ac)>::value == true, "");
5152 static_assert(is_same<int, decltype(av)>::value == true, "");
5153 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5154 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5155 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5156 return (sumf > 0.0) ? sumi : add(c, v);
5157 }
5158
5159 }
5160
5161 namespace test_noexcept
5162 {
5163
5164 int f() { return 0; }
5165 int g() noexcept { return 0; }
5166
5167 static_assert(noexcept(f()) == false, "");
5168 static_assert(noexcept(g()) == true, "");
5169
5170 }
5171
5172 namespace test_constexpr
5173 {
5174
5175 template < typename CharT >
5176 unsigned long constexpr
5177 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5178 {
5179 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5180 }
5181
5182 template < typename CharT >
5183 unsigned long constexpr
5184 strlen_c(const CharT *const s) noexcept
5185 {
5186 return strlen_c_r(s, 0UL);
5187 }
5188
5189 static_assert(strlen_c("") == 0UL, "");
5190 static_assert(strlen_c("1") == 1UL, "");
5191 static_assert(strlen_c("example") == 7UL, "");
5192 static_assert(strlen_c("another\0example") == 7UL, "");
5193
5194 }
5195
5196 namespace test_rvalue_references
5197 {
5198
5199 template < int N >
5200 struct answer
5201 {
5202 static constexpr int value = N;
5203 };
5204
5205 answer<1> f(int&) { return answer<1>(); }
5206 answer<2> f(const int&) { return answer<2>(); }
5207 answer<3> f(int&&) { return answer<3>(); }
5208
5209 void
5210 test()
5211 {
5212 int i = 0;
5213 const int c = 0;
5214 static_assert(decltype(f(i))::value == 1, "");
5215 static_assert(decltype(f(c))::value == 2, "");
5216 static_assert(decltype(f(0))::value == 3, "");
5217 }
5218
5219 }
5220
5221 namespace test_uniform_initialization
5222 {
5223
5224 struct test
5225 {
5226 static const int zero {};
5227 static const int one {1};
5228 };
5229
5230 static_assert(test::zero == 0, "");
5231 static_assert(test::one == 1, "");
5232
5233 }
5234
5235 namespace test_lambdas
5236 {
5237
5238 void
5239 test1()
5240 {
5241 auto lambda1 = [](){};
5242 auto lambda2 = lambda1;
5243 lambda1();
5244 lambda2();
5245 }
5246
5247 int
5248 test2()
5249 {
5250 auto a = [](int i, int j){ return i + j; }(1, 2);
5251 auto b = []() -> int { return '0'; }();
5252 auto c = [=](){ return a + b; }();
5253 auto d = [&](){ return c; }();
5254 auto e = [a, &b](int x) mutable {
5255 const auto identity = [](int y){ return y; };
5256 for (auto i = 0; i < a; ++i)
5257 a += b--;
5258 return x + identity(a + b);
5259 }(0);
5260 return a + b + c + d + e;
5261 }
5262
5263 int
5264 test3()
5265 {
5266 const auto nullary = [](){ return 0; };
5267 const auto unary = [](int x){ return x; };
5268 using nullary_t = decltype(nullary);
5269 using unary_t = decltype(unary);
5270 const auto higher1st = [](nullary_t f){ return f(); };
5271 const auto higher2nd = [unary](nullary_t f1){
5272 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5273 };
5274 return higher1st(nullary) + higher2nd(nullary)(unary);
5275 }
5276
5277 }
5278
5279 namespace test_variadic_templates
5280 {
5281
5282 template <int...>
5283 struct sum;
5284
5285 template <int N0, int... N1toN>
5286 struct sum<N0, N1toN...>
5287 {
5288 static constexpr auto value = N0 + sum<N1toN...>::value;
5289 };
5290
5291 template <>
5292 struct sum<>
5293 {
5294 static constexpr auto value = 0;
5295 };
5296
5297 static_assert(sum<>::value == 0, "");
5298 static_assert(sum<1>::value == 1, "");
5299 static_assert(sum<23>::value == 23, "");
5300 static_assert(sum<1, 2>::value == 3, "");
5301 static_assert(sum<5, 5, 11>::value == 21, "");
5302 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5303
5304 }
5305
5306 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5307 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5308 // because of this.
5309 namespace test_template_alias_sfinae
5310 {
5311
5312 struct foo {};
5313
5314 template<typename T>
5315 using member = typename T::member_type;
5316
5317 template<typename T>
5318 void func(...) {}
5319
5320 template<typename T>
5321 void func(member<T>*) {}
5322
5323 void test();
5324
5325 void test() { func<foo>(0); }
5326
5327 }
5328
5329 } // namespace cxx11
5330
5331 #endif // __cplusplus >= 201103L
5332
5333
5334
5335
5336 // If the compiler admits that it is not ready for C++14, why torture it?
5337 // Hopefully, this will speed up the test.
5338
5339 #ifndef __cplusplus
5340
5341 #error "This is not a C++ compiler"
5342
5343 #elif __cplusplus < 201402L && !defined _MSC_VER
5344
5345 #error "This is not a C++14 compiler"
5346
5347 #else
5348
5349 namespace cxx14
5350 {
5351
5352 namespace test_polymorphic_lambdas
5353 {
5354
5355 int
5356 test()
5357 {
5358 const auto lambda = [](auto&&... args){
5359 const auto istiny = [](auto x){
5360 return (sizeof(x) == 1UL) ? 1 : 0;
5361 };
5362 const int aretiny[] = { istiny(args)... };
5363 return aretiny[0];
5364 };
5365 return lambda(1, 1L, 1.0f, '1');
5366 }
5367
5368 }
5369
5370 namespace test_binary_literals
5371 {
5372
5373 constexpr auto ivii = 0b0000000000101010;
5374 static_assert(ivii == 42, "wrong value");
5375
5376 }
5377
5378 namespace test_generalized_constexpr
5379 {
5380
5381 template < typename CharT >
5382 constexpr unsigned long
5383 strlen_c(const CharT *const s) noexcept
5384 {
5385 auto length = 0UL;
5386 for (auto p = s; *p; ++p)
5387 ++length;
5388 return length;
5389 }
5390
5391 static_assert(strlen_c("") == 0UL, "");
5392 static_assert(strlen_c("x") == 1UL, "");
5393 static_assert(strlen_c("test") == 4UL, "");
5394 static_assert(strlen_c("another\0test") == 7UL, "");
5395
5396 }
5397
5398 namespace test_lambda_init_capture
5399 {
5400
5401 int
5402 test()
5403 {
5404 auto x = 0;
5405 const auto lambda1 = [a = x](int b){ return a + b; };
5406 const auto lambda2 = [a = lambda1(x)](){ return a; };
5407 return lambda2();
5408 }
5409
5410 }
5411
5412 namespace test_digit_separators
5413 {
5414
5415 constexpr auto ten_million = 100'000'000;
5416 static_assert(ten_million == 100000000, "");
5417
5418 }
5419
5420 namespace test_return_type_deduction
5421 {
5422
5423 auto f(int& x) { return x; }
5424 decltype(auto) g(int& x) { return x; }
5425
5426 template < typename T1, typename T2 >
5427 struct is_same
5428 {
5429 static constexpr auto value = false;
5430 };
5431
5432 template < typename T >
5433 struct is_same<T, T>
5434 {
5435 static constexpr auto value = true;
5436 };
5437
5438 int
5439 test()
5440 {
5441 auto x = 0;
5442 static_assert(is_same<int, decltype(f(x))>::value, "");
5443 static_assert(is_same<int&, decltype(g(x))>::value, "");
5444 return x;
5445 }
5446
5447 }
5448
5449 } // namespace cxx14
5450
5451 #endif // __cplusplus >= 201402L
5452
5453
5454
5455
5456 // If the compiler admits that it is not ready for C++17, why torture it?
5457 // Hopefully, this will speed up the test.
5458
5459 #ifndef __cplusplus
5460
5461 #error "This is not a C++ compiler"
5462
5463 #elif __cplusplus < 201703L && !defined _MSC_VER
5464
5465 #error "This is not a C++17 compiler"
5466
5467 #else
5468
5469 #include <initializer_list>
5470 #include <utility>
5471 #include <type_traits>
5472
5473 namespace cxx17
5474 {
5475
5476 namespace test_constexpr_lambdas
5477 {
5478
5479 constexpr int foo = [](){return 42;}();
5480
5481 }
5482
5483 namespace test::nested_namespace::definitions
5484 {
5485
5486 }
5487
5488 namespace test_fold_expression
5489 {
5490
5491 template<typename... Args>
5492 int multiply(Args... args)
5493 {
5494 return (args * ... * 1);
5495 }
5496
5497 template<typename... Args>
5498 bool all(Args... args)
5499 {
5500 return (args && ...);
5501 }
5502
5503 }
5504
5505 namespace test_extended_static_assert
5506 {
5507
5508 static_assert (true);
5509
5510 }
5511
5512 namespace test_auto_brace_init_list
5513 {
5514
5515 auto foo = {5};
5516 auto bar {5};
5517
5518 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
5519 static_assert(std::is_same<int, decltype(bar)>::value);
5520 }
5521
5522 namespace test_typename_in_template_template_parameter
5523 {
5524
5525 template<template<typename> typename X> struct D;
5526
5527 }
5528
5529 namespace test_fallthrough_nodiscard_maybe_unused_attributes
5530 {
5531
5532 int f1()
5533 {
5534 return 42;
5535 }
5536
5537 [[nodiscard]] int f2()
5538 {
5539 [[maybe_unused]] auto unused = f1();
5540
5541 switch (f1())
5542 {
5543 case 17:
5544 f1();
5545 [[fallthrough]];
5546 case 42:
5547 f1();
5548 }
5549 return f1();
5550 }
5551
5552 }
5553
5554 namespace test_extended_aggregate_initialization
5555 {
5556
5557 struct base1
5558 {
5559 int b1, b2 = 42;
5560 };
5561
5562 struct base2
5563 {
5564 base2() {
5565 b3 = 42;
5566 }
5567 int b3;
5568 };
5569
5570 struct derived : base1, base2
5571 {
5572 int d;
5573 };
5574
5575 derived d1 {{1, 2}, {}, 4}; // full initialization
5576 derived d2 {{}, {}, 4}; // value-initialized bases
5577
5578 }
5579
5580 namespace test_general_range_based_for_loop
5581 {
5582
5583 struct iter
5584 {
5585 int i;
5586
5587 int& operator* ()
5588 {
5589 return i;
5590 }
5591
5592 const int& operator* () const
5593 {
5594 return i;
5595 }
5596
5597 iter& operator++()
5598 {
5599 ++i;
5600 return *this;
5601 }
5602 };
5603
5604 struct sentinel
5605 {
5606 int i;
5607 };
5608
5609 bool operator== (const iter& i, const sentinel& s)
5610 {
5611 return i.i == s.i;
5612 }
5613
5614 bool operator!= (const iter& i, const sentinel& s)
5615 {
5616 return !(i == s);
5617 }
5618
5619 struct range
5620 {
5621 iter begin() const
5622 {
5623 return {0};
5624 }
5625
5626 sentinel end() const
5627 {
5628 return {5};
5629 }
5630 };
5631
5632 void f()
5633 {
5634 range r {};
5635
5636 for (auto i : r)
5637 {
5638 [[maybe_unused]] auto v = i;
5639 }
5640 }
5641
5642 }
5643
5644 namespace test_lambda_capture_asterisk_this_by_value
5645 {
5646
5647 struct t
5648 {
5649 int i;
5650 int foo()
5651 {
5652 return [*this]()
5653 {
5654 return i;
5655 }();
5656 }
5657 };
5658
5659 }
5660
5661 namespace test_enum_class_construction
5662 {
5663
5664 enum class byte : unsigned char
5665 {};
5666
5667 byte foo {42};
5668
5669 }
5670
5671 namespace test_constexpr_if
5672 {
5673
5674 template <bool cond>
5675 int f ()
5676 {
5677 if constexpr(cond)
5678 {
5679 return 13;
5680 }
5681 else
5682 {
5683 return 42;
5684 }
5685 }
5686
5687 }
5688
5689 namespace test_selection_statement_with_initializer
5690 {
5691
5692 int f()
5693 {
5694 return 13;
5695 }
5696
5697 int f2()
5698 {
5699 if (auto i = f(); i > 0)
5700 {
5701 return 3;
5702 }
5703
5704 switch (auto i = f(); i + 4)
5705 {
5706 case 17:
5707 return 2;
5708
5709 default:
5710 return 1;
5711 }
5712 }
5713
5714 }
5715
5716 namespace test_template_argument_deduction_for_class_templates
5717 {
5718
5719 template <typename T1, typename T2>
5720 struct pair
5721 {
5722 pair (T1 p1, T2 p2)
5723 : m1 {p1},
5724 m2 {p2}
5725 {}
5726
5727 T1 m1;
5728 T2 m2;
5729 };
5730
5731 void f()
5732 {
5733 [[maybe_unused]] auto p = pair{13, 42u};
5734 }
5735
5736 }
5737
5738 namespace test_non_type_auto_template_parameters
5739 {
5740
5741 template <auto n>
5742 struct B
5743 {};
5744
5745 B<5> b1;
5746 B<'a'> b2;
5747
5748 }
5749
5750 namespace test_structured_bindings
5751 {
5752
5753 int arr[2] = { 1, 2 };
5754 std::pair<int, int> pr = { 1, 2 };
5755
5756 auto f1() -> int(&)[2]
5757 {
5758 return arr;
5759 }
5760
5761 auto f2() -> std::pair<int, int>&
5762 {
5763 return pr;
5764 }
5765
5766 struct S
5767 {
5768 int x1 : 2;
5769 volatile double y1;
5770 };
5771
5772 S f3()
5773 {
5774 return {};
5775 }
5776
5777 auto [ x1, y1 ] = f1();
5778 auto& [ xr1, yr1 ] = f1();
5779 auto [ x2, y2 ] = f2();
5780 auto& [ xr2, yr2 ] = f2();
5781 const auto [ x3, y3 ] = f3();
5782
5783 }
5784
5785 namespace test_exception_spec_type_system
5786 {
5787
5788 struct Good {};
5789 struct Bad {};
5790
5791 void g1() noexcept;
5792 void g2();
5793
5794 template<typename T>
5795 Bad
5796 f(T*, T*);
5797
5798 template<typename T1, typename T2>
5799 Good
5800 f(T1*, T2*);
5801
5802 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
5803
5804 }
5805
5806 namespace test_inline_variables
5807 {
5808
5809 template<class T> void f(T)
5810 {}
5811
5812 template<class T> inline T g(T)
5813 {
5814 return T{};
5815 }
5816
5817 template<> inline void f<>(int)
5818 {}
5819
5820 template<> int g<>(int)
5821 {
5822 return 5;
5823 }
5824
5825 }
5826
5827 } // namespace cxx17
5828
5829 #endif // __cplusplus < 201703L && !defined _MSC_VER
5830
5831
5832
5833 _ACEOF
5834 if ac_fn_cxx_try_compile "$LINENO"; then :
5835 ax_cv_cxx_compile_cxx17=yes
5836 else
5837 ax_cv_cxx_compile_cxx17=no
5838 fi
5839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5840 fi
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx17" >&5
5842 $as_echo "$ax_cv_cxx_compile_cxx17" >&6; }
5843 if test x$ax_cv_cxx_compile_cxx17 = xyes; then
5844 ac_success=yes
5845 fi
5846
5847 if test x$ac_success = xno; then
5848 for alternative in ${ax_cxx_compile_alternatives}; do
5849 switch="-std=gnu++${alternative}"
5850 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
5852 $as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
5853 if eval \${$cachevar+:} false; then :
5854 $as_echo_n "(cached) " >&6
5855 else
5856 ac_save_CXX="$CXX"
5857 CXX="$CXX $switch"
5858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5859 /* end confdefs.h. */
5860
5861
5862 // If the compiler admits that it is not ready for C++11, why torture it?
5863 // Hopefully, this will speed up the test.
5864
5865 #ifndef __cplusplus
5866
5867 #error "This is not a C++ compiler"
5868
5869 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
5870 // only set it correctly if /Zc:__cplusplus is specified as well as a
5871 // /std:c++NN switch:
5872 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5873 #elif __cplusplus < 201103L && !defined _MSC_VER
5874
5875 #error "This is not a C++11 compiler"
5876
5877 #else
5878
5879 namespace cxx11
5880 {
5881
5882 namespace test_static_assert
5883 {
5884
5885 template <typename T>
5886 struct check
5887 {
5888 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5889 };
5890
5891 }
5892
5893 namespace test_final_override
5894 {
5895
5896 struct Base
5897 {
5898 virtual ~Base() {}
5899 virtual void f() {}
5900 };
5901
5902 struct Derived : public Base
5903 {
5904 virtual ~Derived() override {}
5905 virtual void f() override {}
5906 };
5907
5908 }
5909
5910 namespace test_double_right_angle_brackets
5911 {
5912
5913 template < typename T >
5914 struct check {};
5915
5916 typedef check<void> single_type;
5917 typedef check<check<void>> double_type;
5918 typedef check<check<check<void>>> triple_type;
5919 typedef check<check<check<check<void>>>> quadruple_type;
5920
5921 }
5922
5923 namespace test_decltype
5924 {
5925
5926 int
5927 f()
5928 {
5929 int a = 1;
5930 decltype(a) b = 2;
5931 return a + b;
5932 }
5933
5934 }
5935
5936 namespace test_type_deduction
5937 {
5938
5939 template < typename T1, typename T2 >
5940 struct is_same
5941 {
5942 static const bool value = false;
5943 };
5944
5945 template < typename T >
5946 struct is_same<T, T>
5947 {
5948 static const bool value = true;
5949 };
5950
5951 template < typename T1, typename T2 >
5952 auto
5953 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5954 {
5955 return a1 + a2;
5956 }
5957
5958 int
5959 test(const int c, volatile int v)
5960 {
5961 static_assert(is_same<int, decltype(0)>::value == true, "");
5962 static_assert(is_same<int, decltype(c)>::value == false, "");
5963 static_assert(is_same<int, decltype(v)>::value == false, "");
5964 auto ac = c;
5965 auto av = v;
5966 auto sumi = ac + av + 'x';
5967 auto sumf = ac + av + 1.0;
5968 static_assert(is_same<int, decltype(ac)>::value == true, "");
5969 static_assert(is_same<int, decltype(av)>::value == true, "");
5970 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5971 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5972 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5973 return (sumf > 0.0) ? sumi : add(c, v);
5974 }
5975
5976 }
5977
5978 namespace test_noexcept
5979 {
5980
5981 int f() { return 0; }
5982 int g() noexcept { return 0; }
5983
5984 static_assert(noexcept(f()) == false, "");
5985 static_assert(noexcept(g()) == true, "");
5986
5987 }
5988
5989 namespace test_constexpr
5990 {
5991
5992 template < typename CharT >
5993 unsigned long constexpr
5994 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5995 {
5996 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5997 }
5998
5999 template < typename CharT >
6000 unsigned long constexpr
6001 strlen_c(const CharT *const s) noexcept
6002 {
6003 return strlen_c_r(s, 0UL);
6004 }
6005
6006 static_assert(strlen_c("") == 0UL, "");
6007 static_assert(strlen_c("1") == 1UL, "");
6008 static_assert(strlen_c("example") == 7UL, "");
6009 static_assert(strlen_c("another\0example") == 7UL, "");
6010
6011 }
6012
6013 namespace test_rvalue_references
6014 {
6015
6016 template < int N >
6017 struct answer
6018 {
6019 static constexpr int value = N;
6020 };
6021
6022 answer<1> f(int&) { return answer<1>(); }
6023 answer<2> f(const int&) { return answer<2>(); }
6024 answer<3> f(int&&) { return answer<3>(); }
6025
6026 void
6027 test()
6028 {
6029 int i = 0;
6030 const int c = 0;
6031 static_assert(decltype(f(i))::value == 1, "");
6032 static_assert(decltype(f(c))::value == 2, "");
6033 static_assert(decltype(f(0))::value == 3, "");
6034 }
6035
6036 }
6037
6038 namespace test_uniform_initialization
6039 {
6040
6041 struct test
6042 {
6043 static const int zero {};
6044 static const int one {1};
6045 };
6046
6047 static_assert(test::zero == 0, "");
6048 static_assert(test::one == 1, "");
6049
6050 }
6051
6052 namespace test_lambdas
6053 {
6054
6055 void
6056 test1()
6057 {
6058 auto lambda1 = [](){};
6059 auto lambda2 = lambda1;
6060 lambda1();
6061 lambda2();
6062 }
6063
6064 int
6065 test2()
6066 {
6067 auto a = [](int i, int j){ return i + j; }(1, 2);
6068 auto b = []() -> int { return '0'; }();
6069 auto c = [=](){ return a + b; }();
6070 auto d = [&](){ return c; }();
6071 auto e = [a, &b](int x) mutable {
6072 const auto identity = [](int y){ return y; };
6073 for (auto i = 0; i < a; ++i)
6074 a += b--;
6075 return x + identity(a + b);
6076 }(0);
6077 return a + b + c + d + e;
6078 }
6079
6080 int
6081 test3()
6082 {
6083 const auto nullary = [](){ return 0; };
6084 const auto unary = [](int x){ return x; };
6085 using nullary_t = decltype(nullary);
6086 using unary_t = decltype(unary);
6087 const auto higher1st = [](nullary_t f){ return f(); };
6088 const auto higher2nd = [unary](nullary_t f1){
6089 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6090 };
6091 return higher1st(nullary) + higher2nd(nullary)(unary);
6092 }
6093
6094 }
6095
6096 namespace test_variadic_templates
6097 {
6098
6099 template <int...>
6100 struct sum;
6101
6102 template <int N0, int... N1toN>
6103 struct sum<N0, N1toN...>
6104 {
6105 static constexpr auto value = N0 + sum<N1toN...>::value;
6106 };
6107
6108 template <>
6109 struct sum<>
6110 {
6111 static constexpr auto value = 0;
6112 };
6113
6114 static_assert(sum<>::value == 0, "");
6115 static_assert(sum<1>::value == 1, "");
6116 static_assert(sum<23>::value == 23, "");
6117 static_assert(sum<1, 2>::value == 3, "");
6118 static_assert(sum<5, 5, 11>::value == 21, "");
6119 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6120
6121 }
6122
6123 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6124 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6125 // because of this.
6126 namespace test_template_alias_sfinae
6127 {
6128
6129 struct foo {};
6130
6131 template<typename T>
6132 using member = typename T::member_type;
6133
6134 template<typename T>
6135 void func(...) {}
6136
6137 template<typename T>
6138 void func(member<T>*) {}
6139
6140 void test();
6141
6142 void test() { func<foo>(0); }
6143
6144 }
6145
6146 } // namespace cxx11
6147
6148 #endif // __cplusplus >= 201103L
6149
6150
6151
6152
6153 // If the compiler admits that it is not ready for C++14, why torture it?
6154 // Hopefully, this will speed up the test.
6155
6156 #ifndef __cplusplus
6157
6158 #error "This is not a C++ compiler"
6159
6160 #elif __cplusplus < 201402L && !defined _MSC_VER
6161
6162 #error "This is not a C++14 compiler"
6163
6164 #else
6165
6166 namespace cxx14
6167 {
6168
6169 namespace test_polymorphic_lambdas
6170 {
6171
6172 int
6173 test()
6174 {
6175 const auto lambda = [](auto&&... args){
6176 const auto istiny = [](auto x){
6177 return (sizeof(x) == 1UL) ? 1 : 0;
6178 };
6179 const int aretiny[] = { istiny(args)... };
6180 return aretiny[0];
6181 };
6182 return lambda(1, 1L, 1.0f, '1');
6183 }
6184
6185 }
6186
6187 namespace test_binary_literals
6188 {
6189
6190 constexpr auto ivii = 0b0000000000101010;
6191 static_assert(ivii == 42, "wrong value");
6192
6193 }
6194
6195 namespace test_generalized_constexpr
6196 {
6197
6198 template < typename CharT >
6199 constexpr unsigned long
6200 strlen_c(const CharT *const s) noexcept
6201 {
6202 auto length = 0UL;
6203 for (auto p = s; *p; ++p)
6204 ++length;
6205 return length;
6206 }
6207
6208 static_assert(strlen_c("") == 0UL, "");
6209 static_assert(strlen_c("x") == 1UL, "");
6210 static_assert(strlen_c("test") == 4UL, "");
6211 static_assert(strlen_c("another\0test") == 7UL, "");
6212
6213 }
6214
6215 namespace test_lambda_init_capture
6216 {
6217
6218 int
6219 test()
6220 {
6221 auto x = 0;
6222 const auto lambda1 = [a = x](int b){ return a + b; };
6223 const auto lambda2 = [a = lambda1(x)](){ return a; };
6224 return lambda2();
6225 }
6226
6227 }
6228
6229 namespace test_digit_separators
6230 {
6231
6232 constexpr auto ten_million = 100'000'000;
6233 static_assert(ten_million == 100000000, "");
6234
6235 }
6236
6237 namespace test_return_type_deduction
6238 {
6239
6240 auto f(int& x) { return x; }
6241 decltype(auto) g(int& x) { return x; }
6242
6243 template < typename T1, typename T2 >
6244 struct is_same
6245 {
6246 static constexpr auto value = false;
6247 };
6248
6249 template < typename T >
6250 struct is_same<T, T>
6251 {
6252 static constexpr auto value = true;
6253 };
6254
6255 int
6256 test()
6257 {
6258 auto x = 0;
6259 static_assert(is_same<int, decltype(f(x))>::value, "");
6260 static_assert(is_same<int&, decltype(g(x))>::value, "");
6261 return x;
6262 }
6263
6264 }
6265
6266 } // namespace cxx14
6267
6268 #endif // __cplusplus >= 201402L
6269
6270
6271
6272
6273 // If the compiler admits that it is not ready for C++17, why torture it?
6274 // Hopefully, this will speed up the test.
6275
6276 #ifndef __cplusplus
6277
6278 #error "This is not a C++ compiler"
6279
6280 #elif __cplusplus < 201703L && !defined _MSC_VER
6281
6282 #error "This is not a C++17 compiler"
6283
6284 #else
6285
6286 #include <initializer_list>
6287 #include <utility>
6288 #include <type_traits>
6289
6290 namespace cxx17
6291 {
6292
6293 namespace test_constexpr_lambdas
6294 {
6295
6296 constexpr int foo = [](){return 42;}();
6297
6298 }
6299
6300 namespace test::nested_namespace::definitions
6301 {
6302
6303 }
6304
6305 namespace test_fold_expression
6306 {
6307
6308 template<typename... Args>
6309 int multiply(Args... args)
6310 {
6311 return (args * ... * 1);
6312 }
6313
6314 template<typename... Args>
6315 bool all(Args... args)
6316 {
6317 return (args && ...);
6318 }
6319
6320 }
6321
6322 namespace test_extended_static_assert
6323 {
6324
6325 static_assert (true);
6326
6327 }
6328
6329 namespace test_auto_brace_init_list
6330 {
6331
6332 auto foo = {5};
6333 auto bar {5};
6334
6335 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
6336 static_assert(std::is_same<int, decltype(bar)>::value);
6337 }
6338
6339 namespace test_typename_in_template_template_parameter
6340 {
6341
6342 template<template<typename> typename X> struct D;
6343
6344 }
6345
6346 namespace test_fallthrough_nodiscard_maybe_unused_attributes
6347 {
6348
6349 int f1()
6350 {
6351 return 42;
6352 }
6353
6354 [[nodiscard]] int f2()
6355 {
6356 [[maybe_unused]] auto unused = f1();
6357
6358 switch (f1())
6359 {
6360 case 17:
6361 f1();
6362 [[fallthrough]];
6363 case 42:
6364 f1();
6365 }
6366 return f1();
6367 }
6368
6369 }
6370
6371 namespace test_extended_aggregate_initialization
6372 {
6373
6374 struct base1
6375 {
6376 int b1, b2 = 42;
6377 };
6378
6379 struct base2
6380 {
6381 base2() {
6382 b3 = 42;
6383 }
6384 int b3;
6385 };
6386
6387 struct derived : base1, base2
6388 {
6389 int d;
6390 };
6391
6392 derived d1 {{1, 2}, {}, 4}; // full initialization
6393 derived d2 {{}, {}, 4}; // value-initialized bases
6394
6395 }
6396
6397 namespace test_general_range_based_for_loop
6398 {
6399
6400 struct iter
6401 {
6402 int i;
6403
6404 int& operator* ()
6405 {
6406 return i;
6407 }
6408
6409 const int& operator* () const
6410 {
6411 return i;
6412 }
6413
6414 iter& operator++()
6415 {
6416 ++i;
6417 return *this;
6418 }
6419 };
6420
6421 struct sentinel
6422 {
6423 int i;
6424 };
6425
6426 bool operator== (const iter& i, const sentinel& s)
6427 {
6428 return i.i == s.i;
6429 }
6430
6431 bool operator!= (const iter& i, const sentinel& s)
6432 {
6433 return !(i == s);
6434 }
6435
6436 struct range
6437 {
6438 iter begin() const
6439 {
6440 return {0};
6441 }
6442
6443 sentinel end() const
6444 {
6445 return {5};
6446 }
6447 };
6448
6449 void f()
6450 {
6451 range r {};
6452
6453 for (auto i : r)
6454 {
6455 [[maybe_unused]] auto v = i;
6456 }
6457 }
6458
6459 }
6460
6461 namespace test_lambda_capture_asterisk_this_by_value
6462 {
6463
6464 struct t
6465 {
6466 int i;
6467 int foo()
6468 {
6469 return [*this]()
6470 {
6471 return i;
6472 }();
6473 }
6474 };
6475
6476 }
6477
6478 namespace test_enum_class_construction
6479 {
6480
6481 enum class byte : unsigned char
6482 {};
6483
6484 byte foo {42};
6485
6486 }
6487
6488 namespace test_constexpr_if
6489 {
6490
6491 template <bool cond>
6492 int f ()
6493 {
6494 if constexpr(cond)
6495 {
6496 return 13;
6497 }
6498 else
6499 {
6500 return 42;
6501 }
6502 }
6503
6504 }
6505
6506 namespace test_selection_statement_with_initializer
6507 {
6508
6509 int f()
6510 {
6511 return 13;
6512 }
6513
6514 int f2()
6515 {
6516 if (auto i = f(); i > 0)
6517 {
6518 return 3;
6519 }
6520
6521 switch (auto i = f(); i + 4)
6522 {
6523 case 17:
6524 return 2;
6525
6526 default:
6527 return 1;
6528 }
6529 }
6530
6531 }
6532
6533 namespace test_template_argument_deduction_for_class_templates
6534 {
6535
6536 template <typename T1, typename T2>
6537 struct pair
6538 {
6539 pair (T1 p1, T2 p2)
6540 : m1 {p1},
6541 m2 {p2}
6542 {}
6543
6544 T1 m1;
6545 T2 m2;
6546 };
6547
6548 void f()
6549 {
6550 [[maybe_unused]] auto p = pair{13, 42u};
6551 }
6552
6553 }
6554
6555 namespace test_non_type_auto_template_parameters
6556 {
6557
6558 template <auto n>
6559 struct B
6560 {};
6561
6562 B<5> b1;
6563 B<'a'> b2;
6564
6565 }
6566
6567 namespace test_structured_bindings
6568 {
6569
6570 int arr[2] = { 1, 2 };
6571 std::pair<int, int> pr = { 1, 2 };
6572
6573 auto f1() -> int(&)[2]
6574 {
6575 return arr;
6576 }
6577
6578 auto f2() -> std::pair<int, int>&
6579 {
6580 return pr;
6581 }
6582
6583 struct S
6584 {
6585 int x1 : 2;
6586 volatile double y1;
6587 };
6588
6589 S f3()
6590 {
6591 return {};
6592 }
6593
6594 auto [ x1, y1 ] = f1();
6595 auto& [ xr1, yr1 ] = f1();
6596 auto [ x2, y2 ] = f2();
6597 auto& [ xr2, yr2 ] = f2();
6598 const auto [ x3, y3 ] = f3();
6599
6600 }
6601
6602 namespace test_exception_spec_type_system
6603 {
6604
6605 struct Good {};
6606 struct Bad {};
6607
6608 void g1() noexcept;
6609 void g2();
6610
6611 template<typename T>
6612 Bad
6613 f(T*, T*);
6614
6615 template<typename T1, typename T2>
6616 Good
6617 f(T1*, T2*);
6618
6619 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
6620
6621 }
6622
6623 namespace test_inline_variables
6624 {
6625
6626 template<class T> void f(T)
6627 {}
6628
6629 template<class T> inline T g(T)
6630 {
6631 return T{};
6632 }
6633
6634 template<> inline void f<>(int)
6635 {}
6636
6637 template<> int g<>(int)
6638 {
6639 return 5;
6640 }
6641
6642 }
6643
6644 } // namespace cxx17
6645
6646 #endif // __cplusplus < 201703L && !defined _MSC_VER
6647
6648
6649
6650 _ACEOF
6651 if ac_fn_cxx_try_compile "$LINENO"; then :
6652 eval $cachevar=yes
6653 else
6654 eval $cachevar=no
6655 fi
6656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6657 CXX="$ac_save_CXX"
6658 fi
6659 eval ac_res=\$$cachevar
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6661 $as_echo "$ac_res" >&6; }
6662 if eval test x\$$cachevar = xyes; then
6663 CXX_DIALECT="$switch"
6664 CXX="$CXX $switch"
6665 if test -n "$CXXCPP" ; then
6666 CXXCPP="$CXXCPP $switch"
6667 fi
6668 ac_success=yes
6669 break
6670 fi
6671 done
6672 fi
6673
6674 if test x$ac_success = xno; then
6675 for alternative in ${ax_cxx_compile_alternatives}; do
6676 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
6677 if test x"$switch" = xMSVC; then
6678 switch=-std:c++${alternative}
6679 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
6680 else
6681 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
6682 fi
6683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
6684 $as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
6685 if eval \${$cachevar+:} false; then :
6686 $as_echo_n "(cached) " >&6
6687 else
6688 ac_save_CXX="$CXX"
6689 CXX="$CXX $switch"
6690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6691 /* end confdefs.h. */
6692
6693
6694 // If the compiler admits that it is not ready for C++11, why torture it?
6695 // Hopefully, this will speed up the test.
6696
6697 #ifndef __cplusplus
6698
6699 #error "This is not a C++ compiler"
6700
6701 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
6702 // only set it correctly if /Zc:__cplusplus is specified as well as a
6703 // /std:c++NN switch:
6704 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
6705 #elif __cplusplus < 201103L && !defined _MSC_VER
6706
6707 #error "This is not a C++11 compiler"
6708
6709 #else
6710
6711 namespace cxx11
6712 {
6713
6714 namespace test_static_assert
6715 {
6716
6717 template <typename T>
6718 struct check
6719 {
6720 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6721 };
6722
6723 }
6724
6725 namespace test_final_override
6726 {
6727
6728 struct Base
6729 {
6730 virtual ~Base() {}
6731 virtual void f() {}
6732 };
6733
6734 struct Derived : public Base
6735 {
6736 virtual ~Derived() override {}
6737 virtual void f() override {}
6738 };
6739
6740 }
6741
6742 namespace test_double_right_angle_brackets
6743 {
6744
6745 template < typename T >
6746 struct check {};
6747
6748 typedef check<void> single_type;
6749 typedef check<check<void>> double_type;
6750 typedef check<check<check<void>>> triple_type;
6751 typedef check<check<check<check<void>>>> quadruple_type;
6752
6753 }
6754
6755 namespace test_decltype
6756 {
6757
6758 int
6759 f()
6760 {
6761 int a = 1;
6762 decltype(a) b = 2;
6763 return a + b;
6764 }
6765
6766 }
6767
6768 namespace test_type_deduction
6769 {
6770
6771 template < typename T1, typename T2 >
6772 struct is_same
6773 {
6774 static const bool value = false;
6775 };
6776
6777 template < typename T >
6778 struct is_same<T, T>
6779 {
6780 static const bool value = true;
6781 };
6782
6783 template < typename T1, typename T2 >
6784 auto
6785 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6786 {
6787 return a1 + a2;
6788 }
6789
6790 int
6791 test(const int c, volatile int v)
6792 {
6793 static_assert(is_same<int, decltype(0)>::value == true, "");
6794 static_assert(is_same<int, decltype(c)>::value == false, "");
6795 static_assert(is_same<int, decltype(v)>::value == false, "");
6796 auto ac = c;
6797 auto av = v;
6798 auto sumi = ac + av + 'x';
6799 auto sumf = ac + av + 1.0;
6800 static_assert(is_same<int, decltype(ac)>::value == true, "");
6801 static_assert(is_same<int, decltype(av)>::value == true, "");
6802 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6803 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6804 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6805 return (sumf > 0.0) ? sumi : add(c, v);
6806 }
6807
6808 }
6809
6810 namespace test_noexcept
6811 {
6812
6813 int f() { return 0; }
6814 int g() noexcept { return 0; }
6815
6816 static_assert(noexcept(f()) == false, "");
6817 static_assert(noexcept(g()) == true, "");
6818
6819 }
6820
6821 namespace test_constexpr
6822 {
6823
6824 template < typename CharT >
6825 unsigned long constexpr
6826 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6827 {
6828 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6829 }
6830
6831 template < typename CharT >
6832 unsigned long constexpr
6833 strlen_c(const CharT *const s) noexcept
6834 {
6835 return strlen_c_r(s, 0UL);
6836 }
6837
6838 static_assert(strlen_c("") == 0UL, "");
6839 static_assert(strlen_c("1") == 1UL, "");
6840 static_assert(strlen_c("example") == 7UL, "");
6841 static_assert(strlen_c("another\0example") == 7UL, "");
6842
6843 }
6844
6845 namespace test_rvalue_references
6846 {
6847
6848 template < int N >
6849 struct answer
6850 {
6851 static constexpr int value = N;
6852 };
6853
6854 answer<1> f(int&) { return answer<1>(); }
6855 answer<2> f(const int&) { return answer<2>(); }
6856 answer<3> f(int&&) { return answer<3>(); }
6857
6858 void
6859 test()
6860 {
6861 int i = 0;
6862 const int c = 0;
6863 static_assert(decltype(f(i))::value == 1, "");
6864 static_assert(decltype(f(c))::value == 2, "");
6865 static_assert(decltype(f(0))::value == 3, "");
6866 }
6867
6868 }
6869
6870 namespace test_uniform_initialization
6871 {
6872
6873 struct test
6874 {
6875 static const int zero {};
6876 static const int one {1};
6877 };
6878
6879 static_assert(test::zero == 0, "");
6880 static_assert(test::one == 1, "");
6881
6882 }
6883
6884 namespace test_lambdas
6885 {
6886
6887 void
6888 test1()
6889 {
6890 auto lambda1 = [](){};
6891 auto lambda2 = lambda1;
6892 lambda1();
6893 lambda2();
6894 }
6895
6896 int
6897 test2()
6898 {
6899 auto a = [](int i, int j){ return i + j; }(1, 2);
6900 auto b = []() -> int { return '0'; }();
6901 auto c = [=](){ return a + b; }();
6902 auto d = [&](){ return c; }();
6903 auto e = [a, &b](int x) mutable {
6904 const auto identity = [](int y){ return y; };
6905 for (auto i = 0; i < a; ++i)
6906 a += b--;
6907 return x + identity(a + b);
6908 }(0);
6909 return a + b + c + d + e;
6910 }
6911
6912 int
6913 test3()
6914 {
6915 const auto nullary = [](){ return 0; };
6916 const auto unary = [](int x){ return x; };
6917 using nullary_t = decltype(nullary);
6918 using unary_t = decltype(unary);
6919 const auto higher1st = [](nullary_t f){ return f(); };
6920 const auto higher2nd = [unary](nullary_t f1){
6921 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6922 };
6923 return higher1st(nullary) + higher2nd(nullary)(unary);
6924 }
6925
6926 }
6927
6928 namespace test_variadic_templates
6929 {
6930
6931 template <int...>
6932 struct sum;
6933
6934 template <int N0, int... N1toN>
6935 struct sum<N0, N1toN...>
6936 {
6937 static constexpr auto value = N0 + sum<N1toN...>::value;
6938 };
6939
6940 template <>
6941 struct sum<>
6942 {
6943 static constexpr auto value = 0;
6944 };
6945
6946 static_assert(sum<>::value == 0, "");
6947 static_assert(sum<1>::value == 1, "");
6948 static_assert(sum<23>::value == 23, "");
6949 static_assert(sum<1, 2>::value == 3, "");
6950 static_assert(sum<5, 5, 11>::value == 21, "");
6951 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6952
6953 }
6954
6955 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6956 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6957 // because of this.
6958 namespace test_template_alias_sfinae
6959 {
6960
6961 struct foo {};
6962
6963 template<typename T>
6964 using member = typename T::member_type;
6965
6966 template<typename T>
6967 void func(...) {}
6968
6969 template<typename T>
6970 void func(member<T>*) {}
6971
6972 void test();
6973
6974 void test() { func<foo>(0); }
6975
6976 }
6977
6978 } // namespace cxx11
6979
6980 #endif // __cplusplus >= 201103L
6981
6982
6983
6984
6985 // If the compiler admits that it is not ready for C++14, why torture it?
6986 // Hopefully, this will speed up the test.
6987
6988 #ifndef __cplusplus
6989
6990 #error "This is not a C++ compiler"
6991
6992 #elif __cplusplus < 201402L && !defined _MSC_VER
6993
6994 #error "This is not a C++14 compiler"
6995
6996 #else
6997
6998 namespace cxx14
6999 {
7000
7001 namespace test_polymorphic_lambdas
7002 {
7003
7004 int
7005 test()
7006 {
7007 const auto lambda = [](auto&&... args){
7008 const auto istiny = [](auto x){
7009 return (sizeof(x) == 1UL) ? 1 : 0;
7010 };
7011 const int aretiny[] = { istiny(args)... };
7012 return aretiny[0];
7013 };
7014 return lambda(1, 1L, 1.0f, '1');
7015 }
7016
7017 }
7018
7019 namespace test_binary_literals
7020 {
7021
7022 constexpr auto ivii = 0b0000000000101010;
7023 static_assert(ivii == 42, "wrong value");
7024
7025 }
7026
7027 namespace test_generalized_constexpr
7028 {
7029
7030 template < typename CharT >
7031 constexpr unsigned long
7032 strlen_c(const CharT *const s) noexcept
7033 {
7034 auto length = 0UL;
7035 for (auto p = s; *p; ++p)
7036 ++length;
7037 return length;
7038 }
7039
7040 static_assert(strlen_c("") == 0UL, "");
7041 static_assert(strlen_c("x") == 1UL, "");
7042 static_assert(strlen_c("test") == 4UL, "");
7043 static_assert(strlen_c("another\0test") == 7UL, "");
7044
7045 }
7046
7047 namespace test_lambda_init_capture
7048 {
7049
7050 int
7051 test()
7052 {
7053 auto x = 0;
7054 const auto lambda1 = [a = x](int b){ return a + b; };
7055 const auto lambda2 = [a = lambda1(x)](){ return a; };
7056 return lambda2();
7057 }
7058
7059 }
7060
7061 namespace test_digit_separators
7062 {
7063
7064 constexpr auto ten_million = 100'000'000;
7065 static_assert(ten_million == 100000000, "");
7066
7067 }
7068
7069 namespace test_return_type_deduction
7070 {
7071
7072 auto f(int& x) { return x; }
7073 decltype(auto) g(int& x) { return x; }
7074
7075 template < typename T1, typename T2 >
7076 struct is_same
7077 {
7078 static constexpr auto value = false;
7079 };
7080
7081 template < typename T >
7082 struct is_same<T, T>
7083 {
7084 static constexpr auto value = true;
7085 };
7086
7087 int
7088 test()
7089 {
7090 auto x = 0;
7091 static_assert(is_same<int, decltype(f(x))>::value, "");
7092 static_assert(is_same<int&, decltype(g(x))>::value, "");
7093 return x;
7094 }
7095
7096 }
7097
7098 } // namespace cxx14
7099
7100 #endif // __cplusplus >= 201402L
7101
7102
7103
7104
7105 // If the compiler admits that it is not ready for C++17, why torture it?
7106 // Hopefully, this will speed up the test.
7107
7108 #ifndef __cplusplus
7109
7110 #error "This is not a C++ compiler"
7111
7112 #elif __cplusplus < 201703L && !defined _MSC_VER
7113
7114 #error "This is not a C++17 compiler"
7115
7116 #else
7117
7118 #include <initializer_list>
7119 #include <utility>
7120 #include <type_traits>
7121
7122 namespace cxx17
7123 {
7124
7125 namespace test_constexpr_lambdas
7126 {
7127
7128 constexpr int foo = [](){return 42;}();
7129
7130 }
7131
7132 namespace test::nested_namespace::definitions
7133 {
7134
7135 }
7136
7137 namespace test_fold_expression
7138 {
7139
7140 template<typename... Args>
7141 int multiply(Args... args)
7142 {
7143 return (args * ... * 1);
7144 }
7145
7146 template<typename... Args>
7147 bool all(Args... args)
7148 {
7149 return (args && ...);
7150 }
7151
7152 }
7153
7154 namespace test_extended_static_assert
7155 {
7156
7157 static_assert (true);
7158
7159 }
7160
7161 namespace test_auto_brace_init_list
7162 {
7163
7164 auto foo = {5};
7165 auto bar {5};
7166
7167 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
7168 static_assert(std::is_same<int, decltype(bar)>::value);
7169 }
7170
7171 namespace test_typename_in_template_template_parameter
7172 {
7173
7174 template<template<typename> typename X> struct D;
7175
7176 }
7177
7178 namespace test_fallthrough_nodiscard_maybe_unused_attributes
7179 {
7180
7181 int f1()
7182 {
7183 return 42;
7184 }
7185
7186 [[nodiscard]] int f2()
7187 {
7188 [[maybe_unused]] auto unused = f1();
7189
7190 switch (f1())
7191 {
7192 case 17:
7193 f1();
7194 [[fallthrough]];
7195 case 42:
7196 f1();
7197 }
7198 return f1();
7199 }
7200
7201 }
7202
7203 namespace test_extended_aggregate_initialization
7204 {
7205
7206 struct base1
7207 {
7208 int b1, b2 = 42;
7209 };
7210
7211 struct base2
7212 {
7213 base2() {
7214 b3 = 42;
7215 }
7216 int b3;
7217 };
7218
7219 struct derived : base1, base2
7220 {
7221 int d;
7222 };
7223
7224 derived d1 {{1, 2}, {}, 4}; // full initialization
7225 derived d2 {{}, {}, 4}; // value-initialized bases
7226
7227 }
7228
7229 namespace test_general_range_based_for_loop
7230 {
7231
7232 struct iter
7233 {
7234 int i;
7235
7236 int& operator* ()
7237 {
7238 return i;
7239 }
7240
7241 const int& operator* () const
7242 {
7243 return i;
7244 }
7245
7246 iter& operator++()
7247 {
7248 ++i;
7249 return *this;
7250 }
7251 };
7252
7253 struct sentinel
7254 {
7255 int i;
7256 };
7257
7258 bool operator== (const iter& i, const sentinel& s)
7259 {
7260 return i.i == s.i;
7261 }
7262
7263 bool operator!= (const iter& i, const sentinel& s)
7264 {
7265 return !(i == s);
7266 }
7267
7268 struct range
7269 {
7270 iter begin() const
7271 {
7272 return {0};
7273 }
7274
7275 sentinel end() const
7276 {
7277 return {5};
7278 }
7279 };
7280
7281 void f()
7282 {
7283 range r {};
7284
7285 for (auto i : r)
7286 {
7287 [[maybe_unused]] auto v = i;
7288 }
7289 }
7290
7291 }
7292
7293 namespace test_lambda_capture_asterisk_this_by_value
7294 {
7295
7296 struct t
7297 {
7298 int i;
7299 int foo()
7300 {
7301 return [*this]()
7302 {
7303 return i;
7304 }();
7305 }
7306 };
7307
7308 }
7309
7310 namespace test_enum_class_construction
7311 {
7312
7313 enum class byte : unsigned char
7314 {};
7315
7316 byte foo {42};
7317
7318 }
7319
7320 namespace test_constexpr_if
7321 {
7322
7323 template <bool cond>
7324 int f ()
7325 {
7326 if constexpr(cond)
7327 {
7328 return 13;
7329 }
7330 else
7331 {
7332 return 42;
7333 }
7334 }
7335
7336 }
7337
7338 namespace test_selection_statement_with_initializer
7339 {
7340
7341 int f()
7342 {
7343 return 13;
7344 }
7345
7346 int f2()
7347 {
7348 if (auto i = f(); i > 0)
7349 {
7350 return 3;
7351 }
7352
7353 switch (auto i = f(); i + 4)
7354 {
7355 case 17:
7356 return 2;
7357
7358 default:
7359 return 1;
7360 }
7361 }
7362
7363 }
7364
7365 namespace test_template_argument_deduction_for_class_templates
7366 {
7367
7368 template <typename T1, typename T2>
7369 struct pair
7370 {
7371 pair (T1 p1, T2 p2)
7372 : m1 {p1},
7373 m2 {p2}
7374 {}
7375
7376 T1 m1;
7377 T2 m2;
7378 };
7379
7380 void f()
7381 {
7382 [[maybe_unused]] auto p = pair{13, 42u};
7383 }
7384
7385 }
7386
7387 namespace test_non_type_auto_template_parameters
7388 {
7389
7390 template <auto n>
7391 struct B
7392 {};
7393
7394 B<5> b1;
7395 B<'a'> b2;
7396
7397 }
7398
7399 namespace test_structured_bindings
7400 {
7401
7402 int arr[2] = { 1, 2 };
7403 std::pair<int, int> pr = { 1, 2 };
7404
7405 auto f1() -> int(&)[2]
7406 {
7407 return arr;
7408 }
7409
7410 auto f2() -> std::pair<int, int>&
7411 {
7412 return pr;
7413 }
7414
7415 struct S
7416 {
7417 int x1 : 2;
7418 volatile double y1;
7419 };
7420
7421 S f3()
7422 {
7423 return {};
7424 }
7425
7426 auto [ x1, y1 ] = f1();
7427 auto& [ xr1, yr1 ] = f1();
7428 auto [ x2, y2 ] = f2();
7429 auto& [ xr2, yr2 ] = f2();
7430 const auto [ x3, y3 ] = f3();
7431
7432 }
7433
7434 namespace test_exception_spec_type_system
7435 {
7436
7437 struct Good {};
7438 struct Bad {};
7439
7440 void g1() noexcept;
7441 void g2();
7442
7443 template<typename T>
7444 Bad
7445 f(T*, T*);
7446
7447 template<typename T1, typename T2>
7448 Good
7449 f(T1*, T2*);
7450
7451 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
7452
7453 }
7454
7455 namespace test_inline_variables
7456 {
7457
7458 template<class T> void f(T)
7459 {}
7460
7461 template<class T> inline T g(T)
7462 {
7463 return T{};
7464 }
7465
7466 template<> inline void f<>(int)
7467 {}
7468
7469 template<> int g<>(int)
7470 {
7471 return 5;
7472 }
7473
7474 }
7475
7476 } // namespace cxx17
7477
7478 #endif // __cplusplus < 201703L && !defined _MSC_VER
7479
7480
7481
7482 _ACEOF
7483 if ac_fn_cxx_try_compile "$LINENO"; then :
7484 eval $cachevar=yes
7485 else
7486 eval $cachevar=no
7487 fi
7488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7489 CXX="$ac_save_CXX"
7490 fi
7491 eval ac_res=\$$cachevar
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7493 $as_echo "$ac_res" >&6; }
7494 if eval test x\$$cachevar = xyes; then
7495 CXX_DIALECT="$switch"
7496 CXX="$CXX $switch"
7497 if test -n "$CXXCPP" ; then
7498 CXXCPP="$CXXCPP $switch"
7499 fi
7500 ac_success=yes
7501 break
7502 fi
7503 done
7504 if test x$ac_success = xyes; then
7505 break
7506 fi
7507 done
7508 fi
7509 ac_ext=c
7510 ac_cpp='$CPP $CPPFLAGS'
7511 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7512 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7513 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7514
7515 if test x$ax_cxx_compile_cxx17_required = xtrue; then
7516 if test x$ac_success = xno; then
7517 as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
7518 fi
7519 fi
7520 if test x$ac_success = xno; then
7521 HAVE_CXX17=0
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
7523 $as_echo "$as_me: No compiler with C++17 support was found" >&6;}
7524 else
7525 HAVE_CXX17=1
7526
7527 $as_echo "#define HAVE_CXX17 1" >>confdefs.h
7528
7529 fi
7530
7531
7532
7533
7534 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7535 if test "x$ac_cv_type_size_t" = xyes; then :
7536
7537 else
7538
7539 cat >>confdefs.h <<_ACEOF
7540 #define size_t unsigned int
7541 _ACEOF
7542
7543 fi
7544
7545
7546
7547
7548 for ac_header in $ac_header_list
7549 do :
7550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7551 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7552 "
7553 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7554 cat >>confdefs.h <<_ACEOF
7555 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7556 _ACEOF
7557
7558 fi
7559
7560 done
7561
7562
7563
7564
7565
7566
7567
7568 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7569 if test "x$ac_cv_type_pid_t" = xyes; then :
7570
7571 else
7572
7573 cat >>confdefs.h <<_ACEOF
7574 #define pid_t int
7575 _ACEOF
7576
7577 fi
7578
7579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7580 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7581 if ${ac_cv_path_SED+:} false; then :
7582 $as_echo_n "(cached) " >&6
7583 else
7584 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7585 for ac_i in 1 2 3 4 5 6 7; do
7586 ac_script="$ac_script$as_nl$ac_script"
7587 done
7588 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7589 { ac_script=; unset ac_script;}
7590 if test -z "$SED"; then
7591 ac_path_SED_found=false
7592 # Loop through the user's path and test for each of PROGNAME-LIST
7593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7594 for as_dir in $PATH
7595 do
7596 IFS=$as_save_IFS
7597 test -z "$as_dir" && as_dir=.
7598 for ac_prog in sed gsed; do
7599 for ac_exec_ext in '' $ac_executable_extensions; do
7600 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7601 as_fn_executable_p "$ac_path_SED" || continue
7602 # Check for GNU ac_path_SED and select it if it is found.
7603 # Check for GNU $ac_path_SED
7604 case `"$ac_path_SED" --version 2>&1` in
7605 *GNU*)
7606 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7607 *)
7608 ac_count=0
7609 $as_echo_n 0123456789 >"conftest.in"
7610 while :
7611 do
7612 cat "conftest.in" "conftest.in" >"conftest.tmp"
7613 mv "conftest.tmp" "conftest.in"
7614 cp "conftest.in" "conftest.nl"
7615 $as_echo '' >> "conftest.nl"
7616 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7617 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7618 as_fn_arith $ac_count + 1 && ac_count=$as_val
7619 if test $ac_count -gt ${ac_path_SED_max-0}; then
7620 # Best one so far, save it but keep looking for a better one
7621 ac_cv_path_SED="$ac_path_SED"
7622 ac_path_SED_max=$ac_count
7623 fi
7624 # 10*(2^10) chars as input seems more than enough
7625 test $ac_count -gt 10 && break
7626 done
7627 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7628 esac
7629
7630 $ac_path_SED_found && break 3
7631 done
7632 done
7633 done
7634 IFS=$as_save_IFS
7635 if test -z "$ac_cv_path_SED"; then
7636 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7637 fi
7638 else
7639 ac_cv_path_SED=$SED
7640 fi
7641
7642 fi
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7644 $as_echo "$ac_cv_path_SED" >&6; }
7645 SED="$ac_cv_path_SED"
7646 rm -f conftest.sed
7647
7648
7649 if test "X$prefix" = "XNONE"; then
7650 acl_final_prefix="$ac_default_prefix"
7651 else
7652 acl_final_prefix="$prefix"
7653 fi
7654 if test "X$exec_prefix" = "XNONE"; then
7655 acl_final_exec_prefix='${prefix}'
7656 else
7657 acl_final_exec_prefix="$exec_prefix"
7658 fi
7659 acl_save_prefix="$prefix"
7660 prefix="$acl_final_prefix"
7661 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7662 prefix="$acl_save_prefix"
7663
7664
7665 # Check whether --with-gnu-ld was given.
7666 if test "${with_gnu_ld+set}" = set; then :
7667 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7668 else
7669 with_gnu_ld=no
7670 fi
7671
7672 # Prepare PATH_SEPARATOR.
7673 # The user is always right.
7674 if test "${PATH_SEPARATOR+set}" != set; then
7675 echo "#! /bin/sh" >conf$$.sh
7676 echo "exit 0" >>conf$$.sh
7677 chmod +x conf$$.sh
7678 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7679 PATH_SEPARATOR=';'
7680 else
7681 PATH_SEPARATOR=:
7682 fi
7683 rm -f conf$$.sh
7684 fi
7685 ac_prog=ld
7686 if test "$GCC" = yes; then
7687 # Check if gcc -print-prog-name=ld gives a path.
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7689 $as_echo_n "checking for ld used by GCC... " >&6; }
7690 case $host in
7691 *-*-mingw*)
7692 # gcc leaves a trailing carriage return which upsets mingw
7693 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7694 *)
7695 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7696 esac
7697 case $ac_prog in
7698 # Accept absolute paths.
7699 [\\/]* | [A-Za-z]:[\\/]*)
7700 re_direlt='/[^/][^/]*/\.\./'
7701 # Canonicalize the path of ld
7702 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7703 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7704 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7705 done
7706 test -z "$LD" && LD="$ac_prog"
7707 ;;
7708 "")
7709 # If it fails, then pretend we aren't using GCC.
7710 ac_prog=ld
7711 ;;
7712 *)
7713 # If it is relative, then search for the first ld in PATH.
7714 with_gnu_ld=unknown
7715 ;;
7716 esac
7717 elif test "$with_gnu_ld" = yes; then
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7719 $as_echo_n "checking for GNU ld... " >&6; }
7720 else
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7722 $as_echo_n "checking for non-GNU ld... " >&6; }
7723 fi
7724 if ${acl_cv_path_LD+:} false; then :
7725 $as_echo_n "(cached) " >&6
7726 else
7727 if test -z "$LD"; then
7728 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7729 for ac_dir in $PATH; do
7730 test -z "$ac_dir" && ac_dir=.
7731 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7732 acl_cv_path_LD="$ac_dir/$ac_prog"
7733 # Check to see if the program is GNU ld. I'd rather use --version,
7734 # but apparently some GNU ld's only accept -v.
7735 # Break only if it was the GNU/non-GNU ld that we prefer.
7736 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
7737 test "$with_gnu_ld" != no && break
7738 else
7739 test "$with_gnu_ld" != yes && break
7740 fi
7741 fi
7742 done
7743 IFS="$ac_save_ifs"
7744 else
7745 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7746 fi
7747 fi
7748
7749 LD="$acl_cv_path_LD"
7750 if test -n "$LD"; then
7751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7752 $as_echo "$LD" >&6; }
7753 else
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7755 $as_echo "no" >&6; }
7756 fi
7757 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7759 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7760 if ${acl_cv_prog_gnu_ld+:} false; then :
7761 $as_echo_n "(cached) " >&6
7762 else
7763 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7764 if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
7765 acl_cv_prog_gnu_ld=yes
7766 else
7767 acl_cv_prog_gnu_ld=no
7768 fi
7769 fi
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7771 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7772 with_gnu_ld=$acl_cv_prog_gnu_ld
7773
7774
7775
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7777 $as_echo_n "checking for shared library run path origin... " >&6; }
7778 if ${acl_cv_rpath+:} false; then :
7779 $as_echo_n "(cached) " >&6
7780 else
7781
7782 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7783 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7784 . ./conftest.sh
7785 rm -f ./conftest.sh
7786 acl_cv_rpath=done
7787
7788 fi
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7790 $as_echo "$acl_cv_rpath" >&6; }
7791 wl="$acl_cv_wl"
7792 libext="$acl_cv_libext"
7793 shlibext="$acl_cv_shlibext"
7794 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7795 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7796 hardcode_direct="$acl_cv_hardcode_direct"
7797 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7798 # Check whether --enable-rpath was given.
7799 if test "${enable_rpath+set}" = set; then :
7800 enableval=$enable_rpath; :
7801 else
7802 enable_rpath=yes
7803 fi
7804
7805
7806
7807 # Set the 'development' global.
7808 . $srcdir/../bfd/development.sh
7809
7810 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7811 # for constant arguments. Useless!
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7813 $as_echo_n "checking for working alloca.h... " >&6; }
7814 if ${ac_cv_working_alloca_h+:} false; then :
7815 $as_echo_n "(cached) " >&6
7816 else
7817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7818 /* end confdefs.h. */
7819 #include <alloca.h>
7820 int
7821 main ()
7822 {
7823 char *p = (char *) alloca (2 * sizeof (int));
7824 if (p) return 0;
7825 ;
7826 return 0;
7827 }
7828 _ACEOF
7829 if ac_fn_c_try_link "$LINENO"; then :
7830 ac_cv_working_alloca_h=yes
7831 else
7832 ac_cv_working_alloca_h=no
7833 fi
7834 rm -f core conftest.err conftest.$ac_objext \
7835 conftest$ac_exeext conftest.$ac_ext
7836 fi
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7838 $as_echo "$ac_cv_working_alloca_h" >&6; }
7839 if test $ac_cv_working_alloca_h = yes; then
7840
7841 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7842
7843 fi
7844
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7846 $as_echo_n "checking for alloca... " >&6; }
7847 if ${ac_cv_func_alloca_works+:} false; then :
7848 $as_echo_n "(cached) " >&6
7849 else
7850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7851 /* end confdefs.h. */
7852 #ifdef __GNUC__
7853 # define alloca __builtin_alloca
7854 #else
7855 # ifdef _MSC_VER
7856 # include <malloc.h>
7857 # define alloca _alloca
7858 # else
7859 # ifdef HAVE_ALLOCA_H
7860 # include <alloca.h>
7861 # else
7862 # ifdef _AIX
7863 #pragma alloca
7864 # else
7865 # ifndef alloca /* predefined by HP cc +Olibcalls */
7866 void *alloca (size_t);
7867 # endif
7868 # endif
7869 # endif
7870 # endif
7871 #endif
7872
7873 int
7874 main ()
7875 {
7876 char *p = (char *) alloca (1);
7877 if (p) return 0;
7878 ;
7879 return 0;
7880 }
7881 _ACEOF
7882 if ac_fn_c_try_link "$LINENO"; then :
7883 ac_cv_func_alloca_works=yes
7884 else
7885 ac_cv_func_alloca_works=no
7886 fi
7887 rm -f core conftest.err conftest.$ac_objext \
7888 conftest$ac_exeext conftest.$ac_ext
7889 fi
7890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7891 $as_echo "$ac_cv_func_alloca_works" >&6; }
7892
7893 if test $ac_cv_func_alloca_works = yes; then
7894
7895 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7896
7897 else
7898 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7899 # that cause trouble. Some versions do not even contain alloca or
7900 # contain a buggy version. If you still want to use their alloca,
7901 # use ar to extract alloca.o from them instead of compiling alloca.c.
7902
7903 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7904
7905 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7906
7907
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7909 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7910 if ${ac_cv_os_cray+:} false; then :
7911 $as_echo_n "(cached) " >&6
7912 else
7913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7914 /* end confdefs.h. */
7915 #if defined CRAY && ! defined CRAY2
7916 webecray
7917 #else
7918 wenotbecray
7919 #endif
7920
7921 _ACEOF
7922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7923 $EGREP "webecray" >/dev/null 2>&1; then :
7924 ac_cv_os_cray=yes
7925 else
7926 ac_cv_os_cray=no
7927 fi
7928 rm -f conftest*
7929
7930 fi
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7932 $as_echo "$ac_cv_os_cray" >&6; }
7933 if test $ac_cv_os_cray = yes; then
7934 for ac_func in _getb67 GETB67 getb67; do
7935 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7936 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7937 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7938
7939 cat >>confdefs.h <<_ACEOF
7940 #define CRAY_STACKSEG_END $ac_func
7941 _ACEOF
7942
7943 break
7944 fi
7945
7946 done
7947 fi
7948
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7950 $as_echo_n "checking stack direction for C alloca... " >&6; }
7951 if ${ac_cv_c_stack_direction+:} false; then :
7952 $as_echo_n "(cached) " >&6
7953 else
7954 if test "$cross_compiling" = yes; then :
7955 ac_cv_c_stack_direction=0
7956 else
7957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7958 /* end confdefs.h. */
7959 $ac_includes_default
7960 int
7961 find_stack_direction (int *addr, int depth)
7962 {
7963 int dir, dummy = 0;
7964 if (! addr)
7965 addr = &dummy;
7966 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7967 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7968 return dir + dummy;
7969 }
7970
7971 int
7972 main (int argc, char **argv)
7973 {
7974 return find_stack_direction (0, argc + !argv + 20) < 0;
7975 }
7976 _ACEOF
7977 if ac_fn_c_try_run "$LINENO"; then :
7978 ac_cv_c_stack_direction=1
7979 else
7980 ac_cv_c_stack_direction=-1
7981 fi
7982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7983 conftest.$ac_objext conftest.beam conftest.$ac_ext
7984 fi
7985
7986 fi
7987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7988 $as_echo "$ac_cv_c_stack_direction" >&6; }
7989 cat >>confdefs.h <<_ACEOF
7990 #define STACK_DIRECTION $ac_cv_c_stack_direction
7991 _ACEOF
7992
7993
7994 fi
7995
7996
7997 WIN32APILIBS=
7998 case ${host} in
7999 *mingw32*)
8000
8001 $as_echo "#define USE_WIN32API 1" >>confdefs.h
8002
8003 WIN32APILIBS="-lws2_32"
8004 ;;
8005 esac
8006
8007
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8009 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8010 if ${am_cv_langinfo_codeset+:} false; then :
8011 $as_echo_n "(cached) " >&6
8012 else
8013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8014 /* end confdefs.h. */
8015 #include <langinfo.h>
8016 int
8017 main ()
8018 {
8019 char* cs = nl_langinfo(CODESET);
8020 ;
8021 return 0;
8022 }
8023 _ACEOF
8024 if ac_fn_c_try_link "$LINENO"; then :
8025 am_cv_langinfo_codeset=yes
8026 else
8027 am_cv_langinfo_codeset=no
8028 fi
8029 rm -f core conftest.err conftest.$ac_objext \
8030 conftest$ac_exeext conftest.$ac_ext
8031
8032 fi
8033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8034 $as_echo "$am_cv_langinfo_codeset" >&6; }
8035 if test $am_cv_langinfo_codeset = yes; then
8036
8037 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8038
8039 fi
8040
8041
8042 for ac_header in \
8043 dlfcn.h \
8044 linux/elf.h \
8045 linux/perf_event.h \
8046 locale.h \
8047 memory.h \
8048 poll.h \
8049 proc_service.h \
8050 signal.h \
8051 sys/poll.h \
8052 sys/resource.h \
8053 sys/select.h \
8054 sys/socket.h \
8055 sys/un.h \
8056 sys/wait.h \
8057 termios.h \
8058 thread_db.h \
8059 wait.h \
8060
8061 do :
8062 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8063 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8064 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8065 cat >>confdefs.h <<_ACEOF
8066 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8067 _ACEOF
8068
8069 fi
8070
8071 done
8072
8073
8074
8075 for ac_func in getpagesize
8076 do :
8077 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
8078 if test "x$ac_cv_func_getpagesize" = xyes; then :
8079 cat >>confdefs.h <<_ACEOF
8080 #define HAVE_GETPAGESIZE 1
8081 _ACEOF
8082
8083 fi
8084 done
8085
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
8087 $as_echo_n "checking for working mmap... " >&6; }
8088 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
8089 $as_echo_n "(cached) " >&6
8090 else
8091 if test "$cross_compiling" = yes; then :
8092 ac_cv_func_mmap_fixed_mapped=no
8093 else
8094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8095 /* end confdefs.h. */
8096 $ac_includes_default
8097 /* malloc might have been renamed as rpl_malloc. */
8098 #undef malloc
8099
8100 /* Thanks to Mike Haertel and Jim Avera for this test.
8101 Here is a matrix of mmap possibilities:
8102 mmap private not fixed
8103 mmap private fixed at somewhere currently unmapped
8104 mmap private fixed at somewhere already mapped
8105 mmap shared not fixed
8106 mmap shared fixed at somewhere currently unmapped
8107 mmap shared fixed at somewhere already mapped
8108 For private mappings, we should verify that changes cannot be read()
8109 back from the file, nor mmap's back from the file at a different
8110 address. (There have been systems where private was not correctly
8111 implemented like the infamous i386 svr4.0, and systems where the
8112 VM page cache was not coherent with the file system buffer cache
8113 like early versions of FreeBSD and possibly contemporary NetBSD.)
8114 For shared mappings, we should conversely verify that changes get
8115 propagated back to all the places they're supposed to be.
8116
8117 Grep wants private fixed already mapped.
8118 The main things grep needs to know about mmap are:
8119 * does it exist and is it safe to write into the mmap'd area
8120 * how to use it (BSD variants) */
8121
8122 #include <fcntl.h>
8123 #include <sys/mman.h>
8124
8125 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8126 char *malloc ();
8127 #endif
8128
8129 /* This mess was copied from the GNU getpagesize.h. */
8130 #ifndef HAVE_GETPAGESIZE
8131 # ifdef _SC_PAGESIZE
8132 # define getpagesize() sysconf(_SC_PAGESIZE)
8133 # else /* no _SC_PAGESIZE */
8134 # ifdef HAVE_SYS_PARAM_H
8135 # include <sys/param.h>
8136 # ifdef EXEC_PAGESIZE
8137 # define getpagesize() EXEC_PAGESIZE
8138 # else /* no EXEC_PAGESIZE */
8139 # ifdef NBPG
8140 # define getpagesize() NBPG * CLSIZE
8141 # ifndef CLSIZE
8142 # define CLSIZE 1
8143 # endif /* no CLSIZE */
8144 # else /* no NBPG */
8145 # ifdef NBPC
8146 # define getpagesize() NBPC
8147 # else /* no NBPC */
8148 # ifdef PAGESIZE
8149 # define getpagesize() PAGESIZE
8150 # endif /* PAGESIZE */
8151 # endif /* no NBPC */
8152 # endif /* no NBPG */
8153 # endif /* no EXEC_PAGESIZE */
8154 # else /* no HAVE_SYS_PARAM_H */
8155 # define getpagesize() 8192 /* punt totally */
8156 # endif /* no HAVE_SYS_PARAM_H */
8157 # endif /* no _SC_PAGESIZE */
8158
8159 #endif /* no HAVE_GETPAGESIZE */
8160
8161 int
8162 main ()
8163 {
8164 char *data, *data2, *data3;
8165 const char *cdata2;
8166 int i, pagesize;
8167 int fd, fd2;
8168
8169 pagesize = getpagesize ();
8170
8171 /* First, make a file with some known garbage in it. */
8172 data = (char *) malloc (pagesize);
8173 if (!data)
8174 return 1;
8175 for (i = 0; i < pagesize; ++i)
8176 *(data + i) = rand ();
8177 umask (0);
8178 fd = creat ("conftest.mmap", 0600);
8179 if (fd < 0)
8180 return 2;
8181 if (write (fd, data, pagesize) != pagesize)
8182 return 3;
8183 close (fd);
8184
8185 /* Next, check that the tail of a page is zero-filled. File must have
8186 non-zero length, otherwise we risk SIGBUS for entire page. */
8187 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8188 if (fd2 < 0)
8189 return 4;
8190 cdata2 = "";
8191 if (write (fd2, cdata2, 1) != 1)
8192 return 5;
8193 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
8194 if (data2 == MAP_FAILED)
8195 return 6;
8196 for (i = 0; i < pagesize; ++i)
8197 if (*(data2 + i))
8198 return 7;
8199 close (fd2);
8200 if (munmap (data2, pagesize))
8201 return 8;
8202
8203 /* Next, try to mmap the file at a fixed address which already has
8204 something else allocated at it. If we can, also make sure that
8205 we see the same garbage. */
8206 fd = open ("conftest.mmap", O_RDWR);
8207 if (fd < 0)
8208 return 9;
8209 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8210 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8211 return 10;
8212 for (i = 0; i < pagesize; ++i)
8213 if (*(data + i) != *(data2 + i))
8214 return 11;
8215
8216 /* Finally, make sure that changes to the mapped area do not
8217 percolate back to the file as seen by read(). (This is a bug on
8218 some variants of i386 svr4.0.) */
8219 for (i = 0; i < pagesize; ++i)
8220 *(data2 + i) = *(data2 + i) + 1;
8221 data3 = (char *) malloc (pagesize);
8222 if (!data3)
8223 return 12;
8224 if (read (fd, data3, pagesize) != pagesize)
8225 return 13;
8226 for (i = 0; i < pagesize; ++i)
8227 if (*(data + i) != *(data3 + i))
8228 return 14;
8229 close (fd);
8230 return 0;
8231 }
8232 _ACEOF
8233 if ac_fn_c_try_run "$LINENO"; then :
8234 ac_cv_func_mmap_fixed_mapped=yes
8235 else
8236 ac_cv_func_mmap_fixed_mapped=no
8237 fi
8238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8239 conftest.$ac_objext conftest.beam conftest.$ac_ext
8240 fi
8241
8242 fi
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8244 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
8245 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8246
8247 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
8248
8249 fi
8250 rm -f conftest.mmap conftest.txt
8251
8252 for ac_header in vfork.h
8253 do :
8254 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8255 if test "x$ac_cv_header_vfork_h" = xyes; then :
8256 cat >>confdefs.h <<_ACEOF
8257 #define HAVE_VFORK_H 1
8258 _ACEOF
8259
8260 fi
8261
8262 done
8263
8264 for ac_func in fork vfork
8265 do :
8266 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8267 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8268 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8269 cat >>confdefs.h <<_ACEOF
8270 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8271 _ACEOF
8272
8273 fi
8274 done
8275
8276 if test "x$ac_cv_func_fork" = xyes; then
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8278 $as_echo_n "checking for working fork... " >&6; }
8279 if ${ac_cv_func_fork_works+:} false; then :
8280 $as_echo_n "(cached) " >&6
8281 else
8282 if test "$cross_compiling" = yes; then :
8283 ac_cv_func_fork_works=cross
8284 else
8285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8286 /* end confdefs.h. */
8287 $ac_includes_default
8288 int
8289 main ()
8290 {
8291
8292 /* By Ruediger Kuhlmann. */
8293 return fork () < 0;
8294
8295 ;
8296 return 0;
8297 }
8298 _ACEOF
8299 if ac_fn_c_try_run "$LINENO"; then :
8300 ac_cv_func_fork_works=yes
8301 else
8302 ac_cv_func_fork_works=no
8303 fi
8304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8305 conftest.$ac_objext conftest.beam conftest.$ac_ext
8306 fi
8307
8308 fi
8309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8310 $as_echo "$ac_cv_func_fork_works" >&6; }
8311
8312 else
8313 ac_cv_func_fork_works=$ac_cv_func_fork
8314 fi
8315 if test "x$ac_cv_func_fork_works" = xcross; then
8316 case $host in
8317 *-*-amigaos* | *-*-msdosdjgpp*)
8318 # Override, as these systems have only a dummy fork() stub
8319 ac_cv_func_fork_works=no
8320 ;;
8321 *)
8322 ac_cv_func_fork_works=yes
8323 ;;
8324 esac
8325 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8326 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8327 fi
8328 ac_cv_func_vfork_works=$ac_cv_func_vfork
8329 if test "x$ac_cv_func_vfork" = xyes; then
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8331 $as_echo_n "checking for working vfork... " >&6; }
8332 if ${ac_cv_func_vfork_works+:} false; then :
8333 $as_echo_n "(cached) " >&6
8334 else
8335 if test "$cross_compiling" = yes; then :
8336 ac_cv_func_vfork_works=cross
8337 else
8338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8339 /* end confdefs.h. */
8340 /* Thanks to Paul Eggert for this test. */
8341 $ac_includes_default
8342 #include <sys/wait.h>
8343 #ifdef HAVE_VFORK_H
8344 # include <vfork.h>
8345 #endif
8346 /* On some sparc systems, changes by the child to local and incoming
8347 argument registers are propagated back to the parent. The compiler
8348 is told about this with #include <vfork.h>, but some compilers
8349 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8350 static variable whose address is put into a register that is
8351 clobbered by the vfork. */
8352 static void
8353 #ifdef __cplusplus
8354 sparc_address_test (int arg)
8355 # else
8356 sparc_address_test (arg) int arg;
8357 #endif
8358 {
8359 static pid_t child;
8360 if (!child) {
8361 child = vfork ();
8362 if (child < 0) {
8363 perror ("vfork");
8364 _exit(2);
8365 }
8366 if (!child) {
8367 arg = getpid();
8368 write(-1, "", 0);
8369 _exit (arg);
8370 }
8371 }
8372 }
8373
8374 int
8375 main ()
8376 {
8377 pid_t parent = getpid ();
8378 pid_t child;
8379
8380 sparc_address_test (0);
8381
8382 child = vfork ();
8383
8384 if (child == 0) {
8385 /* Here is another test for sparc vfork register problems. This
8386 test uses lots of local variables, at least as many local
8387 variables as main has allocated so far including compiler
8388 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8389 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8390 reuse the register of parent for one of the local variables,
8391 since it will think that parent can't possibly be used any more
8392 in this routine. Assigning to the local variable will thus
8393 munge parent in the parent process. */
8394 pid_t
8395 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8396 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8397 /* Convince the compiler that p..p7 are live; otherwise, it might
8398 use the same hardware register for all 8 local variables. */
8399 if (p != p1 || p != p2 || p != p3 || p != p4
8400 || p != p5 || p != p6 || p != p7)
8401 _exit(1);
8402
8403 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8404 from child file descriptors. If the child closes a descriptor
8405 before it execs or exits, this munges the parent's descriptor
8406 as well. Test for this by closing stdout in the child. */
8407 _exit(close(fileno(stdout)) != 0);
8408 } else {
8409 int status;
8410 struct stat st;
8411
8412 while (wait(&status) != child)
8413 ;
8414 return (
8415 /* Was there some problem with vforking? */
8416 child < 0
8417
8418 /* Did the child fail? (This shouldn't happen.) */
8419 || status
8420
8421 /* Did the vfork/compiler bug occur? */
8422 || parent != getpid()
8423
8424 /* Did the file descriptor bug occur? */
8425 || fstat(fileno(stdout), &st) != 0
8426 );
8427 }
8428 }
8429 _ACEOF
8430 if ac_fn_c_try_run "$LINENO"; then :
8431 ac_cv_func_vfork_works=yes
8432 else
8433 ac_cv_func_vfork_works=no
8434 fi
8435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8436 conftest.$ac_objext conftest.beam conftest.$ac_ext
8437 fi
8438
8439 fi
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8441 $as_echo "$ac_cv_func_vfork_works" >&6; }
8442
8443 fi;
8444 if test "x$ac_cv_func_fork_works" = xcross; then
8445 ac_cv_func_vfork_works=$ac_cv_func_vfork
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8447 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8448 fi
8449
8450 if test "x$ac_cv_func_vfork_works" = xyes; then
8451
8452 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8453
8454 else
8455
8456 $as_echo "#define vfork fork" >>confdefs.h
8457
8458 fi
8459 if test "x$ac_cv_func_fork_works" = xyes; then
8460
8461 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8462
8463 fi
8464
8465 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8467 $as_echo_n "checking for library containing socketpair... " >&6; }
8468 if ${ac_cv_search_socketpair+:} false; then :
8469 $as_echo_n "(cached) " >&6
8470 else
8471 ac_func_search_save_LIBS=$LIBS
8472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8473 /* end confdefs.h. */
8474
8475 /* Override any GCC internal prototype to avoid an error.
8476 Use char because int might match the return type of a GCC
8477 builtin and then its argument prototype would still apply. */
8478 #ifdef __cplusplus
8479 extern "C"
8480 #endif
8481 char socketpair ();
8482 int
8483 main ()
8484 {
8485 return socketpair ();
8486 ;
8487 return 0;
8488 }
8489 _ACEOF
8490 for ac_lib in '' socket; do
8491 if test -z "$ac_lib"; then
8492 ac_res="none required"
8493 else
8494 ac_res=-l$ac_lib
8495 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8496 fi
8497 if ac_fn_c_try_link "$LINENO"; then :
8498 ac_cv_search_socketpair=$ac_res
8499 fi
8500 rm -f core conftest.err conftest.$ac_objext \
8501 conftest$ac_exeext
8502 if ${ac_cv_search_socketpair+:} false; then :
8503 break
8504 fi
8505 done
8506 if ${ac_cv_search_socketpair+:} false; then :
8507
8508 else
8509 ac_cv_search_socketpair=no
8510 fi
8511 rm conftest.$ac_ext
8512 LIBS=$ac_func_search_save_LIBS
8513 fi
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8515 $as_echo "$ac_cv_search_socketpair" >&6; }
8516 ac_res=$ac_cv_search_socketpair
8517 if test "$ac_res" != no; then :
8518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8519
8520 fi
8521
8522 for ac_func in \
8523 fdwalk \
8524 getauxval \
8525 getrlimit \
8526 getrusage \
8527 pipe \
8528 pipe2 \
8529 poll \
8530 ptrace64 \
8531 sbrk \
8532 setns \
8533 setpgid \
8534 setpgrp \
8535 sigaction \
8536 sigaltstack \
8537 sigprocmask \
8538 sigtimedwait \
8539 socketpair \
8540
8541 do :
8542 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8543 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8544 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8545 cat >>confdefs.h <<_ACEOF
8546 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8547 _ACEOF
8548
8549 fi
8550 done
8551
8552
8553 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
8554 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
8555 # only in linux/personality.h.
8556 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
8557 "
8558 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
8559 ac_have_decl=1
8560 else
8561 ac_have_decl=0
8562 fi
8563
8564 cat >>confdefs.h <<_ACEOF
8565 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
8566 _ACEOF
8567
8568
8569 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8570 if test "x$ac_cv_have_decl_strstr" = xyes; then :
8571 ac_have_decl=1
8572 else
8573 ac_have_decl=0
8574 fi
8575
8576 cat >>confdefs.h <<_ACEOF
8577 #define HAVE_DECL_STRSTR $ac_have_decl
8578 _ACEOF
8579
8580
8581 # ----------------------- #
8582 # Checks for structures. #
8583 # ----------------------- #
8584
8585 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8586 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
8587
8588 cat >>confdefs.h <<_ACEOF
8589 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
8590 _ACEOF
8591
8592
8593 fi
8594 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
8595 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
8596
8597 cat >>confdefs.h <<_ACEOF
8598 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
8599 _ACEOF
8600
8601
8602 fi
8603
8604
8605 # On FreeBSD we need libutil for the kinfo_get* functions. On
8606 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8607 # Figure out which one to use.
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8609 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8610 if ${ac_cv_search_kinfo_getfile+:} false; then :
8611 $as_echo_n "(cached) " >&6
8612 else
8613 ac_func_search_save_LIBS=$LIBS
8614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8615 /* end confdefs.h. */
8616
8617 /* Override any GCC internal prototype to avoid an error.
8618 Use char because int might match the return type of a GCC
8619 builtin and then its argument prototype would still apply. */
8620 #ifdef __cplusplus
8621 extern "C"
8622 #endif
8623 char kinfo_getfile ();
8624 int
8625 main ()
8626 {
8627 return kinfo_getfile ();
8628 ;
8629 return 0;
8630 }
8631 _ACEOF
8632 for ac_lib in '' util util-freebsd; do
8633 if test -z "$ac_lib"; then
8634 ac_res="none required"
8635 else
8636 ac_res=-l$ac_lib
8637 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8638 fi
8639 if ac_fn_c_try_link "$LINENO"; then :
8640 ac_cv_search_kinfo_getfile=$ac_res
8641 fi
8642 rm -f core conftest.err conftest.$ac_objext \
8643 conftest$ac_exeext
8644 if ${ac_cv_search_kinfo_getfile+:} false; then :
8645 break
8646 fi
8647 done
8648 if ${ac_cv_search_kinfo_getfile+:} false; then :
8649
8650 else
8651 ac_cv_search_kinfo_getfile=no
8652 fi
8653 rm conftest.$ac_ext
8654 LIBS=$ac_func_search_save_LIBS
8655 fi
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8657 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8658 ac_res=$ac_cv_search_kinfo_getfile
8659 if test "$ac_res" != no; then :
8660 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8661
8662 fi
8663
8664
8665 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
8666 for ac_func in kinfo_getfile
8667 do :
8668 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
8669 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
8670 cat >>confdefs.h <<_ACEOF
8671 #define HAVE_KINFO_GETFILE 1
8672 _ACEOF
8673
8674 fi
8675 done
8676
8677
8678 # ----------------------- #
8679 # Check for threading. #
8680 # ----------------------- #
8681
8682 # Check whether --enable-threading was given.
8683 if test "${enable_threading+set}" = set; then :
8684 enableval=$enable_threading; case "$enableval" in
8685 yes) want_threading=yes ;;
8686 no) want_threading=no ;;
8687 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
8688 esac
8689 else
8690 want_threading=auto
8691 fi
8692
8693
8694 # Check for std::thread. This does not work on some platforms, like
8695 # mingw using the win32 threads model with gcc older than 13, and
8696 # DJGPP.
8697 ac_ext=cpp
8698 ac_cpp='$CXXCPP $CPPFLAGS'
8699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8702
8703
8704
8705
8706
8707 ac_ext=c
8708 ac_cpp='$CPP $CPPFLAGS'
8709 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8710 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8711 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8712
8713 ax_pthread_ok=no
8714
8715 # We used to check for pthread.h first, but this fails if pthread.h
8716 # requires special compiler flags (e.g. on Tru64 or Sequent).
8717 # It gets checked for in the link test anyway.
8718
8719 # First of all, check if the user has set any of the PTHREAD_LIBS,
8720 # etcetera environment variables, and if threads linking works using
8721 # them:
8722 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
8723 ax_pthread_save_CC="$CC"
8724 ax_pthread_save_CFLAGS="$CFLAGS"
8725 ax_pthread_save_LIBS="$LIBS"
8726 if test "x$PTHREAD_CC" != "x"; then :
8727 CC="$PTHREAD_CC"
8728 fi
8729 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8730 LIBS="$PTHREAD_LIBS $LIBS"
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8732 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8734 /* end confdefs.h. */
8735
8736 /* Override any GCC internal prototype to avoid an error.
8737 Use char because int might match the return type of a GCC
8738 builtin and then its argument prototype would still apply. */
8739 #ifdef __cplusplus
8740 extern "C"
8741 #endif
8742 char pthread_join ();
8743 int
8744 main ()
8745 {
8746 return pthread_join ();
8747 ;
8748 return 0;
8749 }
8750 _ACEOF
8751 if ac_fn_c_try_link "$LINENO"; then :
8752 ax_pthread_ok=yes
8753 fi
8754 rm -f core conftest.err conftest.$ac_objext \
8755 conftest$ac_exeext conftest.$ac_ext
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8757 $as_echo "$ax_pthread_ok" >&6; }
8758 if test "x$ax_pthread_ok" = "xno"; then
8759 PTHREAD_LIBS=""
8760 PTHREAD_CFLAGS=""
8761 fi
8762 CC="$ax_pthread_save_CC"
8763 CFLAGS="$ax_pthread_save_CFLAGS"
8764 LIBS="$ax_pthread_save_LIBS"
8765 fi
8766
8767 # We must check for the threads library under a number of different
8768 # names; the ordering is very important because some systems
8769 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8770 # libraries is broken (non-POSIX).
8771
8772 # Create a list of thread flags to try. Items starting with a "-" are
8773 # C compiler flags, and other items are library names, except for "none"
8774 # which indicates that we try without any flags at all, and "pthread-config"
8775 # which is a program returning the flags for the Pth emulation library.
8776
8777 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
8778
8779 # The ordering *is* (sometimes) important. Some notes on the
8780 # individual items follow:
8781
8782 # pthreads: AIX (must check this before -lpthread)
8783 # none: in case threads are in libc; should be tried before -Kthread and
8784 # other compiler flags to prevent continual compiler warnings
8785 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8786 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8787 # (Note: HP C rejects this with "bad form for `-t' option")
8788 # -pthreads: Solaris/gcc (Note: HP C also rejects)
8789 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8790 # doesn't hurt to check since this sometimes defines pthreads and
8791 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
8792 # is present but should not be used directly; and before -mthreads,
8793 # because the compiler interprets this as "-mt" + "-hreads")
8794 # -mthreads: Mingw32/gcc, Lynx/gcc
8795 # pthread: Linux, etcetera
8796 # --thread-safe: KAI C++
8797 # pthread-config: use pthread-config program (for GNU Pth library)
8798
8799 case $host_os in
8800
8801 freebsd*)
8802
8803 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8804 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8805
8806 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
8807 ;;
8808
8809 hpux*)
8810
8811 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8812 # multi-threading and also sets -lpthread."
8813
8814 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8815 ;;
8816
8817 openedition*)
8818
8819 # IBM z/OS requires a feature-test macro to be defined in order to
8820 # enable POSIX threads at all, so give the user a hint if this is
8821 # not set. (We don't define these ourselves, as they can affect
8822 # other portions of the system API in unpredictable ways.)
8823
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h. */
8826
8827 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8828 AX_PTHREAD_ZOS_MISSING
8829 # endif
8830
8831 _ACEOF
8832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8833 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8835 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8836 fi
8837 rm -f conftest*
8838
8839 ;;
8840
8841 solaris*)
8842
8843 # On Solaris (at least, for some versions), libc contains stubbed
8844 # (non-functional) versions of the pthreads routines, so link-based
8845 # tests will erroneously succeed. (N.B.: The stubs are missing
8846 # pthread_cleanup_push, or rather a function called by this macro,
8847 # so we could check for that, but who knows whether they'll stub
8848 # that too in a future libc.) So we'll check first for the
8849 # standard Solaris way of linking pthreads (-mt -lpthread).
8850
8851 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
8852 ;;
8853 esac
8854
8855 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
8856
8857 if test "x$GCC" = "xyes"; then :
8858 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
8859 fi
8860
8861 # The presence of a feature test macro requesting re-entrant function
8862 # definitions is, on some systems, a strong hint that pthreads support is
8863 # correctly enabled
8864
8865 case $host_os in
8866 darwin* | hpux* | linux* | osf* | solaris*)
8867 ax_pthread_check_macro="_REENTRANT"
8868 ;;
8869
8870 aix*)
8871 ax_pthread_check_macro="_THREAD_SAFE"
8872 ;;
8873
8874 *)
8875 ax_pthread_check_macro="--"
8876 ;;
8877 esac
8878 if test "x$ax_pthread_check_macro" = "x--"; then :
8879 ax_pthread_check_cond=0
8880 else
8881 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
8882 fi
8883
8884 # Are we compiling with Clang?
8885
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
8887 $as_echo_n "checking whether $CC is Clang... " >&6; }
8888 if ${ax_cv_PTHREAD_CLANG+:} false; then :
8889 $as_echo_n "(cached) " >&6
8890 else
8891 ax_cv_PTHREAD_CLANG=no
8892 # Note that Autoconf sets GCC=yes for Clang as well as GCC
8893 if test "x$GCC" = "xyes"; then
8894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8895 /* end confdefs.h. */
8896 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
8897 # if defined(__clang__) && defined(__llvm__)
8898 AX_PTHREAD_CC_IS_CLANG
8899 # endif
8900
8901 _ACEOF
8902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8903 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
8904 ax_cv_PTHREAD_CLANG=yes
8905 fi
8906 rm -f conftest*
8907
8908 fi
8909
8910 fi
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
8912 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
8913 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
8914
8915 ax_pthread_clang_warning=no
8916
8917 # Clang needs special handling, because older versions handle the -pthread
8918 # option in a rather... idiosyncratic way
8919
8920 if test "x$ax_pthread_clang" = "xyes"; then
8921
8922 # Clang takes -pthread; it has never supported any other flag
8923
8924 # (Note 1: This will need to be revisited if a system that Clang
8925 # supports has POSIX threads in a separate library. This tends not
8926 # to be the way of modern systems, but it's conceivable.)
8927
8928 # (Note 2: On some systems, notably Darwin, -pthread is not needed
8929 # to get POSIX threads support; the API is always present and
8930 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
8931 # -pthread does define _REENTRANT, and while the Darwin headers
8932 # ignore this macro, third-party headers might not.)
8933
8934 PTHREAD_CFLAGS="-pthread"
8935 PTHREAD_LIBS=
8936
8937 ax_pthread_ok=yes
8938
8939 # However, older versions of Clang make a point of warning the user
8940 # that, in an invocation where only linking and no compilation is
8941 # taking place, the -pthread option has no effect ("argument unused
8942 # during compilation"). They expect -pthread to be passed in only
8943 # when source code is being compiled.
8944 #
8945 # Problem is, this is at odds with the way Automake and most other
8946 # C build frameworks function, which is that the same flags used in
8947 # compilation (CFLAGS) are also used in linking. Many systems
8948 # supported by AX_PTHREAD require exactly this for POSIX threads
8949 # support, and in fact it is often not straightforward to specify a
8950 # flag that is used only in the compilation phase and not in
8951 # linking. Such a scenario is extremely rare in practice.
8952 #
8953 # Even though use of the -pthread flag in linking would only print
8954 # a warning, this can be a nuisance for well-run software projects
8955 # that build with -Werror. So if the active version of Clang has
8956 # this misfeature, we search for an option to squash it.
8957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
8959 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
8960 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
8961 $as_echo_n "(cached) " >&6
8962 else
8963 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
8964 # Create an alternate version of $ac_link that compiles and
8965 # links in two steps (.c -> .o, .o -> exe) instead of one
8966 # (.c -> exe), because the warning occurs only in the second
8967 # step
8968 ax_pthread_save_ac_link="$ac_link"
8969 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
8970 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
8971 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
8972 ax_pthread_save_CFLAGS="$CFLAGS"
8973 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
8974 if test "x$ax_pthread_try" = "xunknown"; then :
8975 break
8976 fi
8977 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
8978 ac_link="$ax_pthread_save_ac_link"
8979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8980 /* end confdefs.h. */
8981 int main(void){return 0;}
8982 _ACEOF
8983 if ac_fn_c_try_link "$LINENO"; then :
8984 ac_link="$ax_pthread_2step_ac_link"
8985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8986 /* end confdefs.h. */
8987 int main(void){return 0;}
8988 _ACEOF
8989 if ac_fn_c_try_link "$LINENO"; then :
8990 break
8991 fi
8992 rm -f core conftest.err conftest.$ac_objext \
8993 conftest$ac_exeext conftest.$ac_ext
8994
8995 fi
8996 rm -f core conftest.err conftest.$ac_objext \
8997 conftest$ac_exeext conftest.$ac_ext
8998 done
8999 ac_link="$ax_pthread_save_ac_link"
9000 CFLAGS="$ax_pthread_save_CFLAGS"
9001 if test "x$ax_pthread_try" = "x"; then :
9002 ax_pthread_try=no
9003 fi
9004 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
9005
9006 fi
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
9008 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
9009
9010 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
9011 no | unknown) ;;
9012 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
9013 esac
9014
9015 fi # $ax_pthread_clang = yes
9016
9017 if test "x$ax_pthread_ok" = "xno"; then
9018 for ax_pthread_try_flag in $ax_pthread_flags; do
9019
9020 case $ax_pthread_try_flag in
9021 none)
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
9023 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
9024 ;;
9025
9026 -mt,pthread)
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
9028 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
9029 PTHREAD_CFLAGS="-mt"
9030 PTHREAD_LIBS="-lpthread"
9031 ;;
9032
9033 -*)
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
9035 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
9036 PTHREAD_CFLAGS="$ax_pthread_try_flag"
9037 ;;
9038
9039 pthread-config)
9040 # Extract the first word of "pthread-config", so it can be a program name with args.
9041 set dummy pthread-config; ac_word=$2
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043 $as_echo_n "checking for $ac_word... " >&6; }
9044 if ${ac_cv_prog_ax_pthread_config+:} false; then :
9045 $as_echo_n "(cached) " >&6
9046 else
9047 if test -n "$ax_pthread_config"; then
9048 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
9049 else
9050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051 for as_dir in $PATH
9052 do
9053 IFS=$as_save_IFS
9054 test -z "$as_dir" && as_dir=.
9055 for ac_exec_ext in '' $ac_executable_extensions; do
9056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057 ac_cv_prog_ax_pthread_config="yes"
9058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059 break 2
9060 fi
9061 done
9062 done
9063 IFS=$as_save_IFS
9064
9065 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
9066 fi
9067 fi
9068 ax_pthread_config=$ac_cv_prog_ax_pthread_config
9069 if test -n "$ax_pthread_config"; then
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
9071 $as_echo "$ax_pthread_config" >&6; }
9072 else
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074 $as_echo "no" >&6; }
9075 fi
9076
9077
9078 if test "x$ax_pthread_config" = "xno"; then :
9079 continue
9080 fi
9081 PTHREAD_CFLAGS="`pthread-config --cflags`"
9082 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
9083 ;;
9084
9085 *)
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
9087 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
9088 PTHREAD_LIBS="-l$ax_pthread_try_flag"
9089 ;;
9090 esac
9091
9092 ax_pthread_save_CFLAGS="$CFLAGS"
9093 ax_pthread_save_LIBS="$LIBS"
9094 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9095 LIBS="$PTHREAD_LIBS $LIBS"
9096
9097 # Check for various functions. We must include pthread.h,
9098 # since some functions may be macros. (On the Sequent, we
9099 # need a special flag -Kthread to make this header compile.)
9100 # We check for pthread_join because it is in -lpthread on IRIX
9101 # while pthread_create is in libc. We check for pthread_attr_init
9102 # due to DEC craziness with -lpthreads. We check for
9103 # pthread_cleanup_push because it is one of the few pthread
9104 # functions on Solaris that doesn't have a non-functional libc stub.
9105 # We try pthread_create on general principles.
9106
9107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9108 /* end confdefs.h. */
9109 #include <pthread.h>
9110 # if $ax_pthread_check_cond
9111 # error "$ax_pthread_check_macro must be defined"
9112 # endif
9113 static void routine(void *a) { a = 0; }
9114 static void *start_routine(void *a) { return a; }
9115 int
9116 main ()
9117 {
9118 pthread_t th; pthread_attr_t attr;
9119 pthread_create(&th, 0, start_routine, 0);
9120 pthread_join(th, 0);
9121 pthread_attr_init(&attr);
9122 pthread_cleanup_push(routine, 0);
9123 pthread_cleanup_pop(0) /* ; */
9124 ;
9125 return 0;
9126 }
9127 _ACEOF
9128 if ac_fn_c_try_link "$LINENO"; then :
9129 ax_pthread_ok=yes
9130 fi
9131 rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext conftest.$ac_ext
9133
9134 CFLAGS="$ax_pthread_save_CFLAGS"
9135 LIBS="$ax_pthread_save_LIBS"
9136
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9138 $as_echo "$ax_pthread_ok" >&6; }
9139 if test "x$ax_pthread_ok" = "xyes"; then :
9140 break
9141 fi
9142
9143 PTHREAD_LIBS=""
9144 PTHREAD_CFLAGS=""
9145 done
9146 fi
9147
9148 # Various other checks:
9149 if test "x$ax_pthread_ok" = "xyes"; then
9150 ax_pthread_save_CFLAGS="$CFLAGS"
9151 ax_pthread_save_LIBS="$LIBS"
9152 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9153 LIBS="$PTHREAD_LIBS $LIBS"
9154
9155 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
9157 $as_echo_n "checking for joinable pthread attribute... " >&6; }
9158 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
9159 $as_echo_n "(cached) " >&6
9160 else
9161 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
9162 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
9163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9164 /* end confdefs.h. */
9165 #include <pthread.h>
9166 int
9167 main ()
9168 {
9169 int attr = $ax_pthread_attr; return attr /* ; */
9170 ;
9171 return 0;
9172 }
9173 _ACEOF
9174 if ac_fn_c_try_link "$LINENO"; then :
9175 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
9176 fi
9177 rm -f core conftest.err conftest.$ac_objext \
9178 conftest$ac_exeext conftest.$ac_ext
9179 done
9180
9181 fi
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
9183 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
9184 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
9185 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
9186 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
9187
9188 cat >>confdefs.h <<_ACEOF
9189 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
9190 _ACEOF
9191
9192 ax_pthread_joinable_attr_defined=yes
9193
9194 fi
9195
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
9197 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
9198 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
9199 $as_echo_n "(cached) " >&6
9200 else
9201 ax_cv_PTHREAD_SPECIAL_FLAGS=no
9202 case $host_os in
9203 solaris*)
9204 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
9205 ;;
9206 esac
9207
9208 fi
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
9210 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
9211 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
9212 test "x$ax_pthread_special_flags_added" != "xyes"; then :
9213 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
9214 ax_pthread_special_flags_added=yes
9215 fi
9216
9217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
9218 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
9219 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
9220 $as_echo_n "(cached) " >&6
9221 else
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9223 /* end confdefs.h. */
9224 #include <pthread.h>
9225 int
9226 main ()
9227 {
9228 int i = PTHREAD_PRIO_INHERIT;
9229 ;
9230 return 0;
9231 }
9232 _ACEOF
9233 if ac_fn_c_try_link "$LINENO"; then :
9234 ax_cv_PTHREAD_PRIO_INHERIT=yes
9235 else
9236 ax_cv_PTHREAD_PRIO_INHERIT=no
9237 fi
9238 rm -f core conftest.err conftest.$ac_objext \
9239 conftest$ac_exeext conftest.$ac_ext
9240
9241 fi
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
9243 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
9244 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
9245 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
9246
9247 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
9248
9249 ax_pthread_prio_inherit_defined=yes
9250
9251 fi
9252
9253 CFLAGS="$ax_pthread_save_CFLAGS"
9254 LIBS="$ax_pthread_save_LIBS"
9255
9256 # More AIX lossage: compile with *_r variant
9257 if test "x$GCC" != "xyes"; then
9258 case $host_os in
9259 aix*)
9260 case "x/$CC" in #(
9261 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
9262 #handle absolute path differently from PATH based program lookup
9263 case "x$CC" in #(
9264 x/*) :
9265 if as_fn_executable_p ${CC}_r; then :
9266 PTHREAD_CC="${CC}_r"
9267 fi ;; #(
9268 *) :
9269 for ac_prog in ${CC}_r
9270 do
9271 # Extract the first word of "$ac_prog", so it can be a program name with args.
9272 set dummy $ac_prog; ac_word=$2
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9274 $as_echo_n "checking for $ac_word... " >&6; }
9275 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
9276 $as_echo_n "(cached) " >&6
9277 else
9278 if test -n "$PTHREAD_CC"; then
9279 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
9280 else
9281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9282 for as_dir in $PATH
9283 do
9284 IFS=$as_save_IFS
9285 test -z "$as_dir" && as_dir=.
9286 for ac_exec_ext in '' $ac_executable_extensions; do
9287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9288 ac_cv_prog_PTHREAD_CC="$ac_prog"
9289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9290 break 2
9291 fi
9292 done
9293 done
9294 IFS=$as_save_IFS
9295
9296 fi
9297 fi
9298 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
9299 if test -n "$PTHREAD_CC"; then
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
9301 $as_echo "$PTHREAD_CC" >&6; }
9302 else
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304 $as_echo "no" >&6; }
9305 fi
9306
9307
9308 test -n "$PTHREAD_CC" && break
9309 done
9310 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9311 ;;
9312 esac ;; #(
9313 *) :
9314 ;;
9315 esac
9316 ;;
9317 esac
9318 fi
9319 fi
9320
9321 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9322
9323
9324
9325
9326
9327 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
9328 if test "x$ax_pthread_ok" = "xyes"; then
9329 threads=yes
9330 :
9331 else
9332 ax_pthread_ok=no
9333 threads=no
9334 fi
9335 ac_ext=cpp
9336 ac_cpp='$CXXCPP $CPPFLAGS'
9337 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9338 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9339 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9340
9341
9342 save_LIBS="$LIBS"
9343 LIBS="$PTHREAD_LIBS $LIBS"
9344 save_CXXFLAGS="$CXXFLAGS"
9345 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
9347 $as_echo_n "checking for std::thread... " >&6; }
9348 if ${gdb_cv_cxx_std_thread+:} false; then :
9349 $as_echo_n "(cached) " >&6
9350 else
9351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9352 /* end confdefs.h. */
9353 #if defined (__MINGW32__) || defined (__CYGWIN__)
9354 # ifdef _WIN32_WINNT
9355 # if _WIN32_WINNT < 0x0501
9356 # undef _WIN32_WINNT
9357 # define _WIN32_WINNT 0x0501
9358 # endif
9359 # else
9360 # define _WIN32_WINNT 0x0501
9361 # endif
9362 #endif /* __MINGW32__ || __CYGWIN__ */
9363 #include <thread>
9364 #include <mutex>
9365 void callback() { }
9366 int
9367 main ()
9368 {
9369 std::thread t(callback);
9370 ;
9371 return 0;
9372 }
9373 _ACEOF
9374 if ac_fn_cxx_try_compile "$LINENO"; then :
9375 gdb_cv_cxx_std_thread=yes
9376 else
9377 gdb_cv_cxx_std_thread=no
9378 fi
9379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9380 fi
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
9382 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
9383
9384 if test "$threads" = "yes"; then
9385 # This check must be here, while LIBS includes any necessary
9386 # threading library.
9387 for ac_func in pthread_sigmask pthread_setname_np
9388 do :
9389 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9390 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
9391 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9392 cat >>confdefs.h <<_ACEOF
9393 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9394 _ACEOF
9395
9396 fi
9397 done
9398
9399 fi
9400 LIBS="$save_LIBS"
9401 CXXFLAGS="$save_CXXFLAGS"
9402
9403 if test "$want_threading" != "no"; then
9404 if test "$gdb_cv_cxx_std_thread" = "yes"; then
9405
9406 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
9407
9408 else
9409 if test "$want_threading" = "yes"; then
9410 as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
9411 else
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
9413 $as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
9414 fi
9415 fi
9416 fi
9417 ac_ext=c
9418 ac_cpp='$CPP $CPPFLAGS'
9419 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9420 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9421 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9422
9423
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
9425 $as_echo_n "checking for sigsetjmp... " >&6; }
9426 if ${gdb_cv_func_sigsetjmp+:} false; then :
9427 $as_echo_n "(cached) " >&6
9428 else
9429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9430 /* end confdefs.h. */
9431 #include <setjmp.h>
9432 int
9433 main ()
9434 {
9435 sigjmp_buf env;
9436 while (! sigsetjmp (env, 1))
9437 siglongjmp (env, 1);
9438
9439 ;
9440 return 0;
9441 }
9442 _ACEOF
9443 if ac_fn_c_try_compile "$LINENO"; then :
9444 gdb_cv_func_sigsetjmp=yes
9445 else
9446 gdb_cv_func_sigsetjmp=no
9447
9448 fi
9449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9450
9451 fi
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
9453 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
9454 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
9455
9456 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
9457
9458 fi
9459
9460
9461 # Check whether --with-intel_pt was given.
9462 if test "${with_intel_pt+set}" = set; then :
9463 withval=$with_intel_pt;
9464 else
9465 with_intel_pt=auto
9466 fi
9467
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
9469 $as_echo_n "checking whether to use intel pt... " >&6; }
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
9471 $as_echo "$with_intel_pt" >&6; }
9472
9473 if test "${with_intel_pt}" = no; then
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
9475 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
9476 HAVE_LIBIPT=no
9477 else
9478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9479 /* end confdefs.h. */
9480
9481 #include <linux/perf_event.h>
9482 #ifndef PERF_ATTR_SIZE_VER5
9483 # error
9484 #endif
9485
9486 _ACEOF
9487 if ac_fn_c_try_cpp "$LINENO"; then :
9488 perf_event=yes
9489 else
9490 perf_event=no
9491 fi
9492 rm -f conftest.err conftest.i conftest.$ac_ext
9493 if test "$perf_event" != yes; then
9494 if test "$with_intel_pt" = yes; then
9495 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
9496 else
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
9498 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
9499 fi
9500 fi
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510 use_additional=yes
9511
9512 acl_save_prefix="$prefix"
9513 prefix="$acl_final_prefix"
9514 acl_save_exec_prefix="$exec_prefix"
9515 exec_prefix="$acl_final_exec_prefix"
9516
9517 eval additional_includedir=\"$includedir\"
9518 eval additional_libdir=\"$libdir\"
9519
9520 exec_prefix="$acl_save_exec_prefix"
9521 prefix="$acl_save_prefix"
9522
9523
9524 # Check whether --with-libipt-prefix was given.
9525 if test "${with_libipt_prefix+set}" = set; then :
9526 withval=$with_libipt_prefix;
9527 if test "X$withval" = "Xno"; then
9528 use_additional=no
9529 else
9530 if test "X$withval" = "X"; then
9531
9532 acl_save_prefix="$prefix"
9533 prefix="$acl_final_prefix"
9534 acl_save_exec_prefix="$exec_prefix"
9535 exec_prefix="$acl_final_exec_prefix"
9536
9537 eval additional_includedir=\"$includedir\"
9538 eval additional_libdir=\"$libdir\"
9539
9540 exec_prefix="$acl_save_exec_prefix"
9541 prefix="$acl_save_prefix"
9542
9543 else
9544 additional_includedir="$withval/include"
9545 additional_libdir="$withval/lib"
9546 fi
9547 fi
9548
9549 fi
9550
9551
9552 # Check whether --with-libipt-type was given.
9553 if test "${with_libipt_type+set}" = set; then :
9554 withval=$with_libipt_type; with_libipt_type=$withval
9555 else
9556 with_libipt_type=auto
9557 fi
9558
9559 lib_type=`eval echo \$with_libipt_type`
9560
9561 LIBIPT=
9562 LTLIBIPT=
9563 INCIPT=
9564 rpathdirs=
9565 ltrpathdirs=
9566 names_already_handled=
9567 names_next_round='ipt '
9568 while test -n "$names_next_round"; do
9569 names_this_round="$names_next_round"
9570 names_next_round=
9571 for name in $names_this_round; do
9572 already_handled=
9573 for n in $names_already_handled; do
9574 if test "$n" = "$name"; then
9575 already_handled=yes
9576 break
9577 fi
9578 done
9579 if test -z "$already_handled"; then
9580 names_already_handled="$names_already_handled $name"
9581 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9582 eval value=\"\$HAVE_LIB$uppername\"
9583 if test -n "$value"; then
9584 if test "$value" = yes; then
9585 eval value=\"\$LIB$uppername\"
9586 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
9587 eval value=\"\$LTLIB$uppername\"
9588 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
9589 else
9590 :
9591 fi
9592 else
9593 found_dir=
9594 found_la=
9595 found_so=
9596 found_a=
9597 if test $use_additional = yes; then
9598 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9599 found_dir="$additional_libdir"
9600 found_so="$additional_libdir/lib$name.$shlibext"
9601 if test -f "$additional_libdir/lib$name.la"; then
9602 found_la="$additional_libdir/lib$name.la"
9603 fi
9604 elif test x$lib_type != xshared; then
9605 if test -f "$additional_libdir/lib$name.$libext"; then
9606 found_dir="$additional_libdir"
9607 found_a="$additional_libdir/lib$name.$libext"
9608 if test -f "$additional_libdir/lib$name.la"; then
9609 found_la="$additional_libdir/lib$name.la"
9610 fi
9611 fi
9612 fi
9613 fi
9614 if test "X$found_dir" = "X"; then
9615 for x in $LDFLAGS $LTLIBIPT; do
9616
9617 acl_save_prefix="$prefix"
9618 prefix="$acl_final_prefix"
9619 acl_save_exec_prefix="$exec_prefix"
9620 exec_prefix="$acl_final_exec_prefix"
9621 eval x=\"$x\"
9622 exec_prefix="$acl_save_exec_prefix"
9623 prefix="$acl_save_prefix"
9624
9625 case "$x" in
9626 -L*)
9627 dir=`echo "X$x" | sed -e 's/^X-L//'`
9628 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9629 found_dir="$dir"
9630 found_so="$dir/lib$name.$shlibext"
9631 if test -f "$dir/lib$name.la"; then
9632 found_la="$dir/lib$name.la"
9633 fi
9634 elif test x$lib_type != xshared; then
9635 if test -f "$dir/lib$name.$libext"; then
9636 found_dir="$dir"
9637 found_a="$dir/lib$name.$libext"
9638 if test -f "$dir/lib$name.la"; then
9639 found_la="$dir/lib$name.la"
9640 fi
9641 fi
9642 fi
9643 ;;
9644 esac
9645 if test "X$found_dir" != "X"; then
9646 break
9647 fi
9648 done
9649 fi
9650 if test "X$found_dir" != "X"; then
9651 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
9652 if test "X$found_so" != "X"; then
9653 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9654 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9655 else
9656 haveit=
9657 for x in $ltrpathdirs; do
9658 if test "X$x" = "X$found_dir"; then
9659 haveit=yes
9660 break
9661 fi
9662 done
9663 if test -z "$haveit"; then
9664 ltrpathdirs="$ltrpathdirs $found_dir"
9665 fi
9666 if test "$hardcode_direct" = yes; then
9667 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9668 else
9669 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9670 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9671 haveit=
9672 for x in $rpathdirs; do
9673 if test "X$x" = "X$found_dir"; then
9674 haveit=yes
9675 break
9676 fi
9677 done
9678 if test -z "$haveit"; then
9679 rpathdirs="$rpathdirs $found_dir"
9680 fi
9681 else
9682 haveit=
9683 for x in $LDFLAGS $LIBIPT; do
9684
9685 acl_save_prefix="$prefix"
9686 prefix="$acl_final_prefix"
9687 acl_save_exec_prefix="$exec_prefix"
9688 exec_prefix="$acl_final_exec_prefix"
9689 eval x=\"$x\"
9690 exec_prefix="$acl_save_exec_prefix"
9691 prefix="$acl_save_prefix"
9692
9693 if test "X$x" = "X-L$found_dir"; then
9694 haveit=yes
9695 break
9696 fi
9697 done
9698 if test -z "$haveit"; then
9699 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
9700 fi
9701 if test "$hardcode_minus_L" != no; then
9702 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9703 else
9704 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9705 fi
9706 fi
9707 fi
9708 fi
9709 else
9710 if test "X$found_a" != "X"; then
9711 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
9712 else
9713 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
9714 fi
9715 fi
9716 additional_includedir=
9717 case "$found_dir" in
9718 */lib | */lib/)
9719 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9720 additional_includedir="$basedir/include"
9721 ;;
9722 esac
9723 if test "X$additional_includedir" != "X"; then
9724 if test "X$additional_includedir" != "X/usr/include"; then
9725 haveit=
9726 if test "X$additional_includedir" = "X/usr/local/include"; then
9727 if test -n "$GCC"; then
9728 case $host_os in
9729 linux*) haveit=yes;;
9730 esac
9731 fi
9732 fi
9733 if test -z "$haveit"; then
9734 for x in $CPPFLAGS $INCIPT; do
9735
9736 acl_save_prefix="$prefix"
9737 prefix="$acl_final_prefix"
9738 acl_save_exec_prefix="$exec_prefix"
9739 exec_prefix="$acl_final_exec_prefix"
9740 eval x=\"$x\"
9741 exec_prefix="$acl_save_exec_prefix"
9742 prefix="$acl_save_prefix"
9743
9744 if test "X$x" = "X-I$additional_includedir"; then
9745 haveit=yes
9746 break
9747 fi
9748 done
9749 if test -z "$haveit"; then
9750 if test -d "$additional_includedir"; then
9751 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
9752 fi
9753 fi
9754 fi
9755 fi
9756 fi
9757 if test -n "$found_la"; then
9758 save_libdir="$libdir"
9759 case "$found_la" in
9760 */* | *\\*) . "$found_la" ;;
9761 *) . "./$found_la" ;;
9762 esac
9763 libdir="$save_libdir"
9764 for dep in $dependency_libs; do
9765 case "$dep" in
9766 -L*)
9767 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9768 if test "X$additional_libdir" != "X/usr/lib"; then
9769 haveit=
9770 if test "X$additional_libdir" = "X/usr/local/lib"; then
9771 if test -n "$GCC"; then
9772 case $host_os in
9773 linux*) haveit=yes;;
9774 esac
9775 fi
9776 fi
9777 if test -z "$haveit"; then
9778 haveit=
9779 for x in $LDFLAGS $LIBIPT; do
9780
9781 acl_save_prefix="$prefix"
9782 prefix="$acl_final_prefix"
9783 acl_save_exec_prefix="$exec_prefix"
9784 exec_prefix="$acl_final_exec_prefix"
9785 eval x=\"$x\"
9786 exec_prefix="$acl_save_exec_prefix"
9787 prefix="$acl_save_prefix"
9788
9789 if test "X$x" = "X-L$additional_libdir"; then
9790 haveit=yes
9791 break
9792 fi
9793 done
9794 if test -z "$haveit"; then
9795 if test -d "$additional_libdir"; then
9796 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
9797 fi
9798 fi
9799 haveit=
9800 for x in $LDFLAGS $LTLIBIPT; do
9801
9802 acl_save_prefix="$prefix"
9803 prefix="$acl_final_prefix"
9804 acl_save_exec_prefix="$exec_prefix"
9805 exec_prefix="$acl_final_exec_prefix"
9806 eval x=\"$x\"
9807 exec_prefix="$acl_save_exec_prefix"
9808 prefix="$acl_save_prefix"
9809
9810 if test "X$x" = "X-L$additional_libdir"; then
9811 haveit=yes
9812 break
9813 fi
9814 done
9815 if test -z "$haveit"; then
9816 if test -d "$additional_libdir"; then
9817 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
9818 fi
9819 fi
9820 fi
9821 fi
9822 ;;
9823 -R*)
9824 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9825 if test "$enable_rpath" != no; then
9826 haveit=
9827 for x in $rpathdirs; do
9828 if test "X$x" = "X$dir"; then
9829 haveit=yes
9830 break
9831 fi
9832 done
9833 if test -z "$haveit"; then
9834 rpathdirs="$rpathdirs $dir"
9835 fi
9836 haveit=
9837 for x in $ltrpathdirs; do
9838 if test "X$x" = "X$dir"; then
9839 haveit=yes
9840 break
9841 fi
9842 done
9843 if test -z "$haveit"; then
9844 ltrpathdirs="$ltrpathdirs $dir"
9845 fi
9846 fi
9847 ;;
9848 -l*)
9849 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9850 ;;
9851 *.la)
9852 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9853 ;;
9854 *)
9855 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
9856 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
9857 ;;
9858 esac
9859 done
9860 fi
9861 else
9862 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9863 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9864 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
9865 else
9866 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
9867 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
9868 fi
9869 fi
9870 fi
9871 fi
9872 done
9873 done
9874 if test "X$rpathdirs" != "X"; then
9875 if test -n "$hardcode_libdir_separator"; then
9876 alldirs=
9877 for found_dir in $rpathdirs; do
9878 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9879 done
9880 acl_save_libdir="$libdir"
9881 libdir="$alldirs"
9882 eval flag=\"$hardcode_libdir_flag_spec\"
9883 libdir="$acl_save_libdir"
9884 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
9885 else
9886 for found_dir in $rpathdirs; do
9887 acl_save_libdir="$libdir"
9888 libdir="$found_dir"
9889 eval flag=\"$hardcode_libdir_flag_spec\"
9890 libdir="$acl_save_libdir"
9891 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
9892 done
9893 fi
9894 fi
9895 if test "X$ltrpathdirs" != "X"; then
9896 for found_dir in $ltrpathdirs; do
9897 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
9898 done
9899 fi
9900
9901
9902 ac_save_CPPFLAGS="$CPPFLAGS"
9903
9904 for element in $INCIPT; do
9905 haveit=
9906 for x in $CPPFLAGS; do
9907
9908 acl_save_prefix="$prefix"
9909 prefix="$acl_final_prefix"
9910 acl_save_exec_prefix="$exec_prefix"
9911 exec_prefix="$acl_final_exec_prefix"
9912 eval x=\"$x\"
9913 exec_prefix="$acl_save_exec_prefix"
9914 prefix="$acl_save_prefix"
9915
9916 if test "X$x" = "X$element"; then
9917 haveit=yes
9918 break
9919 fi
9920 done
9921 if test -z "$haveit"; then
9922 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9923 fi
9924 done
9925
9926
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
9928 $as_echo_n "checking for libipt... " >&6; }
9929 if ${ac_cv_libipt+:} false; then :
9930 $as_echo_n "(cached) " >&6
9931 else
9932
9933 ac_save_LIBS="$LIBS"
9934 LIBS="$LIBS $LIBIPT"
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h. */
9937 #include "intel-pt.h"
9938 int
9939 main ()
9940 {
9941 pt_insn_alloc_decoder (0);
9942 ;
9943 return 0;
9944 }
9945 _ACEOF
9946 if ac_fn_c_try_link "$LINENO"; then :
9947 ac_cv_libipt=yes
9948 else
9949 ac_cv_libipt=no
9950 fi
9951 rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
9953 LIBS="$ac_save_LIBS"
9954
9955 fi
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
9957 $as_echo "$ac_cv_libipt" >&6; }
9958 if test "$ac_cv_libipt" = yes; then
9959 HAVE_LIBIPT=yes
9960
9961 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
9962
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
9964 $as_echo_n "checking how to link with libipt... " >&6; }
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
9966 $as_echo "$LIBIPT" >&6; }
9967 else
9968 HAVE_LIBIPT=no
9969 CPPFLAGS="$ac_save_CPPFLAGS"
9970 LIBIPT=
9971 LTLIBIPT=
9972 fi
9973
9974
9975
9976
9977
9978
9979 if test "$HAVE_LIBIPT" != yes; then
9980 if test "$with_intel_pt" = yes; then
9981 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
9982 else
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
9984 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
9985 fi
9986 else
9987 save_LIBS=$LIBS
9988 LIBS="$LIBS $LIBIPT"
9989 for ac_func in pt_insn_event
9990 do :
9991 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
9992 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
9993 cat >>confdefs.h <<_ACEOF
9994 #define HAVE_PT_INSN_EVENT 1
9995 _ACEOF
9996
9997 fi
9998 done
9999
10000 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
10001 "
10002 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
10003
10004 cat >>confdefs.h <<_ACEOF
10005 #define HAVE_STRUCT_PT_INSN_ENABLED 1
10006 _ACEOF
10007
10008
10009 fi
10010 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
10011 "
10012 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
10013
10014 cat >>confdefs.h <<_ACEOF
10015 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
10016 _ACEOF
10017
10018
10019 fi
10020
10021 ac_fn_c_check_member "$LINENO" "struct pt_event" "variant.ptwrite" "ac_cv_member_struct_pt_event_variant_ptwrite" "#include <intel-pt.h>
10022 "
10023 if test "x$ac_cv_member_struct_pt_event_variant_ptwrite" = xyes; then :
10024
10025 cat >>confdefs.h <<_ACEOF
10026 #define HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE 1
10027 _ACEOF
10028
10029
10030 fi
10031
10032 LIBS=$save_LIBS
10033 fi
10034 fi
10035
10036 # Check if the compiler and runtime support printing long longs.
10037
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
10039 $as_echo_n "checking for long long support in printf... " >&6; }
10040 if ${gdb_cv_printf_has_long_long+:} false; then :
10041 $as_echo_n "(cached) " >&6
10042 else
10043 if test "$cross_compiling" = yes; then :
10044 gdb_cv_printf_has_long_long=no
10045 else
10046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10047 /* end confdefs.h. */
10048 $ac_includes_default
10049 int
10050 main ()
10051 {
10052 char buf[32];
10053 long long l = 0;
10054 l = (l << 16) + 0x0123;
10055 l = (l << 16) + 0x4567;
10056 l = (l << 16) + 0x89ab;
10057 l = (l << 16) + 0xcdef;
10058 sprintf (buf, "0x%016llx", l);
10059 return (strcmp ("0x0123456789abcdef", buf));
10060 ;
10061 return 0;
10062 }
10063 _ACEOF
10064 if ac_fn_c_try_run "$LINENO"; then :
10065 gdb_cv_printf_has_long_long=yes
10066 else
10067 gdb_cv_printf_has_long_long=no
10068 fi
10069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10070 conftest.$ac_objext conftest.beam conftest.$ac_ext
10071 fi
10072
10073 fi
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
10075 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
10076 if test "$gdb_cv_printf_has_long_long" = yes; then
10077
10078 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
10079
10080 fi
10081
10082
10083 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
10084
10085 for ac_header in sys/procfs.h
10086 do :
10087 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
10088 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
10089 cat >>confdefs.h <<_ACEOF
10090 #define HAVE_SYS_PROCFS_H 1
10091 _ACEOF
10092
10093 fi
10094
10095 done
10096
10097 if test "$ac_cv_header_sys_procfs_h" = yes; then
10098
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10100 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10101 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
10102 $as_echo_n "(cached) " >&6
10103 else
10104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105 /* end confdefs.h. */
10106
10107 #define _SYSCALL32
10108 #include <sys/procfs.h>
10109 int
10110 main ()
10111 {
10112 gregset_t avar
10113 ;
10114 return 0;
10115 }
10116 _ACEOF
10117 if ac_fn_c_try_compile "$LINENO"; then :
10118 bfd_cv_have_sys_procfs_type_gregset_t=yes
10119 else
10120 bfd_cv_have_sys_procfs_type_gregset_t=no
10121
10122 fi
10123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10124 fi
10125
10126 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
10127
10128 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
10129
10130 fi
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10132 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
10133
10134
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10136 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10137 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
10138 $as_echo_n "(cached) " >&6
10139 else
10140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10141 /* end confdefs.h. */
10142
10143 #define _SYSCALL32
10144 #include <sys/procfs.h>
10145 int
10146 main ()
10147 {
10148 fpregset_t avar
10149 ;
10150 return 0;
10151 }
10152 _ACEOF
10153 if ac_fn_c_try_compile "$LINENO"; then :
10154 bfd_cv_have_sys_procfs_type_fpregset_t=yes
10155 else
10156 bfd_cv_have_sys_procfs_type_fpregset_t=no
10157
10158 fi
10159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10160 fi
10161
10162 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
10163
10164 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
10165
10166 fi
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10168 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
10169
10170
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10172 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10173 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
10174 $as_echo_n "(cached) " >&6
10175 else
10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177 /* end confdefs.h. */
10178
10179 #define _SYSCALL32
10180 #include <sys/procfs.h>
10181 int
10182 main ()
10183 {
10184 prgregset_t avar
10185 ;
10186 return 0;
10187 }
10188 _ACEOF
10189 if ac_fn_c_try_compile "$LINENO"; then :
10190 bfd_cv_have_sys_procfs_type_prgregset_t=yes
10191 else
10192 bfd_cv_have_sys_procfs_type_prgregset_t=no
10193
10194 fi
10195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10196 fi
10197
10198 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
10199
10200 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
10201
10202 fi
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10204 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
10205
10206
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10208 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10209 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
10210 $as_echo_n "(cached) " >&6
10211 else
10212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10213 /* end confdefs.h. */
10214
10215 #define _SYSCALL32
10216 #include <sys/procfs.h>
10217 int
10218 main ()
10219 {
10220 prfpregset_t avar
10221 ;
10222 return 0;
10223 }
10224 _ACEOF
10225 if ac_fn_c_try_compile "$LINENO"; then :
10226 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
10227 else
10228 bfd_cv_have_sys_procfs_type_prfpregset_t=no
10229
10230 fi
10231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10232 fi
10233
10234 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
10235
10236 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
10237
10238 fi
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10240 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
10241
10242
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10244 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10245 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
10246 $as_echo_n "(cached) " >&6
10247 else
10248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10249 /* end confdefs.h. */
10250
10251 #define _SYSCALL32
10252 #include <sys/procfs.h>
10253 int
10254 main ()
10255 {
10256 prgregset32_t avar
10257 ;
10258 return 0;
10259 }
10260 _ACEOF
10261 if ac_fn_c_try_compile "$LINENO"; then :
10262 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
10263 else
10264 bfd_cv_have_sys_procfs_type_prgregset32_t=no
10265
10266 fi
10267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10268 fi
10269
10270 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
10271
10272 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
10273
10274 fi
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10276 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
10277
10278
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10280 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10281 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
10282 $as_echo_n "(cached) " >&6
10283 else
10284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10285 /* end confdefs.h. */
10286
10287 #define _SYSCALL32
10288 #include <sys/procfs.h>
10289 int
10290 main ()
10291 {
10292 lwpid_t avar
10293 ;
10294 return 0;
10295 }
10296 _ACEOF
10297 if ac_fn_c_try_compile "$LINENO"; then :
10298 bfd_cv_have_sys_procfs_type_lwpid_t=yes
10299 else
10300 bfd_cv_have_sys_procfs_type_lwpid_t=no
10301
10302 fi
10303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10304 fi
10305
10306 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
10307
10308 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10309
10310 fi
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
10312 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
10313
10314
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
10316 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
10317 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
10318 $as_echo_n "(cached) " >&6
10319 else
10320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10321 /* end confdefs.h. */
10322
10323 #define _SYSCALL32
10324 #include <sys/procfs.h>
10325 int
10326 main ()
10327 {
10328 psaddr_t avar
10329 ;
10330 return 0;
10331 }
10332 _ACEOF
10333 if ac_fn_c_try_compile "$LINENO"; then :
10334 bfd_cv_have_sys_procfs_type_psaddr_t=yes
10335 else
10336 bfd_cv_have_sys_procfs_type_psaddr_t=no
10337
10338 fi
10339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10340 fi
10341
10342 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
10343
10344 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10345
10346 fi
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
10348 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
10349
10350
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
10352 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
10353 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
10354 $as_echo_n "(cached) " >&6
10355 else
10356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10357 /* end confdefs.h. */
10358
10359 #define _SYSCALL32
10360 #include <sys/procfs.h>
10361 int
10362 main ()
10363 {
10364 elf_fpregset_t avar
10365 ;
10366 return 0;
10367 }
10368 _ACEOF
10369 if ac_fn_c_try_compile "$LINENO"; then :
10370 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
10371 else
10372 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
10373
10374 fi
10375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10376 fi
10377
10378 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
10379
10380 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
10381
10382 fi
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
10384 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
10385
10386 fi
10387
10388 # Check for xxhash
10389
10390 # Check whether --with-xxhash was given.
10391 if test "${with_xxhash+set}" = set; then :
10392 withval=$with_xxhash;
10393 else
10394 with_xxhash=auto
10395 fi
10396
10397
10398 if test "x$with_xxhash" != "xno"; then
10399
10400
10401
10402
10403
10404
10405
10406
10407 use_additional=yes
10408
10409 acl_save_prefix="$prefix"
10410 prefix="$acl_final_prefix"
10411 acl_save_exec_prefix="$exec_prefix"
10412 exec_prefix="$acl_final_exec_prefix"
10413
10414 eval additional_includedir=\"$includedir\"
10415 eval additional_libdir=\"$libdir\"
10416
10417 exec_prefix="$acl_save_exec_prefix"
10418 prefix="$acl_save_prefix"
10419
10420
10421 # Check whether --with-libxxhash-prefix was given.
10422 if test "${with_libxxhash_prefix+set}" = set; then :
10423 withval=$with_libxxhash_prefix;
10424 if test "X$withval" = "Xno"; then
10425 use_additional=no
10426 else
10427 if test "X$withval" = "X"; then
10428
10429 acl_save_prefix="$prefix"
10430 prefix="$acl_final_prefix"
10431 acl_save_exec_prefix="$exec_prefix"
10432 exec_prefix="$acl_final_exec_prefix"
10433
10434 eval additional_includedir=\"$includedir\"
10435 eval additional_libdir=\"$libdir\"
10436
10437 exec_prefix="$acl_save_exec_prefix"
10438 prefix="$acl_save_prefix"
10439
10440 else
10441 additional_includedir="$withval/include"
10442 additional_libdir="$withval/lib"
10443 fi
10444 fi
10445
10446 fi
10447
10448
10449 # Check whether --with-libxxhash-type was given.
10450 if test "${with_libxxhash_type+set}" = set; then :
10451 withval=$with_libxxhash_type; with_libxxhash_type=$withval
10452 else
10453 with_libxxhash_type=auto
10454 fi
10455
10456 lib_type=`eval echo \$with_libxxhash_type`
10457
10458 LIBXXHASH=
10459 LTLIBXXHASH=
10460 INCXXHASH=
10461 rpathdirs=
10462 ltrpathdirs=
10463 names_already_handled=
10464 names_next_round='xxhash '
10465 while test -n "$names_next_round"; do
10466 names_this_round="$names_next_round"
10467 names_next_round=
10468 for name in $names_this_round; do
10469 already_handled=
10470 for n in $names_already_handled; do
10471 if test "$n" = "$name"; then
10472 already_handled=yes
10473 break
10474 fi
10475 done
10476 if test -z "$already_handled"; then
10477 names_already_handled="$names_already_handled $name"
10478 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10479 eval value=\"\$HAVE_LIB$uppername\"
10480 if test -n "$value"; then
10481 if test "$value" = yes; then
10482 eval value=\"\$LIB$uppername\"
10483 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
10484 eval value=\"\$LTLIB$uppername\"
10485 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
10486 else
10487 :
10488 fi
10489 else
10490 found_dir=
10491 found_la=
10492 found_so=
10493 found_a=
10494 if test $use_additional = yes; then
10495 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10496 found_dir="$additional_libdir"
10497 found_so="$additional_libdir/lib$name.$shlibext"
10498 if test -f "$additional_libdir/lib$name.la"; then
10499 found_la="$additional_libdir/lib$name.la"
10500 fi
10501 elif test x$lib_type != xshared; then
10502 if test -f "$additional_libdir/lib$name.$libext"; then
10503 found_dir="$additional_libdir"
10504 found_a="$additional_libdir/lib$name.$libext"
10505 if test -f "$additional_libdir/lib$name.la"; then
10506 found_la="$additional_libdir/lib$name.la"
10507 fi
10508 fi
10509 fi
10510 fi
10511 if test "X$found_dir" = "X"; then
10512 for x in $LDFLAGS $LTLIBXXHASH; do
10513
10514 acl_save_prefix="$prefix"
10515 prefix="$acl_final_prefix"
10516 acl_save_exec_prefix="$exec_prefix"
10517 exec_prefix="$acl_final_exec_prefix"
10518 eval x=\"$x\"
10519 exec_prefix="$acl_save_exec_prefix"
10520 prefix="$acl_save_prefix"
10521
10522 case "$x" in
10523 -L*)
10524 dir=`echo "X$x" | sed -e 's/^X-L//'`
10525 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10526 found_dir="$dir"
10527 found_so="$dir/lib$name.$shlibext"
10528 if test -f "$dir/lib$name.la"; then
10529 found_la="$dir/lib$name.la"
10530 fi
10531 elif test x$lib_type != xshared; then
10532 if test -f "$dir/lib$name.$libext"; then
10533 found_dir="$dir"
10534 found_a="$dir/lib$name.$libext"
10535 if test -f "$dir/lib$name.la"; then
10536 found_la="$dir/lib$name.la"
10537 fi
10538 fi
10539 fi
10540 ;;
10541 esac
10542 if test "X$found_dir" != "X"; then
10543 break
10544 fi
10545 done
10546 fi
10547 if test "X$found_dir" != "X"; then
10548 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
10549 if test "X$found_so" != "X"; then
10550 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10551 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10552 else
10553 haveit=
10554 for x in $ltrpathdirs; do
10555 if test "X$x" = "X$found_dir"; then
10556 haveit=yes
10557 break
10558 fi
10559 done
10560 if test -z "$haveit"; then
10561 ltrpathdirs="$ltrpathdirs $found_dir"
10562 fi
10563 if test "$hardcode_direct" = yes; then
10564 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10565 else
10566 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10567 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10568 haveit=
10569 for x in $rpathdirs; do
10570 if test "X$x" = "X$found_dir"; then
10571 haveit=yes
10572 break
10573 fi
10574 done
10575 if test -z "$haveit"; then
10576 rpathdirs="$rpathdirs $found_dir"
10577 fi
10578 else
10579 haveit=
10580 for x in $LDFLAGS $LIBXXHASH; do
10581
10582 acl_save_prefix="$prefix"
10583 prefix="$acl_final_prefix"
10584 acl_save_exec_prefix="$exec_prefix"
10585 exec_prefix="$acl_final_exec_prefix"
10586 eval x=\"$x\"
10587 exec_prefix="$acl_save_exec_prefix"
10588 prefix="$acl_save_prefix"
10589
10590 if test "X$x" = "X-L$found_dir"; then
10591 haveit=yes
10592 break
10593 fi
10594 done
10595 if test -z "$haveit"; then
10596 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
10597 fi
10598 if test "$hardcode_minus_L" != no; then
10599 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10600 else
10601 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10602 fi
10603 fi
10604 fi
10605 fi
10606 else
10607 if test "X$found_a" != "X"; then
10608 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
10609 else
10610 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
10611 fi
10612 fi
10613 additional_includedir=
10614 case "$found_dir" in
10615 */lib | */lib/)
10616 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10617 additional_includedir="$basedir/include"
10618 ;;
10619 esac
10620 if test "X$additional_includedir" != "X"; then
10621 if test "X$additional_includedir" != "X/usr/include"; then
10622 haveit=
10623 if test "X$additional_includedir" = "X/usr/local/include"; then
10624 if test -n "$GCC"; then
10625 case $host_os in
10626 linux*) haveit=yes;;
10627 esac
10628 fi
10629 fi
10630 if test -z "$haveit"; then
10631 for x in $CPPFLAGS $INCXXHASH; do
10632
10633 acl_save_prefix="$prefix"
10634 prefix="$acl_final_prefix"
10635 acl_save_exec_prefix="$exec_prefix"
10636 exec_prefix="$acl_final_exec_prefix"
10637 eval x=\"$x\"
10638 exec_prefix="$acl_save_exec_prefix"
10639 prefix="$acl_save_prefix"
10640
10641 if test "X$x" = "X-I$additional_includedir"; then
10642 haveit=yes
10643 break
10644 fi
10645 done
10646 if test -z "$haveit"; then
10647 if test -d "$additional_includedir"; then
10648 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
10649 fi
10650 fi
10651 fi
10652 fi
10653 fi
10654 if test -n "$found_la"; then
10655 save_libdir="$libdir"
10656 case "$found_la" in
10657 */* | *\\*) . "$found_la" ;;
10658 *) . "./$found_la" ;;
10659 esac
10660 libdir="$save_libdir"
10661 for dep in $dependency_libs; do
10662 case "$dep" in
10663 -L*)
10664 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10665 if test "X$additional_libdir" != "X/usr/lib"; then
10666 haveit=
10667 if test "X$additional_libdir" = "X/usr/local/lib"; then
10668 if test -n "$GCC"; then
10669 case $host_os in
10670 linux*) haveit=yes;;
10671 esac
10672 fi
10673 fi
10674 if test -z "$haveit"; then
10675 haveit=
10676 for x in $LDFLAGS $LIBXXHASH; do
10677
10678 acl_save_prefix="$prefix"
10679 prefix="$acl_final_prefix"
10680 acl_save_exec_prefix="$exec_prefix"
10681 exec_prefix="$acl_final_exec_prefix"
10682 eval x=\"$x\"
10683 exec_prefix="$acl_save_exec_prefix"
10684 prefix="$acl_save_prefix"
10685
10686 if test "X$x" = "X-L$additional_libdir"; then
10687 haveit=yes
10688 break
10689 fi
10690 done
10691 if test -z "$haveit"; then
10692 if test -d "$additional_libdir"; then
10693 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
10694 fi
10695 fi
10696 haveit=
10697 for x in $LDFLAGS $LTLIBXXHASH; do
10698
10699 acl_save_prefix="$prefix"
10700 prefix="$acl_final_prefix"
10701 acl_save_exec_prefix="$exec_prefix"
10702 exec_prefix="$acl_final_exec_prefix"
10703 eval x=\"$x\"
10704 exec_prefix="$acl_save_exec_prefix"
10705 prefix="$acl_save_prefix"
10706
10707 if test "X$x" = "X-L$additional_libdir"; then
10708 haveit=yes
10709 break
10710 fi
10711 done
10712 if test -z "$haveit"; then
10713 if test -d "$additional_libdir"; then
10714 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
10715 fi
10716 fi
10717 fi
10718 fi
10719 ;;
10720 -R*)
10721 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10722 if test "$enable_rpath" != no; then
10723 haveit=
10724 for x in $rpathdirs; do
10725 if test "X$x" = "X$dir"; then
10726 haveit=yes
10727 break
10728 fi
10729 done
10730 if test -z "$haveit"; then
10731 rpathdirs="$rpathdirs $dir"
10732 fi
10733 haveit=
10734 for x in $ltrpathdirs; do
10735 if test "X$x" = "X$dir"; then
10736 haveit=yes
10737 break
10738 fi
10739 done
10740 if test -z "$haveit"; then
10741 ltrpathdirs="$ltrpathdirs $dir"
10742 fi
10743 fi
10744 ;;
10745 -l*)
10746 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10747 ;;
10748 *.la)
10749 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10750 ;;
10751 *)
10752 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
10753 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
10754 ;;
10755 esac
10756 done
10757 fi
10758 else
10759 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10760 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10761 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
10762 else
10763 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
10764 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
10765 fi
10766 fi
10767 fi
10768 fi
10769 done
10770 done
10771 if test "X$rpathdirs" != "X"; then
10772 if test -n "$hardcode_libdir_separator"; then
10773 alldirs=
10774 for found_dir in $rpathdirs; do
10775 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10776 done
10777 acl_save_libdir="$libdir"
10778 libdir="$alldirs"
10779 eval flag=\"$hardcode_libdir_flag_spec\"
10780 libdir="$acl_save_libdir"
10781 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
10782 else
10783 for found_dir in $rpathdirs; do
10784 acl_save_libdir="$libdir"
10785 libdir="$found_dir"
10786 eval flag=\"$hardcode_libdir_flag_spec\"
10787 libdir="$acl_save_libdir"
10788 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
10789 done
10790 fi
10791 fi
10792 if test "X$ltrpathdirs" != "X"; then
10793 for found_dir in $ltrpathdirs; do
10794 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
10795 done
10796 fi
10797
10798
10799 ac_save_CPPFLAGS="$CPPFLAGS"
10800
10801 for element in $INCXXHASH; do
10802 haveit=
10803 for x in $CPPFLAGS; do
10804
10805 acl_save_prefix="$prefix"
10806 prefix="$acl_final_prefix"
10807 acl_save_exec_prefix="$exec_prefix"
10808 exec_prefix="$acl_final_exec_prefix"
10809 eval x=\"$x\"
10810 exec_prefix="$acl_save_exec_prefix"
10811 prefix="$acl_save_prefix"
10812
10813 if test "X$x" = "X$element"; then
10814 haveit=yes
10815 break
10816 fi
10817 done
10818 if test -z "$haveit"; then
10819 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10820 fi
10821 done
10822
10823
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
10825 $as_echo_n "checking for libxxhash... " >&6; }
10826 if ${ac_cv_libxxhash+:} false; then :
10827 $as_echo_n "(cached) " >&6
10828 else
10829
10830 ac_save_LIBS="$LIBS"
10831 LIBS="$LIBS $LIBXXHASH"
10832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833 /* end confdefs.h. */
10834 #include <xxhash.h>
10835 int
10836 main ()
10837 {
10838 XXH32("foo", 3, 0);
10839
10840 ;
10841 return 0;
10842 }
10843 _ACEOF
10844 if ac_fn_c_try_link "$LINENO"; then :
10845 ac_cv_libxxhash=yes
10846 else
10847 ac_cv_libxxhash=no
10848 fi
10849 rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
10851 LIBS="$ac_save_LIBS"
10852
10853 fi
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
10855 $as_echo "$ac_cv_libxxhash" >&6; }
10856 if test "$ac_cv_libxxhash" = yes; then
10857 HAVE_LIBXXHASH=yes
10858
10859 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
10860
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
10862 $as_echo_n "checking how to link with libxxhash... " >&6; }
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
10864 $as_echo "$LIBXXHASH" >&6; }
10865 else
10866 HAVE_LIBXXHASH=no
10867 CPPFLAGS="$ac_save_CPPFLAGS"
10868 LIBXXHASH=
10869 LTLIBXXHASH=
10870 fi
10871
10872
10873
10874
10875
10876
10877 if test "$HAVE_LIBXXHASH" != yes; then
10878 if test "$with_xxhash" = yes; then
10879 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
10880 fi
10881 fi
10882 if test "x$with_xxhash" = "xauto"; then
10883 with_xxhash="$HAVE_LIBXXHASH"
10884 fi
10885 fi
10886
10887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
10888 $as_echo_n "checking whether to use xxhash... " >&6; }
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
10890 $as_echo "$with_xxhash" >&6; }
10891
10892 # This is set by GDB_AC_COMMON.
10893
10894
10895
10896 # Check whether we will enable the inclusion of unit tests when
10897 # compiling GDB.
10898 #
10899 # The default value of this option changes depending whether we're on
10900 # development mode (in which case it's "true") or not (in which case
10901 # it's "false"). The $development variable is set by the GDB_AC_COMMON
10902 # macro, which must therefore be used before GDB_AC_SELFTEST.
10903
10904 if test "x$development" != xtrue && test "x$development" != xfalse; then :
10905 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
10906 fi
10907
10908 # Check whether --enable-unit-tests was given.
10909 if test "${enable_unit_tests+set}" = set; then :
10910 enableval=$enable_unit_tests; case "${enableval}" in
10911 yes) enable_unittests=true ;;
10912 no) enable_unittests=false ;;
10913 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
10914 esac
10915 else
10916 enable_unittests=$development
10917 fi
10918
10919
10920 if $enable_unittests; then
10921
10922 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
10923
10924
10925 fi
10926
10927
10928 case ${build_alias} in
10929 "") build_noncanonical=${build} ;;
10930 *) build_noncanonical=${build_alias} ;;
10931 esac
10932
10933 case ${host_alias} in
10934 "") host_noncanonical=${build_noncanonical} ;;
10935 *) host_noncanonical=${host_alias} ;;
10936 esac
10937
10938 case ${target_alias} in
10939 "") target_noncanonical=${host_noncanonical} ;;
10940 *) target_noncanonical=${target_alias} ;;
10941 esac
10942
10943
10944
10945
10946
10947
10948 # Dependency checking.
10949 rm -rf .tst 2>/dev/null
10950 mkdir .tst 2>/dev/null
10951 if test -d .tst; then
10952 am__leading_dot=.
10953 else
10954 am__leading_dot=_
10955 fi
10956 rmdir .tst 2>/dev/null
10957
10958 DEPDIR="${am__leading_dot}deps"
10959
10960 ac_config_commands="$ac_config_commands depdir"
10961
10962
10963
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
10965 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
10966 set x ${MAKE-make}
10967 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
10968 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
10969 $as_echo_n "(cached) " >&6
10970 else
10971 cat >conftest.make <<\_ACEOF
10972 SHELL = /bin/sh
10973 all:
10974 @echo '@@@%%%=$(MAKE)=@@@%%%'
10975 _ACEOF
10976 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
10977 case `${MAKE-make} -f conftest.make 2>/dev/null` in
10978 *@@@%%%=?*=@@@%%%*)
10979 eval ac_cv_prog_make_${ac_make}_set=yes;;
10980 *)
10981 eval ac_cv_prog_make_${ac_make}_set=no;;
10982 esac
10983 rm -f conftest.make
10984 fi
10985 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10987 $as_echo "yes" >&6; }
10988 SET_MAKE=
10989 else
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10991 $as_echo "no" >&6; }
10992 SET_MAKE="MAKE=${MAKE-make}"
10993 fi
10994
10995
10996 MKINSTALLDIRS=
10997 if test -n "$ac_aux_dir"; then
10998 case "$ac_aux_dir" in
10999 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
11000 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
11001 esac
11002 fi
11003 if test -z "$MKINSTALLDIRS"; then
11004 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
11005 fi
11006
11007
11008
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
11010 $as_echo_n "checking whether NLS is requested... " >&6; }
11011 # Check whether --enable-nls was given.
11012 if test "${enable_nls+set}" = set; then :
11013 enableval=$enable_nls; USE_NLS=$enableval
11014 else
11015 USE_NLS=yes
11016 fi
11017
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
11019 $as_echo "$USE_NLS" >&6; }
11020
11021
11022
11023
11024
11025
11026 # Prepare PATH_SEPARATOR.
11027 # The user is always right.
11028 if test "${PATH_SEPARATOR+set}" != set; then
11029 echo "#! /bin/sh" >conf$$.sh
11030 echo "exit 0" >>conf$$.sh
11031 chmod +x conf$$.sh
11032 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11033 PATH_SEPARATOR=';'
11034 else
11035 PATH_SEPARATOR=:
11036 fi
11037 rm -f conf$$.sh
11038 fi
11039
11040 # Find out how to test for executable files. Don't use a zero-byte file,
11041 # as systems may use methods other than mode bits to determine executability.
11042 cat >conf$$.file <<_ASEOF
11043 #! /bin/sh
11044 exit 0
11045 _ASEOF
11046 chmod +x conf$$.file
11047 if test -x conf$$.file >/dev/null 2>&1; then
11048 ac_executable_p="test -x"
11049 else
11050 ac_executable_p="test -f"
11051 fi
11052 rm -f conf$$.file
11053
11054 # Extract the first word of "msgfmt", so it can be a program name with args.
11055 set dummy msgfmt; ac_word=$2
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11057 $as_echo_n "checking for $ac_word... " >&6; }
11058 if ${ac_cv_path_MSGFMT+:} false; then :
11059 $as_echo_n "(cached) " >&6
11060 else
11061 case "$MSGFMT" in
11062 [\\/]* | ?:[\\/]*)
11063 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
11064 ;;
11065 *)
11066 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11067 for ac_dir in $PATH; do
11068 IFS="$ac_save_IFS"
11069 test -z "$ac_dir" && ac_dir=.
11070 for ac_exec_ext in '' $ac_executable_extensions; do
11071 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11072 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
11073 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11074 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
11075 break 2
11076 fi
11077 fi
11078 done
11079 done
11080 IFS="$ac_save_IFS"
11081 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
11082 ;;
11083 esac
11084 fi
11085 MSGFMT="$ac_cv_path_MSGFMT"
11086 if test "$MSGFMT" != ":"; then
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
11088 $as_echo "$MSGFMT" >&6; }
11089 else
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091 $as_echo "no" >&6; }
11092 fi
11093
11094 # Extract the first word of "gmsgfmt", so it can be a program name with args.
11095 set dummy gmsgfmt; ac_word=$2
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11097 $as_echo_n "checking for $ac_word... " >&6; }
11098 if ${ac_cv_path_GMSGFMT+:} false; then :
11099 $as_echo_n "(cached) " >&6
11100 else
11101 case $GMSGFMT in
11102 [\\/]* | ?:[\\/]*)
11103 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
11104 ;;
11105 *)
11106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107 for as_dir in $PATH
11108 do
11109 IFS=$as_save_IFS
11110 test -z "$as_dir" && as_dir=.
11111 for ac_exec_ext in '' $ac_executable_extensions; do
11112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11113 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
11114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11115 break 2
11116 fi
11117 done
11118 done
11119 IFS=$as_save_IFS
11120
11121 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
11122 ;;
11123 esac
11124 fi
11125 GMSGFMT=$ac_cv_path_GMSGFMT
11126 if test -n "$GMSGFMT"; then
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
11128 $as_echo "$GMSGFMT" >&6; }
11129 else
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131 $as_echo "no" >&6; }
11132 fi
11133
11134
11135
11136
11137 # Prepare PATH_SEPARATOR.
11138 # The user is always right.
11139 if test "${PATH_SEPARATOR+set}" != set; then
11140 echo "#! /bin/sh" >conf$$.sh
11141 echo "exit 0" >>conf$$.sh
11142 chmod +x conf$$.sh
11143 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11144 PATH_SEPARATOR=';'
11145 else
11146 PATH_SEPARATOR=:
11147 fi
11148 rm -f conf$$.sh
11149 fi
11150
11151 # Find out how to test for executable files. Don't use a zero-byte file,
11152 # as systems may use methods other than mode bits to determine executability.
11153 cat >conf$$.file <<_ASEOF
11154 #! /bin/sh
11155 exit 0
11156 _ASEOF
11157 chmod +x conf$$.file
11158 if test -x conf$$.file >/dev/null 2>&1; then
11159 ac_executable_p="test -x"
11160 else
11161 ac_executable_p="test -f"
11162 fi
11163 rm -f conf$$.file
11164
11165 # Extract the first word of "xgettext", so it can be a program name with args.
11166 set dummy xgettext; ac_word=$2
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11168 $as_echo_n "checking for $ac_word... " >&6; }
11169 if ${ac_cv_path_XGETTEXT+:} false; then :
11170 $as_echo_n "(cached) " >&6
11171 else
11172 case "$XGETTEXT" in
11173 [\\/]* | ?:[\\/]*)
11174 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
11175 ;;
11176 *)
11177 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11178 for ac_dir in $PATH; do
11179 IFS="$ac_save_IFS"
11180 test -z "$ac_dir" && ac_dir=.
11181 for ac_exec_ext in '' $ac_executable_extensions; do
11182 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11183 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11184 (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
11185 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
11186 break 2
11187 fi
11188 fi
11189 done
11190 done
11191 IFS="$ac_save_IFS"
11192 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
11193 ;;
11194 esac
11195 fi
11196 XGETTEXT="$ac_cv_path_XGETTEXT"
11197 if test "$XGETTEXT" != ":"; then
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
11199 $as_echo "$XGETTEXT" >&6; }
11200 else
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202 $as_echo "no" >&6; }
11203 fi
11204
11205 rm -f messages.po
11206
11207
11208 # Prepare PATH_SEPARATOR.
11209 # The user is always right.
11210 if test "${PATH_SEPARATOR+set}" != set; then
11211 echo "#! /bin/sh" >conf$$.sh
11212 echo "exit 0" >>conf$$.sh
11213 chmod +x conf$$.sh
11214 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11215 PATH_SEPARATOR=';'
11216 else
11217 PATH_SEPARATOR=:
11218 fi
11219 rm -f conf$$.sh
11220 fi
11221
11222 # Find out how to test for executable files. Don't use a zero-byte file,
11223 # as systems may use methods other than mode bits to determine executability.
11224 cat >conf$$.file <<_ASEOF
11225 #! /bin/sh
11226 exit 0
11227 _ASEOF
11228 chmod +x conf$$.file
11229 if test -x conf$$.file >/dev/null 2>&1; then
11230 ac_executable_p="test -x"
11231 else
11232 ac_executable_p="test -f"
11233 fi
11234 rm -f conf$$.file
11235
11236 # Extract the first word of "msgmerge", so it can be a program name with args.
11237 set dummy msgmerge; ac_word=$2
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11239 $as_echo_n "checking for $ac_word... " >&6; }
11240 if ${ac_cv_path_MSGMERGE+:} false; then :
11241 $as_echo_n "(cached) " >&6
11242 else
11243 case "$MSGMERGE" in
11244 [\\/]* | ?:[\\/]*)
11245 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
11246 ;;
11247 *)
11248 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11249 for ac_dir in $PATH; do
11250 IFS="$ac_save_IFS"
11251 test -z "$ac_dir" && ac_dir=.
11252 for ac_exec_ext in '' $ac_executable_extensions; do
11253 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11254 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
11255 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
11256 break 2
11257 fi
11258 fi
11259 done
11260 done
11261 IFS="$ac_save_IFS"
11262 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
11263 ;;
11264 esac
11265 fi
11266 MSGMERGE="$ac_cv_path_MSGMERGE"
11267 if test "$MSGMERGE" != ":"; then
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
11269 $as_echo "$MSGMERGE" >&6; }
11270 else
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272 $as_echo "no" >&6; }
11273 fi
11274
11275
11276 if test "$GMSGFMT" != ":"; then
11277 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
11278 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11279 : ;
11280 else
11281 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
11283 $as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
11284 GMSGFMT=":"
11285 fi
11286 fi
11287
11288 if test "$XGETTEXT" != ":"; then
11289 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11290 (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
11291 : ;
11292 else
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
11294 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
11295 XGETTEXT=":"
11296 fi
11297 rm -f messages.po
11298 fi
11299
11300 ac_config_commands="$ac_config_commands default-1"
11301
11302
11303
11304
11305
11306
11307
11308
11309 use_additional=yes
11310
11311 acl_save_prefix="$prefix"
11312 prefix="$acl_final_prefix"
11313 acl_save_exec_prefix="$exec_prefix"
11314 exec_prefix="$acl_final_exec_prefix"
11315
11316 eval additional_includedir=\"$includedir\"
11317 eval additional_libdir=\"$libdir\"
11318
11319 exec_prefix="$acl_save_exec_prefix"
11320 prefix="$acl_save_prefix"
11321
11322
11323 # Check whether --with-libiconv-prefix was given.
11324 if test "${with_libiconv_prefix+set}" = set; then :
11325 withval=$with_libiconv_prefix;
11326 if test "X$withval" = "Xno"; then
11327 use_additional=no
11328 else
11329 if test "X$withval" = "X"; then
11330
11331 acl_save_prefix="$prefix"
11332 prefix="$acl_final_prefix"
11333 acl_save_exec_prefix="$exec_prefix"
11334 exec_prefix="$acl_final_exec_prefix"
11335
11336 eval additional_includedir=\"$includedir\"
11337 eval additional_libdir=\"$libdir\"
11338
11339 exec_prefix="$acl_save_exec_prefix"
11340 prefix="$acl_save_prefix"
11341
11342 else
11343 additional_includedir="$withval/include"
11344 additional_libdir="$withval/lib"
11345 fi
11346 fi
11347
11348 fi
11349
11350
11351 # Check whether --with-libiconv-type was given.
11352 if test "${with_libiconv_type+set}" = set; then :
11353 withval=$with_libiconv_type; with_libiconv_type=$withval
11354 else
11355 with_libiconv_type=auto
11356 fi
11357
11358 lib_type=`eval echo \$with_libiconv_type`
11359
11360 LIBICONV=
11361 LTLIBICONV=
11362 INCICONV=
11363 rpathdirs=
11364 ltrpathdirs=
11365 names_already_handled=
11366 names_next_round='iconv '
11367 while test -n "$names_next_round"; do
11368 names_this_round="$names_next_round"
11369 names_next_round=
11370 for name in $names_this_round; do
11371 already_handled=
11372 for n in $names_already_handled; do
11373 if test "$n" = "$name"; then
11374 already_handled=yes
11375 break
11376 fi
11377 done
11378 if test -z "$already_handled"; then
11379 names_already_handled="$names_already_handled $name"
11380 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11381 eval value=\"\$HAVE_LIB$uppername\"
11382 if test -n "$value"; then
11383 if test "$value" = yes; then
11384 eval value=\"\$LIB$uppername\"
11385 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11386 eval value=\"\$LTLIB$uppername\"
11387 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11388 else
11389 :
11390 fi
11391 else
11392 found_dir=
11393 found_la=
11394 found_so=
11395 found_a=
11396 if test $use_additional = yes; then
11397 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11398 found_dir="$additional_libdir"
11399 found_so="$additional_libdir/lib$name.$shlibext"
11400 if test -f "$additional_libdir/lib$name.la"; then
11401 found_la="$additional_libdir/lib$name.la"
11402 fi
11403 elif test x$lib_type != xshared; then
11404 if test -f "$additional_libdir/lib$name.$libext"; then
11405 found_dir="$additional_libdir"
11406 found_a="$additional_libdir/lib$name.$libext"
11407 if test -f "$additional_libdir/lib$name.la"; then
11408 found_la="$additional_libdir/lib$name.la"
11409 fi
11410 fi
11411 fi
11412 fi
11413 if test "X$found_dir" = "X"; then
11414 for x in $LDFLAGS $LTLIBICONV; do
11415
11416 acl_save_prefix="$prefix"
11417 prefix="$acl_final_prefix"
11418 acl_save_exec_prefix="$exec_prefix"
11419 exec_prefix="$acl_final_exec_prefix"
11420 eval x=\"$x\"
11421 exec_prefix="$acl_save_exec_prefix"
11422 prefix="$acl_save_prefix"
11423
11424 case "$x" in
11425 -L*)
11426 dir=`echo "X$x" | sed -e 's/^X-L//'`
11427 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11428 found_dir="$dir"
11429 found_so="$dir/lib$name.$shlibext"
11430 if test -f "$dir/lib$name.la"; then
11431 found_la="$dir/lib$name.la"
11432 fi
11433 elif test x$lib_type != xshared; then
11434 if test -f "$dir/lib$name.$libext"; then
11435 found_dir="$dir"
11436 found_a="$dir/lib$name.$libext"
11437 if test -f "$dir/lib$name.la"; then
11438 found_la="$dir/lib$name.la"
11439 fi
11440 fi
11441 fi
11442 ;;
11443 esac
11444 if test "X$found_dir" != "X"; then
11445 break
11446 fi
11447 done
11448 fi
11449 if test "X$found_dir" != "X"; then
11450 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11451 if test "X$found_so" != "X"; then
11452 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11453 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11454 else
11455 haveit=
11456 for x in $ltrpathdirs; do
11457 if test "X$x" = "X$found_dir"; then
11458 haveit=yes
11459 break
11460 fi
11461 done
11462 if test -z "$haveit"; then
11463 ltrpathdirs="$ltrpathdirs $found_dir"
11464 fi
11465 if test "$hardcode_direct" = yes; then
11466 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11467 else
11468 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11469 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11470 haveit=
11471 for x in $rpathdirs; do
11472 if test "X$x" = "X$found_dir"; then
11473 haveit=yes
11474 break
11475 fi
11476 done
11477 if test -z "$haveit"; then
11478 rpathdirs="$rpathdirs $found_dir"
11479 fi
11480 else
11481 haveit=
11482 for x in $LDFLAGS $LIBICONV; do
11483
11484 acl_save_prefix="$prefix"
11485 prefix="$acl_final_prefix"
11486 acl_save_exec_prefix="$exec_prefix"
11487 exec_prefix="$acl_final_exec_prefix"
11488 eval x=\"$x\"
11489 exec_prefix="$acl_save_exec_prefix"
11490 prefix="$acl_save_prefix"
11491
11492 if test "X$x" = "X-L$found_dir"; then
11493 haveit=yes
11494 break
11495 fi
11496 done
11497 if test -z "$haveit"; then
11498 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11499 fi
11500 if test "$hardcode_minus_L" != no; then
11501 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11502 else
11503 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11504 fi
11505 fi
11506 fi
11507 fi
11508 else
11509 if test "X$found_a" != "X"; then
11510 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11511 else
11512 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11513 fi
11514 fi
11515 additional_includedir=
11516 case "$found_dir" in
11517 */lib | */lib/)
11518 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11519 additional_includedir="$basedir/include"
11520 ;;
11521 esac
11522 if test "X$additional_includedir" != "X"; then
11523 if test "X$additional_includedir" != "X/usr/include"; then
11524 haveit=
11525 if test "X$additional_includedir" = "X/usr/local/include"; then
11526 if test -n "$GCC"; then
11527 case $host_os in
11528 linux*) haveit=yes;;
11529 esac
11530 fi
11531 fi
11532 if test -z "$haveit"; then
11533 for x in $CPPFLAGS $INCICONV; do
11534
11535 acl_save_prefix="$prefix"
11536 prefix="$acl_final_prefix"
11537 acl_save_exec_prefix="$exec_prefix"
11538 exec_prefix="$acl_final_exec_prefix"
11539 eval x=\"$x\"
11540 exec_prefix="$acl_save_exec_prefix"
11541 prefix="$acl_save_prefix"
11542
11543 if test "X$x" = "X-I$additional_includedir"; then
11544 haveit=yes
11545 break
11546 fi
11547 done
11548 if test -z "$haveit"; then
11549 if test -d "$additional_includedir"; then
11550 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11551 fi
11552 fi
11553 fi
11554 fi
11555 fi
11556 if test -n "$found_la"; then
11557 save_libdir="$libdir"
11558 case "$found_la" in
11559 */* | *\\*) . "$found_la" ;;
11560 *) . "./$found_la" ;;
11561 esac
11562 libdir="$save_libdir"
11563 for dep in $dependency_libs; do
11564 case "$dep" in
11565 -L*)
11566 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11567 if test "X$additional_libdir" != "X/usr/lib"; then
11568 haveit=
11569 if test "X$additional_libdir" = "X/usr/local/lib"; then
11570 if test -n "$GCC"; then
11571 case $host_os in
11572 linux*) haveit=yes;;
11573 esac
11574 fi
11575 fi
11576 if test -z "$haveit"; then
11577 haveit=
11578 for x in $LDFLAGS $LIBICONV; do
11579
11580 acl_save_prefix="$prefix"
11581 prefix="$acl_final_prefix"
11582 acl_save_exec_prefix="$exec_prefix"
11583 exec_prefix="$acl_final_exec_prefix"
11584 eval x=\"$x\"
11585 exec_prefix="$acl_save_exec_prefix"
11586 prefix="$acl_save_prefix"
11587
11588 if test "X$x" = "X-L$additional_libdir"; then
11589 haveit=yes
11590 break
11591 fi
11592 done
11593 if test -z "$haveit"; then
11594 if test -d "$additional_libdir"; then
11595 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11596 fi
11597 fi
11598 haveit=
11599 for x in $LDFLAGS $LTLIBICONV; do
11600
11601 acl_save_prefix="$prefix"
11602 prefix="$acl_final_prefix"
11603 acl_save_exec_prefix="$exec_prefix"
11604 exec_prefix="$acl_final_exec_prefix"
11605 eval x=\"$x\"
11606 exec_prefix="$acl_save_exec_prefix"
11607 prefix="$acl_save_prefix"
11608
11609 if test "X$x" = "X-L$additional_libdir"; then
11610 haveit=yes
11611 break
11612 fi
11613 done
11614 if test -z "$haveit"; then
11615 if test -d "$additional_libdir"; then
11616 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11617 fi
11618 fi
11619 fi
11620 fi
11621 ;;
11622 -R*)
11623 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11624 if test "$enable_rpath" != no; then
11625 haveit=
11626 for x in $rpathdirs; do
11627 if test "X$x" = "X$dir"; then
11628 haveit=yes
11629 break
11630 fi
11631 done
11632 if test -z "$haveit"; then
11633 rpathdirs="$rpathdirs $dir"
11634 fi
11635 haveit=
11636 for x in $ltrpathdirs; do
11637 if test "X$x" = "X$dir"; then
11638 haveit=yes
11639 break
11640 fi
11641 done
11642 if test -z "$haveit"; then
11643 ltrpathdirs="$ltrpathdirs $dir"
11644 fi
11645 fi
11646 ;;
11647 -l*)
11648 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11649 ;;
11650 *.la)
11651 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11652 ;;
11653 *)
11654 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11655 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11656 ;;
11657 esac
11658 done
11659 fi
11660 else
11661 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
11662 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11663 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11664 else
11665 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
11666 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
11667 fi
11668 fi
11669 fi
11670 fi
11671 done
11672 done
11673 if test "X$rpathdirs" != "X"; then
11674 if test -n "$hardcode_libdir_separator"; then
11675 alldirs=
11676 for found_dir in $rpathdirs; do
11677 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11678 done
11679 acl_save_libdir="$libdir"
11680 libdir="$alldirs"
11681 eval flag=\"$hardcode_libdir_flag_spec\"
11682 libdir="$acl_save_libdir"
11683 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11684 else
11685 for found_dir in $rpathdirs; do
11686 acl_save_libdir="$libdir"
11687 libdir="$found_dir"
11688 eval flag=\"$hardcode_libdir_flag_spec\"
11689 libdir="$acl_save_libdir"
11690 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11691 done
11692 fi
11693 fi
11694 if test "X$ltrpathdirs" != "X"; then
11695 for found_dir in $ltrpathdirs; do
11696 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11697 done
11698 fi
11699
11700
11701
11702
11703
11704 if test -f ../gettext/uninstalled-config.sh; then
11705 relative_builddir='$(top_builddir)/../gettext'
11706 . ../gettext/uninstalled-config.sh
11707 else
11708 # The sister gettext directory doesn't exist and won't collect information on
11709 # using gettext for us. Call a bundled AM_GNU_GETTEXT.
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11734 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
11735 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
11736 $as_echo_n "(cached) " >&6
11737 else
11738 gt_save_LIBS="$LIBS"
11739 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11741 /* end confdefs.h. */
11742 #include <CoreFoundation/CFPreferences.h>
11743 int
11744 main ()
11745 {
11746 CFPreferencesCopyAppValue(NULL, NULL)
11747 ;
11748 return 0;
11749 }
11750 _ACEOF
11751 if ac_fn_c_try_link "$LINENO"; then :
11752 gt_cv_func_CFPreferencesCopyAppValue=yes
11753 else
11754 gt_cv_func_CFPreferencesCopyAppValue=no
11755 fi
11756 rm -f core conftest.err conftest.$ac_objext \
11757 conftest$ac_exeext conftest.$ac_ext
11758 LIBS="$gt_save_LIBS"
11759 fi
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11761 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11762 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11763
11764 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
11765
11766 fi
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
11768 $as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
11769 if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
11770 $as_echo_n "(cached) " >&6
11771 else
11772 gt_save_LIBS="$LIBS"
11773 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775 /* end confdefs.h. */
11776 #include <CoreFoundation/CFLocale.h>
11777 int
11778 main ()
11779 {
11780 CFLocaleCopyPreferredLanguages();
11781 ;
11782 return 0;
11783 }
11784 _ACEOF
11785 if ac_fn_c_try_link "$LINENO"; then :
11786 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
11787 else
11788 gt_cv_func_CFLocaleCopyPreferredLanguages=no
11789 fi
11790 rm -f core conftest.err conftest.$ac_objext \
11791 conftest$ac_exeext conftest.$ac_ext
11792 LIBS="$gt_save_LIBS"
11793 fi
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
11795 $as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
11796 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
11797
11798 $as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
11799
11800 fi
11801 INTL_MACOSX_LIBS=
11802 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
11803 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
11804 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
11805 fi
11806
11807
11808
11809
11810
11811
11812 LIBINTL=
11813 LTLIBINTL=
11814 POSUB=
11815
11816 case " $gt_needs " in
11817 *" need-formatstring-macros "*) gt_api_version=3 ;;
11818 *" need-ngettext "*) gt_api_version=2 ;;
11819 *) gt_api_version=1 ;;
11820 esac
11821 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
11822 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
11823
11824 if test "$USE_NLS" = "yes"; then
11825 gt_use_preinstalled_gnugettext=no
11826
11827
11828 if test $gt_api_version -ge 3; then
11829 gt_revision_test_code='
11830 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
11831 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
11832 #endif
11833 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
11834 '
11835 else
11836 gt_revision_test_code=
11837 fi
11838 if test $gt_api_version -ge 2; then
11839 gt_expression_test_code=' + * ngettext ("", "", 0)'
11840 else
11841 gt_expression_test_code=
11842 fi
11843
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
11845 $as_echo_n "checking for GNU gettext in libc... " >&6; }
11846 if eval \${$gt_func_gnugettext_libc+:} false; then :
11847 $as_echo_n "(cached) " >&6
11848 else
11849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11850 /* end confdefs.h. */
11851
11852 #include <libintl.h>
11853 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
11854 extern int _nl_msg_cat_cntr;
11855 extern int *_nl_domain_bindings;
11856 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
11857 #else
11858 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
11859 #endif
11860 $gt_revision_test_code
11861
11862 int
11863 main ()
11864 {
11865
11866 bindtextdomain ("", "");
11867 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
11868
11869 ;
11870 return 0;
11871 }
11872 _ACEOF
11873 if ac_fn_c_try_link "$LINENO"; then :
11874 eval "$gt_func_gnugettext_libc=yes"
11875 else
11876 eval "$gt_func_gnugettext_libc=no"
11877 fi
11878 rm -f core conftest.err conftest.$ac_objext \
11879 conftest$ac_exeext conftest.$ac_ext
11880 fi
11881 eval ac_res=\$$gt_func_gnugettext_libc
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11883 $as_echo "$ac_res" >&6; }
11884
11885 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
11886
11887
11888
11889
11890
11891 am_save_CPPFLAGS="$CPPFLAGS"
11892
11893 for element in $INCICONV; do
11894 haveit=
11895 for x in $CPPFLAGS; do
11896
11897 acl_save_prefix="$prefix"
11898 prefix="$acl_final_prefix"
11899 acl_save_exec_prefix="$exec_prefix"
11900 exec_prefix="$acl_final_exec_prefix"
11901 eval x=\"$x\"
11902 exec_prefix="$acl_save_exec_prefix"
11903 prefix="$acl_save_prefix"
11904
11905 if test "X$x" = "X$element"; then
11906 haveit=yes
11907 break
11908 fi
11909 done
11910 if test -z "$haveit"; then
11911 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11912 fi
11913 done
11914
11915
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
11917 $as_echo_n "checking for iconv... " >&6; }
11918 if ${am_cv_func_iconv+:} false; then :
11919 $as_echo_n "(cached) " >&6
11920 else
11921
11922 am_cv_func_iconv="no, consider installing GNU libiconv"
11923 am_cv_lib_iconv=no
11924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11925 /* end confdefs.h. */
11926
11927 #include <stdlib.h>
11928 #include <iconv.h>
11929
11930 int
11931 main ()
11932 {
11933 iconv_t cd = iconv_open("","");
11934 iconv(cd,NULL,NULL,NULL,NULL);
11935 iconv_close(cd);
11936 ;
11937 return 0;
11938 }
11939 _ACEOF
11940 if ac_fn_c_try_link "$LINENO"; then :
11941 am_cv_func_iconv=yes
11942 fi
11943 rm -f core conftest.err conftest.$ac_objext \
11944 conftest$ac_exeext conftest.$ac_ext
11945 if test "$am_cv_func_iconv" != yes; then
11946 am_save_LIBS="$LIBS"
11947 LIBS="$LIBS $LIBICONV"
11948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11949 /* end confdefs.h. */
11950
11951 #include <stdlib.h>
11952 #include <iconv.h>
11953
11954 int
11955 main ()
11956 {
11957 iconv_t cd = iconv_open("","");
11958 iconv(cd,NULL,NULL,NULL,NULL);
11959 iconv_close(cd);
11960 ;
11961 return 0;
11962 }
11963 _ACEOF
11964 if ac_fn_c_try_link "$LINENO"; then :
11965 am_cv_lib_iconv=yes
11966 am_cv_func_iconv=yes
11967 fi
11968 rm -f core conftest.err conftest.$ac_objext \
11969 conftest$ac_exeext conftest.$ac_ext
11970 LIBS="$am_save_LIBS"
11971 fi
11972
11973 fi
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
11975 $as_echo "$am_cv_func_iconv" >&6; }
11976 if test "$am_cv_func_iconv" = yes; then
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
11978 $as_echo_n "checking for working iconv... " >&6; }
11979 if ${am_cv_func_iconv_works+:} false; then :
11980 $as_echo_n "(cached) " >&6
11981 else
11982
11983 am_save_LIBS="$LIBS"
11984 if test $am_cv_lib_iconv = yes; then
11985 LIBS="$LIBS $LIBICONV"
11986 fi
11987 am_cv_func_iconv_works=no
11988 for ac_iconv_const in '' 'const'; do
11989 if test "$cross_compiling" = yes; then :
11990 case "$host_os" in
11991 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
11992 *) am_cv_func_iconv_works="guessing yes" ;;
11993 esac
11994 else
11995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11996 /* end confdefs.h. */
11997
11998 #include <iconv.h>
11999 #include <string.h>
12000
12001 #ifndef ICONV_CONST
12002 # define ICONV_CONST $ac_iconv_const
12003 #endif
12004
12005 int
12006 main ()
12007 {
12008 int result = 0;
12009 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
12010 successful returns. This is even documented in
12011 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
12012 {
12013 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12014 if (cd_utf8_to_88591 != (iconv_t)(-1))
12015 {
12016 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12017 char buf[10];
12018 ICONV_CONST char *inptr = input;
12019 size_t inbytesleft = strlen (input);
12020 char *outptr = buf;
12021 size_t outbytesleft = sizeof (buf);
12022 size_t res = iconv (cd_utf8_to_88591,
12023 &inptr, &inbytesleft,
12024 &outptr, &outbytesleft);
12025 if (res == 0)
12026 result |= 1;
12027 iconv_close (cd_utf8_to_88591);
12028 }
12029 }
12030 /* Test against Solaris 10 bug: Failures are not distinguishable from
12031 successful returns. */
12032 {
12033 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12034 if (cd_ascii_to_88591 != (iconv_t)(-1))
12035 {
12036 static ICONV_CONST char input[] = "\263";
12037 char buf[10];
12038 ICONV_CONST char *inptr = input;
12039 size_t inbytesleft = strlen (input);
12040 char *outptr = buf;
12041 size_t outbytesleft = sizeof (buf);
12042 size_t res = iconv (cd_ascii_to_88591,
12043 &inptr, &inbytesleft,
12044 &outptr, &outbytesleft);
12045 if (res == 0)
12046 result |= 2;
12047 iconv_close (cd_ascii_to_88591);
12048 }
12049 }
12050 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
12051 {
12052 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12053 if (cd_88591_to_utf8 != (iconv_t)(-1))
12054 {
12055 static ICONV_CONST char input[] = "\304";
12056 static char buf[2] = { (char)0xDE, (char)0xAD };
12057 ICONV_CONST char *inptr = input;
12058 size_t inbytesleft = 1;
12059 char *outptr = buf;
12060 size_t outbytesleft = 1;
12061 size_t res = iconv (cd_88591_to_utf8,
12062 &inptr, &inbytesleft,
12063 &outptr, &outbytesleft);
12064 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12065 result |= 4;
12066 iconv_close (cd_88591_to_utf8);
12067 }
12068 }
12069 #if 0 /* This bug could be worked around by the caller. */
12070 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
12071 {
12072 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12073 if (cd_88591_to_utf8 != (iconv_t)(-1))
12074 {
12075 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12076 char buf[50];
12077 ICONV_CONST char *inptr = input;
12078 size_t inbytesleft = strlen (input);
12079 char *outptr = buf;
12080 size_t outbytesleft = sizeof (buf);
12081 size_t res = iconv (cd_88591_to_utf8,
12082 &inptr, &inbytesleft,
12083 &outptr, &outbytesleft);
12084 if ((int)res > 0)
12085 result |= 8;
12086 iconv_close (cd_88591_to_utf8);
12087 }
12088 }
12089 #endif
12090 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12091 provided. */
12092 {
12093 /* Try standardized names. */
12094 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12095 /* Try IRIX, OSF/1 names. */
12096 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12097 /* Try AIX names. */
12098 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12099 /* Try HP-UX names. */
12100 iconv_t cd4 = iconv_open ("utf8", "eucJP");
12101 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12102 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12103 result |= 16;
12104 if (cd1 != (iconv_t)(-1))
12105 iconv_close (cd1);
12106 if (cd2 != (iconv_t)(-1))
12107 iconv_close (cd2);
12108 if (cd3 != (iconv_t)(-1))
12109 iconv_close (cd3);
12110 if (cd4 != (iconv_t)(-1))
12111 iconv_close (cd4);
12112 }
12113 return result;
12114
12115 ;
12116 return 0;
12117 }
12118 _ACEOF
12119 if ac_fn_c_try_run "$LINENO"; then :
12120 am_cv_func_iconv_works=yes
12121 fi
12122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12123 conftest.$ac_objext conftest.beam conftest.$ac_ext
12124 fi
12125
12126 test "$am_cv_func_iconv_works" = no || break
12127 done
12128 LIBS="$am_save_LIBS"
12129
12130 fi
12131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12132 $as_echo "$am_cv_func_iconv_works" >&6; }
12133 case "$am_cv_func_iconv_works" in
12134 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12135 *) am_func_iconv=yes ;;
12136 esac
12137 else
12138 am_func_iconv=no am_cv_lib_iconv=no
12139 fi
12140 if test "$am_func_iconv" = yes; then
12141
12142 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
12143
12144 fi
12145 if test "$am_cv_lib_iconv" = yes; then
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12147 $as_echo_n "checking how to link with libiconv... " >&6; }
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12149 $as_echo "$LIBICONV" >&6; }
12150 else
12151 CPPFLAGS="$am_save_CPPFLAGS"
12152 LIBICONV=
12153 LTLIBICONV=
12154 fi
12155
12156
12157
12158
12159
12160
12161 use_additional=yes
12162
12163 acl_save_prefix="$prefix"
12164 prefix="$acl_final_prefix"
12165 acl_save_exec_prefix="$exec_prefix"
12166 exec_prefix="$acl_final_exec_prefix"
12167
12168 eval additional_includedir=\"$includedir\"
12169 eval additional_libdir=\"$libdir\"
12170
12171 exec_prefix="$acl_save_exec_prefix"
12172 prefix="$acl_save_prefix"
12173
12174
12175 # Check whether --with-libintl-prefix was given.
12176 if test "${with_libintl_prefix+set}" = set; then :
12177 withval=$with_libintl_prefix;
12178 if test "X$withval" = "Xno"; then
12179 use_additional=no
12180 else
12181 if test "X$withval" = "X"; then
12182
12183 acl_save_prefix="$prefix"
12184 prefix="$acl_final_prefix"
12185 acl_save_exec_prefix="$exec_prefix"
12186 exec_prefix="$acl_final_exec_prefix"
12187
12188 eval additional_includedir=\"$includedir\"
12189 eval additional_libdir=\"$libdir\"
12190
12191 exec_prefix="$acl_save_exec_prefix"
12192 prefix="$acl_save_prefix"
12193
12194 else
12195 additional_includedir="$withval/include"
12196 additional_libdir="$withval/lib"
12197 fi
12198 fi
12199
12200 fi
12201
12202
12203 # Check whether --with-libintl-type was given.
12204 if test "${with_libintl_type+set}" = set; then :
12205 withval=$with_libintl_type; with_libintl_type=$withval
12206 else
12207 with_libintl_type=auto
12208 fi
12209
12210 lib_type=`eval echo \$with_libintl_type`
12211
12212 LIBINTL=
12213 LTLIBINTL=
12214 INCINTL=
12215 rpathdirs=
12216 ltrpathdirs=
12217 names_already_handled=
12218 names_next_round='intl '
12219 while test -n "$names_next_round"; do
12220 names_this_round="$names_next_round"
12221 names_next_round=
12222 for name in $names_this_round; do
12223 already_handled=
12224 for n in $names_already_handled; do
12225 if test "$n" = "$name"; then
12226 already_handled=yes
12227 break
12228 fi
12229 done
12230 if test -z "$already_handled"; then
12231 names_already_handled="$names_already_handled $name"
12232 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12233 eval value=\"\$HAVE_LIB$uppername\"
12234 if test -n "$value"; then
12235 if test "$value" = yes; then
12236 eval value=\"\$LIB$uppername\"
12237 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12238 eval value=\"\$LTLIB$uppername\"
12239 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12240 else
12241 :
12242 fi
12243 else
12244 found_dir=
12245 found_la=
12246 found_so=
12247 found_a=
12248 if test $use_additional = yes; then
12249 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12250 found_dir="$additional_libdir"
12251 found_so="$additional_libdir/lib$name.$shlibext"
12252 if test -f "$additional_libdir/lib$name.la"; then
12253 found_la="$additional_libdir/lib$name.la"
12254 fi
12255 elif test x$lib_type != xshared; then
12256 if test -f "$additional_libdir/lib$name.$libext"; then
12257 found_dir="$additional_libdir"
12258 found_a="$additional_libdir/lib$name.$libext"
12259 if test -f "$additional_libdir/lib$name.la"; then
12260 found_la="$additional_libdir/lib$name.la"
12261 fi
12262 fi
12263 fi
12264 fi
12265 if test "X$found_dir" = "X"; then
12266 for x in $LDFLAGS $LTLIBINTL; do
12267
12268 acl_save_prefix="$prefix"
12269 prefix="$acl_final_prefix"
12270 acl_save_exec_prefix="$exec_prefix"
12271 exec_prefix="$acl_final_exec_prefix"
12272 eval x=\"$x\"
12273 exec_prefix="$acl_save_exec_prefix"
12274 prefix="$acl_save_prefix"
12275
12276 case "$x" in
12277 -L*)
12278 dir=`echo "X$x" | sed -e 's/^X-L//'`
12279 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12280 found_dir="$dir"
12281 found_so="$dir/lib$name.$shlibext"
12282 if test -f "$dir/lib$name.la"; then
12283 found_la="$dir/lib$name.la"
12284 fi
12285 elif test x$lib_type != xshared; then
12286 if test -f "$dir/lib$name.$libext"; then
12287 found_dir="$dir"
12288 found_a="$dir/lib$name.$libext"
12289 if test -f "$dir/lib$name.la"; then
12290 found_la="$dir/lib$name.la"
12291 fi
12292 fi
12293 fi
12294 ;;
12295 esac
12296 if test "X$found_dir" != "X"; then
12297 break
12298 fi
12299 done
12300 fi
12301 if test "X$found_dir" != "X"; then
12302 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12303 if test "X$found_so" != "X"; then
12304 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12305 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12306 else
12307 haveit=
12308 for x in $ltrpathdirs; do
12309 if test "X$x" = "X$found_dir"; then
12310 haveit=yes
12311 break
12312 fi
12313 done
12314 if test -z "$haveit"; then
12315 ltrpathdirs="$ltrpathdirs $found_dir"
12316 fi
12317 if test "$hardcode_direct" = yes; then
12318 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12319 else
12320 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12321 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12322 haveit=
12323 for x in $rpathdirs; do
12324 if test "X$x" = "X$found_dir"; then
12325 haveit=yes
12326 break
12327 fi
12328 done
12329 if test -z "$haveit"; then
12330 rpathdirs="$rpathdirs $found_dir"
12331 fi
12332 else
12333 haveit=
12334 for x in $LDFLAGS $LIBINTL; do
12335
12336 acl_save_prefix="$prefix"
12337 prefix="$acl_final_prefix"
12338 acl_save_exec_prefix="$exec_prefix"
12339 exec_prefix="$acl_final_exec_prefix"
12340 eval x=\"$x\"
12341 exec_prefix="$acl_save_exec_prefix"
12342 prefix="$acl_save_prefix"
12343
12344 if test "X$x" = "X-L$found_dir"; then
12345 haveit=yes
12346 break
12347 fi
12348 done
12349 if test -z "$haveit"; then
12350 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12351 fi
12352 if test "$hardcode_minus_L" != no; then
12353 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12354 else
12355 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12356 fi
12357 fi
12358 fi
12359 fi
12360 else
12361 if test "X$found_a" != "X"; then
12362 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12363 else
12364 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12365 fi
12366 fi
12367 additional_includedir=
12368 case "$found_dir" in
12369 */lib | */lib/)
12370 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12371 additional_includedir="$basedir/include"
12372 ;;
12373 esac
12374 if test "X$additional_includedir" != "X"; then
12375 if test "X$additional_includedir" != "X/usr/include"; then
12376 haveit=
12377 if test "X$additional_includedir" = "X/usr/local/include"; then
12378 if test -n "$GCC"; then
12379 case $host_os in
12380 linux*) haveit=yes;;
12381 esac
12382 fi
12383 fi
12384 if test -z "$haveit"; then
12385 for x in $CPPFLAGS $INCINTL; do
12386
12387 acl_save_prefix="$prefix"
12388 prefix="$acl_final_prefix"
12389 acl_save_exec_prefix="$exec_prefix"
12390 exec_prefix="$acl_final_exec_prefix"
12391 eval x=\"$x\"
12392 exec_prefix="$acl_save_exec_prefix"
12393 prefix="$acl_save_prefix"
12394
12395 if test "X$x" = "X-I$additional_includedir"; then
12396 haveit=yes
12397 break
12398 fi
12399 done
12400 if test -z "$haveit"; then
12401 if test -d "$additional_includedir"; then
12402 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
12403 fi
12404 fi
12405 fi
12406 fi
12407 fi
12408 if test -n "$found_la"; then
12409 save_libdir="$libdir"
12410 case "$found_la" in
12411 */* | *\\*) . "$found_la" ;;
12412 *) . "./$found_la" ;;
12413 esac
12414 libdir="$save_libdir"
12415 for dep in $dependency_libs; do
12416 case "$dep" in
12417 -L*)
12418 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12419 if test "X$additional_libdir" != "X/usr/lib"; then
12420 haveit=
12421 if test "X$additional_libdir" = "X/usr/local/lib"; then
12422 if test -n "$GCC"; then
12423 case $host_os in
12424 linux*) haveit=yes;;
12425 esac
12426 fi
12427 fi
12428 if test -z "$haveit"; then
12429 haveit=
12430 for x in $LDFLAGS $LIBINTL; do
12431
12432 acl_save_prefix="$prefix"
12433 prefix="$acl_final_prefix"
12434 acl_save_exec_prefix="$exec_prefix"
12435 exec_prefix="$acl_final_exec_prefix"
12436 eval x=\"$x\"
12437 exec_prefix="$acl_save_exec_prefix"
12438 prefix="$acl_save_prefix"
12439
12440 if test "X$x" = "X-L$additional_libdir"; then
12441 haveit=yes
12442 break
12443 fi
12444 done
12445 if test -z "$haveit"; then
12446 if test -d "$additional_libdir"; then
12447 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
12448 fi
12449 fi
12450 haveit=
12451 for x in $LDFLAGS $LTLIBINTL; do
12452
12453 acl_save_prefix="$prefix"
12454 prefix="$acl_final_prefix"
12455 acl_save_exec_prefix="$exec_prefix"
12456 exec_prefix="$acl_final_exec_prefix"
12457 eval x=\"$x\"
12458 exec_prefix="$acl_save_exec_prefix"
12459 prefix="$acl_save_prefix"
12460
12461 if test "X$x" = "X-L$additional_libdir"; then
12462 haveit=yes
12463 break
12464 fi
12465 done
12466 if test -z "$haveit"; then
12467 if test -d "$additional_libdir"; then
12468 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
12469 fi
12470 fi
12471 fi
12472 fi
12473 ;;
12474 -R*)
12475 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12476 if test "$enable_rpath" != no; then
12477 haveit=
12478 for x in $rpathdirs; do
12479 if test "X$x" = "X$dir"; then
12480 haveit=yes
12481 break
12482 fi
12483 done
12484 if test -z "$haveit"; then
12485 rpathdirs="$rpathdirs $dir"
12486 fi
12487 haveit=
12488 for x in $ltrpathdirs; do
12489 if test "X$x" = "X$dir"; then
12490 haveit=yes
12491 break
12492 fi
12493 done
12494 if test -z "$haveit"; then
12495 ltrpathdirs="$ltrpathdirs $dir"
12496 fi
12497 fi
12498 ;;
12499 -l*)
12500 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12501 ;;
12502 *.la)
12503 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12504 ;;
12505 *)
12506 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
12507 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
12508 ;;
12509 esac
12510 done
12511 fi
12512 else
12513 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
12514 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12515 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
12516 else
12517 LIBINTL="${LIBINTL}${LIBINTL:+ }-l:lib$name.$libext"
12518 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l:lib$name.$libext"
12519 fi
12520 fi
12521 fi
12522 fi
12523 done
12524 done
12525 if test "X$rpathdirs" != "X"; then
12526 if test -n "$hardcode_libdir_separator"; then
12527 alldirs=
12528 for found_dir in $rpathdirs; do
12529 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
12530 done
12531 acl_save_libdir="$libdir"
12532 libdir="$alldirs"
12533 eval flag=\"$hardcode_libdir_flag_spec\"
12534 libdir="$acl_save_libdir"
12535 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12536 else
12537 for found_dir in $rpathdirs; do
12538 acl_save_libdir="$libdir"
12539 libdir="$found_dir"
12540 eval flag=\"$hardcode_libdir_flag_spec\"
12541 libdir="$acl_save_libdir"
12542 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12543 done
12544 fi
12545 fi
12546 if test "X$ltrpathdirs" != "X"; then
12547 for found_dir in $ltrpathdirs; do
12548 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12549 done
12550 fi
12551
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12553 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
12554 if eval \${$gt_func_gnugettext_libintl+:} false; then :
12555 $as_echo_n "(cached) " >&6
12556 else
12557 gt_save_CPPFLAGS="$CPPFLAGS"
12558 CPPFLAGS="$CPPFLAGS $INCINTL"
12559 gt_save_LIBS="$LIBS"
12560 LIBS="$LIBS $LIBINTL"
12561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12562 /* end confdefs.h. */
12563
12564 #include <libintl.h>
12565 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12566 extern int _nl_msg_cat_cntr;
12567 extern
12568 #ifdef __cplusplus
12569 "C"
12570 #endif
12571 const char *_nl_expand_alias (const char *);
12572 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12573 #else
12574 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12575 #endif
12576 $gt_revision_test_code
12577
12578 int
12579 main ()
12580 {
12581
12582 bindtextdomain ("", "");
12583 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12584
12585 ;
12586 return 0;
12587 }
12588 _ACEOF
12589 if ac_fn_c_try_link "$LINENO"; then :
12590 eval "$gt_func_gnugettext_libintl=yes"
12591 else
12592 eval "$gt_func_gnugettext_libintl=no"
12593 fi
12594 rm -f core conftest.err conftest.$ac_objext \
12595 conftest$ac_exeext conftest.$ac_ext
12596 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
12597 LIBS="$LIBS $LIBICONV"
12598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12599 /* end confdefs.h. */
12600
12601 #include <libintl.h>
12602 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12603 extern int _nl_msg_cat_cntr;
12604 extern
12605 #ifdef __cplusplus
12606 "C"
12607 #endif
12608 const char *_nl_expand_alias (const char *);
12609 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12610 #else
12611 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12612 #endif
12613 $gt_revision_test_code
12614
12615 int
12616 main ()
12617 {
12618
12619 bindtextdomain ("", "");
12620 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12621
12622 ;
12623 return 0;
12624 }
12625 _ACEOF
12626 if ac_fn_c_try_link "$LINENO"; then :
12627 LIBINTL="$LIBINTL $LIBICONV"
12628 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12629 eval "$gt_func_gnugettext_libintl=yes"
12630
12631 fi
12632 rm -f core conftest.err conftest.$ac_objext \
12633 conftest$ac_exeext conftest.$ac_ext
12634 fi
12635 CPPFLAGS="$gt_save_CPPFLAGS"
12636 LIBS="$gt_save_LIBS"
12637 fi
12638 eval ac_res=\$$gt_func_gnugettext_libintl
12639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12640 $as_echo "$ac_res" >&6; }
12641 fi
12642
12643 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12644 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
12645 && test "$PACKAGE" != gettext-runtime \
12646 && test "$PACKAGE" != gettext-tools; }; then
12647 gt_use_preinstalled_gnugettext=yes
12648 else
12649 LIBINTL=
12650 LTLIBINTL=
12651 INCINTL=
12652 fi
12653
12654
12655
12656 if test -n "$INTL_MACOSX_LIBS"; then
12657 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12658 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12659 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12660 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12661 fi
12662 fi
12663
12664 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12665 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12666
12667 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
12668
12669 else
12670 USE_NLS=no
12671 fi
12672 fi
12673
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12675 $as_echo_n "checking whether to use NLS... " >&6; }
12676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12677 $as_echo "$USE_NLS" >&6; }
12678 if test "$USE_NLS" = "yes"; then
12679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12680 $as_echo_n "checking where the gettext function comes from... " >&6; }
12681 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12682 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12683 gt_source="external libintl"
12684 else
12685 gt_source="libc"
12686 fi
12687 else
12688 gt_source="included intl directory"
12689 fi
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12691 $as_echo "$gt_source" >&6; }
12692 fi
12693
12694 if test "$USE_NLS" = "yes"; then
12695
12696 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12697 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12699 $as_echo_n "checking how to link with libintl... " >&6; }
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12701 $as_echo "$LIBINTL" >&6; }
12702
12703 for element in $INCINTL; do
12704 haveit=
12705 for x in $CPPFLAGS; do
12706
12707 acl_save_prefix="$prefix"
12708 prefix="$acl_final_prefix"
12709 acl_save_exec_prefix="$exec_prefix"
12710 exec_prefix="$acl_final_exec_prefix"
12711 eval x=\"$x\"
12712 exec_prefix="$acl_save_exec_prefix"
12713 prefix="$acl_save_prefix"
12714
12715 if test "X$x" = "X$element"; then
12716 haveit=yes
12717 break
12718 fi
12719 done
12720 if test -z "$haveit"; then
12721 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12722 fi
12723 done
12724
12725 fi
12726
12727
12728 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
12729
12730
12731 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
12732
12733 fi
12734
12735 POSUB=po
12736 fi
12737
12738
12739
12740 INTLLIBS="$LIBINTL"
12741
12742
12743
12744
12745
12746
12747 fi
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
12760 $as_echo_n "checking whether NLS is requested... " >&6; }
12761 if test x"$USE_NLS" != xyes; then
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12763 $as_echo "no" >&6; }
12764 else
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12766 $as_echo "yes" >&6; }
12767
12768 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
12769
12770
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
12772 $as_echo_n "checking for catalogs to be installed... " >&6; }
12773 # Look for .po and .gmo files in the source directory.
12774 CATALOGS=
12775 XLINGUAS=
12776 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12777 # If there aren't any .gmo files the shell will give us the
12778 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12779 # weeded out.
12780 case "$cat" in *\**)
12781 continue;;
12782 esac
12783 # The quadruple backslash is collapsed to a double backslash
12784 # by the backticks, then collapsed again by the double quotes,
12785 # leaving us with one backslash in the sed expression (right
12786 # before the dot that mustn't act as a wildcard).
12787 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12788 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12789 # The user is allowed to set LINGUAS to a list of languages to
12790 # install catalogs for. If it's empty that means "all of them."
12791 if test "x$LINGUAS" = x; then
12792 CATALOGS="$CATALOGS $cat"
12793 XLINGUAS="$XLINGUAS $lang"
12794 else
12795 case "$LINGUAS" in *$lang*)
12796 CATALOGS="$CATALOGS $cat"
12797 XLINGUAS="$XLINGUAS $lang"
12798 ;;
12799 esac
12800 fi
12801 done
12802 LINGUAS="$XLINGUAS"
12803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
12804 $as_echo "$LINGUAS" >&6; }
12805
12806
12807 DATADIRNAME=share
12808
12809 INSTOBJEXT=.mo
12810
12811 GENCAT=gencat
12812
12813 CATOBJEXT=.gmo
12814
12815 fi
12816
12817 # Create sub-directories for objects and dependencies.
12818 CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
12819
12820
12821 ac_config_commands="$ac_config_commands gdbdepdir"
12822
12823
12824 depcc="$CC" am_compiler_list=
12825
12826 am_depcomp=$ac_aux_dir/depcomp
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12828 $as_echo_n "checking dependency style of $depcc... " >&6; }
12829 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
12830 $as_echo_n "(cached) " >&6
12831 else
12832 if test -f "$am_depcomp"; then
12833 # We make a subdir and do the tests there. Otherwise we can end up
12834 # making bogus files that we don't know about and never remove. For
12835 # instance it was reported that on HP-UX the gcc test will end up
12836 # making a dummy file named `D' -- because `-MD' means `put the output
12837 # in D'.
12838 mkdir conftest.dir
12839 # Copy depcomp to subdir because otherwise we won't find it if we're
12840 # using a relative directory.
12841 cp "$am_depcomp" conftest.dir
12842 cd conftest.dir
12843 # We will build objects and dependencies in a subdirectory because
12844 # it helps to detect inapplicable dependency modes. For instance
12845 # both Tru64's cc and ICC support -MD to output dependencies as a
12846 # side effect of compilation, but ICC will put the dependencies in
12847 # the current directory while Tru64 will put them in the object
12848 # directory.
12849 mkdir sub
12850
12851 am_cv_CC_dependencies_compiler_type=none
12852 if test "$am_compiler_list" = ""; then
12853 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12854 fi
12855 for depmode in $am_compiler_list; do
12856 if test $depmode = none; then break; fi
12857
12858 $as_echo "$as_me:$LINENO: trying $depmode" >&5
12859 # Setup a source with many dependencies, because some compilers
12860 # like to wrap large dependency lists on column 80 (with \), and
12861 # we should not choose a depcomp mode which is confused by this.
12862 #
12863 # We need to recreate these files for each test, as the compiler may
12864 # overwrite some of them when testing with obscure command lines.
12865 # This happens at least with the AIX C compiler.
12866 : > sub/conftest.c
12867 for i in 1 2 3 4 5 6; do
12868 echo '#include "conftst'$i'.h"' >> sub/conftest.c
12869 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12870 # Solaris 8's {/usr,}/bin/sh.
12871 touch sub/conftst$i.h
12872 done
12873 echo "include sub/conftest.Po" > confmf
12874
12875 # We check with `-c' and `-o' for the sake of the "dashmstdout"
12876 # mode. It turns out that the SunPro C++ compiler does not properly
12877 # handle `-M -o', and we need to detect this.
12878 depcmd="depmode=$depmode \
12879 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12880 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12881 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
12882 echo "| $depcmd" | sed -e 's/ */ /g' >&5
12883 if env $depcmd > conftest.err 2>&1 &&
12884 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
12885 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
12886 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
12887 # icc doesn't choke on unknown options, it will just issue warnings
12888 # or remarks (even with -Werror). So we grep stderr for any message
12889 # that says an option was ignored or not supported.
12890 # When given -MP, icc 7.0 and 7.1 complain thusly:
12891 # icc: Command line warning: ignoring option '-M'; no argument required
12892 # The diagnosis changed in icc 8.0:
12893 # icc: Command line remark: option '-MP' not supported
12894 if (grep 'ignoring option' conftest.err ||
12895 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12896 am_cv_CC_dependencies_compiler_type=$depmode
12897 $as_echo "$as_me:$LINENO: success" >&5
12898 break
12899 fi
12900 fi
12901 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
12902 sed -e 's/^/| /' < conftest.err >&5
12903 done
12904
12905 cd ..
12906 rm -rf conftest.dir
12907 else
12908 am_cv_CC_dependencies_compiler_type=none
12909 fi
12910
12911 fi
12912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
12913 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
12914 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
12915 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
12916 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12917
12918 fi
12919
12920
12921 for ac_header in \
12922 arpa/inet.h \
12923 fcntl.h \
12924 linux/elf.h \
12925 netdb.h \
12926 netinet/in.h \
12927 netinet/tcp.h \
12928 signal.h \
12929 string.h \
12930 sys/file.h \
12931 sys/ioctl.h \
12932 sys/procfs.h \
12933 sys/reg.h \
12934 sys/socket.h \
12935 termios.h \
12936 ws2tcpip.h \
12937
12938 do :
12939 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12940 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12941 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12942 cat >>confdefs.h <<_ACEOF
12943 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12944 _ACEOF
12945
12946 fi
12947
12948 done
12949
12950
12951 for ac_header in vfork.h
12952 do :
12953 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12954 if test "x$ac_cv_header_vfork_h" = xyes; then :
12955 cat >>confdefs.h <<_ACEOF
12956 #define HAVE_VFORK_H 1
12957 _ACEOF
12958
12959 fi
12960
12961 done
12962
12963 for ac_func in fork vfork
12964 do :
12965 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12966 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12967 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12968 cat >>confdefs.h <<_ACEOF
12969 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12970 _ACEOF
12971
12972 fi
12973 done
12974
12975 if test "x$ac_cv_func_fork" = xyes; then
12976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12977 $as_echo_n "checking for working fork... " >&6; }
12978 if ${ac_cv_func_fork_works+:} false; then :
12979 $as_echo_n "(cached) " >&6
12980 else
12981 if test "$cross_compiling" = yes; then :
12982 ac_cv_func_fork_works=cross
12983 else
12984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12985 /* end confdefs.h. */
12986 $ac_includes_default
12987 int
12988 main ()
12989 {
12990
12991 /* By Ruediger Kuhlmann. */
12992 return fork () < 0;
12993
12994 ;
12995 return 0;
12996 }
12997 _ACEOF
12998 if ac_fn_c_try_run "$LINENO"; then :
12999 ac_cv_func_fork_works=yes
13000 else
13001 ac_cv_func_fork_works=no
13002 fi
13003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13004 conftest.$ac_objext conftest.beam conftest.$ac_ext
13005 fi
13006
13007 fi
13008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13009 $as_echo "$ac_cv_func_fork_works" >&6; }
13010
13011 else
13012 ac_cv_func_fork_works=$ac_cv_func_fork
13013 fi
13014 if test "x$ac_cv_func_fork_works" = xcross; then
13015 case $host in
13016 *-*-amigaos* | *-*-msdosdjgpp*)
13017 # Override, as these systems have only a dummy fork() stub
13018 ac_cv_func_fork_works=no
13019 ;;
13020 *)
13021 ac_cv_func_fork_works=yes
13022 ;;
13023 esac
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13025 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13026 fi
13027 ac_cv_func_vfork_works=$ac_cv_func_vfork
13028 if test "x$ac_cv_func_vfork" = xyes; then
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13030 $as_echo_n "checking for working vfork... " >&6; }
13031 if ${ac_cv_func_vfork_works+:} false; then :
13032 $as_echo_n "(cached) " >&6
13033 else
13034 if test "$cross_compiling" = yes; then :
13035 ac_cv_func_vfork_works=cross
13036 else
13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h. */
13039 /* Thanks to Paul Eggert for this test. */
13040 $ac_includes_default
13041 #include <sys/wait.h>
13042 #ifdef HAVE_VFORK_H
13043 # include <vfork.h>
13044 #endif
13045 /* On some sparc systems, changes by the child to local and incoming
13046 argument registers are propagated back to the parent. The compiler
13047 is told about this with #include <vfork.h>, but some compilers
13048 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13049 static variable whose address is put into a register that is
13050 clobbered by the vfork. */
13051 static void
13052 #ifdef __cplusplus
13053 sparc_address_test (int arg)
13054 # else
13055 sparc_address_test (arg) int arg;
13056 #endif
13057 {
13058 static pid_t child;
13059 if (!child) {
13060 child = vfork ();
13061 if (child < 0) {
13062 perror ("vfork");
13063 _exit(2);
13064 }
13065 if (!child) {
13066 arg = getpid();
13067 write(-1, "", 0);
13068 _exit (arg);
13069 }
13070 }
13071 }
13072
13073 int
13074 main ()
13075 {
13076 pid_t parent = getpid ();
13077 pid_t child;
13078
13079 sparc_address_test (0);
13080
13081 child = vfork ();
13082
13083 if (child == 0) {
13084 /* Here is another test for sparc vfork register problems. This
13085 test uses lots of local variables, at least as many local
13086 variables as main has allocated so far including compiler
13087 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13088 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13089 reuse the register of parent for one of the local variables,
13090 since it will think that parent can't possibly be used any more
13091 in this routine. Assigning to the local variable will thus
13092 munge parent in the parent process. */
13093 pid_t
13094 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13095 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13096 /* Convince the compiler that p..p7 are live; otherwise, it might
13097 use the same hardware register for all 8 local variables. */
13098 if (p != p1 || p != p2 || p != p3 || p != p4
13099 || p != p5 || p != p6 || p != p7)
13100 _exit(1);
13101
13102 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13103 from child file descriptors. If the child closes a descriptor
13104 before it execs or exits, this munges the parent's descriptor
13105 as well. Test for this by closing stdout in the child. */
13106 _exit(close(fileno(stdout)) != 0);
13107 } else {
13108 int status;
13109 struct stat st;
13110
13111 while (wait(&status) != child)
13112 ;
13113 return (
13114 /* Was there some problem with vforking? */
13115 child < 0
13116
13117 /* Did the child fail? (This shouldn't happen.) */
13118 || status
13119
13120 /* Did the vfork/compiler bug occur? */
13121 || parent != getpid()
13122
13123 /* Did the file descriptor bug occur? */
13124 || fstat(fileno(stdout), &st) != 0
13125 );
13126 }
13127 }
13128 _ACEOF
13129 if ac_fn_c_try_run "$LINENO"; then :
13130 ac_cv_func_vfork_works=yes
13131 else
13132 ac_cv_func_vfork_works=no
13133 fi
13134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13135 conftest.$ac_objext conftest.beam conftest.$ac_ext
13136 fi
13137
13138 fi
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13140 $as_echo "$ac_cv_func_vfork_works" >&6; }
13141
13142 fi;
13143 if test "x$ac_cv_func_fork_works" = xcross; then
13144 ac_cv_func_vfork_works=$ac_cv_func_vfork
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13146 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13147 fi
13148
13149 if test "x$ac_cv_func_vfork_works" = xyes; then
13150
13151 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13152
13153 else
13154
13155 $as_echo "#define vfork fork" >>confdefs.h
13156
13157 fi
13158 if test "x$ac_cv_func_fork_works" = xyes; then
13159
13160 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13161
13162 fi
13163
13164 for ac_func in \
13165 pread \
13166 pread64 \
13167 pwrite \
13168
13169 do :
13170 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13172 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13173 cat >>confdefs.h <<_ACEOF
13174 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13175 _ACEOF
13176
13177 fi
13178 done
13179
13180
13181 # Check the return and argument types of ptrace.
13182
13183
13184 for ac_header in sys/ptrace.h ptrace.h
13185 do :
13186 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13187 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13188 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13189 cat >>confdefs.h <<_ACEOF
13190 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13191 _ACEOF
13192
13193 fi
13194
13195 done
13196
13197
13198 gdb_ptrace_headers='
13199 #include <sys/types.h>
13200 #if HAVE_SYS_PTRACE_H
13201 # include <sys/ptrace.h>
13202 #endif
13203 #if HAVE_UNISTD_H
13204 # include <unistd.h>
13205 #endif
13206 '
13207
13208 # Check return type. Varargs (used on GNU/Linux) conflict with the
13209 # empty argument list, so check for that explicitly.
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13211 $as_echo_n "checking return type of ptrace... " >&6; }
13212 if ${gdb_cv_func_ptrace_ret+:} false; then :
13213 $as_echo_n "(cached) " >&6
13214 else
13215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13216 /* end confdefs.h. */
13217  $gdb_ptrace_headers
13218 int
13219 main ()
13220 {
13221 extern long ptrace (enum __ptrace_request, ...);
13222
13223 ;
13224 return 0;
13225 }
13226 _ACEOF
13227 if ac_fn_c_try_compile "$LINENO"; then :
13228 gdb_cv_func_ptrace_ret='long'
13229 else
13230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13231 /* end confdefs.h. */
13232 $gdb_ptrace_headers
13233 int
13234 main ()
13235 {
13236 extern int ptrace ();
13237
13238 ;
13239 return 0;
13240 }
13241 _ACEOF
13242 if ac_fn_c_try_compile "$LINENO"; then :
13243 gdb_cv_func_ptrace_ret='int'
13244 else
13245 gdb_cv_func_ptrace_ret='long'
13246
13247 fi
13248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13249
13250 fi
13251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13252
13253 fi
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13255 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13256
13257
13258 cat >>confdefs.h <<_ACEOF
13259 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13260 _ACEOF
13261
13262
13263 # Check argument types.
13264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13265 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13266 if ${gdb_cv_func_ptrace_args+:} false; then :
13267 $as_echo_n "(cached) " >&6
13268 else
13269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13270 /* end confdefs.h. */
13271 $gdb_ptrace_headers
13272 int
13273 main ()
13274 {
13275 extern long ptrace (enum __ptrace_request, ...);
13276
13277 ;
13278 return 0;
13279 }
13280 _ACEOF
13281 if ac_fn_c_try_compile "$LINENO"; then :
13282 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13283 else
13284 for gdb_arg1 in 'int' 'long'; do
13285 for gdb_arg2 in 'pid_t' 'int' 'long'; do
13286 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13287 for gdb_arg4 in 'int' 'long' 'void *'; do
13288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13289 /* end confdefs.h. */
13290 $gdb_ptrace_headers
13291 int
13292 main ()
13293 {
13294 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13295
13296 ;
13297 return 0;
13298 }
13299 _ACEOF
13300 if ac_fn_c_try_compile "$LINENO"; then :
13301 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13302 break 4;
13303
13304 fi
13305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306
13307 for gdb_arg5 in 'int *' 'int' 'long'; do
13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13309 /* end confdefs.h. */
13310 $gdb_ptrace_headers
13311 int
13312 main ()
13313 {
13314 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13315
13316 ;
13317 return 0;
13318 }
13319 _ACEOF
13320 if ac_fn_c_try_compile "$LINENO"; then :
13321 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13322 break 5;
13323
13324 fi
13325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13326 done
13327 done
13328 done
13329 done
13330 done
13331 # Provide a safe default value.
13332 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13333
13334 fi
13335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13336
13337 fi
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13339 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13340
13341 ac_save_IFS=$IFS; IFS=','
13342 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13343 IFS=$ac_save_IFS
13344 shift
13345
13346 cat >>confdefs.h <<_ACEOF
13347 #define PTRACE_TYPE_ARG1 $1
13348 _ACEOF
13349
13350
13351 cat >>confdefs.h <<_ACEOF
13352 #define PTRACE_TYPE_ARG3 $3
13353 _ACEOF
13354
13355
13356 cat >>confdefs.h <<_ACEOF
13357 #define PTRACE_TYPE_ARG4 $4
13358 _ACEOF
13359
13360 if test -n "$5"; then
13361
13362 cat >>confdefs.h <<_ACEOF
13363 #define PTRACE_TYPE_ARG5 $5
13364 _ACEOF
13365
13366 fi
13367
13368
13369
13370
13371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
13372 $as_echo_n "checking the compiler type... " >&6; }
13373 if ${gdb_cv_compiler_type+:} false; then :
13374 $as_echo_n "(cached) " >&6
13375 else
13376 gdb_cv_compiler_type=unknown
13377 if test "$gdb_cv_compiler_type" = unknown; then
13378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13379 /* end confdefs.h. */
13380
13381 int
13382 main ()
13383 {
13384
13385 #if !defined __GNUC__ || defined __clang__
13386 #error not gcc
13387 #endif
13388
13389 ;
13390 return 0;
13391 }
13392 _ACEOF
13393 if ac_fn_c_try_compile "$LINENO"; then :
13394 gdb_cv_compiler_type=gcc
13395 fi
13396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13397 fi
13398
13399 if test "$gdb_cv_compiler_type" = unknown; then
13400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401 /* end confdefs.h. */
13402
13403 int
13404 main ()
13405 {
13406
13407 #ifndef __clang__
13408 #error not clang
13409 #endif
13410
13411 ;
13412 return 0;
13413 }
13414 _ACEOF
13415 if ac_fn_c_try_compile "$LINENO"; then :
13416 gdb_cv_compiler_type=clang
13417 fi
13418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13419 fi
13420
13421 fi
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
13423 $as_echo "$gdb_cv_compiler_type" >&6; }
13424
13425 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
13426
13427
13428 # Check whether --enable-werror was given.
13429 if test "${enable_werror+set}" = set; then :
13430 enableval=$enable_werror; case "${enableval}" in
13431 yes | y) ERROR_ON_WARNING="yes" ;;
13432 no | n) ERROR_ON_WARNING="no" ;;
13433 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
13434 esac
13435 fi
13436
13437
13438 # Enable -Werror by default when using gcc. Turn it off for releases.
13439 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
13440 ERROR_ON_WARNING=yes
13441 fi
13442
13443 WERROR_CFLAGS=""
13444 if test "${ERROR_ON_WARNING}" = yes ; then
13445 WERROR_CFLAGS="-Werror"
13446 fi
13447
13448 # The options we'll try to enable.
13449 build_warnings=" \
13450 -Wall \
13451 -Wdeprecated-copy \
13452 -Wdeprecated-copy-dtor \
13453 -Wduplicated-cond \
13454 -Wempty-body \
13455 -Wimplicit-fallthrough=5 \
13456 -Wmissing-declarations \
13457 -Wno-char-subscripts \
13458 -Wno-error=deprecated-register \
13459 -Wno-mismatched-tags \
13460 -Wno-sign-compare -Wno-error=maybe-uninitialized \
13461 -Wno-switch \
13462 -Wno-unused \
13463 -Wpointer-arith \
13464 -Wredundant-move \
13465 -Wshadow=local \
13466 -Wstrict-null-sentinel \
13467 -Wsuggest-override \
13468 -Wunused-but-set-parameter \
13469 -Wunused-but-set-variable \
13470 -Wunused-const-variable=1 \
13471 -Wunused-function \
13472 -Wunused-label \
13473 -Wunused-lambda-capture \
13474 -Wunused-local-typedefs \
13475 -Wunused-member-function \
13476 -Wunused-private-field \
13477 -Wunused-value \
13478 -Wunused-variable \
13479 -Wvla \
13480 "
13481
13482 # The -Wmissing-prototypes flag will be accepted by GCC, but results
13483 # in a warning being printed about the flag not being valid for C++,
13484 # this is something to do with using ccache, and argument ordering.
13485 if test "$GDB_COMPILER_TYPE" != gcc; then
13486 build_warnings="$build_warnings -Wmissing-prototypes"
13487 fi
13488
13489 case "${host}" in
13490 *-*-mingw32*)
13491 # Enable -Wno-format by default when using gcc on mingw since many
13492 # GCC versions complain about %I64.
13493 build_warnings="$build_warnings -Wno-format" ;;
13494 *-*-solaris*)
13495 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
13496 # doesn't understand.
13497 build_warnings="$build_warnings -Wno-unknown-pragmas"
13498 # Solaris 11 <unistd.h> marks vfork deprecated.
13499 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
13500 *)
13501 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
13502 # but there's a special case for this below.
13503 build_warnings="$build_warnings -Wformat-nonliteral" ;;
13504 esac
13505
13506 # Check whether --enable-build-warnings was given.
13507 if test "${enable_build_warnings+set}" = set; then :
13508 enableval=$enable_build_warnings; case "${enableval}" in
13509 yes) ;;
13510 no) build_warnings="-w";;
13511 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13512 build_warnings="${build_warnings} ${t}";;
13513 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13514 build_warnings="${t} ${build_warnings}";;
13515 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13516 esac
13517 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13518 echo "Setting compiler warning flags = $build_warnings" 6>&1
13519 fi
13520 fi
13521 # Check whether --enable-gdb-build-warnings was given.
13522 if test "${enable_gdb_build_warnings+set}" = set; then :
13523 enableval=$enable_gdb_build_warnings; case "${enableval}" in
13524 yes) ;;
13525 no) build_warnings="-w";;
13526 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13527 build_warnings="${build_warnings} ${t}";;
13528 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13529 build_warnings="${t} ${build_warnings}";;
13530 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13531 esac
13532 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13533 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13534 fi
13535 fi
13536
13537 # The set of warnings supported by a C++ compiler is not the same as
13538 # of the C compiler.
13539 ac_ext=cpp
13540 ac_cpp='$CXXCPP $CPPFLAGS'
13541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13542 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13544
13545
13546 WARN_CFLAGS=""
13547 if test "x${build_warnings}" != x -a "x$GCC" = xyes
13548 then
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13550 $as_echo_n "checking compiler warning flags... " >&6; }
13551 # Separate out the -Werror flag as some files just cannot be
13552 # compiled with it enabled.
13553 for w in ${build_warnings}; do
13554 # GCC does not complain about -Wno-unknown-warning. Invert
13555 # and test -Wunknown-warning instead.
13556 case $w in
13557 -Wno-*)
13558 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
13559 -Wformat-nonliteral)
13560 # gcc requires -Wformat before -Wformat-nonliteral
13561 # will work, so stick them together.
13562 w="-Wformat $w"
13563 wtest="$w"
13564 ;;
13565 *)
13566 wtest=$w ;;
13567 esac
13568
13569 case $w in
13570 -Werr*) WERROR_CFLAGS=-Werror ;;
13571 *)
13572 # Check whether GCC accepts it.
13573 saved_CFLAGS="$CFLAGS"
13574 CFLAGS="$CFLAGS -Werror $wtest"
13575 saved_CXXFLAGS="$CXXFLAGS"
13576 CXXFLAGS="$CXXFLAGS -Werror $wtest"
13577 if test "x$w" = "x-Wunused-variable"; then
13578 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
13579 # fixed in GCC 4.9. This test is derived from the gdb
13580 # source code that triggered this bug in GCC.
13581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13582 /* end confdefs.h. */
13583 struct scoped_restore_base {};
13584 struct scoped_restore_tmpl : public scoped_restore_base {
13585 ~scoped_restore_tmpl() {}
13586 };
13587 int
13588 main ()
13589 {
13590 const scoped_restore_base &b = scoped_restore_tmpl();
13591
13592 ;
13593 return 0;
13594 }
13595 _ACEOF
13596 if ac_fn_cxx_try_compile "$LINENO"; then :
13597 WARN_CFLAGS="${WARN_CFLAGS} $w"
13598 fi
13599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13600 else
13601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13602 /* end confdefs.h. */
13603
13604 int
13605 main ()
13606 {
13607
13608 ;
13609 return 0;
13610 }
13611 _ACEOF
13612 if ac_fn_cxx_try_compile "$LINENO"; then :
13613 WARN_CFLAGS="${WARN_CFLAGS} $w"
13614 fi
13615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13616 fi
13617 CFLAGS="$saved_CFLAGS"
13618 CXXFLAGS="$saved_CXXFLAGS"
13619 esac
13620 done
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13622 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
13623 fi
13624
13625
13626
13627 ac_ext=c
13628 ac_cpp='$CPP $CPPFLAGS'
13629 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13630 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13631 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13632
13633
13634
13635 old_LIBS="$LIBS"
13636 LIBS="$LIBS -ldl"
13637 for ac_func in dladdr
13638 do :
13639 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
13640 if test "x$ac_cv_func_dladdr" = xyes; then :
13641 cat >>confdefs.h <<_ACEOF
13642 #define HAVE_DLADDR 1
13643 _ACEOF
13644
13645 fi
13646 done
13647
13648 LIBS="$old_LIBS"
13649
13650 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
13651 if test "x$ac_cv_have_decl_ffs" = xyes; then :
13652 ac_have_decl=1
13653 else
13654 ac_have_decl=0
13655 fi
13656
13657 cat >>confdefs.h <<_ACEOF
13658 #define HAVE_DECL_FFS $ac_have_decl
13659 _ACEOF
13660
13661 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
13662 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
13663 ac_have_decl=1
13664 else
13665 ac_have_decl=0
13666 fi
13667
13668 cat >>confdefs.h <<_ACEOF
13669 #define HAVE_DECL_ASPRINTF $ac_have_decl
13670 _ACEOF
13671
13672 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
13673 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
13674 ac_have_decl=1
13675 else
13676 ac_have_decl=0
13677 fi
13678
13679 cat >>confdefs.h <<_ACEOF
13680 #define HAVE_DECL_VASPRINTF $ac_have_decl
13681 _ACEOF
13682
13683 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13684 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13685 ac_have_decl=1
13686 else
13687 ac_have_decl=0
13688 fi
13689
13690 cat >>confdefs.h <<_ACEOF
13691 #define HAVE_DECL_SNPRINTF $ac_have_decl
13692 _ACEOF
13693
13694 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13695 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13696 ac_have_decl=1
13697 else
13698 ac_have_decl=0
13699 fi
13700
13701 cat >>confdefs.h <<_ACEOF
13702 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13703 _ACEOF
13704
13705 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
13706 if test "x$ac_cv_have_decl_strtol" = xyes; then :
13707 ac_have_decl=1
13708 else
13709 ac_have_decl=0
13710 fi
13711
13712 cat >>confdefs.h <<_ACEOF
13713 #define HAVE_DECL_STRTOL $ac_have_decl
13714 _ACEOF
13715
13716 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
13717 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
13718 ac_have_decl=1
13719 else
13720 ac_have_decl=0
13721 fi
13722
13723 cat >>confdefs.h <<_ACEOF
13724 #define HAVE_DECL_STRTOUL $ac_have_decl
13725 _ACEOF
13726
13727 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
13728 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
13729 ac_have_decl=1
13730 else
13731 ac_have_decl=0
13732 fi
13733
13734 cat >>confdefs.h <<_ACEOF
13735 #define HAVE_DECL_STRTOLL $ac_have_decl
13736 _ACEOF
13737
13738 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
13739 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
13740 ac_have_decl=1
13741 else
13742 ac_have_decl=0
13743 fi
13744
13745 cat >>confdefs.h <<_ACEOF
13746 #define HAVE_DECL_STRTOULL $ac_have_decl
13747 _ACEOF
13748
13749 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
13750 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
13751 ac_have_decl=1
13752 else
13753 ac_have_decl=0
13754 fi
13755
13756 cat >>confdefs.h <<_ACEOF
13757 #define HAVE_DECL_STRVERSCMP $ac_have_decl
13758 _ACEOF
13759
13760 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
13761 if test "x$ac_cv_type_long_long" = xyes; then :
13762
13763 cat >>confdefs.h <<_ACEOF
13764 #define HAVE_LONG_LONG 1
13765 _ACEOF
13766
13767 # The cast to long int works around a bug in the HP C Compiler
13768 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13769 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13770 # This bug is HP SR number 8606223364.
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
13772 $as_echo_n "checking size of long long... " >&6; }
13773 if ${ac_cv_sizeof_long_long+:} false; then :
13774 $as_echo_n "(cached) " >&6
13775 else
13776 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
13777
13778 else
13779 if test "$ac_cv_type_long_long" = yes; then
13780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13781 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13782 as_fn_error 77 "cannot compute sizeof (long long)
13783 See \`config.log' for more details" "$LINENO" 5; }
13784 else
13785 ac_cv_sizeof_long_long=0
13786 fi
13787 fi
13788
13789 fi
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
13791 $as_echo "$ac_cv_sizeof_long_long" >&6; }
13792
13793
13794
13795 cat >>confdefs.h <<_ACEOF
13796 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
13797 _ACEOF
13798
13799
13800 fi
13801
13802
13803 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
13804 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
13805 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
13806 ac_have_decl=1
13807 else
13808 ac_have_decl=0
13809 fi
13810
13811 cat >>confdefs.h <<_ACEOF
13812 #define HAVE_DECL_BASENAME $ac_have_decl
13813 _ACEOF
13814
13815
13816
13817
13818
13819
13820 ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
13821 if test "x$ac_cv_have_decl_perror" = xyes; then :
13822 ac_have_decl=1
13823 else
13824 ac_have_decl=0
13825 fi
13826
13827 cat >>confdefs.h <<_ACEOF
13828 #define HAVE_DECL_PERROR $ac_have_decl
13829 _ACEOF
13830 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
13831 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
13832 ac_have_decl=1
13833 else
13834 ac_have_decl=0
13835 fi
13836
13837 cat >>confdefs.h <<_ACEOF
13838 #define HAVE_DECL_VASPRINTF $ac_have_decl
13839 _ACEOF
13840 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13841 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13842 ac_have_decl=1
13843 else
13844 ac_have_decl=0
13845 fi
13846
13847 cat >>confdefs.h <<_ACEOF
13848 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13849 _ACEOF
13850
13851
13852 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
13853 #if HAVE_SYS_SOCKET_H
13854 # include <sys/socket.h>
13855 #elif HAVE_WS2TCPIP_H
13856 # include <ws2tcpip.h>
13857 #endif
13858
13859 "
13860 if test "x$ac_cv_type_socklen_t" = xyes; then :
13861
13862 cat >>confdefs.h <<_ACEOF
13863 #define HAVE_SOCKLEN_T 1
13864 _ACEOF
13865
13866
13867 fi
13868
13869
13870 case "${target}" in
13871 *-android*)
13872 # Starting with NDK version 9, <elf.h> actually includes definitions
13873 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
13874 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
13875 # leading to conflicts with the definitions from <linux/elf.h>.
13876 # This makes it impossible for us to include both <elf.h> and
13877 # <linux/elf.h>, which means that, in practice, we do not have
13878 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
13879 # Therefore, do not try to auto-detect availability, as it would
13880 # get it wrong on this platform.
13881 ;;
13882 *)
13883 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
13884
13885 "
13886 if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
13887
13888 cat >>confdefs.h <<_ACEOF
13889 #define HAVE_ELF32_AUXV_T 1
13890 _ACEOF
13891
13892
13893 fi
13894 ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
13895
13896 "
13897 if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
13898
13899 cat >>confdefs.h <<_ACEOF
13900 #define HAVE_ELF64_AUXV_T 1
13901 _ACEOF
13902
13903
13904 fi
13905
13906 esac
13907
13908
13909
13910 # Check whether --with-pkgversion was given.
13911 if test "${with_pkgversion+set}" = set; then :
13912 withval=$with_pkgversion; case "$withval" in
13913 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
13914 no) PKGVERSION= ;;
13915 *) PKGVERSION="($withval) " ;;
13916 esac
13917 else
13918 PKGVERSION="(GDB) "
13919
13920 fi
13921
13922
13923
13924
13925
13926 # Check whether --with-bugurl was given.
13927 if test "${with_bugurl+set}" = set; then :
13928 withval=$with_bugurl; case "$withval" in
13929 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
13930 no) BUGURL=
13931 ;;
13932 *) BUGURL="$withval"
13933 ;;
13934 esac
13935 else
13936 BUGURL="http://www.gnu.org/software/gdb/bugs/"
13937
13938 fi
13939
13940 case ${BUGURL} in
13941 "")
13942 REPORT_BUGS_TO=
13943 REPORT_BUGS_TEXI=
13944 ;;
13945 *)
13946 REPORT_BUGS_TO="<$BUGURL>"
13947 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
13948 ;;
13949 esac;
13950
13951
13952
13953
13954 cat >>confdefs.h <<_ACEOF
13955 #define PKGVERSION "$PKGVERSION"
13956 _ACEOF
13957
13958
13959 cat >>confdefs.h <<_ACEOF
13960 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
13961 _ACEOF
13962
13963
13964 # Check for various supplementary target information (beyond the
13965 # triplet) which might affect the choices in configure.srv.
13966 case "${target}" in
13967 i[34567]86-*-linux*)
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
13969 $as_echo_n "checking if building for x86-64... " >&6; }
13970 if ${gdb_cv_i386_is_x86_64+:} false; then :
13971 $as_echo_n "(cached) " >&6
13972 else
13973 save_CPPFLAGS="$CPPFLAGS"
13974 CPPFLAGS="$CPPFLAGS $CFLAGS"
13975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13976 /* end confdefs.h. */
13977
13978 #if __x86_64__
13979 got it
13980 #endif
13981
13982 _ACEOF
13983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13984 $EGREP "got it" >/dev/null 2>&1; then :
13985 gdb_cv_i386_is_x86_64=yes
13986 else
13987 gdb_cv_i386_is_x86_64=no
13988 fi
13989 rm -f conftest*
13990
13991 CPPFLAGS="$save_CPPFLAGS"
13992 fi
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
13994 $as_echo "$gdb_cv_i386_is_x86_64" >&6; }
13995 ;;
13996
13997 x86_64-*-linux*)
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
13999 $as_echo_n "checking if building for x32... " >&6; }
14000 if ${gdb_cv_x86_is_x32+:} false; then :
14001 $as_echo_n "(cached) " >&6
14002 else
14003 save_CPPFLAGS="$CPPFLAGS"
14004 CPPFLAGS="$CPPFLAGS $CFLAGS"
14005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14006 /* end confdefs.h. */
14007
14008 #if __x86_64__ && __ILP32__
14009 got it
14010 #endif
14011
14012 _ACEOF
14013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14014 $EGREP "got it" >/dev/null 2>&1; then :
14015 gdb_cv_x86_is_x32=yes
14016 else
14017 gdb_cv_x86_is_x32=no
14018 fi
14019 rm -f conftest*
14020
14021 CPPFLAGS="$save_CPPFLAGS"
14022 fi
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
14024 $as_echo "$gdb_cv_x86_is_x32" >&6; }
14025 ;;
14026
14027 m68k-*-*)
14028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
14029 $as_echo_n "checking if building for Coldfire... " >&6; }
14030 if ${gdb_cv_m68k_is_coldfire+:} false; then :
14031 $as_echo_n "(cached) " >&6
14032 else
14033 save_CPPFLAGS="$CPPFLAGS"
14034 CPPFLAGS="$CPPFLAGS $CFLAGS"
14035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14036 /* end confdefs.h. */
14037
14038 #ifdef __mcoldfire__
14039 got it
14040 #endif
14041
14042 _ACEOF
14043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14044 $EGREP "got it" >/dev/null 2>&1; then :
14045 gdb_cv_m68k_is_coldfire=yes
14046 else
14047 gdb_cv_m68k_is_coldfire=no
14048 fi
14049 rm -f conftest*
14050
14051 CPPFLAGS="$save_CPPFLAGS"
14052 fi
14053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
14054 $as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
14055 ;;
14056 esac
14057
14058 . ${srcdir}/configure.srv
14059
14060 if test "${srv_mingwce}" = "yes"; then
14061 LIBS="$LIBS -lws2"
14062 elif test "${srv_mingw}" = "yes"; then
14063 # WIN32APILIBS is set by GDB_AC_COMMON.
14064 LIBS="$LIBS $WIN32APILIBS"
14065 fi
14066
14067 if test "${srv_linux_usrregs}" = "yes"; then
14068
14069 $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
14070
14071 fi
14072
14073 if test "${srv_linux_regsets}" = "yes"; then
14074
14075 $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
14076
14077
14078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14079 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14080 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
14081 $as_echo_n "(cached) " >&6
14082 else
14083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14084 /* end confdefs.h. */
14085 #include <sys/ptrace.h>
14086 int
14087 main ()
14088 {
14089 PTRACE_GETREGS;
14090 ;
14091 return 0;
14092 }
14093 _ACEOF
14094 if ac_fn_c_try_compile "$LINENO"; then :
14095 gdbsrv_cv_have_ptrace_getregs=yes
14096 else
14097 gdbsrv_cv_have_ptrace_getregs=no
14098
14099 fi
14100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14101
14102 fi
14103
14104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
14105 $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
14106 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
14107
14108 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14109
14110 fi
14111
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14113 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14114 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
14115 $as_echo_n "(cached) " >&6
14116 else
14117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14118 /* end confdefs.h. */
14119 #include <sys/ptrace.h>
14120 int
14121 main ()
14122 {
14123 PTRACE_GETFPXREGS;
14124 ;
14125 return 0;
14126 }
14127 _ACEOF
14128 if ac_fn_c_try_compile "$LINENO"; then :
14129 gdbsrv_cv_have_ptrace_getfpxregs=yes
14130 else
14131 gdbsrv_cv_have_ptrace_getfpxregs=no
14132
14133 fi
14134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14135
14136 fi
14137
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
14139 $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
14140 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
14141
14142 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14143
14144 fi
14145 fi
14146
14147 if test "${srv_linux_btrace}" = "yes"; then
14148
14149 $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
14150
14151 fi
14152
14153 if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
14155 $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
14156 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
14157 $as_echo_n "(cached) " >&6
14158 else
14159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14160 /* end confdefs.h. */
14161 #include <thread_db.h>
14162 int
14163 main ()
14164 {
14165 lwpid_t avar
14166 ;
14167 return 0;
14168 }
14169 _ACEOF
14170 if ac_fn_c_try_compile "$LINENO"; then :
14171 gdbserver_cv_have_thread_db_type_lwpid_t=yes
14172 else
14173 gdbserver_cv_have_thread_db_type_lwpid_t=no
14174
14175 fi
14176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14177
14178 fi
14179
14180 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
14181
14182 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14183
14184 fi
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
14186 $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
14187
14188 fi
14189
14190 if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
14192 $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
14193 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
14194 $as_echo_n "(cached) " >&6
14195 else
14196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14197 /* end confdefs.h. */
14198 #include <thread_db.h>
14199 int
14200 main ()
14201 {
14202 psaddr_t avar
14203 ;
14204 return 0;
14205 }
14206 _ACEOF
14207 if ac_fn_c_try_compile "$LINENO"; then :
14208 gdbserver_cv_have_thread_db_type_psaddr_t=yes
14209 else
14210 gdbserver_cv_have_thread_db_type_psaddr_t=no
14211
14212 fi
14213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214
14215 fi
14216
14217 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
14218
14219 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14220
14221 fi
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
14223 $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
14224
14225 fi
14226
14227 old_LIBS="$LIBS"
14228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14229 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14230 if ${ac_cv_lib_dl_dlopen+:} false; then :
14231 $as_echo_n "(cached) " >&6
14232 else
14233 ac_check_lib_save_LIBS=$LIBS
14234 LIBS="-ldl $LIBS"
14235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236 /* end confdefs.h. */
14237
14238 /* Override any GCC internal prototype to avoid an error.
14239 Use char because int might match the return type of a GCC
14240 builtin and then its argument prototype would still apply. */
14241 #ifdef __cplusplus
14242 extern "C"
14243 #endif
14244 char dlopen ();
14245 int
14246 main ()
14247 {
14248 return dlopen ();
14249 ;
14250 return 0;
14251 }
14252 _ACEOF
14253 if ac_fn_c_try_link "$LINENO"; then :
14254 ac_cv_lib_dl_dlopen=yes
14255 else
14256 ac_cv_lib_dl_dlopen=no
14257 fi
14258 rm -f core conftest.err conftest.$ac_objext \
14259 conftest$ac_exeext conftest.$ac_ext
14260 LIBS=$ac_check_lib_save_LIBS
14261 fi
14262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14263 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14264 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14265 cat >>confdefs.h <<_ACEOF
14266 #define HAVE_LIBDL 1
14267 _ACEOF
14268
14269 LIBS="-ldl $LIBS"
14270
14271 fi
14272
14273 LIBS="$old_LIBS"
14274
14275 srv_thread_depfiles=
14276 srv_libs=
14277
14278 if test "$srv_linux_thread_db" = "yes"; then
14279 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
14280 srv_libs="-ldl"
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14282 $as_echo_n "checking for the dynamic export flag... " >&6; }
14283 old_LDFLAGS="$LDFLAGS"
14284 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
14285 # supported there.
14286 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14287 LDFLAGS="$LDFLAGS $RDYNAMIC"
14288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14289 /* end confdefs.h. */
14290
14291 int
14292 main ()
14293 {
14294
14295 ;
14296 return 0;
14297 }
14298 _ACEOF
14299 if ac_fn_c_try_link "$LINENO"; then :
14300 found="-Wl,--dynamic-list"
14301 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14302 else
14303 RDYNAMIC="-rdynamic"
14304 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
14305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14306 /* end confdefs.h. */
14307
14308 int
14309 main ()
14310 {
14311
14312 ;
14313 return 0;
14314 }
14315 _ACEOF
14316 if ac_fn_c_try_link "$LINENO"; then :
14317 found="-rdynamic"
14318 else
14319 found="no"
14320 RDYNAMIC=""
14321
14322 fi
14323 rm -f core conftest.err conftest.$ac_objext \
14324 conftest$ac_exeext conftest.$ac_ext
14325
14326 fi
14327 rm -f core conftest.err conftest.$ac_objext \
14328 conftest$ac_exeext conftest.$ac_ext
14329
14330 LDFLAGS="$old_LDFLAGS"
14331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14332 $as_echo "$found" >&6; }
14333 else
14334 srv_libs="-lthread_db"
14335 fi
14336
14337 srv_thread_depfiles="thread-db.o proc-service.o"
14338
14339 $as_echo "#define USE_THREAD_DB 1" >>confdefs.h
14340
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
14342 $as_echo_n "checking for TD_VERSION... " >&6; }
14343 if ${gdbsrv_cv_have_td_version+:} false; then :
14344 $as_echo_n "(cached) " >&6
14345 else
14346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14347 /* end confdefs.h. */
14348 #include <thread_db.h>
14349 int
14350 main ()
14351 {
14352 TD_VERSION;
14353 ;
14354 return 0;
14355 }
14356 _ACEOF
14357 if ac_fn_c_try_compile "$LINENO"; then :
14358 gdbsrv_cv_have_td_version=yes
14359 else
14360 gdbsrv_cv_have_td_version=no
14361
14362 fi
14363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14364
14365 fi
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
14367 $as_echo "$gdbsrv_cv_have_td_version" >&6; }
14368 if test "$gdbsrv_cv_have_td_version" = yes; then
14369
14370 $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
14371
14372 fi
14373 fi
14374
14375
14376 # Check whether --with-libthread-db was given.
14377 if test "${with_libthread_db+set}" = set; then :
14378 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
14379 srv_libs="$srv_libthread_db_path"
14380
14381 fi
14382
14383
14384 if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
14385
14386 $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
14387
14388 fi
14389
14390 if test "$srv_xmlfiles" != ""; then
14391 srv_xmlbuiltin="xml-builtin.o"
14392
14393 $as_echo "#define USE_XML 1" >>confdefs.h
14394
14395
14396 tmp_xmlfiles=$srv_xmlfiles
14397 srv_xmlfiles=""
14398 for f in $tmp_xmlfiles; do
14399 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
14400 done
14401 fi
14402
14403 GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
14404 GDBSERVER_LIBS="$srv_libs"
14405
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
14407 $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
14408 if ${gdbsrv_cv_have_sync_builtins+:} false; then :
14409 $as_echo_n "(cached) " >&6
14410 else
14411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14412 /* end confdefs.h. */
14413
14414 int
14415 main ()
14416 {
14417 int foo, bar;
14418 bar = __sync_val_compare_and_swap(&foo, 0, 1);
14419
14420 ;
14421 return 0;
14422 }
14423 _ACEOF
14424 if ac_fn_c_try_link "$LINENO"; then :
14425 gdbsrv_cv_have_sync_builtins=yes
14426 else
14427 gdbsrv_cv_have_sync_builtins=no
14428
14429 fi
14430 rm -f core conftest.err conftest.$ac_objext \
14431 conftest$ac_exeext conftest.$ac_ext
14432
14433 fi
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
14435 $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
14436 if test "$gdbsrv_cv_have_sync_builtins" = yes; then
14437
14438 $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
14439
14440 fi
14441
14442 saved_cflags="$CFLAGS"
14443 CFLAGS="$CFLAGS -fvisibility=hidden"
14444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445 /* end confdefs.h. */
14446
14447 int
14448 main ()
14449 {
14450
14451 ;
14452 return 0;
14453 }
14454 _ACEOF
14455 if ac_fn_c_try_compile "$LINENO"; then :
14456 gdbsrv_cv_have_visibility_hidden=yes
14457 else
14458 gdbsrv_cv_have_visibility_hidden=no
14459 fi
14460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14461 CFLAGS="$saved_cflags"
14462
14463 IPA_DEPFILES=""
14464 extra_libraries=""
14465
14466 # check whether to enable the inprocess agent
14467 if test "$ipa_obj" != "" \
14468 -a "$gdbsrv_cv_have_sync_builtins" = yes \
14469 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
14470 have_ipa=true
14471 else
14472 have_ipa=false
14473 fi
14474
14475 # Check whether --enable-inprocess-agent was given.
14476 if test "${enable_inprocess_agent+set}" = set; then :
14477 enableval=$enable_inprocess_agent; case "$enableval" in
14478 yes) want_ipa=true ;;
14479 no) want_ipa=false ;;
14480 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
14481 esac
14482 else
14483 want_ipa=$have_ipa
14484 fi
14485
14486
14487 if $want_ipa ; then
14488 if $have_ipa ; then
14489 IPA_DEPFILES="$ipa_obj"
14490 extra_libraries="$extra_libraries libinproctrace.so"
14491 else
14492 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
14493 fi
14494 fi
14495
14496
14497
14498
14499
14500
14501
14502
14503 GNULIB=../gnulib/import
14504
14505 GNULIB_STDINT_H=
14506 if test x"$STDINT_H" != x; then
14507 GNULIB_STDINT_H=$GNULIB/$STDINT_H
14508 fi
14509
14510
14511 # Check for libiconv. It is a requirement for Linux hosts, and others hosts
14512 # don't use it at all. Define MAYBE_LIBICONV only if the host is Linux.
14513
14514
14515
14516
14517
14518 am_save_CPPFLAGS="$CPPFLAGS"
14519
14520 for element in $INCICONV; do
14521 haveit=
14522 for x in $CPPFLAGS; do
14523
14524 acl_save_prefix="$prefix"
14525 prefix="$acl_final_prefix"
14526 acl_save_exec_prefix="$exec_prefix"
14527 exec_prefix="$acl_final_exec_prefix"
14528 eval x=\"$x\"
14529 exec_prefix="$acl_save_exec_prefix"
14530 prefix="$acl_save_prefix"
14531
14532 if test "X$x" = "X$element"; then
14533 haveit=yes
14534 break
14535 fi
14536 done
14537 if test -z "$haveit"; then
14538 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14539 fi
14540 done
14541
14542
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14544 $as_echo_n "checking for iconv... " >&6; }
14545 if ${am_cv_func_iconv+:} false; then :
14546 $as_echo_n "(cached) " >&6
14547 else
14548
14549 am_cv_func_iconv="no, consider installing GNU libiconv"
14550 am_cv_lib_iconv=no
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552 /* end confdefs.h. */
14553
14554 #include <stdlib.h>
14555 #include <iconv.h>
14556
14557 int
14558 main ()
14559 {
14560 iconv_t cd = iconv_open("","");
14561 iconv(cd,NULL,NULL,NULL,NULL);
14562 iconv_close(cd);
14563 ;
14564 return 0;
14565 }
14566 _ACEOF
14567 if ac_fn_c_try_link "$LINENO"; then :
14568 am_cv_func_iconv=yes
14569 fi
14570 rm -f core conftest.err conftest.$ac_objext \
14571 conftest$ac_exeext conftest.$ac_ext
14572 if test "$am_cv_func_iconv" != yes; then
14573 am_save_LIBS="$LIBS"
14574 LIBS="$LIBS $LIBICONV"
14575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14576 /* end confdefs.h. */
14577
14578 #include <stdlib.h>
14579 #include <iconv.h>
14580
14581 int
14582 main ()
14583 {
14584 iconv_t cd = iconv_open("","");
14585 iconv(cd,NULL,NULL,NULL,NULL);
14586 iconv_close(cd);
14587 ;
14588 return 0;
14589 }
14590 _ACEOF
14591 if ac_fn_c_try_link "$LINENO"; then :
14592 am_cv_lib_iconv=yes
14593 am_cv_func_iconv=yes
14594 fi
14595 rm -f core conftest.err conftest.$ac_objext \
14596 conftest$ac_exeext conftest.$ac_ext
14597 LIBS="$am_save_LIBS"
14598 fi
14599
14600 fi
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14602 $as_echo "$am_cv_func_iconv" >&6; }
14603 if test "$am_cv_func_iconv" = yes; then
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14605 $as_echo_n "checking for working iconv... " >&6; }
14606 if ${am_cv_func_iconv_works+:} false; then :
14607 $as_echo_n "(cached) " >&6
14608 else
14609
14610 am_save_LIBS="$LIBS"
14611 if test $am_cv_lib_iconv = yes; then
14612 LIBS="$LIBS $LIBICONV"
14613 fi
14614 am_cv_func_iconv_works=no
14615 for ac_iconv_const in '' 'const'; do
14616 if test "$cross_compiling" = yes; then :
14617 case "$host_os" in
14618 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14619 *) am_cv_func_iconv_works="guessing yes" ;;
14620 esac
14621 else
14622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14623 /* end confdefs.h. */
14624
14625 #include <iconv.h>
14626 #include <string.h>
14627
14628 #ifndef ICONV_CONST
14629 # define ICONV_CONST $ac_iconv_const
14630 #endif
14631
14632 int
14633 main ()
14634 {
14635 int result = 0;
14636 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14637 successful returns. This is even documented in
14638 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14639 {
14640 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14641 if (cd_utf8_to_88591 != (iconv_t)(-1))
14642 {
14643 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14644 char buf[10];
14645 ICONV_CONST char *inptr = input;
14646 size_t inbytesleft = strlen (input);
14647 char *outptr = buf;
14648 size_t outbytesleft = sizeof (buf);
14649 size_t res = iconv (cd_utf8_to_88591,
14650 &inptr, &inbytesleft,
14651 &outptr, &outbytesleft);
14652 if (res == 0)
14653 result |= 1;
14654 iconv_close (cd_utf8_to_88591);
14655 }
14656 }
14657 /* Test against Solaris 10 bug: Failures are not distinguishable from
14658 successful returns. */
14659 {
14660 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14661 if (cd_ascii_to_88591 != (iconv_t)(-1))
14662 {
14663 static ICONV_CONST char input[] = "\263";
14664 char buf[10];
14665 ICONV_CONST char *inptr = input;
14666 size_t inbytesleft = strlen (input);
14667 char *outptr = buf;
14668 size_t outbytesleft = sizeof (buf);
14669 size_t res = iconv (cd_ascii_to_88591,
14670 &inptr, &inbytesleft,
14671 &outptr, &outbytesleft);
14672 if (res == 0)
14673 result |= 2;
14674 iconv_close (cd_ascii_to_88591);
14675 }
14676 }
14677 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14678 {
14679 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14680 if (cd_88591_to_utf8 != (iconv_t)(-1))
14681 {
14682 static ICONV_CONST char input[] = "\304";
14683 static char buf[2] = { (char)0xDE, (char)0xAD };
14684 ICONV_CONST char *inptr = input;
14685 size_t inbytesleft = 1;
14686 char *outptr = buf;
14687 size_t outbytesleft = 1;
14688 size_t res = iconv (cd_88591_to_utf8,
14689 &inptr, &inbytesleft,
14690 &outptr, &outbytesleft);
14691 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14692 result |= 4;
14693 iconv_close (cd_88591_to_utf8);
14694 }
14695 }
14696 #if 0 /* This bug could be worked around by the caller. */
14697 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
14698 {
14699 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14700 if (cd_88591_to_utf8 != (iconv_t)(-1))
14701 {
14702 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14703 char buf[50];
14704 ICONV_CONST char *inptr = input;
14705 size_t inbytesleft = strlen (input);
14706 char *outptr = buf;
14707 size_t outbytesleft = sizeof (buf);
14708 size_t res = iconv (cd_88591_to_utf8,
14709 &inptr, &inbytesleft,
14710 &outptr, &outbytesleft);
14711 if ((int)res > 0)
14712 result |= 8;
14713 iconv_close (cd_88591_to_utf8);
14714 }
14715 }
14716 #endif
14717 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14718 provided. */
14719 {
14720 /* Try standardized names. */
14721 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
14722 /* Try IRIX, OSF/1 names. */
14723 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
14724 /* Try AIX names. */
14725 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
14726 /* Try HP-UX names. */
14727 iconv_t cd4 = iconv_open ("utf8", "eucJP");
14728 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
14729 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
14730 result |= 16;
14731 if (cd1 != (iconv_t)(-1))
14732 iconv_close (cd1);
14733 if (cd2 != (iconv_t)(-1))
14734 iconv_close (cd2);
14735 if (cd3 != (iconv_t)(-1))
14736 iconv_close (cd3);
14737 if (cd4 != (iconv_t)(-1))
14738 iconv_close (cd4);
14739 }
14740 return result;
14741
14742 ;
14743 return 0;
14744 }
14745 _ACEOF
14746 if ac_fn_c_try_run "$LINENO"; then :
14747 am_cv_func_iconv_works=yes
14748 fi
14749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14750 conftest.$ac_objext conftest.beam conftest.$ac_ext
14751 fi
14752
14753 test "$am_cv_func_iconv_works" = no || break
14754 done
14755 LIBS="$am_save_LIBS"
14756
14757 fi
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14759 $as_echo "$am_cv_func_iconv_works" >&6; }
14760 case "$am_cv_func_iconv_works" in
14761 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14762 *) am_func_iconv=yes ;;
14763 esac
14764 else
14765 am_func_iconv=no am_cv_lib_iconv=no
14766 fi
14767 if test "$am_func_iconv" = yes; then
14768
14769 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
14770
14771 fi
14772 if test "$am_cv_lib_iconv" = yes; then
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14774 $as_echo_n "checking how to link with libiconv... " >&6; }
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14776 $as_echo "$LIBICONV" >&6; }
14777 else
14778 CPPFLAGS="$am_save_CPPFLAGS"
14779 LIBICONV=
14780 LTLIBICONV=
14781 fi
14782
14783
14784
14785 if test "$am_cv_func_iconv" = yes; then
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
14787 $as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
14788 if ${gl_cv_iconv_nonconst+:} false; then :
14789 $as_echo_n "(cached) " >&6
14790 else
14791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14792 /* end confdefs.h. */
14793
14794 #include <stdlib.h>
14795 #include <iconv.h>
14796 extern
14797 #ifdef __cplusplus
14798 "C"
14799 #endif
14800 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
14801
14802 int
14803 main ()
14804 {
14805
14806 ;
14807 return 0;
14808 }
14809 _ACEOF
14810 if ac_fn_c_try_compile "$LINENO"; then :
14811 gl_cv_iconv_nonconst=yes
14812 else
14813 gl_cv_iconv_nonconst=no
14814 fi
14815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14816
14817 fi
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
14819 $as_echo "$gl_cv_iconv_nonconst" >&6; }
14820 else
14821 gl_cv_iconv_nonconst=yes
14822 fi
14823 if test $gl_cv_iconv_nonconst = yes; then
14824 iconv_arg1=""
14825 else
14826 iconv_arg1="const"
14827 fi
14828
14829 cat >>confdefs.h <<_ACEOF
14830 #define ICONV_CONST $iconv_arg1
14831 _ACEOF
14832
14833
14834
14835 if test "$am_func_iconv" = yes; then
14836 if test -n "$LIBICONV"; then
14837 am_cv_func_iconv_summary='yes, in libiconv'
14838 else
14839 am_cv_func_iconv_summary='yes, in libc'
14840 fi
14841 else
14842 if test "$am_cv_func_iconv" = yes; then
14843 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
14844 else
14845 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
14846 fi
14847 fi
14848
14849 MAYBE_LIBICONV=
14850 case "$host" in
14851 *linux*)
14852 if test "$am_cv_func_iconv" != yes; then
14853 as_fn_error $? "could not find libiconv (required for host $host)" "$LINENO" 5
14854 fi
14855
14856 MAYBE_LIBICONV="$LIBICONV"
14857 ;;
14858 esac
14859
14860
14861
14862 ac_config_files="$ac_config_files Makefile"
14863
14864
14865 cat >confcache <<\_ACEOF
14866 # This file is a shell script that caches the results of configure
14867 # tests run on this system so they can be shared between configure
14868 # scripts and configure runs, see configure's option --config-cache.
14869 # It is not useful on other systems. If it contains results you don't
14870 # want to keep, you may remove or edit it.
14871 #
14872 # config.status only pays attention to the cache file if you give it
14873 # the --recheck option to rerun configure.
14874 #
14875 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14876 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14877 # following values.
14878
14879 _ACEOF
14880
14881 # The following way of writing the cache mishandles newlines in values,
14882 # but we know of no workaround that is simple, portable, and efficient.
14883 # So, we kill variables containing newlines.
14884 # Ultrix sh set writes to stderr and can't be redirected directly,
14885 # and sets the high bit in the cache file unless we assign to the vars.
14886 (
14887 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14888 eval ac_val=\$$ac_var
14889 case $ac_val in #(
14890 *${as_nl}*)
14891 case $ac_var in #(
14892 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14893 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14894 esac
14895 case $ac_var in #(
14896 _ | IFS | as_nl) ;; #(
14897 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14898 *) { eval $ac_var=; unset $ac_var;} ;;
14899 esac ;;
14900 esac
14901 done
14902
14903 (set) 2>&1 |
14904 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14905 *${as_nl}ac_space=\ *)
14906 # `set' does not quote correctly, so add quotes: double-quote
14907 # substitution turns \\\\ into \\, and sed turns \\ into \.
14908 sed -n \
14909 "s/'/'\\\\''/g;
14910 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14911 ;; #(
14912 *)
14913 # `set' quotes correctly as required by POSIX, so do not add quotes.
14914 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14915 ;;
14916 esac |
14917 sort
14918 ) |
14919 sed '
14920 /^ac_cv_env_/b end
14921 t clear
14922 :clear
14923 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14924 t end
14925 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14926 :end' >>confcache
14927 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14928 if test -w "$cache_file"; then
14929 if test "x$cache_file" != "x/dev/null"; then
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14931 $as_echo "$as_me: updating cache $cache_file" >&6;}
14932 if test ! -f "$cache_file" || test -h "$cache_file"; then
14933 cat confcache >"$cache_file"
14934 else
14935 case $cache_file in #(
14936 */* | ?:*)
14937 mv -f confcache "$cache_file"$$ &&
14938 mv -f "$cache_file"$$ "$cache_file" ;; #(
14939 *)
14940 mv -f confcache "$cache_file" ;;
14941 esac
14942 fi
14943 fi
14944 else
14945 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14946 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14947 fi
14948 fi
14949 rm -f confcache
14950
14951 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14952 # Let make expand exec_prefix.
14953 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14954
14955 DEFS=-DHAVE_CONFIG_H
14956
14957 ac_libobjs=
14958 ac_ltlibobjs=
14959 U=
14960 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14961 # 1. Remove the extension, and $U if already installed.
14962 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14963 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14964 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14965 # will be set to the directory where LIBOBJS objects are built.
14966 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14967 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14968 done
14969 LIBOBJS=$ac_libobjs
14970
14971 LTLIBOBJS=$ac_ltlibobjs
14972
14973
14974 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
14975 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
14976 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14977 fi
14978
14979 : "${CONFIG_STATUS=./config.status}"
14980 ac_write_fail=0
14981 ac_clean_files_save=$ac_clean_files
14982 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14983 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14984 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14985 as_write_fail=0
14986 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14987 #! $SHELL
14988 # Generated by $as_me.
14989 # Run this file to recreate the current configuration.
14990 # Compiler output produced by configure, useful for debugging
14991 # configure, is in config.log if it exists.
14992
14993 debug=false
14994 ac_cs_recheck=false
14995 ac_cs_silent=false
14996
14997 SHELL=\${CONFIG_SHELL-$SHELL}
14998 export SHELL
14999 _ASEOF
15000 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15001 ## -------------------- ##
15002 ## M4sh Initialization. ##
15003 ## -------------------- ##
15004
15005 # Be more Bourne compatible
15006 DUALCASE=1; export DUALCASE # for MKS sh
15007 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15008 emulate sh
15009 NULLCMD=:
15010 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15011 # is contrary to our usage. Disable this feature.
15012 alias -g '${1+"$@"}'='"$@"'
15013 setopt NO_GLOB_SUBST
15014 else
15015 case `(set -o) 2>/dev/null` in #(
15016 *posix*) :
15017 set -o posix ;; #(
15018 *) :
15019 ;;
15020 esac
15021 fi
15022
15023
15024 as_nl='
15025 '
15026 export as_nl
15027 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15028 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15029 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15030 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15031 # Prefer a ksh shell builtin over an external printf program on Solaris,
15032 # but without wasting forks for bash or zsh.
15033 if test -z "$BASH_VERSION$ZSH_VERSION" \
15034 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15035 as_echo='print -r --'
15036 as_echo_n='print -rn --'
15037 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15038 as_echo='printf %s\n'
15039 as_echo_n='printf %s'
15040 else
15041 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15042 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15043 as_echo_n='/usr/ucb/echo -n'
15044 else
15045 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15046 as_echo_n_body='eval
15047 arg=$1;
15048 case $arg in #(
15049 *"$as_nl"*)
15050 expr "X$arg" : "X\\(.*\\)$as_nl";
15051 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15052 esac;
15053 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15054 '
15055 export as_echo_n_body
15056 as_echo_n='sh -c $as_echo_n_body as_echo'
15057 fi
15058 export as_echo_body
15059 as_echo='sh -c $as_echo_body as_echo'
15060 fi
15061
15062 # The user is always right.
15063 if test "${PATH_SEPARATOR+set}" != set; then
15064 PATH_SEPARATOR=:
15065 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15066 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15067 PATH_SEPARATOR=';'
15068 }
15069 fi
15070
15071
15072 # IFS
15073 # We need space, tab and new line, in precisely that order. Quoting is
15074 # there to prevent editors from complaining about space-tab.
15075 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15076 # splitting by setting IFS to empty value.)
15077 IFS=" "" $as_nl"
15078
15079 # Find who we are. Look in the path if we contain no directory separator.
15080 as_myself=
15081 case $0 in #((
15082 *[\\/]* ) as_myself=$0 ;;
15083 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15084 for as_dir in $PATH
15085 do
15086 IFS=$as_save_IFS
15087 test -z "$as_dir" && as_dir=.
15088 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15089 done
15090 IFS=$as_save_IFS
15091
15092 ;;
15093 esac
15094 # We did not find ourselves, most probably we were run as `sh COMMAND'
15095 # in which case we are not to be found in the path.
15096 if test "x$as_myself" = x; then
15097 as_myself=$0
15098 fi
15099 if test ! -f "$as_myself"; then
15100 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15101 exit 1
15102 fi
15103
15104 # Unset variables that we do not need and which cause bugs (e.g. in
15105 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15106 # suppresses any "Segmentation fault" message there. '((' could
15107 # trigger a bug in pdksh 5.2.14.
15108 for as_var in BASH_ENV ENV MAIL MAILPATH
15109 do eval test x\${$as_var+set} = xset \
15110 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15111 done
15112 PS1='$ '
15113 PS2='> '
15114 PS4='+ '
15115
15116 # NLS nuisances.
15117 LC_ALL=C
15118 export LC_ALL
15119 LANGUAGE=C
15120 export LANGUAGE
15121
15122 # CDPATH.
15123 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15124
15125
15126 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15127 # ----------------------------------------
15128 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15129 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15130 # script with STATUS, using 1 if that was 0.
15131 as_fn_error ()
15132 {
15133 as_status=$1; test $as_status -eq 0 && as_status=1
15134 if test "$4"; then
15135 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15136 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15137 fi
15138 $as_echo "$as_me: error: $2" >&2
15139 as_fn_exit $as_status
15140 } # as_fn_error
15141
15142
15143 # as_fn_set_status STATUS
15144 # -----------------------
15145 # Set $? to STATUS, without forking.
15146 as_fn_set_status ()
15147 {
15148 return $1
15149 } # as_fn_set_status
15150
15151 # as_fn_exit STATUS
15152 # -----------------
15153 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15154 as_fn_exit ()
15155 {
15156 set +e
15157 as_fn_set_status $1
15158 exit $1
15159 } # as_fn_exit
15160
15161 # as_fn_unset VAR
15162 # ---------------
15163 # Portably unset VAR.
15164 as_fn_unset ()
15165 {
15166 { eval $1=; unset $1;}
15167 }
15168 as_unset=as_fn_unset
15169 # as_fn_append VAR VALUE
15170 # ----------------------
15171 # Append the text in VALUE to the end of the definition contained in VAR. Take
15172 # advantage of any shell optimizations that allow amortized linear growth over
15173 # repeated appends, instead of the typical quadratic growth present in naive
15174 # implementations.
15175 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15176 eval 'as_fn_append ()
15177 {
15178 eval $1+=\$2
15179 }'
15180 else
15181 as_fn_append ()
15182 {
15183 eval $1=\$$1\$2
15184 }
15185 fi # as_fn_append
15186
15187 # as_fn_arith ARG...
15188 # ------------------
15189 # Perform arithmetic evaluation on the ARGs, and store the result in the
15190 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15191 # must be portable across $(()) and expr.
15192 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15193 eval 'as_fn_arith ()
15194 {
15195 as_val=$(( $* ))
15196 }'
15197 else
15198 as_fn_arith ()
15199 {
15200 as_val=`expr "$@" || test $? -eq 1`
15201 }
15202 fi # as_fn_arith
15203
15204
15205 if expr a : '\(a\)' >/dev/null 2>&1 &&
15206 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15207 as_expr=expr
15208 else
15209 as_expr=false
15210 fi
15211
15212 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15213 as_basename=basename
15214 else
15215 as_basename=false
15216 fi
15217
15218 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15219 as_dirname=dirname
15220 else
15221 as_dirname=false
15222 fi
15223
15224 as_me=`$as_basename -- "$0" ||
15225 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15226 X"$0" : 'X\(//\)$' \| \
15227 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15228 $as_echo X/"$0" |
15229 sed '/^.*\/\([^/][^/]*\)\/*$/{
15230 s//\1/
15231 q
15232 }
15233 /^X\/\(\/\/\)$/{
15234 s//\1/
15235 q
15236 }
15237 /^X\/\(\/\).*/{
15238 s//\1/
15239 q
15240 }
15241 s/.*/./; q'`
15242
15243 # Avoid depending upon Character Ranges.
15244 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15245 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15246 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15247 as_cr_digits='0123456789'
15248 as_cr_alnum=$as_cr_Letters$as_cr_digits
15249
15250 ECHO_C= ECHO_N= ECHO_T=
15251 case `echo -n x` in #(((((
15252 -n*)
15253 case `echo 'xy\c'` in
15254 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15255 xy) ECHO_C='\c';;
15256 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15257 ECHO_T=' ';;
15258 esac;;
15259 *)
15260 ECHO_N='-n';;
15261 esac
15262
15263 rm -f conf$$ conf$$.exe conf$$.file
15264 if test -d conf$$.dir; then
15265 rm -f conf$$.dir/conf$$.file
15266 else
15267 rm -f conf$$.dir
15268 mkdir conf$$.dir 2>/dev/null
15269 fi
15270 if (echo >conf$$.file) 2>/dev/null; then
15271 if ln -s conf$$.file conf$$ 2>/dev/null; then
15272 as_ln_s='ln -s'
15273 # ... but there are two gotchas:
15274 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15275 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15276 # In both cases, we have to default to `cp -pR'.
15277 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15278 as_ln_s='cp -pR'
15279 elif ln conf$$.file conf$$ 2>/dev/null; then
15280 as_ln_s=ln
15281 else
15282 as_ln_s='cp -pR'
15283 fi
15284 else
15285 as_ln_s='cp -pR'
15286 fi
15287 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15288 rmdir conf$$.dir 2>/dev/null
15289
15290
15291 # as_fn_mkdir_p
15292 # -------------
15293 # Create "$as_dir" as a directory, including parents if necessary.
15294 as_fn_mkdir_p ()
15295 {
15296
15297 case $as_dir in #(
15298 -*) as_dir=./$as_dir;;
15299 esac
15300 test -d "$as_dir" || eval $as_mkdir_p || {
15301 as_dirs=
15302 while :; do
15303 case $as_dir in #(
15304 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15305 *) as_qdir=$as_dir;;
15306 esac
15307 as_dirs="'$as_qdir' $as_dirs"
15308 as_dir=`$as_dirname -- "$as_dir" ||
15309 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15310 X"$as_dir" : 'X\(//\)[^/]' \| \
15311 X"$as_dir" : 'X\(//\)$' \| \
15312 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15313 $as_echo X"$as_dir" |
15314 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15315 s//\1/
15316 q
15317 }
15318 /^X\(\/\/\)[^/].*/{
15319 s//\1/
15320 q
15321 }
15322 /^X\(\/\/\)$/{
15323 s//\1/
15324 q
15325 }
15326 /^X\(\/\).*/{
15327 s//\1/
15328 q
15329 }
15330 s/.*/./; q'`
15331 test -d "$as_dir" && break
15332 done
15333 test -z "$as_dirs" || eval "mkdir $as_dirs"
15334 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15335
15336
15337 } # as_fn_mkdir_p
15338 if mkdir -p . 2>/dev/null; then
15339 as_mkdir_p='mkdir -p "$as_dir"'
15340 else
15341 test -d ./-p && rmdir ./-p
15342 as_mkdir_p=false
15343 fi
15344
15345
15346 # as_fn_executable_p FILE
15347 # -----------------------
15348 # Test if FILE is an executable regular file.
15349 as_fn_executable_p ()
15350 {
15351 test -f "$1" && test -x "$1"
15352 } # as_fn_executable_p
15353 as_test_x='test -x'
15354 as_executable_p=as_fn_executable_p
15355
15356 # Sed expression to map a string onto a valid CPP name.
15357 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15358
15359 # Sed expression to map a string onto a valid variable name.
15360 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15361
15362
15363 exec 6>&1
15364 ## ----------------------------------- ##
15365 ## Main body of $CONFIG_STATUS script. ##
15366 ## ----------------------------------- ##
15367 _ASEOF
15368 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15369
15370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15371 # Save the log message, to keep $0 and so on meaningful, and to
15372 # report actual input values of CONFIG_FILES etc. instead of their
15373 # values after options handling.
15374 ac_log="
15375 This file was extended by $as_me, which was
15376 generated by GNU Autoconf 2.69. Invocation command line was
15377
15378 CONFIG_FILES = $CONFIG_FILES
15379 CONFIG_HEADERS = $CONFIG_HEADERS
15380 CONFIG_LINKS = $CONFIG_LINKS
15381 CONFIG_COMMANDS = $CONFIG_COMMANDS
15382 $ $0 $@
15383
15384 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15385 "
15386
15387 _ACEOF
15388
15389 case $ac_config_files in *"
15390 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15391 esac
15392
15393 case $ac_config_headers in *"
15394 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15395 esac
15396
15397
15398 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15399 # Files that config.status was made for.
15400 config_files="$ac_config_files"
15401 config_headers="$ac_config_headers"
15402 config_commands="$ac_config_commands"
15403
15404 _ACEOF
15405
15406 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15407 ac_cs_usage="\
15408 \`$as_me' instantiates files and other configuration actions
15409 from templates according to the current configuration. Unless the files
15410 and actions are specified as TAGs, all are instantiated by default.
15411
15412 Usage: $0 [OPTION]... [TAG]...
15413
15414 -h, --help print this help, then exit
15415 -V, --version print version number and configuration settings, then exit
15416 --config print configuration, then exit
15417 -q, --quiet, --silent
15418 do not print progress messages
15419 -d, --debug don't remove temporary files
15420 --recheck update $as_me by reconfiguring in the same conditions
15421 --file=FILE[:TEMPLATE]
15422 instantiate the configuration file FILE
15423 --header=FILE[:TEMPLATE]
15424 instantiate the configuration header FILE
15425
15426 Configuration files:
15427 $config_files
15428
15429 Configuration headers:
15430 $config_headers
15431
15432 Configuration commands:
15433 $config_commands
15434
15435 Report bugs to the package provider."
15436
15437 _ACEOF
15438 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15439 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15440 ac_cs_version="\\
15441 config.status
15442 configured by $0, generated by GNU Autoconf 2.69,
15443 with options \\"\$ac_cs_config\\"
15444
15445 Copyright (C) 2012 Free Software Foundation, Inc.
15446 This config.status script is free software; the Free Software Foundation
15447 gives unlimited permission to copy, distribute and modify it."
15448
15449 ac_pwd='$ac_pwd'
15450 srcdir='$srcdir'
15451 INSTALL='$INSTALL'
15452 test -n "\$AWK" || AWK=awk
15453 _ACEOF
15454
15455 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15456 # The default lists apply if the user does not specify any file.
15457 ac_need_defaults=:
15458 while test $# != 0
15459 do
15460 case $1 in
15461 --*=?*)
15462 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15463 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15464 ac_shift=:
15465 ;;
15466 --*=)
15467 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15468 ac_optarg=
15469 ac_shift=:
15470 ;;
15471 *)
15472 ac_option=$1
15473 ac_optarg=$2
15474 ac_shift=shift
15475 ;;
15476 esac
15477
15478 case $ac_option in
15479 # Handling of the options.
15480 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15481 ac_cs_recheck=: ;;
15482 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15483 $as_echo "$ac_cs_version"; exit ;;
15484 --config | --confi | --conf | --con | --co | --c )
15485 $as_echo "$ac_cs_config"; exit ;;
15486 --debug | --debu | --deb | --de | --d | -d )
15487 debug=: ;;
15488 --file | --fil | --fi | --f )
15489 $ac_shift
15490 case $ac_optarg in
15491 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15492 '') as_fn_error $? "missing file argument" ;;
15493 esac
15494 as_fn_append CONFIG_FILES " '$ac_optarg'"
15495 ac_need_defaults=false;;
15496 --header | --heade | --head | --hea )
15497 $ac_shift
15498 case $ac_optarg in
15499 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15500 esac
15501 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15502 ac_need_defaults=false;;
15503 --he | --h)
15504 # Conflict between --help and --header
15505 as_fn_error $? "ambiguous option: \`$1'
15506 Try \`$0 --help' for more information.";;
15507 --help | --hel | -h )
15508 $as_echo "$ac_cs_usage"; exit ;;
15509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15510 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15511 ac_cs_silent=: ;;
15512
15513 # This is an error.
15514 -*) as_fn_error $? "unrecognized option: \`$1'
15515 Try \`$0 --help' for more information." ;;
15516
15517 *) as_fn_append ac_config_targets " $1"
15518 ac_need_defaults=false ;;
15519
15520 esac
15521 shift
15522 done
15523
15524 ac_configure_extra_args=
15525
15526 if $ac_cs_silent; then
15527 exec 6>/dev/null
15528 ac_configure_extra_args="$ac_configure_extra_args --silent"
15529 fi
15530
15531 _ACEOF
15532 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15533 if \$ac_cs_recheck; then
15534 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15535 shift
15536 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15537 CONFIG_SHELL='$SHELL'
15538 export CONFIG_SHELL
15539 exec "\$@"
15540 fi
15541
15542 _ACEOF
15543 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15544 exec 5>>config.log
15545 {
15546 echo
15547 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15548 ## Running $as_me. ##
15549 _ASBOX
15550 $as_echo "$ac_log"
15551 } >&5
15552
15553 _ACEOF
15554 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15555 #
15556 # INIT-COMMANDS
15557 #
15558 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
15559 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
15560 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
15561 # from automake.
15562 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
15563 # Capture the value of LINGUAS because we need it to compute CATALOGS.
15564 LINGUAS="${LINGUAS-%UNSET%}"
15565
15566 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
15567
15568 _ACEOF
15569
15570 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15571
15572 # Handling of arguments.
15573 for ac_config_target in $ac_config_targets
15574 do
15575 case $ac_config_target in
15576 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15577 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15578 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
15579 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
15580 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15581
15582 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15583 esac
15584 done
15585
15586
15587 # If the user did not use the arguments to specify the items to instantiate,
15588 # then the envvar interface is used. Set only those that are not.
15589 # We use the long form for the default assignment because of an extremely
15590 # bizarre bug on SunOS 4.1.3.
15591 if $ac_need_defaults; then
15592 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15593 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15594 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15595 fi
15596
15597 # Have a temporary directory for convenience. Make it in the build tree
15598 # simply because there is no reason against having it here, and in addition,
15599 # creating and moving files from /tmp can sometimes cause problems.
15600 # Hook for its removal unless debugging.
15601 # Note that there is a small window in which the directory will not be cleaned:
15602 # after its creation but before its name has been assigned to `$tmp'.
15603 $debug ||
15604 {
15605 tmp= ac_tmp=
15606 trap 'exit_status=$?
15607 : "${ac_tmp:=$tmp}"
15608 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15609 ' 0
15610 trap 'as_fn_exit 1' 1 2 13 15
15611 }
15612 # Create a (secure) tmp directory for tmp files.
15613
15614 {
15615 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15616 test -d "$tmp"
15617 } ||
15618 {
15619 tmp=./conf$$-$RANDOM
15620 (umask 077 && mkdir "$tmp")
15621 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15622 ac_tmp=$tmp
15623
15624 # Set up the scripts for CONFIG_FILES section.
15625 # No need to generate them if there are no CONFIG_FILES.
15626 # This happens for instance with `./config.status config.h'.
15627 if test -n "$CONFIG_FILES"; then
15628
15629
15630 ac_cr=`echo X | tr X '\015'`
15631 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15632 # But we know of no other shell where ac_cr would be empty at this
15633 # point, so we can use a bashism as a fallback.
15634 if test "x$ac_cr" = x; then
15635 eval ac_cr=\$\'\\r\'
15636 fi
15637 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15638 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15639 ac_cs_awk_cr='\\r'
15640 else
15641 ac_cs_awk_cr=$ac_cr
15642 fi
15643
15644 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15645 _ACEOF
15646
15647
15648 {
15649 echo "cat >conf$$subs.awk <<_ACEOF" &&
15650 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15651 echo "_ACEOF"
15652 } >conf$$subs.sh ||
15653 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15654 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15655 ac_delim='%!_!# '
15656 for ac_last_try in false false false false false :; do
15657 . ./conf$$subs.sh ||
15658 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15659
15660 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15661 if test $ac_delim_n = $ac_delim_num; then
15662 break
15663 elif $ac_last_try; then
15664 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15665 else
15666 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15667 fi
15668 done
15669 rm -f conf$$subs.sh
15670
15671 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15672 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15673 _ACEOF
15674 sed -n '
15675 h
15676 s/^/S["/; s/!.*/"]=/
15677 p
15678 g
15679 s/^[^!]*!//
15680 :repl
15681 t repl
15682 s/'"$ac_delim"'$//
15683 t delim
15684 :nl
15685 h
15686 s/\(.\{148\}\)..*/\1/
15687 t more1
15688 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15689 p
15690 n
15691 b repl
15692 :more1
15693 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15694 p
15695 g
15696 s/.\{148\}//
15697 t nl
15698 :delim
15699 h
15700 s/\(.\{148\}\)..*/\1/
15701 t more2
15702 s/["\\]/\\&/g; s/^/"/; s/$/"/
15703 p
15704 b
15705 :more2
15706 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15707 p
15708 g
15709 s/.\{148\}//
15710 t delim
15711 ' <conf$$subs.awk | sed '
15712 /^[^""]/{
15713 N
15714 s/\n//
15715 }
15716 ' >>$CONFIG_STATUS || ac_write_fail=1
15717 rm -f conf$$subs.awk
15718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15719 _ACAWK
15720 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15721 for (key in S) S_is_set[key] = 1
15722 FS = ""
15723
15724 }
15725 {
15726 line = $ 0
15727 nfields = split(line, field, "@")
15728 substed = 0
15729 len = length(field[1])
15730 for (i = 2; i < nfields; i++) {
15731 key = field[i]
15732 keylen = length(key)
15733 if (S_is_set[key]) {
15734 value = S[key]
15735 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15736 len += length(value) + length(field[++i])
15737 substed = 1
15738 } else
15739 len += 1 + keylen
15740 }
15741
15742 print line
15743 }
15744
15745 _ACAWK
15746 _ACEOF
15747 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15748 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15749 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15750 else
15751 cat
15752 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15753 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15754 _ACEOF
15755
15756 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15757 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15758 # trailing colons and then remove the whole line if VPATH becomes empty
15759 # (actually we leave an empty line to preserve line numbers).
15760 if test "x$srcdir" = x.; then
15761 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15762 h
15763 s///
15764 s/^/:/
15765 s/[ ]*$/:/
15766 s/:\$(srcdir):/:/g
15767 s/:\${srcdir}:/:/g
15768 s/:@srcdir@:/:/g
15769 s/^:*//
15770 s/:*$//
15771 x
15772 s/\(=[ ]*\).*/\1/
15773 G
15774 s/\n//
15775 s/^[^=]*=[ ]*$//
15776 }'
15777 fi
15778
15779 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15780 fi # test -n "$CONFIG_FILES"
15781
15782 # Set up the scripts for CONFIG_HEADERS section.
15783 # No need to generate them if there are no CONFIG_HEADERS.
15784 # This happens for instance with `./config.status Makefile'.
15785 if test -n "$CONFIG_HEADERS"; then
15786 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15787 BEGIN {
15788 _ACEOF
15789
15790 # Transform confdefs.h into an awk script `defines.awk', embedded as
15791 # here-document in config.status, that substitutes the proper values into
15792 # config.h.in to produce config.h.
15793
15794 # Create a delimiter string that does not exist in confdefs.h, to ease
15795 # handling of long lines.
15796 ac_delim='%!_!# '
15797 for ac_last_try in false false :; do
15798 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15799 if test -z "$ac_tt"; then
15800 break
15801 elif $ac_last_try; then
15802 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15803 else
15804 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15805 fi
15806 done
15807
15808 # For the awk script, D is an array of macro values keyed by name,
15809 # likewise P contains macro parameters if any. Preserve backslash
15810 # newline sequences.
15811
15812 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15813 sed -n '
15814 s/.\{148\}/&'"$ac_delim"'/g
15815 t rset
15816 :rset
15817 s/^[ ]*#[ ]*define[ ][ ]*/ /
15818 t def
15819 d
15820 :def
15821 s/\\$//
15822 t bsnl
15823 s/["\\]/\\&/g
15824 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15825 D["\1"]=" \3"/p
15826 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15827 d
15828 :bsnl
15829 s/["\\]/\\&/g
15830 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15831 D["\1"]=" \3\\\\\\n"\\/p
15832 t cont
15833 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15834 t cont
15835 d
15836 :cont
15837 n
15838 s/.\{148\}/&'"$ac_delim"'/g
15839 t clear
15840 :clear
15841 s/\\$//
15842 t bsnlc
15843 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15844 d
15845 :bsnlc
15846 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15847 b cont
15848 ' <confdefs.h | sed '
15849 s/'"$ac_delim"'/"\\\
15850 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15851
15852 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15853 for (key in D) D_is_set[key] = 1
15854 FS = ""
15855 }
15856 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15857 line = \$ 0
15858 split(line, arg, " ")
15859 if (arg[1] == "#") {
15860 defundef = arg[2]
15861 mac1 = arg[3]
15862 } else {
15863 defundef = substr(arg[1], 2)
15864 mac1 = arg[2]
15865 }
15866 split(mac1, mac2, "(") #)
15867 macro = mac2[1]
15868 prefix = substr(line, 1, index(line, defundef) - 1)
15869 if (D_is_set[macro]) {
15870 # Preserve the white space surrounding the "#".
15871 print prefix "define", macro P[macro] D[macro]
15872 next
15873 } else {
15874 # Replace #undef with comments. This is necessary, for example,
15875 # in the case of _POSIX_SOURCE, which is predefined and required
15876 # on some systems where configure will not decide to define it.
15877 if (defundef == "undef") {
15878 print "/*", prefix defundef, macro, "*/"
15879 next
15880 }
15881 }
15882 }
15883 { print }
15884 _ACAWK
15885 _ACEOF
15886 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15887 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15888 fi # test -n "$CONFIG_HEADERS"
15889
15890
15891 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15892 shift
15893 for ac_tag
15894 do
15895 case $ac_tag in
15896 :[FHLC]) ac_mode=$ac_tag; continue;;
15897 esac
15898 case $ac_mode$ac_tag in
15899 :[FHL]*:*);;
15900 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15901 :[FH]-) ac_tag=-:-;;
15902 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15903 esac
15904 ac_save_IFS=$IFS
15905 IFS=:
15906 set x $ac_tag
15907 IFS=$ac_save_IFS
15908 shift
15909 ac_file=$1
15910 shift
15911
15912 case $ac_mode in
15913 :L) ac_source=$1;;
15914 :[FH])
15915 ac_file_inputs=
15916 for ac_f
15917 do
15918 case $ac_f in
15919 -) ac_f="$ac_tmp/stdin";;
15920 *) # Look for the file first in the build tree, then in the source tree
15921 # (if the path is not absolute). The absolute path cannot be DOS-style,
15922 # because $ac_f cannot contain `:'.
15923 test -f "$ac_f" ||
15924 case $ac_f in
15925 [\\/$]*) false;;
15926 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15927 esac ||
15928 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15929 esac
15930 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15931 as_fn_append ac_file_inputs " '$ac_f'"
15932 done
15933
15934 # Let's still pretend it is `configure' which instantiates (i.e., don't
15935 # use $as_me), people would be surprised to read:
15936 # /* config.h. Generated by config.status. */
15937 configure_input='Generated from '`
15938 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15939 `' by configure.'
15940 if test x"$ac_file" != x-; then
15941 configure_input="$ac_file. $configure_input"
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15943 $as_echo "$as_me: creating $ac_file" >&6;}
15944 fi
15945 # Neutralize special characters interpreted by sed in replacement strings.
15946 case $configure_input in #(
15947 *\&* | *\|* | *\\* )
15948 ac_sed_conf_input=`$as_echo "$configure_input" |
15949 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15950 *) ac_sed_conf_input=$configure_input;;
15951 esac
15952
15953 case $ac_tag in
15954 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15955 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15956 esac
15957 ;;
15958 esac
15959
15960 ac_dir=`$as_dirname -- "$ac_file" ||
15961 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15962 X"$ac_file" : 'X\(//\)[^/]' \| \
15963 X"$ac_file" : 'X\(//\)$' \| \
15964 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15965 $as_echo X"$ac_file" |
15966 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15967 s//\1/
15968 q
15969 }
15970 /^X\(\/\/\)[^/].*/{
15971 s//\1/
15972 q
15973 }
15974 /^X\(\/\/\)$/{
15975 s//\1/
15976 q
15977 }
15978 /^X\(\/\).*/{
15979 s//\1/
15980 q
15981 }
15982 s/.*/./; q'`
15983 as_dir="$ac_dir"; as_fn_mkdir_p
15984 ac_builddir=.
15985
15986 case "$ac_dir" in
15987 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15988 *)
15989 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15990 # A ".." for each directory in $ac_dir_suffix.
15991 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15992 case $ac_top_builddir_sub in
15993 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15994 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15995 esac ;;
15996 esac
15997 ac_abs_top_builddir=$ac_pwd
15998 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15999 # for backward compatibility:
16000 ac_top_builddir=$ac_top_build_prefix
16001
16002 case $srcdir in
16003 .) # We are building in place.
16004 ac_srcdir=.
16005 ac_top_srcdir=$ac_top_builddir_sub
16006 ac_abs_top_srcdir=$ac_pwd ;;
16007 [\\/]* | ?:[\\/]* ) # Absolute name.
16008 ac_srcdir=$srcdir$ac_dir_suffix;
16009 ac_top_srcdir=$srcdir
16010 ac_abs_top_srcdir=$srcdir ;;
16011 *) # Relative name.
16012 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16013 ac_top_srcdir=$ac_top_build_prefix$srcdir
16014 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16015 esac
16016 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16017
16018
16019 case $ac_mode in
16020 :F)
16021 #
16022 # CONFIG_FILE
16023 #
16024
16025 case $INSTALL in
16026 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16027 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16028 esac
16029 _ACEOF
16030
16031 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16032 # If the template does not know about datarootdir, expand it.
16033 # FIXME: This hack should be removed a few years after 2.60.
16034 ac_datarootdir_hack=; ac_datarootdir_seen=
16035 ac_sed_dataroot='
16036 /datarootdir/ {
16037 p
16038 q
16039 }
16040 /@datadir@/p
16041 /@docdir@/p
16042 /@infodir@/p
16043 /@localedir@/p
16044 /@mandir@/p'
16045 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16046 *datarootdir*) ac_datarootdir_seen=yes;;
16047 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16049 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16050 _ACEOF
16051 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16052 ac_datarootdir_hack='
16053 s&@datadir@&$datadir&g
16054 s&@docdir@&$docdir&g
16055 s&@infodir@&$infodir&g
16056 s&@localedir@&$localedir&g
16057 s&@mandir@&$mandir&g
16058 s&\\\${datarootdir}&$datarootdir&g' ;;
16059 esac
16060 _ACEOF
16061
16062 # Neutralize VPATH when `$srcdir' = `.'.
16063 # Shell code in configure.ac might set extrasub.
16064 # FIXME: do we really want to maintain this feature?
16065 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16066 ac_sed_extra="$ac_vpsub
16067 $extrasub
16068 _ACEOF
16069 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16070 :t
16071 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16072 s|@configure_input@|$ac_sed_conf_input|;t t
16073 s&@top_builddir@&$ac_top_builddir_sub&;t t
16074 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16075 s&@srcdir@&$ac_srcdir&;t t
16076 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16077 s&@top_srcdir@&$ac_top_srcdir&;t t
16078 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16079 s&@builddir@&$ac_builddir&;t t
16080 s&@abs_builddir@&$ac_abs_builddir&;t t
16081 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16082 s&@INSTALL@&$ac_INSTALL&;t t
16083 $ac_datarootdir_hack
16084 "
16085 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16086 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16087
16088 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16089 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16090 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16091 "$ac_tmp/out"`; test -z "$ac_out"; } &&
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16093 which seems to be undefined. Please make sure it is defined" >&5
16094 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16095 which seems to be undefined. Please make sure it is defined" >&2;}
16096
16097 rm -f "$ac_tmp/stdin"
16098 case $ac_file in
16099 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16100 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16101 esac \
16102 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16103 ;;
16104 :H)
16105 #
16106 # CONFIG_HEADER
16107 #
16108 if test x"$ac_file" != x-; then
16109 {
16110 $as_echo "/* $configure_input */" \
16111 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16112 } >"$ac_tmp/config.h" \
16113 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16114 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16116 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16117 else
16118 rm -f "$ac_file"
16119 mv "$ac_tmp/config.h" "$ac_file" \
16120 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16121 fi
16122 else
16123 $as_echo "/* $configure_input */" \
16124 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16125 || as_fn_error $? "could not create -" "$LINENO" 5
16126 fi
16127 ;;
16128
16129 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16130 $as_echo "$as_me: executing $ac_file commands" >&6;}
16131 ;;
16132 esac
16133
16134
16135 case $ac_file$ac_mode in
16136 "config.h":H) echo > stamp-h ;;
16137 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16138 "default-1":C)
16139 for ac_file in $CONFIG_FILES; do
16140 # Support "outfile[:infile[:infile...]]"
16141 case "$ac_file" in
16142 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16143 esac
16144 # PO directories have a Makefile.in generated from Makefile.in.in.
16145 case "$ac_file" in */Makefile.in)
16146 # Adjust a relative srcdir.
16147 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16148 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
16149 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16150 # In autoconf-2.13 it is called $ac_given_srcdir.
16151 # In autoconf-2.50 it is called $srcdir.
16152 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16153 case "$ac_given_srcdir" in
16154 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16155 /*) top_srcdir="$ac_given_srcdir" ;;
16156 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
16157 esac
16158 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16159 rm -f "$ac_dir/POTFILES"
16160 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16161 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
16162 POMAKEFILEDEPS="POTFILES.in"
16163 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
16164 # on $ac_dir but don't depend on user-specified configuration
16165 # parameters.
16166 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
16167 # The LINGUAS file contains the set of available languages.
16168 if test -n "$OBSOLETE_ALL_LINGUAS"; then
16169 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
16170 fi
16171 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
16172 # Hide the ALL_LINGUAS assigment from automake.
16173 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
16174 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
16175 else
16176 # The set of available languages was given in configure.ac.
16177 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
16178 fi
16179 case "$ac_given_srcdir" in
16180 .) srcdirpre= ;;
16181 *) srcdirpre='$(srcdir)/' ;;
16182 esac
16183 POFILES=
16184 GMOFILES=
16185 UPDATEPOFILES=
16186 DUMMYPOFILES=
16187 for lang in $ALL_LINGUAS; do
16188 POFILES="$POFILES $srcdirpre$lang.po"
16189 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
16190 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
16191 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
16192 done
16193 # CATALOGS depends on both $ac_dir and the user's LINGUAS
16194 # environment variable.
16195 INST_LINGUAS=
16196 if test -n "$ALL_LINGUAS"; then
16197 for presentlang in $ALL_LINGUAS; do
16198 useit=no
16199 if test "%UNSET%" != "$LINGUAS"; then
16200 desiredlanguages="$LINGUAS"
16201 else
16202 desiredlanguages="$ALL_LINGUAS"
16203 fi
16204 for desiredlang in $desiredlanguages; do
16205 # Use the presentlang catalog if desiredlang is
16206 # a. equal to presentlang, or
16207 # b. a variant of presentlang (because in this case,
16208 # presentlang can be used as a fallback for messages
16209 # which are not translated in the desiredlang catalog).
16210 case "$desiredlang" in
16211 "$presentlang"*) useit=yes;;
16212 esac
16213 done
16214 if test $useit = yes; then
16215 INST_LINGUAS="$INST_LINGUAS $presentlang"
16216 fi
16217 done
16218 fi
16219 CATALOGS=
16220 if test -n "$INST_LINGUAS"; then
16221 for lang in $INST_LINGUAS; do
16222 CATALOGS="$CATALOGS $lang.gmo"
16223 done
16224 fi
16225 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
16226 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"
16227 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
16228 if test -f "$f"; then
16229 case "$f" in
16230 *.orig | *.bak | *~) ;;
16231 *) cat "$f" >> "$ac_dir/Makefile" ;;
16232 esac
16233 fi
16234 done
16235 fi
16236 ;;
16237 esac
16238 done ;;
16239 "gdbdepdir":C)
16240 for subdir in ${CONFIG_SRC_SUBDIR}
16241 do
16242 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
16243 done ;;
16244
16245 esac
16246 done # for ac_tag
16247
16248
16249 as_fn_exit 0
16250 _ACEOF
16251 ac_clean_files=$ac_clean_files_save
16252
16253 test $ac_write_fail = 0 ||
16254 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16255
16256
16257 # configure is writing to config.log, and then calls config.status.
16258 # config.status does its own redirection, appending to config.log.
16259 # Unfortunately, on DOS this fails, as config.log is still kept open
16260 # by configure, so config.status won't be able to write to it; its
16261 # output is simply discarded. So we exec the FD to /dev/null,
16262 # effectively closing config.log, so it can be properly (re)opened and
16263 # appended to by config.status. When coming back to configure, we
16264 # need to make the FD available again.
16265 if test "$no_create" != yes; then
16266 ac_cs_success=:
16267 ac_config_status_args=
16268 test "$silent" = yes &&
16269 ac_config_status_args="$ac_config_status_args --quiet"
16270 exec 5>/dev/null
16271 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16272 exec 5>>config.log
16273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16274 # would make configure fail if this is the last instruction.
16275 $ac_cs_success || as_fn_exit 1
16276 fi
16277 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16279 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16280 fi
16281