Use command style in cmd_show_list
[binutils-gdb.git] / gdbserver / configure
blob7ff11247e51db6c03fefed3fa770dbaf5ad6b334
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
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 ## -------------------- ##
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 *) :
30 esac
34 as_nl='
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"
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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
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 *) :
174 esac
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; }
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 :
190 else
191 exitcode=1; echo positional parameters were not saved.
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
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
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
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
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
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
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
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
272 exit 1
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
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
290 { eval $1=; unset $1;}
292 as_unset=as_fn_unset
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
299 return $1
300 } # as_fn_set_status
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 ()
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
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/
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
343 /^X\(\/\/\)$/{
344 s//\1/
347 /^X\(\/\).*/{
348 s//\1/
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"
358 } # as_fn_mkdir_p
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
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 ()
376 eval $1+=\$2
378 else
379 as_fn_append ()
381 eval $1=\$$1\$2
383 fi # as_fn_append
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 ()
393 as_val=$(( $* ))
395 else
396 as_fn_arith ()
398 as_val=`expr "$@" || test $? -eq 1`
400 fi # as_fn_arith
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 ()
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
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
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
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
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
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/
447 /^X\/\(\/\/\)$/{
448 s//\1/
451 /^X\/\(\/\).*/{
452 s//\1/
455 s/.*/./; q'`
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
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 '
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
478 :lineno
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; }
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
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;;
510 ECHO_N='-n';;
511 esac
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
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'
534 else
535 as_ln_s='cp -pR'
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
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
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
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'"
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'"
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
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`
566 # Initializations.
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=
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
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"
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
679 ALLOCA
680 CXX_DIALECT
681 HAVE_CXX17
682 RANLIB
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
705 ac_ct_CXX
706 CXXFLAGS
708 OBJEXT
709 EXEEXT
710 ac_ct_CC
711 CPPFLAGS
712 LDFLAGS
713 CFLAGS
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
784 ac_precious_vars='build_alias
785 host_alias
786 target_alias
788 CFLAGS
789 LDFLAGS
790 LIBS
791 CPPFLAGS
793 CXXFLAGS
795 CPP'
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
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'
846 ac_prev=
847 ac_dashdash=
848 for ac_option
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
857 case $ac_option in
858 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
859 *=) ac_optarg= ;;
860 *) ac_optarg=yes ;;
861 esac
863 # Accept the important Cygnus configure options, so we can diagnose typos.
865 case $ac_dashdash$ac_option in
867 ac_dashdash=yes ;;
869 -bindir | --bindir | --bindi | --bind | --bin | --bi)
870 ac_prev=bindir ;;
871 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
872 bindir=$ac_optarg ;;
874 -build | --build | --buil | --bui | --bu)
875 ac_prev=build_alias ;;
876 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
877 build_alias=$ac_optarg ;;
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 ;;
886 --config-cache | -C)
887 cache_file=config.cache ;;
889 -datadir | --datadir | --datadi | --datad)
890 ac_prev=datadir ;;
891 -datadir=* | --datadir=* | --datadi=* | --datad=*)
892 datadir=$ac_optarg ;;
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 ;;
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
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 ;;
917 -docdir | --docdir | --docdi | --doc | --do)
918 ac_prev=docdir ;;
919 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
920 docdir=$ac_optarg ;;
922 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
923 ac_prev=dvidir ;;
924 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
925 dvidir=$ac_optarg ;;
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
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 ;;
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 ;;
952 -gas | --gas | --ga | --g)
953 # Obsolete; use --with-gas.
954 with_gas=yes ;;
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 ;;
963 -host | --host | --hos | --ho)
964 ac_prev=host_alias ;;
965 -host=* | --host=* | --hos=* | --ho=*)
966 host_alias=$ac_optarg ;;
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 ;;
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 ;;
981 -infodir | --infodir | --infodi | --infod | --info | --inf)
982 ac_prev=infodir ;;
983 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
984 infodir=$ac_optarg ;;
986 -libdir | --libdir | --libdi | --libd)
987 ac_prev=libdir ;;
988 -libdir=* | --libdir=* | --libdi=* | --libd=*)
989 libdir=$ac_optarg ;;
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 ;;
998 -localedir | --localedir | --localedi | --localed | --locale)
999 ac_prev=localedir ;;
1000 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1001 localedir=$ac_optarg ;;
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 ;;
1010 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1011 ac_prev=mandir ;;
1012 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1013 mandir=$ac_optarg ;;
1015 -nfp | --nfp | --nf)
1016 # Obsolete; use --without-fp.
1017 with_fp=no ;;
1019 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1020 | --no-cr | --no-c | -n)
1021 no_create=yes ;;
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 ;;
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 ;;
1036 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1037 ac_prev=prefix ;;
1038 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1039 prefix=$ac_optarg ;;
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 ;;
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 ;;
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 ;;
1072 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1073 ac_prev=pdfdir ;;
1074 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1075 pdfdir=$ac_optarg ;;
1077 -psdir | --psdir | --psdi | --psd | --ps)
1078 ac_prev=psdir ;;
1079 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1080 psdir=$ac_optarg ;;
1082 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1083 | -silent | --silent | --silen | --sile | --sil)
1084 silent=yes ;;
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 ;;
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 ;;
1103 -site | --site | --sit)
1104 ac_prev=site ;;
1105 -site=* | --site=* | --sit=*)
1106 site=$ac_optarg ;;
1108 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1109 ac_prev=srcdir ;;
1110 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1111 srcdir=$ac_optarg ;;
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 ;;
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 ;;
1125 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1126 verbose=yes ;;
1128 -version | --version | --versio | --versi | --vers | -V)
1129 ac_init_version=: ;;
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
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 ;;
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
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 ;;
1163 --x)
1164 # Obsolete; use --with-x.
1165 with_x=yes ;;
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 ;;
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 ;;
1181 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1182 Try \`$0 --help' for more information"
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 ;;
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}"
1203 esac
1204 done
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"
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
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
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
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
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
1256 ac_tool_prefix=
1257 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1259 test "$silent" = yes && exec 6>/dev/null
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"
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/
1284 /^X\(\/\/\)[^/].*/{
1285 s//\1/
1288 /^X\(\/\/\)$/{
1289 s//\1/
1292 /^X\(\/\).*/{
1293 s//\1/
1296 s/.*/./; q'`
1297 srcdir=$ac_confdir
1298 if test ! -r "$srcdir/$ac_unique_file"; then
1299 srcdir=..
1301 else
1302 ac_srcdir_defaulted=no
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"
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=.
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
1330 # Report the --help message.
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.
1338 Usage: $0 [OPTION]... [VAR=VALUE]...
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.
1343 Defaults for the options are specified in brackets.
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 \`..']
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]
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'.
1367 For better control, use the options below.
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
1391 cat <<\_ACEOF
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
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
1405 if test -n "$ac_init_help"; then
1407 cat <<\_ACEOF
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
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
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
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
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.
1469 Report bugs to the package provider.
1470 _ACEOF
1471 ac_status=$?
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=.
1482 case "$ac_dir" in
1483 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
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
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
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
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
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
1542 ## ------------------------ ##
1543 ## Autoconf initialization. ##
1544 ## ------------------------ ##
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 ()
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
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
1577 ac_retval=1
1579 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1580 as_fn_set_status $ac_retval
1582 } # ac_fn_c_try_compile
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 ()
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
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
1615 ac_retval=1
1617 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1618 as_fn_set_status $ac_retval
1620 } # ac_fn_cxx_try_compile
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 ()
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
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
1652 ac_retval=1
1654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1655 as_fn_set_status $ac_retval
1657 } # ac_fn_c_try_cpp
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 ()
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
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. */
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
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; }
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
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; }
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;}
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;}
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"
1738 eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740 $as_echo "$ac_res" >&6; }
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744 } # ac_fn_c_check_header_mongrel
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 ()
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
1780 ac_retval=$ac_status
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
1786 } # ac_fn_c_try_run
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 ()
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. */
1803 #include <$2>
1804 _ACEOF
1805 if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807 else
1808 eval "$3=no"
1810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
1817 } # ac_fn_c_check_header_compile
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 ()
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. */
1836 main ()
1838 if (sizeof ($2))
1839 return 0;
1841 return 0;
1843 _ACEOF
1844 if ac_fn_c_try_compile "$LINENO"; then :
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846 /* end confdefs.h. */
1849 main ()
1851 if (sizeof (($2)))
1852 return 0;
1854 return 0;
1856 _ACEOF
1857 if ac_fn_c_try_compile "$LINENO"; then :
1859 else
1860 eval "$3=yes"
1862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
1871 } # ac_fn_c_check_type
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 ()
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
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
1907 ac_retval=1
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
1917 } # ac_fn_c_try_link
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 ()
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
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. */
1941 #ifdef __STDC__
1942 # include <limits.h>
1943 #else
1944 # include <assert.h>
1945 #endif
1947 #undef $2
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
1964 main ()
1966 return $2 ();
1968 return 0;
1970 _ACEOF
1971 if ac_fn_c_try_link "$LINENO"; then :
1972 eval "$3=yes"
1973 else
1974 eval "$3=no"
1976 rm -f core conftest.err conftest.$ac_objext \
1977 conftest$ac_exeext conftest.$ac_ext
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
1984 } # ac_fn_c_check_func
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 ()
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. */
2004 main ()
2006 #ifndef $as_decl_name
2007 #ifdef __cplusplus
2008 (void) $as_decl_use;
2009 #else
2010 (void) $as_decl_name;
2011 #endif
2012 #endif
2015 return 0;
2017 _ACEOF
2018 if ac_fn_c_try_compile "$LINENO"; then :
2019 eval "$3=yes"
2020 else
2021 eval "$3=no"
2023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
2030 } # ac_fn_c_check_decl
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 ()
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. */
2048 main ()
2050 static $2 ac_aggr;
2051 if (ac_aggr.$3)
2052 return 0;
2054 return 0;
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. */
2064 main ()
2066 static $2 ac_aggr;
2067 if (sizeof ac_aggr.$3)
2068 return 0;
2070 return 0;
2072 _ACEOF
2073 if ac_fn_c_try_compile "$LINENO"; then :
2074 eval "$4=yes"
2075 else
2076 eval "$4=no"
2078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
2087 } # ac_fn_c_check_member
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 ()
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
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
2123 ac_retval=1
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
2133 } # ac_fn_cxx_try_link
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 ()
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
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. */
2157 #ifdef __STDC__
2158 # include <limits.h>
2159 #else
2160 # include <assert.h>
2161 #endif
2163 #undef $2
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
2180 main ()
2182 return $2 ();
2184 return 0;
2186 _ACEOF
2187 if ac_fn_cxx_try_link "$LINENO"; then :
2188 eval "$3=yes"
2189 else
2190 eval "$3=no"
2192 rm -f core conftest.err conftest.$ac_objext \
2193 conftest$ac_exeext conftest.$ac_ext
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
2200 } # ac_fn_cxx_check_func
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 ()
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. */
2216 main ()
2218 static int test_array [1 - 2 * !(($2) >= 0)];
2219 test_array [0] = 0;
2220 return test_array [0];
2223 return 0;
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. */
2233 main ()
2235 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2236 test_array [0] = 0;
2237 return test_array [0];
2240 return 0;
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
2251 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
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. */
2260 main ()
2262 static int test_array [1 - 2 * !(($2) < 0)];
2263 test_array [0] = 0;
2264 return test_array [0];
2267 return 0;
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. */
2277 main ()
2279 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2280 test_array [0] = 0;
2281 return test_array [0];
2284 return 0;
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
2295 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298 done
2299 else
2300 ac_lo= ac_hi=
2302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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. */
2312 main ()
2314 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2315 test_array [0] = 0;
2316 return test_array [0];
2319 return 0;
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
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. */
2337 static long int longval () { return $2; }
2338 static unsigned long int ulongval () { return $2; }
2339 #include <stdio.h>
2340 #include <stdlib.h>
2342 main ()
2345 FILE *f = fopen ("conftest.val", "w");
2346 if (! f)
2347 return 1;
2348 if (($2) < 0)
2350 long int i = longval ();
2351 if (i != ($2))
2352 return 1;
2353 fprintf (f, "%ld", i);
2355 else
2357 unsigned long int i = ulongval ();
2358 if (i != ($2))
2359 return 1;
2360 fprintf (f, "%lu", i);
2362 /* Do not output a trailing newline, as this causes \r\n confusion
2363 on some platforms. */
2364 return ferror (f) || fclose (f) != 0;
2367 return 0;
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
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
2380 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381 as_fn_set_status $ac_retval
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.
2388 It was created by $as_me, which was
2389 generated by GNU Autoconf 2.69. Invocation command line was
2391 $ $0 $@
2393 _ACEOF
2394 exec 5>>config.log
2396 cat <<_ASUNAME
2397 ## --------- ##
2398 ## Platform. ##
2399 ## --------- ##
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`
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`
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`
2418 _ASUNAME
2420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421 for as_dir in $PATH
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
2429 } >&5
2431 cat >&5 <<_ACEOF
2434 ## ----------- ##
2435 ## Core tests. ##
2436 ## ----------- ##
2438 _ACEOF
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
2452 for ac_arg
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'" ;;
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
2478 -* ) ac_must_keep_next=true ;;
2479 esac
2481 as_fn_append ac_configure_args " '$ac_arg'"
2483 esac
2484 done
2485 done
2486 { ac_configure_args0=; unset ac_configure_args0;}
2487 { ac_configure_args1=; unset ac_configure_args1;}
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.
2497 echo
2499 $as_echo "## ---------------- ##
2500 ## Cache variables. ##
2501 ## ---------------- ##"
2502 echo
2503 # The following way of writing the cache mishandles newlines in values,
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 ;; #(
2528 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2530 esac |
2531 sort
2533 echo
2535 $as_echo "## ----------------- ##
2536 ## Output variables. ##
2537 ## ----------------- ##"
2538 echo
2539 for ac_var in $ac_subst_vars
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
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
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
2565 if test -s confdefs.h; then
2566 $as_echo "## ----------- ##
2567 ## confdefs.h. ##
2568 ## ----------- ##"
2569 echo
2570 cat confdefs.h
2571 echo
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
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
2586 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2587 rm -f -r conftest* confdefs.h
2589 $as_echo "/* confdefs.h */" > confdefs.h
2591 # Predefined preprocessor variables.
2593 cat >>confdefs.h <<_ACEOF
2594 #define PACKAGE_NAME "$PACKAGE_NAME"
2595 _ACEOF
2597 cat >>confdefs.h <<_ACEOF
2598 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2599 _ACEOF
2601 cat >>confdefs.h <<_ACEOF
2602 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2603 _ACEOF
2605 cat >>confdefs.h <<_ACEOF
2606 #define PACKAGE_STRING "$PACKAGE_STRING"
2607 _ACEOF
2609 cat >>confdefs.h <<_ACEOF
2610 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2611 _ACEOF
2613 cat >>confdefs.h <<_ACEOF
2614 #define PACKAGE_URL "$PACKAGE_URL"
2615 _ACEOF
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
2636 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
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; }
2649 done
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
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
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 ,);;
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
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
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
2729 ## -------------------- ##
2730 ## Main body of script. ##
2731 ## -------------------- ##
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
2745 ac_config_headers="$ac_config_headers config.h:config.in"
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
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=
2768 MAINT=$MAINTAINER_MODE_TRUE
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
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
2799 done
2800 done
2801 IFS=$as_save_IFS
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; }
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
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
2839 done
2840 done
2841 IFS=$as_save_IFS
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; }
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
2865 else
2866 CC="$ac_cv_prog_CC"
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
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
2892 done
2893 done
2894 IFS=$as_save_IFS
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; }
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
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
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
2937 done
2938 done
2939 IFS=$as_save_IFS
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+' '}$@"
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; }
2966 if test -z "$CC"; then
2967 if test -n "$ac_tool_prefix"; then
2968 for ac_prog in cl.exe
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
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
2991 done
2992 done
2993 IFS=$as_save_IFS
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; }
3007 test -n "$CC" && break
3008 done
3010 if test -z "$CC"; then
3011 ac_ct_CC=$CC
3012 for ac_prog in cl.exe
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
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
3035 done
3036 done
3037 IFS=$as_save_IFS
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; }
3051 test -n "$ac_ct_CC" && break
3052 done
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
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; }
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
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
3100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3101 /* end confdefs.h. */
3104 main ()
3108 return 0;
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[^ ]*//'`
3120 # The possible output files:
3121 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3123 ac_rmfiles=
3124 for ac_file in $ac_files
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
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 ''
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 )
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" : '[^.]*\(\..*\)'`
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;;
3171 break;;
3172 esac
3173 done
3174 test "$ac_cv_exeext" = no && ac_cv_exeext=
3176 else
3177 ac_file=''
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
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; }
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
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; }
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; }
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>
3244 main ()
3246 FILE *f = fopen ("conftest.out", "w");
3247 return ferror (f) || fclose (f) != 0;
3250 return 0;
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; }
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3295 $as_echo "$cross_compiling" >&6; }
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. */
3308 main ()
3312 return 0;
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
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; }
3344 rm -f conftest.$ac_cv_objext conftest.$ac_ext
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. */
3359 main ()
3361 #ifndef __GNUC__
3362 choke me
3363 #endif
3366 return 0;
3368 _ACEOF
3369 if ac_fn_c_try_compile "$LINENO"; then :
3370 ac_compiler_gnu=yes
3371 else
3372 ac_compiler_gnu=no
3374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3375 ac_cv_c_compiler_gnu=$ac_compiler_gnu
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=
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. */
3400 main ()
3404 return 0;
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. */
3415 main ()
3419 return 0;
3421 _ACEOF
3422 if ac_fn_c_try_compile "$LINENO"; then :
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. */
3431 main ()
3435 return 0;
3437 _ACEOF
3438 if ac_fn_c_try_compile "$LINENO"; then :
3439 ac_cv_prog_cc_g=yes
3441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3446 ac_c_werror_flag=$ac_save_c_werror_flag
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"
3458 else
3459 if test "$GCC" = yes; then
3460 CFLAGS="-O2"
3461 else
3462 CFLAGS=
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;
3484 return p[i];
3486 static char *f (char * (*g) (char **, int), char **p, ...)
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;
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];
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];
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;
3517 main ()
3519 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3521 return 0;
3523 _ACEOF
3524 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3525 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3527 CC="$ac_save_CC $ac_arg"
3528 if ac_fn_c_try_compile "$LINENO"; then :
3529 ac_cv_prog_cc_c89=$ac_arg
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
3538 # AC_CACHE_VAL
3539 case "x$ac_cv_prog_cc_c89" in
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; } ;;
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 :
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
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
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
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
3594 done
3595 done
3596 IFS=$as_save_IFS
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; }
3610 test -n "$CXX" && break
3611 done
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
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
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
3638 done
3639 done
3640 IFS=$as_save_IFS
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; }
3654 test -n "$ac_ct_CXX" && break
3655 done
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
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
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
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. */
3706 main ()
3708 #ifndef __GNUC__
3709 choke me
3710 #endif
3713 return 0;
3715 _ACEOF
3716 if ac_fn_cxx_try_compile "$LINENO"; then :
3717 ac_compiler_gnu=yes
3718 else
3719 ac_compiler_gnu=no
3721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3722 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
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=
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. */
3747 main ()
3751 return 0;
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. */
3762 main ()
3766 return 0;
3768 _ACEOF
3769 if ac_fn_cxx_try_compile "$LINENO"; then :
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. */
3778 main ()
3782 return 0;
3784 _ACEOF
3785 if ac_fn_cxx_try_compile "$LINENO"; then :
3786 ac_cv_prog_cxx_g=yes
3788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3793 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
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"
3805 else
3806 if test "$GXX" = yes; then
3807 CXXFLAGS="-O2"
3808 else
3809 CXXFLAGS=
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
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=
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"
3837 ac_preproc_ok=false
3838 for ac_c_preproc_warn_flag in '' yes
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 :
3857 else
3858 # Broken: fails on valid input.
3859 continue
3861 rm -f conftest.err conftest.i conftest.$ac_ext
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
3877 rm -f conftest.err conftest.i conftest.$ac_ext
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
3886 done
3887 ac_cv_prog_CPP=$CPP
3890 CPP=$ac_cv_prog_CPP
3891 else
3892 ac_cv_prog_CPP=$CPP
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
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 :
3916 else
3917 # Broken: fails on valid input.
3918 continue
3920 rm -f conftest.err conftest.i conftest.$ac_ext
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
3936 rm -f conftest.err conftest.i conftest.$ac_ext
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 :
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; }
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
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
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=:;;
3980 ac_count=0
3981 $as_echo_n 0123456789 >"conftest.in"
3982 while :
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
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
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
4010 else
4011 ac_cv_path_GREP=$GREP
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"
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
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=:;;
4046 ac_count=0
4047 $as_echo_n 0123456789 >"conftest.in"
4048 while :
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
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
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
4076 else
4077 ac_cv_path_EGREP=$EGREP
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"
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>
4100 main ()
4104 return 0;
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
4112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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>
4120 _ACEOF
4121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4122 $EGREP "memchr" >/dev/null 2>&1; then :
4124 else
4125 ac_cv_header_stdc=no
4127 rm -f conftest*
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>
4137 _ACEOF
4138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4139 $EGREP "free" >/dev/null 2>&1; then :
4141 else
4142 ac_cv_header_stdc=no
4144 rm -f conftest*
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 :
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
4168 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4170 main ()
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;
4179 _ACEOF
4180 if ac_fn_c_try_run "$LINENO"; then :
4182 else
4183 ac_cv_header_stdc=no
4185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4186 conftest.$ac_objext conftest.beam conftest.$ac_ext
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
4195 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
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
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
4213 done
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=
4225 if test "$MINIX" = yes; then
4227 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4230 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4233 $as_echo "#define _MINIX 1" >>confdefs.h
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. */
4246 # define __EXTENSIONS__ 1
4247 $ac_includes_default
4249 main ()
4253 return 0;
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
4261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
4268 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4270 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4272 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4274 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4277 # Check whether --enable-largefile was given.
4278 if test "${enable_largefile+set}" = set; then :
4279 enableval=$enable_largefile;
4282 if test "$enable_largefile" != no; then
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];
4307 main ()
4311 return 0;
4313 _ACEOF
4314 if ac_fn_c_try_compile "$LINENO"; then :
4315 break
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
4322 rm -f core conftest.err conftest.$ac_objext
4323 break
4324 done
4325 CC=$ac_save_CC
4326 rm -f conftest.$ac_ext
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
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];
4353 main ()
4357 return 0;
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361 ac_cv_sys_file_offset_bits=no; break
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];
4377 main ()
4381 return 0;
4383 _ACEOF
4384 if ac_fn_c_try_compile "$LINENO"; then :
4385 ac_cv_sys_file_offset_bits=64; break
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388 ac_cv_sys_file_offset_bits=unknown
4389 break
4390 done
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) ;;
4397 cat >>confdefs.h <<_ACEOF
4398 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4399 _ACEOF
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];
4422 main ()
4426 return 0;
4428 _ACEOF
4429 if ac_fn_c_try_compile "$LINENO"; then :
4430 ac_cv_sys_large_files=no; break
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];
4446 main ()
4450 return 0;
4452 _ACEOF
4453 if ac_fn_c_try_compile "$LINENO"; then :
4454 ac_cv_sys_large_files=1; break
4456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4457 ac_cv_sys_large_files=unknown
4458 break
4459 done
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) ;;
4466 cat >>confdefs.h <<_ACEOF
4467 #define _LARGE_FILES $ac_cv_sys_large_files
4468 _ACEOF
4470 esac
4471 rm -rf conftest*
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
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
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.
4506 # Expand $ac_aux_dir to an absolute path.
4507 am_aux_dir=`cd "$ac_aux_dir" && pwd`
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'" ;;
4514 install_sh="\${SHELL} $am_aux_dir/install-sh"
4515 esac
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
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
4545 done
4546 done
4547 IFS=$as_save_IFS
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; }
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
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
4585 done
4586 done
4587 IFS=$as_save_IFS
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; }
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
4611 else
4612 STRIP="$ac_cv_prog_STRIP"
4616 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
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
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
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
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
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
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
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
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}-
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
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/* ) ;;
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.
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.
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
4796 done
4797 done
4799 esac
4801 done
4802 IFS=$as_save_IFS
4804 rm -rf conftest.one conftest.two conftest.dir
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
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4818 $as_echo "$INSTALL" >&6; }
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}'
4824 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4826 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
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
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
4850 done
4851 done
4852 IFS=$as_save_IFS
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; }
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
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
4890 done
4891 done
4892 IFS=$as_save_IFS
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; }
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
4916 else
4917 AR="$ac_cv_prog_AR"
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
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
4942 done
4943 done
4944 IFS=$as_save_IFS
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; }
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
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
4982 done
4983 done
4984 IFS=$as_save_IFS
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; }
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
5008 else
5009 RANLIB="$ac_cv_prog_RANLIB"
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"`
5024 # We require a C++17 compiler. Check if one is available, and if
5025 # necessary, set CXX_DIALECT to some -std=xxx switch.
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
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. */
5045 // If the compiler admits that it is not ready for C++11, why torture it?
5046 // Hopefully, this will speed up the test.
5048 #ifndef __cplusplus
5050 #error "This is not a C++ compiler"
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
5058 #error "This is not a C++11 compiler"
5060 #else
5062 namespace cxx11
5065 namespace test_static_assert
5068 template <typename T>
5069 struct check
5071 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5076 namespace test_final_override
5079 struct Base
5081 virtual ~Base() {}
5082 virtual void f() {}
5085 struct Derived : public Base
5087 virtual ~Derived() override {}
5088 virtual void f() override {}
5093 namespace test_double_right_angle_brackets
5096 template < typename T >
5097 struct check {};
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;
5106 namespace test_decltype
5112 int a = 1;
5113 decltype(a) b = 2;
5114 return a + b;
5119 namespace test_type_deduction
5122 template < typename T1, typename T2 >
5123 struct is_same
5125 static const bool value = false;
5128 template < typename T >
5129 struct is_same<T, T>
5131 static const bool value = true;
5134 template < typename T1, typename T2 >
5135 auto
5136 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5138 return a1 + a2;
5142 test(const int c, volatile int v)
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);
5161 namespace test_noexcept
5164 int f() { return 0; }
5165 int g() noexcept { return 0; }
5167 static_assert(noexcept(f()) == false, "");
5168 static_assert(noexcept(g()) == true, "");
5172 namespace test_constexpr
5175 template < typename CharT >
5176 unsigned long constexpr
5177 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5179 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5182 template < typename CharT >
5183 unsigned long constexpr
5184 strlen_c(const CharT *const s) noexcept
5186 return strlen_c_r(s, 0UL);
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, "");
5196 namespace test_rvalue_references
5199 template < int N >
5200 struct answer
5202 static constexpr int value = N;
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>(); }
5209 void
5210 test()
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, "");
5221 namespace test_uniform_initialization
5224 struct test
5226 static const int zero {};
5227 static const int one {1};
5230 static_assert(test::zero == 0, "");
5231 static_assert(test::one == 1, "");
5235 namespace test_lambdas
5238 void
5239 test1()
5241 auto lambda1 = [](){};
5242 auto lambda2 = lambda1;
5243 lambda1();
5244 lambda2();
5248 test2()
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;
5264 test3()
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())); };
5274 return higher1st(nullary) + higher2nd(nullary)(unary);
5279 namespace test_variadic_templates
5282 template <int...>
5283 struct sum;
5285 template <int N0, int... N1toN>
5286 struct sum<N0, N1toN...>
5288 static constexpr auto value = N0 + sum<N1toN...>::value;
5291 template <>
5292 struct sum<>
5294 static constexpr auto value = 0;
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, "");
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
5312 struct foo {};
5314 template<typename T>
5315 using member = typename T::member_type;
5317 template<typename T>
5318 void func(...) {}
5320 template<typename T>
5321 void func(member<T>*) {}
5323 void test();
5325 void test() { func<foo>(0); }
5329 } // namespace cxx11
5331 #endif // __cplusplus >= 201103L
5336 // If the compiler admits that it is not ready for C++14, why torture it?
5337 // Hopefully, this will speed up the test.
5339 #ifndef __cplusplus
5341 #error "This is not a C++ compiler"
5343 #elif __cplusplus < 201402L && !defined _MSC_VER
5345 #error "This is not a C++14 compiler"
5347 #else
5349 namespace cxx14
5352 namespace test_polymorphic_lambdas
5356 test()
5358 const auto lambda = [](auto&&... args){
5359 const auto istiny = [](auto x){
5360 return (sizeof(x) == 1UL) ? 1 : 0;
5362 const int aretiny[] = { istiny(args)... };
5363 return aretiny[0];
5365 return lambda(1, 1L, 1.0f, '1');
5370 namespace test_binary_literals
5373 constexpr auto ivii = 0b0000000000101010;
5374 static_assert(ivii == 42, "wrong value");
5378 namespace test_generalized_constexpr
5381 template < typename CharT >
5382 constexpr unsigned long
5383 strlen_c(const CharT *const s) noexcept
5385 auto length = 0UL;
5386 for (auto p = s; *p; ++p)
5387 ++length;
5388 return length;
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, "");
5398 namespace test_lambda_init_capture
5402 test()
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();
5412 namespace test_digit_separators
5415 constexpr auto ten_million = 100'000'000;
5416 static_assert(ten_million == 100000000, "");
5420 namespace test_return_type_deduction
5423 auto f(int& x) { return x; }
5424 decltype(auto) g(int& x) { return x; }
5426 template < typename T1, typename T2 >
5427 struct is_same
5429 static constexpr auto value = false;
5432 template < typename T >
5433 struct is_same<T, T>
5435 static constexpr auto value = true;
5439 test()
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;
5449 } // namespace cxx14
5451 #endif // __cplusplus >= 201402L
5456 // If the compiler admits that it is not ready for C++17, why torture it?
5457 // Hopefully, this will speed up the test.
5459 #ifndef __cplusplus
5461 #error "This is not a C++ compiler"
5463 #elif __cplusplus < 201703L && !defined _MSC_VER
5465 #error "This is not a C++17 compiler"
5467 #else
5469 #include <initializer_list>
5470 #include <utility>
5471 #include <type_traits>
5473 namespace cxx17
5476 namespace test_constexpr_lambdas
5479 constexpr int foo = [](){return 42;}();
5483 namespace test::nested_namespace::definitions
5488 namespace test_fold_expression
5491 template<typename... Args>
5492 int multiply(Args... args)
5494 return (args * ... * 1);
5497 template<typename... Args>
5498 bool all(Args... args)
5500 return (args && ...);
5505 namespace test_extended_static_assert
5508 static_assert (true);
5512 namespace test_auto_brace_init_list
5515 auto foo = {5};
5516 auto bar {5};
5518 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
5519 static_assert(std::is_same<int, decltype(bar)>::value);
5522 namespace test_typename_in_template_template_parameter
5525 template<template<typename> typename X> struct D;
5529 namespace test_fallthrough_nodiscard_maybe_unused_attributes
5532 int f1()
5534 return 42;
5537 [[nodiscard]] int f2()
5539 [[maybe_unused]] auto unused = f1();
5541 switch (f1())
5543 case 17:
5544 f1();
5545 [[fallthrough]];
5546 case 42:
5547 f1();
5549 return f1();
5554 namespace test_extended_aggregate_initialization
5557 struct base1
5559 int b1, b2 = 42;
5562 struct base2
5564 base2() {
5565 b3 = 42;
5567 int b3;
5570 struct derived : base1, base2
5572 int d;
5575 derived d1 {{1, 2}, {}, 4}; // full initialization
5576 derived d2 {{}, {}, 4}; // value-initialized bases
5580 namespace test_general_range_based_for_loop
5583 struct iter
5585 int i;
5587 int& operator* ()
5589 return i;
5592 const int& operator* () const
5594 return i;
5597 iter& operator++()
5599 ++i;
5600 return *this;
5604 struct sentinel
5606 int i;
5609 bool operator== (const iter& i, const sentinel& s)
5611 return i.i == s.i;
5614 bool operator!= (const iter& i, const sentinel& s)
5616 return !(i == s);
5619 struct range
5621 iter begin() const
5623 return {0};
5626 sentinel end() const
5628 return {5};
5632 void f()
5634 range r {};
5636 for (auto i : r)
5638 [[maybe_unused]] auto v = i;
5644 namespace test_lambda_capture_asterisk_this_by_value
5647 struct t
5649 int i;
5650 int foo()
5652 return [*this]()
5654 return i;
5655 }();
5661 namespace test_enum_class_construction
5664 enum class byte : unsigned char
5667 byte foo {42};
5671 namespace test_constexpr_if
5674 template <bool cond>
5675 int f ()
5677 if constexpr(cond)
5679 return 13;
5681 else
5683 return 42;
5689 namespace test_selection_statement_with_initializer
5692 int f()
5694 return 13;
5697 int f2()
5699 if (auto i = f(); i > 0)
5701 return 3;
5704 switch (auto i = f(); i + 4)
5706 case 17:
5707 return 2;
5709 default:
5710 return 1;
5716 namespace test_template_argument_deduction_for_class_templates
5719 template <typename T1, typename T2>
5720 struct pair
5722 pair (T1 p1, T2 p2)
5723 : m1 {p1},
5724 m2 {p2}
5727 T1 m1;
5728 T2 m2;
5731 void f()
5733 [[maybe_unused]] auto p = pair{13, 42u};
5738 namespace test_non_type_auto_template_parameters
5741 template <auto n>
5742 struct B
5745 B<5> b1;
5746 B<'a'> b2;
5750 namespace test_structured_bindings
5753 int arr[2] = { 1, 2 };
5754 std::pair<int, int> pr = { 1, 2 };
5756 auto f1() -> int(&)[2]
5758 return arr;
5761 auto f2() -> std::pair<int, int>&
5763 return pr;
5766 struct S
5768 int x1 : 2;
5769 volatile double y1;
5772 S f3()
5774 return {};
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();
5785 namespace test_exception_spec_type_system
5788 struct Good {};
5789 struct Bad {};
5791 void g1() noexcept;
5792 void g2();
5794 template<typename T>
5796 f(T*, T*);
5798 template<typename T1, typename T2>
5799 Good
5800 f(T1*, T2*);
5802 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
5806 namespace test_inline_variables
5809 template<class T> void f(T)
5812 template<class T> inline T g(T)
5814 return T{};
5817 template<> inline void f<>(int)
5820 template<> int g<>(int)
5822 return 5;
5827 } // namespace cxx17
5829 #endif // __cplusplus < 201703L && !defined _MSC_VER
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
5839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
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. */
5862 // If the compiler admits that it is not ready for C++11, why torture it?
5863 // Hopefully, this will speed up the test.
5865 #ifndef __cplusplus
5867 #error "This is not a C++ compiler"
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
5875 #error "This is not a C++11 compiler"
5877 #else
5879 namespace cxx11
5882 namespace test_static_assert
5885 template <typename T>
5886 struct check
5888 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5893 namespace test_final_override
5896 struct Base
5898 virtual ~Base() {}
5899 virtual void f() {}
5902 struct Derived : public Base
5904 virtual ~Derived() override {}
5905 virtual void f() override {}
5910 namespace test_double_right_angle_brackets
5913 template < typename T >
5914 struct check {};
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;
5923 namespace test_decltype
5929 int a = 1;
5930 decltype(a) b = 2;
5931 return a + b;
5936 namespace test_type_deduction
5939 template < typename T1, typename T2 >
5940 struct is_same
5942 static const bool value = false;
5945 template < typename T >
5946 struct is_same<T, T>
5948 static const bool value = true;
5951 template < typename T1, typename T2 >
5952 auto
5953 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5955 return a1 + a2;
5959 test(const int c, volatile int v)
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);
5978 namespace test_noexcept
5981 int f() { return 0; }
5982 int g() noexcept { return 0; }
5984 static_assert(noexcept(f()) == false, "");
5985 static_assert(noexcept(g()) == true, "");
5989 namespace test_constexpr
5992 template < typename CharT >
5993 unsigned long constexpr
5994 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5996 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5999 template < typename CharT >
6000 unsigned long constexpr
6001 strlen_c(const CharT *const s) noexcept
6003 return strlen_c_r(s, 0UL);
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, "");
6013 namespace test_rvalue_references
6016 template < int N >
6017 struct answer
6019 static constexpr int value = N;
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>(); }
6026 void
6027 test()
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, "");
6038 namespace test_uniform_initialization
6041 struct test
6043 static const int zero {};
6044 static const int one {1};
6047 static_assert(test::zero == 0, "");
6048 static_assert(test::one == 1, "");
6052 namespace test_lambdas
6055 void
6056 test1()
6058 auto lambda1 = [](){};
6059 auto lambda2 = lambda1;
6060 lambda1();
6061 lambda2();
6065 test2()
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;
6081 test3()
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())); };
6091 return higher1st(nullary) + higher2nd(nullary)(unary);
6096 namespace test_variadic_templates
6099 template <int...>
6100 struct sum;
6102 template <int N0, int... N1toN>
6103 struct sum<N0, N1toN...>
6105 static constexpr auto value = N0 + sum<N1toN...>::value;
6108 template <>
6109 struct sum<>
6111 static constexpr auto value = 0;
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, "");
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
6129 struct foo {};
6131 template<typename T>
6132 using member = typename T::member_type;
6134 template<typename T>
6135 void func(...) {}
6137 template<typename T>
6138 void func(member<T>*) {}
6140 void test();
6142 void test() { func<foo>(0); }
6146 } // namespace cxx11
6148 #endif // __cplusplus >= 201103L
6153 // If the compiler admits that it is not ready for C++14, why torture it?
6154 // Hopefully, this will speed up the test.
6156 #ifndef __cplusplus
6158 #error "This is not a C++ compiler"
6160 #elif __cplusplus < 201402L && !defined _MSC_VER
6162 #error "This is not a C++14 compiler"
6164 #else
6166 namespace cxx14
6169 namespace test_polymorphic_lambdas
6173 test()
6175 const auto lambda = [](auto&&... args){
6176 const auto istiny = [](auto x){
6177 return (sizeof(x) == 1UL) ? 1 : 0;
6179 const int aretiny[] = { istiny(args)... };
6180 return aretiny[0];
6182 return lambda(1, 1L, 1.0f, '1');
6187 namespace test_binary_literals
6190 constexpr auto ivii = 0b0000000000101010;
6191 static_assert(ivii == 42, "wrong value");
6195 namespace test_generalized_constexpr
6198 template < typename CharT >
6199 constexpr unsigned long
6200 strlen_c(const CharT *const s) noexcept
6202 auto length = 0UL;
6203 for (auto p = s; *p; ++p)
6204 ++length;
6205 return length;
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, "");
6215 namespace test_lambda_init_capture
6219 test()
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();
6229 namespace test_digit_separators
6232 constexpr auto ten_million = 100'000'000;
6233 static_assert(ten_million == 100000000, "");
6237 namespace test_return_type_deduction
6240 auto f(int& x) { return x; }
6241 decltype(auto) g(int& x) { return x; }
6243 template < typename T1, typename T2 >
6244 struct is_same
6246 static constexpr auto value = false;
6249 template < typename T >
6250 struct is_same<T, T>
6252 static constexpr auto value = true;
6256 test()
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;
6266 } // namespace cxx14
6268 #endif // __cplusplus >= 201402L
6273 // If the compiler admits that it is not ready for C++17, why torture it?
6274 // Hopefully, this will speed up the test.
6276 #ifndef __cplusplus
6278 #error "This is not a C++ compiler"
6280 #elif __cplusplus < 201703L && !defined _MSC_VER
6282 #error "This is not a C++17 compiler"
6284 #else
6286 #include <initializer_list>
6287 #include <utility>
6288 #include <type_traits>
6290 namespace cxx17
6293 namespace test_constexpr_lambdas
6296 constexpr int foo = [](){return 42;}();
6300 namespace test::nested_namespace::definitions
6305 namespace test_fold_expression
6308 template<typename... Args>
6309 int multiply(Args... args)
6311 return (args * ... * 1);
6314 template<typename... Args>
6315 bool all(Args... args)
6317 return (args && ...);
6322 namespace test_extended_static_assert
6325 static_assert (true);
6329 namespace test_auto_brace_init_list
6332 auto foo = {5};
6333 auto bar {5};
6335 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
6336 static_assert(std::is_same<int, decltype(bar)>::value);
6339 namespace test_typename_in_template_template_parameter
6342 template<template<typename> typename X> struct D;
6346 namespace test_fallthrough_nodiscard_maybe_unused_attributes
6349 int f1()
6351 return 42;
6354 [[nodiscard]] int f2()
6356 [[maybe_unused]] auto unused = f1();
6358 switch (f1())
6360 case 17:
6361 f1();
6362 [[fallthrough]];
6363 case 42:
6364 f1();
6366 return f1();
6371 namespace test_extended_aggregate_initialization
6374 struct base1
6376 int b1, b2 = 42;
6379 struct base2
6381 base2() {
6382 b3 = 42;
6384 int b3;
6387 struct derived : base1, base2
6389 int d;
6392 derived d1 {{1, 2}, {}, 4}; // full initialization
6393 derived d2 {{}, {}, 4}; // value-initialized bases
6397 namespace test_general_range_based_for_loop
6400 struct iter
6402 int i;
6404 int& operator* ()
6406 return i;
6409 const int& operator* () const
6411 return i;
6414 iter& operator++()
6416 ++i;
6417 return *this;
6421 struct sentinel
6423 int i;
6426 bool operator== (const iter& i, const sentinel& s)
6428 return i.i == s.i;
6431 bool operator!= (const iter& i, const sentinel& s)
6433 return !(i == s);
6436 struct range
6438 iter begin() const
6440 return {0};
6443 sentinel end() const
6445 return {5};
6449 void f()
6451 range r {};
6453 for (auto i : r)
6455 [[maybe_unused]] auto v = i;
6461 namespace test_lambda_capture_asterisk_this_by_value
6464 struct t
6466 int i;
6467 int foo()
6469 return [*this]()
6471 return i;
6472 }();
6478 namespace test_enum_class_construction
6481 enum class byte : unsigned char
6484 byte foo {42};
6488 namespace test_constexpr_if
6491 template <bool cond>
6492 int f ()
6494 if constexpr(cond)
6496 return 13;
6498 else
6500 return 42;
6506 namespace test_selection_statement_with_initializer
6509 int f()
6511 return 13;
6514 int f2()
6516 if (auto i = f(); i > 0)
6518 return 3;
6521 switch (auto i = f(); i + 4)
6523 case 17:
6524 return 2;
6526 default:
6527 return 1;
6533 namespace test_template_argument_deduction_for_class_templates
6536 template <typename T1, typename T2>
6537 struct pair
6539 pair (T1 p1, T2 p2)
6540 : m1 {p1},
6541 m2 {p2}
6544 T1 m1;
6545 T2 m2;
6548 void f()
6550 [[maybe_unused]] auto p = pair{13, 42u};
6555 namespace test_non_type_auto_template_parameters
6558 template <auto n>
6559 struct B
6562 B<5> b1;
6563 B<'a'> b2;
6567 namespace test_structured_bindings
6570 int arr[2] = { 1, 2 };
6571 std::pair<int, int> pr = { 1, 2 };
6573 auto f1() -> int(&)[2]
6575 return arr;
6578 auto f2() -> std::pair<int, int>&
6580 return pr;
6583 struct S
6585 int x1 : 2;
6586 volatile double y1;
6589 S f3()
6591 return {};
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();
6602 namespace test_exception_spec_type_system
6605 struct Good {};
6606 struct Bad {};
6608 void g1() noexcept;
6609 void g2();
6611 template<typename T>
6613 f(T*, T*);
6615 template<typename T1, typename T2>
6616 Good
6617 f(T1*, T2*);
6619 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
6623 namespace test_inline_variables
6626 template<class T> void f(T)
6629 template<class T> inline T g(T)
6631 return T{};
6634 template<> inline void f<>(int)
6637 template<> int g<>(int)
6639 return 5;
6644 } // namespace cxx17
6646 #endif // __cplusplus < 201703L && !defined _MSC_VER
6650 _ACEOF
6651 if ac_fn_cxx_try_compile "$LINENO"; then :
6652 eval $cachevar=yes
6653 else
6654 eval $cachevar=no
6656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6657 CXX="$ac_save_CXX"
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"
6668 ac_success=yes
6669 break
6671 done
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`
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. */
6694 // If the compiler admits that it is not ready for C++11, why torture it?
6695 // Hopefully, this will speed up the test.
6697 #ifndef __cplusplus
6699 #error "This is not a C++ compiler"
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
6707 #error "This is not a C++11 compiler"
6709 #else
6711 namespace cxx11
6714 namespace test_static_assert
6717 template <typename T>
6718 struct check
6720 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6725 namespace test_final_override
6728 struct Base
6730 virtual ~Base() {}
6731 virtual void f() {}
6734 struct Derived : public Base
6736 virtual ~Derived() override {}
6737 virtual void f() override {}
6742 namespace test_double_right_angle_brackets
6745 template < typename T >
6746 struct check {};
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;
6755 namespace test_decltype
6761 int a = 1;
6762 decltype(a) b = 2;
6763 return a + b;
6768 namespace test_type_deduction
6771 template < typename T1, typename T2 >
6772 struct is_same
6774 static const bool value = false;
6777 template < typename T >
6778 struct is_same<T, T>
6780 static const bool value = true;
6783 template < typename T1, typename T2 >
6784 auto
6785 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6787 return a1 + a2;
6791 test(const int c, volatile int v)
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);
6810 namespace test_noexcept
6813 int f() { return 0; }
6814 int g() noexcept { return 0; }
6816 static_assert(noexcept(f()) == false, "");
6817 static_assert(noexcept(g()) == true, "");
6821 namespace test_constexpr
6824 template < typename CharT >
6825 unsigned long constexpr
6826 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6828 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6831 template < typename CharT >
6832 unsigned long constexpr
6833 strlen_c(const CharT *const s) noexcept
6835 return strlen_c_r(s, 0UL);
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, "");
6845 namespace test_rvalue_references
6848 template < int N >
6849 struct answer
6851 static constexpr int value = N;
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>(); }
6858 void
6859 test()
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, "");
6870 namespace test_uniform_initialization
6873 struct test
6875 static const int zero {};
6876 static const int one {1};
6879 static_assert(test::zero == 0, "");
6880 static_assert(test::one == 1, "");
6884 namespace test_lambdas
6887 void
6888 test1()
6890 auto lambda1 = [](){};
6891 auto lambda2 = lambda1;
6892 lambda1();
6893 lambda2();
6897 test2()
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;
6913 test3()
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())); };
6923 return higher1st(nullary) + higher2nd(nullary)(unary);
6928 namespace test_variadic_templates
6931 template <int...>
6932 struct sum;
6934 template <int N0, int... N1toN>
6935 struct sum<N0, N1toN...>
6937 static constexpr auto value = N0 + sum<N1toN...>::value;
6940 template <>
6941 struct sum<>
6943 static constexpr auto value = 0;
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, "");
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
6961 struct foo {};
6963 template<typename T>
6964 using member = typename T::member_type;
6966 template<typename T>
6967 void func(...) {}
6969 template<typename T>
6970 void func(member<T>*) {}
6972 void test();
6974 void test() { func<foo>(0); }
6978 } // namespace cxx11
6980 #endif // __cplusplus >= 201103L
6985 // If the compiler admits that it is not ready for C++14, why torture it?
6986 // Hopefully, this will speed up the test.
6988 #ifndef __cplusplus
6990 #error "This is not a C++ compiler"
6992 #elif __cplusplus < 201402L && !defined _MSC_VER
6994 #error "This is not a C++14 compiler"
6996 #else
6998 namespace cxx14
7001 namespace test_polymorphic_lambdas
7005 test()
7007 const auto lambda = [](auto&&... args){
7008 const auto istiny = [](auto x){
7009 return (sizeof(x) == 1UL) ? 1 : 0;
7011 const int aretiny[] = { istiny(args)... };
7012 return aretiny[0];
7014 return lambda(1, 1L, 1.0f, '1');
7019 namespace test_binary_literals
7022 constexpr auto ivii = 0b0000000000101010;
7023 static_assert(ivii == 42, "wrong value");
7027 namespace test_generalized_constexpr
7030 template < typename CharT >
7031 constexpr unsigned long
7032 strlen_c(const CharT *const s) noexcept
7034 auto length = 0UL;
7035 for (auto p = s; *p; ++p)
7036 ++length;
7037 return length;
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, "");
7047 namespace test_lambda_init_capture
7051 test()
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();
7061 namespace test_digit_separators
7064 constexpr auto ten_million = 100'000'000;
7065 static_assert(ten_million == 100000000, "");
7069 namespace test_return_type_deduction
7072 auto f(int& x) { return x; }
7073 decltype(auto) g(int& x) { return x; }
7075 template < typename T1, typename T2 >
7076 struct is_same
7078 static constexpr auto value = false;
7081 template < typename T >
7082 struct is_same<T, T>
7084 static constexpr auto value = true;
7088 test()
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;
7098 } // namespace cxx14
7100 #endif // __cplusplus >= 201402L
7105 // If the compiler admits that it is not ready for C++17, why torture it?
7106 // Hopefully, this will speed up the test.
7108 #ifndef __cplusplus
7110 #error "This is not a C++ compiler"
7112 #elif __cplusplus < 201703L && !defined _MSC_VER
7114 #error "This is not a C++17 compiler"
7116 #else
7118 #include <initializer_list>
7119 #include <utility>
7120 #include <type_traits>
7122 namespace cxx17
7125 namespace test_constexpr_lambdas
7128 constexpr int foo = [](){return 42;}();
7132 namespace test::nested_namespace::definitions
7137 namespace test_fold_expression
7140 template<typename... Args>
7141 int multiply(Args... args)
7143 return (args * ... * 1);
7146 template<typename... Args>
7147 bool all(Args... args)
7149 return (args && ...);
7154 namespace test_extended_static_assert
7157 static_assert (true);
7161 namespace test_auto_brace_init_list
7164 auto foo = {5};
7165 auto bar {5};
7167 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
7168 static_assert(std::is_same<int, decltype(bar)>::value);
7171 namespace test_typename_in_template_template_parameter
7174 template<template<typename> typename X> struct D;
7178 namespace test_fallthrough_nodiscard_maybe_unused_attributes
7181 int f1()
7183 return 42;
7186 [[nodiscard]] int f2()
7188 [[maybe_unused]] auto unused = f1();
7190 switch (f1())
7192 case 17:
7193 f1();
7194 [[fallthrough]];
7195 case 42:
7196 f1();
7198 return f1();
7203 namespace test_extended_aggregate_initialization
7206 struct base1
7208 int b1, b2 = 42;
7211 struct base2
7213 base2() {
7214 b3 = 42;
7216 int b3;
7219 struct derived : base1, base2
7221 int d;
7224 derived d1 {{1, 2}, {}, 4}; // full initialization
7225 derived d2 {{}, {}, 4}; // value-initialized bases
7229 namespace test_general_range_based_for_loop
7232 struct iter
7234 int i;
7236 int& operator* ()
7238 return i;
7241 const int& operator* () const
7243 return i;
7246 iter& operator++()
7248 ++i;
7249 return *this;
7253 struct sentinel
7255 int i;
7258 bool operator== (const iter& i, const sentinel& s)
7260 return i.i == s.i;
7263 bool operator!= (const iter& i, const sentinel& s)
7265 return !(i == s);
7268 struct range
7270 iter begin() const
7272 return {0};
7275 sentinel end() const
7277 return {5};
7281 void f()
7283 range r {};
7285 for (auto i : r)
7287 [[maybe_unused]] auto v = i;
7293 namespace test_lambda_capture_asterisk_this_by_value
7296 struct t
7298 int i;
7299 int foo()
7301 return [*this]()
7303 return i;
7304 }();
7310 namespace test_enum_class_construction
7313 enum class byte : unsigned char
7316 byte foo {42};
7320 namespace test_constexpr_if
7323 template <bool cond>
7324 int f ()
7326 if constexpr(cond)
7328 return 13;
7330 else
7332 return 42;
7338 namespace test_selection_statement_with_initializer
7341 int f()
7343 return 13;
7346 int f2()
7348 if (auto i = f(); i > 0)
7350 return 3;
7353 switch (auto i = f(); i + 4)
7355 case 17:
7356 return 2;
7358 default:
7359 return 1;
7365 namespace test_template_argument_deduction_for_class_templates
7368 template <typename T1, typename T2>
7369 struct pair
7371 pair (T1 p1, T2 p2)
7372 : m1 {p1},
7373 m2 {p2}
7376 T1 m1;
7377 T2 m2;
7380 void f()
7382 [[maybe_unused]] auto p = pair{13, 42u};
7387 namespace test_non_type_auto_template_parameters
7390 template <auto n>
7391 struct B
7394 B<5> b1;
7395 B<'a'> b2;
7399 namespace test_structured_bindings
7402 int arr[2] = { 1, 2 };
7403 std::pair<int, int> pr = { 1, 2 };
7405 auto f1() -> int(&)[2]
7407 return arr;
7410 auto f2() -> std::pair<int, int>&
7412 return pr;
7415 struct S
7417 int x1 : 2;
7418 volatile double y1;
7421 S f3()
7423 return {};
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();
7434 namespace test_exception_spec_type_system
7437 struct Good {};
7438 struct Bad {};
7440 void g1() noexcept;
7441 void g2();
7443 template<typename T>
7445 f(T*, T*);
7447 template<typename T1, typename T2>
7448 Good
7449 f(T1*, T2*);
7451 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
7455 namespace test_inline_variables
7458 template<class T> void f(T)
7461 template<class T> inline T g(T)
7463 return T{};
7466 template<> inline void f<>(int)
7469 template<> int g<>(int)
7471 return 5;
7476 } // namespace cxx17
7478 #endif // __cplusplus < 201703L && !defined _MSC_VER
7482 _ACEOF
7483 if ac_fn_cxx_try_compile "$LINENO"; then :
7484 eval $cachevar=yes
7485 else
7486 eval $cachevar=no
7488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7489 CXX="$ac_save_CXX"
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"
7500 ac_success=yes
7501 break
7503 done
7504 if test x$ac_success = xyes; then
7505 break
7507 done
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
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
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
7527 $as_echo "#define HAVE_CXX17 1" >>confdefs.h
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7535 $as_echo_n "checking for ANSI C header files... " >&6; }
7536 if ${ac_cv_header_stdc+:} false; then :
7537 $as_echo_n "(cached) " >&6
7538 else
7539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7540 /* end confdefs.h. */
7541 #include <stdlib.h>
7542 #include <stdarg.h>
7543 #include <string.h>
7544 #include <float.h>
7547 main ()
7551 return 0;
7553 _ACEOF
7554 if ac_fn_c_try_compile "$LINENO"; then :
7555 ac_cv_header_stdc=yes
7556 else
7557 ac_cv_header_stdc=no
7559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7561 if test $ac_cv_header_stdc = yes; then
7562 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7564 /* end confdefs.h. */
7565 #include <string.h>
7567 _ACEOF
7568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7569 $EGREP "memchr" >/dev/null 2>&1; then :
7571 else
7572 ac_cv_header_stdc=no
7574 rm -f conftest*
7578 if test $ac_cv_header_stdc = yes; then
7579 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7581 /* end confdefs.h. */
7582 #include <stdlib.h>
7584 _ACEOF
7585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7586 $EGREP "free" >/dev/null 2>&1; then :
7588 else
7589 ac_cv_header_stdc=no
7591 rm -f conftest*
7595 if test $ac_cv_header_stdc = yes; then
7596 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7597 if test "$cross_compiling" = yes; then :
7599 else
7600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7601 /* end confdefs.h. */
7602 #include <ctype.h>
7603 #include <stdlib.h>
7604 #if ((' ' & 0x0FF) == 0x020)
7605 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7606 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7607 #else
7608 # define ISLOWER(c) \
7609 (('a' <= (c) && (c) <= 'i') \
7610 || ('j' <= (c) && (c) <= 'r') \
7611 || ('s' <= (c) && (c) <= 'z'))
7612 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7613 #endif
7615 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7617 main ()
7619 int i;
7620 for (i = 0; i < 256; i++)
7621 if (XOR (islower (i), ISLOWER (i))
7622 || toupper (i) != TOUPPER (i))
7623 return 2;
7624 return 0;
7626 _ACEOF
7627 if ac_fn_c_try_run "$LINENO"; then :
7629 else
7630 ac_cv_header_stdc=no
7632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7633 conftest.$ac_objext conftest.beam conftest.$ac_ext
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7639 $as_echo "$ac_cv_header_stdc" >&6; }
7640 if test $ac_cv_header_stdc = yes; then
7642 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7647 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7648 if test "x$ac_cv_type_size_t" = xyes; then :
7650 else
7652 cat >>confdefs.h <<_ACEOF
7653 #define size_t unsigned int
7654 _ACEOF
7661 for ac_header in $ac_header_list
7662 do :
7663 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7664 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7666 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7667 cat >>confdefs.h <<_ACEOF
7668 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7669 _ACEOF
7673 done
7681 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7682 if test "x$ac_cv_type_pid_t" = xyes; then :
7684 else
7686 cat >>confdefs.h <<_ACEOF
7687 #define pid_t int
7688 _ACEOF
7692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7693 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7694 if ${ac_cv_path_SED+:} false; then :
7695 $as_echo_n "(cached) " >&6
7696 else
7697 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7698 for ac_i in 1 2 3 4 5 6 7; do
7699 ac_script="$ac_script$as_nl$ac_script"
7700 done
7701 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7702 { ac_script=; unset ac_script;}
7703 if test -z "$SED"; then
7704 ac_path_SED_found=false
7705 # Loop through the user's path and test for each of PROGNAME-LIST
7706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707 for as_dir in $PATH
7709 IFS=$as_save_IFS
7710 test -z "$as_dir" && as_dir=.
7711 for ac_prog in sed gsed; do
7712 for ac_exec_ext in '' $ac_executable_extensions; do
7713 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7714 as_fn_executable_p "$ac_path_SED" || continue
7715 # Check for GNU ac_path_SED and select it if it is found.
7716 # Check for GNU $ac_path_SED
7717 case `"$ac_path_SED" --version 2>&1` in
7718 *GNU*)
7719 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7721 ac_count=0
7722 $as_echo_n 0123456789 >"conftest.in"
7723 while :
7725 cat "conftest.in" "conftest.in" >"conftest.tmp"
7726 mv "conftest.tmp" "conftest.in"
7727 cp "conftest.in" "conftest.nl"
7728 $as_echo '' >> "conftest.nl"
7729 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7730 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7731 as_fn_arith $ac_count + 1 && ac_count=$as_val
7732 if test $ac_count -gt ${ac_path_SED_max-0}; then
7733 # Best one so far, save it but keep looking for a better one
7734 ac_cv_path_SED="$ac_path_SED"
7735 ac_path_SED_max=$ac_count
7737 # 10*(2^10) chars as input seems more than enough
7738 test $ac_count -gt 10 && break
7739 done
7740 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7741 esac
7743 $ac_path_SED_found && break 3
7744 done
7745 done
7746 done
7747 IFS=$as_save_IFS
7748 if test -z "$ac_cv_path_SED"; then
7749 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7751 else
7752 ac_cv_path_SED=$SED
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7757 $as_echo "$ac_cv_path_SED" >&6; }
7758 SED="$ac_cv_path_SED"
7759 rm -f conftest.sed
7762 if test "X$prefix" = "XNONE"; then
7763 acl_final_prefix="$ac_default_prefix"
7764 else
7765 acl_final_prefix="$prefix"
7767 if test "X$exec_prefix" = "XNONE"; then
7768 acl_final_exec_prefix='${prefix}'
7769 else
7770 acl_final_exec_prefix="$exec_prefix"
7772 acl_save_prefix="$prefix"
7773 prefix="$acl_final_prefix"
7774 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7775 prefix="$acl_save_prefix"
7778 # Check whether --with-gnu-ld was given.
7779 if test "${with_gnu_ld+set}" = set; then :
7780 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7781 else
7782 with_gnu_ld=no
7785 # Prepare PATH_SEPARATOR.
7786 # The user is always right.
7787 if test "${PATH_SEPARATOR+set}" != set; then
7788 echo "#! /bin/sh" >conf$$.sh
7789 echo "exit 0" >>conf$$.sh
7790 chmod +x conf$$.sh
7791 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7792 PATH_SEPARATOR=';'
7793 else
7794 PATH_SEPARATOR=:
7796 rm -f conf$$.sh
7798 ac_prog=ld
7799 if test "$GCC" = yes; then
7800 # Check if gcc -print-prog-name=ld gives a path.
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7802 $as_echo_n "checking for ld used by GCC... " >&6; }
7803 case $host in
7804 *-*-mingw*)
7805 # gcc leaves a trailing carriage return which upsets mingw
7806 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7808 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7809 esac
7810 case $ac_prog in
7811 # Accept absolute paths.
7812 [\\/]* | [A-Za-z]:[\\/]*)
7813 re_direlt='/[^/][^/]*/\.\./'
7814 # Canonicalize the path of ld
7815 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7816 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7817 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7818 done
7819 test -z "$LD" && LD="$ac_prog"
7822 # If it fails, then pretend we aren't using GCC.
7823 ac_prog=ld
7826 # If it is relative, then search for the first ld in PATH.
7827 with_gnu_ld=unknown
7829 esac
7830 elif test "$with_gnu_ld" = yes; then
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7832 $as_echo_n "checking for GNU ld... " >&6; }
7833 else
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7835 $as_echo_n "checking for non-GNU ld... " >&6; }
7837 if ${acl_cv_path_LD+:} false; then :
7838 $as_echo_n "(cached) " >&6
7839 else
7840 if test -z "$LD"; then
7841 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7842 for ac_dir in $PATH; do
7843 test -z "$ac_dir" && ac_dir=.
7844 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7845 acl_cv_path_LD="$ac_dir/$ac_prog"
7846 # Check to see if the program is GNU ld. I'd rather use --version,
7847 # but apparently some GNU ld's only accept -v.
7848 # Break only if it was the GNU/non-GNU ld that we prefer.
7849 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
7850 test "$with_gnu_ld" != no && break
7851 else
7852 test "$with_gnu_ld" != yes && break
7855 done
7856 IFS="$ac_save_ifs"
7857 else
7858 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7862 LD="$acl_cv_path_LD"
7863 if test -n "$LD"; then
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7865 $as_echo "$LD" >&6; }
7866 else
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7868 $as_echo "no" >&6; }
7870 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7872 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7873 if ${acl_cv_prog_gnu_ld+:} false; then :
7874 $as_echo_n "(cached) " >&6
7875 else
7876 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7877 if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
7878 acl_cv_prog_gnu_ld=yes
7879 else
7880 acl_cv_prog_gnu_ld=no
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7884 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7885 with_gnu_ld=$acl_cv_prog_gnu_ld
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7890 $as_echo_n "checking for shared library run path origin... " >&6; }
7891 if ${acl_cv_rpath+:} false; then :
7892 $as_echo_n "(cached) " >&6
7893 else
7895 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7896 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7897 . ./conftest.sh
7898 rm -f ./conftest.sh
7899 acl_cv_rpath=done
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7903 $as_echo "$acl_cv_rpath" >&6; }
7904 wl="$acl_cv_wl"
7905 libext="$acl_cv_libext"
7906 shlibext="$acl_cv_shlibext"
7907 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7908 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7909 hardcode_direct="$acl_cv_hardcode_direct"
7910 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7911 # Check whether --enable-rpath was given.
7912 if test "${enable_rpath+set}" = set; then :
7913 enableval=$enable_rpath; :
7914 else
7915 enable_rpath=yes
7920 # Set the 'development' global.
7921 . $srcdir/../bfd/development.sh
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7924 $as_echo_n "checking for ANSI C header files... " >&6; }
7925 if ${ac_cv_header_stdc+:} false; then :
7926 $as_echo_n "(cached) " >&6
7927 else
7928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7929 /* end confdefs.h. */
7930 #include <stdlib.h>
7931 #include <stdarg.h>
7932 #include <string.h>
7933 #include <float.h>
7936 main ()
7940 return 0;
7942 _ACEOF
7943 if ac_fn_c_try_compile "$LINENO"; then :
7944 ac_cv_header_stdc=yes
7945 else
7946 ac_cv_header_stdc=no
7948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7950 if test $ac_cv_header_stdc = yes; then
7951 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7953 /* end confdefs.h. */
7954 #include <string.h>
7956 _ACEOF
7957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7958 $EGREP "memchr" >/dev/null 2>&1; then :
7960 else
7961 ac_cv_header_stdc=no
7963 rm -f conftest*
7967 if test $ac_cv_header_stdc = yes; then
7968 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7970 /* end confdefs.h. */
7971 #include <stdlib.h>
7973 _ACEOF
7974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7975 $EGREP "free" >/dev/null 2>&1; then :
7977 else
7978 ac_cv_header_stdc=no
7980 rm -f conftest*
7984 if test $ac_cv_header_stdc = yes; then
7985 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7986 if test "$cross_compiling" = yes; then :
7988 else
7989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7990 /* end confdefs.h. */
7991 #include <ctype.h>
7992 #include <stdlib.h>
7993 #if ((' ' & 0x0FF) == 0x020)
7994 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7995 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7996 #else
7997 # define ISLOWER(c) \
7998 (('a' <= (c) && (c) <= 'i') \
7999 || ('j' <= (c) && (c) <= 'r') \
8000 || ('s' <= (c) && (c) <= 'z'))
8001 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8002 #endif
8004 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8006 main ()
8008 int i;
8009 for (i = 0; i < 256; i++)
8010 if (XOR (islower (i), ISLOWER (i))
8011 || toupper (i) != TOUPPER (i))
8012 return 2;
8013 return 0;
8015 _ACEOF
8016 if ac_fn_c_try_run "$LINENO"; then :
8018 else
8019 ac_cv_header_stdc=no
8021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8022 conftest.$ac_objext conftest.beam conftest.$ac_ext
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8028 $as_echo "$ac_cv_header_stdc" >&6; }
8029 if test $ac_cv_header_stdc = yes; then
8031 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8035 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8036 # for constant arguments. Useless!
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8038 $as_echo_n "checking for working alloca.h... " >&6; }
8039 if ${ac_cv_working_alloca_h+:} false; then :
8040 $as_echo_n "(cached) " >&6
8041 else
8042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8043 /* end confdefs.h. */
8044 #include <alloca.h>
8046 main ()
8048 char *p = (char *) alloca (2 * sizeof (int));
8049 if (p) return 0;
8051 return 0;
8053 _ACEOF
8054 if ac_fn_c_try_link "$LINENO"; then :
8055 ac_cv_working_alloca_h=yes
8056 else
8057 ac_cv_working_alloca_h=no
8059 rm -f core conftest.err conftest.$ac_objext \
8060 conftest$ac_exeext conftest.$ac_ext
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8063 $as_echo "$ac_cv_working_alloca_h" >&6; }
8064 if test $ac_cv_working_alloca_h = yes; then
8066 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8071 $as_echo_n "checking for alloca... " >&6; }
8072 if ${ac_cv_func_alloca_works+:} false; then :
8073 $as_echo_n "(cached) " >&6
8074 else
8075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8076 /* end confdefs.h. */
8077 #ifdef __GNUC__
8078 # define alloca __builtin_alloca
8079 #else
8080 # ifdef _MSC_VER
8081 # include <malloc.h>
8082 # define alloca _alloca
8083 # else
8084 # ifdef HAVE_ALLOCA_H
8085 # include <alloca.h>
8086 # else
8087 # ifdef _AIX
8088 #pragma alloca
8089 # else
8090 # ifndef alloca /* predefined by HP cc +Olibcalls */
8091 void *alloca (size_t);
8092 # endif
8093 # endif
8094 # endif
8095 # endif
8096 #endif
8099 main ()
8101 char *p = (char *) alloca (1);
8102 if (p) return 0;
8104 return 0;
8106 _ACEOF
8107 if ac_fn_c_try_link "$LINENO"; then :
8108 ac_cv_func_alloca_works=yes
8109 else
8110 ac_cv_func_alloca_works=no
8112 rm -f core conftest.err conftest.$ac_objext \
8113 conftest$ac_exeext conftest.$ac_ext
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8116 $as_echo "$ac_cv_func_alloca_works" >&6; }
8118 if test $ac_cv_func_alloca_works = yes; then
8120 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8122 else
8123 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8124 # that cause trouble. Some versions do not even contain alloca or
8125 # contain a buggy version. If you still want to use their alloca,
8126 # use ar to extract alloca.o from them instead of compiling alloca.c.
8128 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8130 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8134 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8135 if ${ac_cv_os_cray+:} false; then :
8136 $as_echo_n "(cached) " >&6
8137 else
8138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8139 /* end confdefs.h. */
8140 #if defined CRAY && ! defined CRAY2
8141 webecray
8142 #else
8143 wenotbecray
8144 #endif
8146 _ACEOF
8147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8148 $EGREP "webecray" >/dev/null 2>&1; then :
8149 ac_cv_os_cray=yes
8150 else
8151 ac_cv_os_cray=no
8153 rm -f conftest*
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8157 $as_echo "$ac_cv_os_cray" >&6; }
8158 if test $ac_cv_os_cray = yes; then
8159 for ac_func in _getb67 GETB67 getb67; do
8160 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8161 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8162 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8164 cat >>confdefs.h <<_ACEOF
8165 #define CRAY_STACKSEG_END $ac_func
8166 _ACEOF
8168 break
8171 done
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8175 $as_echo_n "checking stack direction for C alloca... " >&6; }
8176 if ${ac_cv_c_stack_direction+:} false; then :
8177 $as_echo_n "(cached) " >&6
8178 else
8179 if test "$cross_compiling" = yes; then :
8180 ac_cv_c_stack_direction=0
8181 else
8182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8183 /* end confdefs.h. */
8184 $ac_includes_default
8186 find_stack_direction (int *addr, int depth)
8188 int dir, dummy = 0;
8189 if (! addr)
8190 addr = &dummy;
8191 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8192 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8193 return dir + dummy;
8197 main (int argc, char **argv)
8199 return find_stack_direction (0, argc + !argv + 20) < 0;
8201 _ACEOF
8202 if ac_fn_c_try_run "$LINENO"; then :
8203 ac_cv_c_stack_direction=1
8204 else
8205 ac_cv_c_stack_direction=-1
8207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8208 conftest.$ac_objext conftest.beam conftest.$ac_ext
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8213 $as_echo "$ac_cv_c_stack_direction" >&6; }
8214 cat >>confdefs.h <<_ACEOF
8215 #define STACK_DIRECTION $ac_cv_c_stack_direction
8216 _ACEOF
8222 WIN32APILIBS=
8223 case ${host} in
8224 *mingw32*)
8226 $as_echo "#define USE_WIN32API 1" >>confdefs.h
8228 WIN32APILIBS="-lws2_32"
8230 esac
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8234 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8235 if ${am_cv_langinfo_codeset+:} false; then :
8236 $as_echo_n "(cached) " >&6
8237 else
8238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8239 /* end confdefs.h. */
8240 #include <langinfo.h>
8242 main ()
8244 char* cs = nl_langinfo(CODESET);
8246 return 0;
8248 _ACEOF
8249 if ac_fn_c_try_link "$LINENO"; then :
8250 am_cv_langinfo_codeset=yes
8251 else
8252 am_cv_langinfo_codeset=no
8254 rm -f core conftest.err conftest.$ac_objext \
8255 conftest$ac_exeext conftest.$ac_ext
8258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8259 $as_echo "$am_cv_langinfo_codeset" >&6; }
8260 if test $am_cv_langinfo_codeset = yes; then
8262 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8267 for ac_header in \
8268 dlfcn.h \
8269 linux/elf.h \
8270 linux/perf_event.h \
8271 locale.h \
8272 memory.h \
8273 poll.h \
8274 proc_service.h \
8275 signal.h \
8276 sys/poll.h \
8277 sys/resource.h \
8278 sys/select.h \
8279 sys/socket.h \
8280 sys/un.h \
8281 sys/wait.h \
8282 termios.h \
8283 thread_db.h \
8284 wait.h \
8286 do :
8287 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8288 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8289 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8290 cat >>confdefs.h <<_ACEOF
8291 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8292 _ACEOF
8296 done
8300 for ac_func in getpagesize
8301 do :
8302 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
8303 if test "x$ac_cv_func_getpagesize" = xyes; then :
8304 cat >>confdefs.h <<_ACEOF
8305 #define HAVE_GETPAGESIZE 1
8306 _ACEOF
8309 done
8311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
8312 $as_echo_n "checking for working mmap... " >&6; }
8313 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
8314 $as_echo_n "(cached) " >&6
8315 else
8316 if test "$cross_compiling" = yes; then :
8317 ac_cv_func_mmap_fixed_mapped=no
8318 else
8319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320 /* end confdefs.h. */
8321 $ac_includes_default
8322 /* malloc might have been renamed as rpl_malloc. */
8323 #undef malloc
8325 /* Thanks to Mike Haertel and Jim Avera for this test.
8326 Here is a matrix of mmap possibilities:
8327 mmap private not fixed
8328 mmap private fixed at somewhere currently unmapped
8329 mmap private fixed at somewhere already mapped
8330 mmap shared not fixed
8331 mmap shared fixed at somewhere currently unmapped
8332 mmap shared fixed at somewhere already mapped
8333 For private mappings, we should verify that changes cannot be read()
8334 back from the file, nor mmap's back from the file at a different
8335 address. (There have been systems where private was not correctly
8336 implemented like the infamous i386 svr4.0, and systems where the
8337 VM page cache was not coherent with the file system buffer cache
8338 like early versions of FreeBSD and possibly contemporary NetBSD.)
8339 For shared mappings, we should conversely verify that changes get
8340 propagated back to all the places they're supposed to be.
8342 Grep wants private fixed already mapped.
8343 The main things grep needs to know about mmap are:
8344 * does it exist and is it safe to write into the mmap'd area
8345 * how to use it (BSD variants) */
8347 #include <fcntl.h>
8348 #include <sys/mman.h>
8350 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8351 char *malloc ();
8352 #endif
8354 /* This mess was copied from the GNU getpagesize.h. */
8355 #ifndef HAVE_GETPAGESIZE
8356 # ifdef _SC_PAGESIZE
8357 # define getpagesize() sysconf(_SC_PAGESIZE)
8358 # else /* no _SC_PAGESIZE */
8359 # ifdef HAVE_SYS_PARAM_H
8360 # include <sys/param.h>
8361 # ifdef EXEC_PAGESIZE
8362 # define getpagesize() EXEC_PAGESIZE
8363 # else /* no EXEC_PAGESIZE */
8364 # ifdef NBPG
8365 # define getpagesize() NBPG * CLSIZE
8366 # ifndef CLSIZE
8367 # define CLSIZE 1
8368 # endif /* no CLSIZE */
8369 # else /* no NBPG */
8370 # ifdef NBPC
8371 # define getpagesize() NBPC
8372 # else /* no NBPC */
8373 # ifdef PAGESIZE
8374 # define getpagesize() PAGESIZE
8375 # endif /* PAGESIZE */
8376 # endif /* no NBPC */
8377 # endif /* no NBPG */
8378 # endif /* no EXEC_PAGESIZE */
8379 # else /* no HAVE_SYS_PARAM_H */
8380 # define getpagesize() 8192 /* punt totally */
8381 # endif /* no HAVE_SYS_PARAM_H */
8382 # endif /* no _SC_PAGESIZE */
8384 #endif /* no HAVE_GETPAGESIZE */
8387 main ()
8389 char *data, *data2, *data3;
8390 const char *cdata2;
8391 int i, pagesize;
8392 int fd, fd2;
8394 pagesize = getpagesize ();
8396 /* First, make a file with some known garbage in it. */
8397 data = (char *) malloc (pagesize);
8398 if (!data)
8399 return 1;
8400 for (i = 0; i < pagesize; ++i)
8401 *(data + i) = rand ();
8402 umask (0);
8403 fd = creat ("conftest.mmap", 0600);
8404 if (fd < 0)
8405 return 2;
8406 if (write (fd, data, pagesize) != pagesize)
8407 return 3;
8408 close (fd);
8410 /* Next, check that the tail of a page is zero-filled. File must have
8411 non-zero length, otherwise we risk SIGBUS for entire page. */
8412 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8413 if (fd2 < 0)
8414 return 4;
8415 cdata2 = "";
8416 if (write (fd2, cdata2, 1) != 1)
8417 return 5;
8418 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
8419 if (data2 == MAP_FAILED)
8420 return 6;
8421 for (i = 0; i < pagesize; ++i)
8422 if (*(data2 + i))
8423 return 7;
8424 close (fd2);
8425 if (munmap (data2, pagesize))
8426 return 8;
8428 /* Next, try to mmap the file at a fixed address which already has
8429 something else allocated at it. If we can, also make sure that
8430 we see the same garbage. */
8431 fd = open ("conftest.mmap", O_RDWR);
8432 if (fd < 0)
8433 return 9;
8434 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8435 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8436 return 10;
8437 for (i = 0; i < pagesize; ++i)
8438 if (*(data + i) != *(data2 + i))
8439 return 11;
8441 /* Finally, make sure that changes to the mapped area do not
8442 percolate back to the file as seen by read(). (This is a bug on
8443 some variants of i386 svr4.0.) */
8444 for (i = 0; i < pagesize; ++i)
8445 *(data2 + i) = *(data2 + i) + 1;
8446 data3 = (char *) malloc (pagesize);
8447 if (!data3)
8448 return 12;
8449 if (read (fd, data3, pagesize) != pagesize)
8450 return 13;
8451 for (i = 0; i < pagesize; ++i)
8452 if (*(data + i) != *(data3 + i))
8453 return 14;
8454 close (fd);
8455 return 0;
8457 _ACEOF
8458 if ac_fn_c_try_run "$LINENO"; then :
8459 ac_cv_func_mmap_fixed_mapped=yes
8460 else
8461 ac_cv_func_mmap_fixed_mapped=no
8463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8464 conftest.$ac_objext conftest.beam conftest.$ac_ext
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8469 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
8470 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8472 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
8475 rm -f conftest.mmap conftest.txt
8477 for ac_header in vfork.h
8478 do :
8479 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8480 if test "x$ac_cv_header_vfork_h" = xyes; then :
8481 cat >>confdefs.h <<_ACEOF
8482 #define HAVE_VFORK_H 1
8483 _ACEOF
8487 done
8489 for ac_func in fork vfork
8490 do :
8491 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8492 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8493 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8494 cat >>confdefs.h <<_ACEOF
8495 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8496 _ACEOF
8499 done
8501 if test "x$ac_cv_func_fork" = xyes; then
8502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8503 $as_echo_n "checking for working fork... " >&6; }
8504 if ${ac_cv_func_fork_works+:} false; then :
8505 $as_echo_n "(cached) " >&6
8506 else
8507 if test "$cross_compiling" = yes; then :
8508 ac_cv_func_fork_works=cross
8509 else
8510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8511 /* end confdefs.h. */
8512 $ac_includes_default
8514 main ()
8517 /* By Ruediger Kuhlmann. */
8518 return fork () < 0;
8521 return 0;
8523 _ACEOF
8524 if ac_fn_c_try_run "$LINENO"; then :
8525 ac_cv_func_fork_works=yes
8526 else
8527 ac_cv_func_fork_works=no
8529 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8530 conftest.$ac_objext conftest.beam conftest.$ac_ext
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8535 $as_echo "$ac_cv_func_fork_works" >&6; }
8537 else
8538 ac_cv_func_fork_works=$ac_cv_func_fork
8540 if test "x$ac_cv_func_fork_works" = xcross; then
8541 case $host in
8542 *-*-amigaos* | *-*-msdosdjgpp*)
8543 # Override, as these systems have only a dummy fork() stub
8544 ac_cv_func_fork_works=no
8547 ac_cv_func_fork_works=yes
8549 esac
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8551 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8553 ac_cv_func_vfork_works=$ac_cv_func_vfork
8554 if test "x$ac_cv_func_vfork" = xyes; then
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8556 $as_echo_n "checking for working vfork... " >&6; }
8557 if ${ac_cv_func_vfork_works+:} false; then :
8558 $as_echo_n "(cached) " >&6
8559 else
8560 if test "$cross_compiling" = yes; then :
8561 ac_cv_func_vfork_works=cross
8562 else
8563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8564 /* end confdefs.h. */
8565 /* Thanks to Paul Eggert for this test. */
8566 $ac_includes_default
8567 #include <sys/wait.h>
8568 #ifdef HAVE_VFORK_H
8569 # include <vfork.h>
8570 #endif
8571 /* On some sparc systems, changes by the child to local and incoming
8572 argument registers are propagated back to the parent. The compiler
8573 is told about this with #include <vfork.h>, but some compilers
8574 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8575 static variable whose address is put into a register that is
8576 clobbered by the vfork. */
8577 static void
8578 #ifdef __cplusplus
8579 sparc_address_test (int arg)
8580 # else
8581 sparc_address_test (arg) int arg;
8582 #endif
8584 static pid_t child;
8585 if (!child) {
8586 child = vfork ();
8587 if (child < 0) {
8588 perror ("vfork");
8589 _exit(2);
8591 if (!child) {
8592 arg = getpid();
8593 write(-1, "", 0);
8594 _exit (arg);
8600 main ()
8602 pid_t parent = getpid ();
8603 pid_t child;
8605 sparc_address_test (0);
8607 child = vfork ();
8609 if (child == 0) {
8610 /* Here is another test for sparc vfork register problems. This
8611 test uses lots of local variables, at least as many local
8612 variables as main has allocated so far including compiler
8613 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8614 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8615 reuse the register of parent for one of the local variables,
8616 since it will think that parent can't possibly be used any more
8617 in this routine. Assigning to the local variable will thus
8618 munge parent in the parent process. */
8619 pid_t
8620 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8621 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8622 /* Convince the compiler that p..p7 are live; otherwise, it might
8623 use the same hardware register for all 8 local variables. */
8624 if (p != p1 || p != p2 || p != p3 || p != p4
8625 || p != p5 || p != p6 || p != p7)
8626 _exit(1);
8628 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8629 from child file descriptors. If the child closes a descriptor
8630 before it execs or exits, this munges the parent's descriptor
8631 as well. Test for this by closing stdout in the child. */
8632 _exit(close(fileno(stdout)) != 0);
8633 } else {
8634 int status;
8635 struct stat st;
8637 while (wait(&status) != child)
8639 return (
8640 /* Was there some problem with vforking? */
8641 child < 0
8643 /* Did the child fail? (This shouldn't happen.) */
8644 || status
8646 /* Did the vfork/compiler bug occur? */
8647 || parent != getpid()
8649 /* Did the file descriptor bug occur? */
8650 || fstat(fileno(stdout), &st) != 0
8654 _ACEOF
8655 if ac_fn_c_try_run "$LINENO"; then :
8656 ac_cv_func_vfork_works=yes
8657 else
8658 ac_cv_func_vfork_works=no
8660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8661 conftest.$ac_objext conftest.beam conftest.$ac_ext
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8666 $as_echo "$ac_cv_func_vfork_works" >&6; }
8669 if test "x$ac_cv_func_fork_works" = xcross; then
8670 ac_cv_func_vfork_works=$ac_cv_func_vfork
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8672 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8675 if test "x$ac_cv_func_vfork_works" = xyes; then
8677 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8679 else
8681 $as_echo "#define vfork fork" >>confdefs.h
8684 if test "x$ac_cv_func_fork_works" = xyes; then
8686 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8690 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8692 $as_echo_n "checking for library containing socketpair... " >&6; }
8693 if ${ac_cv_search_socketpair+:} false; then :
8694 $as_echo_n "(cached) " >&6
8695 else
8696 ac_func_search_save_LIBS=$LIBS
8697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8698 /* end confdefs.h. */
8700 /* Override any GCC internal prototype to avoid an error.
8701 Use char because int might match the return type of a GCC
8702 builtin and then its argument prototype would still apply. */
8703 #ifdef __cplusplus
8704 extern "C"
8705 #endif
8706 char socketpair ();
8708 main ()
8710 return socketpair ();
8712 return 0;
8714 _ACEOF
8715 for ac_lib in '' socket; do
8716 if test -z "$ac_lib"; then
8717 ac_res="none required"
8718 else
8719 ac_res=-l$ac_lib
8720 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8722 if ac_fn_c_try_link "$LINENO"; then :
8723 ac_cv_search_socketpair=$ac_res
8725 rm -f core conftest.err conftest.$ac_objext \
8726 conftest$ac_exeext
8727 if ${ac_cv_search_socketpair+:} false; then :
8728 break
8730 done
8731 if ${ac_cv_search_socketpair+:} false; then :
8733 else
8734 ac_cv_search_socketpair=no
8736 rm conftest.$ac_ext
8737 LIBS=$ac_func_search_save_LIBS
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8740 $as_echo "$ac_cv_search_socketpair" >&6; }
8741 ac_res=$ac_cv_search_socketpair
8742 if test "$ac_res" != no; then :
8743 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8747 for ac_func in \
8748 fdwalk \
8749 getauxval \
8750 getrlimit \
8751 getrusage \
8752 pipe \
8753 pipe2 \
8754 poll \
8755 ptrace64 \
8756 sbrk \
8757 setns \
8758 setpgid \
8759 setpgrp \
8760 sigaction \
8761 sigaltstack \
8762 sigprocmask \
8763 sigtimedwait \
8764 socketpair \
8766 do :
8767 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8768 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8769 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8770 cat >>confdefs.h <<_ACEOF
8771 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8772 _ACEOF
8775 done
8778 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
8779 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
8780 # only in linux/personality.h.
8781 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
8783 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
8784 ac_have_decl=1
8785 else
8786 ac_have_decl=0
8789 cat >>confdefs.h <<_ACEOF
8790 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
8791 _ACEOF
8794 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8795 if test "x$ac_cv_have_decl_strstr" = xyes; then :
8796 ac_have_decl=1
8797 else
8798 ac_have_decl=0
8801 cat >>confdefs.h <<_ACEOF
8802 #define HAVE_DECL_STRSTR $ac_have_decl
8803 _ACEOF
8806 # ----------------------- #
8807 # Checks for structures. #
8808 # ----------------------- #
8810 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8811 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
8813 cat >>confdefs.h <<_ACEOF
8814 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
8815 _ACEOF
8819 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
8820 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
8822 cat >>confdefs.h <<_ACEOF
8823 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
8824 _ACEOF
8830 # On FreeBSD we need libutil for the kinfo_get* functions. On
8831 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8832 # Figure out which one to use.
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8834 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8835 if ${ac_cv_search_kinfo_getfile+:} false; then :
8836 $as_echo_n "(cached) " >&6
8837 else
8838 ac_func_search_save_LIBS=$LIBS
8839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8840 /* end confdefs.h. */
8842 /* Override any GCC internal prototype to avoid an error.
8843 Use char because int might match the return type of a GCC
8844 builtin and then its argument prototype would still apply. */
8845 #ifdef __cplusplus
8846 extern "C"
8847 #endif
8848 char kinfo_getfile ();
8850 main ()
8852 return kinfo_getfile ();
8854 return 0;
8856 _ACEOF
8857 for ac_lib in '' util util-freebsd; do
8858 if test -z "$ac_lib"; then
8859 ac_res="none required"
8860 else
8861 ac_res=-l$ac_lib
8862 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8864 if ac_fn_c_try_link "$LINENO"; then :
8865 ac_cv_search_kinfo_getfile=$ac_res
8867 rm -f core conftest.err conftest.$ac_objext \
8868 conftest$ac_exeext
8869 if ${ac_cv_search_kinfo_getfile+:} false; then :
8870 break
8872 done
8873 if ${ac_cv_search_kinfo_getfile+:} false; then :
8875 else
8876 ac_cv_search_kinfo_getfile=no
8878 rm conftest.$ac_ext
8879 LIBS=$ac_func_search_save_LIBS
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8882 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8883 ac_res=$ac_cv_search_kinfo_getfile
8884 if test "$ac_res" != no; then :
8885 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8890 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
8891 for ac_func in kinfo_getfile
8892 do :
8893 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
8894 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
8895 cat >>confdefs.h <<_ACEOF
8896 #define HAVE_KINFO_GETFILE 1
8897 _ACEOF
8900 done
8903 # ----------------------- #
8904 # Check for threading. #
8905 # ----------------------- #
8907 # Check whether --enable-threading was given.
8908 if test "${enable_threading+set}" = set; then :
8909 enableval=$enable_threading; case "$enableval" in
8910 yes) want_threading=yes ;;
8911 no) want_threading=no ;;
8912 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
8913 esac
8914 else
8915 want_threading=auto
8919 # Check for std::thread. This does not work on some platforms, like
8920 # mingw using the win32 threads model with gcc older than 13, and
8921 # DJGPP.
8922 ac_ext=cpp
8923 ac_cpp='$CXXCPP $CPPFLAGS'
8924 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8925 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8926 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8932 ac_ext=c
8933 ac_cpp='$CPP $CPPFLAGS'
8934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8938 ax_pthread_ok=no
8940 # We used to check for pthread.h first, but this fails if pthread.h
8941 # requires special compiler flags (e.g. on Tru64 or Sequent).
8942 # It gets checked for in the link test anyway.
8944 # First of all, check if the user has set any of the PTHREAD_LIBS,
8945 # etcetera environment variables, and if threads linking works using
8946 # them:
8947 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
8948 ax_pthread_save_CC="$CC"
8949 ax_pthread_save_CFLAGS="$CFLAGS"
8950 ax_pthread_save_LIBS="$LIBS"
8951 if test "x$PTHREAD_CC" != "x"; then :
8952 CC="$PTHREAD_CC"
8954 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8955 LIBS="$PTHREAD_LIBS $LIBS"
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8957 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8959 /* end confdefs.h. */
8961 /* Override any GCC internal prototype to avoid an error.
8962 Use char because int might match the return type of a GCC
8963 builtin and then its argument prototype would still apply. */
8964 #ifdef __cplusplus
8965 extern "C"
8966 #endif
8967 char pthread_join ();
8969 main ()
8971 return pthread_join ();
8973 return 0;
8975 _ACEOF
8976 if ac_fn_c_try_link "$LINENO"; then :
8977 ax_pthread_ok=yes
8979 rm -f core conftest.err conftest.$ac_objext \
8980 conftest$ac_exeext conftest.$ac_ext
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8982 $as_echo "$ax_pthread_ok" >&6; }
8983 if test "x$ax_pthread_ok" = "xno"; then
8984 PTHREAD_LIBS=""
8985 PTHREAD_CFLAGS=""
8987 CC="$ax_pthread_save_CC"
8988 CFLAGS="$ax_pthread_save_CFLAGS"
8989 LIBS="$ax_pthread_save_LIBS"
8992 # We must check for the threads library under a number of different
8993 # names; the ordering is very important because some systems
8994 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8995 # libraries is broken (non-POSIX).
8997 # Create a list of thread flags to try. Items starting with a "-" are
8998 # C compiler flags, and other items are library names, except for "none"
8999 # which indicates that we try without any flags at all, and "pthread-config"
9000 # which is a program returning the flags for the Pth emulation library.
9002 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
9004 # The ordering *is* (sometimes) important. Some notes on the
9005 # individual items follow:
9007 # pthreads: AIX (must check this before -lpthread)
9008 # none: in case threads are in libc; should be tried before -Kthread and
9009 # other compiler flags to prevent continual compiler warnings
9010 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
9011 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
9012 # (Note: HP C rejects this with "bad form for `-t' option")
9013 # -pthreads: Solaris/gcc (Note: HP C also rejects)
9014 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
9015 # doesn't hurt to check since this sometimes defines pthreads and
9016 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
9017 # is present but should not be used directly; and before -mthreads,
9018 # because the compiler interprets this as "-mt" + "-hreads")
9019 # -mthreads: Mingw32/gcc, Lynx/gcc
9020 # pthread: Linux, etcetera
9021 # --thread-safe: KAI C++
9022 # pthread-config: use pthread-config program (for GNU Pth library)
9024 case $host_os in
9026 freebsd*)
9028 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
9029 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
9031 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
9034 hpux*)
9036 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
9037 # multi-threading and also sets -lpthread."
9039 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
9042 openedition*)
9044 # IBM z/OS requires a feature-test macro to be defined in order to
9045 # enable POSIX threads at all, so give the user a hint if this is
9046 # not set. (We don't define these ourselves, as they can affect
9047 # other portions of the system API in unpredictable ways.)
9049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9050 /* end confdefs.h. */
9052 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
9053 AX_PTHREAD_ZOS_MISSING
9054 # endif
9056 _ACEOF
9057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9058 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
9060 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
9062 rm -f conftest*
9066 solaris*)
9068 # On Solaris (at least, for some versions), libc contains stubbed
9069 # (non-functional) versions of the pthreads routines, so link-based
9070 # tests will erroneously succeed. (N.B.: The stubs are missing
9071 # pthread_cleanup_push, or rather a function called by this macro,
9072 # so we could check for that, but who knows whether they'll stub
9073 # that too in a future libc.) So we'll check first for the
9074 # standard Solaris way of linking pthreads (-mt -lpthread).
9076 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
9078 esac
9080 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
9082 if test "x$GCC" = "xyes"; then :
9083 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
9086 # The presence of a feature test macro requesting re-entrant function
9087 # definitions is, on some systems, a strong hint that pthreads support is
9088 # correctly enabled
9090 case $host_os in
9091 darwin* | hpux* | linux* | osf* | solaris*)
9092 ax_pthread_check_macro="_REENTRANT"
9095 aix*)
9096 ax_pthread_check_macro="_THREAD_SAFE"
9100 ax_pthread_check_macro="--"
9102 esac
9103 if test "x$ax_pthread_check_macro" = "x--"; then :
9104 ax_pthread_check_cond=0
9105 else
9106 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
9109 # Are we compiling with Clang?
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
9112 $as_echo_n "checking whether $CC is Clang... " >&6; }
9113 if ${ax_cv_PTHREAD_CLANG+:} false; then :
9114 $as_echo_n "(cached) " >&6
9115 else
9116 ax_cv_PTHREAD_CLANG=no
9117 # Note that Autoconf sets GCC=yes for Clang as well as GCC
9118 if test "x$GCC" = "xyes"; then
9119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9120 /* end confdefs.h. */
9121 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
9122 # if defined(__clang__) && defined(__llvm__)
9123 AX_PTHREAD_CC_IS_CLANG
9124 # endif
9126 _ACEOF
9127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9128 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
9129 ax_cv_PTHREAD_CLANG=yes
9131 rm -f conftest*
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
9137 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
9138 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
9140 ax_pthread_clang_warning=no
9142 # Clang needs special handling, because older versions handle the -pthread
9143 # option in a rather... idiosyncratic way
9145 if test "x$ax_pthread_clang" = "xyes"; then
9147 # Clang takes -pthread; it has never supported any other flag
9149 # (Note 1: This will need to be revisited if a system that Clang
9150 # supports has POSIX threads in a separate library. This tends not
9151 # to be the way of modern systems, but it's conceivable.)
9153 # (Note 2: On some systems, notably Darwin, -pthread is not needed
9154 # to get POSIX threads support; the API is always present and
9155 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
9156 # -pthread does define _REENTRANT, and while the Darwin headers
9157 # ignore this macro, third-party headers might not.)
9159 PTHREAD_CFLAGS="-pthread"
9160 PTHREAD_LIBS=
9162 ax_pthread_ok=yes
9164 # However, older versions of Clang make a point of warning the user
9165 # that, in an invocation where only linking and no compilation is
9166 # taking place, the -pthread option has no effect ("argument unused
9167 # during compilation"). They expect -pthread to be passed in only
9168 # when source code is being compiled.
9170 # Problem is, this is at odds with the way Automake and most other
9171 # C build frameworks function, which is that the same flags used in
9172 # compilation (CFLAGS) are also used in linking. Many systems
9173 # supported by AX_PTHREAD require exactly this for POSIX threads
9174 # support, and in fact it is often not straightforward to specify a
9175 # flag that is used only in the compilation phase and not in
9176 # linking. Such a scenario is extremely rare in practice.
9178 # Even though use of the -pthread flag in linking would only print
9179 # a warning, this can be a nuisance for well-run software projects
9180 # that build with -Werror. So if the active version of Clang has
9181 # this misfeature, we search for an option to squash it.
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
9184 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
9185 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
9186 $as_echo_n "(cached) " >&6
9187 else
9188 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
9189 # Create an alternate version of $ac_link that compiles and
9190 # links in two steps (.c -> .o, .o -> exe) instead of one
9191 # (.c -> exe), because the warning occurs only in the second
9192 # step
9193 ax_pthread_save_ac_link="$ac_link"
9194 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
9195 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
9196 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
9197 ax_pthread_save_CFLAGS="$CFLAGS"
9198 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
9199 if test "x$ax_pthread_try" = "xunknown"; then :
9200 break
9202 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
9203 ac_link="$ax_pthread_save_ac_link"
9204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9205 /* end confdefs.h. */
9206 int main(void){return 0;}
9207 _ACEOF
9208 if ac_fn_c_try_link "$LINENO"; then :
9209 ac_link="$ax_pthread_2step_ac_link"
9210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9211 /* end confdefs.h. */
9212 int main(void){return 0;}
9213 _ACEOF
9214 if ac_fn_c_try_link "$LINENO"; then :
9215 break
9217 rm -f core conftest.err conftest.$ac_objext \
9218 conftest$ac_exeext conftest.$ac_ext
9221 rm -f core conftest.err conftest.$ac_objext \
9222 conftest$ac_exeext conftest.$ac_ext
9223 done
9224 ac_link="$ax_pthread_save_ac_link"
9225 CFLAGS="$ax_pthread_save_CFLAGS"
9226 if test "x$ax_pthread_try" = "x"; then :
9227 ax_pthread_try=no
9229 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
9232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
9233 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
9235 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
9236 no | unknown) ;;
9237 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
9238 esac
9240 fi # $ax_pthread_clang = yes
9242 if test "x$ax_pthread_ok" = "xno"; then
9243 for ax_pthread_try_flag in $ax_pthread_flags; do
9245 case $ax_pthread_try_flag in
9246 none)
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
9248 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
9251 -mt,pthread)
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
9253 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
9254 PTHREAD_CFLAGS="-mt"
9255 PTHREAD_LIBS="-lpthread"
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
9260 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
9261 PTHREAD_CFLAGS="$ax_pthread_try_flag"
9264 pthread-config)
9265 # Extract the first word of "pthread-config", so it can be a program name with args.
9266 set dummy pthread-config; ac_word=$2
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268 $as_echo_n "checking for $ac_word... " >&6; }
9269 if ${ac_cv_prog_ax_pthread_config+:} false; then :
9270 $as_echo_n "(cached) " >&6
9271 else
9272 if test -n "$ax_pthread_config"; then
9273 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
9274 else
9275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9276 for as_dir in $PATH
9278 IFS=$as_save_IFS
9279 test -z "$as_dir" && as_dir=.
9280 for ac_exec_ext in '' $ac_executable_extensions; do
9281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9282 ac_cv_prog_ax_pthread_config="yes"
9283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9284 break 2
9286 done
9287 done
9288 IFS=$as_save_IFS
9290 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
9293 ax_pthread_config=$ac_cv_prog_ax_pthread_config
9294 if test -n "$ax_pthread_config"; then
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
9296 $as_echo "$ax_pthread_config" >&6; }
9297 else
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9299 $as_echo "no" >&6; }
9303 if test "x$ax_pthread_config" = "xno"; then :
9304 continue
9306 PTHREAD_CFLAGS="`pthread-config --cflags`"
9307 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
9312 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
9313 PTHREAD_LIBS="-l$ax_pthread_try_flag"
9315 esac
9317 ax_pthread_save_CFLAGS="$CFLAGS"
9318 ax_pthread_save_LIBS="$LIBS"
9319 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9320 LIBS="$PTHREAD_LIBS $LIBS"
9322 # Check for various functions. We must include pthread.h,
9323 # since some functions may be macros. (On the Sequent, we
9324 # need a special flag -Kthread to make this header compile.)
9325 # We check for pthread_join because it is in -lpthread on IRIX
9326 # while pthread_create is in libc. We check for pthread_attr_init
9327 # due to DEC craziness with -lpthreads. We check for
9328 # pthread_cleanup_push because it is one of the few pthread
9329 # functions on Solaris that doesn't have a non-functional libc stub.
9330 # We try pthread_create on general principles.
9332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9333 /* end confdefs.h. */
9334 #include <pthread.h>
9335 # if $ax_pthread_check_cond
9336 # error "$ax_pthread_check_macro must be defined"
9337 # endif
9338 static void routine(void *a) { a = 0; }
9339 static void *start_routine(void *a) { return a; }
9341 main ()
9343 pthread_t th; pthread_attr_t attr;
9344 pthread_create(&th, 0, start_routine, 0);
9345 pthread_join(th, 0);
9346 pthread_attr_init(&attr);
9347 pthread_cleanup_push(routine, 0);
9348 pthread_cleanup_pop(0) /* ; */
9350 return 0;
9352 _ACEOF
9353 if ac_fn_c_try_link "$LINENO"; then :
9354 ax_pthread_ok=yes
9356 rm -f core conftest.err conftest.$ac_objext \
9357 conftest$ac_exeext conftest.$ac_ext
9359 CFLAGS="$ax_pthread_save_CFLAGS"
9360 LIBS="$ax_pthread_save_LIBS"
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9363 $as_echo "$ax_pthread_ok" >&6; }
9364 if test "x$ax_pthread_ok" = "xyes"; then :
9365 break
9368 PTHREAD_LIBS=""
9369 PTHREAD_CFLAGS=""
9370 done
9373 # Various other checks:
9374 if test "x$ax_pthread_ok" = "xyes"; then
9375 ax_pthread_save_CFLAGS="$CFLAGS"
9376 ax_pthread_save_LIBS="$LIBS"
9377 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9378 LIBS="$PTHREAD_LIBS $LIBS"
9380 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
9382 $as_echo_n "checking for joinable pthread attribute... " >&6; }
9383 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
9384 $as_echo_n "(cached) " >&6
9385 else
9386 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
9387 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
9388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389 /* end confdefs.h. */
9390 #include <pthread.h>
9392 main ()
9394 int attr = $ax_pthread_attr; return attr /* ; */
9396 return 0;
9398 _ACEOF
9399 if ac_fn_c_try_link "$LINENO"; then :
9400 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
9402 rm -f core conftest.err conftest.$ac_objext \
9403 conftest$ac_exeext conftest.$ac_ext
9404 done
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
9408 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
9409 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
9410 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
9411 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
9413 cat >>confdefs.h <<_ACEOF
9414 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
9415 _ACEOF
9417 ax_pthread_joinable_attr_defined=yes
9421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
9422 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
9423 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
9424 $as_echo_n "(cached) " >&6
9425 else
9426 ax_cv_PTHREAD_SPECIAL_FLAGS=no
9427 case $host_os in
9428 solaris*)
9429 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
9431 esac
9434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
9435 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
9436 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
9437 test "x$ax_pthread_special_flags_added" != "xyes"; then :
9438 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
9439 ax_pthread_special_flags_added=yes
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
9443 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
9444 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
9445 $as_echo_n "(cached) " >&6
9446 else
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9448 /* end confdefs.h. */
9449 #include <pthread.h>
9451 main ()
9453 int i = PTHREAD_PRIO_INHERIT;
9455 return 0;
9457 _ACEOF
9458 if ac_fn_c_try_link "$LINENO"; then :
9459 ax_cv_PTHREAD_PRIO_INHERIT=yes
9460 else
9461 ax_cv_PTHREAD_PRIO_INHERIT=no
9463 rm -f core conftest.err conftest.$ac_objext \
9464 conftest$ac_exeext conftest.$ac_ext
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
9468 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
9469 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
9470 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
9472 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
9474 ax_pthread_prio_inherit_defined=yes
9478 CFLAGS="$ax_pthread_save_CFLAGS"
9479 LIBS="$ax_pthread_save_LIBS"
9481 # More AIX lossage: compile with *_r variant
9482 if test "x$GCC" != "xyes"; then
9483 case $host_os in
9484 aix*)
9485 case "x/$CC" in #(
9486 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
9487 #handle absolute path differently from PATH based program lookup
9488 case "x$CC" in #(
9489 x/*) :
9490 if as_fn_executable_p ${CC}_r; then :
9491 PTHREAD_CC="${CC}_r"
9492 fi ;; #(
9493 *) :
9494 for ac_prog in ${CC}_r
9496 # Extract the first word of "$ac_prog", so it can be a program name with args.
9497 set dummy $ac_prog; ac_word=$2
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9499 $as_echo_n "checking for $ac_word... " >&6; }
9500 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
9501 $as_echo_n "(cached) " >&6
9502 else
9503 if test -n "$PTHREAD_CC"; then
9504 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
9505 else
9506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9507 for as_dir in $PATH
9509 IFS=$as_save_IFS
9510 test -z "$as_dir" && as_dir=.
9511 for ac_exec_ext in '' $ac_executable_extensions; do
9512 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9513 ac_cv_prog_PTHREAD_CC="$ac_prog"
9514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9515 break 2
9517 done
9518 done
9519 IFS=$as_save_IFS
9523 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
9524 if test -n "$PTHREAD_CC"; then
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
9526 $as_echo "$PTHREAD_CC" >&6; }
9527 else
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529 $as_echo "no" >&6; }
9533 test -n "$PTHREAD_CC" && break
9534 done
9535 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9537 esac ;; #(
9538 *) :
9540 esac
9542 esac
9546 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9552 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
9553 if test "x$ax_pthread_ok" = "xyes"; then
9554 threads=yes
9556 else
9557 ax_pthread_ok=no
9558 threads=no
9560 ac_ext=cpp
9561 ac_cpp='$CXXCPP $CPPFLAGS'
9562 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9563 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9564 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9567 save_LIBS="$LIBS"
9568 LIBS="$PTHREAD_LIBS $LIBS"
9569 save_CXXFLAGS="$CXXFLAGS"
9570 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
9572 $as_echo_n "checking for std::thread... " >&6; }
9573 if ${gdb_cv_cxx_std_thread+:} false; then :
9574 $as_echo_n "(cached) " >&6
9575 else
9576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9577 /* end confdefs.h. */
9578 #if defined (__MINGW32__) || defined (__CYGWIN__)
9579 # ifdef _WIN32_WINNT
9580 # if _WIN32_WINNT < 0x0501
9581 # undef _WIN32_WINNT
9582 # define _WIN32_WINNT 0x0501
9583 # endif
9584 # else
9585 # define _WIN32_WINNT 0x0501
9586 # endif
9587 #endif /* __MINGW32__ || __CYGWIN__ */
9588 #include <thread>
9589 #include <mutex>
9590 void callback() { }
9592 main ()
9594 std::thread t(callback);
9596 return 0;
9598 _ACEOF
9599 if ac_fn_cxx_try_compile "$LINENO"; then :
9600 gdb_cv_cxx_std_thread=yes
9601 else
9602 gdb_cv_cxx_std_thread=no
9604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
9607 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
9609 if test "$threads" = "yes"; then
9610 # This check must be here, while LIBS includes any necessary
9611 # threading library.
9612 for ac_func in pthread_sigmask pthread_setname_np
9613 do :
9614 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9615 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
9616 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9617 cat >>confdefs.h <<_ACEOF
9618 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9619 _ACEOF
9622 done
9625 LIBS="$save_LIBS"
9626 CXXFLAGS="$save_CXXFLAGS"
9628 if test "$want_threading" != "no"; then
9629 if test "$gdb_cv_cxx_std_thread" = "yes"; then
9631 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
9633 else
9634 if test "$want_threading" = "yes"; then
9635 as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
9636 else
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
9638 $as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
9642 ac_ext=c
9643 ac_cpp='$CPP $CPPFLAGS'
9644 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9645 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9646 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
9650 $as_echo_n "checking for sigsetjmp... " >&6; }
9651 if ${gdb_cv_func_sigsetjmp+:} false; then :
9652 $as_echo_n "(cached) " >&6
9653 else
9654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9655 /* end confdefs.h. */
9656 #include <setjmp.h>
9658 main ()
9660 sigjmp_buf env;
9661 while (! sigsetjmp (env, 1))
9662 siglongjmp (env, 1);
9665 return 0;
9667 _ACEOF
9668 if ac_fn_c_try_compile "$LINENO"; then :
9669 gdb_cv_func_sigsetjmp=yes
9670 else
9671 gdb_cv_func_sigsetjmp=no
9674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
9678 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
9679 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
9681 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
9686 # Check whether --with-intel_pt was given.
9687 if test "${with_intel_pt+set}" = set; then :
9688 withval=$with_intel_pt;
9689 else
9690 with_intel_pt=auto
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
9694 $as_echo_n "checking whether to use intel pt... " >&6; }
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
9696 $as_echo "$with_intel_pt" >&6; }
9698 if test "${with_intel_pt}" = no; then
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
9700 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
9701 HAVE_LIBIPT=no
9702 else
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704 /* end confdefs.h. */
9706 #include <linux/perf_event.h>
9707 #ifndef PERF_ATTR_SIZE_VER5
9708 # error
9709 #endif
9711 _ACEOF
9712 if ac_fn_c_try_cpp "$LINENO"; then :
9713 perf_event=yes
9714 else
9715 perf_event=no
9717 rm -f conftest.err conftest.i conftest.$ac_ext
9718 if test "$perf_event" != yes; then
9719 if test "$with_intel_pt" = yes; then
9720 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
9721 else
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
9723 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
9735 use_additional=yes
9737 acl_save_prefix="$prefix"
9738 prefix="$acl_final_prefix"
9739 acl_save_exec_prefix="$exec_prefix"
9740 exec_prefix="$acl_final_exec_prefix"
9742 eval additional_includedir=\"$includedir\"
9743 eval additional_libdir=\"$libdir\"
9745 exec_prefix="$acl_save_exec_prefix"
9746 prefix="$acl_save_prefix"
9749 # Check whether --with-libipt-prefix was given.
9750 if test "${with_libipt_prefix+set}" = set; then :
9751 withval=$with_libipt_prefix;
9752 if test "X$withval" = "Xno"; then
9753 use_additional=no
9754 else
9755 if test "X$withval" = "X"; then
9757 acl_save_prefix="$prefix"
9758 prefix="$acl_final_prefix"
9759 acl_save_exec_prefix="$exec_prefix"
9760 exec_prefix="$acl_final_exec_prefix"
9762 eval additional_includedir=\"$includedir\"
9763 eval additional_libdir=\"$libdir\"
9765 exec_prefix="$acl_save_exec_prefix"
9766 prefix="$acl_save_prefix"
9768 else
9769 additional_includedir="$withval/include"
9770 additional_libdir="$withval/lib"
9777 # Check whether --with-libipt-type was given.
9778 if test "${with_libipt_type+set}" = set; then :
9779 withval=$with_libipt_type; with_libipt_type=$withval
9780 else
9781 with_libipt_type=auto
9784 lib_type=`eval echo \$with_libipt_type`
9786 LIBIPT=
9787 LTLIBIPT=
9788 INCIPT=
9789 rpathdirs=
9790 ltrpathdirs=
9791 names_already_handled=
9792 names_next_round='ipt '
9793 while test -n "$names_next_round"; do
9794 names_this_round="$names_next_round"
9795 names_next_round=
9796 for name in $names_this_round; do
9797 already_handled=
9798 for n in $names_already_handled; do
9799 if test "$n" = "$name"; then
9800 already_handled=yes
9801 break
9803 done
9804 if test -z "$already_handled"; then
9805 names_already_handled="$names_already_handled $name"
9806 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9807 eval value=\"\$HAVE_LIB$uppername\"
9808 if test -n "$value"; then
9809 if test "$value" = yes; then
9810 eval value=\"\$LIB$uppername\"
9811 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
9812 eval value=\"\$LTLIB$uppername\"
9813 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
9814 else
9817 else
9818 found_dir=
9819 found_la=
9820 found_so=
9821 found_a=
9822 if test $use_additional = yes; then
9823 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9824 found_dir="$additional_libdir"
9825 found_so="$additional_libdir/lib$name.$shlibext"
9826 if test -f "$additional_libdir/lib$name.la"; then
9827 found_la="$additional_libdir/lib$name.la"
9829 elif test x$lib_type != xshared; then
9830 if test -f "$additional_libdir/lib$name.$libext"; then
9831 found_dir="$additional_libdir"
9832 found_a="$additional_libdir/lib$name.$libext"
9833 if test -f "$additional_libdir/lib$name.la"; then
9834 found_la="$additional_libdir/lib$name.la"
9839 if test "X$found_dir" = "X"; then
9840 for x in $LDFLAGS $LTLIBIPT; do
9842 acl_save_prefix="$prefix"
9843 prefix="$acl_final_prefix"
9844 acl_save_exec_prefix="$exec_prefix"
9845 exec_prefix="$acl_final_exec_prefix"
9846 eval x=\"$x\"
9847 exec_prefix="$acl_save_exec_prefix"
9848 prefix="$acl_save_prefix"
9850 case "$x" in
9851 -L*)
9852 dir=`echo "X$x" | sed -e 's/^X-L//'`
9853 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9854 found_dir="$dir"
9855 found_so="$dir/lib$name.$shlibext"
9856 if test -f "$dir/lib$name.la"; then
9857 found_la="$dir/lib$name.la"
9859 elif test x$lib_type != xshared; then
9860 if test -f "$dir/lib$name.$libext"; then
9861 found_dir="$dir"
9862 found_a="$dir/lib$name.$libext"
9863 if test -f "$dir/lib$name.la"; then
9864 found_la="$dir/lib$name.la"
9869 esac
9870 if test "X$found_dir" != "X"; then
9871 break
9873 done
9875 if test "X$found_dir" != "X"; then
9876 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
9877 if test "X$found_so" != "X"; then
9878 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9879 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9880 else
9881 haveit=
9882 for x in $ltrpathdirs; do
9883 if test "X$x" = "X$found_dir"; then
9884 haveit=yes
9885 break
9887 done
9888 if test -z "$haveit"; then
9889 ltrpathdirs="$ltrpathdirs $found_dir"
9891 if test "$hardcode_direct" = yes; then
9892 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9893 else
9894 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9895 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9896 haveit=
9897 for x in $rpathdirs; do
9898 if test "X$x" = "X$found_dir"; then
9899 haveit=yes
9900 break
9902 done
9903 if test -z "$haveit"; then
9904 rpathdirs="$rpathdirs $found_dir"
9906 else
9907 haveit=
9908 for x in $LDFLAGS $LIBIPT; do
9910 acl_save_prefix="$prefix"
9911 prefix="$acl_final_prefix"
9912 acl_save_exec_prefix="$exec_prefix"
9913 exec_prefix="$acl_final_exec_prefix"
9914 eval x=\"$x\"
9915 exec_prefix="$acl_save_exec_prefix"
9916 prefix="$acl_save_prefix"
9918 if test "X$x" = "X-L$found_dir"; then
9919 haveit=yes
9920 break
9922 done
9923 if test -z "$haveit"; then
9924 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
9926 if test "$hardcode_minus_L" != no; then
9927 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9928 else
9929 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9934 else
9935 if test "X$found_a" != "X"; then
9936 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
9937 else
9938 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
9941 additional_includedir=
9942 case "$found_dir" in
9943 */lib | */lib/)
9944 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9945 additional_includedir="$basedir/include"
9947 esac
9948 if test "X$additional_includedir" != "X"; then
9949 if test "X$additional_includedir" != "X/usr/include"; then
9950 haveit=
9951 if test "X$additional_includedir" = "X/usr/local/include"; then
9952 if test -n "$GCC"; then
9953 case $host_os in
9954 linux*) haveit=yes;;
9955 esac
9958 if test -z "$haveit"; then
9959 for x in $CPPFLAGS $INCIPT; do
9961 acl_save_prefix="$prefix"
9962 prefix="$acl_final_prefix"
9963 acl_save_exec_prefix="$exec_prefix"
9964 exec_prefix="$acl_final_exec_prefix"
9965 eval x=\"$x\"
9966 exec_prefix="$acl_save_exec_prefix"
9967 prefix="$acl_save_prefix"
9969 if test "X$x" = "X-I$additional_includedir"; then
9970 haveit=yes
9971 break
9973 done
9974 if test -z "$haveit"; then
9975 if test -d "$additional_includedir"; then
9976 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
9982 if test -n "$found_la"; then
9983 save_libdir="$libdir"
9984 case "$found_la" in
9985 */* | *\\*) . "$found_la" ;;
9986 *) . "./$found_la" ;;
9987 esac
9988 libdir="$save_libdir"
9989 for dep in $dependency_libs; do
9990 case "$dep" in
9991 -L*)
9992 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9993 if test "X$additional_libdir" != "X/usr/lib"; then
9994 haveit=
9995 if test "X$additional_libdir" = "X/usr/local/lib"; then
9996 if test -n "$GCC"; then
9997 case $host_os in
9998 linux*) haveit=yes;;
9999 esac
10002 if test -z "$haveit"; then
10003 haveit=
10004 for x in $LDFLAGS $LIBIPT; do
10006 acl_save_prefix="$prefix"
10007 prefix="$acl_final_prefix"
10008 acl_save_exec_prefix="$exec_prefix"
10009 exec_prefix="$acl_final_exec_prefix"
10010 eval x=\"$x\"
10011 exec_prefix="$acl_save_exec_prefix"
10012 prefix="$acl_save_prefix"
10014 if test "X$x" = "X-L$additional_libdir"; then
10015 haveit=yes
10016 break
10018 done
10019 if test -z "$haveit"; then
10020 if test -d "$additional_libdir"; then
10021 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10024 haveit=
10025 for x in $LDFLAGS $LTLIBIPT; do
10027 acl_save_prefix="$prefix"
10028 prefix="$acl_final_prefix"
10029 acl_save_exec_prefix="$exec_prefix"
10030 exec_prefix="$acl_final_exec_prefix"
10031 eval x=\"$x\"
10032 exec_prefix="$acl_save_exec_prefix"
10033 prefix="$acl_save_prefix"
10035 if test "X$x" = "X-L$additional_libdir"; then
10036 haveit=yes
10037 break
10039 done
10040 if test -z "$haveit"; then
10041 if test -d "$additional_libdir"; then
10042 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10048 -R*)
10049 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10050 if test "$enable_rpath" != no; then
10051 haveit=
10052 for x in $rpathdirs; do
10053 if test "X$x" = "X$dir"; then
10054 haveit=yes
10055 break
10057 done
10058 if test -z "$haveit"; then
10059 rpathdirs="$rpathdirs $dir"
10061 haveit=
10062 for x in $ltrpathdirs; do
10063 if test "X$x" = "X$dir"; then
10064 haveit=yes
10065 break
10067 done
10068 if test -z "$haveit"; then
10069 ltrpathdirs="$ltrpathdirs $dir"
10073 -l*)
10074 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10076 *.la)
10077 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10080 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10081 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10083 esac
10084 done
10086 else
10087 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10088 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10089 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10090 else
10091 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
10092 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
10097 done
10098 done
10099 if test "X$rpathdirs" != "X"; then
10100 if test -n "$hardcode_libdir_separator"; then
10101 alldirs=
10102 for found_dir in $rpathdirs; do
10103 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10104 done
10105 acl_save_libdir="$libdir"
10106 libdir="$alldirs"
10107 eval flag=\"$hardcode_libdir_flag_spec\"
10108 libdir="$acl_save_libdir"
10109 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10110 else
10111 for found_dir in $rpathdirs; do
10112 acl_save_libdir="$libdir"
10113 libdir="$found_dir"
10114 eval flag=\"$hardcode_libdir_flag_spec\"
10115 libdir="$acl_save_libdir"
10116 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10117 done
10120 if test "X$ltrpathdirs" != "X"; then
10121 for found_dir in $ltrpathdirs; do
10122 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10123 done
10127 ac_save_CPPFLAGS="$CPPFLAGS"
10129 for element in $INCIPT; do
10130 haveit=
10131 for x in $CPPFLAGS; do
10133 acl_save_prefix="$prefix"
10134 prefix="$acl_final_prefix"
10135 acl_save_exec_prefix="$exec_prefix"
10136 exec_prefix="$acl_final_exec_prefix"
10137 eval x=\"$x\"
10138 exec_prefix="$acl_save_exec_prefix"
10139 prefix="$acl_save_prefix"
10141 if test "X$x" = "X$element"; then
10142 haveit=yes
10143 break
10145 done
10146 if test -z "$haveit"; then
10147 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10149 done
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10153 $as_echo_n "checking for libipt... " >&6; }
10154 if ${ac_cv_libipt+:} false; then :
10155 $as_echo_n "(cached) " >&6
10156 else
10158 ac_save_LIBS="$LIBS"
10159 LIBS="$LIBS $LIBIPT"
10160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10161 /* end confdefs.h. */
10162 #include "intel-pt.h"
10164 main ()
10166 pt_insn_alloc_decoder (0);
10168 return 0;
10170 _ACEOF
10171 if ac_fn_c_try_link "$LINENO"; then :
10172 ac_cv_libipt=yes
10173 else
10174 ac_cv_libipt=no
10176 rm -f core conftest.err conftest.$ac_objext \
10177 conftest$ac_exeext conftest.$ac_ext
10178 LIBS="$ac_save_LIBS"
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10182 $as_echo "$ac_cv_libipt" >&6; }
10183 if test "$ac_cv_libipt" = yes; then
10184 HAVE_LIBIPT=yes
10186 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10189 $as_echo_n "checking how to link with libipt... " >&6; }
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10191 $as_echo "$LIBIPT" >&6; }
10192 else
10193 HAVE_LIBIPT=no
10194 CPPFLAGS="$ac_save_CPPFLAGS"
10195 LIBIPT=
10196 LTLIBIPT=
10204 if test "$HAVE_LIBIPT" != yes; then
10205 if test "$with_intel_pt" = yes; then
10206 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
10207 else
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10209 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10211 else
10212 save_LIBS=$LIBS
10213 LIBS="$LIBS $LIBIPT"
10214 for ac_func in pt_insn_event
10215 do :
10216 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
10217 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
10218 cat >>confdefs.h <<_ACEOF
10219 #define HAVE_PT_INSN_EVENT 1
10220 _ACEOF
10223 done
10225 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
10227 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
10229 cat >>confdefs.h <<_ACEOF
10230 #define HAVE_STRUCT_PT_INSN_ENABLED 1
10231 _ACEOF
10235 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
10237 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
10239 cat >>confdefs.h <<_ACEOF
10240 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
10241 _ACEOF
10246 ac_fn_c_check_member "$LINENO" "struct pt_event" "variant.ptwrite" "ac_cv_member_struct_pt_event_variant_ptwrite" "#include <intel-pt.h>
10248 if test "x$ac_cv_member_struct_pt_event_variant_ptwrite" = xyes; then :
10250 cat >>confdefs.h <<_ACEOF
10251 #define HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE 1
10252 _ACEOF
10257 LIBS=$save_LIBS
10261 # Check if the compiler and runtime support printing long longs.
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
10264 $as_echo_n "checking for long long support in printf... " >&6; }
10265 if ${gdb_cv_printf_has_long_long+:} false; then :
10266 $as_echo_n "(cached) " >&6
10267 else
10268 if test "$cross_compiling" = yes; then :
10269 gdb_cv_printf_has_long_long=no
10270 else
10271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10272 /* end confdefs.h. */
10273 $ac_includes_default
10275 main ()
10277 char buf[32];
10278 long long l = 0;
10279 l = (l << 16) + 0x0123;
10280 l = (l << 16) + 0x4567;
10281 l = (l << 16) + 0x89ab;
10282 l = (l << 16) + 0xcdef;
10283 sprintf (buf, "0x%016llx", l);
10284 return (strcmp ("0x0123456789abcdef", buf));
10286 return 0;
10288 _ACEOF
10289 if ac_fn_c_try_run "$LINENO"; then :
10290 gdb_cv_printf_has_long_long=yes
10291 else
10292 gdb_cv_printf_has_long_long=no
10294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10295 conftest.$ac_objext conftest.beam conftest.$ac_ext
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
10300 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
10301 if test "$gdb_cv_printf_has_long_long" = yes; then
10303 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
10308 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
10310 for ac_header in sys/procfs.h
10311 do :
10312 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
10313 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
10314 cat >>confdefs.h <<_ACEOF
10315 #define HAVE_SYS_PROCFS_H 1
10316 _ACEOF
10320 done
10322 if test "$ac_cv_header_sys_procfs_h" = yes; then
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10325 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10326 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
10327 $as_echo_n "(cached) " >&6
10328 else
10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h. */
10332 #define _SYSCALL32
10333 #include <sys/procfs.h>
10335 main ()
10337 gregset_t avar
10339 return 0;
10341 _ACEOF
10342 if ac_fn_c_try_compile "$LINENO"; then :
10343 bfd_cv_have_sys_procfs_type_gregset_t=yes
10344 else
10345 bfd_cv_have_sys_procfs_type_gregset_t=no
10348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10351 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
10353 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10357 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10361 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10362 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
10363 $as_echo_n "(cached) " >&6
10364 else
10365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10366 /* end confdefs.h. */
10368 #define _SYSCALL32
10369 #include <sys/procfs.h>
10371 main ()
10373 fpregset_t avar
10375 return 0;
10377 _ACEOF
10378 if ac_fn_c_try_compile "$LINENO"; then :
10379 bfd_cv_have_sys_procfs_type_fpregset_t=yes
10380 else
10381 bfd_cv_have_sys_procfs_type_fpregset_t=no
10384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10387 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
10389 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10393 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10397 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10398 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
10399 $as_echo_n "(cached) " >&6
10400 else
10401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10402 /* end confdefs.h. */
10404 #define _SYSCALL32
10405 #include <sys/procfs.h>
10407 main ()
10409 prgregset_t avar
10411 return 0;
10413 _ACEOF
10414 if ac_fn_c_try_compile "$LINENO"; then :
10415 bfd_cv_have_sys_procfs_type_prgregset_t=yes
10416 else
10417 bfd_cv_have_sys_procfs_type_prgregset_t=no
10420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10423 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
10425 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10429 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
10432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10433 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10434 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
10435 $as_echo_n "(cached) " >&6
10436 else
10437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10438 /* end confdefs.h. */
10440 #define _SYSCALL32
10441 #include <sys/procfs.h>
10443 main ()
10445 prfpregset_t avar
10447 return 0;
10449 _ACEOF
10450 if ac_fn_c_try_compile "$LINENO"; then :
10451 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
10452 else
10453 bfd_cv_have_sys_procfs_type_prfpregset_t=no
10456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10459 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
10461 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10465 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10469 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10470 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
10471 $as_echo_n "(cached) " >&6
10472 else
10473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10474 /* end confdefs.h. */
10476 #define _SYSCALL32
10477 #include <sys/procfs.h>
10479 main ()
10481 prgregset32_t avar
10483 return 0;
10485 _ACEOF
10486 if ac_fn_c_try_compile "$LINENO"; then :
10487 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
10488 else
10489 bfd_cv_have_sys_procfs_type_prgregset32_t=no
10492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10495 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
10497 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10501 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10505 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10506 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
10507 $as_echo_n "(cached) " >&6
10508 else
10509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10510 /* end confdefs.h. */
10512 #define _SYSCALL32
10513 #include <sys/procfs.h>
10515 main ()
10517 lwpid_t avar
10519 return 0;
10521 _ACEOF
10522 if ac_fn_c_try_compile "$LINENO"; then :
10523 bfd_cv_have_sys_procfs_type_lwpid_t=yes
10524 else
10525 bfd_cv_have_sys_procfs_type_lwpid_t=no
10528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10531 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
10533 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
10537 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
10541 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
10542 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
10543 $as_echo_n "(cached) " >&6
10544 else
10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10546 /* end confdefs.h. */
10548 #define _SYSCALL32
10549 #include <sys/procfs.h>
10551 main ()
10553 psaddr_t avar
10555 return 0;
10557 _ACEOF
10558 if ac_fn_c_try_compile "$LINENO"; then :
10559 bfd_cv_have_sys_procfs_type_psaddr_t=yes
10560 else
10561 bfd_cv_have_sys_procfs_type_psaddr_t=no
10564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10567 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
10569 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
10573 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
10577 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
10578 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
10579 $as_echo_n "(cached) " >&6
10580 else
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h. */
10584 #define _SYSCALL32
10585 #include <sys/procfs.h>
10587 main ()
10589 elf_fpregset_t avar
10591 return 0;
10593 _ACEOF
10594 if ac_fn_c_try_compile "$LINENO"; then :
10595 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
10596 else
10597 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
10600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10603 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
10605 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
10609 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
10613 # Check for xxhash
10615 # Check whether --with-xxhash was given.
10616 if test "${with_xxhash+set}" = set; then :
10617 withval=$with_xxhash;
10618 else
10619 with_xxhash=auto
10623 if test "x$with_xxhash" != "xno"; then
10632 use_additional=yes
10634 acl_save_prefix="$prefix"
10635 prefix="$acl_final_prefix"
10636 acl_save_exec_prefix="$exec_prefix"
10637 exec_prefix="$acl_final_exec_prefix"
10639 eval additional_includedir=\"$includedir\"
10640 eval additional_libdir=\"$libdir\"
10642 exec_prefix="$acl_save_exec_prefix"
10643 prefix="$acl_save_prefix"
10646 # Check whether --with-libxxhash-prefix was given.
10647 if test "${with_libxxhash_prefix+set}" = set; then :
10648 withval=$with_libxxhash_prefix;
10649 if test "X$withval" = "Xno"; then
10650 use_additional=no
10651 else
10652 if test "X$withval" = "X"; then
10654 acl_save_prefix="$prefix"
10655 prefix="$acl_final_prefix"
10656 acl_save_exec_prefix="$exec_prefix"
10657 exec_prefix="$acl_final_exec_prefix"
10659 eval additional_includedir=\"$includedir\"
10660 eval additional_libdir=\"$libdir\"
10662 exec_prefix="$acl_save_exec_prefix"
10663 prefix="$acl_save_prefix"
10665 else
10666 additional_includedir="$withval/include"
10667 additional_libdir="$withval/lib"
10674 # Check whether --with-libxxhash-type was given.
10675 if test "${with_libxxhash_type+set}" = set; then :
10676 withval=$with_libxxhash_type; with_libxxhash_type=$withval
10677 else
10678 with_libxxhash_type=auto
10681 lib_type=`eval echo \$with_libxxhash_type`
10683 LIBXXHASH=
10684 LTLIBXXHASH=
10685 INCXXHASH=
10686 rpathdirs=
10687 ltrpathdirs=
10688 names_already_handled=
10689 names_next_round='xxhash '
10690 while test -n "$names_next_round"; do
10691 names_this_round="$names_next_round"
10692 names_next_round=
10693 for name in $names_this_round; do
10694 already_handled=
10695 for n in $names_already_handled; do
10696 if test "$n" = "$name"; then
10697 already_handled=yes
10698 break
10700 done
10701 if test -z "$already_handled"; then
10702 names_already_handled="$names_already_handled $name"
10703 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10704 eval value=\"\$HAVE_LIB$uppername\"
10705 if test -n "$value"; then
10706 if test "$value" = yes; then
10707 eval value=\"\$LIB$uppername\"
10708 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
10709 eval value=\"\$LTLIB$uppername\"
10710 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
10711 else
10714 else
10715 found_dir=
10716 found_la=
10717 found_so=
10718 found_a=
10719 if test $use_additional = yes; then
10720 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10721 found_dir="$additional_libdir"
10722 found_so="$additional_libdir/lib$name.$shlibext"
10723 if test -f "$additional_libdir/lib$name.la"; then
10724 found_la="$additional_libdir/lib$name.la"
10726 elif test x$lib_type != xshared; then
10727 if test -f "$additional_libdir/lib$name.$libext"; then
10728 found_dir="$additional_libdir"
10729 found_a="$additional_libdir/lib$name.$libext"
10730 if test -f "$additional_libdir/lib$name.la"; then
10731 found_la="$additional_libdir/lib$name.la"
10736 if test "X$found_dir" = "X"; then
10737 for x in $LDFLAGS $LTLIBXXHASH; do
10739 acl_save_prefix="$prefix"
10740 prefix="$acl_final_prefix"
10741 acl_save_exec_prefix="$exec_prefix"
10742 exec_prefix="$acl_final_exec_prefix"
10743 eval x=\"$x\"
10744 exec_prefix="$acl_save_exec_prefix"
10745 prefix="$acl_save_prefix"
10747 case "$x" in
10748 -L*)
10749 dir=`echo "X$x" | sed -e 's/^X-L//'`
10750 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10751 found_dir="$dir"
10752 found_so="$dir/lib$name.$shlibext"
10753 if test -f "$dir/lib$name.la"; then
10754 found_la="$dir/lib$name.la"
10756 elif test x$lib_type != xshared; then
10757 if test -f "$dir/lib$name.$libext"; then
10758 found_dir="$dir"
10759 found_a="$dir/lib$name.$libext"
10760 if test -f "$dir/lib$name.la"; then
10761 found_la="$dir/lib$name.la"
10766 esac
10767 if test "X$found_dir" != "X"; then
10768 break
10770 done
10772 if test "X$found_dir" != "X"; then
10773 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
10774 if test "X$found_so" != "X"; then
10775 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10776 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10777 else
10778 haveit=
10779 for x in $ltrpathdirs; do
10780 if test "X$x" = "X$found_dir"; then
10781 haveit=yes
10782 break
10784 done
10785 if test -z "$haveit"; then
10786 ltrpathdirs="$ltrpathdirs $found_dir"
10788 if test "$hardcode_direct" = yes; then
10789 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10790 else
10791 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10792 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10793 haveit=
10794 for x in $rpathdirs; do
10795 if test "X$x" = "X$found_dir"; then
10796 haveit=yes
10797 break
10799 done
10800 if test -z "$haveit"; then
10801 rpathdirs="$rpathdirs $found_dir"
10803 else
10804 haveit=
10805 for x in $LDFLAGS $LIBXXHASH; do
10807 acl_save_prefix="$prefix"
10808 prefix="$acl_final_prefix"
10809 acl_save_exec_prefix="$exec_prefix"
10810 exec_prefix="$acl_final_exec_prefix"
10811 eval x=\"$x\"
10812 exec_prefix="$acl_save_exec_prefix"
10813 prefix="$acl_save_prefix"
10815 if test "X$x" = "X-L$found_dir"; then
10816 haveit=yes
10817 break
10819 done
10820 if test -z "$haveit"; then
10821 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
10823 if test "$hardcode_minus_L" != no; then
10824 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10825 else
10826 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10831 else
10832 if test "X$found_a" != "X"; then
10833 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
10834 else
10835 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
10838 additional_includedir=
10839 case "$found_dir" in
10840 */lib | */lib/)
10841 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10842 additional_includedir="$basedir/include"
10844 esac
10845 if test "X$additional_includedir" != "X"; then
10846 if test "X$additional_includedir" != "X/usr/include"; then
10847 haveit=
10848 if test "X$additional_includedir" = "X/usr/local/include"; then
10849 if test -n "$GCC"; then
10850 case $host_os in
10851 linux*) haveit=yes;;
10852 esac
10855 if test -z "$haveit"; then
10856 for x in $CPPFLAGS $INCXXHASH; do
10858 acl_save_prefix="$prefix"
10859 prefix="$acl_final_prefix"
10860 acl_save_exec_prefix="$exec_prefix"
10861 exec_prefix="$acl_final_exec_prefix"
10862 eval x=\"$x\"
10863 exec_prefix="$acl_save_exec_prefix"
10864 prefix="$acl_save_prefix"
10866 if test "X$x" = "X-I$additional_includedir"; then
10867 haveit=yes
10868 break
10870 done
10871 if test -z "$haveit"; then
10872 if test -d "$additional_includedir"; then
10873 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
10879 if test -n "$found_la"; then
10880 save_libdir="$libdir"
10881 case "$found_la" in
10882 */* | *\\*) . "$found_la" ;;
10883 *) . "./$found_la" ;;
10884 esac
10885 libdir="$save_libdir"
10886 for dep in $dependency_libs; do
10887 case "$dep" in
10888 -L*)
10889 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10890 if test "X$additional_libdir" != "X/usr/lib"; then
10891 haveit=
10892 if test "X$additional_libdir" = "X/usr/local/lib"; then
10893 if test -n "$GCC"; then
10894 case $host_os in
10895 linux*) haveit=yes;;
10896 esac
10899 if test -z "$haveit"; then
10900 haveit=
10901 for x in $LDFLAGS $LIBXXHASH; do
10903 acl_save_prefix="$prefix"
10904 prefix="$acl_final_prefix"
10905 acl_save_exec_prefix="$exec_prefix"
10906 exec_prefix="$acl_final_exec_prefix"
10907 eval x=\"$x\"
10908 exec_prefix="$acl_save_exec_prefix"
10909 prefix="$acl_save_prefix"
10911 if test "X$x" = "X-L$additional_libdir"; then
10912 haveit=yes
10913 break
10915 done
10916 if test -z "$haveit"; then
10917 if test -d "$additional_libdir"; then
10918 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
10921 haveit=
10922 for x in $LDFLAGS $LTLIBXXHASH; do
10924 acl_save_prefix="$prefix"
10925 prefix="$acl_final_prefix"
10926 acl_save_exec_prefix="$exec_prefix"
10927 exec_prefix="$acl_final_exec_prefix"
10928 eval x=\"$x\"
10929 exec_prefix="$acl_save_exec_prefix"
10930 prefix="$acl_save_prefix"
10932 if test "X$x" = "X-L$additional_libdir"; then
10933 haveit=yes
10934 break
10936 done
10937 if test -z "$haveit"; then
10938 if test -d "$additional_libdir"; then
10939 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
10945 -R*)
10946 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10947 if test "$enable_rpath" != no; then
10948 haveit=
10949 for x in $rpathdirs; do
10950 if test "X$x" = "X$dir"; then
10951 haveit=yes
10952 break
10954 done
10955 if test -z "$haveit"; then
10956 rpathdirs="$rpathdirs $dir"
10958 haveit=
10959 for x in $ltrpathdirs; do
10960 if test "X$x" = "X$dir"; then
10961 haveit=yes
10962 break
10964 done
10965 if test -z "$haveit"; then
10966 ltrpathdirs="$ltrpathdirs $dir"
10970 -l*)
10971 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10973 *.la)
10974 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10977 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
10978 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
10980 esac
10981 done
10983 else
10984 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10985 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10986 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
10987 else
10988 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
10989 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
10994 done
10995 done
10996 if test "X$rpathdirs" != "X"; then
10997 if test -n "$hardcode_libdir_separator"; then
10998 alldirs=
10999 for found_dir in $rpathdirs; do
11000 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11001 done
11002 acl_save_libdir="$libdir"
11003 libdir="$alldirs"
11004 eval flag=\"$hardcode_libdir_flag_spec\"
11005 libdir="$acl_save_libdir"
11006 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
11007 else
11008 for found_dir in $rpathdirs; do
11009 acl_save_libdir="$libdir"
11010 libdir="$found_dir"
11011 eval flag=\"$hardcode_libdir_flag_spec\"
11012 libdir="$acl_save_libdir"
11013 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
11014 done
11017 if test "X$ltrpathdirs" != "X"; then
11018 for found_dir in $ltrpathdirs; do
11019 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
11020 done
11024 ac_save_CPPFLAGS="$CPPFLAGS"
11026 for element in $INCXXHASH; do
11027 haveit=
11028 for x in $CPPFLAGS; do
11030 acl_save_prefix="$prefix"
11031 prefix="$acl_final_prefix"
11032 acl_save_exec_prefix="$exec_prefix"
11033 exec_prefix="$acl_final_exec_prefix"
11034 eval x=\"$x\"
11035 exec_prefix="$acl_save_exec_prefix"
11036 prefix="$acl_save_prefix"
11038 if test "X$x" = "X$element"; then
11039 haveit=yes
11040 break
11042 done
11043 if test -z "$haveit"; then
11044 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11046 done
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
11050 $as_echo_n "checking for libxxhash... " >&6; }
11051 if ${ac_cv_libxxhash+:} false; then :
11052 $as_echo_n "(cached) " >&6
11053 else
11055 ac_save_LIBS="$LIBS"
11056 LIBS="$LIBS $LIBXXHASH"
11057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11058 /* end confdefs.h. */
11059 #include <xxhash.h>
11061 main ()
11063 XXH32("foo", 3, 0);
11066 return 0;
11068 _ACEOF
11069 if ac_fn_c_try_link "$LINENO"; then :
11070 ac_cv_libxxhash=yes
11071 else
11072 ac_cv_libxxhash=no
11074 rm -f core conftest.err conftest.$ac_objext \
11075 conftest$ac_exeext conftest.$ac_ext
11076 LIBS="$ac_save_LIBS"
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
11080 $as_echo "$ac_cv_libxxhash" >&6; }
11081 if test "$ac_cv_libxxhash" = yes; then
11082 HAVE_LIBXXHASH=yes
11084 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
11087 $as_echo_n "checking how to link with libxxhash... " >&6; }
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
11089 $as_echo "$LIBXXHASH" >&6; }
11090 else
11091 HAVE_LIBXXHASH=no
11092 CPPFLAGS="$ac_save_CPPFLAGS"
11093 LIBXXHASH=
11094 LTLIBXXHASH=
11102 if test "$HAVE_LIBXXHASH" != yes; then
11103 if test "$with_xxhash" = yes; then
11104 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
11107 if test "x$with_xxhash" = "xauto"; then
11108 with_xxhash="$HAVE_LIBXXHASH"
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
11113 $as_echo_n "checking whether to use xxhash... " >&6; }
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
11115 $as_echo "$with_xxhash" >&6; }
11117 # This is set by GDB_AC_COMMON.
11121 # Check whether we will enable the inclusion of unit tests when
11122 # compiling GDB.
11124 # The default value of this option changes depending whether we're on
11125 # development mode (in which case it's "true") or not (in which case
11126 # it's "false"). The $development variable is set by the GDB_AC_COMMON
11127 # macro, which must therefore be used before GDB_AC_SELFTEST.
11129 if test "x$development" != xtrue && test "x$development" != xfalse; then :
11130 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
11133 # Check whether --enable-unit-tests was given.
11134 if test "${enable_unit_tests+set}" = set; then :
11135 enableval=$enable_unit_tests; case "${enableval}" in
11136 yes) enable_unittests=true ;;
11137 no) enable_unittests=false ;;
11138 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
11139 esac
11140 else
11141 enable_unittests=$development
11145 if $enable_unittests; then
11147 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
11153 case ${build_alias} in
11154 "") build_noncanonical=${build} ;;
11155 *) build_noncanonical=${build_alias} ;;
11156 esac
11158 case ${host_alias} in
11159 "") host_noncanonical=${build_noncanonical} ;;
11160 *) host_noncanonical=${host_alias} ;;
11161 esac
11163 case ${target_alias} in
11164 "") target_noncanonical=${host_noncanonical} ;;
11165 *) target_noncanonical=${target_alias} ;;
11166 esac
11173 # Dependency checking.
11174 rm -rf .tst 2>/dev/null
11175 mkdir .tst 2>/dev/null
11176 if test -d .tst; then
11177 am__leading_dot=.
11178 else
11179 am__leading_dot=_
11181 rmdir .tst 2>/dev/null
11183 DEPDIR="${am__leading_dot}deps"
11185 ac_config_commands="$ac_config_commands depdir"
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
11190 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
11191 set x ${MAKE-make}
11192 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
11193 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
11194 $as_echo_n "(cached) " >&6
11195 else
11196 cat >conftest.make <<\_ACEOF
11197 SHELL = /bin/sh
11198 all:
11199 @echo '@@@%%%=$(MAKE)=@@@%%%'
11200 _ACEOF
11201 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
11202 case `${MAKE-make} -f conftest.make 2>/dev/null` in
11203 *@@@%%%=?*=@@@%%%*)
11204 eval ac_cv_prog_make_${ac_make}_set=yes;;
11206 eval ac_cv_prog_make_${ac_make}_set=no;;
11207 esac
11208 rm -f conftest.make
11210 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11212 $as_echo "yes" >&6; }
11213 SET_MAKE=
11214 else
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216 $as_echo "no" >&6; }
11217 SET_MAKE="MAKE=${MAKE-make}"
11221 MKINSTALLDIRS=
11222 if test -n "$ac_aux_dir"; then
11223 case "$ac_aux_dir" in
11224 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
11225 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
11226 esac
11228 if test -z "$MKINSTALLDIRS"; then
11229 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
11235 $as_echo_n "checking whether NLS is requested... " >&6; }
11236 # Check whether --enable-nls was given.
11237 if test "${enable_nls+set}" = set; then :
11238 enableval=$enable_nls; USE_NLS=$enableval
11239 else
11240 USE_NLS=yes
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
11244 $as_echo "$USE_NLS" >&6; }
11251 # Prepare PATH_SEPARATOR.
11252 # The user is always right.
11253 if test "${PATH_SEPARATOR+set}" != set; then
11254 echo "#! /bin/sh" >conf$$.sh
11255 echo "exit 0" >>conf$$.sh
11256 chmod +x conf$$.sh
11257 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11258 PATH_SEPARATOR=';'
11259 else
11260 PATH_SEPARATOR=:
11262 rm -f conf$$.sh
11265 # Find out how to test for executable files. Don't use a zero-byte file,
11266 # as systems may use methods other than mode bits to determine executability.
11267 cat >conf$$.file <<_ASEOF
11268 #! /bin/sh
11269 exit 0
11270 _ASEOF
11271 chmod +x conf$$.file
11272 if test -x conf$$.file >/dev/null 2>&1; then
11273 ac_executable_p="test -x"
11274 else
11275 ac_executable_p="test -f"
11277 rm -f conf$$.file
11279 # Extract the first word of "msgfmt", so it can be a program name with args.
11280 set dummy msgfmt; ac_word=$2
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11282 $as_echo_n "checking for $ac_word... " >&6; }
11283 if ${ac_cv_path_MSGFMT+:} false; then :
11284 $as_echo_n "(cached) " >&6
11285 else
11286 case "$MSGFMT" in
11287 [\\/]* | ?:[\\/]*)
11288 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
11291 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11292 for ac_dir in $PATH; do
11293 IFS="$ac_save_IFS"
11294 test -z "$ac_dir" && ac_dir=.
11295 for ac_exec_ext in '' $ac_executable_extensions; do
11296 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11297 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
11298 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11299 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
11300 break 2
11303 done
11304 done
11305 IFS="$ac_save_IFS"
11306 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
11308 esac
11310 MSGFMT="$ac_cv_path_MSGFMT"
11311 if test "$MSGFMT" != ":"; then
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
11313 $as_echo "$MSGFMT" >&6; }
11314 else
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316 $as_echo "no" >&6; }
11319 # Extract the first word of "gmsgfmt", so it can be a program name with args.
11320 set dummy gmsgfmt; ac_word=$2
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11322 $as_echo_n "checking for $ac_word... " >&6; }
11323 if ${ac_cv_path_GMSGFMT+:} false; then :
11324 $as_echo_n "(cached) " >&6
11325 else
11326 case $GMSGFMT in
11327 [\\/]* | ?:[\\/]*)
11328 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
11331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11332 for as_dir in $PATH
11334 IFS=$as_save_IFS
11335 test -z "$as_dir" && as_dir=.
11336 for ac_exec_ext in '' $ac_executable_extensions; do
11337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11338 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
11339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11340 break 2
11342 done
11343 done
11344 IFS=$as_save_IFS
11346 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
11348 esac
11350 GMSGFMT=$ac_cv_path_GMSGFMT
11351 if test -n "$GMSGFMT"; then
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
11353 $as_echo "$GMSGFMT" >&6; }
11354 else
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356 $as_echo "no" >&6; }
11362 # Prepare PATH_SEPARATOR.
11363 # The user is always right.
11364 if test "${PATH_SEPARATOR+set}" != set; then
11365 echo "#! /bin/sh" >conf$$.sh
11366 echo "exit 0" >>conf$$.sh
11367 chmod +x conf$$.sh
11368 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11369 PATH_SEPARATOR=';'
11370 else
11371 PATH_SEPARATOR=:
11373 rm -f conf$$.sh
11376 # Find out how to test for executable files. Don't use a zero-byte file,
11377 # as systems may use methods other than mode bits to determine executability.
11378 cat >conf$$.file <<_ASEOF
11379 #! /bin/sh
11380 exit 0
11381 _ASEOF
11382 chmod +x conf$$.file
11383 if test -x conf$$.file >/dev/null 2>&1; then
11384 ac_executable_p="test -x"
11385 else
11386 ac_executable_p="test -f"
11388 rm -f conf$$.file
11390 # Extract the first word of "xgettext", so it can be a program name with args.
11391 set dummy xgettext; ac_word=$2
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11393 $as_echo_n "checking for $ac_word... " >&6; }
11394 if ${ac_cv_path_XGETTEXT+:} false; then :
11395 $as_echo_n "(cached) " >&6
11396 else
11397 case "$XGETTEXT" in
11398 [\\/]* | ?:[\\/]*)
11399 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
11402 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11403 for ac_dir in $PATH; do
11404 IFS="$ac_save_IFS"
11405 test -z "$ac_dir" && ac_dir=.
11406 for ac_exec_ext in '' $ac_executable_extensions; do
11407 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11408 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11409 (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
11410 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
11411 break 2
11414 done
11415 done
11416 IFS="$ac_save_IFS"
11417 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
11419 esac
11421 XGETTEXT="$ac_cv_path_XGETTEXT"
11422 if test "$XGETTEXT" != ":"; then
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
11424 $as_echo "$XGETTEXT" >&6; }
11425 else
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427 $as_echo "no" >&6; }
11430 rm -f messages.po
11433 # Prepare PATH_SEPARATOR.
11434 # The user is always right.
11435 if test "${PATH_SEPARATOR+set}" != set; then
11436 echo "#! /bin/sh" >conf$$.sh
11437 echo "exit 0" >>conf$$.sh
11438 chmod +x conf$$.sh
11439 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11440 PATH_SEPARATOR=';'
11441 else
11442 PATH_SEPARATOR=:
11444 rm -f conf$$.sh
11447 # Find out how to test for executable files. Don't use a zero-byte file,
11448 # as systems may use methods other than mode bits to determine executability.
11449 cat >conf$$.file <<_ASEOF
11450 #! /bin/sh
11451 exit 0
11452 _ASEOF
11453 chmod +x conf$$.file
11454 if test -x conf$$.file >/dev/null 2>&1; then
11455 ac_executable_p="test -x"
11456 else
11457 ac_executable_p="test -f"
11459 rm -f conf$$.file
11461 # Extract the first word of "msgmerge", so it can be a program name with args.
11462 set dummy msgmerge; ac_word=$2
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11464 $as_echo_n "checking for $ac_word... " >&6; }
11465 if ${ac_cv_path_MSGMERGE+:} false; then :
11466 $as_echo_n "(cached) " >&6
11467 else
11468 case "$MSGMERGE" in
11469 [\\/]* | ?:[\\/]*)
11470 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
11473 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11474 for ac_dir in $PATH; do
11475 IFS="$ac_save_IFS"
11476 test -z "$ac_dir" && ac_dir=.
11477 for ac_exec_ext in '' $ac_executable_extensions; do
11478 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11479 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
11480 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
11481 break 2
11484 done
11485 done
11486 IFS="$ac_save_IFS"
11487 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
11489 esac
11491 MSGMERGE="$ac_cv_path_MSGMERGE"
11492 if test "$MSGMERGE" != ":"; then
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
11494 $as_echo "$MSGMERGE" >&6; }
11495 else
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497 $as_echo "no" >&6; }
11501 if test "$GMSGFMT" != ":"; then
11502 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
11503 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11505 else
11506 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
11508 $as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
11509 GMSGFMT=":"
11513 if test "$XGETTEXT" != ":"; then
11514 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11515 (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
11517 else
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
11519 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
11520 XGETTEXT=":"
11522 rm -f messages.po
11525 ac_config_commands="$ac_config_commands default-1"
11534 use_additional=yes
11536 acl_save_prefix="$prefix"
11537 prefix="$acl_final_prefix"
11538 acl_save_exec_prefix="$exec_prefix"
11539 exec_prefix="$acl_final_exec_prefix"
11541 eval additional_includedir=\"$includedir\"
11542 eval additional_libdir=\"$libdir\"
11544 exec_prefix="$acl_save_exec_prefix"
11545 prefix="$acl_save_prefix"
11548 # Check whether --with-libiconv-prefix was given.
11549 if test "${with_libiconv_prefix+set}" = set; then :
11550 withval=$with_libiconv_prefix;
11551 if test "X$withval" = "Xno"; then
11552 use_additional=no
11553 else
11554 if test "X$withval" = "X"; then
11556 acl_save_prefix="$prefix"
11557 prefix="$acl_final_prefix"
11558 acl_save_exec_prefix="$exec_prefix"
11559 exec_prefix="$acl_final_exec_prefix"
11561 eval additional_includedir=\"$includedir\"
11562 eval additional_libdir=\"$libdir\"
11564 exec_prefix="$acl_save_exec_prefix"
11565 prefix="$acl_save_prefix"
11567 else
11568 additional_includedir="$withval/include"
11569 additional_libdir="$withval/lib"
11576 # Check whether --with-libiconv-type was given.
11577 if test "${with_libiconv_type+set}" = set; then :
11578 withval=$with_libiconv_type; with_libiconv_type=$withval
11579 else
11580 with_libiconv_type=auto
11583 lib_type=`eval echo \$with_libiconv_type`
11585 LIBICONV=
11586 LTLIBICONV=
11587 INCICONV=
11588 rpathdirs=
11589 ltrpathdirs=
11590 names_already_handled=
11591 names_next_round='iconv '
11592 while test -n "$names_next_round"; do
11593 names_this_round="$names_next_round"
11594 names_next_round=
11595 for name in $names_this_round; do
11596 already_handled=
11597 for n in $names_already_handled; do
11598 if test "$n" = "$name"; then
11599 already_handled=yes
11600 break
11602 done
11603 if test -z "$already_handled"; then
11604 names_already_handled="$names_already_handled $name"
11605 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11606 eval value=\"\$HAVE_LIB$uppername\"
11607 if test -n "$value"; then
11608 if test "$value" = yes; then
11609 eval value=\"\$LIB$uppername\"
11610 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11611 eval value=\"\$LTLIB$uppername\"
11612 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11613 else
11616 else
11617 found_dir=
11618 found_la=
11619 found_so=
11620 found_a=
11621 if test $use_additional = yes; then
11622 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11623 found_dir="$additional_libdir"
11624 found_so="$additional_libdir/lib$name.$shlibext"
11625 if test -f "$additional_libdir/lib$name.la"; then
11626 found_la="$additional_libdir/lib$name.la"
11628 elif test x$lib_type != xshared; then
11629 if test -f "$additional_libdir/lib$name.$libext"; then
11630 found_dir="$additional_libdir"
11631 found_a="$additional_libdir/lib$name.$libext"
11632 if test -f "$additional_libdir/lib$name.la"; then
11633 found_la="$additional_libdir/lib$name.la"
11638 if test "X$found_dir" = "X"; then
11639 for x in $LDFLAGS $LTLIBICONV; do
11641 acl_save_prefix="$prefix"
11642 prefix="$acl_final_prefix"
11643 acl_save_exec_prefix="$exec_prefix"
11644 exec_prefix="$acl_final_exec_prefix"
11645 eval x=\"$x\"
11646 exec_prefix="$acl_save_exec_prefix"
11647 prefix="$acl_save_prefix"
11649 case "$x" in
11650 -L*)
11651 dir=`echo "X$x" | sed -e 's/^X-L//'`
11652 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11653 found_dir="$dir"
11654 found_so="$dir/lib$name.$shlibext"
11655 if test -f "$dir/lib$name.la"; then
11656 found_la="$dir/lib$name.la"
11658 elif test x$lib_type != xshared; then
11659 if test -f "$dir/lib$name.$libext"; then
11660 found_dir="$dir"
11661 found_a="$dir/lib$name.$libext"
11662 if test -f "$dir/lib$name.la"; then
11663 found_la="$dir/lib$name.la"
11668 esac
11669 if test "X$found_dir" != "X"; then
11670 break
11672 done
11674 if test "X$found_dir" != "X"; then
11675 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11676 if test "X$found_so" != "X"; then
11677 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11678 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11679 else
11680 haveit=
11681 for x in $ltrpathdirs; do
11682 if test "X$x" = "X$found_dir"; then
11683 haveit=yes
11684 break
11686 done
11687 if test -z "$haveit"; then
11688 ltrpathdirs="$ltrpathdirs $found_dir"
11690 if test "$hardcode_direct" = yes; then
11691 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11692 else
11693 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11694 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11695 haveit=
11696 for x in $rpathdirs; do
11697 if test "X$x" = "X$found_dir"; then
11698 haveit=yes
11699 break
11701 done
11702 if test -z "$haveit"; then
11703 rpathdirs="$rpathdirs $found_dir"
11705 else
11706 haveit=
11707 for x in $LDFLAGS $LIBICONV; do
11709 acl_save_prefix="$prefix"
11710 prefix="$acl_final_prefix"
11711 acl_save_exec_prefix="$exec_prefix"
11712 exec_prefix="$acl_final_exec_prefix"
11713 eval x=\"$x\"
11714 exec_prefix="$acl_save_exec_prefix"
11715 prefix="$acl_save_prefix"
11717 if test "X$x" = "X-L$found_dir"; then
11718 haveit=yes
11719 break
11721 done
11722 if test -z "$haveit"; then
11723 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11725 if test "$hardcode_minus_L" != no; then
11726 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11727 else
11728 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11733 else
11734 if test "X$found_a" != "X"; then
11735 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11736 else
11737 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11740 additional_includedir=
11741 case "$found_dir" in
11742 */lib | */lib/)
11743 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11744 additional_includedir="$basedir/include"
11746 esac
11747 if test "X$additional_includedir" != "X"; then
11748 if test "X$additional_includedir" != "X/usr/include"; then
11749 haveit=
11750 if test "X$additional_includedir" = "X/usr/local/include"; then
11751 if test -n "$GCC"; then
11752 case $host_os in
11753 linux*) haveit=yes;;
11754 esac
11757 if test -z "$haveit"; then
11758 for x in $CPPFLAGS $INCICONV; do
11760 acl_save_prefix="$prefix"
11761 prefix="$acl_final_prefix"
11762 acl_save_exec_prefix="$exec_prefix"
11763 exec_prefix="$acl_final_exec_prefix"
11764 eval x=\"$x\"
11765 exec_prefix="$acl_save_exec_prefix"
11766 prefix="$acl_save_prefix"
11768 if test "X$x" = "X-I$additional_includedir"; then
11769 haveit=yes
11770 break
11772 done
11773 if test -z "$haveit"; then
11774 if test -d "$additional_includedir"; then
11775 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11781 if test -n "$found_la"; then
11782 save_libdir="$libdir"
11783 case "$found_la" in
11784 */* | *\\*) . "$found_la" ;;
11785 *) . "./$found_la" ;;
11786 esac
11787 libdir="$save_libdir"
11788 for dep in $dependency_libs; do
11789 case "$dep" in
11790 -L*)
11791 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11792 if test "X$additional_libdir" != "X/usr/lib"; then
11793 haveit=
11794 if test "X$additional_libdir" = "X/usr/local/lib"; then
11795 if test -n "$GCC"; then
11796 case $host_os in
11797 linux*) haveit=yes;;
11798 esac
11801 if test -z "$haveit"; then
11802 haveit=
11803 for x in $LDFLAGS $LIBICONV; do
11805 acl_save_prefix="$prefix"
11806 prefix="$acl_final_prefix"
11807 acl_save_exec_prefix="$exec_prefix"
11808 exec_prefix="$acl_final_exec_prefix"
11809 eval x=\"$x\"
11810 exec_prefix="$acl_save_exec_prefix"
11811 prefix="$acl_save_prefix"
11813 if test "X$x" = "X-L$additional_libdir"; then
11814 haveit=yes
11815 break
11817 done
11818 if test -z "$haveit"; then
11819 if test -d "$additional_libdir"; then
11820 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11823 haveit=
11824 for x in $LDFLAGS $LTLIBICONV; do
11826 acl_save_prefix="$prefix"
11827 prefix="$acl_final_prefix"
11828 acl_save_exec_prefix="$exec_prefix"
11829 exec_prefix="$acl_final_exec_prefix"
11830 eval x=\"$x\"
11831 exec_prefix="$acl_save_exec_prefix"
11832 prefix="$acl_save_prefix"
11834 if test "X$x" = "X-L$additional_libdir"; then
11835 haveit=yes
11836 break
11838 done
11839 if test -z "$haveit"; then
11840 if test -d "$additional_libdir"; then
11841 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11847 -R*)
11848 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11849 if test "$enable_rpath" != no; then
11850 haveit=
11851 for x in $rpathdirs; do
11852 if test "X$x" = "X$dir"; then
11853 haveit=yes
11854 break
11856 done
11857 if test -z "$haveit"; then
11858 rpathdirs="$rpathdirs $dir"
11860 haveit=
11861 for x in $ltrpathdirs; do
11862 if test "X$x" = "X$dir"; then
11863 haveit=yes
11864 break
11866 done
11867 if test -z "$haveit"; then
11868 ltrpathdirs="$ltrpathdirs $dir"
11872 -l*)
11873 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11875 *.la)
11876 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11879 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11880 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11882 esac
11883 done
11885 else
11886 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
11887 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11888 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11889 else
11890 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
11891 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
11896 done
11897 done
11898 if test "X$rpathdirs" != "X"; then
11899 if test -n "$hardcode_libdir_separator"; then
11900 alldirs=
11901 for found_dir in $rpathdirs; do
11902 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11903 done
11904 acl_save_libdir="$libdir"
11905 libdir="$alldirs"
11906 eval flag=\"$hardcode_libdir_flag_spec\"
11907 libdir="$acl_save_libdir"
11908 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11909 else
11910 for found_dir in $rpathdirs; do
11911 acl_save_libdir="$libdir"
11912 libdir="$found_dir"
11913 eval flag=\"$hardcode_libdir_flag_spec\"
11914 libdir="$acl_save_libdir"
11915 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11916 done
11919 if test "X$ltrpathdirs" != "X"; then
11920 for found_dir in $ltrpathdirs; do
11921 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11922 done
11929 if test -f ../gettext/uninstalled-config.sh; then
11930 relative_builddir='$(top_builddir)/../gettext'
11931 . ../gettext/uninstalled-config.sh
11932 else
11933 # The sister gettext directory doesn't exist and won't collect information on
11934 # using gettext for us. Call a bundled AM_GNU_GETTEXT.
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11959 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
11960 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
11961 $as_echo_n "(cached) " >&6
11962 else
11963 gt_save_LIBS="$LIBS"
11964 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966 /* end confdefs.h. */
11967 #include <CoreFoundation/CFPreferences.h>
11969 main ()
11971 CFPreferencesCopyAppValue(NULL, NULL)
11973 return 0;
11975 _ACEOF
11976 if ac_fn_c_try_link "$LINENO"; then :
11977 gt_cv_func_CFPreferencesCopyAppValue=yes
11978 else
11979 gt_cv_func_CFPreferencesCopyAppValue=no
11981 rm -f core conftest.err conftest.$ac_objext \
11982 conftest$ac_exeext conftest.$ac_ext
11983 LIBS="$gt_save_LIBS"
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11986 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11987 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11989 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
11992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
11993 $as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
11994 if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
11995 $as_echo_n "(cached) " >&6
11996 else
11997 gt_save_LIBS="$LIBS"
11998 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12000 /* end confdefs.h. */
12001 #include <CoreFoundation/CFLocale.h>
12003 main ()
12005 CFLocaleCopyPreferredLanguages();
12007 return 0;
12009 _ACEOF
12010 if ac_fn_c_try_link "$LINENO"; then :
12011 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
12012 else
12013 gt_cv_func_CFLocaleCopyPreferredLanguages=no
12015 rm -f core conftest.err conftest.$ac_objext \
12016 conftest$ac_exeext conftest.$ac_ext
12017 LIBS="$gt_save_LIBS"
12019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
12020 $as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
12021 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12023 $as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
12026 INTL_MACOSX_LIBS=
12027 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
12028 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12029 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
12037 LIBINTL=
12038 LTLIBINTL=
12039 POSUB=
12041 case " $gt_needs " in
12042 *" need-formatstring-macros "*) gt_api_version=3 ;;
12043 *" need-ngettext "*) gt_api_version=2 ;;
12044 *) gt_api_version=1 ;;
12045 esac
12046 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
12047 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
12049 if test "$USE_NLS" = "yes"; then
12050 gt_use_preinstalled_gnugettext=no
12053 if test $gt_api_version -ge 3; then
12054 gt_revision_test_code='
12055 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12056 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
12057 #endif
12058 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
12060 else
12061 gt_revision_test_code=
12063 if test $gt_api_version -ge 2; then
12064 gt_expression_test_code=' + * ngettext ("", "", 0)'
12065 else
12066 gt_expression_test_code=
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
12070 $as_echo_n "checking for GNU gettext in libc... " >&6; }
12071 if eval \${$gt_func_gnugettext_libc+:} false; then :
12072 $as_echo_n "(cached) " >&6
12073 else
12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12075 /* end confdefs.h. */
12077 #include <libintl.h>
12078 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12079 extern int _nl_msg_cat_cntr;
12080 extern int *_nl_domain_bindings;
12081 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
12082 #else
12083 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12084 #endif
12085 $gt_revision_test_code
12088 main ()
12091 bindtextdomain ("", "");
12092 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12095 return 0;
12097 _ACEOF
12098 if ac_fn_c_try_link "$LINENO"; then :
12099 eval "$gt_func_gnugettext_libc=yes"
12100 else
12101 eval "$gt_func_gnugettext_libc=no"
12103 rm -f core conftest.err conftest.$ac_objext \
12104 conftest$ac_exeext conftest.$ac_ext
12106 eval ac_res=\$$gt_func_gnugettext_libc
12107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12108 $as_echo "$ac_res" >&6; }
12110 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
12116 am_save_CPPFLAGS="$CPPFLAGS"
12118 for element in $INCICONV; do
12119 haveit=
12120 for x in $CPPFLAGS; do
12122 acl_save_prefix="$prefix"
12123 prefix="$acl_final_prefix"
12124 acl_save_exec_prefix="$exec_prefix"
12125 exec_prefix="$acl_final_exec_prefix"
12126 eval x=\"$x\"
12127 exec_prefix="$acl_save_exec_prefix"
12128 prefix="$acl_save_prefix"
12130 if test "X$x" = "X$element"; then
12131 haveit=yes
12132 break
12134 done
12135 if test -z "$haveit"; then
12136 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12138 done
12141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12142 $as_echo_n "checking for iconv... " >&6; }
12143 if ${am_cv_func_iconv+:} false; then :
12144 $as_echo_n "(cached) " >&6
12145 else
12147 am_cv_func_iconv="no, consider installing GNU libiconv"
12148 am_cv_lib_iconv=no
12149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150 /* end confdefs.h. */
12152 #include <stdlib.h>
12153 #include <iconv.h>
12156 main ()
12158 iconv_t cd = iconv_open("","");
12159 iconv(cd,NULL,NULL,NULL,NULL);
12160 iconv_close(cd);
12162 return 0;
12164 _ACEOF
12165 if ac_fn_c_try_link "$LINENO"; then :
12166 am_cv_func_iconv=yes
12168 rm -f core conftest.err conftest.$ac_objext \
12169 conftest$ac_exeext conftest.$ac_ext
12170 if test "$am_cv_func_iconv" != yes; then
12171 am_save_LIBS="$LIBS"
12172 LIBS="$LIBS $LIBICONV"
12173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12174 /* end confdefs.h. */
12176 #include <stdlib.h>
12177 #include <iconv.h>
12180 main ()
12182 iconv_t cd = iconv_open("","");
12183 iconv(cd,NULL,NULL,NULL,NULL);
12184 iconv_close(cd);
12186 return 0;
12188 _ACEOF
12189 if ac_fn_c_try_link "$LINENO"; then :
12190 am_cv_lib_iconv=yes
12191 am_cv_func_iconv=yes
12193 rm -f core conftest.err conftest.$ac_objext \
12194 conftest$ac_exeext conftest.$ac_ext
12195 LIBS="$am_save_LIBS"
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12200 $as_echo "$am_cv_func_iconv" >&6; }
12201 if test "$am_cv_func_iconv" = yes; then
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12203 $as_echo_n "checking for working iconv... " >&6; }
12204 if ${am_cv_func_iconv_works+:} false; then :
12205 $as_echo_n "(cached) " >&6
12206 else
12208 am_save_LIBS="$LIBS"
12209 if test $am_cv_lib_iconv = yes; then
12210 LIBS="$LIBS $LIBICONV"
12212 am_cv_func_iconv_works=no
12213 for ac_iconv_const in '' 'const'; do
12214 if test "$cross_compiling" = yes; then :
12215 case "$host_os" in
12216 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12217 *) am_cv_func_iconv_works="guessing yes" ;;
12218 esac
12219 else
12220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12221 /* end confdefs.h. */
12223 #include <iconv.h>
12224 #include <string.h>
12226 #ifndef ICONV_CONST
12227 # define ICONV_CONST $ac_iconv_const
12228 #endif
12231 main ()
12233 int result = 0;
12234 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
12235 successful returns. This is even documented in
12236 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
12238 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12239 if (cd_utf8_to_88591 != (iconv_t)(-1))
12241 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12242 char buf[10];
12243 ICONV_CONST char *inptr = input;
12244 size_t inbytesleft = strlen (input);
12245 char *outptr = buf;
12246 size_t outbytesleft = sizeof (buf);
12247 size_t res = iconv (cd_utf8_to_88591,
12248 &inptr, &inbytesleft,
12249 &outptr, &outbytesleft);
12250 if (res == 0)
12251 result |= 1;
12252 iconv_close (cd_utf8_to_88591);
12255 /* Test against Solaris 10 bug: Failures are not distinguishable from
12256 successful returns. */
12258 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12259 if (cd_ascii_to_88591 != (iconv_t)(-1))
12261 static ICONV_CONST char input[] = "\263";
12262 char buf[10];
12263 ICONV_CONST char *inptr = input;
12264 size_t inbytesleft = strlen (input);
12265 char *outptr = buf;
12266 size_t outbytesleft = sizeof (buf);
12267 size_t res = iconv (cd_ascii_to_88591,
12268 &inptr, &inbytesleft,
12269 &outptr, &outbytesleft);
12270 if (res == 0)
12271 result |= 2;
12272 iconv_close (cd_ascii_to_88591);
12275 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
12277 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12278 if (cd_88591_to_utf8 != (iconv_t)(-1))
12280 static ICONV_CONST char input[] = "\304";
12281 static char buf[2] = { (char)0xDE, (char)0xAD };
12282 ICONV_CONST char *inptr = input;
12283 size_t inbytesleft = 1;
12284 char *outptr = buf;
12285 size_t outbytesleft = 1;
12286 size_t res = iconv (cd_88591_to_utf8,
12287 &inptr, &inbytesleft,
12288 &outptr, &outbytesleft);
12289 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12290 result |= 4;
12291 iconv_close (cd_88591_to_utf8);
12294 #if 0 /* This bug could be worked around by the caller. */
12295 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
12297 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12298 if (cd_88591_to_utf8 != (iconv_t)(-1))
12300 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12301 char buf[50];
12302 ICONV_CONST char *inptr = input;
12303 size_t inbytesleft = strlen (input);
12304 char *outptr = buf;
12305 size_t outbytesleft = sizeof (buf);
12306 size_t res = iconv (cd_88591_to_utf8,
12307 &inptr, &inbytesleft,
12308 &outptr, &outbytesleft);
12309 if ((int)res > 0)
12310 result |= 8;
12311 iconv_close (cd_88591_to_utf8);
12314 #endif
12315 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12316 provided. */
12318 /* Try standardized names. */
12319 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12320 /* Try IRIX, OSF/1 names. */
12321 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12322 /* Try AIX names. */
12323 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12324 /* Try HP-UX names. */
12325 iconv_t cd4 = iconv_open ("utf8", "eucJP");
12326 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12327 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12328 result |= 16;
12329 if (cd1 != (iconv_t)(-1))
12330 iconv_close (cd1);
12331 if (cd2 != (iconv_t)(-1))
12332 iconv_close (cd2);
12333 if (cd3 != (iconv_t)(-1))
12334 iconv_close (cd3);
12335 if (cd4 != (iconv_t)(-1))
12336 iconv_close (cd4);
12338 return result;
12341 return 0;
12343 _ACEOF
12344 if ac_fn_c_try_run "$LINENO"; then :
12345 am_cv_func_iconv_works=yes
12347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12348 conftest.$ac_objext conftest.beam conftest.$ac_ext
12351 test "$am_cv_func_iconv_works" = no || break
12352 done
12353 LIBS="$am_save_LIBS"
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12357 $as_echo "$am_cv_func_iconv_works" >&6; }
12358 case "$am_cv_func_iconv_works" in
12359 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12360 *) am_func_iconv=yes ;;
12361 esac
12362 else
12363 am_func_iconv=no am_cv_lib_iconv=no
12365 if test "$am_func_iconv" = yes; then
12367 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
12370 if test "$am_cv_lib_iconv" = yes; then
12371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12372 $as_echo_n "checking how to link with libiconv... " >&6; }
12373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12374 $as_echo "$LIBICONV" >&6; }
12375 else
12376 CPPFLAGS="$am_save_CPPFLAGS"
12377 LIBICONV=
12378 LTLIBICONV=
12386 use_additional=yes
12388 acl_save_prefix="$prefix"
12389 prefix="$acl_final_prefix"
12390 acl_save_exec_prefix="$exec_prefix"
12391 exec_prefix="$acl_final_exec_prefix"
12393 eval additional_includedir=\"$includedir\"
12394 eval additional_libdir=\"$libdir\"
12396 exec_prefix="$acl_save_exec_prefix"
12397 prefix="$acl_save_prefix"
12400 # Check whether --with-libintl-prefix was given.
12401 if test "${with_libintl_prefix+set}" = set; then :
12402 withval=$with_libintl_prefix;
12403 if test "X$withval" = "Xno"; then
12404 use_additional=no
12405 else
12406 if test "X$withval" = "X"; then
12408 acl_save_prefix="$prefix"
12409 prefix="$acl_final_prefix"
12410 acl_save_exec_prefix="$exec_prefix"
12411 exec_prefix="$acl_final_exec_prefix"
12413 eval additional_includedir=\"$includedir\"
12414 eval additional_libdir=\"$libdir\"
12416 exec_prefix="$acl_save_exec_prefix"
12417 prefix="$acl_save_prefix"
12419 else
12420 additional_includedir="$withval/include"
12421 additional_libdir="$withval/lib"
12428 # Check whether --with-libintl-type was given.
12429 if test "${with_libintl_type+set}" = set; then :
12430 withval=$with_libintl_type; with_libintl_type=$withval
12431 else
12432 with_libintl_type=auto
12435 lib_type=`eval echo \$with_libintl_type`
12437 LIBINTL=
12438 LTLIBINTL=
12439 INCINTL=
12440 rpathdirs=
12441 ltrpathdirs=
12442 names_already_handled=
12443 names_next_round='intl '
12444 while test -n "$names_next_round"; do
12445 names_this_round="$names_next_round"
12446 names_next_round=
12447 for name in $names_this_round; do
12448 already_handled=
12449 for n in $names_already_handled; do
12450 if test "$n" = "$name"; then
12451 already_handled=yes
12452 break
12454 done
12455 if test -z "$already_handled"; then
12456 names_already_handled="$names_already_handled $name"
12457 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12458 eval value=\"\$HAVE_LIB$uppername\"
12459 if test -n "$value"; then
12460 if test "$value" = yes; then
12461 eval value=\"\$LIB$uppername\"
12462 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12463 eval value=\"\$LTLIB$uppername\"
12464 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12465 else
12468 else
12469 found_dir=
12470 found_la=
12471 found_so=
12472 found_a=
12473 if test $use_additional = yes; then
12474 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12475 found_dir="$additional_libdir"
12476 found_so="$additional_libdir/lib$name.$shlibext"
12477 if test -f "$additional_libdir/lib$name.la"; then
12478 found_la="$additional_libdir/lib$name.la"
12480 elif test x$lib_type != xshared; then
12481 if test -f "$additional_libdir/lib$name.$libext"; then
12482 found_dir="$additional_libdir"
12483 found_a="$additional_libdir/lib$name.$libext"
12484 if test -f "$additional_libdir/lib$name.la"; then
12485 found_la="$additional_libdir/lib$name.la"
12490 if test "X$found_dir" = "X"; then
12491 for x in $LDFLAGS $LTLIBINTL; do
12493 acl_save_prefix="$prefix"
12494 prefix="$acl_final_prefix"
12495 acl_save_exec_prefix="$exec_prefix"
12496 exec_prefix="$acl_final_exec_prefix"
12497 eval x=\"$x\"
12498 exec_prefix="$acl_save_exec_prefix"
12499 prefix="$acl_save_prefix"
12501 case "$x" in
12502 -L*)
12503 dir=`echo "X$x" | sed -e 's/^X-L//'`
12504 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12505 found_dir="$dir"
12506 found_so="$dir/lib$name.$shlibext"
12507 if test -f "$dir/lib$name.la"; then
12508 found_la="$dir/lib$name.la"
12510 elif test x$lib_type != xshared; then
12511 if test -f "$dir/lib$name.$libext"; then
12512 found_dir="$dir"
12513 found_a="$dir/lib$name.$libext"
12514 if test -f "$dir/lib$name.la"; then
12515 found_la="$dir/lib$name.la"
12520 esac
12521 if test "X$found_dir" != "X"; then
12522 break
12524 done
12526 if test "X$found_dir" != "X"; then
12527 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12528 if test "X$found_so" != "X"; then
12529 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12530 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12531 else
12532 haveit=
12533 for x in $ltrpathdirs; do
12534 if test "X$x" = "X$found_dir"; then
12535 haveit=yes
12536 break
12538 done
12539 if test -z "$haveit"; then
12540 ltrpathdirs="$ltrpathdirs $found_dir"
12542 if test "$hardcode_direct" = yes; then
12543 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12544 else
12545 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12546 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12547 haveit=
12548 for x in $rpathdirs; do
12549 if test "X$x" = "X$found_dir"; then
12550 haveit=yes
12551 break
12553 done
12554 if test -z "$haveit"; then
12555 rpathdirs="$rpathdirs $found_dir"
12557 else
12558 haveit=
12559 for x in $LDFLAGS $LIBINTL; do
12561 acl_save_prefix="$prefix"
12562 prefix="$acl_final_prefix"
12563 acl_save_exec_prefix="$exec_prefix"
12564 exec_prefix="$acl_final_exec_prefix"
12565 eval x=\"$x\"
12566 exec_prefix="$acl_save_exec_prefix"
12567 prefix="$acl_save_prefix"
12569 if test "X$x" = "X-L$found_dir"; then
12570 haveit=yes
12571 break
12573 done
12574 if test -z "$haveit"; then
12575 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12577 if test "$hardcode_minus_L" != no; then
12578 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12579 else
12580 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12585 else
12586 if test "X$found_a" != "X"; then
12587 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12588 else
12589 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12592 additional_includedir=
12593 case "$found_dir" in
12594 */lib | */lib/)
12595 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12596 additional_includedir="$basedir/include"
12598 esac
12599 if test "X$additional_includedir" != "X"; then
12600 if test "X$additional_includedir" != "X/usr/include"; then
12601 haveit=
12602 if test "X$additional_includedir" = "X/usr/local/include"; then
12603 if test -n "$GCC"; then
12604 case $host_os in
12605 linux*) haveit=yes;;
12606 esac
12609 if test -z "$haveit"; then
12610 for x in $CPPFLAGS $INCINTL; do
12612 acl_save_prefix="$prefix"
12613 prefix="$acl_final_prefix"
12614 acl_save_exec_prefix="$exec_prefix"
12615 exec_prefix="$acl_final_exec_prefix"
12616 eval x=\"$x\"
12617 exec_prefix="$acl_save_exec_prefix"
12618 prefix="$acl_save_prefix"
12620 if test "X$x" = "X-I$additional_includedir"; then
12621 haveit=yes
12622 break
12624 done
12625 if test -z "$haveit"; then
12626 if test -d "$additional_includedir"; then
12627 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
12633 if test -n "$found_la"; then
12634 save_libdir="$libdir"
12635 case "$found_la" in
12636 */* | *\\*) . "$found_la" ;;
12637 *) . "./$found_la" ;;
12638 esac
12639 libdir="$save_libdir"
12640 for dep in $dependency_libs; do
12641 case "$dep" in
12642 -L*)
12643 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12644 if test "X$additional_libdir" != "X/usr/lib"; then
12645 haveit=
12646 if test "X$additional_libdir" = "X/usr/local/lib"; then
12647 if test -n "$GCC"; then
12648 case $host_os in
12649 linux*) haveit=yes;;
12650 esac
12653 if test -z "$haveit"; then
12654 haveit=
12655 for x in $LDFLAGS $LIBINTL; do
12657 acl_save_prefix="$prefix"
12658 prefix="$acl_final_prefix"
12659 acl_save_exec_prefix="$exec_prefix"
12660 exec_prefix="$acl_final_exec_prefix"
12661 eval x=\"$x\"
12662 exec_prefix="$acl_save_exec_prefix"
12663 prefix="$acl_save_prefix"
12665 if test "X$x" = "X-L$additional_libdir"; then
12666 haveit=yes
12667 break
12669 done
12670 if test -z "$haveit"; then
12671 if test -d "$additional_libdir"; then
12672 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
12675 haveit=
12676 for x in $LDFLAGS $LTLIBINTL; do
12678 acl_save_prefix="$prefix"
12679 prefix="$acl_final_prefix"
12680 acl_save_exec_prefix="$exec_prefix"
12681 exec_prefix="$acl_final_exec_prefix"
12682 eval x=\"$x\"
12683 exec_prefix="$acl_save_exec_prefix"
12684 prefix="$acl_save_prefix"
12686 if test "X$x" = "X-L$additional_libdir"; then
12687 haveit=yes
12688 break
12690 done
12691 if test -z "$haveit"; then
12692 if test -d "$additional_libdir"; then
12693 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
12699 -R*)
12700 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12701 if test "$enable_rpath" != no; then
12702 haveit=
12703 for x in $rpathdirs; do
12704 if test "X$x" = "X$dir"; then
12705 haveit=yes
12706 break
12708 done
12709 if test -z "$haveit"; then
12710 rpathdirs="$rpathdirs $dir"
12712 haveit=
12713 for x in $ltrpathdirs; do
12714 if test "X$x" = "X$dir"; then
12715 haveit=yes
12716 break
12718 done
12719 if test -z "$haveit"; then
12720 ltrpathdirs="$ltrpathdirs $dir"
12724 -l*)
12725 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12727 *.la)
12728 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12731 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
12732 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
12734 esac
12735 done
12737 else
12738 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
12739 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12740 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
12741 else
12742 LIBINTL="${LIBINTL}${LIBINTL:+ }-l:lib$name.$libext"
12743 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l:lib$name.$libext"
12748 done
12749 done
12750 if test "X$rpathdirs" != "X"; then
12751 if test -n "$hardcode_libdir_separator"; then
12752 alldirs=
12753 for found_dir in $rpathdirs; do
12754 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
12755 done
12756 acl_save_libdir="$libdir"
12757 libdir="$alldirs"
12758 eval flag=\"$hardcode_libdir_flag_spec\"
12759 libdir="$acl_save_libdir"
12760 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12761 else
12762 for found_dir in $rpathdirs; do
12763 acl_save_libdir="$libdir"
12764 libdir="$found_dir"
12765 eval flag=\"$hardcode_libdir_flag_spec\"
12766 libdir="$acl_save_libdir"
12767 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12768 done
12771 if test "X$ltrpathdirs" != "X"; then
12772 for found_dir in $ltrpathdirs; do
12773 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12774 done
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12778 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
12779 if eval \${$gt_func_gnugettext_libintl+:} false; then :
12780 $as_echo_n "(cached) " >&6
12781 else
12782 gt_save_CPPFLAGS="$CPPFLAGS"
12783 CPPFLAGS="$CPPFLAGS $INCINTL"
12784 gt_save_LIBS="$LIBS"
12785 LIBS="$LIBS $LIBINTL"
12786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12787 /* end confdefs.h. */
12789 #include <libintl.h>
12790 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12791 extern int _nl_msg_cat_cntr;
12792 extern
12793 #ifdef __cplusplus
12795 #endif
12796 const char *_nl_expand_alias (const char *);
12797 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12798 #else
12799 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12800 #endif
12801 $gt_revision_test_code
12804 main ()
12807 bindtextdomain ("", "");
12808 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12811 return 0;
12813 _ACEOF
12814 if ac_fn_c_try_link "$LINENO"; then :
12815 eval "$gt_func_gnugettext_libintl=yes"
12816 else
12817 eval "$gt_func_gnugettext_libintl=no"
12819 rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext conftest.$ac_ext
12821 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
12822 LIBS="$LIBS $LIBICONV"
12823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12824 /* end confdefs.h. */
12826 #include <libintl.h>
12827 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12828 extern int _nl_msg_cat_cntr;
12829 extern
12830 #ifdef __cplusplus
12832 #endif
12833 const char *_nl_expand_alias (const char *);
12834 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12835 #else
12836 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12837 #endif
12838 $gt_revision_test_code
12841 main ()
12844 bindtextdomain ("", "");
12845 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12848 return 0;
12850 _ACEOF
12851 if ac_fn_c_try_link "$LINENO"; then :
12852 LIBINTL="$LIBINTL $LIBICONV"
12853 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12854 eval "$gt_func_gnugettext_libintl=yes"
12857 rm -f core conftest.err conftest.$ac_objext \
12858 conftest$ac_exeext conftest.$ac_ext
12860 CPPFLAGS="$gt_save_CPPFLAGS"
12861 LIBS="$gt_save_LIBS"
12863 eval ac_res=\$$gt_func_gnugettext_libintl
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12865 $as_echo "$ac_res" >&6; }
12868 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12869 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
12870 && test "$PACKAGE" != gettext-runtime \
12871 && test "$PACKAGE" != gettext-tools; }; then
12872 gt_use_preinstalled_gnugettext=yes
12873 else
12874 LIBINTL=
12875 LTLIBINTL=
12876 INCINTL=
12881 if test -n "$INTL_MACOSX_LIBS"; then
12882 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12883 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12884 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12885 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12889 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12890 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12892 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
12894 else
12895 USE_NLS=no
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12900 $as_echo_n "checking whether to use NLS... " >&6; }
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12902 $as_echo "$USE_NLS" >&6; }
12903 if test "$USE_NLS" = "yes"; then
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12905 $as_echo_n "checking where the gettext function comes from... " >&6; }
12906 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12907 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12908 gt_source="external libintl"
12909 else
12910 gt_source="libc"
12912 else
12913 gt_source="included intl directory"
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12916 $as_echo "$gt_source" >&6; }
12919 if test "$USE_NLS" = "yes"; then
12921 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12922 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12924 $as_echo_n "checking how to link with libintl... " >&6; }
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12926 $as_echo "$LIBINTL" >&6; }
12928 for element in $INCINTL; do
12929 haveit=
12930 for x in $CPPFLAGS; do
12932 acl_save_prefix="$prefix"
12933 prefix="$acl_final_prefix"
12934 acl_save_exec_prefix="$exec_prefix"
12935 exec_prefix="$acl_final_exec_prefix"
12936 eval x=\"$x\"
12937 exec_prefix="$acl_save_exec_prefix"
12938 prefix="$acl_save_prefix"
12940 if test "X$x" = "X$element"; then
12941 haveit=yes
12942 break
12944 done
12945 if test -z "$haveit"; then
12946 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12948 done
12953 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
12956 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
12960 POSUB=po
12965 INTLLIBS="$LIBINTL"
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
12985 $as_echo_n "checking whether NLS is requested... " >&6; }
12986 if test x"$USE_NLS" != xyes; then
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12988 $as_echo "no" >&6; }
12989 else
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12991 $as_echo "yes" >&6; }
12993 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
12996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
12997 $as_echo_n "checking for catalogs to be installed... " >&6; }
12998 # Look for .po and .gmo files in the source directory.
12999 CATALOGS=
13000 XLINGUAS=
13001 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13002 # If there aren't any .gmo files the shell will give us the
13003 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13004 # weeded out.
13005 case "$cat" in *\**)
13006 continue;;
13007 esac
13008 # The quadruple backslash is collapsed to a double backslash
13009 # by the backticks, then collapsed again by the double quotes,
13010 # leaving us with one backslash in the sed expression (right
13011 # before the dot that mustn't act as a wildcard).
13012 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13013 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13014 # The user is allowed to set LINGUAS to a list of languages to
13015 # install catalogs for. If it's empty that means "all of them."
13016 if test "x$LINGUAS" = x; then
13017 CATALOGS="$CATALOGS $cat"
13018 XLINGUAS="$XLINGUAS $lang"
13019 else
13020 case "$LINGUAS" in *$lang*)
13021 CATALOGS="$CATALOGS $cat"
13022 XLINGUAS="$XLINGUAS $lang"
13024 esac
13026 done
13027 LINGUAS="$XLINGUAS"
13028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
13029 $as_echo "$LINGUAS" >&6; }
13032 DATADIRNAME=share
13034 INSTOBJEXT=.mo
13036 GENCAT=gencat
13038 CATOBJEXT=.gmo
13042 # Create sub-directories for objects and dependencies.
13043 CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
13046 ac_config_commands="$ac_config_commands gdbdepdir"
13049 depcc="$CC" am_compiler_list=
13051 am_depcomp=$ac_aux_dir/depcomp
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
13053 $as_echo_n "checking dependency style of $depcc... " >&6; }
13054 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
13055 $as_echo_n "(cached) " >&6
13056 else
13057 if test -f "$am_depcomp"; then
13058 # We make a subdir and do the tests there. Otherwise we can end up
13059 # making bogus files that we don't know about and never remove. For
13060 # instance it was reported that on HP-UX the gcc test will end up
13061 # making a dummy file named `D' -- because `-MD' means `put the output
13062 # in D'.
13063 mkdir conftest.dir
13064 # Copy depcomp to subdir because otherwise we won't find it if we're
13065 # using a relative directory.
13066 cp "$am_depcomp" conftest.dir
13067 cd conftest.dir
13068 # We will build objects and dependencies in a subdirectory because
13069 # it helps to detect inapplicable dependency modes. For instance
13070 # both Tru64's cc and ICC support -MD to output dependencies as a
13071 # side effect of compilation, but ICC will put the dependencies in
13072 # the current directory while Tru64 will put them in the object
13073 # directory.
13074 mkdir sub
13076 am_cv_CC_dependencies_compiler_type=none
13077 if test "$am_compiler_list" = ""; then
13078 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13080 for depmode in $am_compiler_list; do
13081 if test $depmode = none; then break; fi
13083 $as_echo "$as_me:$LINENO: trying $depmode" >&5
13084 # Setup a source with many dependencies, because some compilers
13085 # like to wrap large dependency lists on column 80 (with \), and
13086 # we should not choose a depcomp mode which is confused by this.
13088 # We need to recreate these files for each test, as the compiler may
13089 # overwrite some of them when testing with obscure command lines.
13090 # This happens at least with the AIX C compiler.
13091 : > sub/conftest.c
13092 for i in 1 2 3 4 5 6; do
13093 echo '#include "conftst'$i'.h"' >> sub/conftest.c
13094 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13095 # Solaris 8's {/usr,}/bin/sh.
13096 touch sub/conftst$i.h
13097 done
13098 echo "include sub/conftest.Po" > confmf
13100 # We check with `-c' and `-o' for the sake of the "dashmstdout"
13101 # mode. It turns out that the SunPro C++ compiler does not properly
13102 # handle `-M -o', and we need to detect this.
13103 depcmd="depmode=$depmode \
13104 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13105 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13106 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
13107 echo "| $depcmd" | sed -e 's/ */ /g' >&5
13108 if env $depcmd > conftest.err 2>&1 &&
13109 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
13110 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
13111 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
13112 # icc doesn't choke on unknown options, it will just issue warnings
13113 # or remarks (even with -Werror). So we grep stderr for any message
13114 # that says an option was ignored or not supported.
13115 # When given -MP, icc 7.0 and 7.1 complain thusly:
13116 # icc: Command line warning: ignoring option '-M'; no argument required
13117 # The diagnosis changed in icc 8.0:
13118 # icc: Command line remark: option '-MP' not supported
13119 if (grep 'ignoring option' conftest.err ||
13120 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13121 am_cv_CC_dependencies_compiler_type=$depmode
13122 $as_echo "$as_me:$LINENO: success" >&5
13123 break
13126 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
13127 sed -e 's/^/| /' < conftest.err >&5
13128 done
13130 cd ..
13131 rm -rf conftest.dir
13132 else
13133 am_cv_CC_dependencies_compiler_type=none
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13138 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13139 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
13140 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
13141 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13146 for ac_header in \
13147 arpa/inet.h \
13148 fcntl.h \
13149 linux/elf.h \
13150 netdb.h \
13151 netinet/in.h \
13152 netinet/tcp.h \
13153 signal.h \
13154 string.h \
13155 sys/file.h \
13156 sys/ioctl.h \
13157 sys/procfs.h \
13158 sys/reg.h \
13159 sys/socket.h \
13160 termios.h \
13161 ws2tcpip.h \
13163 do :
13164 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13165 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13166 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13167 cat >>confdefs.h <<_ACEOF
13168 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13169 _ACEOF
13173 done
13176 for ac_header in vfork.h
13177 do :
13178 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13179 if test "x$ac_cv_header_vfork_h" = xyes; then :
13180 cat >>confdefs.h <<_ACEOF
13181 #define HAVE_VFORK_H 1
13182 _ACEOF
13186 done
13188 for ac_func in fork vfork
13189 do :
13190 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13191 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13192 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13193 cat >>confdefs.h <<_ACEOF
13194 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13195 _ACEOF
13198 done
13200 if test "x$ac_cv_func_fork" = xyes; then
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13202 $as_echo_n "checking for working fork... " >&6; }
13203 if ${ac_cv_func_fork_works+:} false; then :
13204 $as_echo_n "(cached) " >&6
13205 else
13206 if test "$cross_compiling" = yes; then :
13207 ac_cv_func_fork_works=cross
13208 else
13209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13210 /* end confdefs.h. */
13211 $ac_includes_default
13213 main ()
13216 /* By Ruediger Kuhlmann. */
13217 return fork () < 0;
13220 return 0;
13222 _ACEOF
13223 if ac_fn_c_try_run "$LINENO"; then :
13224 ac_cv_func_fork_works=yes
13225 else
13226 ac_cv_func_fork_works=no
13228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13229 conftest.$ac_objext conftest.beam conftest.$ac_ext
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13234 $as_echo "$ac_cv_func_fork_works" >&6; }
13236 else
13237 ac_cv_func_fork_works=$ac_cv_func_fork
13239 if test "x$ac_cv_func_fork_works" = xcross; then
13240 case $host in
13241 *-*-amigaos* | *-*-msdosdjgpp*)
13242 # Override, as these systems have only a dummy fork() stub
13243 ac_cv_func_fork_works=no
13246 ac_cv_func_fork_works=yes
13248 esac
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13250 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13252 ac_cv_func_vfork_works=$ac_cv_func_vfork
13253 if test "x$ac_cv_func_vfork" = xyes; then
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13255 $as_echo_n "checking for working vfork... " >&6; }
13256 if ${ac_cv_func_vfork_works+:} false; then :
13257 $as_echo_n "(cached) " >&6
13258 else
13259 if test "$cross_compiling" = yes; then :
13260 ac_cv_func_vfork_works=cross
13261 else
13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13263 /* end confdefs.h. */
13264 /* Thanks to Paul Eggert for this test. */
13265 $ac_includes_default
13266 #include <sys/wait.h>
13267 #ifdef HAVE_VFORK_H
13268 # include <vfork.h>
13269 #endif
13270 /* On some sparc systems, changes by the child to local and incoming
13271 argument registers are propagated back to the parent. The compiler
13272 is told about this with #include <vfork.h>, but some compilers
13273 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13274 static variable whose address is put into a register that is
13275 clobbered by the vfork. */
13276 static void
13277 #ifdef __cplusplus
13278 sparc_address_test (int arg)
13279 # else
13280 sparc_address_test (arg) int arg;
13281 #endif
13283 static pid_t child;
13284 if (!child) {
13285 child = vfork ();
13286 if (child < 0) {
13287 perror ("vfork");
13288 _exit(2);
13290 if (!child) {
13291 arg = getpid();
13292 write(-1, "", 0);
13293 _exit (arg);
13299 main ()
13301 pid_t parent = getpid ();
13302 pid_t child;
13304 sparc_address_test (0);
13306 child = vfork ();
13308 if (child == 0) {
13309 /* Here is another test for sparc vfork register problems. This
13310 test uses lots of local variables, at least as many local
13311 variables as main has allocated so far including compiler
13312 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13313 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13314 reuse the register of parent for one of the local variables,
13315 since it will think that parent can't possibly be used any more
13316 in this routine. Assigning to the local variable will thus
13317 munge parent in the parent process. */
13318 pid_t
13319 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13320 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13321 /* Convince the compiler that p..p7 are live; otherwise, it might
13322 use the same hardware register for all 8 local variables. */
13323 if (p != p1 || p != p2 || p != p3 || p != p4
13324 || p != p5 || p != p6 || p != p7)
13325 _exit(1);
13327 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13328 from child file descriptors. If the child closes a descriptor
13329 before it execs or exits, this munges the parent's descriptor
13330 as well. Test for this by closing stdout in the child. */
13331 _exit(close(fileno(stdout)) != 0);
13332 } else {
13333 int status;
13334 struct stat st;
13336 while (wait(&status) != child)
13338 return (
13339 /* Was there some problem with vforking? */
13340 child < 0
13342 /* Did the child fail? (This shouldn't happen.) */
13343 || status
13345 /* Did the vfork/compiler bug occur? */
13346 || parent != getpid()
13348 /* Did the file descriptor bug occur? */
13349 || fstat(fileno(stdout), &st) != 0
13353 _ACEOF
13354 if ac_fn_c_try_run "$LINENO"; then :
13355 ac_cv_func_vfork_works=yes
13356 else
13357 ac_cv_func_vfork_works=no
13359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13360 conftest.$ac_objext conftest.beam conftest.$ac_ext
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13365 $as_echo "$ac_cv_func_vfork_works" >&6; }
13368 if test "x$ac_cv_func_fork_works" = xcross; then
13369 ac_cv_func_vfork_works=$ac_cv_func_vfork
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13371 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13374 if test "x$ac_cv_func_vfork_works" = xyes; then
13376 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13378 else
13380 $as_echo "#define vfork fork" >>confdefs.h
13383 if test "x$ac_cv_func_fork_works" = xyes; then
13385 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13389 for ac_func in \
13390 pread \
13391 pread64 \
13392 pwrite \
13394 do :
13395 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13396 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13397 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13398 cat >>confdefs.h <<_ACEOF
13399 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13400 _ACEOF
13403 done
13406 # Check the return and argument types of ptrace.
13409 for ac_header in sys/ptrace.h ptrace.h
13410 do :
13411 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13412 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13413 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13414 cat >>confdefs.h <<_ACEOF
13415 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13416 _ACEOF
13420 done
13423 gdb_ptrace_headers='
13424 #include <sys/types.h>
13425 #if HAVE_SYS_PTRACE_H
13426 # include <sys/ptrace.h>
13427 #endif
13428 #if HAVE_UNISTD_H
13429 # include <unistd.h>
13430 #endif
13433 # Check return type. Varargs (used on GNU/Linux) conflict with the
13434 # empty argument list, so check for that explicitly.
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13436 $as_echo_n "checking return type of ptrace... " >&6; }
13437 if ${gdb_cv_func_ptrace_ret+:} false; then :
13438 $as_echo_n "(cached) " >&6
13439 else
13440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13441 /* end confdefs.h. */
13442  $gdb_ptrace_headers
13444 main ()
13446 extern long ptrace (enum __ptrace_request, ...);
13449 return 0;
13451 _ACEOF
13452 if ac_fn_c_try_compile "$LINENO"; then :
13453 gdb_cv_func_ptrace_ret='long'
13454 else
13455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13456 /* end confdefs.h. */
13457 $gdb_ptrace_headers
13459 main ()
13461 extern int ptrace ();
13464 return 0;
13466 _ACEOF
13467 if ac_fn_c_try_compile "$LINENO"; then :
13468 gdb_cv_func_ptrace_ret='int'
13469 else
13470 gdb_cv_func_ptrace_ret='long'
13473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13480 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13483 cat >>confdefs.h <<_ACEOF
13484 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13485 _ACEOF
13488 # Check argument types.
13489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13490 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13491 if ${gdb_cv_func_ptrace_args+:} false; then :
13492 $as_echo_n "(cached) " >&6
13493 else
13494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13495 /* end confdefs.h. */
13496 $gdb_ptrace_headers
13498 main ()
13500 extern long ptrace (enum __ptrace_request, ...);
13503 return 0;
13505 _ACEOF
13506 if ac_fn_c_try_compile "$LINENO"; then :
13507 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13508 else
13509 for gdb_arg1 in 'int' 'long'; do
13510 for gdb_arg2 in 'pid_t' 'int' 'long'; do
13511 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13512 for gdb_arg4 in 'int' 'long' 'void *'; do
13513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13514 /* end confdefs.h. */
13515 $gdb_ptrace_headers
13517 main ()
13519 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13522 return 0;
13524 _ACEOF
13525 if ac_fn_c_try_compile "$LINENO"; then :
13526 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13527 break 4;
13530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13532 for gdb_arg5 in 'int *' 'int' 'long'; do
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534 /* end confdefs.h. */
13535 $gdb_ptrace_headers
13537 main ()
13539 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13542 return 0;
13544 _ACEOF
13545 if ac_fn_c_try_compile "$LINENO"; then :
13546 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13547 break 5;
13550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13551 done
13552 done
13553 done
13554 done
13555 done
13556 # Provide a safe default value.
13557 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13564 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13566 ac_save_IFS=$IFS; IFS=','
13567 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13568 IFS=$ac_save_IFS
13569 shift
13571 cat >>confdefs.h <<_ACEOF
13572 #define PTRACE_TYPE_ARG1 $1
13573 _ACEOF
13576 cat >>confdefs.h <<_ACEOF
13577 #define PTRACE_TYPE_ARG3 $3
13578 _ACEOF
13581 cat >>confdefs.h <<_ACEOF
13582 #define PTRACE_TYPE_ARG4 $4
13583 _ACEOF
13585 if test -n "$5"; then
13587 cat >>confdefs.h <<_ACEOF
13588 #define PTRACE_TYPE_ARG5 $5
13589 _ACEOF
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
13597 $as_echo_n "checking the compiler type... " >&6; }
13598 if ${gdb_cv_compiler_type+:} false; then :
13599 $as_echo_n "(cached) " >&6
13600 else
13601 gdb_cv_compiler_type=unknown
13602 if test "$gdb_cv_compiler_type" = unknown; then
13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13604 /* end confdefs.h. */
13607 main ()
13610 #if !defined __GNUC__ || defined __clang__
13611 #error not gcc
13612 #endif
13615 return 0;
13617 _ACEOF
13618 if ac_fn_c_try_compile "$LINENO"; then :
13619 gdb_cv_compiler_type=gcc
13621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13624 if test "$gdb_cv_compiler_type" = unknown; then
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626 /* end confdefs.h. */
13629 main ()
13632 #ifndef __clang__
13633 #error not clang
13634 #endif
13637 return 0;
13639 _ACEOF
13640 if ac_fn_c_try_compile "$LINENO"; then :
13641 gdb_cv_compiler_type=clang
13643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
13648 $as_echo "$gdb_cv_compiler_type" >&6; }
13650 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
13653 # Check whether --enable-werror was given.
13654 if test "${enable_werror+set}" = set; then :
13655 enableval=$enable_werror; case "${enableval}" in
13656 yes | y) ERROR_ON_WARNING="yes" ;;
13657 no | n) ERROR_ON_WARNING="no" ;;
13658 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
13659 esac
13663 # Enable -Werror by default when using gcc. Turn it off for releases.
13664 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
13665 ERROR_ON_WARNING=yes
13668 WERROR_CFLAGS=""
13669 if test "${ERROR_ON_WARNING}" = yes ; then
13670 WERROR_CFLAGS="-Werror"
13673 # The options we'll try to enable.
13674 build_warnings="-Wall -Wpointer-arith \
13675 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
13676 -Wno-switch -Wno-char-subscripts \
13677 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
13678 -Wno-sign-compare -Wno-error=maybe-uninitialized \
13679 -Wno-mismatched-tags \
13680 -Wno-error=deprecated-register \
13681 -Wsuggest-override \
13682 -Wimplicit-fallthrough=5 \
13683 -Wduplicated-cond \
13684 -Wshadow=local \
13685 -Wdeprecated-copy \
13686 -Wdeprecated-copy-dtor \
13687 -Wredundant-move \
13688 -Wmissing-declarations \
13689 -Wstrict-null-sentinel \
13690 -Wvla \
13693 # The -Wmissing-prototypes flag will be accepted by GCC, but results
13694 # in a warning being printed about the flag not being valid for C++,
13695 # this is something to do with using ccache, and argument ordering.
13696 if test "$GDB_COMPILER_TYPE" != gcc; then
13697 build_warnings="$build_warnings -Wmissing-prototypes"
13700 case "${host}" in
13701 *-*-mingw32*)
13702 # Enable -Wno-format by default when using gcc on mingw since many
13703 # GCC versions complain about %I64.
13704 build_warnings="$build_warnings -Wno-format" ;;
13705 *-*-solaris*)
13706 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
13707 # doesn't understand.
13708 build_warnings="$build_warnings -Wno-unknown-pragmas"
13709 # Solaris 11 <unistd.h> marks vfork deprecated.
13710 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
13712 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
13713 # but there's a special case for this below.
13714 build_warnings="$build_warnings -Wformat-nonliteral" ;;
13715 esac
13717 # Check whether --enable-build-warnings was given.
13718 if test "${enable_build_warnings+set}" = set; then :
13719 enableval=$enable_build_warnings; case "${enableval}" in
13720 yes) ;;
13721 no) build_warnings="-w";;
13722 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13723 build_warnings="${build_warnings} ${t}";;
13724 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13725 build_warnings="${t} ${build_warnings}";;
13726 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13727 esac
13728 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13729 echo "Setting compiler warning flags = $build_warnings" 6>&1
13732 # Check whether --enable-gdb-build-warnings was given.
13733 if test "${enable_gdb_build_warnings+set}" = set; then :
13734 enableval=$enable_gdb_build_warnings; case "${enableval}" in
13735 yes) ;;
13736 no) build_warnings="-w";;
13737 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13738 build_warnings="${build_warnings} ${t}";;
13739 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13740 build_warnings="${t} ${build_warnings}";;
13741 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13742 esac
13743 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13744 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13748 # The set of warnings supported by a C++ compiler is not the same as
13749 # of the C compiler.
13750 ac_ext=cpp
13751 ac_cpp='$CXXCPP $CPPFLAGS'
13752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13757 WARN_CFLAGS=""
13758 if test "x${build_warnings}" != x -a "x$GCC" = xyes
13759 then
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13761 $as_echo_n "checking compiler warning flags... " >&6; }
13762 # Separate out the -Werror flag as some files just cannot be
13763 # compiled with it enabled.
13764 for w in ${build_warnings}; do
13765 # GCC does not complain about -Wno-unknown-warning. Invert
13766 # and test -Wunknown-warning instead.
13767 case $w in
13768 -Wno-*)
13769 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
13770 -Wformat-nonliteral)
13771 # gcc requires -Wformat before -Wformat-nonliteral
13772 # will work, so stick them together.
13773 w="-Wformat $w"
13774 wtest="$w"
13777 wtest=$w ;;
13778 esac
13780 case $w in
13781 -Werr*) WERROR_CFLAGS=-Werror ;;
13783 # Check whether GCC accepts it.
13784 saved_CFLAGS="$CFLAGS"
13785 CFLAGS="$CFLAGS -Werror $wtest"
13786 saved_CXXFLAGS="$CXXFLAGS"
13787 CXXFLAGS="$CXXFLAGS -Werror $wtest"
13788 if test "x$w" = "x-Wunused-variable"; then
13789 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
13790 # fixed in GCC 4.9. This test is derived from the gdb
13791 # source code that triggered this bug in GCC.
13792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13793 /* end confdefs.h. */
13794 struct scoped_restore_base {};
13795 struct scoped_restore_tmpl : public scoped_restore_base {
13796 ~scoped_restore_tmpl() {}
13799 main ()
13801 const scoped_restore_base &b = scoped_restore_tmpl();
13804 return 0;
13806 _ACEOF
13807 if ac_fn_cxx_try_compile "$LINENO"; then :
13808 WARN_CFLAGS="${WARN_CFLAGS} $w"
13810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13811 else
13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813 /* end confdefs.h. */
13816 main ()
13820 return 0;
13822 _ACEOF
13823 if ac_fn_cxx_try_compile "$LINENO"; then :
13824 WARN_CFLAGS="${WARN_CFLAGS} $w"
13826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13828 CFLAGS="$saved_CFLAGS"
13829 CXXFLAGS="$saved_CXXFLAGS"
13830 esac
13831 done
13832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13833 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
13838 ac_ext=c
13839 ac_cpp='$CPP $CPPFLAGS'
13840 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13841 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13842 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13846 old_LIBS="$LIBS"
13847 LIBS="$LIBS -ldl"
13848 for ac_func in dladdr
13849 do :
13850 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
13851 if test "x$ac_cv_func_dladdr" = xyes; then :
13852 cat >>confdefs.h <<_ACEOF
13853 #define HAVE_DLADDR 1
13854 _ACEOF
13857 done
13859 LIBS="$old_LIBS"
13861 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
13862 if test "x$ac_cv_have_decl_ffs" = xyes; then :
13863 ac_have_decl=1
13864 else
13865 ac_have_decl=0
13868 cat >>confdefs.h <<_ACEOF
13869 #define HAVE_DECL_FFS $ac_have_decl
13870 _ACEOF
13872 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
13873 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
13874 ac_have_decl=1
13875 else
13876 ac_have_decl=0
13879 cat >>confdefs.h <<_ACEOF
13880 #define HAVE_DECL_ASPRINTF $ac_have_decl
13881 _ACEOF
13883 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
13884 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
13885 ac_have_decl=1
13886 else
13887 ac_have_decl=0
13890 cat >>confdefs.h <<_ACEOF
13891 #define HAVE_DECL_VASPRINTF $ac_have_decl
13892 _ACEOF
13894 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13895 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13896 ac_have_decl=1
13897 else
13898 ac_have_decl=0
13901 cat >>confdefs.h <<_ACEOF
13902 #define HAVE_DECL_SNPRINTF $ac_have_decl
13903 _ACEOF
13905 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13906 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13907 ac_have_decl=1
13908 else
13909 ac_have_decl=0
13912 cat >>confdefs.h <<_ACEOF
13913 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13914 _ACEOF
13916 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
13917 if test "x$ac_cv_have_decl_strtol" = xyes; then :
13918 ac_have_decl=1
13919 else
13920 ac_have_decl=0
13923 cat >>confdefs.h <<_ACEOF
13924 #define HAVE_DECL_STRTOL $ac_have_decl
13925 _ACEOF
13927 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
13928 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
13929 ac_have_decl=1
13930 else
13931 ac_have_decl=0
13934 cat >>confdefs.h <<_ACEOF
13935 #define HAVE_DECL_STRTOUL $ac_have_decl
13936 _ACEOF
13938 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
13939 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
13940 ac_have_decl=1
13941 else
13942 ac_have_decl=0
13945 cat >>confdefs.h <<_ACEOF
13946 #define HAVE_DECL_STRTOLL $ac_have_decl
13947 _ACEOF
13949 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
13950 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
13951 ac_have_decl=1
13952 else
13953 ac_have_decl=0
13956 cat >>confdefs.h <<_ACEOF
13957 #define HAVE_DECL_STRTOULL $ac_have_decl
13958 _ACEOF
13960 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
13961 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
13962 ac_have_decl=1
13963 else
13964 ac_have_decl=0
13967 cat >>confdefs.h <<_ACEOF
13968 #define HAVE_DECL_STRVERSCMP $ac_have_decl
13969 _ACEOF
13971 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
13972 if test "x$ac_cv_type_long_long" = xyes; then :
13974 cat >>confdefs.h <<_ACEOF
13975 #define HAVE_LONG_LONG 1
13976 _ACEOF
13978 # The cast to long int works around a bug in the HP C Compiler
13979 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13980 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13981 # This bug is HP SR number 8606223364.
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
13983 $as_echo_n "checking size of long long... " >&6; }
13984 if ${ac_cv_sizeof_long_long+:} false; then :
13985 $as_echo_n "(cached) " >&6
13986 else
13987 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
13989 else
13990 if test "$ac_cv_type_long_long" = yes; then
13991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13992 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13993 as_fn_error 77 "cannot compute sizeof (long long)
13994 See \`config.log' for more details" "$LINENO" 5; }
13995 else
13996 ac_cv_sizeof_long_long=0
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
14002 $as_echo "$ac_cv_sizeof_long_long" >&6; }
14006 cat >>confdefs.h <<_ACEOF
14007 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
14008 _ACEOF
14014 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
14015 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
14016 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
14017 ac_have_decl=1
14018 else
14019 ac_have_decl=0
14022 cat >>confdefs.h <<_ACEOF
14023 #define HAVE_DECL_BASENAME $ac_have_decl
14024 _ACEOF
14031 ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
14032 if test "x$ac_cv_have_decl_perror" = xyes; then :
14033 ac_have_decl=1
14034 else
14035 ac_have_decl=0
14038 cat >>confdefs.h <<_ACEOF
14039 #define HAVE_DECL_PERROR $ac_have_decl
14040 _ACEOF
14041 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
14042 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
14043 ac_have_decl=1
14044 else
14045 ac_have_decl=0
14048 cat >>confdefs.h <<_ACEOF
14049 #define HAVE_DECL_VASPRINTF $ac_have_decl
14050 _ACEOF
14051 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
14052 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
14053 ac_have_decl=1
14054 else
14055 ac_have_decl=0
14058 cat >>confdefs.h <<_ACEOF
14059 #define HAVE_DECL_VSNPRINTF $ac_have_decl
14060 _ACEOF
14063 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
14064 #if HAVE_SYS_SOCKET_H
14065 # include <sys/socket.h>
14066 #elif HAVE_WS2TCPIP_H
14067 # include <ws2tcpip.h>
14068 #endif
14071 if test "x$ac_cv_type_socklen_t" = xyes; then :
14073 cat >>confdefs.h <<_ACEOF
14074 #define HAVE_SOCKLEN_T 1
14075 _ACEOF
14081 case "${target}" in
14082 *-android*)
14083 # Starting with NDK version 9, <elf.h> actually includes definitions
14084 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
14085 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
14086 # leading to conflicts with the defintions from <linux/elf.h>.
14087 # This makes it impossible for us to include both <elf.h> and
14088 # <linux/elf.h>, which means that, in practice, we do not have
14089 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
14090 # Therefore, do not try to auto-detect availability, as it would
14091 # get it wrong on this platform.
14094 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
14097 if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
14099 cat >>confdefs.h <<_ACEOF
14100 #define HAVE_ELF32_AUXV_T 1
14101 _ACEOF
14105 ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
14108 if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
14110 cat >>confdefs.h <<_ACEOF
14111 #define HAVE_ELF64_AUXV_T 1
14112 _ACEOF
14117 esac
14121 # Check whether --with-pkgversion was given.
14122 if test "${with_pkgversion+set}" = set; then :
14123 withval=$with_pkgversion; case "$withval" in
14124 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
14125 no) PKGVERSION= ;;
14126 *) PKGVERSION="($withval) " ;;
14127 esac
14128 else
14129 PKGVERSION="(GDB) "
14137 # Check whether --with-bugurl was given.
14138 if test "${with_bugurl+set}" = set; then :
14139 withval=$with_bugurl; case "$withval" in
14140 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
14141 no) BUGURL=
14143 *) BUGURL="$withval"
14145 esac
14146 else
14147 BUGURL="http://www.gnu.org/software/gdb/bugs/"
14151 case ${BUGURL} in
14153 REPORT_BUGS_TO=
14154 REPORT_BUGS_TEXI=
14157 REPORT_BUGS_TO="<$BUGURL>"
14158 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
14160 esac;
14165 cat >>confdefs.h <<_ACEOF
14166 #define PKGVERSION "$PKGVERSION"
14167 _ACEOF
14170 cat >>confdefs.h <<_ACEOF
14171 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
14172 _ACEOF
14175 # Check for various supplementary target information (beyond the
14176 # triplet) which might affect the choices in configure.srv.
14177 case "${target}" in
14178 i[34567]86-*-linux*)
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
14180 $as_echo_n "checking if building for x86-64... " >&6; }
14181 if ${gdb_cv_i386_is_x86_64+:} false; then :
14182 $as_echo_n "(cached) " >&6
14183 else
14184 save_CPPFLAGS="$CPPFLAGS"
14185 CPPFLAGS="$CPPFLAGS $CFLAGS"
14186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14187 /* end confdefs.h. */
14189 #if __x86_64__
14190 got it
14191 #endif
14193 _ACEOF
14194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14195 $EGREP "got it" >/dev/null 2>&1; then :
14196 gdb_cv_i386_is_x86_64=yes
14197 else
14198 gdb_cv_i386_is_x86_64=no
14200 rm -f conftest*
14202 CPPFLAGS="$save_CPPFLAGS"
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
14205 $as_echo "$gdb_cv_i386_is_x86_64" >&6; }
14208 x86_64-*-linux*)
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
14210 $as_echo_n "checking if building for x32... " >&6; }
14211 if ${gdb_cv_x86_is_x32+:} false; then :
14212 $as_echo_n "(cached) " >&6
14213 else
14214 save_CPPFLAGS="$CPPFLAGS"
14215 CPPFLAGS="$CPPFLAGS $CFLAGS"
14216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h. */
14219 #if __x86_64__ && __ILP32__
14220 got it
14221 #endif
14223 _ACEOF
14224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14225 $EGREP "got it" >/dev/null 2>&1; then :
14226 gdb_cv_x86_is_x32=yes
14227 else
14228 gdb_cv_x86_is_x32=no
14230 rm -f conftest*
14232 CPPFLAGS="$save_CPPFLAGS"
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
14235 $as_echo "$gdb_cv_x86_is_x32" >&6; }
14238 m68k-*-*)
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
14240 $as_echo_n "checking if building for Coldfire... " >&6; }
14241 if ${gdb_cv_m68k_is_coldfire+:} false; then :
14242 $as_echo_n "(cached) " >&6
14243 else
14244 save_CPPFLAGS="$CPPFLAGS"
14245 CPPFLAGS="$CPPFLAGS $CFLAGS"
14246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247 /* end confdefs.h. */
14249 #ifdef __mcoldfire__
14250 got it
14251 #endif
14253 _ACEOF
14254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14255 $EGREP "got it" >/dev/null 2>&1; then :
14256 gdb_cv_m68k_is_coldfire=yes
14257 else
14258 gdb_cv_m68k_is_coldfire=no
14260 rm -f conftest*
14262 CPPFLAGS="$save_CPPFLAGS"
14264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
14265 $as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
14267 esac
14269 . ${srcdir}/configure.srv
14271 if test "${srv_mingwce}" = "yes"; then
14272 LIBS="$LIBS -lws2"
14273 elif test "${srv_mingw}" = "yes"; then
14274 # WIN32APILIBS is set by GDB_AC_COMMON.
14275 LIBS="$LIBS $WIN32APILIBS"
14278 if test "${srv_linux_usrregs}" = "yes"; then
14280 $as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
14284 if test "${srv_linux_regsets}" = "yes"; then
14286 $as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14290 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14291 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
14292 $as_echo_n "(cached) " >&6
14293 else
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14295 /* end confdefs.h. */
14296 #include <sys/ptrace.h>
14298 main ()
14300 PTRACE_GETREGS;
14302 return 0;
14304 _ACEOF
14305 if ac_fn_c_try_compile "$LINENO"; then :
14306 gdbsrv_cv_have_ptrace_getregs=yes
14307 else
14308 gdbsrv_cv_have_ptrace_getregs=no
14311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
14316 $as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
14317 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
14319 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14324 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14325 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
14326 $as_echo_n "(cached) " >&6
14327 else
14328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14329 /* end confdefs.h. */
14330 #include <sys/ptrace.h>
14332 main ()
14334 PTRACE_GETFPXREGS;
14336 return 0;
14338 _ACEOF
14339 if ac_fn_c_try_compile "$LINENO"; then :
14340 gdbsrv_cv_have_ptrace_getfpxregs=yes
14341 else
14342 gdbsrv_cv_have_ptrace_getfpxregs=no
14345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
14350 $as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
14351 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
14353 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14358 if test "${srv_linux_btrace}" = "yes"; then
14360 $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
14364 if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
14365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
14366 $as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
14367 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
14368 $as_echo_n "(cached) " >&6
14369 else
14370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14371 /* end confdefs.h. */
14372 #include <thread_db.h>
14374 main ()
14376 lwpid_t avar
14378 return 0;
14380 _ACEOF
14381 if ac_fn_c_try_compile "$LINENO"; then :
14382 gdbserver_cv_have_thread_db_type_lwpid_t=yes
14383 else
14384 gdbserver_cv_have_thread_db_type_lwpid_t=no
14387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14391 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
14393 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
14397 $as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
14401 if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
14403 $as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
14404 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
14405 $as_echo_n "(cached) " >&6
14406 else
14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14408 /* end confdefs.h. */
14409 #include <thread_db.h>
14411 main ()
14413 psaddr_t avar
14415 return 0;
14417 _ACEOF
14418 if ac_fn_c_try_compile "$LINENO"; then :
14419 gdbserver_cv_have_thread_db_type_psaddr_t=yes
14420 else
14421 gdbserver_cv_have_thread_db_type_psaddr_t=no
14424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14428 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
14430 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
14434 $as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
14438 old_LIBS="$LIBS"
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14440 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14441 if ${ac_cv_lib_dl_dlopen+:} false; then :
14442 $as_echo_n "(cached) " >&6
14443 else
14444 ac_check_lib_save_LIBS=$LIBS
14445 LIBS="-ldl $LIBS"
14446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14447 /* end confdefs.h. */
14449 /* Override any GCC internal prototype to avoid an error.
14450 Use char because int might match the return type of a GCC
14451 builtin and then its argument prototype would still apply. */
14452 #ifdef __cplusplus
14453 extern "C"
14454 #endif
14455 char dlopen ();
14457 main ()
14459 return dlopen ();
14461 return 0;
14463 _ACEOF
14464 if ac_fn_c_try_link "$LINENO"; then :
14465 ac_cv_lib_dl_dlopen=yes
14466 else
14467 ac_cv_lib_dl_dlopen=no
14469 rm -f core conftest.err conftest.$ac_objext \
14470 conftest$ac_exeext conftest.$ac_ext
14471 LIBS=$ac_check_lib_save_LIBS
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14474 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14475 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14476 cat >>confdefs.h <<_ACEOF
14477 #define HAVE_LIBDL 1
14478 _ACEOF
14480 LIBS="-ldl $LIBS"
14484 LIBS="$old_LIBS"
14486 srv_thread_depfiles=
14487 srv_libs=
14489 if test "$srv_linux_thread_db" = "yes"; then
14490 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
14491 srv_libs="-ldl"
14492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14493 $as_echo_n "checking for the dynamic export flag... " >&6; }
14494 old_LDFLAGS="$LDFLAGS"
14495 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
14496 # supported there.
14497 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14498 LDFLAGS="$LDFLAGS $RDYNAMIC"
14499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500 /* end confdefs.h. */
14503 main ()
14507 return 0;
14509 _ACEOF
14510 if ac_fn_c_try_link "$LINENO"; then :
14511 found="-Wl,--dynamic-list"
14512 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14513 else
14514 RDYNAMIC="-rdynamic"
14515 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
14516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14517 /* end confdefs.h. */
14520 main ()
14524 return 0;
14526 _ACEOF
14527 if ac_fn_c_try_link "$LINENO"; then :
14528 found="-rdynamic"
14529 else
14530 found="no"
14531 RDYNAMIC=""
14534 rm -f core conftest.err conftest.$ac_objext \
14535 conftest$ac_exeext conftest.$ac_ext
14538 rm -f core conftest.err conftest.$ac_objext \
14539 conftest$ac_exeext conftest.$ac_ext
14541 LDFLAGS="$old_LDFLAGS"
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14543 $as_echo "$found" >&6; }
14544 else
14545 srv_libs="-lthread_db"
14548 srv_thread_depfiles="thread-db.o proc-service.o"
14550 $as_echo "#define USE_THREAD_DB 1" >>confdefs.h
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
14553 $as_echo_n "checking for TD_VERSION... " >&6; }
14554 if ${gdbsrv_cv_have_td_version+:} false; then :
14555 $as_echo_n "(cached) " >&6
14556 else
14557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14558 /* end confdefs.h. */
14559 #include <thread_db.h>
14561 main ()
14563 TD_VERSION;
14565 return 0;
14567 _ACEOF
14568 if ac_fn_c_try_compile "$LINENO"; then :
14569 gdbsrv_cv_have_td_version=yes
14570 else
14571 gdbsrv_cv_have_td_version=no
14574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
14578 $as_echo "$gdbsrv_cv_have_td_version" >&6; }
14579 if test "$gdbsrv_cv_have_td_version" = yes; then
14581 $as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
14587 # Check whether --with-libthread-db was given.
14588 if test "${with_libthread_db+set}" = set; then :
14589 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
14590 srv_libs="$srv_libthread_db_path"
14595 if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
14597 $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
14601 if test "$srv_xmlfiles" != ""; then
14602 srv_xmlbuiltin="xml-builtin.o"
14604 $as_echo "#define USE_XML 1" >>confdefs.h
14607 tmp_xmlfiles=$srv_xmlfiles
14608 srv_xmlfiles=""
14609 for f in $tmp_xmlfiles; do
14610 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
14611 done
14614 GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
14615 GDBSERVER_LIBS="$srv_libs"
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
14618 $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
14619 if ${gdbsrv_cv_have_sync_builtins+:} false; then :
14620 $as_echo_n "(cached) " >&6
14621 else
14622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14623 /* end confdefs.h. */
14626 main ()
14628 int foo, bar;
14629 bar = __sync_val_compare_and_swap(&foo, 0, 1);
14632 return 0;
14634 _ACEOF
14635 if ac_fn_c_try_link "$LINENO"; then :
14636 gdbsrv_cv_have_sync_builtins=yes
14637 else
14638 gdbsrv_cv_have_sync_builtins=no
14641 rm -f core conftest.err conftest.$ac_objext \
14642 conftest$ac_exeext conftest.$ac_ext
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
14646 $as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
14647 if test "$gdbsrv_cv_have_sync_builtins" = yes; then
14649 $as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
14653 saved_cflags="$CFLAGS"
14654 CFLAGS="$CFLAGS -fvisibility=hidden"
14655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656 /* end confdefs.h. */
14659 main ()
14663 return 0;
14665 _ACEOF
14666 if ac_fn_c_try_compile "$LINENO"; then :
14667 gdbsrv_cv_have_visibility_hidden=yes
14668 else
14669 gdbsrv_cv_have_visibility_hidden=no
14671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14672 CFLAGS="$saved_cflags"
14674 IPA_DEPFILES=""
14675 extra_libraries=""
14677 # check whether to enable the inprocess agent
14678 if test "$ipa_obj" != "" \
14679 -a "$gdbsrv_cv_have_sync_builtins" = yes \
14680 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
14681 have_ipa=true
14682 else
14683 have_ipa=false
14686 # Check whether --enable-inprocess-agent was given.
14687 if test "${enable_inprocess_agent+set}" = set; then :
14688 enableval=$enable_inprocess_agent; case "$enableval" in
14689 yes) want_ipa=true ;;
14690 no) want_ipa=false ;;
14691 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
14692 esac
14693 else
14694 want_ipa=$have_ipa
14698 if $want_ipa ; then
14699 if $have_ipa ; then
14700 IPA_DEPFILES="$ipa_obj"
14701 extra_libraries="$extra_libraries libinproctrace.so"
14702 else
14703 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
14714 GNULIB=../gnulib/import
14716 GNULIB_STDINT_H=
14717 if test x"$STDINT_H" != x; then
14718 GNULIB_STDINT_H=$GNULIB/$STDINT_H
14722 # Check for libiconv. It is a requirement for Linux hosts, and others hosts
14723 # don't use it at all. Define MAYBE_LIBICONV only if the host is Linux.
14729 am_save_CPPFLAGS="$CPPFLAGS"
14731 for element in $INCICONV; do
14732 haveit=
14733 for x in $CPPFLAGS; do
14735 acl_save_prefix="$prefix"
14736 prefix="$acl_final_prefix"
14737 acl_save_exec_prefix="$exec_prefix"
14738 exec_prefix="$acl_final_exec_prefix"
14739 eval x=\"$x\"
14740 exec_prefix="$acl_save_exec_prefix"
14741 prefix="$acl_save_prefix"
14743 if test "X$x" = "X$element"; then
14744 haveit=yes
14745 break
14747 done
14748 if test -z "$haveit"; then
14749 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14751 done
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14755 $as_echo_n "checking for iconv... " >&6; }
14756 if ${am_cv_func_iconv+:} false; then :
14757 $as_echo_n "(cached) " >&6
14758 else
14760 am_cv_func_iconv="no, consider installing GNU libiconv"
14761 am_cv_lib_iconv=no
14762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14763 /* end confdefs.h. */
14765 #include <stdlib.h>
14766 #include <iconv.h>
14769 main ()
14771 iconv_t cd = iconv_open("","");
14772 iconv(cd,NULL,NULL,NULL,NULL);
14773 iconv_close(cd);
14775 return 0;
14777 _ACEOF
14778 if ac_fn_c_try_link "$LINENO"; then :
14779 am_cv_func_iconv=yes
14781 rm -f core conftest.err conftest.$ac_objext \
14782 conftest$ac_exeext conftest.$ac_ext
14783 if test "$am_cv_func_iconv" != yes; then
14784 am_save_LIBS="$LIBS"
14785 LIBS="$LIBS $LIBICONV"
14786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14787 /* end confdefs.h. */
14789 #include <stdlib.h>
14790 #include <iconv.h>
14793 main ()
14795 iconv_t cd = iconv_open("","");
14796 iconv(cd,NULL,NULL,NULL,NULL);
14797 iconv_close(cd);
14799 return 0;
14801 _ACEOF
14802 if ac_fn_c_try_link "$LINENO"; then :
14803 am_cv_lib_iconv=yes
14804 am_cv_func_iconv=yes
14806 rm -f core conftest.err conftest.$ac_objext \
14807 conftest$ac_exeext conftest.$ac_ext
14808 LIBS="$am_save_LIBS"
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14813 $as_echo "$am_cv_func_iconv" >&6; }
14814 if test "$am_cv_func_iconv" = yes; then
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14816 $as_echo_n "checking for working iconv... " >&6; }
14817 if ${am_cv_func_iconv_works+:} false; then :
14818 $as_echo_n "(cached) " >&6
14819 else
14821 am_save_LIBS="$LIBS"
14822 if test $am_cv_lib_iconv = yes; then
14823 LIBS="$LIBS $LIBICONV"
14825 am_cv_func_iconv_works=no
14826 for ac_iconv_const in '' 'const'; do
14827 if test "$cross_compiling" = yes; then :
14828 case "$host_os" in
14829 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14830 *) am_cv_func_iconv_works="guessing yes" ;;
14831 esac
14832 else
14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14834 /* end confdefs.h. */
14836 #include <iconv.h>
14837 #include <string.h>
14839 #ifndef ICONV_CONST
14840 # define ICONV_CONST $ac_iconv_const
14841 #endif
14844 main ()
14846 int result = 0;
14847 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14848 successful returns. This is even documented in
14849 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14851 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14852 if (cd_utf8_to_88591 != (iconv_t)(-1))
14854 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14855 char buf[10];
14856 ICONV_CONST char *inptr = input;
14857 size_t inbytesleft = strlen (input);
14858 char *outptr = buf;
14859 size_t outbytesleft = sizeof (buf);
14860 size_t res = iconv (cd_utf8_to_88591,
14861 &inptr, &inbytesleft,
14862 &outptr, &outbytesleft);
14863 if (res == 0)
14864 result |= 1;
14865 iconv_close (cd_utf8_to_88591);
14868 /* Test against Solaris 10 bug: Failures are not distinguishable from
14869 successful returns. */
14871 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14872 if (cd_ascii_to_88591 != (iconv_t)(-1))
14874 static ICONV_CONST char input[] = "\263";
14875 char buf[10];
14876 ICONV_CONST char *inptr = input;
14877 size_t inbytesleft = strlen (input);
14878 char *outptr = buf;
14879 size_t outbytesleft = sizeof (buf);
14880 size_t res = iconv (cd_ascii_to_88591,
14881 &inptr, &inbytesleft,
14882 &outptr, &outbytesleft);
14883 if (res == 0)
14884 result |= 2;
14885 iconv_close (cd_ascii_to_88591);
14888 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14890 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14891 if (cd_88591_to_utf8 != (iconv_t)(-1))
14893 static ICONV_CONST char input[] = "\304";
14894 static char buf[2] = { (char)0xDE, (char)0xAD };
14895 ICONV_CONST char *inptr = input;
14896 size_t inbytesleft = 1;
14897 char *outptr = buf;
14898 size_t outbytesleft = 1;
14899 size_t res = iconv (cd_88591_to_utf8,
14900 &inptr, &inbytesleft,
14901 &outptr, &outbytesleft);
14902 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14903 result |= 4;
14904 iconv_close (cd_88591_to_utf8);
14907 #if 0 /* This bug could be worked around by the caller. */
14908 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
14910 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14911 if (cd_88591_to_utf8 != (iconv_t)(-1))
14913 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14914 char buf[50];
14915 ICONV_CONST char *inptr = input;
14916 size_t inbytesleft = strlen (input);
14917 char *outptr = buf;
14918 size_t outbytesleft = sizeof (buf);
14919 size_t res = iconv (cd_88591_to_utf8,
14920 &inptr, &inbytesleft,
14921 &outptr, &outbytesleft);
14922 if ((int)res > 0)
14923 result |= 8;
14924 iconv_close (cd_88591_to_utf8);
14927 #endif
14928 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14929 provided. */
14931 /* Try standardized names. */
14932 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
14933 /* Try IRIX, OSF/1 names. */
14934 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
14935 /* Try AIX names. */
14936 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
14937 /* Try HP-UX names. */
14938 iconv_t cd4 = iconv_open ("utf8", "eucJP");
14939 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
14940 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
14941 result |= 16;
14942 if (cd1 != (iconv_t)(-1))
14943 iconv_close (cd1);
14944 if (cd2 != (iconv_t)(-1))
14945 iconv_close (cd2);
14946 if (cd3 != (iconv_t)(-1))
14947 iconv_close (cd3);
14948 if (cd4 != (iconv_t)(-1))
14949 iconv_close (cd4);
14951 return result;
14954 return 0;
14956 _ACEOF
14957 if ac_fn_c_try_run "$LINENO"; then :
14958 am_cv_func_iconv_works=yes
14960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14961 conftest.$ac_objext conftest.beam conftest.$ac_ext
14964 test "$am_cv_func_iconv_works" = no || break
14965 done
14966 LIBS="$am_save_LIBS"
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14970 $as_echo "$am_cv_func_iconv_works" >&6; }
14971 case "$am_cv_func_iconv_works" in
14972 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14973 *) am_func_iconv=yes ;;
14974 esac
14975 else
14976 am_func_iconv=no am_cv_lib_iconv=no
14978 if test "$am_func_iconv" = yes; then
14980 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
14983 if test "$am_cv_lib_iconv" = yes; then
14984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14985 $as_echo_n "checking how to link with libiconv... " >&6; }
14986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14987 $as_echo "$LIBICONV" >&6; }
14988 else
14989 CPPFLAGS="$am_save_CPPFLAGS"
14990 LIBICONV=
14991 LTLIBICONV=
14996 if test "$am_cv_func_iconv" = yes; then
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
14998 $as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
14999 if ${gl_cv_iconv_nonconst+:} false; then :
15000 $as_echo_n "(cached) " >&6
15001 else
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003 /* end confdefs.h. */
15005 #include <stdlib.h>
15006 #include <iconv.h>
15007 extern
15008 #ifdef __cplusplus
15010 #endif
15011 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
15014 main ()
15018 return 0;
15020 _ACEOF
15021 if ac_fn_c_try_compile "$LINENO"; then :
15022 gl_cv_iconv_nonconst=yes
15023 else
15024 gl_cv_iconv_nonconst=no
15026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
15030 $as_echo "$gl_cv_iconv_nonconst" >&6; }
15031 else
15032 gl_cv_iconv_nonconst=yes
15034 if test $gl_cv_iconv_nonconst = yes; then
15035 iconv_arg1=""
15036 else
15037 iconv_arg1="const"
15040 cat >>confdefs.h <<_ACEOF
15041 #define ICONV_CONST $iconv_arg1
15042 _ACEOF
15046 if test "$am_func_iconv" = yes; then
15047 if test -n "$LIBICONV"; then
15048 am_cv_func_iconv_summary='yes, in libiconv'
15049 else
15050 am_cv_func_iconv_summary='yes, in libc'
15052 else
15053 if test "$am_cv_func_iconv" = yes; then
15054 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
15055 else
15056 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
15060 MAYBE_LIBICONV=
15061 case "$host" in
15062 *linux*)
15063 if test "$am_cv_func_iconv" != yes; then
15064 as_fn_error $? "could not find libiconv (required for host $host)" "$LINENO" 5
15067 MAYBE_LIBICONV="$LIBICONV"
15069 esac
15073 ac_config_files="$ac_config_files Makefile"
15076 cat >confcache <<\_ACEOF
15077 # This file is a shell script that caches the results of configure
15078 # tests run on this system so they can be shared between configure
15079 # scripts and configure runs, see configure's option --config-cache.
15080 # It is not useful on other systems. If it contains results you don't
15081 # want to keep, you may remove or edit it.
15083 # config.status only pays attention to the cache file if you give it
15084 # the --recheck option to rerun configure.
15086 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15087 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15088 # following values.
15090 _ACEOF
15092 # The following way of writing the cache mishandles newlines in values,
15093 # but we know of no workaround that is simple, portable, and efficient.
15094 # So, we kill variables containing newlines.
15095 # Ultrix sh set writes to stderr and can't be redirected directly,
15096 # and sets the high bit in the cache file unless we assign to the vars.
15098 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15099 eval ac_val=\$$ac_var
15100 case $ac_val in #(
15101 *${as_nl}*)
15102 case $ac_var in #(
15103 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15104 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15105 esac
15106 case $ac_var in #(
15107 _ | IFS | as_nl) ;; #(
15108 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15109 *) { eval $ac_var=; unset $ac_var;} ;;
15110 esac ;;
15111 esac
15112 done
15114 (set) 2>&1 |
15115 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15116 *${as_nl}ac_space=\ *)
15117 # `set' does not quote correctly, so add quotes: double-quote
15118 # substitution turns \\\\ into \\, and sed turns \\ into \.
15119 sed -n \
15120 "s/'/'\\\\''/g;
15121 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15122 ;; #(
15124 # `set' quotes correctly as required by POSIX, so do not add quotes.
15125 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15127 esac |
15128 sort
15130 sed '
15131 /^ac_cv_env_/b end
15132 t clear
15133 :clear
15134 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15135 t end
15136 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15137 :end' >>confcache
15138 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15139 if test -w "$cache_file"; then
15140 if test "x$cache_file" != "x/dev/null"; then
15141 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15142 $as_echo "$as_me: updating cache $cache_file" >&6;}
15143 if test ! -f "$cache_file" || test -h "$cache_file"; then
15144 cat confcache >"$cache_file"
15145 else
15146 case $cache_file in #(
15147 */* | ?:*)
15148 mv -f confcache "$cache_file"$$ &&
15149 mv -f "$cache_file"$$ "$cache_file" ;; #(
15151 mv -f confcache "$cache_file" ;;
15152 esac
15155 else
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15157 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15160 rm -f confcache
15162 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15163 # Let make expand exec_prefix.
15164 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15166 DEFS=-DHAVE_CONFIG_H
15168 ac_libobjs=
15169 ac_ltlibobjs=
15171 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15172 # 1. Remove the extension, and $U if already installed.
15173 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15174 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15175 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15176 # will be set to the directory where LIBOBJS objects are built.
15177 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15178 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15179 done
15180 LIBOBJS=$ac_libobjs
15182 LTLIBOBJS=$ac_ltlibobjs
15185 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
15186 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
15187 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15190 : "${CONFIG_STATUS=./config.status}"
15191 ac_write_fail=0
15192 ac_clean_files_save=$ac_clean_files
15193 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15195 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15196 as_write_fail=0
15197 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15198 #! $SHELL
15199 # Generated by $as_me.
15200 # Run this file to recreate the current configuration.
15201 # Compiler output produced by configure, useful for debugging
15202 # configure, is in config.log if it exists.
15204 debug=false
15205 ac_cs_recheck=false
15206 ac_cs_silent=false
15208 SHELL=\${CONFIG_SHELL-$SHELL}
15209 export SHELL
15210 _ASEOF
15211 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15212 ## -------------------- ##
15213 ## M4sh Initialization. ##
15214 ## -------------------- ##
15216 # Be more Bourne compatible
15217 DUALCASE=1; export DUALCASE # for MKS sh
15218 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15219 emulate sh
15220 NULLCMD=:
15221 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15222 # is contrary to our usage. Disable this feature.
15223 alias -g '${1+"$@"}'='"$@"'
15224 setopt NO_GLOB_SUBST
15225 else
15226 case `(set -o) 2>/dev/null` in #(
15227 *posix*) :
15228 set -o posix ;; #(
15229 *) :
15231 esac
15235 as_nl='
15237 export as_nl
15238 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15239 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15240 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15241 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15242 # Prefer a ksh shell builtin over an external printf program on Solaris,
15243 # but without wasting forks for bash or zsh.
15244 if test -z "$BASH_VERSION$ZSH_VERSION" \
15245 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15246 as_echo='print -r --'
15247 as_echo_n='print -rn --'
15248 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15249 as_echo='printf %s\n'
15250 as_echo_n='printf %s'
15251 else
15252 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15253 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15254 as_echo_n='/usr/ucb/echo -n'
15255 else
15256 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15257 as_echo_n_body='eval
15258 arg=$1;
15259 case $arg in #(
15260 *"$as_nl"*)
15261 expr "X$arg" : "X\\(.*\\)$as_nl";
15262 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15263 esac;
15264 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15266 export as_echo_n_body
15267 as_echo_n='sh -c $as_echo_n_body as_echo'
15269 export as_echo_body
15270 as_echo='sh -c $as_echo_body as_echo'
15273 # The user is always right.
15274 if test "${PATH_SEPARATOR+set}" != set; then
15275 PATH_SEPARATOR=:
15276 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15277 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15278 PATH_SEPARATOR=';'
15283 # IFS
15284 # We need space, tab and new line, in precisely that order. Quoting is
15285 # there to prevent editors from complaining about space-tab.
15286 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15287 # splitting by setting IFS to empty value.)
15288 IFS=" "" $as_nl"
15290 # Find who we are. Look in the path if we contain no directory separator.
15291 as_myself=
15292 case $0 in #((
15293 *[\\/]* ) as_myself=$0 ;;
15294 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15295 for as_dir in $PATH
15297 IFS=$as_save_IFS
15298 test -z "$as_dir" && as_dir=.
15299 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15300 done
15301 IFS=$as_save_IFS
15304 esac
15305 # We did not find ourselves, most probably we were run as `sh COMMAND'
15306 # in which case we are not to be found in the path.
15307 if test "x$as_myself" = x; then
15308 as_myself=$0
15310 if test ! -f "$as_myself"; then
15311 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15312 exit 1
15315 # Unset variables that we do not need and which cause bugs (e.g. in
15316 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15317 # suppresses any "Segmentation fault" message there. '((' could
15318 # trigger a bug in pdksh 5.2.14.
15319 for as_var in BASH_ENV ENV MAIL MAILPATH
15320 do eval test x\${$as_var+set} = xset \
15321 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15322 done
15323 PS1='$ '
15324 PS2='> '
15325 PS4='+ '
15327 # NLS nuisances.
15328 LC_ALL=C
15329 export LC_ALL
15330 LANGUAGE=C
15331 export LANGUAGE
15333 # CDPATH.
15334 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15337 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15338 # ----------------------------------------
15339 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15340 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15341 # script with STATUS, using 1 if that was 0.
15342 as_fn_error ()
15344 as_status=$1; test $as_status -eq 0 && as_status=1
15345 if test "$4"; then
15346 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15347 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15349 $as_echo "$as_me: error: $2" >&2
15350 as_fn_exit $as_status
15351 } # as_fn_error
15354 # as_fn_set_status STATUS
15355 # -----------------------
15356 # Set $? to STATUS, without forking.
15357 as_fn_set_status ()
15359 return $1
15360 } # as_fn_set_status
15362 # as_fn_exit STATUS
15363 # -----------------
15364 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15365 as_fn_exit ()
15367 set +e
15368 as_fn_set_status $1
15369 exit $1
15370 } # as_fn_exit
15372 # as_fn_unset VAR
15373 # ---------------
15374 # Portably unset VAR.
15375 as_fn_unset ()
15377 { eval $1=; unset $1;}
15379 as_unset=as_fn_unset
15380 # as_fn_append VAR VALUE
15381 # ----------------------
15382 # Append the text in VALUE to the end of the definition contained in VAR. Take
15383 # advantage of any shell optimizations that allow amortized linear growth over
15384 # repeated appends, instead of the typical quadratic growth present in naive
15385 # implementations.
15386 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15387 eval 'as_fn_append ()
15389 eval $1+=\$2
15391 else
15392 as_fn_append ()
15394 eval $1=\$$1\$2
15396 fi # as_fn_append
15398 # as_fn_arith ARG...
15399 # ------------------
15400 # Perform arithmetic evaluation on the ARGs, and store the result in the
15401 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15402 # must be portable across $(()) and expr.
15403 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15404 eval 'as_fn_arith ()
15406 as_val=$(( $* ))
15408 else
15409 as_fn_arith ()
15411 as_val=`expr "$@" || test $? -eq 1`
15413 fi # as_fn_arith
15416 if expr a : '\(a\)' >/dev/null 2>&1 &&
15417 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15418 as_expr=expr
15419 else
15420 as_expr=false
15423 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15424 as_basename=basename
15425 else
15426 as_basename=false
15429 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15430 as_dirname=dirname
15431 else
15432 as_dirname=false
15435 as_me=`$as_basename -- "$0" ||
15436 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15437 X"$0" : 'X\(//\)$' \| \
15438 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15439 $as_echo X/"$0" |
15440 sed '/^.*\/\([^/][^/]*\)\/*$/{
15441 s//\1/
15444 /^X\/\(\/\/\)$/{
15445 s//\1/
15448 /^X\/\(\/\).*/{
15449 s//\1/
15452 s/.*/./; q'`
15454 # Avoid depending upon Character Ranges.
15455 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15456 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15457 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15458 as_cr_digits='0123456789'
15459 as_cr_alnum=$as_cr_Letters$as_cr_digits
15461 ECHO_C= ECHO_N= ECHO_T=
15462 case `echo -n x` in #(((((
15463 -n*)
15464 case `echo 'xy\c'` in
15465 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15466 xy) ECHO_C='\c';;
15467 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15468 ECHO_T=' ';;
15469 esac;;
15471 ECHO_N='-n';;
15472 esac
15474 rm -f conf$$ conf$$.exe conf$$.file
15475 if test -d conf$$.dir; then
15476 rm -f conf$$.dir/conf$$.file
15477 else
15478 rm -f conf$$.dir
15479 mkdir conf$$.dir 2>/dev/null
15481 if (echo >conf$$.file) 2>/dev/null; then
15482 if ln -s conf$$.file conf$$ 2>/dev/null; then
15483 as_ln_s='ln -s'
15484 # ... but there are two gotchas:
15485 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15486 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15487 # In both cases, we have to default to `cp -pR'.
15488 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15489 as_ln_s='cp -pR'
15490 elif ln conf$$.file conf$$ 2>/dev/null; then
15491 as_ln_s=ln
15492 else
15493 as_ln_s='cp -pR'
15495 else
15496 as_ln_s='cp -pR'
15498 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15499 rmdir conf$$.dir 2>/dev/null
15502 # as_fn_mkdir_p
15503 # -------------
15504 # Create "$as_dir" as a directory, including parents if necessary.
15505 as_fn_mkdir_p ()
15508 case $as_dir in #(
15509 -*) as_dir=./$as_dir;;
15510 esac
15511 test -d "$as_dir" || eval $as_mkdir_p || {
15512 as_dirs=
15513 while :; do
15514 case $as_dir in #(
15515 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15516 *) as_qdir=$as_dir;;
15517 esac
15518 as_dirs="'$as_qdir' $as_dirs"
15519 as_dir=`$as_dirname -- "$as_dir" ||
15520 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15521 X"$as_dir" : 'X\(//\)[^/]' \| \
15522 X"$as_dir" : 'X\(//\)$' \| \
15523 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15524 $as_echo X"$as_dir" |
15525 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15526 s//\1/
15529 /^X\(\/\/\)[^/].*/{
15530 s//\1/
15533 /^X\(\/\/\)$/{
15534 s//\1/
15537 /^X\(\/\).*/{
15538 s//\1/
15541 s/.*/./; q'`
15542 test -d "$as_dir" && break
15543 done
15544 test -z "$as_dirs" || eval "mkdir $as_dirs"
15545 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15548 } # as_fn_mkdir_p
15549 if mkdir -p . 2>/dev/null; then
15550 as_mkdir_p='mkdir -p "$as_dir"'
15551 else
15552 test -d ./-p && rmdir ./-p
15553 as_mkdir_p=false
15557 # as_fn_executable_p FILE
15558 # -----------------------
15559 # Test if FILE is an executable regular file.
15560 as_fn_executable_p ()
15562 test -f "$1" && test -x "$1"
15563 } # as_fn_executable_p
15564 as_test_x='test -x'
15565 as_executable_p=as_fn_executable_p
15567 # Sed expression to map a string onto a valid CPP name.
15568 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15570 # Sed expression to map a string onto a valid variable name.
15571 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15574 exec 6>&1
15575 ## ----------------------------------- ##
15576 ## Main body of $CONFIG_STATUS script. ##
15577 ## ----------------------------------- ##
15578 _ASEOF
15579 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15581 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15582 # Save the log message, to keep $0 and so on meaningful, and to
15583 # report actual input values of CONFIG_FILES etc. instead of their
15584 # values after options handling.
15585 ac_log="
15586 This file was extended by $as_me, which was
15587 generated by GNU Autoconf 2.69. Invocation command line was
15589 CONFIG_FILES = $CONFIG_FILES
15590 CONFIG_HEADERS = $CONFIG_HEADERS
15591 CONFIG_LINKS = $CONFIG_LINKS
15592 CONFIG_COMMANDS = $CONFIG_COMMANDS
15593 $ $0 $@
15595 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15598 _ACEOF
15600 case $ac_config_files in *"
15601 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15602 esac
15604 case $ac_config_headers in *"
15605 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15606 esac
15609 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15610 # Files that config.status was made for.
15611 config_files="$ac_config_files"
15612 config_headers="$ac_config_headers"
15613 config_commands="$ac_config_commands"
15615 _ACEOF
15617 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15618 ac_cs_usage="\
15619 \`$as_me' instantiates files and other configuration actions
15620 from templates according to the current configuration. Unless the files
15621 and actions are specified as TAGs, all are instantiated by default.
15623 Usage: $0 [OPTION]... [TAG]...
15625 -h, --help print this help, then exit
15626 -V, --version print version number and configuration settings, then exit
15627 --config print configuration, then exit
15628 -q, --quiet, --silent
15629 do not print progress messages
15630 -d, --debug don't remove temporary files
15631 --recheck update $as_me by reconfiguring in the same conditions
15632 --file=FILE[:TEMPLATE]
15633 instantiate the configuration file FILE
15634 --header=FILE[:TEMPLATE]
15635 instantiate the configuration header FILE
15637 Configuration files:
15638 $config_files
15640 Configuration headers:
15641 $config_headers
15643 Configuration commands:
15644 $config_commands
15646 Report bugs to the package provider."
15648 _ACEOF
15649 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15650 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15651 ac_cs_version="\\
15652 config.status
15653 configured by $0, generated by GNU Autoconf 2.69,
15654 with options \\"\$ac_cs_config\\"
15656 Copyright (C) 2012 Free Software Foundation, Inc.
15657 This config.status script is free software; the Free Software Foundation
15658 gives unlimited permission to copy, distribute and modify it."
15660 ac_pwd='$ac_pwd'
15661 srcdir='$srcdir'
15662 INSTALL='$INSTALL'
15663 test -n "\$AWK" || AWK=awk
15664 _ACEOF
15666 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15667 # The default lists apply if the user does not specify any file.
15668 ac_need_defaults=:
15669 while test $# != 0
15671 case $1 in
15672 --*=?*)
15673 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15674 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15675 ac_shift=:
15677 --*=)
15678 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15679 ac_optarg=
15680 ac_shift=:
15683 ac_option=$1
15684 ac_optarg=$2
15685 ac_shift=shift
15687 esac
15689 case $ac_option in
15690 # Handling of the options.
15691 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15692 ac_cs_recheck=: ;;
15693 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15694 $as_echo "$ac_cs_version"; exit ;;
15695 --config | --confi | --conf | --con | --co | --c )
15696 $as_echo "$ac_cs_config"; exit ;;
15697 --debug | --debu | --deb | --de | --d | -d )
15698 debug=: ;;
15699 --file | --fil | --fi | --f )
15700 $ac_shift
15701 case $ac_optarg in
15702 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15703 '') as_fn_error $? "missing file argument" ;;
15704 esac
15705 as_fn_append CONFIG_FILES " '$ac_optarg'"
15706 ac_need_defaults=false;;
15707 --header | --heade | --head | --hea )
15708 $ac_shift
15709 case $ac_optarg in
15710 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15711 esac
15712 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15713 ac_need_defaults=false;;
15714 --he | --h)
15715 # Conflict between --help and --header
15716 as_fn_error $? "ambiguous option: \`$1'
15717 Try \`$0 --help' for more information.";;
15718 --help | --hel | -h )
15719 $as_echo "$ac_cs_usage"; exit ;;
15720 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15721 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15722 ac_cs_silent=: ;;
15724 # This is an error.
15725 -*) as_fn_error $? "unrecognized option: \`$1'
15726 Try \`$0 --help' for more information." ;;
15728 *) as_fn_append ac_config_targets " $1"
15729 ac_need_defaults=false ;;
15731 esac
15732 shift
15733 done
15735 ac_configure_extra_args=
15737 if $ac_cs_silent; then
15738 exec 6>/dev/null
15739 ac_configure_extra_args="$ac_configure_extra_args --silent"
15742 _ACEOF
15743 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15744 if \$ac_cs_recheck; then
15745 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15746 shift
15747 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15748 CONFIG_SHELL='$SHELL'
15749 export CONFIG_SHELL
15750 exec "\$@"
15753 _ACEOF
15754 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15755 exec 5>>config.log
15757 echo
15758 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15759 ## Running $as_me. ##
15760 _ASBOX
15761 $as_echo "$ac_log"
15762 } >&5
15764 _ACEOF
15765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15767 # INIT-COMMANDS
15769 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
15770 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
15771 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
15772 # from automake.
15773 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
15774 # Capture the value of LINGUAS because we need it to compute CATALOGS.
15775 LINGUAS="${LINGUAS-%UNSET%}"
15777 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
15779 _ACEOF
15781 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15783 # Handling of arguments.
15784 for ac_config_target in $ac_config_targets
15786 case $ac_config_target in
15787 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15788 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15789 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
15790 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
15791 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15793 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15794 esac
15795 done
15798 # If the user did not use the arguments to specify the items to instantiate,
15799 # then the envvar interface is used. Set only those that are not.
15800 # We use the long form for the default assignment because of an extremely
15801 # bizarre bug on SunOS 4.1.3.
15802 if $ac_need_defaults; then
15803 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15804 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15805 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15808 # Have a temporary directory for convenience. Make it in the build tree
15809 # simply because there is no reason against having it here, and in addition,
15810 # creating and moving files from /tmp can sometimes cause problems.
15811 # Hook for its removal unless debugging.
15812 # Note that there is a small window in which the directory will not be cleaned:
15813 # after its creation but before its name has been assigned to `$tmp'.
15814 $debug ||
15816 tmp= ac_tmp=
15817 trap 'exit_status=$?
15818 : "${ac_tmp:=$tmp}"
15819 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15821 trap 'as_fn_exit 1' 1 2 13 15
15823 # Create a (secure) tmp directory for tmp files.
15826 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15827 test -d "$tmp"
15828 } ||
15830 tmp=./conf$$-$RANDOM
15831 (umask 077 && mkdir "$tmp")
15832 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15833 ac_tmp=$tmp
15835 # Set up the scripts for CONFIG_FILES section.
15836 # No need to generate them if there are no CONFIG_FILES.
15837 # This happens for instance with `./config.status config.h'.
15838 if test -n "$CONFIG_FILES"; then
15841 ac_cr=`echo X | tr X '\015'`
15842 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15843 # But we know of no other shell where ac_cr would be empty at this
15844 # point, so we can use a bashism as a fallback.
15845 if test "x$ac_cr" = x; then
15846 eval ac_cr=\$\'\\r\'
15848 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15849 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15850 ac_cs_awk_cr='\\r'
15851 else
15852 ac_cs_awk_cr=$ac_cr
15855 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15856 _ACEOF
15860 echo "cat >conf$$subs.awk <<_ACEOF" &&
15861 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15862 echo "_ACEOF"
15863 } >conf$$subs.sh ||
15864 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15865 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15866 ac_delim='%!_!# '
15867 for ac_last_try in false false false false false :; do
15868 . ./conf$$subs.sh ||
15869 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15871 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15872 if test $ac_delim_n = $ac_delim_num; then
15873 break
15874 elif $ac_last_try; then
15875 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15876 else
15877 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15879 done
15880 rm -f conf$$subs.sh
15882 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15883 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15884 _ACEOF
15885 sed -n '
15887 s/^/S["/; s/!.*/"]=/
15890 s/^[^!]*!//
15891 :repl
15892 t repl
15893 s/'"$ac_delim"'$//
15894 t delim
15897 s/\(.\{148\}\)..*/\1/
15898 t more1
15899 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15902 b repl
15903 :more1
15904 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15907 s/.\{148\}//
15908 t nl
15909 :delim
15911 s/\(.\{148\}\)..*/\1/
15912 t more2
15913 s/["\\]/\\&/g; s/^/"/; s/$/"/
15916 :more2
15917 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15920 s/.\{148\}//
15921 t delim
15922 ' <conf$$subs.awk | sed '
15923 /^[^""]/{
15925 s/\n//
15927 ' >>$CONFIG_STATUS || ac_write_fail=1
15928 rm -f conf$$subs.awk
15929 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15930 _ACAWK
15931 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15932 for (key in S) S_is_set[key] = 1
15933 FS = "\a"
15937 line = $ 0
15938 nfields = split(line, field, "@")
15939 substed = 0
15940 len = length(field[1])
15941 for (i = 2; i < nfields; i++) {
15942 key = field[i]
15943 keylen = length(key)
15944 if (S_is_set[key]) {
15945 value = S[key]
15946 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15947 len += length(value) + length(field[++i])
15948 substed = 1
15949 } else
15950 len += 1 + keylen
15953 print line
15956 _ACAWK
15957 _ACEOF
15958 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15959 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15960 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15961 else
15963 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15964 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15965 _ACEOF
15967 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15968 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15969 # trailing colons and then remove the whole line if VPATH becomes empty
15970 # (actually we leave an empty line to preserve line numbers).
15971 if test "x$srcdir" = x.; then
15972 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15974 s///
15975 s/^/:/
15976 s/[ ]*$/:/
15977 s/:\$(srcdir):/:/g
15978 s/:\${srcdir}:/:/g
15979 s/:@srcdir@:/:/g
15980 s/^:*//
15981 s/:*$//
15983 s/\(=[ ]*\).*/\1/
15985 s/\n//
15986 s/^[^=]*=[ ]*$//
15990 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15991 fi # test -n "$CONFIG_FILES"
15993 # Set up the scripts for CONFIG_HEADERS section.
15994 # No need to generate them if there are no CONFIG_HEADERS.
15995 # This happens for instance with `./config.status Makefile'.
15996 if test -n "$CONFIG_HEADERS"; then
15997 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15998 BEGIN {
15999 _ACEOF
16001 # Transform confdefs.h into an awk script `defines.awk', embedded as
16002 # here-document in config.status, that substitutes the proper values into
16003 # config.h.in to produce config.h.
16005 # Create a delimiter string that does not exist in confdefs.h, to ease
16006 # handling of long lines.
16007 ac_delim='%!_!# '
16008 for ac_last_try in false false :; do
16009 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16010 if test -z "$ac_tt"; then
16011 break
16012 elif $ac_last_try; then
16013 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16014 else
16015 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16017 done
16019 # For the awk script, D is an array of macro values keyed by name,
16020 # likewise P contains macro parameters if any. Preserve backslash
16021 # newline sequences.
16023 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16024 sed -n '
16025 s/.\{148\}/&'"$ac_delim"'/g
16026 t rset
16027 :rset
16028 s/^[ ]*#[ ]*define[ ][ ]*/ /
16029 t def
16031 :def
16032 s/\\$//
16033 t bsnl
16034 s/["\\]/\\&/g
16035 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16036 D["\1"]=" \3"/p
16037 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16039 :bsnl
16040 s/["\\]/\\&/g
16041 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16042 D["\1"]=" \3\\\\\\n"\\/p
16043 t cont
16044 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16045 t cont
16047 :cont
16049 s/.\{148\}/&'"$ac_delim"'/g
16050 t clear
16051 :clear
16052 s/\\$//
16053 t bsnlc
16054 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16056 :bsnlc
16057 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16058 b cont
16059 ' <confdefs.h | sed '
16060 s/'"$ac_delim"'/"\\\
16061 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16063 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16064 for (key in D) D_is_set[key] = 1
16065 FS = "\a"
16067 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16068 line = \$ 0
16069 split(line, arg, " ")
16070 if (arg[1] == "#") {
16071 defundef = arg[2]
16072 mac1 = arg[3]
16073 } else {
16074 defundef = substr(arg[1], 2)
16075 mac1 = arg[2]
16077 split(mac1, mac2, "(") #)
16078 macro = mac2[1]
16079 prefix = substr(line, 1, index(line, defundef) - 1)
16080 if (D_is_set[macro]) {
16081 # Preserve the white space surrounding the "#".
16082 print prefix "define", macro P[macro] D[macro]
16083 next
16084 } else {
16085 # Replace #undef with comments. This is necessary, for example,
16086 # in the case of _POSIX_SOURCE, which is predefined and required
16087 # on some systems where configure will not decide to define it.
16088 if (defundef == "undef") {
16089 print "/*", prefix defundef, macro, "*/"
16090 next
16094 { print }
16095 _ACAWK
16096 _ACEOF
16097 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16098 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16099 fi # test -n "$CONFIG_HEADERS"
16102 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
16103 shift
16104 for ac_tag
16106 case $ac_tag in
16107 :[FHLC]) ac_mode=$ac_tag; continue;;
16108 esac
16109 case $ac_mode$ac_tag in
16110 :[FHL]*:*);;
16111 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16112 :[FH]-) ac_tag=-:-;;
16113 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16114 esac
16115 ac_save_IFS=$IFS
16116 IFS=:
16117 set x $ac_tag
16118 IFS=$ac_save_IFS
16119 shift
16120 ac_file=$1
16121 shift
16123 case $ac_mode in
16124 :L) ac_source=$1;;
16125 :[FH])
16126 ac_file_inputs=
16127 for ac_f
16129 case $ac_f in
16130 -) ac_f="$ac_tmp/stdin";;
16131 *) # Look for the file first in the build tree, then in the source tree
16132 # (if the path is not absolute). The absolute path cannot be DOS-style,
16133 # because $ac_f cannot contain `:'.
16134 test -f "$ac_f" ||
16135 case $ac_f in
16136 [\\/$]*) false;;
16137 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16138 esac ||
16139 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16140 esac
16141 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16142 as_fn_append ac_file_inputs " '$ac_f'"
16143 done
16145 # Let's still pretend it is `configure' which instantiates (i.e., don't
16146 # use $as_me), people would be surprised to read:
16147 # /* config.h. Generated by config.status. */
16148 configure_input='Generated from '`
16149 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16150 `' by configure.'
16151 if test x"$ac_file" != x-; then
16152 configure_input="$ac_file. $configure_input"
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16154 $as_echo "$as_me: creating $ac_file" >&6;}
16156 # Neutralize special characters interpreted by sed in replacement strings.
16157 case $configure_input in #(
16158 *\&* | *\|* | *\\* )
16159 ac_sed_conf_input=`$as_echo "$configure_input" |
16160 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16161 *) ac_sed_conf_input=$configure_input;;
16162 esac
16164 case $ac_tag in
16165 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16166 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16167 esac
16169 esac
16171 ac_dir=`$as_dirname -- "$ac_file" ||
16172 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16173 X"$ac_file" : 'X\(//\)[^/]' \| \
16174 X"$ac_file" : 'X\(//\)$' \| \
16175 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16176 $as_echo X"$ac_file" |
16177 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16178 s//\1/
16181 /^X\(\/\/\)[^/].*/{
16182 s//\1/
16185 /^X\(\/\/\)$/{
16186 s//\1/
16189 /^X\(\/\).*/{
16190 s//\1/
16193 s/.*/./; q'`
16194 as_dir="$ac_dir"; as_fn_mkdir_p
16195 ac_builddir=.
16197 case "$ac_dir" in
16198 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16200 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16201 # A ".." for each directory in $ac_dir_suffix.
16202 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16203 case $ac_top_builddir_sub in
16204 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16205 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16206 esac ;;
16207 esac
16208 ac_abs_top_builddir=$ac_pwd
16209 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16210 # for backward compatibility:
16211 ac_top_builddir=$ac_top_build_prefix
16213 case $srcdir in
16214 .) # We are building in place.
16215 ac_srcdir=.
16216 ac_top_srcdir=$ac_top_builddir_sub
16217 ac_abs_top_srcdir=$ac_pwd ;;
16218 [\\/]* | ?:[\\/]* ) # Absolute name.
16219 ac_srcdir=$srcdir$ac_dir_suffix;
16220 ac_top_srcdir=$srcdir
16221 ac_abs_top_srcdir=$srcdir ;;
16222 *) # Relative name.
16223 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16224 ac_top_srcdir=$ac_top_build_prefix$srcdir
16225 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16226 esac
16227 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16230 case $ac_mode in
16233 # CONFIG_FILE
16236 case $INSTALL in
16237 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16238 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16239 esac
16240 _ACEOF
16242 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16243 # If the template does not know about datarootdir, expand it.
16244 # FIXME: This hack should be removed a few years after 2.60.
16245 ac_datarootdir_hack=; ac_datarootdir_seen=
16246 ac_sed_dataroot='
16247 /datarootdir/ {
16251 /@datadir@/p
16252 /@docdir@/p
16253 /@infodir@/p
16254 /@localedir@/p
16255 /@mandir@/p'
16256 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16257 *datarootdir*) ac_datarootdir_seen=yes;;
16258 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16260 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16261 _ACEOF
16262 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16263 ac_datarootdir_hack='
16264 s&@datadir@&$datadir&g
16265 s&@docdir@&$docdir&g
16266 s&@infodir@&$infodir&g
16267 s&@localedir@&$localedir&g
16268 s&@mandir@&$mandir&g
16269 s&\\\${datarootdir}&$datarootdir&g' ;;
16270 esac
16271 _ACEOF
16273 # Neutralize VPATH when `$srcdir' = `.'.
16274 # Shell code in configure.ac might set extrasub.
16275 # FIXME: do we really want to maintain this feature?
16276 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16277 ac_sed_extra="$ac_vpsub
16278 $extrasub
16279 _ACEOF
16280 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16282 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16283 s|@configure_input@|$ac_sed_conf_input|;t t
16284 s&@top_builddir@&$ac_top_builddir_sub&;t t
16285 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16286 s&@srcdir@&$ac_srcdir&;t t
16287 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16288 s&@top_srcdir@&$ac_top_srcdir&;t t
16289 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16290 s&@builddir@&$ac_builddir&;t t
16291 s&@abs_builddir@&$ac_abs_builddir&;t t
16292 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16293 s&@INSTALL@&$ac_INSTALL&;t t
16294 $ac_datarootdir_hack
16296 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16297 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16299 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16300 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16301 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16302 "$ac_tmp/out"`; test -z "$ac_out"; } &&
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16304 which seems to be undefined. Please make sure it is defined" >&5
16305 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16306 which seems to be undefined. Please make sure it is defined" >&2;}
16308 rm -f "$ac_tmp/stdin"
16309 case $ac_file in
16310 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16311 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16312 esac \
16313 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16317 # CONFIG_HEADER
16319 if test x"$ac_file" != x-; then
16321 $as_echo "/* $configure_input */" \
16322 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16323 } >"$ac_tmp/config.h" \
16324 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16325 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16327 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16328 else
16329 rm -f "$ac_file"
16330 mv "$ac_tmp/config.h" "$ac_file" \
16331 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16333 else
16334 $as_echo "/* $configure_input */" \
16335 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16336 || as_fn_error $? "could not create -" "$LINENO" 5
16340 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16341 $as_echo "$as_me: executing $ac_file commands" >&6;}
16343 esac
16346 case $ac_file$ac_mode in
16347 "config.h":H) echo > stamp-h ;;
16348 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16349 "default-1":C)
16350 for ac_file in $CONFIG_FILES; do
16351 # Support "outfile[:infile[:infile...]]"
16352 case "$ac_file" in
16353 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16354 esac
16355 # PO directories have a Makefile.in generated from Makefile.in.in.
16356 case "$ac_file" in */Makefile.in)
16357 # Adjust a relative srcdir.
16358 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16359 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
16360 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16361 # In autoconf-2.13 it is called $ac_given_srcdir.
16362 # In autoconf-2.50 it is called $srcdir.
16363 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16364 case "$ac_given_srcdir" in
16365 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16366 /*) top_srcdir="$ac_given_srcdir" ;;
16367 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
16368 esac
16369 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16370 rm -f "$ac_dir/POTFILES"
16371 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16372 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
16373 POMAKEFILEDEPS="POTFILES.in"
16374 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
16375 # on $ac_dir but don't depend on user-specified configuration
16376 # parameters.
16377 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
16378 # The LINGUAS file contains the set of available languages.
16379 if test -n "$OBSOLETE_ALL_LINGUAS"; then
16380 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
16382 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
16383 # Hide the ALL_LINGUAS assigment from automake.
16384 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
16385 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
16386 else
16387 # The set of available languages was given in configure.ac.
16388 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
16390 case "$ac_given_srcdir" in
16391 .) srcdirpre= ;;
16392 *) srcdirpre='$(srcdir)/' ;;
16393 esac
16394 POFILES=
16395 GMOFILES=
16396 UPDATEPOFILES=
16397 DUMMYPOFILES=
16398 for lang in $ALL_LINGUAS; do
16399 POFILES="$POFILES $srcdirpre$lang.po"
16400 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
16401 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
16402 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
16403 done
16404 # CATALOGS depends on both $ac_dir and the user's LINGUAS
16405 # environment variable.
16406 INST_LINGUAS=
16407 if test -n "$ALL_LINGUAS"; then
16408 for presentlang in $ALL_LINGUAS; do
16409 useit=no
16410 if test "%UNSET%" != "$LINGUAS"; then
16411 desiredlanguages="$LINGUAS"
16412 else
16413 desiredlanguages="$ALL_LINGUAS"
16415 for desiredlang in $desiredlanguages; do
16416 # Use the presentlang catalog if desiredlang is
16417 # a. equal to presentlang, or
16418 # b. a variant of presentlang (because in this case,
16419 # presentlang can be used as a fallback for messages
16420 # which are not translated in the desiredlang catalog).
16421 case "$desiredlang" in
16422 "$presentlang"*) useit=yes;;
16423 esac
16424 done
16425 if test $useit = yes; then
16426 INST_LINGUAS="$INST_LINGUAS $presentlang"
16428 done
16430 CATALOGS=
16431 if test -n "$INST_LINGUAS"; then
16432 for lang in $INST_LINGUAS; do
16433 CATALOGS="$CATALOGS $lang.gmo"
16434 done
16436 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
16437 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"
16438 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
16439 if test -f "$f"; then
16440 case "$f" in
16441 *.orig | *.bak | *~) ;;
16442 *) cat "$f" >> "$ac_dir/Makefile" ;;
16443 esac
16445 done
16448 esac
16449 done ;;
16450 "gdbdepdir":C)
16451 for subdir in ${CONFIG_SRC_SUBDIR}
16453 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
16454 done ;;
16456 esac
16457 done # for ac_tag
16460 as_fn_exit 0
16461 _ACEOF
16462 ac_clean_files=$ac_clean_files_save
16464 test $ac_write_fail = 0 ||
16465 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16468 # configure is writing to config.log, and then calls config.status.
16469 # config.status does its own redirection, appending to config.log.
16470 # Unfortunately, on DOS this fails, as config.log is still kept open
16471 # by configure, so config.status won't be able to write to it; its
16472 # output is simply discarded. So we exec the FD to /dev/null,
16473 # effectively closing config.log, so it can be properly (re)opened and
16474 # appended to by config.status. When coming back to configure, we
16475 # need to make the FD available again.
16476 if test "$no_create" != yes; then
16477 ac_cs_success=:
16478 ac_config_status_args=
16479 test "$silent" = yes &&
16480 ac_config_status_args="$ac_config_status_args --quiet"
16481 exec 5>/dev/null
16482 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16483 exec 5>>config.log
16484 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16485 # would make configure fail if this is the last instruction.
16486 $ac_cs_success || as_fn_exit 1
16488 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16490 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}