]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbsupport/configure
Specialize std::hash for ptid_t
[thirdparty/binutils-gdb.git] / gdbsupport / configure
CommitLineData
01027315
TT
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for gdbsupport 1.0.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if 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
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_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.
43if 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 --'
47elif (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'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
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
100IFS=$as_save_IFS
101
102 ;;
103esac
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.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $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
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160if 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
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -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
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
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
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $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
257exit 255
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271 fi
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422else
423 as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428else
429 as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534else
535 as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME='gdbsupport'
579PACKAGE_TARNAME='gdbsupport'
580PACKAGE_VERSION='1.0'
581PACKAGE_STRING='gdbsupport 1.0'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585ac_unique_file="common-defs.h"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600# include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
05ea2a05 622ac_header_list=
01027315
TT
623ac_subst_vars='am__EXEEXT_FALSE
624am__EXEEXT_TRUE
625LTLIBOBJS
626LIBOBJS
171fba11 627CONFIG_STATUS_DEPENDENCIES
629c2962
SM
628WERROR_CFLAGS
629WARN_CFLAGS
ea3e7446
JB
630HAVE_PIPE_OR_PIPE2_FALSE
631HAVE_PIPE_OR_PIPE2_TRUE
01027315
TT
632SELFTEST_FALSE
633SELFTEST_TRUE
8b35ed1f
SM
634LTLIBXXHASH
635LIBXXHASH
636HAVE_LIBXXHASH
05ea2a05
TT
637LTLIBIPT
638LIBIPT
639HAVE_LIBIPT
01027315
TT
640PTHREAD_CFLAGS
641PTHREAD_LIBS
642PTHREAD_CC
643ax_pthread_config
644SED
645ALLOCA
646CATOBJEXT
647GENCAT
648INSTOBJEXT
649DATADIRNAME
650CATALOGS
651POSUB
652GMSGFMT
653XGETTEXT
654INCINTL
655LIBINTL_DEP
656LIBINTL
657USE_NLS
658CXX_DIALECT
659HAVE_CXX11
c8693053 660LARGEFILE_CPPFLAGS
01027315
TT
661EGREP
662GREP
663CPP
664RANLIB
665am__fastdepCXX_FALSE
666am__fastdepCXX_TRUE
667CXXDEPMODE
668ac_ct_CXX
669CXXFLAGS
670CXX
671am__fastdepCC_FALSE
672am__fastdepCC_TRUE
673CCDEPMODE
674am__nodep
675AMDEPBACKSLASH
676AMDEP_FALSE
677AMDEP_TRUE
678am__quote
679am__include
680DEPDIR
681OBJEXT
682EXEEXT
683ac_ct_CC
684CPPFLAGS
685LDFLAGS
686CFLAGS
687CC
688AM_BACKSLASH
689AM_DEFAULT_VERBOSITY
690AM_DEFAULT_V
691AM_V
692am__untar
693am__tar
694AMTAR
695am__leading_dot
696SET_MAKE
697AWK
698mkdir_p
699MKDIR_P
700INSTALL_STRIP_PROGRAM
701STRIP
702install_sh
703MAKEINFO
704AUTOHEADER
705AUTOMAKE
706AUTOCONF
707ACLOCAL
708VERSION
709PACKAGE
710CYGPATH_W
711am__isrc
712INSTALL_DATA
713INSTALL_SCRIPT
714INSTALL_PROGRAM
715MAINT
716MAINTAINER_MODE_FALSE
717MAINTAINER_MODE_TRUE
718target_os
719target_vendor
720target_cpu
721target
722host_os
723host_vendor
724host_cpu
725host
726build_os
727build_vendor
728build_cpu
729build
730target_alias
731host_alias
732build_alias
733LIBS
734ECHO_T
735ECHO_N
736ECHO_C
737DEFS
738mandir
739localedir
740libdir
741psdir
742pdfdir
743dvidir
744htmldir
745infodir
746docdir
747oldincludedir
748includedir
749localstatedir
750sharedstatedir
751sysconfdir
752datadir
753datarootdir
754libexecdir
755sbindir
756bindir
757program_transform_name
758prefix
759exec_prefix
760PACKAGE_URL
761PACKAGE_BUGREPORT
762PACKAGE_STRING
763PACKAGE_VERSION
764PACKAGE_TARNAME
765PACKAGE_NAME
766PATH_SEPARATOR
767SHELL'
768ac_subst_files=''
769ac_user_opts='
770enable_option_checking
771enable_maintainer_mode
772enable_silent_rules
773enable_dependency_tracking
774enable_plugins
775enable_largefile
261b0748 776enable_threading
05ea2a05
TT
777with_intel_pt
778with_gnu_ld
779enable_rpath
780with_libipt_prefix
9f1528a1 781with_libipt_type
8b35ed1f
SM
782with_xxhash
783with_libxxhash_prefix
784with_libxxhash_type
01027315 785enable_unit_tests
629c2962
SM
786enable_werror
787enable_build_warnings
788enable_gdb_build_warnings
01027315
TT
789'
790 ac_precious_vars='build_alias
791host_alias
792target_alias
793CC
794CFLAGS
795LDFLAGS
796LIBS
797CPPFLAGS
798CXX
799CXXFLAGS
800CCC
801CPP'
802
803
804# Initialize some variables set by options.
805ac_init_help=
806ac_init_version=false
807ac_unrecognized_opts=
808ac_unrecognized_sep=
809# The variables have the same names as the options, with
810# dashes changed to underlines.
811cache_file=/dev/null
812exec_prefix=NONE
813no_create=
814no_recursion=
815prefix=NONE
816program_prefix=NONE
817program_suffix=NONE
818program_transform_name=s,x,x,
819silent=
820site=
821srcdir=
822verbose=
823x_includes=NONE
824x_libraries=NONE
825
826# Installation directory options.
827# These are left unexpanded so users can "make install exec_prefix=/foo"
828# and all the variables that are supposed to be based on exec_prefix
829# by default will actually change.
830# Use braces instead of parens because sh, perl, etc. also accept them.
831# (The list follows the same order as the GNU Coding Standards.)
832bindir='${exec_prefix}/bin'
833sbindir='${exec_prefix}/sbin'
834libexecdir='${exec_prefix}/libexec'
835datarootdir='${prefix}/share'
836datadir='${datarootdir}'
837sysconfdir='${prefix}/etc'
838sharedstatedir='${prefix}/com'
839localstatedir='${prefix}/var'
840includedir='${prefix}/include'
841oldincludedir='/usr/include'
842docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
843infodir='${datarootdir}/info'
844htmldir='${docdir}'
845dvidir='${docdir}'
846pdfdir='${docdir}'
847psdir='${docdir}'
848libdir='${exec_prefix}/lib'
849localedir='${datarootdir}/locale'
850mandir='${datarootdir}/man'
851
852ac_prev=
853ac_dashdash=
854for ac_option
855do
856 # If the previous option needs an argument, assign it.
857 if test -n "$ac_prev"; then
858 eval $ac_prev=\$ac_option
859 ac_prev=
860 continue
861 fi
862
863 case $ac_option in
864 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
865 *=) ac_optarg= ;;
866 *) ac_optarg=yes ;;
867 esac
868
869 # Accept the important Cygnus configure options, so we can diagnose typos.
870
871 case $ac_dashdash$ac_option in
872 --)
873 ac_dashdash=yes ;;
874
875 -bindir | --bindir | --bindi | --bind | --bin | --bi)
876 ac_prev=bindir ;;
877 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
878 bindir=$ac_optarg ;;
879
880 -build | --build | --buil | --bui | --bu)
881 ac_prev=build_alias ;;
882 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
883 build_alias=$ac_optarg ;;
884
885 -cache-file | --cache-file | --cache-fil | --cache-fi \
886 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
887 ac_prev=cache_file ;;
888 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
889 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
890 cache_file=$ac_optarg ;;
891
892 --config-cache | -C)
893 cache_file=config.cache ;;
894
895 -datadir | --datadir | --datadi | --datad)
896 ac_prev=datadir ;;
897 -datadir=* | --datadir=* | --datadi=* | --datad=*)
898 datadir=$ac_optarg ;;
899
900 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
901 | --dataroo | --dataro | --datar)
902 ac_prev=datarootdir ;;
903 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
904 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
905 datarootdir=$ac_optarg ;;
906
907 -disable-* | --disable-*)
908 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
909 # Reject names that are not valid shell variable names.
910 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
911 as_fn_error $? "invalid feature name: $ac_useropt"
912 ac_useropt_orig=$ac_useropt
913 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
914 case $ac_user_opts in
915 *"
916"enable_$ac_useropt"
917"*) ;;
918 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
919 ac_unrecognized_sep=', ';;
920 esac
921 eval enable_$ac_useropt=no ;;
922
923 -docdir | --docdir | --docdi | --doc | --do)
924 ac_prev=docdir ;;
925 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
926 docdir=$ac_optarg ;;
927
928 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
929 ac_prev=dvidir ;;
930 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
931 dvidir=$ac_optarg ;;
932
933 -enable-* | --enable-*)
934 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
935 # Reject names that are not valid shell variable names.
936 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
937 as_fn_error $? "invalid feature name: $ac_useropt"
938 ac_useropt_orig=$ac_useropt
939 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
940 case $ac_user_opts in
941 *"
942"enable_$ac_useropt"
943"*) ;;
944 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
945 ac_unrecognized_sep=', ';;
946 esac
947 eval enable_$ac_useropt=\$ac_optarg ;;
948
949 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
950 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
951 | --exec | --exe | --ex)
952 ac_prev=exec_prefix ;;
953 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
954 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
955 | --exec=* | --exe=* | --ex=*)
956 exec_prefix=$ac_optarg ;;
957
958 -gas | --gas | --ga | --g)
959 # Obsolete; use --with-gas.
960 with_gas=yes ;;
961
962 -help | --help | --hel | --he | -h)
963 ac_init_help=long ;;
964 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
965 ac_init_help=recursive ;;
966 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
967 ac_init_help=short ;;
968
969 -host | --host | --hos | --ho)
970 ac_prev=host_alias ;;
971 -host=* | --host=* | --hos=* | --ho=*)
972 host_alias=$ac_optarg ;;
973
974 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
975 ac_prev=htmldir ;;
976 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
977 | --ht=*)
978 htmldir=$ac_optarg ;;
979
980 -includedir | --includedir | --includedi | --included | --include \
981 | --includ | --inclu | --incl | --inc)
982 ac_prev=includedir ;;
983 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
984 | --includ=* | --inclu=* | --incl=* | --inc=*)
985 includedir=$ac_optarg ;;
986
987 -infodir | --infodir | --infodi | --infod | --info | --inf)
988 ac_prev=infodir ;;
989 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
990 infodir=$ac_optarg ;;
991
992 -libdir | --libdir | --libdi | --libd)
993 ac_prev=libdir ;;
994 -libdir=* | --libdir=* | --libdi=* | --libd=*)
995 libdir=$ac_optarg ;;
996
997 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
998 | --libexe | --libex | --libe)
999 ac_prev=libexecdir ;;
1000 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1001 | --libexe=* | --libex=* | --libe=*)
1002 libexecdir=$ac_optarg ;;
1003
1004 -localedir | --localedir | --localedi | --localed | --locale)
1005 ac_prev=localedir ;;
1006 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1007 localedir=$ac_optarg ;;
1008
1009 -localstatedir | --localstatedir | --localstatedi | --localstated \
1010 | --localstate | --localstat | --localsta | --localst | --locals)
1011 ac_prev=localstatedir ;;
1012 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1013 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1014 localstatedir=$ac_optarg ;;
1015
1016 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1017 ac_prev=mandir ;;
1018 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1019 mandir=$ac_optarg ;;
1020
1021 -nfp | --nfp | --nf)
1022 # Obsolete; use --without-fp.
1023 with_fp=no ;;
1024
1025 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1026 | --no-cr | --no-c | -n)
1027 no_create=yes ;;
1028
1029 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1030 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1031 no_recursion=yes ;;
1032
1033 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1034 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1035 | --oldin | --oldi | --old | --ol | --o)
1036 ac_prev=oldincludedir ;;
1037 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1038 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1039 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1040 oldincludedir=$ac_optarg ;;
1041
1042 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1043 ac_prev=prefix ;;
1044 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1045 prefix=$ac_optarg ;;
1046
1047 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1048 | --program-pre | --program-pr | --program-p)
1049 ac_prev=program_prefix ;;
1050 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1051 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1052 program_prefix=$ac_optarg ;;
1053
1054 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1055 | --program-suf | --program-su | --program-s)
1056 ac_prev=program_suffix ;;
1057 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1058 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1059 program_suffix=$ac_optarg ;;
1060
1061 -program-transform-name | --program-transform-name \
1062 | --program-transform-nam | --program-transform-na \
1063 | --program-transform-n | --program-transform- \
1064 | --program-transform | --program-transfor \
1065 | --program-transfo | --program-transf \
1066 | --program-trans | --program-tran \
1067 | --progr-tra | --program-tr | --program-t)
1068 ac_prev=program_transform_name ;;
1069 -program-transform-name=* | --program-transform-name=* \
1070 | --program-transform-nam=* | --program-transform-na=* \
1071 | --program-transform-n=* | --program-transform-=* \
1072 | --program-transform=* | --program-transfor=* \
1073 | --program-transfo=* | --program-transf=* \
1074 | --program-trans=* | --program-tran=* \
1075 | --progr-tra=* | --program-tr=* | --program-t=*)
1076 program_transform_name=$ac_optarg ;;
1077
1078 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1079 ac_prev=pdfdir ;;
1080 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1081 pdfdir=$ac_optarg ;;
1082
1083 -psdir | --psdir | --psdi | --psd | --ps)
1084 ac_prev=psdir ;;
1085 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1086 psdir=$ac_optarg ;;
1087
1088 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1089 | -silent | --silent | --silen | --sile | --sil)
1090 silent=yes ;;
1091
1092 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1093 ac_prev=sbindir ;;
1094 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1095 | --sbi=* | --sb=*)
1096 sbindir=$ac_optarg ;;
1097
1098 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1099 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1100 | --sharedst | --shareds | --shared | --share | --shar \
1101 | --sha | --sh)
1102 ac_prev=sharedstatedir ;;
1103 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1104 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1105 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1106 | --sha=* | --sh=*)
1107 sharedstatedir=$ac_optarg ;;
1108
1109 -site | --site | --sit)
1110 ac_prev=site ;;
1111 -site=* | --site=* | --sit=*)
1112 site=$ac_optarg ;;
1113
1114 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1115 ac_prev=srcdir ;;
1116 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1117 srcdir=$ac_optarg ;;
1118
1119 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1120 | --syscon | --sysco | --sysc | --sys | --sy)
1121 ac_prev=sysconfdir ;;
1122 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1123 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1124 sysconfdir=$ac_optarg ;;
1125
1126 -target | --target | --targe | --targ | --tar | --ta | --t)
1127 ac_prev=target_alias ;;
1128 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1129 target_alias=$ac_optarg ;;
1130
1131 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1132 verbose=yes ;;
1133
1134 -version | --version | --versio | --versi | --vers | -V)
1135 ac_init_version=: ;;
1136
1137 -with-* | --with-*)
1138 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1139 # Reject names that are not valid shell variable names.
1140 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141 as_fn_error $? "invalid package name: $ac_useropt"
1142 ac_useropt_orig=$ac_useropt
1143 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1144 case $ac_user_opts in
1145 *"
1146"with_$ac_useropt"
1147"*) ;;
1148 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1149 ac_unrecognized_sep=', ';;
1150 esac
1151 eval with_$ac_useropt=\$ac_optarg ;;
1152
1153 -without-* | --without-*)
1154 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1155 # Reject names that are not valid shell variable names.
1156 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1157 as_fn_error $? "invalid package name: $ac_useropt"
1158 ac_useropt_orig=$ac_useropt
1159 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160 case $ac_user_opts in
1161 *"
1162"with_$ac_useropt"
1163"*) ;;
1164 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1165 ac_unrecognized_sep=', ';;
1166 esac
1167 eval with_$ac_useropt=no ;;
1168
1169 --x)
1170 # Obsolete; use --with-x.
1171 with_x=yes ;;
1172
1173 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1174 | --x-incl | --x-inc | --x-in | --x-i)
1175 ac_prev=x_includes ;;
1176 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1177 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1178 x_includes=$ac_optarg ;;
1179
1180 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1181 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1182 ac_prev=x_libraries ;;
1183 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1184 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1185 x_libraries=$ac_optarg ;;
1186
1187 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1188Try \`$0 --help' for more information"
1189 ;;
1190
1191 *=*)
1192 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1193 # Reject names that are not valid shell variable names.
1194 case $ac_envvar in #(
1195 '' | [0-9]* | *[!_$as_cr_alnum]* )
1196 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1197 esac
1198 eval $ac_envvar=\$ac_optarg
1199 export $ac_envvar ;;
1200
1201 *)
1202 # FIXME: should be removed in autoconf 3.0.
1203 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1204 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1205 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1206 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1207 ;;
1208
1209 esac
1210done
1211
1212if test -n "$ac_prev"; then
1213 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1214 as_fn_error $? "missing argument to $ac_option"
1215fi
1216
1217if test -n "$ac_unrecognized_opts"; then
1218 case $enable_option_checking in
1219 no) ;;
1220 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1221 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1222 esac
1223fi
1224
1225# Check all directory arguments for consistency.
1226for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1227 datadir sysconfdir sharedstatedir localstatedir includedir \
1228 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1229 libdir localedir mandir
1230do
1231 eval ac_val=\$$ac_var
1232 # Remove trailing slashes.
1233 case $ac_val in
1234 */ )
1235 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1236 eval $ac_var=\$ac_val;;
1237 esac
1238 # Be sure to have absolute directory names.
1239 case $ac_val in
1240 [\\/$]* | ?:[\\/]* ) continue;;
1241 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1242 esac
1243 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1244done
1245
1246# There might be people who depend on the old broken behavior: `$host'
1247# used to hold the argument of --host etc.
1248# FIXME: To remove some day.
1249build=$build_alias
1250host=$host_alias
1251target=$target_alias
1252
1253# FIXME: To remove some day.
1254if test "x$host_alias" != x; then
1255 if test "x$build_alias" = x; then
1256 cross_compiling=maybe
1257 elif test "x$build_alias" != "x$host_alias"; then
1258 cross_compiling=yes
1259 fi
1260fi
1261
1262ac_tool_prefix=
1263test -n "$host_alias" && ac_tool_prefix=$host_alias-
1264
1265test "$silent" = yes && exec 6>/dev/null
1266
1267
1268ac_pwd=`pwd` && test -n "$ac_pwd" &&
1269ac_ls_di=`ls -di .` &&
1270ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1271 as_fn_error $? "working directory cannot be determined"
1272test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1273 as_fn_error $? "pwd does not report name of working directory"
1274
1275
1276# Find the source files, if location was not specified.
1277if test -z "$srcdir"; then
1278 ac_srcdir_defaulted=yes
1279 # Try the directory containing this script, then the parent directory.
1280 ac_confdir=`$as_dirname -- "$as_myself" ||
1281$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1282 X"$as_myself" : 'X\(//\)[^/]' \| \
1283 X"$as_myself" : 'X\(//\)$' \| \
1284 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1285$as_echo X"$as_myself" |
1286 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1287 s//\1/
1288 q
1289 }
1290 /^X\(\/\/\)[^/].*/{
1291 s//\1/
1292 q
1293 }
1294 /^X\(\/\/\)$/{
1295 s//\1/
1296 q
1297 }
1298 /^X\(\/\).*/{
1299 s//\1/
1300 q
1301 }
1302 s/.*/./; q'`
1303 srcdir=$ac_confdir
1304 if test ! -r "$srcdir/$ac_unique_file"; then
1305 srcdir=..
1306 fi
1307else
1308 ac_srcdir_defaulted=no
1309fi
1310if test ! -r "$srcdir/$ac_unique_file"; then
1311 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1312 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1313fi
1314ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1315ac_abs_confdir=`(
1316 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1317 pwd)`
1318# When building in place, set srcdir=.
1319if test "$ac_abs_confdir" = "$ac_pwd"; then
1320 srcdir=.
1321fi
1322# Remove unnecessary trailing slashes from srcdir.
1323# Double slashes in file names in object file debugging info
1324# mess up M-x gdb in Emacs.
1325case $srcdir in
1326*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1327esac
1328for ac_var in $ac_precious_vars; do
1329 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1330 eval ac_env_${ac_var}_value=\$${ac_var}
1331 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1332 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1333done
1334
1335#
1336# Report the --help message.
1337#
1338if test "$ac_init_help" = "long"; then
1339 # Omit some internal or obsolete options to make the list less imposing.
1340 # This message is too long to be a string in the A/UX 3.1 sh.
1341 cat <<_ACEOF
1342\`configure' configures gdbsupport 1.0 to adapt to many kinds of systems.
1343
1344Usage: $0 [OPTION]... [VAR=VALUE]...
1345
1346To assign environment variables (e.g., CC, CFLAGS...), specify them as
1347VAR=VALUE. See below for descriptions of some of the useful variables.
1348
1349Defaults for the options are specified in brackets.
1350
1351Configuration:
1352 -h, --help display this help and exit
1353 --help=short display options specific to this package
1354 --help=recursive display the short help of all the included packages
1355 -V, --version display version information and exit
1356 -q, --quiet, --silent do not print \`checking ...' messages
1357 --cache-file=FILE cache test results in FILE [disabled]
1358 -C, --config-cache alias for \`--cache-file=config.cache'
1359 -n, --no-create do not create output files
1360 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1361
1362Installation directories:
1363 --prefix=PREFIX install architecture-independent files in PREFIX
1364 [$ac_default_prefix]
1365 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1366 [PREFIX]
1367
1368By default, \`make install' will install all the files in
1369\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1370an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1371for instance \`--prefix=\$HOME'.
1372
1373For better control, use the options below.
1374
1375Fine tuning of the installation directories:
1376 --bindir=DIR user executables [EPREFIX/bin]
1377 --sbindir=DIR system admin executables [EPREFIX/sbin]
1378 --libexecdir=DIR program executables [EPREFIX/libexec]
1379 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1380 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1381 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1382 --libdir=DIR object code libraries [EPREFIX/lib]
1383 --includedir=DIR C header files [PREFIX/include]
1384 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1385 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1386 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1387 --infodir=DIR info documentation [DATAROOTDIR/info]
1388 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1389 --mandir=DIR man documentation [DATAROOTDIR/man]
1390 --docdir=DIR documentation root [DATAROOTDIR/doc/gdbsupport]
1391 --htmldir=DIR html documentation [DOCDIR]
1392 --dvidir=DIR dvi documentation [DOCDIR]
1393 --pdfdir=DIR pdf documentation [DOCDIR]
1394 --psdir=DIR ps documentation [DOCDIR]
1395_ACEOF
1396
1397 cat <<\_ACEOF
1398
1399Program names:
1400 --program-prefix=PREFIX prepend PREFIX to installed program names
1401 --program-suffix=SUFFIX append SUFFIX to installed program names
1402 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1403
1404System types:
1405 --build=BUILD configure for building on BUILD [guessed]
1406 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1407 --target=TARGET configure for building compilers for TARGET [HOST]
1408_ACEOF
1409fi
1410
1411if test -n "$ac_init_help"; then
1412 case $ac_init_help in
1413 short | recursive ) echo "Configuration of gdbsupport 1.0:";;
1414 esac
1415 cat <<\_ACEOF
1416
1417Optional Features:
1418 --disable-option-checking ignore unrecognized --enable/--with options
1419 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1420 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1421 --enable-maintainer-mode
1422 enable make rules and dependencies not useful (and
1423 sometimes confusing) to the casual installer
1424 --enable-silent-rules less verbose build output (undo: "make V=1")
1425 --disable-silent-rules verbose build output (undo: "make V=0")
1426 --enable-dependency-tracking
1427 do not reject slow dependency extractors
1428 --disable-dependency-tracking
1429 speeds up one-time build
1430 --enable-plugins Enable support for plugins
1431 --disable-largefile omit support for large files
261b0748
LM
1432 --enable-threading include support for parallel processing of data
1433 (yes/no)
05ea2a05 1434 --disable-rpath do not hardcode runtime library paths
01027315
TT
1435 --enable-unit-tests Enable the inclusion of unit tests when compiling
1436 GDB
629c2962
SM
1437 --enable-werror treat compile warnings as errors
1438 --enable-build-warnings enable build-time compiler warnings if gcc is used
1439 --enable-gdb-build-warnings
1440 enable GDB specific build-time compiler warnings if
1441 gcc is used
01027315 1442
05ea2a05
TT
1443Optional Packages:
1444 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1445 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1446 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1447 --with-gnu-ld assume the C compiler uses GNU ld default=no
1448 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1449 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1450 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
8b35ed1f
SM
1451 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1452 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1453 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1454 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
05ea2a05 1455
01027315
TT
1456Some influential environment variables:
1457 CC C compiler command
1458 CFLAGS C compiler flags
1459 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1460 nonstandard directory <lib dir>
1461 LIBS libraries to pass to the linker, e.g. -l<library>
1462 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1463 you have headers in a nonstandard directory <include dir>
1464 CXX C++ compiler command
1465 CXXFLAGS C++ compiler flags
1466 CPP C preprocessor
1467
1468Use these variables to override the choices made by `configure' or to help
1469it to find libraries and programs with nonstandard names/locations.
1470
1471Report bugs to the package provider.
1472_ACEOF
1473ac_status=$?
1474fi
1475
1476if test "$ac_init_help" = "recursive"; then
1477 # If there are subdirs, report their specific --help.
1478 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1479 test -d "$ac_dir" ||
1480 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1481 continue
1482 ac_builddir=.
1483
1484case "$ac_dir" in
1485.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1486*)
1487 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1488 # A ".." for each directory in $ac_dir_suffix.
1489 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1490 case $ac_top_builddir_sub in
1491 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1492 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1493 esac ;;
1494esac
1495ac_abs_top_builddir=$ac_pwd
1496ac_abs_builddir=$ac_pwd$ac_dir_suffix
1497# for backward compatibility:
1498ac_top_builddir=$ac_top_build_prefix
1499
1500case $srcdir in
1501 .) # We are building in place.
1502 ac_srcdir=.
1503 ac_top_srcdir=$ac_top_builddir_sub
1504 ac_abs_top_srcdir=$ac_pwd ;;
1505 [\\/]* | ?:[\\/]* ) # Absolute name.
1506 ac_srcdir=$srcdir$ac_dir_suffix;
1507 ac_top_srcdir=$srcdir
1508 ac_abs_top_srcdir=$srcdir ;;
1509 *) # Relative name.
1510 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1511 ac_top_srcdir=$ac_top_build_prefix$srcdir
1512 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1513esac
1514ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1515
1516 cd "$ac_dir" || { ac_status=$?; continue; }
1517 # Check for guested configure.
1518 if test -f "$ac_srcdir/configure.gnu"; then
1519 echo &&
1520 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1521 elif test -f "$ac_srcdir/configure"; then
1522 echo &&
1523 $SHELL "$ac_srcdir/configure" --help=recursive
1524 else
1525 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1526 fi || ac_status=$?
1527 cd "$ac_pwd" || { ac_status=$?; break; }
1528 done
1529fi
1530
1531test -n "$ac_init_help" && exit $ac_status
1532if $ac_init_version; then
1533 cat <<\_ACEOF
1534gdbsupport configure 1.0
1535generated by GNU Autoconf 2.69
1536
1537Copyright (C) 2012 Free Software Foundation, Inc.
1538This configure script is free software; the Free Software Foundation
1539gives unlimited permission to copy, distribute and modify it.
1540_ACEOF
1541 exit
1542fi
1543
1544## ------------------------ ##
1545## Autoconf initialization. ##
1546## ------------------------ ##
1547
1548# ac_fn_c_try_compile LINENO
1549# --------------------------
1550# Try to compile conftest.$ac_ext, and return whether this succeeded.
1551ac_fn_c_try_compile ()
1552{
1553 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1554 rm -f conftest.$ac_objext
1555 if { { ac_try="$ac_compile"
1556case "(($ac_try" in
1557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1558 *) ac_try_echo=$ac_try;;
1559esac
1560eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1561$as_echo "$ac_try_echo"; } >&5
1562 (eval "$ac_compile") 2>conftest.err
1563 ac_status=$?
1564 if test -s conftest.err; then
1565 grep -v '^ *+' conftest.err >conftest.er1
1566 cat conftest.er1 >&5
1567 mv -f conftest.er1 conftest.err
1568 fi
1569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1570 test $ac_status = 0; } && {
1571 test -z "$ac_c_werror_flag" ||
1572 test ! -s conftest.err
1573 } && test -s conftest.$ac_objext; then :
1574 ac_retval=0
1575else
1576 $as_echo "$as_me: failed program was:" >&5
1577sed 's/^/| /' conftest.$ac_ext >&5
1578
1579 ac_retval=1
1580fi
1581 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1582 as_fn_set_status $ac_retval
1583
1584} # ac_fn_c_try_compile
1585
1586# ac_fn_cxx_try_compile LINENO
1587# ----------------------------
1588# Try to compile conftest.$ac_ext, and return whether this succeeded.
1589ac_fn_cxx_try_compile ()
1590{
1591 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1592 rm -f conftest.$ac_objext
1593 if { { ac_try="$ac_compile"
1594case "(($ac_try" in
1595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1596 *) ac_try_echo=$ac_try;;
1597esac
1598eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1599$as_echo "$ac_try_echo"; } >&5
1600 (eval "$ac_compile") 2>conftest.err
1601 ac_status=$?
1602 if test -s conftest.err; then
1603 grep -v '^ *+' conftest.err >conftest.er1
1604 cat conftest.er1 >&5
1605 mv -f conftest.er1 conftest.err
1606 fi
1607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1608 test $ac_status = 0; } && {
1609 test -z "$ac_cxx_werror_flag" ||
1610 test ! -s conftest.err
1611 } && test -s conftest.$ac_objext; then :
1612 ac_retval=0
1613else
1614 $as_echo "$as_me: failed program was:" >&5
1615sed 's/^/| /' conftest.$ac_ext >&5
1616
1617 ac_retval=1
1618fi
1619 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1620 as_fn_set_status $ac_retval
1621
1622} # ac_fn_cxx_try_compile
1623
1624# ac_fn_c_try_cpp LINENO
1625# ----------------------
1626# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1627ac_fn_c_try_cpp ()
1628{
1629 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1630 if { { ac_try="$ac_cpp conftest.$ac_ext"
1631case "(($ac_try" in
1632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633 *) ac_try_echo=$ac_try;;
1634esac
1635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636$as_echo "$ac_try_echo"; } >&5
1637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1638 ac_status=$?
1639 if test -s conftest.err; then
1640 grep -v '^ *+' conftest.err >conftest.er1
1641 cat conftest.er1 >&5
1642 mv -f conftest.er1 conftest.err
1643 fi
1644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1645 test $ac_status = 0; } > conftest.i && {
1646 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1647 test ! -s conftest.err
1648 }; then :
1649 ac_retval=0
1650else
1651 $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654 ac_retval=1
1655fi
1656 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1657 as_fn_set_status $ac_retval
1658
1659} # ac_fn_c_try_cpp
1660
1661# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1662# -------------------------------------------------------
1663# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1664# the include files in INCLUDES and setting the cache variable VAR
1665# accordingly.
1666ac_fn_c_check_header_mongrel ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669 if eval \${$3+:} false; then :
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
1672if eval \${$3+:} false; then :
1673 $as_echo_n "(cached) " >&6
1674fi
1675eval ac_res=\$$3
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1677$as_echo "$ac_res" >&6; }
1678else
1679 # Is the header compilable?
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1681$as_echo_n "checking $2 usability... " >&6; }
1682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1683/* end confdefs.h. */
1684$4
1685#include <$2>
1686_ACEOF
1687if ac_fn_c_try_compile "$LINENO"; then :
1688 ac_header_compiler=yes
1689else
1690 ac_header_compiler=no
1691fi
1692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1694$as_echo "$ac_header_compiler" >&6; }
1695
1696# Is the header present?
1697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1698$as_echo_n "checking $2 presence... " >&6; }
1699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700/* end confdefs.h. */
1701#include <$2>
1702_ACEOF
1703if ac_fn_c_try_cpp "$LINENO"; then :
1704 ac_header_preproc=yes
1705else
1706 ac_header_preproc=no
1707fi
1708rm -f conftest.err conftest.i conftest.$ac_ext
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1710$as_echo "$ac_header_preproc" >&6; }
1711
1712# So? What about this header?
1713case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1714 yes:no: )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1716$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1719 ;;
1720 no:yes:* )
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1722$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1724$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1726$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1728$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1730$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1731 ;;
1732esac
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
1735if eval \${$3+:} false; then :
1736 $as_echo_n "(cached) " >&6
1737else
1738 eval "$3=\$ac_header_compiler"
1739fi
1740eval ac_res=\$$3
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1742$as_echo "$ac_res" >&6; }
1743fi
1744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1745
1746} # ac_fn_c_check_header_mongrel
1747
1748# ac_fn_c_try_run LINENO
1749# ----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1751# that executables *can* be run.
1752ac_fn_c_try_run ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1766 { { case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_try") 2>&5
1773 ac_status=$?
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; }; }; then :
1776 ac_retval=0
1777else
1778 $as_echo "$as_me: program exited with status $ac_status" >&5
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
1781
1782 ac_retval=$ac_status
1783fi
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_run
1789
1790# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists and can be compiled using the include files in
1793# INCLUDES, setting the cache variable VAR accordingly.
1794ac_fn_c_check_header_compile ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
1799if eval \${$3+:} false; then :
1800 $as_echo_n "(cached) " >&6
1801else
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 eval "$3=yes"
1809else
1810 eval "$3=no"
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
1817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1818
1819} # ac_fn_c_check_header_compile
1820
1821# ac_fn_c_try_link LINENO
1822# -----------------------
1823# Try to link conftest.$ac_ext, and return whether this succeeded.
1824ac_fn_c_try_link ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 rm -f conftest.$ac_objext conftest$ac_exeext
1828 if { { ac_try="$ac_link"
1829case "(($ac_try" in
1830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1831 *) ac_try_echo=$ac_try;;
1832esac
1833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1834$as_echo "$ac_try_echo"; } >&5
1835 (eval "$ac_link") 2>conftest.err
1836 ac_status=$?
1837 if test -s conftest.err; then
1838 grep -v '^ *+' conftest.err >conftest.er1
1839 cat conftest.er1 >&5
1840 mv -f conftest.er1 conftest.err
1841 fi
1842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1843 test $ac_status = 0; } && {
1844 test -z "$ac_c_werror_flag" ||
1845 test ! -s conftest.err
1846 } && test -s conftest$ac_exeext && {
1847 test "$cross_compiling" = yes ||
1848 test -x conftest$ac_exeext
1849 }; then :
1850 ac_retval=0
1851else
1852 $as_echo "$as_me: failed program was:" >&5
1853sed 's/^/| /' conftest.$ac_ext >&5
1854
1855 ac_retval=1
1856fi
1857 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1858 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1859 # interfere with the next link command; also delete a directory that is
1860 # left behind by Apple's compiler. We do this before executing the actions.
1861 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863 as_fn_set_status $ac_retval
1864
1865} # ac_fn_c_try_link
1866
1867# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1868# -------------------------------------------
1869# Tests whether TYPE exists after having included INCLUDES, setting cache
1870# variable VAR accordingly.
1871ac_fn_c_check_type ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
1876if eval \${$3+:} false; then :
1877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=no"
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883int
1884main ()
1885{
1886if (sizeof ($2))
1887 return 0;
1888 ;
1889 return 0;
1890}
1891_ACEOF
1892if ac_fn_c_try_compile "$LINENO"; then :
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$4
1896int
1897main ()
1898{
1899if (sizeof (($2)))
1900 return 0;
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906
1907else
1908 eval "$3=yes"
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1913fi
1914eval ac_res=\$$3
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1916$as_echo "$ac_res" >&6; }
1917 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1918
1919} # ac_fn_c_check_type
1920
1921# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1922# --------------------------------------------
1923# Tries to find the compile-time value of EXPR in a program that includes
1924# INCLUDES, setting VAR accordingly. Returns whether the value could be
1925# computed
1926ac_fn_c_compute_int ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 if test "$cross_compiling" = yes; then
1930 # Depending upon the size, compute the lo and hi bounds.
1931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$4
1934int
1935main ()
1936{
1937static int test_array [1 - 2 * !(($2) >= 0)];
1938test_array [0] = 0;
1939return test_array [0];
1940
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 ac_lo=0 ac_mid=0
1947 while :; do
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1955test_array [0] = 0;
1956return test_array [0];
1957
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 ac_hi=$ac_mid; break
1964else
1965 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1966 if test $ac_lo -le $ac_mid; then
1967 ac_lo= ac_hi=
1968 break
1969 fi
1970 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973 done
1974else
1975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
1979main ()
1980{
1981static int test_array [1 - 2 * !(($2) < 0)];
1982test_array [0] = 0;
1983return test_array [0];
1984
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989if ac_fn_c_try_compile "$LINENO"; then :
1990 ac_hi=-1 ac_mid=-1
1991 while :; do
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1999test_array [0] = 0;
2000return test_array [0];
2001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=$ac_mid; break
2008else
2009 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2010 if test $ac_mid -le $ac_hi; then
2011 ac_lo= ac_hi=
2012 break
2013 fi
2014 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017 done
2018else
2019 ac_lo= ac_hi=
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022fi
2023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024# Binary search between lo and hi bounds.
2025while test "x$ac_lo" != "x$ac_hi"; do
2026 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0;
2035return test_array [0];
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid
2043else
2044 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047done
2048case $ac_lo in #((
2049?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2050'') ac_retval=1 ;;
2051esac
2052 else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056static long int longval () { return $2; }
2057static unsigned long int ulongval () { return $2; }
2058#include <stdio.h>
2059#include <stdlib.h>
2060int
2061main ()
2062{
2063
2064 FILE *f = fopen ("conftest.val", "w");
2065 if (! f)
2066 return 1;
2067 if (($2) < 0)
2068 {
2069 long int i = longval ();
2070 if (i != ($2))
2071 return 1;
2072 fprintf (f, "%ld", i);
2073 }
2074 else
2075 {
2076 unsigned long int i = ulongval ();
2077 if (i != ($2))
2078 return 1;
2079 fprintf (f, "%lu", i);
2080 }
2081 /* Do not output a trailing newline, as this causes \r\n confusion
2082 on some platforms. */
2083 return ferror (f) || fclose (f) != 0;
2084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_run "$LINENO"; then :
2090 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2091else
2092 ac_retval=1
2093fi
2094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2095 conftest.$ac_objext conftest.beam conftest.$ac_ext
2096rm -f conftest.val
2097
2098 fi
2099 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2100 as_fn_set_status $ac_retval
2101
2102} # ac_fn_c_compute_int
2103
2104# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2105# ---------------------------------------------
2106# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2107# accordingly.
2108ac_fn_c_check_decl ()
2109{
2110 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2111 as_decl_name=`echo $2|sed 's/ *(.*//'`
2112 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2114$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2115if eval \${$3+:} false; then :
2116 $as_echo_n "(cached) " >&6
2117else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124#ifndef $as_decl_name
2125#ifdef __cplusplus
2126 (void) $as_decl_use;
2127#else
2128 (void) $as_decl_name;
2129#endif
2130#endif
2131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 eval "$3=yes"
2138else
2139 eval "$3=no"
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142fi
2143eval ac_res=\$$3
2144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145$as_echo "$ac_res" >&6; }
2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2147
2148} # ac_fn_c_check_decl
2149
2150# ac_fn_c_check_func LINENO FUNC VAR
2151# ----------------------------------
2152# Tests whether FUNC exists, setting the cache variable VAR accordingly
2153ac_fn_c_check_func ()
2154{
2155 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2157$as_echo_n "checking for $2... " >&6; }
2158if eval \${$3+:} false; then :
2159 $as_echo_n "(cached) " >&6
2160else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2164 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2165#define $2 innocuous_$2
2166
2167/* System header to define __stub macros and hopefully few prototypes,
2168 which can conflict with char $2 (); below.
2169 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2170 <limits.h> exists even on freestanding compilers. */
2171
2172#ifdef __STDC__
2173# include <limits.h>
2174#else
2175# include <assert.h>
2176#endif
2177
2178#undef $2
2179
2180/* Override any GCC internal prototype to avoid an error.
2181 Use char because int might match the return type of a GCC
2182 builtin and then its argument prototype would still apply. */
2183#ifdef __cplusplus
2184extern "C"
2185#endif
2186char $2 ();
2187/* The GNU C library defines this for functions which it implements
2188 to always fail with ENOSYS. Some functions are actually named
2189 something starting with __ and the normal name is an alias. */
2190#if defined __stub_$2 || defined __stub___$2
2191choke me
2192#endif
2193
2194int
2195main ()
2196{
2197return $2 ();
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_link "$LINENO"; then :
2203 eval "$3=yes"
2204else
2205 eval "$3=no"
2206fi
2207rm -f core conftest.err conftest.$ac_objext \
2208 conftest$ac_exeext conftest.$ac_ext
2209fi
2210eval ac_res=\$$3
2211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2212$as_echo "$ac_res" >&6; }
2213 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2214
2215} # ac_fn_c_check_func
2216
05ea2a05
TT
2217# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2218# ----------------------------------------------------
2219# Tries to find if the field MEMBER exists in type AGGR, after including
2220# INCLUDES, setting cache variable VAR accordingly.
2221ac_fn_c_check_member ()
2222{
2223 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2225$as_echo_n "checking for $2.$3... " >&6; }
2226if eval \${$4+:} false; then :
2227 $as_echo_n "(cached) " >&6
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231$5
2232int
2233main ()
2234{
2235static $2 ac_aggr;
2236if (ac_aggr.$3)
2237return 0;
2238 ;
2239 return 0;
2240}
2241_ACEOF
2242if ac_fn_c_try_compile "$LINENO"; then :
2243 eval "$4=yes"
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (sizeof ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 eval "$4=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266fi
2267eval ac_res=\$$4
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
2270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2271
2272} # ac_fn_c_check_member
2273
01027315
TT
2274# ac_fn_cxx_try_link LINENO
2275# -------------------------
2276# Try to link conftest.$ac_ext, and return whether this succeeded.
2277ac_fn_cxx_try_link ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 rm -f conftest.$ac_objext conftest$ac_exeext
2281 if { { ac_try="$ac_link"
2282case "(($ac_try" in
2283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2284 *) ac_try_echo=$ac_try;;
2285esac
2286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2287$as_echo "$ac_try_echo"; } >&5
2288 (eval "$ac_link") 2>conftest.err
2289 ac_status=$?
2290 if test -s conftest.err; then
2291 grep -v '^ *+' conftest.err >conftest.er1
2292 cat conftest.er1 >&5
2293 mv -f conftest.er1 conftest.err
2294 fi
2295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2296 test $ac_status = 0; } && {
2297 test -z "$ac_cxx_werror_flag" ||
2298 test ! -s conftest.err
2299 } && test -s conftest$ac_exeext && {
2300 test "$cross_compiling" = yes ||
2301 test -x conftest$ac_exeext
2302 }; then :
2303 ac_retval=0
2304else
2305 $as_echo "$as_me: failed program was:" >&5
2306sed 's/^/| /' conftest.$ac_ext >&5
2307
2308 ac_retval=1
2309fi
2310 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2311 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2312 # interfere with the next link command; also delete a directory that is
2313 # left behind by Apple's compiler. We do this before executing the actions.
2314 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2315 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2316 as_fn_set_status $ac_retval
2317
2318} # ac_fn_cxx_try_link
2319
2320# ac_fn_cxx_check_func LINENO FUNC VAR
2321# ------------------------------------
2322# Tests whether FUNC exists, setting the cache variable VAR accordingly
2323ac_fn_cxx_check_func ()
2324{
2325 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2327$as_echo_n "checking for $2... " >&6; }
2328if eval \${$3+:} false; then :
2329 $as_echo_n "(cached) " >&6
2330else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2335#define $2 innocuous_$2
2336
2337/* System header to define __stub macros and hopefully few prototypes,
2338 which can conflict with char $2 (); below.
2339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2340 <limits.h> exists even on freestanding compilers. */
2341
2342#ifdef __STDC__
2343# include <limits.h>
2344#else
2345# include <assert.h>
2346#endif
2347
2348#undef $2
2349
2350/* Override any GCC internal prototype to avoid an error.
2351 Use char because int might match the return type of a GCC
2352 builtin and then its argument prototype would still apply. */
2353#ifdef __cplusplus
2354extern "C"
2355#endif
2356char $2 ();
2357/* The GNU C library defines this for functions which it implements
2358 to always fail with ENOSYS. Some functions are actually named
2359 something starting with __ and the normal name is an alias. */
2360#if defined __stub_$2 || defined __stub___$2
2361choke me
2362#endif
2363
2364int
2365main ()
2366{
2367return $2 ();
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372if ac_fn_cxx_try_link "$LINENO"; then :
2373 eval "$3=yes"
2374else
2375 eval "$3=no"
2376fi
2377rm -f core conftest.err conftest.$ac_objext \
2378 conftest$ac_exeext conftest.$ac_ext
2379fi
2380eval ac_res=\$$3
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2382$as_echo "$ac_res" >&6; }
2383 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2384
2385} # ac_fn_cxx_check_func
2386cat >config.log <<_ACEOF
2387This file contains any messages produced by compilers while
2388running configure, to aid debugging if configure makes a mistake.
2389
2390It was created by gdbsupport $as_me 1.0, which was
2391generated by GNU Autoconf 2.69. Invocation command line was
2392
2393 $ $0 $@
2394
2395_ACEOF
2396exec 5>>config.log
2397{
2398cat <<_ASUNAME
2399## --------- ##
2400## Platform. ##
2401## --------- ##
2402
2403hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2404uname -m = `(uname -m) 2>/dev/null || echo unknown`
2405uname -r = `(uname -r) 2>/dev/null || echo unknown`
2406uname -s = `(uname -s) 2>/dev/null || echo unknown`
2407uname -v = `(uname -v) 2>/dev/null || echo unknown`
2408
2409/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2410/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2411
2412/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2413/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2414/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2415/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2416/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2417/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2418/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2419
2420_ASUNAME
2421
2422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2423for as_dir in $PATH
2424do
2425 IFS=$as_save_IFS
2426 test -z "$as_dir" && as_dir=.
2427 $as_echo "PATH: $as_dir"
2428 done
2429IFS=$as_save_IFS
2430
2431} >&5
2432
2433cat >&5 <<_ACEOF
2434
2435
2436## ----------- ##
2437## Core tests. ##
2438## ----------- ##
2439
2440_ACEOF
2441
2442
2443# Keep a trace of the command line.
2444# Strip out --no-create and --no-recursion so they do not pile up.
2445# Strip out --silent because we don't want to record it for future runs.
2446# Also quote any args containing shell meta-characters.
2447# Make two passes to allow for proper duplicate-argument suppression.
2448ac_configure_args=
2449ac_configure_args0=
2450ac_configure_args1=
2451ac_must_keep_next=false
2452for ac_pass in 1 2
2453do
2454 for ac_arg
2455 do
2456 case $ac_arg in
2457 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2458 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2459 | -silent | --silent | --silen | --sile | --sil)
2460 continue ;;
2461 *\'*)
2462 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2463 esac
2464 case $ac_pass in
2465 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2466 2)
2467 as_fn_append ac_configure_args1 " '$ac_arg'"
2468 if test $ac_must_keep_next = true; then
2469 ac_must_keep_next=false # Got value, back to normal.
2470 else
2471 case $ac_arg in
2472 *=* | --config-cache | -C | -disable-* | --disable-* \
2473 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2474 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2475 | -with-* | --with-* | -without-* | --without-* | --x)
2476 case "$ac_configure_args0 " in
2477 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2478 esac
2479 ;;
2480 -* ) ac_must_keep_next=true ;;
2481 esac
2482 fi
2483 as_fn_append ac_configure_args " '$ac_arg'"
2484 ;;
2485 esac
2486 done
2487done
2488{ ac_configure_args0=; unset ac_configure_args0;}
2489{ ac_configure_args1=; unset ac_configure_args1;}
2490
2491# When interrupted or exit'd, cleanup temporary files, and complete
2492# config.log. We remove comments because anyway the quotes in there
2493# would cause problems or look ugly.
2494# WARNING: Use '\'' to represent an apostrophe within the trap.
2495# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2496trap 'exit_status=$?
2497 # Save into config.log some information that might help in debugging.
2498 {
2499 echo
2500
2501 $as_echo "## ---------------- ##
2502## Cache variables. ##
2503## ---------------- ##"
2504 echo
2505 # The following way of writing the cache mishandles newlines in values,
2506(
2507 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2508 eval ac_val=\$$ac_var
2509 case $ac_val in #(
2510 *${as_nl}*)
2511 case $ac_var in #(
2512 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2513$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2514 esac
2515 case $ac_var in #(
2516 _ | IFS | as_nl) ;; #(
2517 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2518 *) { eval $ac_var=; unset $ac_var;} ;;
2519 esac ;;
2520 esac
2521 done
2522 (set) 2>&1 |
2523 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2524 *${as_nl}ac_space=\ *)
2525 sed -n \
2526 "s/'\''/'\''\\\\'\'''\''/g;
2527 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2528 ;; #(
2529 *)
2530 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2531 ;;
2532 esac |
2533 sort
2534)
2535 echo
2536
2537 $as_echo "## ----------------- ##
2538## Output variables. ##
2539## ----------------- ##"
2540 echo
2541 for ac_var in $ac_subst_vars
2542 do
2543 eval ac_val=\$$ac_var
2544 case $ac_val in
2545 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2546 esac
2547 $as_echo "$ac_var='\''$ac_val'\''"
2548 done | sort
2549 echo
2550
2551 if test -n "$ac_subst_files"; then
2552 $as_echo "## ------------------- ##
2553## File substitutions. ##
2554## ------------------- ##"
2555 echo
2556 for ac_var in $ac_subst_files
2557 do
2558 eval ac_val=\$$ac_var
2559 case $ac_val in
2560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2561 esac
2562 $as_echo "$ac_var='\''$ac_val'\''"
2563 done | sort
2564 echo
2565 fi
2566
2567 if test -s confdefs.h; then
2568 $as_echo "## ----------- ##
2569## confdefs.h. ##
2570## ----------- ##"
2571 echo
2572 cat confdefs.h
2573 echo
2574 fi
2575 test "$ac_signal" != 0 &&
2576 $as_echo "$as_me: caught signal $ac_signal"
2577 $as_echo "$as_me: exit $exit_status"
2578 } >&5
2579 rm -f core *.core core.conftest.* &&
2580 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2581 exit $exit_status
2582' 0
2583for ac_signal in 1 2 13 15; do
2584 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2585done
2586ac_signal=0
2587
2588# confdefs.h avoids OS command line length limits that DEFS can exceed.
2589rm -f -r conftest* confdefs.h
2590
2591$as_echo "/* confdefs.h */" > confdefs.h
2592
2593# Predefined preprocessor variables.
2594
2595cat >>confdefs.h <<_ACEOF
2596#define PACKAGE_NAME "$PACKAGE_NAME"
2597_ACEOF
2598
2599cat >>confdefs.h <<_ACEOF
2600#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2601_ACEOF
2602
2603cat >>confdefs.h <<_ACEOF
2604#define PACKAGE_VERSION "$PACKAGE_VERSION"
2605_ACEOF
2606
2607cat >>confdefs.h <<_ACEOF
2608#define PACKAGE_STRING "$PACKAGE_STRING"
2609_ACEOF
2610
2611cat >>confdefs.h <<_ACEOF
2612#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2613_ACEOF
2614
2615cat >>confdefs.h <<_ACEOF
2616#define PACKAGE_URL "$PACKAGE_URL"
2617_ACEOF
2618
2619
2620# Let the site file select an alternate cache file if it wants to.
2621# Prefer an explicitly selected file to automatically selected ones.
2622ac_site_file1=NONE
2623ac_site_file2=NONE
2624if test -n "$CONFIG_SITE"; then
2625 # We do not want a PATH search for config.site.
2626 case $CONFIG_SITE in #((
2627 -*) ac_site_file1=./$CONFIG_SITE;;
2628 */*) ac_site_file1=$CONFIG_SITE;;
2629 *) ac_site_file1=./$CONFIG_SITE;;
2630 esac
2631elif test "x$prefix" != xNONE; then
2632 ac_site_file1=$prefix/share/config.site
2633 ac_site_file2=$prefix/etc/config.site
2634else
2635 ac_site_file1=$ac_default_prefix/share/config.site
2636 ac_site_file2=$ac_default_prefix/etc/config.site
2637fi
2638for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2639do
2640 test "x$ac_site_file" = xNONE && continue
2641 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2643$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2644 sed 's/^/| /' "$ac_site_file" >&5
2645 . "$ac_site_file" \
2646 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2648as_fn_error $? "failed to load site script $ac_site_file
2649See \`config.log' for more details" "$LINENO" 5; }
2650 fi
2651done
2652
2653if test -r "$cache_file"; then
2654 # Some versions of bash will fail to source /dev/null (special files
2655 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2656 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2658$as_echo "$as_me: loading cache $cache_file" >&6;}
2659 case $cache_file in
2660 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2661 *) . "./$cache_file";;
2662 esac
2663 fi
2664else
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2666$as_echo "$as_me: creating cache $cache_file" >&6;}
2667 >$cache_file
2668fi
2669
05ea2a05
TT
2670as_fn_append ac_header_list " stdlib.h"
2671as_fn_append ac_header_list " unistd.h"
2672as_fn_append ac_header_list " sys/param.h"
01027315
TT
2673# Check that the precious variables saved in the cache have kept the same
2674# value.
2675ac_cache_corrupted=false
2676for ac_var in $ac_precious_vars; do
2677 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2678 eval ac_new_set=\$ac_env_${ac_var}_set
2679 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2680 eval ac_new_val=\$ac_env_${ac_var}_value
2681 case $ac_old_set,$ac_new_set in
2682 set,)
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2684$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2685 ac_cache_corrupted=: ;;
2686 ,set)
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2688$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2689 ac_cache_corrupted=: ;;
2690 ,);;
2691 *)
2692 if test "x$ac_old_val" != "x$ac_new_val"; then
2693 # differences in whitespace do not lead to failure.
2694 ac_old_val_w=`echo x $ac_old_val`
2695 ac_new_val_w=`echo x $ac_new_val`
2696 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2698$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2699 ac_cache_corrupted=:
2700 else
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2702$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2703 eval $ac_var=\$ac_old_val
2704 fi
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2706$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2708$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2709 fi;;
2710 esac
2711 # Pass precious variables to config.status.
2712 if test "$ac_new_set" = set; then
2713 case $ac_new_val in
2714 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2715 *) ac_arg=$ac_var=$ac_new_val ;;
2716 esac
2717 case " $ac_configure_args " in
2718 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2719 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2720 esac
2721 fi
2722done
2723if $ac_cache_corrupted; then
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2727$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2728 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2729fi
2730## -------------------- ##
2731## Main body of script. ##
2732## -------------------- ##
2733
2734ac_ext=c
2735ac_cpp='$CPP $CPPFLAGS'
2736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738ac_compiler_gnu=$ac_cv_c_compiler_gnu
2739
2740
2741
2742
2743
2744
3684d331 2745ac_config_headers="$ac_config_headers config.h:config.in"
01027315 2746
91e1a0ed
SM
2747
2748# Set build, build_cpu, build_vendor and build_os.
01027315
TT
2749ac_aux_dir=
2750for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2751 if test -f "$ac_dir/install-sh"; then
2752 ac_aux_dir=$ac_dir
2753 ac_install_sh="$ac_aux_dir/install-sh -c"
2754 break
2755 elif test -f "$ac_dir/install.sh"; then
2756 ac_aux_dir=$ac_dir
2757 ac_install_sh="$ac_aux_dir/install.sh -c"
2758 break
2759 elif test -f "$ac_dir/shtool"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/shtool install -c"
2762 break
2763 fi
2764done
2765if test -z "$ac_aux_dir"; then
2766 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2767fi
2768
2769# These three variables are undocumented and unsupported,
2770# and are intended to be withdrawn in a future Autoconf release.
2771# They can cause serious problems if a builder's source tree is in a directory
2772# whose full name contains unusual characters.
2773ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2774ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2775ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2776
2777
2778# Make sure we can run config.sub.
2779$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2780 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2781
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2783$as_echo_n "checking build system type... " >&6; }
2784if ${ac_cv_build+:} false; then :
2785 $as_echo_n "(cached) " >&6
2786else
2787 ac_build_alias=$build_alias
2788test "x$ac_build_alias" = x &&
2789 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2790test "x$ac_build_alias" = x &&
2791 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2792ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2793 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2794
2795fi
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2797$as_echo "$ac_cv_build" >&6; }
2798case $ac_cv_build in
2799*-*-*) ;;
2800*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2801esac
2802build=$ac_cv_build
2803ac_save_IFS=$IFS; IFS='-'
2804set x $ac_cv_build
2805shift
2806build_cpu=$1
2807build_vendor=$2
2808shift; shift
2809# Remember, the first character of IFS is used to create $*,
2810# except with old shells:
2811build_os=$*
2812IFS=$ac_save_IFS
2813case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2814
2815
91e1a0ed
SM
2816
2817# Set host, host_cpu, host_vendor, and host_os.
01027315
TT
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2819$as_echo_n "checking host system type... " >&6; }
2820if ${ac_cv_host+:} false; then :
2821 $as_echo_n "(cached) " >&6
2822else
2823 if test "x$host_alias" = x; then
2824 ac_cv_host=$ac_cv_build
2825else
2826 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2827 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2828fi
2829
2830fi
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2832$as_echo "$ac_cv_host" >&6; }
2833case $ac_cv_host in
2834*-*-*) ;;
2835*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2836esac
2837host=$ac_cv_host
2838ac_save_IFS=$IFS; IFS='-'
2839set x $ac_cv_host
2840shift
2841host_cpu=$1
2842host_vendor=$2
2843shift; shift
2844# Remember, the first character of IFS is used to create $*,
2845# except with old shells:
2846host_os=$*
2847IFS=$ac_save_IFS
2848case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2849
2850
91e1a0ed
SM
2851
2852# Set target, target_cpu, target_vendor, and target_os.
01027315
TT
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2854$as_echo_n "checking target system type... " >&6; }
2855if ${ac_cv_target+:} false; then :
2856 $as_echo_n "(cached) " >&6
2857else
2858 if test "x$target_alias" = x; then
2859 ac_cv_target=$ac_cv_host
2860else
2861 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2862 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2863fi
2864
2865fi
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2867$as_echo "$ac_cv_target" >&6; }
2868case $ac_cv_target in
2869*-*-*) ;;
2870*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2871esac
2872target=$ac_cv_target
2873ac_save_IFS=$IFS; IFS='-'
2874set x $ac_cv_target
2875shift
2876target_cpu=$1
2877target_vendor=$2
2878shift; shift
2879# Remember, the first character of IFS is used to create $*,
2880# except with old shells:
2881target_os=$*
2882IFS=$ac_save_IFS
2883case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2884
2885
2886# The aliases save the names the user supplied, while $host etc.
2887# will get canonicalized.
2888test -n "$target_alias" &&
2889 test "$program_prefix$program_suffix$program_transform_name" = \
2890 NONENONEs,x,x, &&
2891 program_prefix=${target_alias}-
2892
2893
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2895$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2896 # Check whether --enable-maintainer-mode was given.
2897if test "${enable_maintainer_mode+set}" = set; then :
2898 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2899else
2900 USE_MAINTAINER_MODE=no
2901fi
2902
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2904$as_echo "$USE_MAINTAINER_MODE" >&6; }
2905 if test $USE_MAINTAINER_MODE = yes; then
2906 MAINTAINER_MODE_TRUE=
2907 MAINTAINER_MODE_FALSE='#'
2908else
2909 MAINTAINER_MODE_TRUE='#'
2910 MAINTAINER_MODE_FALSE=
2911fi
2912
2913 MAINT=$MAINTAINER_MODE_TRUE
2914
2915
2916ac_aux_dir=
2917for ac_dir in .. "$srcdir"/..; do
2918 if test -f "$ac_dir/install-sh"; then
2919 ac_aux_dir=$ac_dir
2920 ac_install_sh="$ac_aux_dir/install-sh -c"
2921 break
2922 elif test -f "$ac_dir/install.sh"; then
2923 ac_aux_dir=$ac_dir
2924 ac_install_sh="$ac_aux_dir/install.sh -c"
2925 break
2926 elif test -f "$ac_dir/shtool"; then
2927 ac_aux_dir=$ac_dir
2928 ac_install_sh="$ac_aux_dir/shtool install -c"
2929 break
2930 fi
2931done
2932if test -z "$ac_aux_dir"; then
2933 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
2934fi
2935
2936# These three variables are undocumented and unsupported,
2937# and are intended to be withdrawn in a future Autoconf release.
2938# They can cause serious problems if a builder's source tree is in a directory
2939# whose full name contains unusual characters.
2940ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2941ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2942ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2943
2944
2945am__api_version='1.15'
2946
2947# Find a good install program. We prefer a C program (faster),
2948# so one script is as good as another. But avoid the broken or
2949# incompatible versions:
2950# SysV /etc/install, /usr/sbin/install
2951# SunOS /usr/etc/install
2952# IRIX /sbin/install
2953# AIX /bin/install
2954# AmigaOS /C/install, which installs bootblocks on floppy discs
2955# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2956# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2957# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2958# OS/2's system install, which has a completely different semantic
2959# ./install, which can be erroneously created by make from ./install.sh.
2960# Reject install programs that cannot install multiple files.
2961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2962$as_echo_n "checking for a BSD-compatible install... " >&6; }
2963if test -z "$INSTALL"; then
2964if ${ac_cv_path_install+:} false; then :
2965 $as_echo_n "(cached) " >&6
2966else
2967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2968for as_dir in $PATH
2969do
2970 IFS=$as_save_IFS
2971 test -z "$as_dir" && as_dir=.
2972 # Account for people who put trailing slashes in PATH elements.
2973case $as_dir/ in #((
2974 ./ | .// | /[cC]/* | \
2975 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2976 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2977 /usr/ucb/* ) ;;
2978 *)
2979 # OSF1 and SCO ODT 3.0 have their own names for install.
2980 # Don't use installbsd from OSF since it installs stuff as root
2981 # by default.
2982 for ac_prog in ginstall scoinst install; do
2983 for ac_exec_ext in '' $ac_executable_extensions; do
2984 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2985 if test $ac_prog = install &&
2986 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2987 # AIX install. It has an incompatible calling convention.
2988 :
2989 elif test $ac_prog = install &&
2990 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2991 # program-specific install script used by HP pwplus--don't use.
2992 :
2993 else
2994 rm -rf conftest.one conftest.two conftest.dir
2995 echo one > conftest.one
2996 echo two > conftest.two
2997 mkdir conftest.dir
2998 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2999 test -s conftest.one && test -s conftest.two &&
3000 test -s conftest.dir/conftest.one &&
3001 test -s conftest.dir/conftest.two
3002 then
3003 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3004 break 3
3005 fi
3006 fi
3007 fi
3008 done
3009 done
3010 ;;
3011esac
3012
3013 done
3014IFS=$as_save_IFS
3015
3016rm -rf conftest.one conftest.two conftest.dir
3017
3018fi
3019 if test "${ac_cv_path_install+set}" = set; then
3020 INSTALL=$ac_cv_path_install
3021 else
3022 # As a last resort, use the slow shell script. Don't cache a
3023 # value for INSTALL within a source directory, because that will
3024 # break other packages using the cache if that directory is
3025 # removed, or if the value is a relative name.
3026 INSTALL=$ac_install_sh
3027 fi
3028fi
3029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3030$as_echo "$INSTALL" >&6; }
3031
3032# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3033# It thinks the first close brace ends the variable substitution.
3034test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3035
3036test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3037
3038test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3039
3040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3041$as_echo_n "checking whether build environment is sane... " >&6; }
3042# Reject unsafe characters in $srcdir or the absolute working directory
3043# name. Accept space and tab only in the latter.
3044am_lf='
3045'
3046case `pwd` in
3047 *[\\\"\#\$\&\'\`$am_lf]*)
3048 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3049esac
3050case $srcdir in
3051 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3052 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3053esac
3054
3055# Do 'set' in a subshell so we don't clobber the current shell's
3056# arguments. Must try -L first in case configure is actually a
3057# symlink; some systems play weird games with the mod time of symlinks
3058# (eg FreeBSD returns the mod time of the symlink's containing
3059# directory).
3060if (
3061 am_has_slept=no
3062 for am_try in 1 2; do
3063 echo "timestamp, slept: $am_has_slept" > conftest.file
3064 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3065 if test "$*" = "X"; then
3066 # -L didn't work.
3067 set X `ls -t "$srcdir/configure" conftest.file`
3068 fi
3069 if test "$*" != "X $srcdir/configure conftest.file" \
3070 && test "$*" != "X conftest.file $srcdir/configure"; then
3071
3072 # If neither matched, then we have a broken ls. This can happen
3073 # if, for instance, CONFIG_SHELL is bash and it inherits a
3074 # broken ls alias from the environment. This has actually
3075 # happened. Such a system could not be considered "sane".
3076 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3077 alias in your environment" "$LINENO" 5
3078 fi
3079 if test "$2" = conftest.file || test $am_try -eq 2; then
3080 break
3081 fi
3082 # Just in case.
3083 sleep 1
3084 am_has_slept=yes
3085 done
3086 test "$2" = conftest.file
3087 )
3088then
3089 # Ok.
3090 :
3091else
3092 as_fn_error $? "newly created file is older than distributed files!
3093Check your system clock" "$LINENO" 5
3094fi
3095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3096$as_echo "yes" >&6; }
3097# If we didn't sleep, we still need to ensure time stamps of config.status and
3098# generated files are strictly newer.
3099am_sleep_pid=
3100if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3101 ( sleep 1 ) &
3102 am_sleep_pid=$!
3103fi
3104
3105rm -f conftest.file
3106
3107test "$program_prefix" != NONE &&
3108 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3109# Use a double $ so make ignores it.
3110test "$program_suffix" != NONE &&
3111 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3112# Double any \ or $.
3113# By default was `s,x,x', remove it if useless.
3114ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3115program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3116
3117# Expand $ac_aux_dir to an absolute path.
3118am_aux_dir=`cd "$ac_aux_dir" && pwd`
3119
3120if test x"${MISSING+set}" != xset; then
3121 case $am_aux_dir in
3122 *\ * | *\ *)
3123 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3124 *)
3125 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3126 esac
3127fi
3128# Use eval to expand $SHELL
3129if eval "$MISSING --is-lightweight"; then
3130 am_missing_run="$MISSING "
3131else
3132 am_missing_run=
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3134$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3135fi
3136
3137if test x"${install_sh+set}" != xset; then
3138 case $am_aux_dir in
3139 *\ * | *\ *)
3140 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3141 *)
3142 install_sh="\${SHELL} $am_aux_dir/install-sh"
3143 esac
3144fi
3145
3146# Installed binaries are usually stripped using 'strip' when the user
3147# run "make install-strip". However 'strip' might not be the right
3148# tool to use in cross-compilation environments, therefore Automake
3149# will honor the 'STRIP' environment variable to overrule this program.
3150if test "$cross_compiling" != no; then
3151 if test -n "$ac_tool_prefix"; then
3152 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3153set dummy ${ac_tool_prefix}strip; ac_word=$2
3154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3155$as_echo_n "checking for $ac_word... " >&6; }
3156if ${ac_cv_prog_STRIP+:} false; then :
3157 $as_echo_n "(cached) " >&6
3158else
3159 if test -n "$STRIP"; then
3160 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3161else
3162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3163for as_dir in $PATH
3164do
3165 IFS=$as_save_IFS
3166 test -z "$as_dir" && as_dir=.
3167 for ac_exec_ext in '' $ac_executable_extensions; do
3168 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3169 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3171 break 2
3172 fi
3173done
3174 done
3175IFS=$as_save_IFS
3176
3177fi
3178fi
3179STRIP=$ac_cv_prog_STRIP
3180if test -n "$STRIP"; then
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3182$as_echo "$STRIP" >&6; }
3183else
3184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185$as_echo "no" >&6; }
3186fi
3187
3188
3189fi
3190if test -z "$ac_cv_prog_STRIP"; then
3191 ac_ct_STRIP=$STRIP
3192 # Extract the first word of "strip", so it can be a program name with args.
3193set dummy strip; ac_word=$2
3194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3195$as_echo_n "checking for $ac_word... " >&6; }
3196if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3197 $as_echo_n "(cached) " >&6
3198else
3199 if test -n "$ac_ct_STRIP"; then
3200 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3201else
3202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3203for as_dir in $PATH
3204do
3205 IFS=$as_save_IFS
3206 test -z "$as_dir" && as_dir=.
3207 for ac_exec_ext in '' $ac_executable_extensions; do
3208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3209 ac_cv_prog_ac_ct_STRIP="strip"
3210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3211 break 2
3212 fi
3213done
3214 done
3215IFS=$as_save_IFS
3216
3217fi
3218fi
3219ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3220if test -n "$ac_ct_STRIP"; then
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3222$as_echo "$ac_ct_STRIP" >&6; }
3223else
3224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3225$as_echo "no" >&6; }
3226fi
3227
3228 if test "x$ac_ct_STRIP" = x; then
3229 STRIP=":"
3230 else
3231 case $cross_compiling:$ac_tool_warned in
3232yes:)
3233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3235ac_tool_warned=yes ;;
3236esac
3237 STRIP=$ac_ct_STRIP
3238 fi
3239else
3240 STRIP="$ac_cv_prog_STRIP"
3241fi
3242
3243fi
3244INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3245
3246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3247$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3248if test -z "$MKDIR_P"; then
3249 if ${ac_cv_path_mkdir+:} false; then :
3250 $as_echo_n "(cached) " >&6
3251else
3252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3253for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3254do
3255 IFS=$as_save_IFS
3256 test -z "$as_dir" && as_dir=.
3257 for ac_prog in mkdir gmkdir; do
3258 for ac_exec_ext in '' $ac_executable_extensions; do
3259 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3260 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3261 'mkdir (GNU coreutils) '* | \
3262 'mkdir (coreutils) '* | \
3263 'mkdir (fileutils) '4.1*)
3264 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3265 break 3;;
3266 esac
3267 done
3268 done
3269 done
3270IFS=$as_save_IFS
3271
3272fi
3273
3274 test -d ./--version && rmdir ./--version
3275 if test "${ac_cv_path_mkdir+set}" = set; then
3276 MKDIR_P="$ac_cv_path_mkdir -p"
3277 else
3278 # As a last resort, use the slow shell script. Don't cache a
3279 # value for MKDIR_P within a source directory, because that will
3280 # break other packages using the cache if that directory is
3281 # removed, or if the value is a relative name.
3282 MKDIR_P="$ac_install_sh -d"
3283 fi
3284fi
3285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3286$as_echo "$MKDIR_P" >&6; }
3287
3288for ac_prog in gawk mawk nawk awk
3289do
3290 # Extract the first word of "$ac_prog", so it can be a program name with args.
3291set dummy $ac_prog; ac_word=$2
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3293$as_echo_n "checking for $ac_word... " >&6; }
3294if ${ac_cv_prog_AWK+:} false; then :
3295 $as_echo_n "(cached) " >&6
3296else
3297 if test -n "$AWK"; then
3298 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3299else
3300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in $PATH
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
3305 for ac_exec_ext in '' $ac_executable_extensions; do
3306 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3307 ac_cv_prog_AWK="$ac_prog"
3308 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3309 break 2
3310 fi
3311done
3312 done
3313IFS=$as_save_IFS
3314
3315fi
3316fi
3317AWK=$ac_cv_prog_AWK
3318if test -n "$AWK"; then
3319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3320$as_echo "$AWK" >&6; }
3321else
3322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3323$as_echo "no" >&6; }
3324fi
3325
3326
3327 test -n "$AWK" && break
3328done
3329
3330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3331$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3332set x ${MAKE-make}
3333ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3334if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3335 $as_echo_n "(cached) " >&6
3336else
3337 cat >conftest.make <<\_ACEOF
3338SHELL = /bin/sh
3339all:
3340 @echo '@@@%%%=$(MAKE)=@@@%%%'
3341_ACEOF
3342# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3343case `${MAKE-make} -f conftest.make 2>/dev/null` in
3344 *@@@%%%=?*=@@@%%%*)
3345 eval ac_cv_prog_make_${ac_make}_set=yes;;
3346 *)
3347 eval ac_cv_prog_make_${ac_make}_set=no;;
3348esac
3349rm -f conftest.make
3350fi
3351if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3353$as_echo "yes" >&6; }
3354 SET_MAKE=
3355else
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3357$as_echo "no" >&6; }
3358 SET_MAKE="MAKE=${MAKE-make}"
3359fi
3360
3361rm -rf .tst 2>/dev/null
3362mkdir .tst 2>/dev/null
3363if test -d .tst; then
3364 am__leading_dot=.
3365else
3366 am__leading_dot=_
3367fi
3368rmdir .tst 2>/dev/null
3369
3370# Check whether --enable-silent-rules was given.
3371if test "${enable_silent_rules+set}" = set; then :
3372 enableval=$enable_silent_rules;
3373fi
3374
3375case $enable_silent_rules in # (((
3376 yes) AM_DEFAULT_VERBOSITY=0;;
3377 no) AM_DEFAULT_VERBOSITY=1;;
3378 *) AM_DEFAULT_VERBOSITY=1;;
3379esac
3380am_make=${MAKE-make}
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3382$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3383if ${am_cv_make_support_nested_variables+:} false; then :
3384 $as_echo_n "(cached) " >&6
3385else
3386 if $as_echo 'TRUE=$(BAR$(V))
3387BAR0=false
3388BAR1=true
3389V=1
3390am__doit:
3391 @$(TRUE)
3392.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3393 am_cv_make_support_nested_variables=yes
3394else
3395 am_cv_make_support_nested_variables=no
3396fi
3397fi
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3399$as_echo "$am_cv_make_support_nested_variables" >&6; }
3400if test $am_cv_make_support_nested_variables = yes; then
3401 AM_V='$(V)'
3402 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3403else
3404 AM_V=$AM_DEFAULT_VERBOSITY
3405 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3406fi
3407AM_BACKSLASH='\'
3408
3409if test "`cd $srcdir && pwd`" != "`pwd`"; then
3410 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3411 # is not polluted with repeated "-I."
3412 am__isrc=' -I$(srcdir)'
3413 # test to see if srcdir already configured
3414 if test -f $srcdir/config.status; then
3415 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3416 fi
3417fi
3418
3419# test whether we have cygpath
3420if test -z "$CYGPATH_W"; then
3421 if (cygpath --version) >/dev/null 2>/dev/null; then
3422 CYGPATH_W='cygpath -w'
3423 else
3424 CYGPATH_W=echo
3425 fi
3426fi
3427
3428
3429# Define the identity of the package.
3430 PACKAGE='gdbsupport'
3431 VERSION='1.0'
3432
3433
3434cat >>confdefs.h <<_ACEOF
3435#define PACKAGE "$PACKAGE"
3436_ACEOF
3437
3438
3439cat >>confdefs.h <<_ACEOF
3440#define VERSION "$VERSION"
3441_ACEOF
3442
3443# Some tools Automake needs.
3444
3445ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3446
3447
3448AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3449
3450
3451AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3452
3453
3454AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3455
3456
3457MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3458
3459# For better backward compatibility. To be removed once Automake 1.9.x
3460# dies out for good. For more background, see:
3461# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3462# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3463mkdir_p='$(MKDIR_P)'
3464
3465# We need awk for the "check" target (and possibly the TAP driver). The
3466# system "awk" is bad on some platforms.
3467# Always define AMTAR for backward compatibility. Yes, it's still used
3468# in the wild :-( We should find a proper way to deprecate it ...
3469AMTAR='$${TAR-tar}'
3470
3471
3472# We'll loop over all known methods to create a tar archive until one works.
3473_am_tools='gnutar pax cpio none'
3474
3475am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3476
3477
3478
3479
3480
3481
3482# POSIX will say in a future version that running "rm -f" with no argument
3483# is OK; and we want to be able to make that assumption in our Makefile
3484# recipes. So use an aggressive probe to check that the usage we want is
3485# actually supported "in the wild" to an acceptable degree.
3486# See automake bug#10828.
3487# To make any issue more visible, cause the running configure to be aborted
3488# by default if the 'rm' program in use doesn't match our expectations; the
3489# user can still override this though.
3490if rm -f && rm -fr && rm -rf; then : OK; else
3491 cat >&2 <<'END'
3492Oops!
3493
3494Your 'rm' program seems unable to run without file operands specified
3495on the command line, even when the '-f' option is present. This is contrary
3496to the behaviour of most rm programs out there, and not conforming with
3497the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3498
3499Please tell bug-automake@gnu.org about your system, including the value
3500of your $PATH and any error possibly output before this message. This
3501can help us improve future automake versions.
3502
3503END
3504 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3505 echo 'Configuration will proceed anyway, since you have set the' >&2
3506 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3507 echo >&2
3508 else
3509 cat >&2 <<'END'
3510Aborting the configuration process, to ensure you take notice of the issue.
3511
3512You can download and install GNU coreutils to get an 'rm' implementation
3513that behaves properly: <http://www.gnu.org/software/coreutils/>.
3514
3515If you want to complete the configuration process using your problematic
3516'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3517to "yes", and re-run configure.
3518
3519END
3520 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3521 fi
3522fi
3523
3524# Check whether --enable-silent-rules was given.
3525if test "${enable_silent_rules+set}" = set; then :
3526 enableval=$enable_silent_rules;
3527fi
3528
3529case $enable_silent_rules in # (((
3530 yes) AM_DEFAULT_VERBOSITY=0;;
3531 no) AM_DEFAULT_VERBOSITY=1;;
3532 *) AM_DEFAULT_VERBOSITY=0;;
3533esac
3534am_make=${MAKE-make}
3535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3536$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3537if ${am_cv_make_support_nested_variables+:} false; then :
3538 $as_echo_n "(cached) " >&6
3539else
3540 if $as_echo 'TRUE=$(BAR$(V))
3541BAR0=false
3542BAR1=true
3543V=1
3544am__doit:
3545 @$(TRUE)
3546.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3547 am_cv_make_support_nested_variables=yes
3548else
3549 am_cv_make_support_nested_variables=no
3550fi
3551fi
3552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3553$as_echo "$am_cv_make_support_nested_variables" >&6; }
3554if test $am_cv_make_support_nested_variables = yes; then
3555 AM_V='$(V)'
3556 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3557else
3558 AM_V=$AM_DEFAULT_VERBOSITY
3559 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3560fi
3561AM_BACKSLASH='\'
3562
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569if test -n "$ac_tool_prefix"; then
3570 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3571set dummy ${ac_tool_prefix}gcc; ac_word=$2
3572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3573$as_echo_n "checking for $ac_word... " >&6; }
3574if ${ac_cv_prog_CC+:} false; then :
3575 $as_echo_n "(cached) " >&6
3576else
3577 if test -n "$CC"; then
3578 ac_cv_prog_CC="$CC" # Let the user override the test.
3579else
3580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3581for as_dir in $PATH
3582do
3583 IFS=$as_save_IFS
3584 test -z "$as_dir" && as_dir=.
3585 for ac_exec_ext in '' $ac_executable_extensions; do
3586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3587 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3589 break 2
3590 fi
3591done
3592 done
3593IFS=$as_save_IFS
3594
3595fi
3596fi
3597CC=$ac_cv_prog_CC
3598if test -n "$CC"; then
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3600$as_echo "$CC" >&6; }
3601else
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3603$as_echo "no" >&6; }
3604fi
3605
3606
3607fi
3608if test -z "$ac_cv_prog_CC"; then
3609 ac_ct_CC=$CC
3610 # Extract the first word of "gcc", so it can be a program name with args.
3611set dummy gcc; ac_word=$2
3612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
3614if ${ac_cv_prog_ac_ct_CC+:} false; then :
3615 $as_echo_n "(cached) " >&6
3616else
3617 if test -n "$ac_ct_CC"; then
3618 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3619else
3620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
3625 for ac_exec_ext in '' $ac_executable_extensions; do
3626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3627 ac_cv_prog_ac_ct_CC="gcc"
3628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3629 break 2
3630 fi
3631done
3632 done
3633IFS=$as_save_IFS
3634
3635fi
3636fi
3637ac_ct_CC=$ac_cv_prog_ac_ct_CC
3638if test -n "$ac_ct_CC"; then
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3640$as_echo "$ac_ct_CC" >&6; }
3641else
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
3644fi
3645
3646 if test "x$ac_ct_CC" = x; then
3647 CC=""
3648 else
3649 case $cross_compiling:$ac_tool_warned in
3650yes:)
3651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3653ac_tool_warned=yes ;;
3654esac
3655 CC=$ac_ct_CC
3656 fi
3657else
3658 CC="$ac_cv_prog_CC"
3659fi
3660
3661if test -z "$CC"; then
3662 if test -n "$ac_tool_prefix"; then
3663 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3664set dummy ${ac_tool_prefix}cc; ac_word=$2
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3666$as_echo_n "checking for $ac_word... " >&6; }
3667if ${ac_cv_prog_CC+:} false; then :
3668 $as_echo_n "(cached) " >&6
3669else
3670 if test -n "$CC"; then
3671 ac_cv_prog_CC="$CC" # Let the user override the test.
3672else
3673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
3678 for ac_exec_ext in '' $ac_executable_extensions; do
3679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3680 ac_cv_prog_CC="${ac_tool_prefix}cc"
3681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3682 break 2
3683 fi
3684done
3685 done
3686IFS=$as_save_IFS
3687
3688fi
3689fi
3690CC=$ac_cv_prog_CC
3691if test -n "$CC"; then
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3693$as_echo "$CC" >&6; }
3694else
3695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696$as_echo "no" >&6; }
3697fi
3698
3699
3700 fi
3701fi
3702if test -z "$CC"; then
3703 # Extract the first word of "cc", so it can be a program name with args.
3704set dummy cc; ac_word=$2
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
3707if ${ac_cv_prog_CC+:} false; then :
3708 $as_echo_n "(cached) " >&6
3709else
3710 if test -n "$CC"; then
3711 ac_cv_prog_CC="$CC" # Let the user override the test.
3712else
3713 ac_prog_rejected=no
3714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715for as_dir in $PATH
3716do
3717 IFS=$as_save_IFS
3718 test -z "$as_dir" && as_dir=.
3719 for ac_exec_ext in '' $ac_executable_extensions; do
3720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3721 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3722 ac_prog_rejected=yes
3723 continue
3724 fi
3725 ac_cv_prog_CC="cc"
3726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3727 break 2
3728 fi
3729done
3730 done
3731IFS=$as_save_IFS
3732
3733if test $ac_prog_rejected = yes; then
3734 # We found a bogon in the path, so make sure we never use it.
3735 set dummy $ac_cv_prog_CC
3736 shift
3737 if test $# != 0; then
3738 # We chose a different compiler from the bogus one.
3739 # However, it has the same basename, so the bogon will be chosen
3740 # first if we set CC to just the basename; use the full file name.
3741 shift
3742 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3743 fi
3744fi
3745fi
3746fi
3747CC=$ac_cv_prog_CC
3748if test -n "$CC"; then
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
3751else
3752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
3754fi
3755
3756
3757fi
3758if test -z "$CC"; then
3759 if test -n "$ac_tool_prefix"; then
3760 for ac_prog in cl.exe
3761 do
3762 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3763set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3765$as_echo_n "checking for $ac_word... " >&6; }
3766if ${ac_cv_prog_CC+:} false; then :
3767 $as_echo_n "(cached) " >&6
3768else
3769 if test -n "$CC"; then
3770 ac_cv_prog_CC="$CC" # Let the user override the test.
3771else
3772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3773for as_dir in $PATH
3774do
3775 IFS=$as_save_IFS
3776 test -z "$as_dir" && as_dir=.
3777 for ac_exec_ext in '' $ac_executable_extensions; do
3778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3779 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3781 break 2
3782 fi
3783done
3784 done
3785IFS=$as_save_IFS
3786
3787fi
3788fi
3789CC=$ac_cv_prog_CC
3790if test -n "$CC"; then
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3792$as_echo "$CC" >&6; }
3793else
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795$as_echo "no" >&6; }
3796fi
3797
3798
3799 test -n "$CC" && break
3800 done
3801fi
3802if test -z "$CC"; then
3803 ac_ct_CC=$CC
3804 for ac_prog in cl.exe
3805do
3806 # Extract the first word of "$ac_prog", so it can be a program name with args.
3807set dummy $ac_prog; ac_word=$2
3808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3809$as_echo_n "checking for $ac_word... " >&6; }
3810if ${ac_cv_prog_ac_ct_CC+:} false; then :
3811 $as_echo_n "(cached) " >&6
3812else
3813 if test -n "$ac_ct_CC"; then
3814 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3815else
3816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3817for as_dir in $PATH
3818do
3819 IFS=$as_save_IFS
3820 test -z "$as_dir" && as_dir=.
3821 for ac_exec_ext in '' $ac_executable_extensions; do
3822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3823 ac_cv_prog_ac_ct_CC="$ac_prog"
3824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3825 break 2
3826 fi
3827done
3828 done
3829IFS=$as_save_IFS
3830
3831fi
3832fi
3833ac_ct_CC=$ac_cv_prog_ac_ct_CC
3834if test -n "$ac_ct_CC"; then
3835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3836$as_echo "$ac_ct_CC" >&6; }
3837else
3838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3839$as_echo "no" >&6; }
3840fi
3841
3842
3843 test -n "$ac_ct_CC" && break
3844done
3845
3846 if test "x$ac_ct_CC" = x; then
3847 CC=""
3848 else
3849 case $cross_compiling:$ac_tool_warned in
3850yes:)
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3853ac_tool_warned=yes ;;
3854esac
3855 CC=$ac_ct_CC
3856 fi
3857fi
3858
3859fi
3860
3861
3862test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3864as_fn_error $? "no acceptable C compiler found in \$PATH
3865See \`config.log' for more details" "$LINENO" 5; }
3866
3867# Provide some information about the compiler.
3868$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3869set X $ac_compile
3870ac_compiler=$2
3871for ac_option in --version -v -V -qversion; do
3872 { { ac_try="$ac_compiler $ac_option >&5"
3873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
3877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3878$as_echo "$ac_try_echo"; } >&5
3879 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3880 ac_status=$?
3881 if test -s conftest.err; then
3882 sed '10a\
3883... rest of stderr output deleted ...
3884 10q' conftest.err >conftest.er1
3885 cat conftest.er1 >&5
3886 fi
3887 rm -f conftest.er1 conftest.err
3888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3889 test $ac_status = 0; }
3890done
3891
3892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3893/* end confdefs.h. */
3894
3895int
3896main ()
3897{
3898
3899 ;
3900 return 0;
3901}
3902_ACEOF
3903ac_clean_files_save=$ac_clean_files
3904ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3905# Try to create an executable without -o first, disregard a.out.
3906# It will help us diagnose broken compilers, and finding out an intuition
3907# of exeext.
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3909$as_echo_n "checking whether the C compiler works... " >&6; }
3910ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3911
3912# The possible output files:
3913ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3914
3915ac_rmfiles=
3916for ac_file in $ac_files
3917do
3918 case $ac_file in
3919 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3920 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3921 esac
3922done
3923rm -f $ac_rmfiles
3924
3925if { { ac_try="$ac_link_default"
3926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
3930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
3932 (eval "$ac_link_default") 2>&5
3933 ac_status=$?
3934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }; then :
3936 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3937# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3938# in a Makefile. We should not override ac_cv_exeext if it was cached,
3939# so that the user can short-circuit this test for compilers unknown to
3940# Autoconf.
3941for ac_file in $ac_files ''
3942do
3943 test -f "$ac_file" || continue
3944 case $ac_file in
3945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3946 ;;
3947 [ab].out )
3948 # We found the default executable, but exeext='' is most
3949 # certainly right.
3950 break;;
3951 *.* )
3952 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3953 then :; else
3954 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3955 fi
3956 # We set ac_cv_exeext here because the later test for it is not
3957 # safe: cross compilers may not add the suffix if given an `-o'
3958 # argument, so we may need to know it at that point already.
3959 # Even if this section looks crufty: it has the advantage of
3960 # actually working.
3961 break;;
3962 * )
3963 break;;
3964 esac
3965done
3966test "$ac_cv_exeext" = no && ac_cv_exeext=
3967
3968else
3969 ac_file=''
3970fi
3971if test -z "$ac_file"; then :
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974$as_echo "$as_me: failed program was:" >&5
3975sed 's/^/| /' conftest.$ac_ext >&5
3976
3977{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3979as_fn_error 77 "C compiler cannot create executables
3980See \`config.log' for more details" "$LINENO" 5; }
3981else
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3983$as_echo "yes" >&6; }
3984fi
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3986$as_echo_n "checking for C compiler default output file name... " >&6; }
3987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3988$as_echo "$ac_file" >&6; }
3989ac_exeext=$ac_cv_exeext
3990
3991rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3992ac_clean_files=$ac_clean_files_save
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3994$as_echo_n "checking for suffix of executables... " >&6; }
3995if { { ac_try="$ac_link"
3996case "(($ac_try" in
3997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3998 *) ac_try_echo=$ac_try;;
3999esac
4000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4001$as_echo "$ac_try_echo"; } >&5
4002 (eval "$ac_link") 2>&5
4003 ac_status=$?
4004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4005 test $ac_status = 0; }; then :
4006 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4007# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4008# work properly (i.e., refer to `conftest.exe'), while it won't with
4009# `rm'.
4010for ac_file in conftest.exe conftest conftest.*; do
4011 test -f "$ac_file" || continue
4012 case $ac_file in
4013 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4014 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4015 break;;
4016 * ) break;;
4017 esac
4018done
4019else
4020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4022as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4023See \`config.log' for more details" "$LINENO" 5; }
4024fi
4025rm -f conftest conftest$ac_cv_exeext
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4027$as_echo "$ac_cv_exeext" >&6; }
4028
4029rm -f conftest.$ac_ext
4030EXEEXT=$ac_cv_exeext
4031ac_exeext=$EXEEXT
4032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4033/* end confdefs.h. */
4034#include <stdio.h>
4035int
4036main ()
4037{
4038FILE *f = fopen ("conftest.out", "w");
4039 return ferror (f) || fclose (f) != 0;
4040
4041 ;
4042 return 0;
4043}
4044_ACEOF
4045ac_clean_files="$ac_clean_files conftest.out"
4046# Check that the compiler produces executables we can run. If not, either
4047# the compiler is broken, or we cross compile.
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4049$as_echo_n "checking whether we are cross compiling... " >&6; }
4050if test "$cross_compiling" != yes; then
4051 { { ac_try="$ac_link"
4052case "(($ac_try" in
4053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4054 *) ac_try_echo=$ac_try;;
4055esac
4056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4057$as_echo "$ac_try_echo"; } >&5
4058 (eval "$ac_link") 2>&5
4059 ac_status=$?
4060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4061 test $ac_status = 0; }
4062 if { ac_try='./conftest$ac_cv_exeext'
4063 { { case "(($ac_try" in
4064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065 *) ac_try_echo=$ac_try;;
4066esac
4067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068$as_echo "$ac_try_echo"; } >&5
4069 (eval "$ac_try") 2>&5
4070 ac_status=$?
4071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072 test $ac_status = 0; }; }; then
4073 cross_compiling=no
4074 else
4075 if test "$cross_compiling" = maybe; then
4076 cross_compiling=yes
4077 else
4078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4080as_fn_error $? "cannot run C compiled programs.
4081If you meant to cross compile, use \`--host'.
4082See \`config.log' for more details" "$LINENO" 5; }
4083 fi
4084 fi
4085fi
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4087$as_echo "$cross_compiling" >&6; }
4088
4089rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4090ac_clean_files=$ac_clean_files_save
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4092$as_echo_n "checking for suffix of object files... " >&6; }
4093if ${ac_cv_objext+:} false; then :
4094 $as_echo_n "(cached) " >&6
4095else
4096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4097/* end confdefs.h. */
4098
4099int
4100main ()
4101{
4102
4103 ;
4104 return 0;
4105}
4106_ACEOF
4107rm -f conftest.o conftest.obj
4108if { { ac_try="$ac_compile"
4109case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_compile") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }; then :
4119 for ac_file in conftest.o conftest.obj conftest.*; do
4120 test -f "$ac_file" || continue;
4121 case $ac_file in
4122 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4123 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4124 break;;
4125 esac
4126done
4127else
4128 $as_echo "$as_me: failed program was:" >&5
4129sed 's/^/| /' conftest.$ac_ext >&5
4130
4131{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4133as_fn_error $? "cannot compute suffix of object files: cannot compile
4134See \`config.log' for more details" "$LINENO" 5; }
4135fi
4136rm -f conftest.$ac_cv_objext conftest.$ac_ext
4137fi
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4139$as_echo "$ac_cv_objext" >&6; }
4140OBJEXT=$ac_cv_objext
4141ac_objext=$OBJEXT
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4143$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4144if ${ac_cv_c_compiler_gnu+:} false; then :
4145 $as_echo_n "(cached) " >&6
4146else
4147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4148/* end confdefs.h. */
4149
4150int
4151main ()
4152{
4153#ifndef __GNUC__
4154 choke me
4155#endif
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
4161if ac_fn_c_try_compile "$LINENO"; then :
4162 ac_compiler_gnu=yes
4163else
4164 ac_compiler_gnu=no
4165fi
4166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4167ac_cv_c_compiler_gnu=$ac_compiler_gnu
4168
4169fi
4170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4171$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4172if test $ac_compiler_gnu = yes; then
4173 GCC=yes
4174else
4175 GCC=
4176fi
4177ac_test_CFLAGS=${CFLAGS+set}
4178ac_save_CFLAGS=$CFLAGS
4179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4180$as_echo_n "checking whether $CC accepts -g... " >&6; }
4181if ${ac_cv_prog_cc_g+:} false; then :
4182 $as_echo_n "(cached) " >&6
4183else
4184 ac_save_c_werror_flag=$ac_c_werror_flag
4185 ac_c_werror_flag=yes
4186 ac_cv_prog_cc_g=no
4187 CFLAGS="-g"
4188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189/* end confdefs.h. */
4190
4191int
4192main ()
4193{
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
4199if ac_fn_c_try_compile "$LINENO"; then :
4200 ac_cv_prog_cc_g=yes
4201else
4202 CFLAGS=""
4203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4204/* end confdefs.h. */
4205
4206int
4207main ()
4208{
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
4214if ac_fn_c_try_compile "$LINENO"; then :
4215
4216else
4217 ac_c_werror_flag=$ac_save_c_werror_flag
4218 CFLAGS="-g"
4219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4220/* end confdefs.h. */
4221
4222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
4230if ac_fn_c_try_compile "$LINENO"; then :
4231 ac_cv_prog_cc_g=yes
4232fi
4233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234fi
4235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236fi
4237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4238 ac_c_werror_flag=$ac_save_c_werror_flag
4239fi
4240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4241$as_echo "$ac_cv_prog_cc_g" >&6; }
4242if test "$ac_test_CFLAGS" = set; then
4243 CFLAGS=$ac_save_CFLAGS
4244elif test $ac_cv_prog_cc_g = yes; then
4245 if test "$GCC" = yes; then
4246 CFLAGS="-g -O2"
4247 else
4248 CFLAGS="-g"
4249 fi
4250else
4251 if test "$GCC" = yes; then
4252 CFLAGS="-O2"
4253 else
4254 CFLAGS=
4255 fi
4256fi
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4258$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4259if ${ac_cv_prog_cc_c89+:} false; then :
4260 $as_echo_n "(cached) " >&6
4261else
4262 ac_cv_prog_cc_c89=no
4263ac_save_CC=$CC
4264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4265/* end confdefs.h. */
4266#include <stdarg.h>
4267#include <stdio.h>
4268struct stat;
4269/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4270struct buf { int x; };
4271FILE * (*rcsopen) (struct buf *, struct stat *, int);
4272static char *e (p, i)
4273 char **p;
4274 int i;
4275{
4276 return p[i];
4277}
4278static char *f (char * (*g) (char **, int), char **p, ...)
4279{
4280 char *s;
4281 va_list v;
4282 va_start (v,p);
4283 s = g (p, va_arg (v,int));
4284 va_end (v);
4285 return s;
4286}
4287
4288/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4289 function prototypes and stuff, but not '\xHH' hex character constants.
4290 These don't provoke an error unfortunately, instead are silently treated
4291 as 'x'. The following induces an error, until -std is added to get
4292 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4293 array size at least. It's necessary to write '\x00'==0 to get something
4294 that's true only with -std. */
4295int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4296
4297/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4298 inside strings and character constants. */
4299#define FOO(x) 'x'
4300int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4301
4302int test (int i, double x);
4303struct s1 {int (*f) (int a);};
4304struct s2 {int (*f) (double a);};
4305int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4306int argc;
4307char **argv;
4308int
4309main ()
4310{
4311return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4312 ;
4313 return 0;
4314}
4315_ACEOF
4316for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4317 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4318do
4319 CC="$ac_save_CC $ac_arg"
4320 if ac_fn_c_try_compile "$LINENO"; then :
4321 ac_cv_prog_cc_c89=$ac_arg
4322fi
4323rm -f core conftest.err conftest.$ac_objext
4324 test "x$ac_cv_prog_cc_c89" != "xno" && break
4325done
4326rm -f conftest.$ac_ext
4327CC=$ac_save_CC
4328
4329fi
4330# AC_CACHE_VAL
4331case "x$ac_cv_prog_cc_c89" in
4332 x)
4333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4334$as_echo "none needed" >&6; } ;;
4335 xno)
4336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4337$as_echo "unsupported" >&6; } ;;
4338 *)
4339 CC="$CC $ac_cv_prog_cc_c89"
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4341$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4342esac
4343if test "x$ac_cv_prog_cc_c89" != xno; then :
4344
4345fi
4346
4347ac_ext=c
4348ac_cpp='$CPP $CPPFLAGS'
4349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4351ac_compiler_gnu=$ac_cv_c_compiler_gnu
4352
4353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
4358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4359$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4360if ${am_cv_prog_cc_c_o+:} false; then :
4361 $as_echo_n "(cached) " >&6
4362else
4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364/* end confdefs.h. */
4365
4366int
4367main ()
4368{
4369
4370 ;
4371 return 0;
4372}
4373_ACEOF
4374 # Make sure it works both with $CC and with simple cc.
4375 # Following AC_PROG_CC_C_O, we do the test twice because some
4376 # compilers refuse to overwrite an existing .o file with -o,
4377 # though they will create one.
4378 am_cv_prog_cc_c_o=yes
4379 for am_i in 1 2; do
4380 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4381 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4382 ac_status=$?
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4384 (exit $ac_status); } \
4385 && test -f conftest2.$ac_objext; then
4386 : OK
4387 else
4388 am_cv_prog_cc_c_o=no
4389 break
4390 fi
4391 done
4392 rm -f core conftest*
4393 unset am_i
4394fi
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4396$as_echo "$am_cv_prog_cc_c_o" >&6; }
4397if test "$am_cv_prog_cc_c_o" != yes; then
4398 # Losing compiler, so override with the script.
4399 # FIXME: It is wrong to rewrite CC.
4400 # But if we don't then we get into trouble of one sort or another.
4401 # A longer-term fix would be to have automake use am__CC in this case,
4402 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4403 CC="$am_aux_dir/compile $CC"
4404fi
4405ac_ext=c
4406ac_cpp='$CPP $CPPFLAGS'
4407ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4408ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4409ac_compiler_gnu=$ac_cv_c_compiler_gnu
4410
4411DEPDIR="${am__leading_dot}deps"
4412
4413ac_config_commands="$ac_config_commands depfiles"
4414
4415
4416am_make=${MAKE-make}
4417cat > confinc << 'END'
4418am__doit:
4419 @echo this is the am__doit target
4420.PHONY: am__doit
4421END
4422# If we don't find an include directive, just comment out the code.
4423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4424$as_echo_n "checking for style of include used by $am_make... " >&6; }
4425am__include="#"
4426am__quote=
4427_am_result=none
4428# First try GNU make style include.
4429echo "include confinc" > confmf
4430# Ignore all kinds of additional output from 'make'.
4431case `$am_make -s -f confmf 2> /dev/null` in #(
4432*the\ am__doit\ target*)
4433 am__include=include
4434 am__quote=
4435 _am_result=GNU
4436 ;;
4437esac
4438# Now try BSD make style include.
4439if test "$am__include" = "#"; then
4440 echo '.include "confinc"' > confmf
4441 case `$am_make -s -f confmf 2> /dev/null` in #(
4442 *the\ am__doit\ target*)
4443 am__include=.include
4444 am__quote="\""
4445 _am_result=BSD
4446 ;;
4447 esac
4448fi
4449
4450
4451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4452$as_echo "$_am_result" >&6; }
4453rm -f confinc confmf
4454
4455# Check whether --enable-dependency-tracking was given.
4456if test "${enable_dependency_tracking+set}" = set; then :
4457 enableval=$enable_dependency_tracking;
4458fi
4459
4460if test "x$enable_dependency_tracking" != xno; then
4461 am_depcomp="$ac_aux_dir/depcomp"
4462 AMDEPBACKSLASH='\'
4463 am__nodep='_no'
4464fi
4465 if test "x$enable_dependency_tracking" != xno; then
4466 AMDEP_TRUE=
4467 AMDEP_FALSE='#'
4468else
4469 AMDEP_TRUE='#'
4470 AMDEP_FALSE=
4471fi
4472
4473
4474
4475depcc="$CC" am_compiler_list=
4476
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4478$as_echo_n "checking dependency style of $depcc... " >&6; }
4479if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4480 $as_echo_n "(cached) " >&6
4481else
4482 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4483 # We make a subdir and do the tests there. Otherwise we can end up
4484 # making bogus files that we don't know about and never remove. For
4485 # instance it was reported that on HP-UX the gcc test will end up
4486 # making a dummy file named 'D' -- because '-MD' means "put the output
4487 # in D".
4488 rm -rf conftest.dir
4489 mkdir conftest.dir
4490 # Copy depcomp to subdir because otherwise we won't find it if we're
4491 # using a relative directory.
4492 cp "$am_depcomp" conftest.dir
4493 cd conftest.dir
4494 # We will build objects and dependencies in a subdirectory because
4495 # it helps to detect inapplicable dependency modes. For instance
4496 # both Tru64's cc and ICC support -MD to output dependencies as a
4497 # side effect of compilation, but ICC will put the dependencies in
4498 # the current directory while Tru64 will put them in the object
4499 # directory.
4500 mkdir sub
4501
4502 am_cv_CC_dependencies_compiler_type=none
4503 if test "$am_compiler_list" = ""; then
4504 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4505 fi
4506 am__universal=false
4507 case " $depcc " in #(
4508 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4509 esac
4510
4511 for depmode in $am_compiler_list; do
4512 # Setup a source with many dependencies, because some compilers
4513 # like to wrap large dependency lists on column 80 (with \), and
4514 # we should not choose a depcomp mode which is confused by this.
4515 #
4516 # We need to recreate these files for each test, as the compiler may
4517 # overwrite some of them when testing with obscure command lines.
4518 # This happens at least with the AIX C compiler.
4519 : > sub/conftest.c
4520 for i in 1 2 3 4 5 6; do
4521 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4522 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4523 # Solaris 10 /bin/sh.
4524 echo '/* dummy */' > sub/conftst$i.h
4525 done
4526 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4527
4528 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4529 # mode. It turns out that the SunPro C++ compiler does not properly
4530 # handle '-M -o', and we need to detect this. Also, some Intel
4531 # versions had trouble with output in subdirs.
4532 am__obj=sub/conftest.${OBJEXT-o}
4533 am__minus_obj="-o $am__obj"
4534 case $depmode in
4535 gcc)
4536 # This depmode causes a compiler race in universal mode.
4537 test "$am__universal" = false || continue
4538 ;;
4539 nosideeffect)
4540 # After this tag, mechanisms are not by side-effect, so they'll
4541 # only be used when explicitly requested.
4542 if test "x$enable_dependency_tracking" = xyes; then
4543 continue
4544 else
4545 break
4546 fi
4547 ;;
4548 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4549 # This compiler won't grok '-c -o', but also, the minuso test has
4550 # not run yet. These depmodes are late enough in the game, and
4551 # so weak that their functioning should not be impacted.
4552 am__obj=conftest.${OBJEXT-o}
4553 am__minus_obj=
4554 ;;
4555 none) break ;;
4556 esac
4557 if depmode=$depmode \
4558 source=sub/conftest.c object=$am__obj \
4559 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4560 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4561 >/dev/null 2>conftest.err &&
4562 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4563 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4564 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4565 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4566 # icc doesn't choke on unknown options, it will just issue warnings
4567 # or remarks (even with -Werror). So we grep stderr for any message
4568 # that says an option was ignored or not supported.
4569 # When given -MP, icc 7.0 and 7.1 complain thusly:
4570 # icc: Command line warning: ignoring option '-M'; no argument required
4571 # The diagnosis changed in icc 8.0:
4572 # icc: Command line remark: option '-MP' not supported
4573 if (grep 'ignoring option' conftest.err ||
4574 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4575 am_cv_CC_dependencies_compiler_type=$depmode
4576 break
4577 fi
4578 fi
4579 done
4580
4581 cd ..
4582 rm -rf conftest.dir
4583else
4584 am_cv_CC_dependencies_compiler_type=none
4585fi
4586
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4589$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4590CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4591
4592 if
4593 test "x$enable_dependency_tracking" != xno \
4594 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4595 am__fastdepCC_TRUE=
4596 am__fastdepCC_FALSE='#'
4597else
4598 am__fastdepCC_TRUE='#'
4599 am__fastdepCC_FALSE=
4600fi
4601
4602
4603ac_ext=cpp
4604ac_cpp='$CXXCPP $CPPFLAGS'
4605ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4606ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4607ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4608if test -z "$CXX"; then
4609 if test -n "$CCC"; then
4610 CXX=$CCC
4611 else
4612 if test -n "$ac_tool_prefix"; then
4613 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4614 do
4615 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4618$as_echo_n "checking for $ac_word... " >&6; }
4619if ${ac_cv_prog_CXX+:} false; then :
4620 $as_echo_n "(cached) " >&6
4621else
4622 if test -n "$CXX"; then
4623 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4624else
4625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626for as_dir in $PATH
4627do
4628 IFS=$as_save_IFS
4629 test -z "$as_dir" && as_dir=.
4630 for ac_exec_ext in '' $ac_executable_extensions; do
4631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634 break 2
4635 fi
4636done
4637 done
4638IFS=$as_save_IFS
4639
4640fi
4641fi
4642CXX=$ac_cv_prog_CXX
4643if test -n "$CXX"; then
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4645$as_echo "$CXX" >&6; }
4646else
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4648$as_echo "no" >&6; }
4649fi
4650
4651
4652 test -n "$CXX" && break
4653 done
4654fi
4655if test -z "$CXX"; then
4656 ac_ct_CXX=$CXX
4657 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4658do
4659 # Extract the first word of "$ac_prog", so it can be a program name with args.
4660set dummy $ac_prog; ac_word=$2
4661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
4663if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4664 $as_echo_n "(cached) " >&6
4665else
4666 if test -n "$ac_ct_CXX"; then
4667 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4668else
4669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in $PATH
4671do
4672 IFS=$as_save_IFS
4673 test -z "$as_dir" && as_dir=.
4674 for ac_exec_ext in '' $ac_executable_extensions; do
4675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4676 ac_cv_prog_ac_ct_CXX="$ac_prog"
4677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678 break 2
4679 fi
4680done
4681 done
4682IFS=$as_save_IFS
4683
4684fi
4685fi
4686ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4687if test -n "$ac_ct_CXX"; then
4688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4689$as_echo "$ac_ct_CXX" >&6; }
4690else
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
4693fi
4694
4695
4696 test -n "$ac_ct_CXX" && break
4697done
4698
4699 if test "x$ac_ct_CXX" = x; then
4700 CXX="g++"
4701 else
4702 case $cross_compiling:$ac_tool_warned in
4703yes:)
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4706ac_tool_warned=yes ;;
4707esac
4708 CXX=$ac_ct_CXX
4709 fi
4710fi
4711
4712 fi
4713fi
4714# Provide some information about the compiler.
4715$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4716set X $ac_compile
4717ac_compiler=$2
4718for ac_option in --version -v -V -qversion; do
4719 { { ac_try="$ac_compiler $ac_option >&5"
4720case "(($ac_try" in
4721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4722 *) ac_try_echo=$ac_try;;
4723esac
4724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4725$as_echo "$ac_try_echo"; } >&5
4726 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4727 ac_status=$?
4728 if test -s conftest.err; then
4729 sed '10a\
4730... rest of stderr output deleted ...
4731 10q' conftest.err >conftest.er1
4732 cat conftest.er1 >&5
4733 fi
4734 rm -f conftest.er1 conftest.err
4735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4736 test $ac_status = 0; }
4737done
4738
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4740$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4741if ${ac_cv_cxx_compiler_gnu+:} false; then :
4742 $as_echo_n "(cached) " >&6
4743else
4744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4745/* end confdefs.h. */
4746
4747int
4748main ()
4749{
4750#ifndef __GNUC__
4751 choke me
4752#endif
4753
4754 ;
4755 return 0;
4756}
4757_ACEOF
4758if ac_fn_cxx_try_compile "$LINENO"; then :
4759 ac_compiler_gnu=yes
4760else
4761 ac_compiler_gnu=no
4762fi
4763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4764ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4765
4766fi
4767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4768$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4769if test $ac_compiler_gnu = yes; then
4770 GXX=yes
4771else
4772 GXX=
4773fi
4774ac_test_CXXFLAGS=${CXXFLAGS+set}
4775ac_save_CXXFLAGS=$CXXFLAGS
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4777$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4778if ${ac_cv_prog_cxx_g+:} false; then :
4779 $as_echo_n "(cached) " >&6
4780else
4781 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4782 ac_cxx_werror_flag=yes
4783 ac_cv_prog_cxx_g=no
4784 CXXFLAGS="-g"
4785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4786/* end confdefs.h. */
4787
4788int
4789main ()
4790{
4791
4792 ;
4793 return 0;
4794}
4795_ACEOF
4796if ac_fn_cxx_try_compile "$LINENO"; then :
4797 ac_cv_prog_cxx_g=yes
4798else
4799 CXXFLAGS=""
4800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4801/* end confdefs.h. */
4802
4803int
4804main ()
4805{
4806
4807 ;
4808 return 0;
4809}
4810_ACEOF
4811if ac_fn_cxx_try_compile "$LINENO"; then :
4812
4813else
4814 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4815 CXXFLAGS="-g"
4816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817/* end confdefs.h. */
4818
4819int
4820main ()
4821{
4822
4823 ;
4824 return 0;
4825}
4826_ACEOF
4827if ac_fn_cxx_try_compile "$LINENO"; then :
4828 ac_cv_prog_cxx_g=yes
4829fi
4830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831fi
4832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4833fi
4834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4835 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4836fi
4837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4838$as_echo "$ac_cv_prog_cxx_g" >&6; }
4839if test "$ac_test_CXXFLAGS" = set; then
4840 CXXFLAGS=$ac_save_CXXFLAGS
4841elif test $ac_cv_prog_cxx_g = yes; then
4842 if test "$GXX" = yes; then
4843 CXXFLAGS="-g -O2"
4844 else
4845 CXXFLAGS="-g"
4846 fi
4847else
4848 if test "$GXX" = yes; then
4849 CXXFLAGS="-O2"
4850 else
4851 CXXFLAGS=
4852 fi
4853fi
4854ac_ext=c
4855ac_cpp='$CPP $CPPFLAGS'
4856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4858ac_compiler_gnu=$ac_cv_c_compiler_gnu
4859
4860depcc="$CXX" am_compiler_list=
4861
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4863$as_echo_n "checking dependency style of $depcc... " >&6; }
4864if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4868 # We make a subdir and do the tests there. Otherwise we can end up
4869 # making bogus files that we don't know about and never remove. For
4870 # instance it was reported that on HP-UX the gcc test will end up
4871 # making a dummy file named 'D' -- because '-MD' means "put the output
4872 # in D".
4873 rm -rf conftest.dir
4874 mkdir conftest.dir
4875 # Copy depcomp to subdir because otherwise we won't find it if we're
4876 # using a relative directory.
4877 cp "$am_depcomp" conftest.dir
4878 cd conftest.dir
4879 # We will build objects and dependencies in a subdirectory because
4880 # it helps to detect inapplicable dependency modes. For instance
4881 # both Tru64's cc and ICC support -MD to output dependencies as a
4882 # side effect of compilation, but ICC will put the dependencies in
4883 # the current directory while Tru64 will put them in the object
4884 # directory.
4885 mkdir sub
4886
4887 am_cv_CXX_dependencies_compiler_type=none
4888 if test "$am_compiler_list" = ""; then
4889 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4890 fi
4891 am__universal=false
4892 case " $depcc " in #(
4893 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4894 esac
4895
4896 for depmode in $am_compiler_list; do
4897 # Setup a source with many dependencies, because some compilers
4898 # like to wrap large dependency lists on column 80 (with \), and
4899 # we should not choose a depcomp mode which is confused by this.
4900 #
4901 # We need to recreate these files for each test, as the compiler may
4902 # overwrite some of them when testing with obscure command lines.
4903 # This happens at least with the AIX C compiler.
4904 : > sub/conftest.c
4905 for i in 1 2 3 4 5 6; do
4906 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4907 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4908 # Solaris 10 /bin/sh.
4909 echo '/* dummy */' > sub/conftst$i.h
4910 done
4911 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4912
4913 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4914 # mode. It turns out that the SunPro C++ compiler does not properly
4915 # handle '-M -o', and we need to detect this. Also, some Intel
4916 # versions had trouble with output in subdirs.
4917 am__obj=sub/conftest.${OBJEXT-o}
4918 am__minus_obj="-o $am__obj"
4919 case $depmode in
4920 gcc)
4921 # This depmode causes a compiler race in universal mode.
4922 test "$am__universal" = false || continue
4923 ;;
4924 nosideeffect)
4925 # After this tag, mechanisms are not by side-effect, so they'll
4926 # only be used when explicitly requested.
4927 if test "x$enable_dependency_tracking" = xyes; then
4928 continue
4929 else
4930 break
4931 fi
4932 ;;
4933 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4934 # This compiler won't grok '-c -o', but also, the minuso test has
4935 # not run yet. These depmodes are late enough in the game, and
4936 # so weak that their functioning should not be impacted.
4937 am__obj=conftest.${OBJEXT-o}
4938 am__minus_obj=
4939 ;;
4940 none) break ;;
4941 esac
4942 if depmode=$depmode \
4943 source=sub/conftest.c object=$am__obj \
4944 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4945 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4946 >/dev/null 2>conftest.err &&
4947 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4948 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4949 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4950 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4951 # icc doesn't choke on unknown options, it will just issue warnings
4952 # or remarks (even with -Werror). So we grep stderr for any message
4953 # that says an option was ignored or not supported.
4954 # When given -MP, icc 7.0 and 7.1 complain thusly:
4955 # icc: Command line warning: ignoring option '-M'; no argument required
4956 # The diagnosis changed in icc 8.0:
4957 # icc: Command line remark: option '-MP' not supported
4958 if (grep 'ignoring option' conftest.err ||
4959 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4960 am_cv_CXX_dependencies_compiler_type=$depmode
4961 break
4962 fi
4963 fi
4964 done
4965
4966 cd ..
4967 rm -rf conftest.dir
4968else
4969 am_cv_CXX_dependencies_compiler_type=none
4970fi
4971
4972fi
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
4974$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
4975CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
4976
4977 if
4978 test "x$enable_dependency_tracking" != xno \
4979 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
4980 am__fastdepCXX_TRUE=
4981 am__fastdepCXX_FALSE='#'
4982else
4983 am__fastdepCXX_TRUE='#'
4984 am__fastdepCXX_FALSE=
4985fi
4986
4987
4988if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_prog_RANLIB+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
4996 if test -n "$RANLIB"; then
4997 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4998else
4999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002 IFS=$as_save_IFS
5003 test -z "$as_dir" && as_dir=.
5004 for ac_exec_ext in '' $ac_executable_extensions; do
5005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5006 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5008 break 2
5009 fi
5010done
5011 done
5012IFS=$as_save_IFS
5013
5014fi
5015fi
5016RANLIB=$ac_cv_prog_RANLIB
5017if test -n "$RANLIB"; then
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5019$as_echo "$RANLIB" >&6; }
5020else
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
5023fi
5024
5025
5026fi
5027if test -z "$ac_cv_prog_RANLIB"; then
5028 ac_ct_RANLIB=$RANLIB
5029 # Extract the first word of "ranlib", so it can be a program name with args.
5030set dummy ranlib; ac_word=$2
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
5033if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5034 $as_echo_n "(cached) " >&6
5035else
5036 if test -n "$ac_ct_RANLIB"; then
5037 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5038else
5039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046 ac_cv_prog_ac_ct_RANLIB="ranlib"
5047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048 break 2
5049 fi
5050done
5051 done
5052IFS=$as_save_IFS
5053
5054fi
5055fi
5056ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5057if test -n "$ac_ct_RANLIB"; then
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5059$as_echo "$ac_ct_RANLIB" >&6; }
5060else
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065 if test "x$ac_ct_RANLIB" = x; then
5066 RANLIB=":"
5067 else
5068 case $cross_compiling:$ac_tool_warned in
5069yes:)
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5072ac_tool_warned=yes ;;
5073esac
5074 RANLIB=$ac_ct_RANLIB
5075 fi
5076else
5077 RANLIB="$ac_cv_prog_RANLIB"
5078fi
5079
5080
5081
5082ac_ext=c
5083ac_cpp='$CPP $CPPFLAGS'
5084ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5085ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5086ac_compiler_gnu=$ac_cv_c_compiler_gnu
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5088$as_echo_n "checking how to run the C preprocessor... " >&6; }
5089# On Suns, sometimes $CPP names a directory.
5090if test -n "$CPP" && test -d "$CPP"; then
5091 CPP=
5092fi
5093if test -z "$CPP"; then
5094 if ${ac_cv_prog_CPP+:} false; then :
5095 $as_echo_n "(cached) " >&6
5096else
5097 # Double quotes because CPP needs to be expanded
5098 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5099 do
5100 ac_preproc_ok=false
5101for ac_c_preproc_warn_flag in '' yes
5102do
5103 # Use a header file that comes with gcc, so configuring glibc
5104 # with a fresh cross-compiler works.
5105 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5106 # <limits.h> exists even on freestanding compilers.
5107 # On the NeXT, cc -E runs the code through the compiler's parser,
5108 # not just through cpp. "Syntax error" is here to catch this case.
5109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5110/* end confdefs.h. */
5111#ifdef __STDC__
5112# include <limits.h>
5113#else
5114# include <assert.h>
5115#endif
5116 Syntax error
5117_ACEOF
5118if ac_fn_c_try_cpp "$LINENO"; then :
5119
5120else
5121 # Broken: fails on valid input.
5122continue
5123fi
5124rm -f conftest.err conftest.i conftest.$ac_ext
5125
5126 # OK, works on sane cases. Now check whether nonexistent headers
5127 # can be detected and how.
5128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5129/* end confdefs.h. */
5130#include <ac_nonexistent.h>
5131_ACEOF
5132if ac_fn_c_try_cpp "$LINENO"; then :
5133 # Broken: success on invalid input.
5134continue
5135else
5136 # Passes both tests.
5137ac_preproc_ok=:
5138break
5139fi
5140rm -f conftest.err conftest.i conftest.$ac_ext
5141
5142done
5143# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5144rm -f conftest.i conftest.err conftest.$ac_ext
5145if $ac_preproc_ok; then :
5146 break
5147fi
5148
5149 done
5150 ac_cv_prog_CPP=$CPP
5151
5152fi
5153 CPP=$ac_cv_prog_CPP
5154else
5155 ac_cv_prog_CPP=$CPP
5156fi
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5158$as_echo "$CPP" >&6; }
5159ac_preproc_ok=false
5160for ac_c_preproc_warn_flag in '' yes
5161do
5162 # Use a header file that comes with gcc, so configuring glibc
5163 # with a fresh cross-compiler works.
5164 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5165 # <limits.h> exists even on freestanding compilers.
5166 # On the NeXT, cc -E runs the code through the compiler's parser,
5167 # not just through cpp. "Syntax error" is here to catch this case.
5168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5169/* end confdefs.h. */
5170#ifdef __STDC__
5171# include <limits.h>
5172#else
5173# include <assert.h>
5174#endif
5175 Syntax error
5176_ACEOF
5177if ac_fn_c_try_cpp "$LINENO"; then :
5178
5179else
5180 # Broken: fails on valid input.
5181continue
5182fi
5183rm -f conftest.err conftest.i conftest.$ac_ext
5184
5185 # OK, works on sane cases. Now check whether nonexistent headers
5186 # can be detected and how.
5187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5188/* end confdefs.h. */
5189#include <ac_nonexistent.h>
5190_ACEOF
5191if ac_fn_c_try_cpp "$LINENO"; then :
5192 # Broken: success on invalid input.
5193continue
5194else
5195 # Passes both tests.
5196ac_preproc_ok=:
5197break
5198fi
5199rm -f conftest.err conftest.i conftest.$ac_ext
5200
5201done
5202# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5203rm -f conftest.i conftest.err conftest.$ac_ext
5204if $ac_preproc_ok; then :
5205
5206else
5207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5209as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5210See \`config.log' for more details" "$LINENO" 5; }
5211fi
5212
5213ac_ext=c
5214ac_cpp='$CPP $CPPFLAGS'
5215ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5216ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5217ac_compiler_gnu=$ac_cv_c_compiler_gnu
5218
5219
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5221$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5222if ${ac_cv_path_GREP+:} false; then :
5223 $as_echo_n "(cached) " >&6
5224else
5225 if test -z "$GREP"; then
5226 ac_path_GREP_found=false
5227 # Loop through the user's path and test for each of PROGNAME-LIST
5228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5230do
5231 IFS=$as_save_IFS
5232 test -z "$as_dir" && as_dir=.
5233 for ac_prog in grep ggrep; do
5234 for ac_exec_ext in '' $ac_executable_extensions; do
5235 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5236 as_fn_executable_p "$ac_path_GREP" || continue
5237# Check for GNU ac_path_GREP and select it if it is found.
5238 # Check for GNU $ac_path_GREP
5239case `"$ac_path_GREP" --version 2>&1` in
5240*GNU*)
5241 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5242*)
5243 ac_count=0
5244 $as_echo_n 0123456789 >"conftest.in"
5245 while :
5246 do
5247 cat "conftest.in" "conftest.in" >"conftest.tmp"
5248 mv "conftest.tmp" "conftest.in"
5249 cp "conftest.in" "conftest.nl"
5250 $as_echo 'GREP' >> "conftest.nl"
5251 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5252 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5253 as_fn_arith $ac_count + 1 && ac_count=$as_val
5254 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5255 # Best one so far, save it but keep looking for a better one
5256 ac_cv_path_GREP="$ac_path_GREP"
5257 ac_path_GREP_max=$ac_count
5258 fi
5259 # 10*(2^10) chars as input seems more than enough
5260 test $ac_count -gt 10 && break
5261 done
5262 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5263esac
5264
5265 $ac_path_GREP_found && break 3
5266 done
5267 done
5268 done
5269IFS=$as_save_IFS
5270 if test -z "$ac_cv_path_GREP"; then
5271 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5272 fi
5273else
5274 ac_cv_path_GREP=$GREP
5275fi
5276
5277fi
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5279$as_echo "$ac_cv_path_GREP" >&6; }
5280 GREP="$ac_cv_path_GREP"
5281
5282
5283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5284$as_echo_n "checking for egrep... " >&6; }
5285if ${ac_cv_path_EGREP+:} false; then :
5286 $as_echo_n "(cached) " >&6
5287else
5288 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5289 then ac_cv_path_EGREP="$GREP -E"
5290 else
5291 if test -z "$EGREP"; then
5292 ac_path_EGREP_found=false
5293 # Loop through the user's path and test for each of PROGNAME-LIST
5294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5296do
5297 IFS=$as_save_IFS
5298 test -z "$as_dir" && as_dir=.
5299 for ac_prog in egrep; do
5300 for ac_exec_ext in '' $ac_executable_extensions; do
5301 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5302 as_fn_executable_p "$ac_path_EGREP" || continue
5303# Check for GNU ac_path_EGREP and select it if it is found.
5304 # Check for GNU $ac_path_EGREP
5305case `"$ac_path_EGREP" --version 2>&1` in
5306*GNU*)
5307 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5308*)
5309 ac_count=0
5310 $as_echo_n 0123456789 >"conftest.in"
5311 while :
5312 do
5313 cat "conftest.in" "conftest.in" >"conftest.tmp"
5314 mv "conftest.tmp" "conftest.in"
5315 cp "conftest.in" "conftest.nl"
5316 $as_echo 'EGREP' >> "conftest.nl"
5317 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5318 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5319 as_fn_arith $ac_count + 1 && ac_count=$as_val
5320 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5321 # Best one so far, save it but keep looking for a better one
5322 ac_cv_path_EGREP="$ac_path_EGREP"
5323 ac_path_EGREP_max=$ac_count
5324 fi
5325 # 10*(2^10) chars as input seems more than enough
5326 test $ac_count -gt 10 && break
5327 done
5328 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5329esac
5330
5331 $ac_path_EGREP_found && break 3
5332 done
5333 done
5334 done
5335IFS=$as_save_IFS
5336 if test -z "$ac_cv_path_EGREP"; then
5337 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5338 fi
5339else
5340 ac_cv_path_EGREP=$EGREP
5341fi
5342
5343 fi
5344fi
5345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5346$as_echo "$ac_cv_path_EGREP" >&6; }
5347 EGREP="$ac_cv_path_EGREP"
5348
5349
5350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5351$as_echo_n "checking for ANSI C header files... " >&6; }
5352if ${ac_cv_header_stdc+:} false; then :
5353 $as_echo_n "(cached) " >&6
5354else
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357#include <stdlib.h>
5358#include <stdarg.h>
5359#include <string.h>
5360#include <float.h>
5361
5362int
5363main ()
5364{
5365
5366 ;
5367 return 0;
5368}
5369_ACEOF
5370if ac_fn_c_try_compile "$LINENO"; then :
5371 ac_cv_header_stdc=yes
5372else
5373 ac_cv_header_stdc=no
5374fi
5375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5376
5377if test $ac_cv_header_stdc = yes; then
5378 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5380/* end confdefs.h. */
5381#include <string.h>
5382
5383_ACEOF
5384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5385 $EGREP "memchr" >/dev/null 2>&1; then :
5386
5387else
5388 ac_cv_header_stdc=no
5389fi
5390rm -f conftest*
5391
5392fi
5393
5394if test $ac_cv_header_stdc = yes; then
5395 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397/* end confdefs.h. */
5398#include <stdlib.h>
5399
5400_ACEOF
5401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5402 $EGREP "free" >/dev/null 2>&1; then :
5403
5404else
5405 ac_cv_header_stdc=no
5406fi
5407rm -f conftest*
5408
5409fi
5410
5411if test $ac_cv_header_stdc = yes; then
5412 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5413 if test "$cross_compiling" = yes; then :
5414 :
5415else
5416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5417/* end confdefs.h. */
5418#include <ctype.h>
5419#include <stdlib.h>
5420#if ((' ' & 0x0FF) == 0x020)
5421# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5422# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5423#else
5424# define ISLOWER(c) \
5425 (('a' <= (c) && (c) <= 'i') \
5426 || ('j' <= (c) && (c) <= 'r') \
5427 || ('s' <= (c) && (c) <= 'z'))
5428# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5429#endif
5430
5431#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5432int
5433main ()
5434{
5435 int i;
5436 for (i = 0; i < 256; i++)
5437 if (XOR (islower (i), ISLOWER (i))
5438 || toupper (i) != TOUPPER (i))
5439 return 2;
5440 return 0;
5441}
5442_ACEOF
5443if ac_fn_c_try_run "$LINENO"; then :
5444
5445else
5446 ac_cv_header_stdc=no
5447fi
5448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5449 conftest.$ac_objext conftest.beam conftest.$ac_ext
5450fi
5451
5452fi
5453fi
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5455$as_echo "$ac_cv_header_stdc" >&6; }
5456if test $ac_cv_header_stdc = yes; then
5457
5458$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5459
5460fi
5461
5462# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5463for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5464 inttypes.h stdint.h unistd.h
5465do :
5466 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5467ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5468"
5469if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5470 cat >>confdefs.h <<_ACEOF
5471#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5472_ACEOF
5473
5474fi
5475
5476done
5477
5478
5479
5480 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5481if test "x$ac_cv_header_minix_config_h" = xyes; then :
5482 MINIX=yes
5483else
5484 MINIX=
5485fi
5486
5487
5488 if test "$MINIX" = yes; then
5489
5490$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5491
5492
5493$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5494
5495
5496$as_echo "#define _MINIX 1" >>confdefs.h
5497
5498 fi
5499
5500
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5502$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5503if ${ac_cv_safe_to_define___extensions__+:} false; then :
5504 $as_echo_n "(cached) " >&6
5505else
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507/* end confdefs.h. */
5508
5509# define __EXTENSIONS__ 1
5510 $ac_includes_default
5511int
5512main ()
5513{
5514
5515 ;
5516 return 0;
5517}
5518_ACEOF
5519if ac_fn_c_try_compile "$LINENO"; then :
5520 ac_cv_safe_to_define___extensions__=yes
5521else
5522 ac_cv_safe_to_define___extensions__=no
5523fi
5524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5525fi
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5527$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5528 test $ac_cv_safe_to_define___extensions__ = yes &&
5529 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5530
5531 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5532
5533 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5534
5535 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5536
5537 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5538
5539
5540
5541# The tests for host and target for $enable_largefile require
5542# canonical names.
5543
5544
5545
5546# As the $enable_largefile decision depends on --enable-plugins we must set it
5547# even in directories otherwise not depending on the $plugins option.
5548
5549
5550 maybe_plugins=no
5551 for ac_header in dlfcn.h
5552do :
5553 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5554"
5555if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5556 cat >>confdefs.h <<_ACEOF
5557#define HAVE_DLFCN_H 1
5558_ACEOF
5559 maybe_plugins=yes
5560fi
5561
5562done
5563
5564 for ac_header in windows.h
5565do :
5566 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
5567"
5568if test "x$ac_cv_header_windows_h" = xyes; then :
5569 cat >>confdefs.h <<_ACEOF
5570#define HAVE_WINDOWS_H 1
5571_ACEOF
5572 maybe_plugins=yes
5573fi
5574
5575done
5576
5577
5578 # Check whether --enable-plugins was given.
5579if test "${enable_plugins+set}" = set; then :
5580 enableval=$enable_plugins; case "${enableval}" in
5581 no) plugins=no ;;
5582 *) plugins=yes
5583 if test "$maybe_plugins" != "yes" ; then
5584 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
5585 fi ;;
5586 esac
5587else
5588 plugins=$maybe_plugins
5589
5590fi
5591
5592 if test "$plugins" = "yes"; then
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
5594$as_echo_n "checking for library containing dlsym... " >&6; }
5595if ${ac_cv_search_dlsym+:} false; then :
5596 $as_echo_n "(cached) " >&6
5597else
5598 ac_func_search_save_LIBS=$LIBS
5599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5600/* end confdefs.h. */
5601
5602/* Override any GCC internal prototype to avoid an error.
5603 Use char because int might match the return type of a GCC
5604 builtin and then its argument prototype would still apply. */
5605#ifdef __cplusplus
5606extern "C"
5607#endif
5608char dlsym ();
5609int
5610main ()
5611{
5612return dlsym ();
5613 ;
5614 return 0;
5615}
5616_ACEOF
5617for ac_lib in '' dl; do
5618 if test -z "$ac_lib"; then
5619 ac_res="none required"
5620 else
5621 ac_res=-l$ac_lib
5622 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5623 fi
5624 if ac_fn_c_try_link "$LINENO"; then :
5625 ac_cv_search_dlsym=$ac_res
5626fi
5627rm -f core conftest.err conftest.$ac_objext \
5628 conftest$ac_exeext
5629 if ${ac_cv_search_dlsym+:} false; then :
5630 break
5631fi
5632done
5633if ${ac_cv_search_dlsym+:} false; then :
5634
5635else
5636 ac_cv_search_dlsym=no
5637fi
5638rm conftest.$ac_ext
5639LIBS=$ac_func_search_save_LIBS
5640fi
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
5642$as_echo "$ac_cv_search_dlsym" >&6; }
5643ac_res=$ac_cv_search_dlsym
5644if test "$ac_res" != no; then :
5645 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5646
5647fi
5648
5649 fi
5650
5651
5652case "${host}" in
c8693053
RO
5653 sparc-*-solaris*|i?86-*-solaris*)
5654 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
5655 # were mutually exclusive until Solaris 11.3. Without procfs support,
5656 # the bfd/ elf module cannot provide certain routines such as
5657 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
5658 # explicitly requested large-file support through the
5659 # --enable-largefile switch, disable large-file support in favor of
5660 # procfs support.
5661 #
5662 # Check if <sys/procfs.h> is incompatible with large-file support.
5663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5664/* end confdefs.h. */
5665#define _FILE_OFFSET_BITS 64
5666#define _STRUCTURED_PROC 1
5667#include <sys/procfs.h>
5668int
5669main ()
5670{
5671
5672 ;
5673 return 0;
5674}
5675_ACEOF
5676if ac_fn_c_try_compile "$LINENO"; then :
5677 acx_cv_procfs_lfs=yes
5678else
5679 acx_cv_procfs_lfs=no
5680fi
5681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5682 #
5683 # Forcefully disable large-file support only if necessary, gdb is in
5684 # tree and enabled.
5685 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
5686 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
5687 : ${enable_largefile="no"}
5688 if test "$plugins" = yes; then
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5690plugin support disabled; require large-file support which is incompatible with GDB." >&5
5691$as_echo "$as_me: WARNING:
5692plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
5693 plugins=no
5694 fi
5695 fi
5696 #
5697 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
5698 # benefit of g++ 9+ which predefines it on Solaris.
5699 if test "$enable_largefile" = no; then
5700 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
5701
5702 fi
01027315
TT
5703 ;;
5704esac
5705
5706# Check whether --enable-largefile was given.
5707if test "${enable_largefile+set}" = set; then :
5708 enableval=$enable_largefile;
5709fi
5710
5711if test "$enable_largefile" != no; then
5712
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5714$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5715if ${ac_cv_sys_largefile_CC+:} false; then :
5716 $as_echo_n "(cached) " >&6
5717else
5718 ac_cv_sys_largefile_CC=no
5719 if test "$GCC" != yes; then
5720 ac_save_CC=$CC
5721 while :; do
5722 # IRIX 6.2 and later do not support large files by default,
5723 # so use the C compiler's -n32 option if that helps.
5724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5725/* end confdefs.h. */
5726#include <sys/types.h>
5727 /* Check that off_t can represent 2**63 - 1 correctly.
5728 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5729 since some C++ compilers masquerading as C compilers
5730 incorrectly reject 9223372036854775807. */
5731#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5732 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5733 && LARGE_OFF_T % 2147483647 == 1)
5734 ? 1 : -1];
5735int
5736main ()
5737{
5738
5739 ;
5740 return 0;
5741}
5742_ACEOF
5743 if ac_fn_c_try_compile "$LINENO"; then :
5744 break
5745fi
5746rm -f core conftest.err conftest.$ac_objext
5747 CC="$CC -n32"
5748 if ac_fn_c_try_compile "$LINENO"; then :
5749 ac_cv_sys_largefile_CC=' -n32'; break
5750fi
5751rm -f core conftest.err conftest.$ac_objext
5752 break
5753 done
5754 CC=$ac_save_CC
5755 rm -f conftest.$ac_ext
5756 fi
5757fi
5758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5759$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5760 if test "$ac_cv_sys_largefile_CC" != no; then
5761 CC=$CC$ac_cv_sys_largefile_CC
5762 fi
5763
5764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5765$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5766if ${ac_cv_sys_file_offset_bits+:} false; then :
5767 $as_echo_n "(cached) " >&6
5768else
5769 while :; do
5770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5771/* end confdefs.h. */
5772#include <sys/types.h>
5773 /* Check that off_t can represent 2**63 - 1 correctly.
5774 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5775 since some C++ compilers masquerading as C compilers
5776 incorrectly reject 9223372036854775807. */
5777#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5778 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5779 && LARGE_OFF_T % 2147483647 == 1)
5780 ? 1 : -1];
5781int
5782main ()
5783{
5784
5785 ;
5786 return 0;
5787}
5788_ACEOF
5789if ac_fn_c_try_compile "$LINENO"; then :
5790 ac_cv_sys_file_offset_bits=no; break
5791fi
5792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5794/* end confdefs.h. */
5795#define _FILE_OFFSET_BITS 64
5796#include <sys/types.h>
5797 /* Check that off_t can represent 2**63 - 1 correctly.
5798 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5799 since some C++ compilers masquerading as C compilers
5800 incorrectly reject 9223372036854775807. */
5801#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5802 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5803 && LARGE_OFF_T % 2147483647 == 1)
5804 ? 1 : -1];
5805int
5806main ()
5807{
5808
5809 ;
5810 return 0;
5811}
5812_ACEOF
5813if ac_fn_c_try_compile "$LINENO"; then :
5814 ac_cv_sys_file_offset_bits=64; break
5815fi
5816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5817 ac_cv_sys_file_offset_bits=unknown
5818 break
5819done
5820fi
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5822$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5823case $ac_cv_sys_file_offset_bits in #(
5824 no | unknown) ;;
5825 *)
5826cat >>confdefs.h <<_ACEOF
5827#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5828_ACEOF
5829;;
5830esac
5831rm -rf conftest*
5832 if test $ac_cv_sys_file_offset_bits = unknown; then
5833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5834$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5835if ${ac_cv_sys_large_files+:} false; then :
5836 $as_echo_n "(cached) " >&6
5837else
5838 while :; do
5839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5840/* end confdefs.h. */
5841#include <sys/types.h>
5842 /* Check that off_t can represent 2**63 - 1 correctly.
5843 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5844 since some C++ compilers masquerading as C compilers
5845 incorrectly reject 9223372036854775807. */
5846#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5847 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5848 && LARGE_OFF_T % 2147483647 == 1)
5849 ? 1 : -1];
5850int
5851main ()
5852{
5853
5854 ;
5855 return 0;
5856}
5857_ACEOF
5858if ac_fn_c_try_compile "$LINENO"; then :
5859 ac_cv_sys_large_files=no; break
5860fi
5861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5863/* end confdefs.h. */
5864#define _LARGE_FILES 1
5865#include <sys/types.h>
5866 /* Check that off_t can represent 2**63 - 1 correctly.
5867 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5868 since some C++ compilers masquerading as C compilers
5869 incorrectly reject 9223372036854775807. */
5870#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5871 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5872 && LARGE_OFF_T % 2147483647 == 1)
5873 ? 1 : -1];
5874int
5875main ()
5876{
5877
5878 ;
5879 return 0;
5880}
5881_ACEOF
5882if ac_fn_c_try_compile "$LINENO"; then :
5883 ac_cv_sys_large_files=1; break
5884fi
5885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5886 ac_cv_sys_large_files=unknown
5887 break
5888done
5889fi
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5891$as_echo "$ac_cv_sys_large_files" >&6; }
5892case $ac_cv_sys_large_files in #(
5893 no | unknown) ;;
5894 *)
5895cat >>confdefs.h <<_ACEOF
5896#define _LARGE_FILES $ac_cv_sys_large_files
5897_ACEOF
5898;;
5899esac
5900rm -rf conftest*
5901 fi
5902
5903
5904fi
5905
5906
01027315
TT
5907
5908# We require a C++11 compiler. Check if one is available, and if
5909# necessary, set CXX_DIALECT to some -std=xxx switch.
5910
5911 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5912 ac_ext=cpp
5913ac_cpp='$CXXCPP $CPPFLAGS'
5914ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5915ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5916ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5917 CXX_DIALECT=""
5918 ac_success=no
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5920$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5921if ${ax_cv_cxx_compile_cxx11+:} false; then :
5922 $as_echo_n "(cached) " >&6
5923else
5924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5925/* end confdefs.h. */
5926
5927
5928// If the compiler admits that it is not ready for C++11, why torture it?
5929// Hopefully, this will speed up the test.
5930
5931#ifndef __cplusplus
5932
5933#error "This is not a C++ compiler"
5934
5935#elif __cplusplus < 201103L
5936
5937#error "This is not a C++11 compiler"
5938
5939#else
5940
5941namespace cxx11
5942{
5943
5944 namespace test_static_assert
5945 {
5946
5947 template <typename T>
5948 struct check
5949 {
5950 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5951 };
5952
5953 }
5954
5955 namespace test_final_override
5956 {
5957
5958 struct Base
5959 {
5960 virtual void f() {}
5961 };
5962
5963 struct Derived : public Base
5964 {
5965 virtual void f() override {}
5966 };
5967
5968 }
5969
5970 namespace test_double_right_angle_brackets
5971 {
5972
5973 template < typename T >
5974 struct check {};
5975
5976 typedef check<void> single_type;
5977 typedef check<check<void>> double_type;
5978 typedef check<check<check<void>>> triple_type;
5979 typedef check<check<check<check<void>>>> quadruple_type;
5980
5981 }
5982
5983 namespace test_decltype
5984 {
5985
5986 int
5987 f()
5988 {
5989 int a = 1;
5990 decltype(a) b = 2;
5991 return a + b;
5992 }
5993
5994 }
5995
5996 namespace test_type_deduction
5997 {
5998
5999 template < typename T1, typename T2 >
6000 struct is_same
6001 {
6002 static const bool value = false;
6003 };
6004
6005 template < typename T >
6006 struct is_same<T, T>
6007 {
6008 static const bool value = true;
6009 };
6010
6011 template < typename T1, typename T2 >
6012 auto
6013 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6014 {
6015 return a1 + a2;
6016 }
6017
6018 int
6019 test(const int c, volatile int v)
6020 {
6021 static_assert(is_same<int, decltype(0)>::value == true, "");
6022 static_assert(is_same<int, decltype(c)>::value == false, "");
6023 static_assert(is_same<int, decltype(v)>::value == false, "");
6024 auto ac = c;
6025 auto av = v;
6026 auto sumi = ac + av + 'x';
6027 auto sumf = ac + av + 1.0;
6028 static_assert(is_same<int, decltype(ac)>::value == true, "");
6029 static_assert(is_same<int, decltype(av)>::value == true, "");
6030 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6031 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6032 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6033 return (sumf > 0.0) ? sumi : add(c, v);
6034 }
6035
6036 }
6037
6038 namespace test_noexcept
6039 {
6040
6041 int f() { return 0; }
6042 int g() noexcept { return 0; }
6043
6044 static_assert(noexcept(f()) == false, "");
6045 static_assert(noexcept(g()) == true, "");
6046
6047 }
6048
6049 namespace test_constexpr
6050 {
6051
6052 template < typename CharT >
6053 unsigned long constexpr
6054 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6055 {
6056 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6057 }
6058
6059 template < typename CharT >
6060 unsigned long constexpr
6061 strlen_c(const CharT *const s) noexcept
6062 {
6063 return strlen_c_r(s, 0UL);
6064 }
6065
6066 static_assert(strlen_c("") == 0UL, "");
6067 static_assert(strlen_c("1") == 1UL, "");
6068 static_assert(strlen_c("example") == 7UL, "");
6069 static_assert(strlen_c("another\0example") == 7UL, "");
6070
6071 }
6072
6073 namespace test_rvalue_references
6074 {
6075
6076 template < int N >
6077 struct answer
6078 {
6079 static constexpr int value = N;
6080 };
6081
6082 answer<1> f(int&) { return answer<1>(); }
6083 answer<2> f(const int&) { return answer<2>(); }
6084 answer<3> f(int&&) { return answer<3>(); }
6085
6086 void
6087 test()
6088 {
6089 int i = 0;
6090 const int c = 0;
6091 static_assert(decltype(f(i))::value == 1, "");
6092 static_assert(decltype(f(c))::value == 2, "");
6093 static_assert(decltype(f(0))::value == 3, "");
6094 }
6095
6096 }
6097
6098 namespace test_uniform_initialization
6099 {
6100
6101 struct test
6102 {
6103 static const int zero {};
6104 static const int one {1};
6105 };
6106
6107 static_assert(test::zero == 0, "");
6108 static_assert(test::one == 1, "");
6109
6110 }
6111
6112 namespace test_lambdas
6113 {
6114
6115 void
6116 test1()
6117 {
6118 auto lambda1 = [](){};
6119 auto lambda2 = lambda1;
6120 lambda1();
6121 lambda2();
6122 }
6123
6124 int
6125 test2()
6126 {
6127 auto a = [](int i, int j){ return i + j; }(1, 2);
6128 auto b = []() -> int { return '0'; }();
6129 auto c = [=](){ return a + b; }();
6130 auto d = [&](){ return c; }();
6131 auto e = [a, &b](int x) mutable {
6132 const auto identity = [](int y){ return y; };
6133 for (auto i = 0; i < a; ++i)
6134 a += b--;
6135 return x + identity(a + b);
6136 }(0);
6137 return a + b + c + d + e;
6138 }
6139
6140 int
6141 test3()
6142 {
6143 const auto nullary = [](){ return 0; };
6144 const auto unary = [](int x){ return x; };
6145 using nullary_t = decltype(nullary);
6146 using unary_t = decltype(unary);
6147 const auto higher1st = [](nullary_t f){ return f(); };
6148 const auto higher2nd = [unary](nullary_t f1){
6149 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6150 };
6151 return higher1st(nullary) + higher2nd(nullary)(unary);
6152 }
6153
6154 }
6155
6156 namespace test_variadic_templates
6157 {
6158
6159 template <int...>
6160 struct sum;
6161
6162 template <int N0, int... N1toN>
6163 struct sum<N0, N1toN...>
6164 {
6165 static constexpr auto value = N0 + sum<N1toN...>::value;
6166 };
6167
6168 template <>
6169 struct sum<>
6170 {
6171 static constexpr auto value = 0;
6172 };
6173
6174 static_assert(sum<>::value == 0, "");
6175 static_assert(sum<1>::value == 1, "");
6176 static_assert(sum<23>::value == 23, "");
6177 static_assert(sum<1, 2>::value == 3, "");
6178 static_assert(sum<5, 5, 11>::value == 21, "");
6179 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6180
6181 }
6182
6183 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6184 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6185 // because of this.
6186 namespace test_template_alias_sfinae
6187 {
6188
6189 struct foo {};
6190
6191 template<typename T>
6192 using member = typename T::member_type;
6193
6194 template<typename T>
6195 void func(...) {}
6196
6197 template<typename T>
6198 void func(member<T>*) {}
6199
6200 void test();
6201
6202 void test() { func<foo>(0); }
6203
6204 }
6205
6206} // namespace cxx11
6207
6208#endif // __cplusplus >= 201103L
6209
6210
6211
6212_ACEOF
6213if ac_fn_cxx_try_compile "$LINENO"; then :
6214 ax_cv_cxx_compile_cxx11=yes
6215else
6216 ax_cv_cxx_compile_cxx11=no
6217fi
6218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6219fi
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
6221$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
6222 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
6223 ac_success=yes
6224 fi
6225
6226 if test x$ac_success = xno; then
6227 for alternative in ${ax_cxx_compile_alternatives}; do
6228 switch="-std=gnu++${alternative}"
6229 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
6231$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
6232if eval \${$cachevar+:} false; then :
6233 $as_echo_n "(cached) " >&6
6234else
6235 ac_save_CXX="$CXX"
6236 CXX="$CXX $switch"
6237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6238/* end confdefs.h. */
6239
6240
6241// If the compiler admits that it is not ready for C++11, why torture it?
6242// Hopefully, this will speed up the test.
6243
6244#ifndef __cplusplus
6245
6246#error "This is not a C++ compiler"
6247
6248#elif __cplusplus < 201103L
6249
6250#error "This is not a C++11 compiler"
6251
6252#else
6253
6254namespace cxx11
6255{
6256
6257 namespace test_static_assert
6258 {
6259
6260 template <typename T>
6261 struct check
6262 {
6263 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6264 };
6265
6266 }
6267
6268 namespace test_final_override
6269 {
6270
6271 struct Base
6272 {
6273 virtual void f() {}
6274 };
6275
6276 struct Derived : public Base
6277 {
6278 virtual void f() override {}
6279 };
6280
6281 }
6282
6283 namespace test_double_right_angle_brackets
6284 {
6285
6286 template < typename T >
6287 struct check {};
6288
6289 typedef check<void> single_type;
6290 typedef check<check<void>> double_type;
6291 typedef check<check<check<void>>> triple_type;
6292 typedef check<check<check<check<void>>>> quadruple_type;
6293
6294 }
6295
6296 namespace test_decltype
6297 {
6298
6299 int
6300 f()
6301 {
6302 int a = 1;
6303 decltype(a) b = 2;
6304 return a + b;
6305 }
6306
6307 }
6308
6309 namespace test_type_deduction
6310 {
6311
6312 template < typename T1, typename T2 >
6313 struct is_same
6314 {
6315 static const bool value = false;
6316 };
6317
6318 template < typename T >
6319 struct is_same<T, T>
6320 {
6321 static const bool value = true;
6322 };
6323
6324 template < typename T1, typename T2 >
6325 auto
6326 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6327 {
6328 return a1 + a2;
6329 }
6330
6331 int
6332 test(const int c, volatile int v)
6333 {
6334 static_assert(is_same<int, decltype(0)>::value == true, "");
6335 static_assert(is_same<int, decltype(c)>::value == false, "");
6336 static_assert(is_same<int, decltype(v)>::value == false, "");
6337 auto ac = c;
6338 auto av = v;
6339 auto sumi = ac + av + 'x';
6340 auto sumf = ac + av + 1.0;
6341 static_assert(is_same<int, decltype(ac)>::value == true, "");
6342 static_assert(is_same<int, decltype(av)>::value == true, "");
6343 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6344 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6345 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6346 return (sumf > 0.0) ? sumi : add(c, v);
6347 }
6348
6349 }
6350
6351 namespace test_noexcept
6352 {
6353
6354 int f() { return 0; }
6355 int g() noexcept { return 0; }
6356
6357 static_assert(noexcept(f()) == false, "");
6358 static_assert(noexcept(g()) == true, "");
6359
6360 }
6361
6362 namespace test_constexpr
6363 {
6364
6365 template < typename CharT >
6366 unsigned long constexpr
6367 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6368 {
6369 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6370 }
6371
6372 template < typename CharT >
6373 unsigned long constexpr
6374 strlen_c(const CharT *const s) noexcept
6375 {
6376 return strlen_c_r(s, 0UL);
6377 }
6378
6379 static_assert(strlen_c("") == 0UL, "");
6380 static_assert(strlen_c("1") == 1UL, "");
6381 static_assert(strlen_c("example") == 7UL, "");
6382 static_assert(strlen_c("another\0example") == 7UL, "");
6383
6384 }
6385
6386 namespace test_rvalue_references
6387 {
6388
6389 template < int N >
6390 struct answer
6391 {
6392 static constexpr int value = N;
6393 };
6394
6395 answer<1> f(int&) { return answer<1>(); }
6396 answer<2> f(const int&) { return answer<2>(); }
6397 answer<3> f(int&&) { return answer<3>(); }
6398
6399 void
6400 test()
6401 {
6402 int i = 0;
6403 const int c = 0;
6404 static_assert(decltype(f(i))::value == 1, "");
6405 static_assert(decltype(f(c))::value == 2, "");
6406 static_assert(decltype(f(0))::value == 3, "");
6407 }
6408
6409 }
6410
6411 namespace test_uniform_initialization
6412 {
6413
6414 struct test
6415 {
6416 static const int zero {};
6417 static const int one {1};
6418 };
6419
6420 static_assert(test::zero == 0, "");
6421 static_assert(test::one == 1, "");
6422
6423 }
6424
6425 namespace test_lambdas
6426 {
6427
6428 void
6429 test1()
6430 {
6431 auto lambda1 = [](){};
6432 auto lambda2 = lambda1;
6433 lambda1();
6434 lambda2();
6435 }
6436
6437 int
6438 test2()
6439 {
6440 auto a = [](int i, int j){ return i + j; }(1, 2);
6441 auto b = []() -> int { return '0'; }();
6442 auto c = [=](){ return a + b; }();
6443 auto d = [&](){ return c; }();
6444 auto e = [a, &b](int x) mutable {
6445 const auto identity = [](int y){ return y; };
6446 for (auto i = 0; i < a; ++i)
6447 a += b--;
6448 return x + identity(a + b);
6449 }(0);
6450 return a + b + c + d + e;
6451 }
6452
6453 int
6454 test3()
6455 {
6456 const auto nullary = [](){ return 0; };
6457 const auto unary = [](int x){ return x; };
6458 using nullary_t = decltype(nullary);
6459 using unary_t = decltype(unary);
6460 const auto higher1st = [](nullary_t f){ return f(); };
6461 const auto higher2nd = [unary](nullary_t f1){
6462 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6463 };
6464 return higher1st(nullary) + higher2nd(nullary)(unary);
6465 }
6466
6467 }
6468
6469 namespace test_variadic_templates
6470 {
6471
6472 template <int...>
6473 struct sum;
6474
6475 template <int N0, int... N1toN>
6476 struct sum<N0, N1toN...>
6477 {
6478 static constexpr auto value = N0 + sum<N1toN...>::value;
6479 };
6480
6481 template <>
6482 struct sum<>
6483 {
6484 static constexpr auto value = 0;
6485 };
6486
6487 static_assert(sum<>::value == 0, "");
6488 static_assert(sum<1>::value == 1, "");
6489 static_assert(sum<23>::value == 23, "");
6490 static_assert(sum<1, 2>::value == 3, "");
6491 static_assert(sum<5, 5, 11>::value == 21, "");
6492 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6493
6494 }
6495
6496 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6497 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6498 // because of this.
6499 namespace test_template_alias_sfinae
6500 {
6501
6502 struct foo {};
6503
6504 template<typename T>
6505 using member = typename T::member_type;
6506
6507 template<typename T>
6508 void func(...) {}
6509
6510 template<typename T>
6511 void func(member<T>*) {}
6512
6513 void test();
6514
6515 void test() { func<foo>(0); }
6516
6517 }
6518
6519} // namespace cxx11
6520
6521#endif // __cplusplus >= 201103L
6522
6523
6524
6525_ACEOF
6526if ac_fn_cxx_try_compile "$LINENO"; then :
6527 eval $cachevar=yes
6528else
6529 eval $cachevar=no
6530fi
6531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6532 CXX="$ac_save_CXX"
6533fi
6534eval ac_res=\$$cachevar
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6536$as_echo "$ac_res" >&6; }
6537 if eval test x\$$cachevar = xyes; then
6538 CXX_DIALECT="$switch"
77252bf2
TV
6539 CXX="$CXX $switch"
6540 if test -n "$CXXCPP" ; then
6541 CXXCPP="$CXXCPP $switch"
6542 fi
01027315
TT
6543 ac_success=yes
6544 break
6545 fi
6546 done
6547 fi
6548
6549 if test x$ac_success = xno; then
6550 for alternative in ${ax_cxx_compile_alternatives}; do
6551 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
6552 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
6554$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
6555if eval \${$cachevar+:} false; then :
6556 $as_echo_n "(cached) " >&6
6557else
6558 ac_save_CXX="$CXX"
6559 CXX="$CXX $switch"
6560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6561/* end confdefs.h. */
6562
6563
6564// If the compiler admits that it is not ready for C++11, why torture it?
6565// Hopefully, this will speed up the test.
6566
6567#ifndef __cplusplus
6568
6569#error "This is not a C++ compiler"
6570
6571#elif __cplusplus < 201103L
6572
6573#error "This is not a C++11 compiler"
6574
6575#else
6576
6577namespace cxx11
6578{
6579
6580 namespace test_static_assert
6581 {
6582
6583 template <typename T>
6584 struct check
6585 {
6586 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6587 };
6588
6589 }
6590
6591 namespace test_final_override
6592 {
6593
6594 struct Base
6595 {
6596 virtual void f() {}
6597 };
6598
6599 struct Derived : public Base
6600 {
6601 virtual void f() override {}
6602 };
6603
6604 }
6605
6606 namespace test_double_right_angle_brackets
6607 {
6608
6609 template < typename T >
6610 struct check {};
6611
6612 typedef check<void> single_type;
6613 typedef check<check<void>> double_type;
6614 typedef check<check<check<void>>> triple_type;
6615 typedef check<check<check<check<void>>>> quadruple_type;
6616
6617 }
6618
6619 namespace test_decltype
6620 {
6621
6622 int
6623 f()
6624 {
6625 int a = 1;
6626 decltype(a) b = 2;
6627 return a + b;
6628 }
6629
6630 }
6631
6632 namespace test_type_deduction
6633 {
6634
6635 template < typename T1, typename T2 >
6636 struct is_same
6637 {
6638 static const bool value = false;
6639 };
6640
6641 template < typename T >
6642 struct is_same<T, T>
6643 {
6644 static const bool value = true;
6645 };
6646
6647 template < typename T1, typename T2 >
6648 auto
6649 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6650 {
6651 return a1 + a2;
6652 }
6653
6654 int
6655 test(const int c, volatile int v)
6656 {
6657 static_assert(is_same<int, decltype(0)>::value == true, "");
6658 static_assert(is_same<int, decltype(c)>::value == false, "");
6659 static_assert(is_same<int, decltype(v)>::value == false, "");
6660 auto ac = c;
6661 auto av = v;
6662 auto sumi = ac + av + 'x';
6663 auto sumf = ac + av + 1.0;
6664 static_assert(is_same<int, decltype(ac)>::value == true, "");
6665 static_assert(is_same<int, decltype(av)>::value == true, "");
6666 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6667 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6668 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6669 return (sumf > 0.0) ? sumi : add(c, v);
6670 }
6671
6672 }
6673
6674 namespace test_noexcept
6675 {
6676
6677 int f() { return 0; }
6678 int g() noexcept { return 0; }
6679
6680 static_assert(noexcept(f()) == false, "");
6681 static_assert(noexcept(g()) == true, "");
6682
6683 }
6684
6685 namespace test_constexpr
6686 {
6687
6688 template < typename CharT >
6689 unsigned long constexpr
6690 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6691 {
6692 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6693 }
6694
6695 template < typename CharT >
6696 unsigned long constexpr
6697 strlen_c(const CharT *const s) noexcept
6698 {
6699 return strlen_c_r(s, 0UL);
6700 }
6701
6702 static_assert(strlen_c("") == 0UL, "");
6703 static_assert(strlen_c("1") == 1UL, "");
6704 static_assert(strlen_c("example") == 7UL, "");
6705 static_assert(strlen_c("another\0example") == 7UL, "");
6706
6707 }
6708
6709 namespace test_rvalue_references
6710 {
6711
6712 template < int N >
6713 struct answer
6714 {
6715 static constexpr int value = N;
6716 };
6717
6718 answer<1> f(int&) { return answer<1>(); }
6719 answer<2> f(const int&) { return answer<2>(); }
6720 answer<3> f(int&&) { return answer<3>(); }
6721
6722 void
6723 test()
6724 {
6725 int i = 0;
6726 const int c = 0;
6727 static_assert(decltype(f(i))::value == 1, "");
6728 static_assert(decltype(f(c))::value == 2, "");
6729 static_assert(decltype(f(0))::value == 3, "");
6730 }
6731
6732 }
6733
6734 namespace test_uniform_initialization
6735 {
6736
6737 struct test
6738 {
6739 static const int zero {};
6740 static const int one {1};
6741 };
6742
6743 static_assert(test::zero == 0, "");
6744 static_assert(test::one == 1, "");
6745
6746 }
6747
6748 namespace test_lambdas
6749 {
6750
6751 void
6752 test1()
6753 {
6754 auto lambda1 = [](){};
6755 auto lambda2 = lambda1;
6756 lambda1();
6757 lambda2();
6758 }
6759
6760 int
6761 test2()
6762 {
6763 auto a = [](int i, int j){ return i + j; }(1, 2);
6764 auto b = []() -> int { return '0'; }();
6765 auto c = [=](){ return a + b; }();
6766 auto d = [&](){ return c; }();
6767 auto e = [a, &b](int x) mutable {
6768 const auto identity = [](int y){ return y; };
6769 for (auto i = 0; i < a; ++i)
6770 a += b--;
6771 return x + identity(a + b);
6772 }(0);
6773 return a + b + c + d + e;
6774 }
6775
6776 int
6777 test3()
6778 {
6779 const auto nullary = [](){ return 0; };
6780 const auto unary = [](int x){ return x; };
6781 using nullary_t = decltype(nullary);
6782 using unary_t = decltype(unary);
6783 const auto higher1st = [](nullary_t f){ return f(); };
6784 const auto higher2nd = [unary](nullary_t f1){
6785 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6786 };
6787 return higher1st(nullary) + higher2nd(nullary)(unary);
6788 }
6789
6790 }
6791
6792 namespace test_variadic_templates
6793 {
6794
6795 template <int...>
6796 struct sum;
6797
6798 template <int N0, int... N1toN>
6799 struct sum<N0, N1toN...>
6800 {
6801 static constexpr auto value = N0 + sum<N1toN...>::value;
6802 };
6803
6804 template <>
6805 struct sum<>
6806 {
6807 static constexpr auto value = 0;
6808 };
6809
6810 static_assert(sum<>::value == 0, "");
6811 static_assert(sum<1>::value == 1, "");
6812 static_assert(sum<23>::value == 23, "");
6813 static_assert(sum<1, 2>::value == 3, "");
6814 static_assert(sum<5, 5, 11>::value == 21, "");
6815 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6816
6817 }
6818
6819 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6820 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6821 // because of this.
6822 namespace test_template_alias_sfinae
6823 {
6824
6825 struct foo {};
6826
6827 template<typename T>
6828 using member = typename T::member_type;
6829
6830 template<typename T>
6831 void func(...) {}
6832
6833 template<typename T>
6834 void func(member<T>*) {}
6835
6836 void test();
6837
6838 void test() { func<foo>(0); }
6839
6840 }
6841
6842} // namespace cxx11
6843
6844#endif // __cplusplus >= 201103L
6845
6846
6847
6848_ACEOF
6849if ac_fn_cxx_try_compile "$LINENO"; then :
6850 eval $cachevar=yes
6851else
6852 eval $cachevar=no
6853fi
6854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6855 CXX="$ac_save_CXX"
6856fi
6857eval ac_res=\$$cachevar
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6859$as_echo "$ac_res" >&6; }
6860 if eval test x\$$cachevar = xyes; then
6861 CXX_DIALECT="$switch"
77252bf2
TV
6862 CXX="$CXX $switch"
6863 if test -n "$CXXCPP" ; then
6864 CXXCPP="$CXXCPP $switch"
6865 fi
01027315
TT
6866 ac_success=yes
6867 break
6868 fi
6869 done
6870 if test x$ac_success = xyes; then
6871 break
6872 fi
6873 done
6874 fi
6875 ac_ext=c
6876ac_cpp='$CPP $CPPFLAGS'
6877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6879ac_compiler_gnu=$ac_cv_c_compiler_gnu
6880
6881 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6882 if test x$ac_success = xno; then
6883 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6884 fi
6885 fi
6886 if test x$ac_success = xno; then
6887 HAVE_CXX11=0
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6889$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6890 else
6891 HAVE_CXX11=1
6892
6893$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6894
6895 fi
6896
6897
6898
6899
6900# If we haven't got the data from the intl directory,
6901# assume NLS is disabled.
6902USE_NLS=no
6903LIBINTL=
6904LIBINTL_DEP=
6905INCINTL=
6906XGETTEXT=
6907GMSGFMT=
6908POSUB=
6909
6910if test -f ../intl/config.intl; then
6911 . ../intl/config.intl
6912fi
6913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6914$as_echo_n "checking whether NLS is requested... " >&6; }
6915if test x"$USE_NLS" != xyes; then
6916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6917$as_echo "no" >&6; }
6918else
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6920$as_echo "yes" >&6; }
6921
6922$as_echo "#define ENABLE_NLS 1" >>confdefs.h
6923
6924
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6926$as_echo_n "checking for catalogs to be installed... " >&6; }
6927 # Look for .po and .gmo files in the source directory.
6928 CATALOGS=
6929 XLINGUAS=
6930 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6931 # If there aren't any .gmo files the shell will give us the
6932 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6933 # weeded out.
6934 case "$cat" in *\**)
6935 continue;;
6936 esac
6937 # The quadruple backslash is collapsed to a double backslash
6938 # by the backticks, then collapsed again by the double quotes,
6939 # leaving us with one backslash in the sed expression (right
6940 # before the dot that mustn't act as a wildcard).
6941 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6942 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6943 # The user is allowed to set LINGUAS to a list of languages to
6944 # install catalogs for. If it's empty that means "all of them."
6945 if test "x$LINGUAS" = x; then
6946 CATALOGS="$CATALOGS $cat"
6947 XLINGUAS="$XLINGUAS $lang"
6948 else
6949 case "$LINGUAS" in *$lang*)
6950 CATALOGS="$CATALOGS $cat"
6951 XLINGUAS="$XLINGUAS $lang"
6952 ;;
6953 esac
6954 fi
6955 done
6956 LINGUAS="$XLINGUAS"
6957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6958$as_echo "$LINGUAS" >&6; }
6959
6960
6961 DATADIRNAME=share
6962
6963 INSTOBJEXT=.mo
6964
6965 GENCAT=gencat
6966
6967 CATOBJEXT=.gmo
6968
6969fi
6970
6971
6972 # Check for presence and size of long long.
6973 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
6974if test "x$ac_cv_type_long_long" = xyes; then :
6975
6976cat >>confdefs.h <<_ACEOF
6977#define HAVE_LONG_LONG 1
6978_ACEOF
6979
6980# The cast to long int works around a bug in the HP C Compiler
6981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6983# This bug is HP SR number 8606223364.
6984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6985$as_echo_n "checking size of long long... " >&6; }
6986if ${ac_cv_sizeof_long_long+:} false; then :
6987 $as_echo_n "(cached) " >&6
6988else
6989 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
6990
6991else
6992 if test "$ac_cv_type_long_long" = yes; then
6993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6995as_fn_error 77 "cannot compute sizeof (long long)
6996See \`config.log' for more details" "$LINENO" 5; }
6997 else
6998 ac_cv_sizeof_long_long=0
6999 fi
7000fi
7001
7002fi
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7004$as_echo "$ac_cv_sizeof_long_long" >&6; }
7005
7006
7007
7008cat >>confdefs.h <<_ACEOF
7009#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
7010_ACEOF
7011
7012
7013fi
7014
7015
7016 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
7017ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
7018if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
7019 ac_have_decl=1
7020else
7021 ac_have_decl=0
7022fi
7023
7024cat >>confdefs.h <<_ACEOF
7025#define HAVE_DECL_BASENAME $ac_have_decl
7026_ACEOF
7027ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
7028if test "x$ac_cv_have_decl_ffs" = xyes; then :
7029 ac_have_decl=1
7030else
7031 ac_have_decl=0
7032fi
7033
7034cat >>confdefs.h <<_ACEOF
7035#define HAVE_DECL_FFS $ac_have_decl
7036_ACEOF
7037ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
7038if test "x$ac_cv_have_decl_asprintf" = xyes; then :
7039 ac_have_decl=1
7040else
7041 ac_have_decl=0
7042fi
7043
7044cat >>confdefs.h <<_ACEOF
7045#define HAVE_DECL_ASPRINTF $ac_have_decl
7046_ACEOF
7047ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
7048if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
7049 ac_have_decl=1
7050else
7051 ac_have_decl=0
7052fi
7053
7054cat >>confdefs.h <<_ACEOF
7055#define HAVE_DECL_VASPRINTF $ac_have_decl
7056_ACEOF
7057ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
7058if test "x$ac_cv_have_decl_snprintf" = xyes; then :
7059 ac_have_decl=1
7060else
7061 ac_have_decl=0
7062fi
7063
7064cat >>confdefs.h <<_ACEOF
7065#define HAVE_DECL_SNPRINTF $ac_have_decl
7066_ACEOF
7067ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
7068if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
7069 ac_have_decl=1
7070else
7071 ac_have_decl=0
7072fi
7073
7074cat >>confdefs.h <<_ACEOF
7075#define HAVE_DECL_VSNPRINTF $ac_have_decl
7076_ACEOF
7077
7078 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
7079if test "x$ac_cv_have_decl_strtol" = xyes; then :
7080 ac_have_decl=1
7081else
7082 ac_have_decl=0
7083fi
7084
7085cat >>confdefs.h <<_ACEOF
7086#define HAVE_DECL_STRTOL $ac_have_decl
7087_ACEOF
7088ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
7089if test "x$ac_cv_have_decl_strtoul" = xyes; then :
7090 ac_have_decl=1
7091else
7092 ac_have_decl=0
7093fi
7094
7095cat >>confdefs.h <<_ACEOF
7096#define HAVE_DECL_STRTOUL $ac_have_decl
7097_ACEOF
7098ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
7099if test "x$ac_cv_have_decl_strtoll" = xyes; then :
7100 ac_have_decl=1
7101else
7102 ac_have_decl=0
7103fi
7104
7105cat >>confdefs.h <<_ACEOF
7106#define HAVE_DECL_STRTOLL $ac_have_decl
7107_ACEOF
7108ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
7109if test "x$ac_cv_have_decl_strtoull" = xyes; then :
7110 ac_have_decl=1
7111else
7112 ac_have_decl=0
7113fi
7114
7115cat >>confdefs.h <<_ACEOF
7116#define HAVE_DECL_STRTOULL $ac_have_decl
7117_ACEOF
7118
7119 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
7120if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
7121 ac_have_decl=1
7122else
7123 ac_have_decl=0
7124fi
7125
7126cat >>confdefs.h <<_ACEOF
7127#define HAVE_DECL_STRVERSCMP $ac_have_decl
7128_ACEOF
7129
7130
7131ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7132if test "x$ac_cv_type_size_t" = xyes; then :
7133
7134else
7135
7136cat >>confdefs.h <<_ACEOF
7137#define size_t unsigned int
7138_ACEOF
7139
7140fi
7141
05ea2a05
TT
7142
7143
7144
7145 for ac_header in $ac_header_list
7146do :
7147 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7148ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7149"
7150if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7151 cat >>confdefs.h <<_ACEOF
7152#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7153_ACEOF
7154
7155fi
7156
7157done
7158
7159
7160
7161
7162
7163
7164
7165ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7166if test "x$ac_cv_type_pid_t" = xyes; then :
7167
7168else
7169
7170cat >>confdefs.h <<_ACEOF
7171#define pid_t int
7172_ACEOF
7173
7174fi
7175
01027315
TT
7176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7177$as_echo_n "checking for a sed that does not truncate output... " >&6; }
7178if ${ac_cv_path_SED+:} false; then :
7179 $as_echo_n "(cached) " >&6
7180else
7181 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7182 for ac_i in 1 2 3 4 5 6 7; do
7183 ac_script="$ac_script$as_nl$ac_script"
7184 done
7185 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7186 { ac_script=; unset ac_script;}
7187 if test -z "$SED"; then
7188 ac_path_SED_found=false
7189 # Loop through the user's path and test for each of PROGNAME-LIST
7190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7191for as_dir in $PATH
7192do
7193 IFS=$as_save_IFS
7194 test -z "$as_dir" && as_dir=.
7195 for ac_prog in sed gsed; do
7196 for ac_exec_ext in '' $ac_executable_extensions; do
7197 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7198 as_fn_executable_p "$ac_path_SED" || continue
7199# Check for GNU ac_path_SED and select it if it is found.
7200 # Check for GNU $ac_path_SED
7201case `"$ac_path_SED" --version 2>&1` in
7202*GNU*)
7203 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7204*)
7205 ac_count=0
7206 $as_echo_n 0123456789 >"conftest.in"
7207 while :
7208 do
7209 cat "conftest.in" "conftest.in" >"conftest.tmp"
7210 mv "conftest.tmp" "conftest.in"
7211 cp "conftest.in" "conftest.nl"
7212 $as_echo '' >> "conftest.nl"
7213 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7214 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7215 as_fn_arith $ac_count + 1 && ac_count=$as_val
7216 if test $ac_count -gt ${ac_path_SED_max-0}; then
7217 # Best one so far, save it but keep looking for a better one
7218 ac_cv_path_SED="$ac_path_SED"
7219 ac_path_SED_max=$ac_count
7220 fi
7221 # 10*(2^10) chars as input seems more than enough
7222 test $ac_count -gt 10 && break
7223 done
7224 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7225esac
7226
7227 $ac_path_SED_found && break 3
7228 done
7229 done
7230 done
7231IFS=$as_save_IFS
7232 if test -z "$ac_cv_path_SED"; then
7233 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7234 fi
7235else
7236 ac_cv_path_SED=$SED
7237fi
7238
7239fi
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7241$as_echo "$ac_cv_path_SED" >&6; }
7242 SED="$ac_cv_path_SED"
7243 rm -f conftest.sed
7244
7245
05ea2a05
TT
7246 if test "X$prefix" = "XNONE"; then
7247 acl_final_prefix="$ac_default_prefix"
7248 else
7249 acl_final_prefix="$prefix"
7250 fi
7251 if test "X$exec_prefix" = "XNONE"; then
7252 acl_final_exec_prefix='${prefix}'
7253 else
7254 acl_final_exec_prefix="$exec_prefix"
7255 fi
7256 acl_save_prefix="$prefix"
7257 prefix="$acl_final_prefix"
7258 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7259 prefix="$acl_save_prefix"
7260
7261
7262# Check whether --with-gnu-ld was given.
7263if test "${with_gnu_ld+set}" = set; then :
7264 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7265else
7266 with_gnu_ld=no
7267fi
7268
7269# Prepare PATH_SEPARATOR.
7270# The user is always right.
7271if test "${PATH_SEPARATOR+set}" != set; then
7272 echo "#! /bin/sh" >conf$$.sh
7273 echo "exit 0" >>conf$$.sh
7274 chmod +x conf$$.sh
7275 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7276 PATH_SEPARATOR=';'
7277 else
7278 PATH_SEPARATOR=:
7279 fi
7280 rm -f conf$$.sh
7281fi
7282ac_prog=ld
7283if test "$GCC" = yes; then
7284 # Check if gcc -print-prog-name=ld gives a path.
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7286$as_echo_n "checking for ld used by GCC... " >&6; }
7287 case $host in
7288 *-*-mingw*)
7289 # gcc leaves a trailing carriage return which upsets mingw
7290 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7291 *)
7292 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7293 esac
7294 case $ac_prog in
7295 # Accept absolute paths.
7296 [\\/]* | [A-Za-z]:[\\/]*)
7297 re_direlt='/[^/][^/]*/\.\./'
7298 # Canonicalize the path of ld
7299 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7300 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7301 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7302 done
7303 test -z "$LD" && LD="$ac_prog"
7304 ;;
7305 "")
7306 # If it fails, then pretend we aren't using GCC.
7307 ac_prog=ld
7308 ;;
7309 *)
7310 # If it is relative, then search for the first ld in PATH.
7311 with_gnu_ld=unknown
7312 ;;
7313 esac
7314elif test "$with_gnu_ld" = yes; then
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7316$as_echo_n "checking for GNU ld... " >&6; }
7317else
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7319$as_echo_n "checking for non-GNU ld... " >&6; }
7320fi
7321if ${acl_cv_path_LD+:} false; then :
7322 $as_echo_n "(cached) " >&6
7323else
7324 if test -z "$LD"; then
7325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7326 for ac_dir in $PATH; do
7327 test -z "$ac_dir" && ac_dir=.
7328 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7329 acl_cv_path_LD="$ac_dir/$ac_prog"
7330 # Check to see if the program is GNU ld. I'd rather use --version,
7331 # but apparently some GNU ld's only accept -v.
7332 # Break only if it was the GNU/non-GNU ld that we prefer.
d549d8d2 7333 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
05ea2a05
TT
7334 test "$with_gnu_ld" != no && break
7335 else
7336 test "$with_gnu_ld" != yes && break
7337 fi
7338 fi
7339 done
7340 IFS="$ac_save_ifs"
7341else
7342 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7343fi
7344fi
7345
7346LD="$acl_cv_path_LD"
7347if test -n "$LD"; then
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7349$as_echo "$LD" >&6; }
7350else
7351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7352$as_echo "no" >&6; }
7353fi
7354test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7356$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7357if ${acl_cv_prog_gnu_ld+:} false; then :
7358 $as_echo_n "(cached) " >&6
7359else
7360 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
d549d8d2 7361if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
05ea2a05
TT
7362 acl_cv_prog_gnu_ld=yes
7363else
7364 acl_cv_prog_gnu_ld=no
7365fi
7366fi
7367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7368$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7369with_gnu_ld=$acl_cv_prog_gnu_ld
7370
7371
7372
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7374$as_echo_n "checking for shared library run path origin... " >&6; }
7375if ${acl_cv_rpath+:} false; then :
7376 $as_echo_n "(cached) " >&6
7377else
7378
7379 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7380 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7381 . ./conftest.sh
7382 rm -f ./conftest.sh
7383 acl_cv_rpath=done
7384
7385fi
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7387$as_echo "$acl_cv_rpath" >&6; }
7388 wl="$acl_cv_wl"
7389 libext="$acl_cv_libext"
7390 shlibext="$acl_cv_shlibext"
7391 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7392 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7393 hardcode_direct="$acl_cv_hardcode_direct"
7394 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7395 # Check whether --enable-rpath was given.
7396if test "${enable_rpath+set}" = set; then :
7397 enableval=$enable_rpath; :
7398else
7399 enable_rpath=yes
7400fi
7401
7402
7403
db6878ac
SM
7404 # Set the 'development' global.
7405 . $srcdir/../bfd/development.sh
7406
01027315
TT
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7408$as_echo_n "checking for ANSI C header files... " >&6; }
7409if ${ac_cv_header_stdc+:} false; then :
7410 $as_echo_n "(cached) " >&6
7411else
7412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7413/* end confdefs.h. */
7414#include <stdlib.h>
7415#include <stdarg.h>
7416#include <string.h>
7417#include <float.h>
7418
7419int
7420main ()
7421{
7422
7423 ;
7424 return 0;
7425}
7426_ACEOF
7427if ac_fn_c_try_compile "$LINENO"; then :
7428 ac_cv_header_stdc=yes
7429else
7430 ac_cv_header_stdc=no
7431fi
7432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7433
7434if test $ac_cv_header_stdc = yes; then
7435 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7437/* end confdefs.h. */
7438#include <string.h>
7439
7440_ACEOF
7441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7442 $EGREP "memchr" >/dev/null 2>&1; then :
7443
7444else
7445 ac_cv_header_stdc=no
7446fi
7447rm -f conftest*
7448
7449fi
7450
7451if test $ac_cv_header_stdc = yes; then
7452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7454/* end confdefs.h. */
7455#include <stdlib.h>
7456
7457_ACEOF
7458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7459 $EGREP "free" >/dev/null 2>&1; then :
7460
7461else
7462 ac_cv_header_stdc=no
7463fi
7464rm -f conftest*
7465
7466fi
7467
7468if test $ac_cv_header_stdc = yes; then
7469 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7470 if test "$cross_compiling" = yes; then :
7471 :
7472else
7473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7474/* end confdefs.h. */
7475#include <ctype.h>
7476#include <stdlib.h>
7477#if ((' ' & 0x0FF) == 0x020)
7478# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7479# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7480#else
7481# define ISLOWER(c) \
7482 (('a' <= (c) && (c) <= 'i') \
7483 || ('j' <= (c) && (c) <= 'r') \
7484 || ('s' <= (c) && (c) <= 'z'))
7485# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7486#endif
7487
7488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7489int
7490main ()
7491{
7492 int i;
7493 for (i = 0; i < 256; i++)
7494 if (XOR (islower (i), ISLOWER (i))
7495 || toupper (i) != TOUPPER (i))
7496 return 2;
7497 return 0;
7498}
7499_ACEOF
7500if ac_fn_c_try_run "$LINENO"; then :
7501
7502else
7503 ac_cv_header_stdc=no
7504fi
7505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7506 conftest.$ac_objext conftest.beam conftest.$ac_ext
7507fi
7508
7509fi
7510fi
7511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7512$as_echo "$ac_cv_header_stdc" >&6; }
7513if test $ac_cv_header_stdc = yes; then
7514
7515$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7516
7517fi
7518
7519 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7520# for constant arguments. Useless!
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7522$as_echo_n "checking for working alloca.h... " >&6; }
7523if ${ac_cv_working_alloca_h+:} false; then :
7524 $as_echo_n "(cached) " >&6
7525else
7526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7527/* end confdefs.h. */
7528#include <alloca.h>
7529int
7530main ()
7531{
7532char *p = (char *) alloca (2 * sizeof (int));
7533 if (p) return 0;
7534 ;
7535 return 0;
7536}
7537_ACEOF
7538if ac_fn_c_try_link "$LINENO"; then :
7539 ac_cv_working_alloca_h=yes
7540else
7541 ac_cv_working_alloca_h=no
7542fi
7543rm -f core conftest.err conftest.$ac_objext \
7544 conftest$ac_exeext conftest.$ac_ext
7545fi
7546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7547$as_echo "$ac_cv_working_alloca_h" >&6; }
7548if test $ac_cv_working_alloca_h = yes; then
7549
7550$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7551
7552fi
7553
7554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7555$as_echo_n "checking for alloca... " >&6; }
7556if ${ac_cv_func_alloca_works+:} false; then :
7557 $as_echo_n "(cached) " >&6
7558else
7559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7560/* end confdefs.h. */
7561#ifdef __GNUC__
7562# define alloca __builtin_alloca
7563#else
7564# ifdef _MSC_VER
7565# include <malloc.h>
7566# define alloca _alloca
7567# else
7568# ifdef HAVE_ALLOCA_H
7569# include <alloca.h>
7570# else
7571# ifdef _AIX
7572 #pragma alloca
7573# else
7574# ifndef alloca /* predefined by HP cc +Olibcalls */
7575void *alloca (size_t);
7576# endif
7577# endif
7578# endif
7579# endif
7580#endif
7581
7582int
7583main ()
7584{
7585char *p = (char *) alloca (1);
7586 if (p) return 0;
7587 ;
7588 return 0;
7589}
7590_ACEOF
7591if ac_fn_c_try_link "$LINENO"; then :
7592 ac_cv_func_alloca_works=yes
7593else
7594 ac_cv_func_alloca_works=no
7595fi
7596rm -f core conftest.err conftest.$ac_objext \
7597 conftest$ac_exeext conftest.$ac_ext
7598fi
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7600$as_echo "$ac_cv_func_alloca_works" >&6; }
7601
7602if test $ac_cv_func_alloca_works = yes; then
7603
7604$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7605
7606else
7607 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7608# that cause trouble. Some versions do not even contain alloca or
7609# contain a buggy version. If you still want to use their alloca,
7610# use ar to extract alloca.o from them instead of compiling alloca.c.
7611
7612ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7613
7614$as_echo "#define C_ALLOCA 1" >>confdefs.h
7615
7616
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7618$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7619if ${ac_cv_os_cray+:} false; then :
7620 $as_echo_n "(cached) " >&6
7621else
7622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7623/* end confdefs.h. */
7624#if defined CRAY && ! defined CRAY2
7625webecray
7626#else
7627wenotbecray
7628#endif
7629
7630_ACEOF
7631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7632 $EGREP "webecray" >/dev/null 2>&1; then :
7633 ac_cv_os_cray=yes
7634else
7635 ac_cv_os_cray=no
7636fi
7637rm -f conftest*
7638
7639fi
7640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7641$as_echo "$ac_cv_os_cray" >&6; }
7642if test $ac_cv_os_cray = yes; then
7643 for ac_func in _getb67 GETB67 getb67; do
7644 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7645ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7646if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7647
7648cat >>confdefs.h <<_ACEOF
7649#define CRAY_STACKSEG_END $ac_func
7650_ACEOF
7651
7652 break
7653fi
7654
7655 done
7656fi
7657
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7659$as_echo_n "checking stack direction for C alloca... " >&6; }
7660if ${ac_cv_c_stack_direction+:} false; then :
7661 $as_echo_n "(cached) " >&6
7662else
7663 if test "$cross_compiling" = yes; then :
7664 ac_cv_c_stack_direction=0
7665else
7666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7667/* end confdefs.h. */
7668$ac_includes_default
7669int
7670find_stack_direction (int *addr, int depth)
7671{
7672 int dir, dummy = 0;
7673 if (! addr)
7674 addr = &dummy;
7675 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7676 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7677 return dir + dummy;
7678}
7679
7680int
7681main (int argc, char **argv)
7682{
7683 return find_stack_direction (0, argc + !argv + 20) < 0;
7684}
7685_ACEOF
7686if ac_fn_c_try_run "$LINENO"; then :
7687 ac_cv_c_stack_direction=1
7688else
7689 ac_cv_c_stack_direction=-1
7690fi
7691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7692 conftest.$ac_objext conftest.beam conftest.$ac_ext
7693fi
7694
7695fi
7696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7697$as_echo "$ac_cv_c_stack_direction" >&6; }
7698cat >>confdefs.h <<_ACEOF
7699#define STACK_DIRECTION $ac_cv_c_stack_direction
7700_ACEOF
7701
7702
7703fi
7704
7705
7706 WIN32APILIBS=
7707 case ${host} in
7708 *mingw32*)
7709
7710$as_echo "#define USE_WIN32API 1" >>confdefs.h
7711
7712 WIN32APILIBS="-lws2_32"
7713 ;;
7714 esac
7715
7716
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7718$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7719if ${am_cv_langinfo_codeset+:} false; then :
7720 $as_echo_n "(cached) " >&6
7721else
7722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7723/* end confdefs.h. */
7724#include <langinfo.h>
7725int
7726main ()
7727{
7728char* cs = nl_langinfo(CODESET);
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733if ac_fn_c_try_link "$LINENO"; then :
7734 am_cv_langinfo_codeset=yes
7735else
7736 am_cv_langinfo_codeset=no
7737fi
7738rm -f core conftest.err conftest.$ac_objext \
7739 conftest$ac_exeext conftest.$ac_ext
7740
7741fi
7742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7743$as_echo "$am_cv_langinfo_codeset" >&6; }
7744 if test $am_cv_langinfo_codeset = yes; then
7745
7746$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7747
7748 fi
7749
7750
c8693053 7751 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h
01027315
TT
7752do :
7753 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7754ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7755if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7756 cat >>confdefs.h <<_ACEOF
7757#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7758_ACEOF
7759
7760fi
7761
7762done
7763
7764
05ea2a05
TT
7765
7766for ac_func in getpagesize
01027315 7767do :
05ea2a05
TT
7768 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7769if test "x$ac_cv_func_getpagesize" = xyes; then :
01027315 7770 cat >>confdefs.h <<_ACEOF
05ea2a05 7771#define HAVE_GETPAGESIZE 1
01027315
TT
7772_ACEOF
7773
7774fi
7775done
7776
05ea2a05
TT
7777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7778$as_echo_n "checking for working mmap... " >&6; }
7779if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
7780 $as_echo_n "(cached) " >&6
01027315 7781else
05ea2a05
TT
7782 if test "$cross_compiling" = yes; then :
7783 ac_cv_func_mmap_fixed_mapped=no
7784else
7785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7786/* end confdefs.h. */
7787$ac_includes_default
7788/* malloc might have been renamed as rpl_malloc. */
7789#undef malloc
7790
7791/* Thanks to Mike Haertel and Jim Avera for this test.
7792 Here is a matrix of mmap possibilities:
7793 mmap private not fixed
7794 mmap private fixed at somewhere currently unmapped
7795 mmap private fixed at somewhere already mapped
7796 mmap shared not fixed
7797 mmap shared fixed at somewhere currently unmapped
7798 mmap shared fixed at somewhere already mapped
7799 For private mappings, we should verify that changes cannot be read()
7800 back from the file, nor mmap's back from the file at a different
7801 address. (There have been systems where private was not correctly
7802 implemented like the infamous i386 svr4.0, and systems where the
7803 VM page cache was not coherent with the file system buffer cache
7804 like early versions of FreeBSD and possibly contemporary NetBSD.)
7805 For shared mappings, we should conversely verify that changes get
7806 propagated back to all the places they're supposed to be.
7807
7808 Grep wants private fixed already mapped.
7809 The main things grep needs to know about mmap are:
7810 * does it exist and is it safe to write into the mmap'd area
7811 * how to use it (BSD variants) */
7812
7813#include <fcntl.h>
7814#include <sys/mman.h>
7815
7816#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7817char *malloc ();
7818#endif
01027315 7819
05ea2a05
TT
7820/* This mess was copied from the GNU getpagesize.h. */
7821#ifndef HAVE_GETPAGESIZE
7822# ifdef _SC_PAGESIZE
7823# define getpagesize() sysconf(_SC_PAGESIZE)
7824# else /* no _SC_PAGESIZE */
7825# ifdef HAVE_SYS_PARAM_H
7826# include <sys/param.h>
7827# ifdef EXEC_PAGESIZE
7828# define getpagesize() EXEC_PAGESIZE
7829# else /* no EXEC_PAGESIZE */
7830# ifdef NBPG
7831# define getpagesize() NBPG * CLSIZE
7832# ifndef CLSIZE
7833# define CLSIZE 1
7834# endif /* no CLSIZE */
7835# else /* no NBPG */
7836# ifdef NBPC
7837# define getpagesize() NBPC
7838# else /* no NBPC */
7839# ifdef PAGESIZE
7840# define getpagesize() PAGESIZE
7841# endif /* PAGESIZE */
7842# endif /* no NBPC */
7843# endif /* no NBPG */
7844# endif /* no EXEC_PAGESIZE */
7845# else /* no HAVE_SYS_PARAM_H */
7846# define getpagesize() 8192 /* punt totally */
7847# endif /* no HAVE_SYS_PARAM_H */
7848# endif /* no _SC_PAGESIZE */
7849
7850#endif /* no HAVE_GETPAGESIZE */
01027315 7851
05ea2a05
TT
7852int
7853main ()
7854{
7855 char *data, *data2, *data3;
7856 const char *cdata2;
7857 int i, pagesize;
7858 int fd, fd2;
01027315 7859
05ea2a05 7860 pagesize = getpagesize ();
01027315 7861
05ea2a05
TT
7862 /* First, make a file with some known garbage in it. */
7863 data = (char *) malloc (pagesize);
7864 if (!data)
7865 return 1;
7866 for (i = 0; i < pagesize; ++i)
7867 *(data + i) = rand ();
7868 umask (0);
7869 fd = creat ("conftest.mmap", 0600);
7870 if (fd < 0)
7871 return 2;
7872 if (write (fd, data, pagesize) != pagesize)
7873 return 3;
7874 close (fd);
7875
7876 /* Next, check that the tail of a page is zero-filled. File must have
7877 non-zero length, otherwise we risk SIGBUS for entire page. */
7878 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7879 if (fd2 < 0)
7880 return 4;
7881 cdata2 = "";
7882 if (write (fd2, cdata2, 1) != 1)
7883 return 5;
7884 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7885 if (data2 == MAP_FAILED)
7886 return 6;
7887 for (i = 0; i < pagesize; ++i)
7888 if (*(data2 + i))
7889 return 7;
7890 close (fd2);
7891 if (munmap (data2, pagesize))
7892 return 8;
7893
7894 /* Next, try to mmap the file at a fixed address which already has
7895 something else allocated at it. If we can, also make sure that
7896 we see the same garbage. */
7897 fd = open ("conftest.mmap", O_RDWR);
7898 if (fd < 0)
7899 return 9;
7900 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7901 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7902 return 10;
7903 for (i = 0; i < pagesize; ++i)
7904 if (*(data + i) != *(data2 + i))
7905 return 11;
7906
7907 /* Finally, make sure that changes to the mapped area do not
7908 percolate back to the file as seen by read(). (This is a bug on
7909 some variants of i386 svr4.0.) */
7910 for (i = 0; i < pagesize; ++i)
7911 *(data2 + i) = *(data2 + i) + 1;
7912 data3 = (char *) malloc (pagesize);
7913 if (!data3)
7914 return 12;
7915 if (read (fd, data3, pagesize) != pagesize)
7916 return 13;
7917 for (i = 0; i < pagesize; ++i)
7918 if (*(data + i) != *(data3 + i))
7919 return 14;
7920 close (fd);
7921 return 0;
7922}
7923_ACEOF
7924if ac_fn_c_try_run "$LINENO"; then :
7925 ac_cv_func_mmap_fixed_mapped=yes
7926else
7927 ac_cv_func_mmap_fixed_mapped=no
7928fi
7929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7930 conftest.$ac_objext conftest.beam conftest.$ac_ext
7931fi
01027315 7932
05ea2a05
TT
7933fi
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7935$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7936if test $ac_cv_func_mmap_fixed_mapped = yes; then
01027315 7937
05ea2a05 7938$as_echo "#define HAVE_MMAP 1" >>confdefs.h
01027315 7939
05ea2a05
TT
7940fi
7941rm -f conftest.mmap conftest.txt
01027315 7942
05ea2a05
TT
7943 for ac_header in vfork.h
7944do :
7945 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
7946if test "x$ac_cv_header_vfork_h" = xyes; then :
7947 cat >>confdefs.h <<_ACEOF
7948#define HAVE_VFORK_H 1
7949_ACEOF
01027315 7950
05ea2a05 7951fi
01027315 7952
05ea2a05
TT
7953done
7954
7955for ac_func in fork vfork
7956do :
7957 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7958ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7959if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7960 cat >>confdefs.h <<_ACEOF
7961#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7962_ACEOF
01027315 7963
01027315 7964fi
05ea2a05 7965done
01027315 7966
05ea2a05
TT
7967if test "x$ac_cv_func_fork" = xyes; then
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
7969$as_echo_n "checking for working fork... " >&6; }
7970if ${ac_cv_func_fork_works+:} false; then :
7971 $as_echo_n "(cached) " >&6
7972else
7973 if test "$cross_compiling" = yes; then :
7974 ac_cv_func_fork_works=cross
7975else
7976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7977/* end confdefs.h. */
7978$ac_includes_default
01027315
TT
7979int
7980main ()
7981{
05ea2a05
TT
7982
7983 /* By Ruediger Kuhlmann. */
7984 return fork () < 0;
7985
01027315
TT
7986 ;
7987 return 0;
7988}
7989_ACEOF
05ea2a05
TT
7990if ac_fn_c_try_run "$LINENO"; then :
7991 ac_cv_func_fork_works=yes
7992else
7993 ac_cv_func_fork_works=no
01027315 7994fi
05ea2a05
TT
7995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7996 conftest.$ac_objext conftest.beam conftest.$ac_ext
01027315
TT
7997fi
7998
05ea2a05
TT
7999fi
8000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8001$as_echo "$ac_cv_func_fork_works" >&6; }
01027315 8002
05ea2a05
TT
8003else
8004 ac_cv_func_fork_works=$ac_cv_func_fork
8005fi
8006if test "x$ac_cv_func_fork_works" = xcross; then
8007 case $host in
8008 *-*-amigaos* | *-*-msdosdjgpp*)
8009 # Override, as these systems have only a dummy fork() stub
8010 ac_cv_func_fork_works=no
8011 ;;
8012 *)
8013 ac_cv_func_fork_works=yes
8014 ;;
8015 esac
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8017$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8018fi
8019ac_cv_func_vfork_works=$ac_cv_func_vfork
8020if test "x$ac_cv_func_vfork" = xyes; then
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8022$as_echo_n "checking for working vfork... " >&6; }
8023if ${ac_cv_func_vfork_works+:} false; then :
8024 $as_echo_n "(cached) " >&6
8025else
8026 if test "$cross_compiling" = yes; then :
8027 ac_cv_func_vfork_works=cross
8028else
8029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8030/* end confdefs.h. */
8031/* Thanks to Paul Eggert for this test. */
8032$ac_includes_default
8033#include <sys/wait.h>
8034#ifdef HAVE_VFORK_H
8035# include <vfork.h>
8036#endif
8037/* On some sparc systems, changes by the child to local and incoming
8038 argument registers are propagated back to the parent. The compiler
8039 is told about this with #include <vfork.h>, but some compilers
8040 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8041 static variable whose address is put into a register that is
8042 clobbered by the vfork. */
8043static void
8044#ifdef __cplusplus
8045sparc_address_test (int arg)
8046# else
8047sparc_address_test (arg) int arg;
8048#endif
8049{
8050 static pid_t child;
8051 if (!child) {
8052 child = vfork ();
8053 if (child < 0) {
8054 perror ("vfork");
8055 _exit(2);
8056 }
8057 if (!child) {
8058 arg = getpid();
8059 write(-1, "", 0);
8060 _exit (arg);
8061 }
8062 }
8063}
01027315 8064
05ea2a05
TT
8065int
8066main ()
8067{
8068 pid_t parent = getpid ();
8069 pid_t child;
8070
8071 sparc_address_test (0);
8072
8073 child = vfork ();
8074
8075 if (child == 0) {
8076 /* Here is another test for sparc vfork register problems. This
8077 test uses lots of local variables, at least as many local
8078 variables as main has allocated so far including compiler
8079 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8080 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8081 reuse the register of parent for one of the local variables,
8082 since it will think that parent can't possibly be used any more
8083 in this routine. Assigning to the local variable will thus
8084 munge parent in the parent process. */
8085 pid_t
8086 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8087 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8088 /* Convince the compiler that p..p7 are live; otherwise, it might
8089 use the same hardware register for all 8 local variables. */
8090 if (p != p1 || p != p2 || p != p3 || p != p4
8091 || p != p5 || p != p6 || p != p7)
8092 _exit(1);
8093
8094 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8095 from child file descriptors. If the child closes a descriptor
8096 before it execs or exits, this munges the parent's descriptor
8097 as well. Test for this by closing stdout in the child. */
8098 _exit(close(fileno(stdout)) != 0);
8099 } else {
8100 int status;
8101 struct stat st;
8102
8103 while (wait(&status) != child)
8104 ;
8105 return (
8106 /* Was there some problem with vforking? */
8107 child < 0
8108
8109 /* Did the child fail? (This shouldn't happen.) */
8110 || status
8111
8112 /* Did the vfork/compiler bug occur? */
8113 || parent != getpid()
8114
8115 /* Did the file descriptor bug occur? */
8116 || fstat(fileno(stdout), &st) != 0
8117 );
8118 }
8119}
8120_ACEOF
8121if ac_fn_c_try_run "$LINENO"; then :
8122 ac_cv_func_vfork_works=yes
8123else
8124 ac_cv_func_vfork_works=no
8125fi
8126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8127 conftest.$ac_objext conftest.beam conftest.$ac_ext
8128fi
01027315 8129
05ea2a05
TT
8130fi
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8132$as_echo "$ac_cv_func_vfork_works" >&6; }
01027315 8133
05ea2a05
TT
8134fi;
8135if test "x$ac_cv_func_fork_works" = xcross; then
8136 ac_cv_func_vfork_works=$ac_cv_func_vfork
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8138$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8139fi
01027315 8140
05ea2a05 8141if test "x$ac_cv_func_vfork_works" = xyes; then
01027315 8142
05ea2a05 8143$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
01027315 8144
05ea2a05 8145else
01027315 8146
05ea2a05 8147$as_echo "#define vfork fork" >>confdefs.h
01027315 8148
05ea2a05
TT
8149fi
8150if test "x$ac_cv_func_fork_works" = xyes; then
01027315 8151
05ea2a05 8152$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
01027315 8153
05ea2a05 8154fi
01027315 8155
8ae8e197 8156 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05 8157 ptrace64 sbrk setns sigaltstack sigprocmask \
f4931779 8158 setpgid setpgrp getrusage getauxval sigtimedwait
05ea2a05
TT
8159do :
8160 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8161ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8162if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8163 cat >>confdefs.h <<_ACEOF
8164#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
01027315 8165_ACEOF
05ea2a05 8166
01027315 8167fi
05ea2a05 8168done
01027315 8169
01027315 8170
0b03c6f0
TT
8171 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
8172 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
8173 # only in linux/personality.h.
8174 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
8175"
8176if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
8177 ac_have_decl=1
8178else
8179 ac_have_decl=0
8180fi
8181
8182cat >>confdefs.h <<_ACEOF
8183#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
8184_ACEOF
8185
8186
05ea2a05
TT
8187 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8188if test "x$ac_cv_have_decl_strstr" = xyes; then :
8189 ac_have_decl=1
01027315 8190else
05ea2a05 8191 ac_have_decl=0
01027315
TT
8192fi
8193
05ea2a05
TT
8194cat >>confdefs.h <<_ACEOF
8195#define HAVE_DECL_STRSTR $ac_have_decl
8196_ACEOF
01027315 8197
05ea2a05
TT
8198
8199 # ----------------------- #
8200 # Checks for structures. #
8201 # ----------------------- #
8202
8203 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8204if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
8205
8206cat >>confdefs.h <<_ACEOF
8207#define HAVE_STRUCT_STAT_ST_BLOCKS 1
8208_ACEOF
8209
8210
8211fi
8212ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
8213if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
8214
8215cat >>confdefs.h <<_ACEOF
8216#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
8217_ACEOF
8218
8219
8220fi
8221
8222
e911c666
JB
8223 # On FreeBSD we need libutil for the kinfo_get* functions. On
8224 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8225 # Figure out which one to use.
05ea2a05
TT
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8227$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8228if ${ac_cv_search_kinfo_getfile+:} false; then :
01027315
TT
8229 $as_echo_n "(cached) " >&6
8230else
05ea2a05
TT
8231 ac_func_search_save_LIBS=$LIBS
8232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01027315 8233/* end confdefs.h. */
01027315 8234
05ea2a05
TT
8235/* Override any GCC internal prototype to avoid an error.
8236 Use char because int might match the return type of a GCC
8237 builtin and then its argument prototype would still apply. */
8238#ifdef __cplusplus
8239extern "C"
8240#endif
8241char kinfo_getfile ();
8242int
8243main ()
8244{
8245return kinfo_getfile ();
8246 ;
8247 return 0;
8248}
01027315 8249_ACEOF
05ea2a05
TT
8250for ac_lib in '' util util-freebsd; do
8251 if test -z "$ac_lib"; then
8252 ac_res="none required"
8253 else
8254 ac_res=-l$ac_lib
8255 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8256 fi
8257 if ac_fn_c_try_link "$LINENO"; then :
8258 ac_cv_search_kinfo_getfile=$ac_res
01027315 8259fi
05ea2a05
TT
8260rm -f core conftest.err conftest.$ac_objext \
8261 conftest$ac_exeext
8262 if ${ac_cv_search_kinfo_getfile+:} false; then :
8263 break
8264fi
8265done
8266if ${ac_cv_search_kinfo_getfile+:} false; then :
01027315 8267
05ea2a05
TT
8268else
8269 ac_cv_search_kinfo_getfile=no
8270fi
8271rm conftest.$ac_ext
8272LIBS=$ac_func_search_save_LIBS
8273fi
8274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8275$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8276ac_res=$ac_cv_search_kinfo_getfile
8277if test "$ac_res" != no; then :
8278 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8279
e911c666
JB
8280fi
8281
8282
8283 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
8284 for ac_func in kinfo_getfile
8285do :
8286 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
8287if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
8288 cat >>confdefs.h <<_ACEOF
8289#define HAVE_KINFO_GETFILE 1
8290_ACEOF
01027315
TT
8291
8292fi
e911c666 8293done
01027315 8294
01027315 8295
261b0748
LM
8296 # ----------------------- #
8297 # Check for threading. #
8298 # ----------------------- #
8299
8300 # Check whether --enable-threading was given.
8301if test "${enable_threading+set}" = set; then :
8302 enableval=$enable_threading; case "$enableval" in
8303 yes) want_threading=yes ;;
8304 no) want_threading=no ;;
8305 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
8306 esac
8307else
8308 want_threading=yes
8309fi
8310
8311
05ea2a05
TT
8312 # Check for std::thread. This does not work on some platforms, like
8313 # mingw and DJGPP.
8314 ac_ext=cpp
8315ac_cpp='$CXXCPP $CPPFLAGS'
8316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
01027315 8319
01027315 8320
01027315 8321
01027315 8322
05ea2a05
TT
8323
8324ac_ext=c
8325ac_cpp='$CPP $CPPFLAGS'
8326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8328ac_compiler_gnu=$ac_cv_c_compiler_gnu
8329
8330ax_pthread_ok=no
8331
8332# We used to check for pthread.h first, but this fails if pthread.h
8333# requires special compiler flags (e.g. on Tru64 or Sequent).
8334# It gets checked for in the link test anyway.
8335
8336# First of all, check if the user has set any of the PTHREAD_LIBS,
8337# etcetera environment variables, and if threads linking works using
8338# them:
8339if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
8340 ax_pthread_save_CC="$CC"
8341 ax_pthread_save_CFLAGS="$CFLAGS"
8342 ax_pthread_save_LIBS="$LIBS"
8343 if test "x$PTHREAD_CC" != "x"; then :
8344 CC="$PTHREAD_CC"
8345fi
8346 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8347 LIBS="$PTHREAD_LIBS $LIBS"
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8349$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8351/* end confdefs.h. */
8352
8353/* Override any GCC internal prototype to avoid an error.
8354 Use char because int might match the return type of a GCC
8355 builtin and then its argument prototype would still apply. */
8356#ifdef __cplusplus
8357extern "C"
8358#endif
8359char pthread_join ();
8360int
8361main ()
8362{
8363return pthread_join ();
8364 ;
8365 return 0;
8366}
8367_ACEOF
8368if ac_fn_c_try_link "$LINENO"; then :
8369 ax_pthread_ok=yes
8370fi
8371rm -f core conftest.err conftest.$ac_objext \
8372 conftest$ac_exeext conftest.$ac_ext
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8374$as_echo "$ax_pthread_ok" >&6; }
8375 if test "x$ax_pthread_ok" = "xno"; then
8376 PTHREAD_LIBS=""
8377 PTHREAD_CFLAGS=""
8378 fi
8379 CC="$ax_pthread_save_CC"
8380 CFLAGS="$ax_pthread_save_CFLAGS"
8381 LIBS="$ax_pthread_save_LIBS"
8382fi
8383
8384# We must check for the threads library under a number of different
8385# names; the ordering is very important because some systems
8386# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8387# libraries is broken (non-POSIX).
8388
8389# Create a list of thread flags to try. Items starting with a "-" are
8390# C compiler flags, and other items are library names, except for "none"
8391# which indicates that we try without any flags at all, and "pthread-config"
8392# which is a program returning the flags for the Pth emulation library.
8393
8394ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
8395
8396# The ordering *is* (sometimes) important. Some notes on the
8397# individual items follow:
8398
8399# pthreads: AIX (must check this before -lpthread)
8400# none: in case threads are in libc; should be tried before -Kthread and
8401# other compiler flags to prevent continual compiler warnings
8402# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8403# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8404# (Note: HP C rejects this with "bad form for `-t' option")
8405# -pthreads: Solaris/gcc (Note: HP C also rejects)
8406# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8407# doesn't hurt to check since this sometimes defines pthreads and
8408# -D_REENTRANT too), HP C (must be checked before -lpthread, which
8409# is present but should not be used directly; and before -mthreads,
8410# because the compiler interprets this as "-mt" + "-hreads")
8411# -mthreads: Mingw32/gcc, Lynx/gcc
8412# pthread: Linux, etcetera
8413# --thread-safe: KAI C++
8414# pthread-config: use pthread-config program (for GNU Pth library)
8415
8416case $host_os in
8417
8418 freebsd*)
8419
8420 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8421 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8422
8423 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
8424 ;;
8425
8426 hpux*)
8427
8428 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8429 # multi-threading and also sets -lpthread."
8430
8431 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8432 ;;
8433
8434 openedition*)
8435
8436 # IBM z/OS requires a feature-test macro to be defined in order to
8437 # enable POSIX threads at all, so give the user a hint if this is
8438 # not set. (We don't define these ourselves, as they can affect
8439 # other portions of the system API in unpredictable ways.)
8440
8441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8442/* end confdefs.h. */
8443
8444# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8445 AX_PTHREAD_ZOS_MISSING
8446# endif
8447
8448_ACEOF
8449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8450 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8452$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8453fi
8454rm -f conftest*
8455
8456 ;;
8457
8458 solaris*)
8459
8460 # On Solaris (at least, for some versions), libc contains stubbed
8461 # (non-functional) versions of the pthreads routines, so link-based
8462 # tests will erroneously succeed. (N.B.: The stubs are missing
8463 # pthread_cleanup_push, or rather a function called by this macro,
8464 # so we could check for that, but who knows whether they'll stub
8465 # that too in a future libc.) So we'll check first for the
8466 # standard Solaris way of linking pthreads (-mt -lpthread).
8467
8468 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
8469 ;;
8470esac
8471
8472# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
8473
8474if test "x$GCC" = "xyes"; then :
8475 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
8476fi
8477
8478# The presence of a feature test macro requesting re-entrant function
8479# definitions is, on some systems, a strong hint that pthreads support is
8480# correctly enabled
8481
8482case $host_os in
8483 darwin* | hpux* | linux* | osf* | solaris*)
8484 ax_pthread_check_macro="_REENTRANT"
8485 ;;
8486
8487 aix*)
8488 ax_pthread_check_macro="_THREAD_SAFE"
8489 ;;
8490
8491 *)
8492 ax_pthread_check_macro="--"
8493 ;;
8494esac
8495if test "x$ax_pthread_check_macro" = "x--"; then :
8496 ax_pthread_check_cond=0
8497else
8498 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
8499fi
8500
8501# Are we compiling with Clang?
8502
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
8504$as_echo_n "checking whether $CC is Clang... " >&6; }
8505if ${ax_cv_PTHREAD_CLANG+:} false; then :
8506 $as_echo_n "(cached) " >&6
8507else
8508 ax_cv_PTHREAD_CLANG=no
8509 # Note that Autoconf sets GCC=yes for Clang as well as GCC
8510 if test "x$GCC" = "xyes"; then
8511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8512/* end confdefs.h. */
8513/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
8514# if defined(__clang__) && defined(__llvm__)
8515 AX_PTHREAD_CC_IS_CLANG
8516# endif
8517
8518_ACEOF
8519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8520 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
8521 ax_cv_PTHREAD_CLANG=yes
8522fi
8523rm -f conftest*
8524
8525 fi
8526
8527fi
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
8529$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
8530ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
8531
8532ax_pthread_clang_warning=no
8533
8534# Clang needs special handling, because older versions handle the -pthread
8535# option in a rather... idiosyncratic way
8536
8537if test "x$ax_pthread_clang" = "xyes"; then
8538
8539 # Clang takes -pthread; it has never supported any other flag
8540
8541 # (Note 1: This will need to be revisited if a system that Clang
8542 # supports has POSIX threads in a separate library. This tends not
8543 # to be the way of modern systems, but it's conceivable.)
8544
8545 # (Note 2: On some systems, notably Darwin, -pthread is not needed
8546 # to get POSIX threads support; the API is always present and
8547 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
8548 # -pthread does define _REENTRANT, and while the Darwin headers
8549 # ignore this macro, third-party headers might not.)
01027315
TT
8550
8551 PTHREAD_CFLAGS="-pthread"
8552 PTHREAD_LIBS=
8553
8554 ax_pthread_ok=yes
8555
8556 # However, older versions of Clang make a point of warning the user
8557 # that, in an invocation where only linking and no compilation is
8558 # taking place, the -pthread option has no effect ("argument unused
8559 # during compilation"). They expect -pthread to be passed in only
8560 # when source code is being compiled.
8561 #
8562 # Problem is, this is at odds with the way Automake and most other
8563 # C build frameworks function, which is that the same flags used in
8564 # compilation (CFLAGS) are also used in linking. Many systems
8565 # supported by AX_PTHREAD require exactly this for POSIX threads
8566 # support, and in fact it is often not straightforward to specify a
8567 # flag that is used only in the compilation phase and not in
8568 # linking. Such a scenario is extremely rare in practice.
8569 #
8570 # Even though use of the -pthread flag in linking would only print
8571 # a warning, this can be a nuisance for well-run software projects
8572 # that build with -Werror. So if the active version of Clang has
8573 # this misfeature, we search for an option to squash it.
8574
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
8576$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
8577if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
8578 $as_echo_n "(cached) " >&6
8579else
8580 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
8581 # Create an alternate version of $ac_link that compiles and
8582 # links in two steps (.c -> .o, .o -> exe) instead of one
8583 # (.c -> exe), because the warning occurs only in the second
8584 # step
8585 ax_pthread_save_ac_link="$ac_link"
8586 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
8587 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
8588 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
8589 ax_pthread_save_CFLAGS="$CFLAGS"
8590 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
8591 if test "x$ax_pthread_try" = "xunknown"; then :
8592 break
8593fi
8594 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
8595 ac_link="$ax_pthread_save_ac_link"
8596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8597/* end confdefs.h. */
8598int main(void){return 0;}
8599_ACEOF
8600if ac_fn_c_try_link "$LINENO"; then :
8601 ac_link="$ax_pthread_2step_ac_link"
8602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8603/* end confdefs.h. */
8604int main(void){return 0;}
8605_ACEOF
8606if ac_fn_c_try_link "$LINENO"; then :
8607 break
8608fi
8609rm -f core conftest.err conftest.$ac_objext \
8610 conftest$ac_exeext conftest.$ac_ext
8611
8612fi
8613rm -f core conftest.err conftest.$ac_objext \
8614 conftest$ac_exeext conftest.$ac_ext
8615 done
8616 ac_link="$ax_pthread_save_ac_link"
8617 CFLAGS="$ax_pthread_save_CFLAGS"
8618 if test "x$ax_pthread_try" = "x"; then :
8619 ax_pthread_try=no
8620fi
8621 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
8622
8623fi
8624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
8625$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
8626
8627 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
8628 no | unknown) ;;
8629 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
8630 esac
8631
8632fi # $ax_pthread_clang = yes
8633
8634if test "x$ax_pthread_ok" = "xno"; then
8635for ax_pthread_try_flag in $ax_pthread_flags; do
8636
8637 case $ax_pthread_try_flag in
8638 none)
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8640$as_echo_n "checking whether pthreads work without any flags... " >&6; }
8641 ;;
8642
8643 -mt,pthread)
8644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8645$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8646 PTHREAD_CFLAGS="-mt"
8647 PTHREAD_LIBS="-lpthread"
8648 ;;
8649
8650 -*)
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
8652$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
8653 PTHREAD_CFLAGS="$ax_pthread_try_flag"
8654 ;;
8655
8656 pthread-config)
8657 # Extract the first word of "pthread-config", so it can be a program name with args.
8658set dummy pthread-config; ac_word=$2
8659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8660$as_echo_n "checking for $ac_word... " >&6; }
8661if ${ac_cv_prog_ax_pthread_config+:} false; then :
8662 $as_echo_n "(cached) " >&6
8663else
8664 if test -n "$ax_pthread_config"; then
8665 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8666else
8667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8668for as_dir in $PATH
8669do
8670 IFS=$as_save_IFS
8671 test -z "$as_dir" && as_dir=.
8672 for ac_exec_ext in '' $ac_executable_extensions; do
8673 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8674 ac_cv_prog_ax_pthread_config="yes"
8675 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8676 break 2
8677 fi
05ea2a05
TT
8678done
8679 done
8680IFS=$as_save_IFS
8681
8682 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8683fi
8684fi
8685ax_pthread_config=$ac_cv_prog_ax_pthread_config
8686if test -n "$ax_pthread_config"; then
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8688$as_echo "$ax_pthread_config" >&6; }
8689else
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8691$as_echo "no" >&6; }
8692fi
8693
8694
8695 if test "x$ax_pthread_config" = "xno"; then :
8696 continue
8697fi
8698 PTHREAD_CFLAGS="`pthread-config --cflags`"
8699 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8700 ;;
8701
8702 *)
8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
8704$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
8705 PTHREAD_LIBS="-l$ax_pthread_try_flag"
8706 ;;
8707 esac
8708
8709 ax_pthread_save_CFLAGS="$CFLAGS"
8710 ax_pthread_save_LIBS="$LIBS"
8711 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8712 LIBS="$PTHREAD_LIBS $LIBS"
8713
8714 # Check for various functions. We must include pthread.h,
8715 # since some functions may be macros. (On the Sequent, we
8716 # need a special flag -Kthread to make this header compile.)
8717 # We check for pthread_join because it is in -lpthread on IRIX
8718 # while pthread_create is in libc. We check for pthread_attr_init
8719 # due to DEC craziness with -lpthreads. We check for
8720 # pthread_cleanup_push because it is one of the few pthread
8721 # functions on Solaris that doesn't have a non-functional libc stub.
8722 # We try pthread_create on general principles.
8723
8724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8725/* end confdefs.h. */
8726#include <pthread.h>
8727# if $ax_pthread_check_cond
8728# error "$ax_pthread_check_macro must be defined"
8729# endif
8730 static void routine(void *a) { a = 0; }
8731 static void *start_routine(void *a) { return a; }
8732int
8733main ()
8734{
8735pthread_t th; pthread_attr_t attr;
8736 pthread_create(&th, 0, start_routine, 0);
8737 pthread_join(th, 0);
8738 pthread_attr_init(&attr);
8739 pthread_cleanup_push(routine, 0);
8740 pthread_cleanup_pop(0) /* ; */
8741 ;
8742 return 0;
8743}
8744_ACEOF
8745if ac_fn_c_try_link "$LINENO"; then :
8746 ax_pthread_ok=yes
8747fi
8748rm -f core conftest.err conftest.$ac_objext \
8749 conftest$ac_exeext conftest.$ac_ext
8750
8751 CFLAGS="$ax_pthread_save_CFLAGS"
8752 LIBS="$ax_pthread_save_LIBS"
8753
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8755$as_echo "$ax_pthread_ok" >&6; }
8756 if test "x$ax_pthread_ok" = "xyes"; then :
8757 break
8758fi
8759
8760 PTHREAD_LIBS=""
8761 PTHREAD_CFLAGS=""
8762done
8763fi
8764
8765# Various other checks:
8766if test "x$ax_pthread_ok" = "xyes"; then
8767 ax_pthread_save_CFLAGS="$CFLAGS"
8768 ax_pthread_save_LIBS="$LIBS"
8769 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8770 LIBS="$PTHREAD_LIBS $LIBS"
8771
8772 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8774$as_echo_n "checking for joinable pthread attribute... " >&6; }
8775if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8776 $as_echo_n "(cached) " >&6
8777else
8778 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8779 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781/* end confdefs.h. */
8782#include <pthread.h>
8783int
8784main ()
8785{
8786int attr = $ax_pthread_attr; return attr /* ; */
8787 ;
8788 return 0;
8789}
8790_ACEOF
8791if ac_fn_c_try_link "$LINENO"; then :
8792 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
8793fi
8794rm -f core conftest.err conftest.$ac_objext \
8795 conftest$ac_exeext conftest.$ac_ext
8796 done
8797
8798fi
8799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8800$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8801 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
8802 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
8803 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
8804
8805cat >>confdefs.h <<_ACEOF
8806#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8807_ACEOF
8808
8809 ax_pthread_joinable_attr_defined=yes
8810
8811fi
8812
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
8814$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
8815if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8816 $as_echo_n "(cached) " >&6
8817else
8818 ax_cv_PTHREAD_SPECIAL_FLAGS=no
8819 case $host_os in
8820 solaris*)
8821 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
8822 ;;
8823 esac
8824
8825fi
8826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8827$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8828 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8829 test "x$ax_pthread_special_flags_added" != "xyes"; then :
8830 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8831 ax_pthread_special_flags_added=yes
8832fi
8833
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8835$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8836if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8837 $as_echo_n "(cached) " >&6
8838else
8839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8840/* end confdefs.h. */
8841#include <pthread.h>
8842int
8843main ()
8844{
8845int i = PTHREAD_PRIO_INHERIT;
8846 ;
8847 return 0;
8848}
8849_ACEOF
8850if ac_fn_c_try_link "$LINENO"; then :
8851 ax_cv_PTHREAD_PRIO_INHERIT=yes
8852else
8853 ax_cv_PTHREAD_PRIO_INHERIT=no
8854fi
8855rm -f core conftest.err conftest.$ac_objext \
8856 conftest$ac_exeext conftest.$ac_ext
8857
8858fi
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8860$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8861 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
8862 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
8863
8864$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8865
8866 ax_pthread_prio_inherit_defined=yes
8867
8868fi
8869
8870 CFLAGS="$ax_pthread_save_CFLAGS"
8871 LIBS="$ax_pthread_save_LIBS"
8872
8873 # More AIX lossage: compile with *_r variant
8874 if test "x$GCC" != "xyes"; then
8875 case $host_os in
8876 aix*)
8877 case "x/$CC" in #(
8878 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8879 #handle absolute path differently from PATH based program lookup
8880 case "x$CC" in #(
8881 x/*) :
8882 if as_fn_executable_p ${CC}_r; then :
8883 PTHREAD_CC="${CC}_r"
8884fi ;; #(
8885 *) :
8886 for ac_prog in ${CC}_r
8887do
8888 # Extract the first word of "$ac_prog", so it can be a program name with args.
8889set dummy $ac_prog; ac_word=$2
8890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8891$as_echo_n "checking for $ac_word... " >&6; }
8892if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8893 $as_echo_n "(cached) " >&6
8894else
8895 if test -n "$PTHREAD_CC"; then
8896 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8897else
8898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8899for as_dir in $PATH
8900do
8901 IFS=$as_save_IFS
8902 test -z "$as_dir" && as_dir=.
8903 for ac_exec_ext in '' $ac_executable_extensions; do
8904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8905 ac_cv_prog_PTHREAD_CC="$ac_prog"
8906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8907 break 2
8908 fi
8909done
8910 done
8911IFS=$as_save_IFS
8912
8913fi
8914fi
8915PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8916if test -n "$PTHREAD_CC"; then
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8918$as_echo "$PTHREAD_CC" >&6; }
8919else
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8921$as_echo "no" >&6; }
8922fi
8923
8924
8925 test -n "$PTHREAD_CC" && break
8926done
8927test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8928 ;;
8929esac ;; #(
8930 *) :
8931 ;;
8932esac
8933 ;;
8934 esac
8935 fi
8936fi
8937
8938test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8939
8940
8941
8942
8943
8944# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8945if test "x$ax_pthread_ok" = "xyes"; then
8946 threads=yes
8947 :
8948else
8949 ax_pthread_ok=no
8950 threads=no
8951fi
8952ac_ext=cpp
8953ac_cpp='$CXXCPP $CPPFLAGS'
8954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8957
8958
c560a5fb
TT
8959 save_LIBS="$LIBS"
8960 LIBS="$PTHREAD_LIBS $LIBS"
8961 save_CXXFLAGS="$CXXFLAGS"
8962 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
05ea2a05
TT
8964$as_echo_n "checking for std::thread... " >&6; }
8965if ${gdb_cv_cxx_std_thread+:} false; then :
8966 $as_echo_n "(cached) " >&6
8967else
8968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8969/* end confdefs.h. */
2124b2de
TT
8970 #if defined (__MINGW32__) || defined (__CYGWIN__)
8971 # ifdef _WIN32_WINNT
8972 # if _WIN32_WINNT < 0x0501
8973 # undef _WIN32_WINNT
8974 # define _WIN32_WINNT 0x0501
8975 # endif
8976 # else
8977 # define _WIN32_WINNT 0x0501
8978 # endif
8979 #endif /* __MINGW32__ || __CYGWIN__ */
8980 #include <thread>
c560a5fb 8981 void callback() { }
05ea2a05
TT
8982int
8983main ()
8984{
8985std::thread t(callback);
8986 ;
8987 return 0;
8988}
8989_ACEOF
8990if ac_fn_cxx_try_compile "$LINENO"; then :
8991 gdb_cv_cxx_std_thread=yes
8992else
8993 gdb_cv_cxx_std_thread=no
8994fi
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8996fi
8997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
8998$as_echo "$gdb_cv_cxx_std_thread" >&6; }
8999
c560a5fb 9000 if test "$threads" = "yes"; then
05ea2a05
TT
9001 # This check must be here, while LIBS includes any necessary
9002 # threading library.
9003 for ac_func in pthread_sigmask pthread_setname_np
9004do :
9005 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9006ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
9007if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9008 cat >>confdefs.h <<_ACEOF
9009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9010_ACEOF
9011
9012fi
9013done
9014
05ea2a05 9015 fi
c560a5fb
TT
9016 LIBS="$save_LIBS"
9017 CXXFLAGS="$save_CXXFLAGS"
261b0748
LM
9018
9019 if test "$want_threading" = "yes"; then
9020 if test "$gdb_cv_cxx_std_thread" = "yes"; then
05ea2a05
TT
9021
9022$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
9023
261b0748 9024 fi
05ea2a05
TT
9025 fi
9026 ac_ext=c
9027ac_cpp='$CPP $CPPFLAGS'
9028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9030ac_compiler_gnu=$ac_cv_c_compiler_gnu
9031
9032
3684d331 9033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
05ea2a05
TT
9034$as_echo_n "checking for sigsetjmp... " >&6; }
9035if ${gdb_cv_func_sigsetjmp+:} false; then :
9036 $as_echo_n "(cached) " >&6
9037else
9038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9039/* end confdefs.h. */
b9442ec1 9040#include <setjmp.h>
05ea2a05
TT
9041int
9042main ()
9043{
b9442ec1
SM
9044sigjmp_buf env;
9045 while (! sigsetjmp (env, 1))
9046 siglongjmp (env, 1);
9047
05ea2a05
TT
9048 ;
9049 return 0;
9050}
9051_ACEOF
9052if ac_fn_c_try_compile "$LINENO"; then :
9053 gdb_cv_func_sigsetjmp=yes
9054else
9055 gdb_cv_func_sigsetjmp=no
b9442ec1 9056
05ea2a05
TT
9057fi
9058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b9442ec1 9059
05ea2a05
TT
9060fi
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
9062$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
3684d331 9063 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
05ea2a05
TT
9064
9065$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
9066
3684d331 9067 fi
05ea2a05
TT
9068
9069
9070# Check whether --with-intel_pt was given.
9071if test "${with_intel_pt+set}" = set; then :
9072 withval=$with_intel_pt;
9073else
9074 with_intel_pt=auto
9075fi
9076
3684d331 9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
05ea2a05 9078$as_echo_n "checking whether to use intel pt... " >&6; }
3684d331 9079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
05ea2a05
TT
9080$as_echo "$with_intel_pt" >&6; }
9081
3684d331
PA
9082 if test "${with_intel_pt}" = no; then
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
05ea2a05 9084$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
3684d331
PA
9085 HAVE_LIBIPT=no
9086 else
9087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
9088/* end confdefs.h. */
9089
3684d331
PA
9090 #include <linux/perf_event.h>
9091 #ifndef PERF_ATTR_SIZE_VER5
9092 # error
9093 #endif
05ea2a05
TT
9094
9095_ACEOF
9096if ac_fn_c_try_cpp "$LINENO"; then :
9097 perf_event=yes
9098else
9099 perf_event=no
9100fi
9101rm -f conftest.err conftest.i conftest.$ac_ext
3684d331
PA
9102 if test "$perf_event" != yes; then
9103 if test "$with_intel_pt" = yes; then
9104 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
9105 else
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
05ea2a05 9107$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
3684d331 9108 fi
05ea2a05 9109 fi
05ea2a05
TT
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119 use_additional=yes
9120
9121 acl_save_prefix="$prefix"
9122 prefix="$acl_final_prefix"
9123 acl_save_exec_prefix="$exec_prefix"
9124 exec_prefix="$acl_final_exec_prefix"
9125
9126 eval additional_includedir=\"$includedir\"
9127 eval additional_libdir=\"$libdir\"
9128
9129 exec_prefix="$acl_save_exec_prefix"
9130 prefix="$acl_save_prefix"
9131
9132
9133# Check whether --with-libipt-prefix was given.
9134if test "${with_libipt_prefix+set}" = set; then :
9135 withval=$with_libipt_prefix;
9136 if test "X$withval" = "Xno"; then
9137 use_additional=no
9138 else
9139 if test "X$withval" = "X"; then
9140
9141 acl_save_prefix="$prefix"
9142 prefix="$acl_final_prefix"
9143 acl_save_exec_prefix="$exec_prefix"
9144 exec_prefix="$acl_final_exec_prefix"
9145
9146 eval additional_includedir=\"$includedir\"
9147 eval additional_libdir=\"$libdir\"
9148
9149 exec_prefix="$acl_save_exec_prefix"
9150 prefix="$acl_save_prefix"
9151
9152 else
9153 additional_includedir="$withval/include"
9154 additional_libdir="$withval/lib"
9155 fi
9156 fi
9157
9158fi
9159
9f1528a1
AB
9160
9161# Check whether --with-libipt-type was given.
9162if test "${with_libipt_type+set}" = set; then :
9163 withval=$with_libipt_type; with_libipt_type=$withval
9164else
9165 with_libipt_type=auto
9166fi
9167
9168 lib_type=`eval echo \$with_libipt_type`
9169
05ea2a05
TT
9170 LIBIPT=
9171 LTLIBIPT=
9172 INCIPT=
9173 rpathdirs=
9174 ltrpathdirs=
9175 names_already_handled=
9176 names_next_round='ipt '
9177 while test -n "$names_next_round"; do
9178 names_this_round="$names_next_round"
9179 names_next_round=
9180 for name in $names_this_round; do
9181 already_handled=
9182 for n in $names_already_handled; do
9183 if test "$n" = "$name"; then
9184 already_handled=yes
9185 break
9186 fi
9187 done
9188 if test -z "$already_handled"; then
9189 names_already_handled="$names_already_handled $name"
9190 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9191 eval value=\"\$HAVE_LIB$uppername\"
9192 if test -n "$value"; then
9193 if test "$value" = yes; then
9194 eval value=\"\$LIB$uppername\"
9195 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
9196 eval value=\"\$LTLIB$uppername\"
9197 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
9198 else
9199 :
9200 fi
9201 else
9202 found_dir=
9203 found_la=
9204 found_so=
9205 found_a=
9206 if test $use_additional = yes; then
9f1528a1 9207 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
9208 found_dir="$additional_libdir"
9209 found_so="$additional_libdir/lib$name.$shlibext"
9210 if test -f "$additional_libdir/lib$name.la"; then
9211 found_la="$additional_libdir/lib$name.la"
9212 fi
9f1528a1 9213 elif test x$lib_type != xshared; then
05ea2a05
TT
9214 if test -f "$additional_libdir/lib$name.$libext"; then
9215 found_dir="$additional_libdir"
9216 found_a="$additional_libdir/lib$name.$libext"
9217 if test -f "$additional_libdir/lib$name.la"; then
9218 found_la="$additional_libdir/lib$name.la"
9219 fi
9220 fi
9221 fi
9222 fi
9223 if test "X$found_dir" = "X"; then
9224 for x in $LDFLAGS $LTLIBIPT; do
9225
9226 acl_save_prefix="$prefix"
9227 prefix="$acl_final_prefix"
9228 acl_save_exec_prefix="$exec_prefix"
9229 exec_prefix="$acl_final_exec_prefix"
9230 eval x=\"$x\"
9231 exec_prefix="$acl_save_exec_prefix"
9232 prefix="$acl_save_prefix"
9233
9234 case "$x" in
9235 -L*)
9236 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9237 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
9238 found_dir="$dir"
9239 found_so="$dir/lib$name.$shlibext"
9240 if test -f "$dir/lib$name.la"; then
9241 found_la="$dir/lib$name.la"
9242 fi
9f1528a1 9243 elif test x$lib_type != xshared; then
05ea2a05
TT
9244 if test -f "$dir/lib$name.$libext"; then
9245 found_dir="$dir"
9246 found_a="$dir/lib$name.$libext"
9247 if test -f "$dir/lib$name.la"; then
9248 found_la="$dir/lib$name.la"
9249 fi
9250 fi
9251 fi
9252 ;;
9253 esac
9254 if test "X$found_dir" != "X"; then
9255 break
9256 fi
9257 done
9258 fi
9259 if test "X$found_dir" != "X"; then
9260 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
9261 if test "X$found_so" != "X"; then
9262 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9263 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9264 else
9265 haveit=
9266 for x in $ltrpathdirs; do
9267 if test "X$x" = "X$found_dir"; then
9268 haveit=yes
9269 break
9270 fi
9271 done
9272 if test -z "$haveit"; then
9273 ltrpathdirs="$ltrpathdirs $found_dir"
9274 fi
9275 if test "$hardcode_direct" = yes; then
9276 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9277 else
9278 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9279 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9280 haveit=
9281 for x in $rpathdirs; do
9282 if test "X$x" = "X$found_dir"; then
9283 haveit=yes
9284 break
9285 fi
9286 done
9287 if test -z "$haveit"; then
9288 rpathdirs="$rpathdirs $found_dir"
9289 fi
9290 else
9291 haveit=
9292 for x in $LDFLAGS $LIBIPT; do
9293
9294 acl_save_prefix="$prefix"
9295 prefix="$acl_final_prefix"
9296 acl_save_exec_prefix="$exec_prefix"
9297 exec_prefix="$acl_final_exec_prefix"
9298 eval x=\"$x\"
9299 exec_prefix="$acl_save_exec_prefix"
9300 prefix="$acl_save_prefix"
9301
9302 if test "X$x" = "X-L$found_dir"; then
9303 haveit=yes
9304 break
9305 fi
9306 done
9307 if test -z "$haveit"; then
9308 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
9309 fi
9310 if test "$hardcode_minus_L" != no; then
9311 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9312 else
9313 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9314 fi
9315 fi
9316 fi
9317 fi
9318 else
9319 if test "X$found_a" != "X"; then
9320 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
9321 else
9322 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
9323 fi
9324 fi
9325 additional_includedir=
9326 case "$found_dir" in
9327 */lib | */lib/)
9328 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9329 additional_includedir="$basedir/include"
9330 ;;
9331 esac
9332 if test "X$additional_includedir" != "X"; then
9333 if test "X$additional_includedir" != "X/usr/include"; then
9334 haveit=
9335 if test "X$additional_includedir" = "X/usr/local/include"; then
9336 if test -n "$GCC"; then
9337 case $host_os in
9338 linux*) haveit=yes;;
9339 esac
9340 fi
9341 fi
9342 if test -z "$haveit"; then
9343 for x in $CPPFLAGS $INCIPT; do
9344
9345 acl_save_prefix="$prefix"
9346 prefix="$acl_final_prefix"
9347 acl_save_exec_prefix="$exec_prefix"
9348 exec_prefix="$acl_final_exec_prefix"
9349 eval x=\"$x\"
9350 exec_prefix="$acl_save_exec_prefix"
9351 prefix="$acl_save_prefix"
9352
9353 if test "X$x" = "X-I$additional_includedir"; then
9354 haveit=yes
9355 break
9356 fi
9357 done
9358 if test -z "$haveit"; then
9359 if test -d "$additional_includedir"; then
9360 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
9361 fi
9362 fi
9363 fi
9364 fi
9365 fi
9366 if test -n "$found_la"; then
9367 save_libdir="$libdir"
9368 case "$found_la" in
9369 */* | *\\*) . "$found_la" ;;
9370 *) . "./$found_la" ;;
9371 esac
9372 libdir="$save_libdir"
9373 for dep in $dependency_libs; do
9374 case "$dep" in
9375 -L*)
9376 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9377 if test "X$additional_libdir" != "X/usr/lib"; then
9378 haveit=
9379 if test "X$additional_libdir" = "X/usr/local/lib"; then
9380 if test -n "$GCC"; then
9381 case $host_os in
9382 linux*) haveit=yes;;
9383 esac
9384 fi
9385 fi
9386 if test -z "$haveit"; then
9387 haveit=
9388 for x in $LDFLAGS $LIBIPT; do
9389
9390 acl_save_prefix="$prefix"
9391 prefix="$acl_final_prefix"
9392 acl_save_exec_prefix="$exec_prefix"
9393 exec_prefix="$acl_final_exec_prefix"
9394 eval x=\"$x\"
9395 exec_prefix="$acl_save_exec_prefix"
9396 prefix="$acl_save_prefix"
9397
9398 if test "X$x" = "X-L$additional_libdir"; then
9399 haveit=yes
9400 break
9401 fi
9402 done
9403 if test -z "$haveit"; then
9404 if test -d "$additional_libdir"; then
9405 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
9406 fi
9407 fi
9408 haveit=
9409 for x in $LDFLAGS $LTLIBIPT; do
9410
9411 acl_save_prefix="$prefix"
9412 prefix="$acl_final_prefix"
9413 acl_save_exec_prefix="$exec_prefix"
9414 exec_prefix="$acl_final_exec_prefix"
9415 eval x=\"$x\"
9416 exec_prefix="$acl_save_exec_prefix"
9417 prefix="$acl_save_prefix"
9418
9419 if test "X$x" = "X-L$additional_libdir"; then
9420 haveit=yes
9421 break
9422 fi
9423 done
9424 if test -z "$haveit"; then
9425 if test -d "$additional_libdir"; then
9426 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
9427 fi
9428 fi
9429 fi
9430 fi
9431 ;;
9432 -R*)
9433 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9434 if test "$enable_rpath" != no; then
9435 haveit=
9436 for x in $rpathdirs; do
9437 if test "X$x" = "X$dir"; then
9438 haveit=yes
9439 break
9440 fi
9441 done
9442 if test -z "$haveit"; then
9443 rpathdirs="$rpathdirs $dir"
9444 fi
9445 haveit=
9446 for x in $ltrpathdirs; do
9447 if test "X$x" = "X$dir"; then
9448 haveit=yes
9449 break
9450 fi
9451 done
9452 if test -z "$haveit"; then
9453 ltrpathdirs="$ltrpathdirs $dir"
9454 fi
9455 fi
9456 ;;
9457 -l*)
9458 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9459 ;;
9460 *.la)
9461 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9462 ;;
9463 *)
9464 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
9465 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
9466 ;;
9467 esac
9468 done
9469 fi
9470 else
9f1528a1
AB
9471 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9472 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9473 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
9474 else
9475 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
9476 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
9477 fi
05ea2a05
TT
9478 fi
9479 fi
9480 fi
9481 done
9482 done
9483 if test "X$rpathdirs" != "X"; then
9484 if test -n "$hardcode_libdir_separator"; then
9485 alldirs=
9486 for found_dir in $rpathdirs; do
9487 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9488 done
9489 acl_save_libdir="$libdir"
9490 libdir="$alldirs"
9491 eval flag=\"$hardcode_libdir_flag_spec\"
9492 libdir="$acl_save_libdir"
9493 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
9494 else
9495 for found_dir in $rpathdirs; do
9496 acl_save_libdir="$libdir"
9497 libdir="$found_dir"
9498 eval flag=\"$hardcode_libdir_flag_spec\"
9499 libdir="$acl_save_libdir"
9500 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
9501 done
9502 fi
9503 fi
9504 if test "X$ltrpathdirs" != "X"; then
9505 for found_dir in $ltrpathdirs; do
9506 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
9507 done
9508 fi
01027315 9509
01027315 9510
05ea2a05 9511 ac_save_CPPFLAGS="$CPPFLAGS"
01027315 9512
05ea2a05
TT
9513 for element in $INCIPT; do
9514 haveit=
9515 for x in $CPPFLAGS; do
01027315 9516
05ea2a05
TT
9517 acl_save_prefix="$prefix"
9518 prefix="$acl_final_prefix"
9519 acl_save_exec_prefix="$exec_prefix"
9520 exec_prefix="$acl_final_exec_prefix"
9521 eval x=\"$x\"
9522 exec_prefix="$acl_save_exec_prefix"
9523 prefix="$acl_save_prefix"
01027315 9524
05ea2a05
TT
9525 if test "X$x" = "X$element"; then
9526 haveit=yes
9527 break
9528 fi
9529 done
9530 if test -z "$haveit"; then
9531 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9532 fi
9533 done
01027315 9534
01027315 9535
05ea2a05
TT
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
9537$as_echo_n "checking for libipt... " >&6; }
9538if ${ac_cv_libipt+:} false; then :
9539 $as_echo_n "(cached) " >&6
9540else
9541
9542 ac_save_LIBS="$LIBS"
9543 LIBS="$LIBS $LIBIPT"
9544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01027315 9545/* end confdefs.h. */
05ea2a05 9546#include "intel-pt.h"
01027315
TT
9547int
9548main ()
9549{
05ea2a05 9550pt_insn_alloc_decoder (0);
01027315
TT
9551 ;
9552 return 0;
9553}
9554_ACEOF
9555if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
9556 ac_cv_libipt=yes
9557else
9558 ac_cv_libipt=no
01027315
TT
9559fi
9560rm -f core conftest.err conftest.$ac_objext \
9561 conftest$ac_exeext conftest.$ac_ext
05ea2a05 9562 LIBS="$ac_save_LIBS"
01027315 9563
01027315 9564fi
05ea2a05
TT
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
9566$as_echo "$ac_cv_libipt" >&6; }
9567 if test "$ac_cv_libipt" = yes; then
9568 HAVE_LIBIPT=yes
01027315 9569
05ea2a05
TT
9570$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
9571
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
9573$as_echo_n "checking how to link with libipt... " >&6; }
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
9575$as_echo "$LIBIPT" >&6; }
9576 else
9577 HAVE_LIBIPT=no
9578 CPPFLAGS="$ac_save_CPPFLAGS"
9579 LIBIPT=
9580 LTLIBIPT=
9581 fi
9582
9583
9584
9585
9586
9587
3684d331
PA
9588 if test "$HAVE_LIBIPT" != yes; then
9589 if test "$with_intel_pt" = yes; then
9590 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
9591 else
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
05ea2a05 9593$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
3684d331
PA
9594 fi
9595 else
9596 save_LIBS=$LIBS
9597 LIBS="$LIBS $LIBIPT"
9598 for ac_func in pt_insn_event
05ea2a05
TT
9599do :
9600 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
9601if test "x$ac_cv_func_pt_insn_event" = xyes; then :
9602 cat >>confdefs.h <<_ACEOF
9603#define HAVE_PT_INSN_EVENT 1
9604_ACEOF
9605
9606fi
01027315 9607done
05ea2a05 9608
3684d331 9609 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
05ea2a05
TT
9610"
9611if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
9612
9613cat >>confdefs.h <<_ACEOF
9614#define HAVE_STRUCT_PT_INSN_ENABLED 1
9615_ACEOF
9616
9617
01027315 9618fi
05ea2a05
TT
9619ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
9620"
9621if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
01027315 9622
05ea2a05
TT
9623cat >>confdefs.h <<_ACEOF
9624#define HAVE_STRUCT_PT_INSN_RESYNCED 1
9625_ACEOF
01027315 9626
05ea2a05
TT
9627
9628fi
9629
3684d331
PA
9630 LIBS=$save_LIBS
9631 fi
05ea2a05 9632 fi
05ea2a05 9633
5dfe4bfc
TT
9634 # Check if the compiler and runtime support printing long longs.
9635
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
9637$as_echo_n "checking for long long support in printf... " >&6; }
9638if ${gdb_cv_printf_has_long_long+:} false; then :
9639 $as_echo_n "(cached) " >&6
9640else
9641 if test "$cross_compiling" = yes; then :
9642 gdb_cv_printf_has_long_long=no
9643else
9644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645/* end confdefs.h. */
9646$ac_includes_default
9647int
9648main ()
9649{
9650char buf[32];
9651 long long l = 0;
9652 l = (l << 16) + 0x0123;
9653 l = (l << 16) + 0x4567;
9654 l = (l << 16) + 0x89ab;
9655 l = (l << 16) + 0xcdef;
9656 sprintf (buf, "0x%016llx", l);
9657 return (strcmp ("0x0123456789abcdef", buf));
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662if ac_fn_c_try_run "$LINENO"; then :
9663 gdb_cv_printf_has_long_long=yes
9664else
9665 gdb_cv_printf_has_long_long=no
9666fi
9667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9668 conftest.$ac_objext conftest.beam conftest.$ac_ext
9669fi
9670
9671fi
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
9673$as_echo "$gdb_cv_printf_has_long_long" >&6; }
9674 if test "$gdb_cv_printf_has_long_long" = yes; then
9675
9676$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
9677
9678 fi
9679
c8693053
RO
9680
9681$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
9682
9683 for ac_header in sys/procfs.h
9684do :
9685 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
9686if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
9687 cat >>confdefs.h <<_ACEOF
9688#define HAVE_SYS_PROCFS_H 1
9689_ACEOF
9690
9691fi
9692
9693done
9694
3684d331 9695 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
9696
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
9698$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
9699 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
01027315
TT
9700 $as_echo_n "(cached) " >&6
9701else
05ea2a05 9702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01027315 9703/* end confdefs.h. */
05ea2a05
TT
9704
9705#define _SYSCALL32
05ea2a05 9706#include <sys/procfs.h>
01027315
TT
9707int
9708main ()
9709{
05ea2a05 9710gregset_t avar
01027315
TT
9711 ;
9712 return 0;
9713}
9714_ACEOF
05ea2a05
TT
9715if ac_fn_c_try_compile "$LINENO"; then :
9716 bfd_cv_have_sys_procfs_type_gregset_t=yes
9717else
9718 bfd_cv_have_sys_procfs_type_gregset_t=no
01027315
TT
9719
9720fi
05ea2a05
TT
9721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9722fi
01027315 9723
05ea2a05 9724 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
01027315 9725
05ea2a05 9726$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
01027315 9727
05ea2a05
TT
9728 fi
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
9730$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
01027315 9731
c8693053
RO
9732
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
9734$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
9735 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
01027315
TT
9736 $as_echo_n "(cached) " >&6
9737else
05ea2a05
TT
9738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9739/* end confdefs.h. */
9740
9741#define _SYSCALL32
05ea2a05
TT
9742#include <sys/procfs.h>
9743int
9744main ()
9745{
9746fpregset_t avar
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751if ac_fn_c_try_compile "$LINENO"; then :
9752 bfd_cv_have_sys_procfs_type_fpregset_t=yes
9753else
9754 bfd_cv_have_sys_procfs_type_fpregset_t=no
01027315
TT
9755
9756fi
05ea2a05 9757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01027315
TT
9758fi
9759
05ea2a05
TT
9760 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
9761
9762$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
9763
9764 fi
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
9766$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
9767
c8693053
RO
9768
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
05ea2a05
TT
9770$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
9771 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
01027315
TT
9772 $as_echo_n "(cached) " >&6
9773else
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775/* end confdefs.h. */
05ea2a05
TT
9776
9777#define _SYSCALL32
05ea2a05 9778#include <sys/procfs.h>
01027315
TT
9779int
9780main ()
9781{
05ea2a05 9782prgregset_t avar
01027315
TT
9783 ;
9784 return 0;
9785}
9786_ACEOF
05ea2a05
TT
9787if ac_fn_c_try_compile "$LINENO"; then :
9788 bfd_cv_have_sys_procfs_type_prgregset_t=yes
01027315 9789else
05ea2a05 9790 bfd_cv_have_sys_procfs_type_prgregset_t=no
01027315
TT
9791
9792fi
05ea2a05
TT
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9794fi
01027315 9795
05ea2a05 9796 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
01027315 9797
05ea2a05 9798$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
01027315 9799
05ea2a05
TT
9800 fi
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
9802$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
01027315 9803
c8693053
RO
9804
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
05ea2a05
TT
9806$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
9807 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
01027315
TT
9808 $as_echo_n "(cached) " >&6
9809else
05ea2a05
TT
9810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811/* end confdefs.h. */
01027315 9812
05ea2a05 9813#define _SYSCALL32
05ea2a05
TT
9814#include <sys/procfs.h>
9815int
9816main ()
9817{
9818prfpregset_t avar
9819 ;
9820 return 0;
9821}
9822_ACEOF
9823if ac_fn_c_try_compile "$LINENO"; then :
9824 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
01027315 9825else
05ea2a05 9826 bfd_cv_have_sys_procfs_type_prfpregset_t=no
01027315 9827
05ea2a05
TT
9828fi
9829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01027315
TT
9830fi
9831
05ea2a05 9832 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
01027315 9833
05ea2a05 9834$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
01027315 9835
05ea2a05
TT
9836 fi
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
9838$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
01027315 9839
c8693053
RO
9840
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
05ea2a05
TT
9842$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
9843 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
9844 $as_echo_n "(cached) " >&6
9845else
9846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9847/* end confdefs.h. */
01027315 9848
05ea2a05 9849#define _SYSCALL32
05ea2a05
TT
9850#include <sys/procfs.h>
9851int
9852main ()
9853{
9854prgregset32_t avar
9855 ;
9856 return 0;
9857}
9858_ACEOF
9859if ac_fn_c_try_compile "$LINENO"; then :
9860 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
01027315 9861else
05ea2a05
TT
9862 bfd_cv_have_sys_procfs_type_prgregset32_t=no
9863
9864fi
9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01027315 9866fi
01027315 9867
05ea2a05 9868 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
01027315 9869
05ea2a05
TT
9870$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
9871
9872 fi
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
9874$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
9875
c8693053
RO
9876
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
05ea2a05
TT
9878$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
9879 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
01027315
TT
9880 $as_echo_n "(cached) " >&6
9881else
9882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9883/* end confdefs.h. */
05ea2a05
TT
9884
9885#define _SYSCALL32
05ea2a05 9886#include <sys/procfs.h>
01027315
TT
9887int
9888main ()
9889{
05ea2a05 9890lwpid_t avar
01027315
TT
9891 ;
9892 return 0;
9893}
9894_ACEOF
05ea2a05
TT
9895if ac_fn_c_try_compile "$LINENO"; then :
9896 bfd_cv_have_sys_procfs_type_lwpid_t=yes
01027315 9897else
05ea2a05
TT
9898 bfd_cv_have_sys_procfs_type_lwpid_t=no
9899
01027315
TT
9900fi
9901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9902fi
01027315 9903
05ea2a05 9904 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
01027315 9905
05ea2a05 9906$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
01027315 9907
05ea2a05
TT
9908 fi
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
9910$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
01027315 9911
c8693053
RO
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
05ea2a05
TT
9914$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
9915 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
9916 $as_echo_n "(cached) " >&6
9917else
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919/* end confdefs.h. */
01027315 9920
05ea2a05 9921#define _SYSCALL32
05ea2a05
TT
9922#include <sys/procfs.h>
9923int
9924main ()
9925{
9926psaddr_t avar
9927 ;
9928 return 0;
9929}
9930_ACEOF
9931if ac_fn_c_try_compile "$LINENO"; then :
9932 bfd_cv_have_sys_procfs_type_psaddr_t=yes
9933else
9934 bfd_cv_have_sys_procfs_type_psaddr_t=no
01027315 9935
05ea2a05
TT
9936fi
9937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9938fi
01027315 9939
05ea2a05 9940 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
01027315 9941
05ea2a05
TT
9942$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
9943
9944 fi
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
9946$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
9947
c8693053
RO
9948
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
9950$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
9951 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
01027315
TT
9952 $as_echo_n "(cached) " >&6
9953else
9954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9955/* end confdefs.h. */
9956
05ea2a05 9957#define _SYSCALL32
05ea2a05 9958#include <sys/procfs.h>
01027315
TT
9959int
9960main ()
9961{
05ea2a05 9962elf_fpregset_t avar
01027315
TT
9963 ;
9964 return 0;
9965}
9966_ACEOF
9967if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 9968 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
01027315 9969else
05ea2a05
TT
9970 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
9971
01027315
TT
9972fi
9973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9974fi
01027315 9975
05ea2a05
TT
9976 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
9977
9978$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
9979
9980 fi
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
9982$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
01027315 9983
3684d331 9984 fi
01027315 9985
8b35ed1f
SM
9986 # Check for xxhash
9987
9988# Check whether --with-xxhash was given.
9989if test "${with_xxhash+set}" = set; then :
9990 withval=$with_xxhash;
9991else
9992 with_xxhash=auto
9993fi
9994
9995
9996 if test "x$with_xxhash" != "xno"; then
9997
9998
9999
10000
10001
10002
10003
10004
10005 use_additional=yes
10006
10007 acl_save_prefix="$prefix"
10008 prefix="$acl_final_prefix"
10009 acl_save_exec_prefix="$exec_prefix"
10010 exec_prefix="$acl_final_exec_prefix"
10011
10012 eval additional_includedir=\"$includedir\"
10013 eval additional_libdir=\"$libdir\"
10014
10015 exec_prefix="$acl_save_exec_prefix"
10016 prefix="$acl_save_prefix"
10017
10018
10019# Check whether --with-libxxhash-prefix was given.
10020if test "${with_libxxhash_prefix+set}" = set; then :
10021 withval=$with_libxxhash_prefix;
10022 if test "X$withval" = "Xno"; then
10023 use_additional=no
10024 else
10025 if test "X$withval" = "X"; then
10026
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
10032 eval additional_includedir=\"$includedir\"
10033 eval additional_libdir=\"$libdir\"
10034
10035 exec_prefix="$acl_save_exec_prefix"
10036 prefix="$acl_save_prefix"
10037
10038 else
10039 additional_includedir="$withval/include"
10040 additional_libdir="$withval/lib"
10041 fi
10042 fi
10043
10044fi
10045
10046
10047# Check whether --with-libxxhash-type was given.
10048if test "${with_libxxhash_type+set}" = set; then :
10049 withval=$with_libxxhash_type; with_libxxhash_type=$withval
10050else
10051 with_libxxhash_type=auto
10052fi
10053
10054 lib_type=`eval echo \$with_libxxhash_type`
10055
10056 LIBXXHASH=
10057 LTLIBXXHASH=
10058 INCXXHASH=
10059 rpathdirs=
10060 ltrpathdirs=
10061 names_already_handled=
10062 names_next_round='xxhash '
10063 while test -n "$names_next_round"; do
10064 names_this_round="$names_next_round"
10065 names_next_round=
10066 for name in $names_this_round; do
10067 already_handled=
10068 for n in $names_already_handled; do
10069 if test "$n" = "$name"; then
10070 already_handled=yes
10071 break
10072 fi
10073 done
10074 if test -z "$already_handled"; then
10075 names_already_handled="$names_already_handled $name"
10076 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10077 eval value=\"\$HAVE_LIB$uppername\"
10078 if test -n "$value"; then
10079 if test "$value" = yes; then
10080 eval value=\"\$LIB$uppername\"
10081 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
10082 eval value=\"\$LTLIB$uppername\"
10083 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
10084 else
10085 :
10086 fi
10087 else
10088 found_dir=
10089 found_la=
10090 found_so=
10091 found_a=
10092 if test $use_additional = yes; then
10093 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10094 found_dir="$additional_libdir"
10095 found_so="$additional_libdir/lib$name.$shlibext"
10096 if test -f "$additional_libdir/lib$name.la"; then
10097 found_la="$additional_libdir/lib$name.la"
10098 fi
10099 elif test x$lib_type != xshared; then
10100 if test -f "$additional_libdir/lib$name.$libext"; then
10101 found_dir="$additional_libdir"
10102 found_a="$additional_libdir/lib$name.$libext"
10103 if test -f "$additional_libdir/lib$name.la"; then
10104 found_la="$additional_libdir/lib$name.la"
10105 fi
10106 fi
10107 fi
10108 fi
10109 if test "X$found_dir" = "X"; then
10110 for x in $LDFLAGS $LTLIBXXHASH; do
10111
10112 acl_save_prefix="$prefix"
10113 prefix="$acl_final_prefix"
10114 acl_save_exec_prefix="$exec_prefix"
10115 exec_prefix="$acl_final_exec_prefix"
10116 eval x=\"$x\"
10117 exec_prefix="$acl_save_exec_prefix"
10118 prefix="$acl_save_prefix"
10119
10120 case "$x" in
10121 -L*)
10122 dir=`echo "X$x" | sed -e 's/^X-L//'`
10123 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10124 found_dir="$dir"
10125 found_so="$dir/lib$name.$shlibext"
10126 if test -f "$dir/lib$name.la"; then
10127 found_la="$dir/lib$name.la"
10128 fi
10129 elif test x$lib_type != xshared; then
10130 if test -f "$dir/lib$name.$libext"; then
10131 found_dir="$dir"
10132 found_a="$dir/lib$name.$libext"
10133 if test -f "$dir/lib$name.la"; then
10134 found_la="$dir/lib$name.la"
10135 fi
10136 fi
10137 fi
10138 ;;
10139 esac
10140 if test "X$found_dir" != "X"; then
10141 break
10142 fi
10143 done
10144 fi
10145 if test "X$found_dir" != "X"; then
10146 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
10147 if test "X$found_so" != "X"; then
10148 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10149 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10150 else
10151 haveit=
10152 for x in $ltrpathdirs; do
10153 if test "X$x" = "X$found_dir"; then
10154 haveit=yes
10155 break
10156 fi
10157 done
10158 if test -z "$haveit"; then
10159 ltrpathdirs="$ltrpathdirs $found_dir"
10160 fi
10161 if test "$hardcode_direct" = yes; then
10162 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10163 else
10164 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10165 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10166 haveit=
10167 for x in $rpathdirs; do
10168 if test "X$x" = "X$found_dir"; then
10169 haveit=yes
10170 break
10171 fi
10172 done
10173 if test -z "$haveit"; then
10174 rpathdirs="$rpathdirs $found_dir"
10175 fi
10176 else
10177 haveit=
10178 for x in $LDFLAGS $LIBXXHASH; do
10179
10180 acl_save_prefix="$prefix"
10181 prefix="$acl_final_prefix"
10182 acl_save_exec_prefix="$exec_prefix"
10183 exec_prefix="$acl_final_exec_prefix"
10184 eval x=\"$x\"
10185 exec_prefix="$acl_save_exec_prefix"
10186 prefix="$acl_save_prefix"
10187
10188 if test "X$x" = "X-L$found_dir"; then
10189 haveit=yes
10190 break
10191 fi
10192 done
10193 if test -z "$haveit"; then
10194 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
10195 fi
10196 if test "$hardcode_minus_L" != no; then
10197 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10198 else
10199 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10200 fi
10201 fi
10202 fi
10203 fi
10204 else
10205 if test "X$found_a" != "X"; then
10206 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
10207 else
10208 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
10209 fi
10210 fi
10211 additional_includedir=
10212 case "$found_dir" in
10213 */lib | */lib/)
10214 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10215 additional_includedir="$basedir/include"
10216 ;;
10217 esac
10218 if test "X$additional_includedir" != "X"; then
10219 if test "X$additional_includedir" != "X/usr/include"; then
10220 haveit=
10221 if test "X$additional_includedir" = "X/usr/local/include"; then
10222 if test -n "$GCC"; then
10223 case $host_os in
10224 linux*) haveit=yes;;
10225 esac
10226 fi
10227 fi
10228 if test -z "$haveit"; then
10229 for x in $CPPFLAGS $INCXXHASH; do
10230
10231 acl_save_prefix="$prefix"
10232 prefix="$acl_final_prefix"
10233 acl_save_exec_prefix="$exec_prefix"
10234 exec_prefix="$acl_final_exec_prefix"
10235 eval x=\"$x\"
10236 exec_prefix="$acl_save_exec_prefix"
10237 prefix="$acl_save_prefix"
10238
10239 if test "X$x" = "X-I$additional_includedir"; then
10240 haveit=yes
10241 break
10242 fi
10243 done
10244 if test -z "$haveit"; then
10245 if test -d "$additional_includedir"; then
10246 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
10247 fi
10248 fi
10249 fi
10250 fi
10251 fi
10252 if test -n "$found_la"; then
10253 save_libdir="$libdir"
10254 case "$found_la" in
10255 */* | *\\*) . "$found_la" ;;
10256 *) . "./$found_la" ;;
10257 esac
10258 libdir="$save_libdir"
10259 for dep in $dependency_libs; do
10260 case "$dep" in
10261 -L*)
10262 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10263 if test "X$additional_libdir" != "X/usr/lib"; then
10264 haveit=
10265 if test "X$additional_libdir" = "X/usr/local/lib"; then
10266 if test -n "$GCC"; then
10267 case $host_os in
10268 linux*) haveit=yes;;
10269 esac
10270 fi
10271 fi
10272 if test -z "$haveit"; then
10273 haveit=
10274 for x in $LDFLAGS $LIBXXHASH; do
10275
10276 acl_save_prefix="$prefix"
10277 prefix="$acl_final_prefix"
10278 acl_save_exec_prefix="$exec_prefix"
10279 exec_prefix="$acl_final_exec_prefix"
10280 eval x=\"$x\"
10281 exec_prefix="$acl_save_exec_prefix"
10282 prefix="$acl_save_prefix"
10283
10284 if test "X$x" = "X-L$additional_libdir"; then
10285 haveit=yes
10286 break
10287 fi
10288 done
10289 if test -z "$haveit"; then
10290 if test -d "$additional_libdir"; then
10291 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
10292 fi
10293 fi
10294 haveit=
10295 for x in $LDFLAGS $LTLIBXXHASH; do
10296
10297 acl_save_prefix="$prefix"
10298 prefix="$acl_final_prefix"
10299 acl_save_exec_prefix="$exec_prefix"
10300 exec_prefix="$acl_final_exec_prefix"
10301 eval x=\"$x\"
10302 exec_prefix="$acl_save_exec_prefix"
10303 prefix="$acl_save_prefix"
10304
10305 if test "X$x" = "X-L$additional_libdir"; then
10306 haveit=yes
10307 break
10308 fi
10309 done
10310 if test -z "$haveit"; then
10311 if test -d "$additional_libdir"; then
10312 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
10313 fi
10314 fi
10315 fi
10316 fi
10317 ;;
10318 -R*)
10319 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10320 if test "$enable_rpath" != no; then
10321 haveit=
10322 for x in $rpathdirs; do
10323 if test "X$x" = "X$dir"; then
10324 haveit=yes
10325 break
10326 fi
10327 done
10328 if test -z "$haveit"; then
10329 rpathdirs="$rpathdirs $dir"
10330 fi
10331 haveit=
10332 for x in $ltrpathdirs; do
10333 if test "X$x" = "X$dir"; then
10334 haveit=yes
10335 break
10336 fi
10337 done
10338 if test -z "$haveit"; then
10339 ltrpathdirs="$ltrpathdirs $dir"
10340 fi
10341 fi
10342 ;;
10343 -l*)
10344 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10345 ;;
10346 *.la)
10347 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10348 ;;
10349 *)
10350 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
10351 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
10352 ;;
10353 esac
10354 done
10355 fi
10356 else
10357 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10358 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10359 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
10360 else
10361 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
10362 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
10363 fi
10364 fi
10365 fi
10366 fi
10367 done
10368 done
10369 if test "X$rpathdirs" != "X"; then
10370 if test -n "$hardcode_libdir_separator"; then
10371 alldirs=
10372 for found_dir in $rpathdirs; do
10373 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10374 done
10375 acl_save_libdir="$libdir"
10376 libdir="$alldirs"
10377 eval flag=\"$hardcode_libdir_flag_spec\"
10378 libdir="$acl_save_libdir"
10379 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
10380 else
10381 for found_dir in $rpathdirs; do
10382 acl_save_libdir="$libdir"
10383 libdir="$found_dir"
10384 eval flag=\"$hardcode_libdir_flag_spec\"
10385 libdir="$acl_save_libdir"
10386 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
10387 done
10388 fi
10389 fi
10390 if test "X$ltrpathdirs" != "X"; then
10391 for found_dir in $ltrpathdirs; do
10392 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
10393 done
10394 fi
10395
10396
10397 ac_save_CPPFLAGS="$CPPFLAGS"
10398
10399 for element in $INCXXHASH; do
10400 haveit=
10401 for x in $CPPFLAGS; do
10402
10403 acl_save_prefix="$prefix"
10404 prefix="$acl_final_prefix"
10405 acl_save_exec_prefix="$exec_prefix"
10406 exec_prefix="$acl_final_exec_prefix"
10407 eval x=\"$x\"
10408 exec_prefix="$acl_save_exec_prefix"
10409 prefix="$acl_save_prefix"
10410
10411 if test "X$x" = "X$element"; then
10412 haveit=yes
10413 break
10414 fi
10415 done
10416 if test -z "$haveit"; then
10417 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10418 fi
10419 done
10420
10421
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
10423$as_echo_n "checking for libxxhash... " >&6; }
10424if ${ac_cv_libxxhash+:} false; then :
10425 $as_echo_n "(cached) " >&6
10426else
10427
10428 ac_save_LIBS="$LIBS"
10429 LIBS="$LIBS $LIBXXHASH"
10430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10431/* end confdefs.h. */
10432#include <xxhash.h>
10433int
10434main ()
10435{
10436XXH32("foo", 3, 0);
10437
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442if ac_fn_c_try_link "$LINENO"; then :
10443 ac_cv_libxxhash=yes
10444else
10445 ac_cv_libxxhash=no
10446fi
10447rm -f core conftest.err conftest.$ac_objext \
10448 conftest$ac_exeext conftest.$ac_ext
10449 LIBS="$ac_save_LIBS"
10450
10451fi
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
10453$as_echo "$ac_cv_libxxhash" >&6; }
10454 if test "$ac_cv_libxxhash" = yes; then
10455 HAVE_LIBXXHASH=yes
10456
10457$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
10458
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
10460$as_echo_n "checking how to link with libxxhash... " >&6; }
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
10462$as_echo "$LIBXXHASH" >&6; }
10463 else
10464 HAVE_LIBXXHASH=no
10465 CPPFLAGS="$ac_save_CPPFLAGS"
10466 LIBXXHASH=
10467 LTLIBXXHASH=
10468 fi
10469
10470
10471
10472
10473
10474
10475 if test "$HAVE_LIBXXHASH" != yes; then
10476 if test "$with_xxhash" = yes; then
10477 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
10478 fi
10479 fi
10480 if test "x$with_xxhash" = "xauto"; then
10481 with_xxhash="$HAVE_LIBXXHASH"
10482 fi
10483 fi
10484
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
10486$as_echo_n "checking whether to use xxhash... " >&6; }
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
10488$as_echo "$with_xxhash" >&6; }
10489
01027315
TT
10490
10491# Check whether we will enable the inclusion of unit tests when
10492# compiling GDB.
10493#
10494# The default value of this option changes depending whether we're on
10495# development mode (in which case it's "true") or not (in which case
db6878ac
SM
10496# it's "false"). The $development variable is set by the GDB_AC_COMMON
10497# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
10498
10499if test "x$development" != xtrue && test "x$development" != xfalse; then :
10500 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
10501fi
10502
01027315
TT
10503# Check whether --enable-unit-tests was given.
10504if test "${enable_unit_tests+set}" = set; then :
10505 enableval=$enable_unit_tests; case "${enableval}" in
10506 yes) enable_unittests=true ;;
10507 no) enable_unittests=false ;;
10508 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
10509esac
10510else
10511 enable_unittests=$development
10512fi
10513
10514
10515if $enable_unittests; then
10516
10517$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
10518
10519
10520fi
10521
10522 if $enable_unittests; then
10523 SELFTEST_TRUE=
10524 SELFTEST_FALSE='#'
10525else
10526 SELFTEST_TRUE='#'
10527 SELFTEST_FALSE=
10528fi
10529
10530
ea3e7446
JB
10531 if test x$ac_cv_func_pipe = xyes -o x$ac_cv_func_pipe2 = xyes ; then
10532 HAVE_PIPE_OR_PIPE2_TRUE=
10533 HAVE_PIPE_OR_PIPE2_FALSE='#'
10534else
10535 HAVE_PIPE_OR_PIPE2_TRUE='#'
10536 HAVE_PIPE_OR_PIPE2_FALSE=
10537fi
10538
10539
05ea2a05
TT
10540# Check the return and argument types of ptrace.
10541
10542
10543for ac_header in sys/ptrace.h ptrace.h
10544do :
10545 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10546ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10547if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10548 cat >>confdefs.h <<_ACEOF
10549#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10550_ACEOF
10551
10552fi
10553
10554done
10555
10556
10557gdb_ptrace_headers='
10558#include <sys/types.h>
10559#if HAVE_SYS_PTRACE_H
10560# include <sys/ptrace.h>
10561#endif
10562#if HAVE_UNISTD_H
10563# include <unistd.h>
10564#endif
10565'
05ea2a05
TT
10566
10567# Check return type. Varargs (used on GNU/Linux) conflict with the
10568# empty argument list, so check for that explicitly.
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10570$as_echo_n "checking return type of ptrace... " >&6; }
10571if ${gdb_cv_func_ptrace_ret+:} false; then :
10572 $as_echo_n "(cached) " >&6
10573else
10574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575/* end confdefs.h. */
5164c117 10576 $gdb_ptrace_headers
05ea2a05
TT
10577int
10578main ()
10579{
10580extern long ptrace (enum __ptrace_request, ...);
5164c117 10581
05ea2a05
TT
10582 ;
10583 return 0;
10584}
10585_ACEOF
10586if ac_fn_c_try_compile "$LINENO"; then :
10587 gdb_cv_func_ptrace_ret='long'
10588else
10589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10590/* end confdefs.h. */
10591$gdb_ptrace_headers
10592int
10593main ()
10594{
10595extern int ptrace ();
5164c117 10596
05ea2a05
TT
10597 ;
10598 return 0;
10599}
10600_ACEOF
10601if ac_fn_c_try_compile "$LINENO"; then :
10602 gdb_cv_func_ptrace_ret='int'
10603else
10604 gdb_cv_func_ptrace_ret='long'
b6fb30ed 10605
05ea2a05
TT
10606fi
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 10608
05ea2a05
TT
10609fi
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 10611
05ea2a05
TT
10612fi
10613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10614$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
10615
b6fb30ed 10616
05ea2a05
TT
10617cat >>confdefs.h <<_ACEOF
10618#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
10619_ACEOF
10620
b6fb30ed 10621
05ea2a05
TT
10622# Check argument types.
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10624$as_echo_n "checking types of arguments for ptrace... " >&6; }
10625if ${gdb_cv_func_ptrace_args+:} false; then :
10626 $as_echo_n "(cached) " >&6
10627else
05ea2a05
TT
10628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10629/* end confdefs.h. */
10630$gdb_ptrace_headers
10631int
10632main ()
10633{
10634extern long ptrace (enum __ptrace_request, ...);
5164c117 10635
05ea2a05
TT
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640if ac_fn_c_try_compile "$LINENO"; then :
10641 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
10642else
b6fb30ed
SM
10643 for gdb_arg1 in 'int' 'long'; do
10644 for gdb_arg2 in 'pid_t' 'int' 'long'; do
10645 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
10646 for gdb_arg4 in 'int' 'long' 'void *'; do
10647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
10648/* end confdefs.h. */
10649$gdb_ptrace_headers
10650int
10651main ()
10652{
b6fb30ed 10653extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5164c117 10654
05ea2a05
TT
10655 ;
10656 return 0;
10657}
10658_ACEOF
10659if ac_fn_c_try_compile "$LINENO"; then :
10660 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
b6fb30ed
SM
10661 break 4;
10662
05ea2a05
TT
10663fi
10664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
10665
10666 for gdb_arg5 in 'int *' 'int' 'long'; do
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
10668/* end confdefs.h. */
10669$gdb_ptrace_headers
10670int
10671main ()
10672{
b6fb30ed 10673extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5164c117 10674
05ea2a05
TT
10675 ;
10676 return 0;
10677}
10678_ACEOF
10679if ac_fn_c_try_compile "$LINENO"; then :
b6fb30ed
SM
10680 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10681 break 5;
05ea2a05 10682
05ea2a05
TT
10683fi
10684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
10685 done
10686 done
10687 done
10688 done
10689 done
10690 # Provide a safe default value.
10691 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
05ea2a05
TT
10692
10693fi
10694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 10695
05ea2a05
TT
10696fi
10697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10698$as_echo "$gdb_cv_func_ptrace_args" >&6; }
b6fb30ed 10699
05ea2a05
TT
10700ac_save_IFS=$IFS; IFS=','
10701set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10702IFS=$ac_save_IFS
10703shift
10704
10705cat >>confdefs.h <<_ACEOF
10706#define PTRACE_TYPE_ARG1 $1
10707_ACEOF
10708
10709
10710cat >>confdefs.h <<_ACEOF
10711#define PTRACE_TYPE_ARG3 $3
10712_ACEOF
10713
10714
10715cat >>confdefs.h <<_ACEOF
10716#define PTRACE_TYPE_ARG4 $4
10717_ACEOF
10718
10719if test -n "$5"; then
10720
10721cat >>confdefs.h <<_ACEOF
10722#define PTRACE_TYPE_ARG5 $5
10723_ACEOF
10724
10725fi
10726
10727
629c2962
SM
10728# Detect support warning flags.
10729
4b74833d
AB
10730
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
10732$as_echo_n "checking the compiler type... " >&6; }
10733if ${gdb_cv_compiler_type+:} false; then :
10734 $as_echo_n "(cached) " >&6
10735else
10736 gdb_cv_compiler_type=unknown
10737 if test "$gdb_cv_compiler_type" = unknown; then
10738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10739/* end confdefs.h. */
10740
10741int
10742main ()
10743{
10744
10745 #if !defined __GNUC__ || defined __clang__
10746 #error not gcc
10747 #endif
10748
10749 ;
10750 return 0;
10751}
10752_ACEOF
10753if ac_fn_c_try_compile "$LINENO"; then :
10754 gdb_cv_compiler_type=gcc
10755fi
10756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757 fi
10758
10759 if test "$gdb_cv_compiler_type" = unknown; then
10760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761/* end confdefs.h. */
10762
10763int
10764main ()
10765{
10766
10767 #ifndef __clang__
10768 #error not clang
10769 #endif
10770
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775if ac_fn_c_try_compile "$LINENO"; then :
10776 gdb_cv_compiler_type=clang
10777fi
10778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10779 fi
10780
10781fi
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
10783$as_echo "$gdb_cv_compiler_type" >&6; }
10784
10785 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
10786
10787
629c2962
SM
10788# Check whether --enable-werror was given.
10789if test "${enable_werror+set}" = set; then :
10790 enableval=$enable_werror; case "${enableval}" in
10791 yes | y) ERROR_ON_WARNING="yes" ;;
10792 no | n) ERROR_ON_WARNING="no" ;;
10793 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
10794 esac
10795fi
10796
10797
10798# Enable -Werror by default when using gcc. Turn it off for releases.
10799if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
10800 ERROR_ON_WARNING=yes
10801fi
10802
10803WERROR_CFLAGS=""
10804if test "${ERROR_ON_WARNING}" = yes ; then
10805 WERROR_CFLAGS="-Werror"
10806fi
10807
10808# The options we'll try to enable.
10809build_warnings="-Wall -Wpointer-arith \
10810-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
10811-Wno-switch -Wno-char-subscripts \
10812-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
10813-Wno-sign-compare -Wno-error=maybe-uninitialized \
10814-Wno-mismatched-tags \
10815-Wno-error=deprecated-register \
10816-Wsuggest-override \
10817-Wimplicit-fallthrough=3 \
10818-Wduplicated-cond \
10819-Wshadow=local \
10820-Wdeprecated-copy \
10821-Wdeprecated-copy-dtor \
10822-Wredundant-move \
8ddd8e0e 10823-Wmissing-declarations \
898e7f60
SM
10824-Wstrict-null-sentinel \
10825"
629c2962 10826
4b74833d
AB
10827# The -Wmissing-prototypes flag will be accepted by GCC, but results
10828# in a warning being printed about the flag not being valid for C++,
10829# this is something to do with using ccache, and argument ordering.
10830if test "$GDB_COMPILER_TYPE" != gcc; then
10831 build_warnings="$build_warnings -Wmissing-prototypes"
10832fi
10833
629c2962
SM
10834case "${host}" in
10835 *-*-mingw32*)
10836 # Enable -Wno-format by default when using gcc on mingw since many
10837 # GCC versions complain about %I64.
10838 build_warnings="$build_warnings -Wno-format" ;;
10839 *-*-solaris*)
10840 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
10841 # doesn't understand.
10842 build_warnings="$build_warnings -Wno-unknown-pragmas"
10843 # Solaris 11 <unistd.h> marks vfork deprecated.
10844 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
10845 *)
10846 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
10847 # but there's a special case for this below.
10848 build_warnings="$build_warnings -Wformat-nonliteral" ;;
10849esac
10850
10851# Check whether --enable-build-warnings was given.
10852if test "${enable_build_warnings+set}" = set; then :
10853 enableval=$enable_build_warnings; case "${enableval}" in
10854 yes) ;;
10855 no) build_warnings="-w";;
10856 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
10857 build_warnings="${build_warnings} ${t}";;
10858 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
10859 build_warnings="${t} ${build_warnings}";;
10860 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
10861esac
10862if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
10863 echo "Setting compiler warning flags = $build_warnings" 6>&1
10864fi
10865fi
10866# Check whether --enable-gdb-build-warnings was given.
10867if test "${enable_gdb_build_warnings+set}" = set; then :
10868 enableval=$enable_gdb_build_warnings; case "${enableval}" in
10869 yes) ;;
10870 no) build_warnings="-w";;
10871 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
10872 build_warnings="${build_warnings} ${t}";;
10873 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
10874 build_warnings="${t} ${build_warnings}";;
10875 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
10876esac
10877if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
10878 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
10879fi
10880fi
10881
10882# The set of warnings supported by a C++ compiler is not the same as
10883# of the C compiler.
10884ac_ext=cpp
10885ac_cpp='$CXXCPP $CPPFLAGS'
10886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10889
10890
10891WARN_CFLAGS=""
10892if test "x${build_warnings}" != x -a "x$GCC" = xyes
10893then
10894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
10895$as_echo_n "checking compiler warning flags... " >&6; }
10896 # Separate out the -Werror flag as some files just cannot be
10897 # compiled with it enabled.
10898 for w in ${build_warnings}; do
10899 # GCC does not complain about -Wno-unknown-warning. Invert
10900 # and test -Wunknown-warning instead.
10901 case $w in
10902 -Wno-*)
10903 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
10904 -Wformat-nonliteral)
10905 # gcc requires -Wformat before -Wformat-nonliteral
10906 # will work, so stick them together.
10907 w="-Wformat $w"
10908 wtest="$w"
10909 ;;
10910 *)
10911 wtest=$w ;;
10912 esac
10913
10914 case $w in
10915 -Werr*) WERROR_CFLAGS=-Werror ;;
10916 *)
10917 # Check whether GCC accepts it.
10918 saved_CFLAGS="$CFLAGS"
10919 CFLAGS="$CFLAGS -Werror $wtest"
10920 saved_CXXFLAGS="$CXXFLAGS"
10921 CXXFLAGS="$CXXFLAGS -Werror $wtest"
10922 if test "x$w" = "x-Wunused-variable"; then
10923 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
10924 # fixed in GCC 4.9. This test is derived from the gdb
10925 # source code that triggered this bug in GCC.
10926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10927/* end confdefs.h. */
10928struct scoped_restore_base {};
864ca435
SM
10929 struct scoped_restore_tmpl : public scoped_restore_base {
10930 ~scoped_restore_tmpl() {}
10931 };
629c2962
SM
10932int
10933main ()
10934{
10935const scoped_restore_base &b = scoped_restore_tmpl();
864ca435 10936
629c2962
SM
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941if ac_fn_cxx_try_compile "$LINENO"; then :
10942 WARN_CFLAGS="${WARN_CFLAGS} $w"
10943fi
10944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10945 else
10946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947/* end confdefs.h. */
10948
10949int
10950main ()
10951{
10952
10953 ;
10954 return 0;
10955}
10956_ACEOF
10957if ac_fn_cxx_try_compile "$LINENO"; then :
10958 WARN_CFLAGS="${WARN_CFLAGS} $w"
10959fi
10960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10961 fi
10962 CFLAGS="$saved_CFLAGS"
10963 CXXFLAGS="$saved_CXXFLAGS"
10964 esac
10965 done
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
10967$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
10968fi
10969
10970
10971
10972ac_ext=c
10973ac_cpp='$CPP $CPPFLAGS'
10974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10976ac_compiler_gnu=$ac_cv_c_compiler_gnu
10977
10978
10979
171fba11
PA
10980# Set the 'development' global.
10981. $srcdir/../bfd/development.sh
10982
10983if test "$development" = true ; then
10984
10985$as_echo "#define DEVELOPMENT 1" >>confdefs.h
10986
10987fi
10988
01027315
TT
10989case ${host} in
10990 *mingw32*)
10991
10992$as_echo "#define USE_WIN32API 1" >>confdefs.h
10993
10994 ;;
10995esac
10996
39eedb20 10997CONFIG_STATUS_DEPENDENCIES='$(srcdir)/../bfd/development.sh'
171fba11
PA
10998
10999
01027315
TT
11000ac_config_files="$ac_config_files Makefile"
11001
11002cat >confcache <<\_ACEOF
11003# This file is a shell script that caches the results of configure
11004# tests run on this system so they can be shared between configure
11005# scripts and configure runs, see configure's option --config-cache.
11006# It is not useful on other systems. If it contains results you don't
11007# want to keep, you may remove or edit it.
11008#
11009# config.status only pays attention to the cache file if you give it
11010# the --recheck option to rerun configure.
11011#
11012# `ac_cv_env_foo' variables (set or unset) will be overridden when
11013# loading this file, other *unset* `ac_cv_foo' will be assigned the
11014# following values.
11015
11016_ACEOF
11017
11018# The following way of writing the cache mishandles newlines in values,
11019# but we know of no workaround that is simple, portable, and efficient.
11020# So, we kill variables containing newlines.
11021# Ultrix sh set writes to stderr and can't be redirected directly,
11022# and sets the high bit in the cache file unless we assign to the vars.
11023(
11024 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11025 eval ac_val=\$$ac_var
11026 case $ac_val in #(
11027 *${as_nl}*)
11028 case $ac_var in #(
11029 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
11030$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11031 esac
11032 case $ac_var in #(
11033 _ | IFS | as_nl) ;; #(
11034 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11035 *) { eval $ac_var=; unset $ac_var;} ;;
11036 esac ;;
11037 esac
11038 done
11039
11040 (set) 2>&1 |
11041 case $as_nl`(ac_space=' '; set) 2>&1` in #(
11042 *${as_nl}ac_space=\ *)
11043 # `set' does not quote correctly, so add quotes: double-quote
11044 # substitution turns \\\\ into \\, and sed turns \\ into \.
11045 sed -n \
11046 "s/'/'\\\\''/g;
11047 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11048 ;; #(
11049 *)
11050 # `set' quotes correctly as required by POSIX, so do not add quotes.
11051 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11052 ;;
11053 esac |
11054 sort
11055) |
11056 sed '
11057 /^ac_cv_env_/b end
11058 t clear
11059 :clear
11060 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11061 t end
11062 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11063 :end' >>confcache
11064if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11065 if test -w "$cache_file"; then
11066 if test "x$cache_file" != "x/dev/null"; then
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
11068$as_echo "$as_me: updating cache $cache_file" >&6;}
11069 if test ! -f "$cache_file" || test -h "$cache_file"; then
11070 cat confcache >"$cache_file"
11071 else
11072 case $cache_file in #(
11073 */* | ?:*)
11074 mv -f confcache "$cache_file"$$ &&
11075 mv -f "$cache_file"$$ "$cache_file" ;; #(
11076 *)
11077 mv -f confcache "$cache_file" ;;
11078 esac
11079 fi
11080 fi
11081 else
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
11083$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11084 fi
11085fi
11086rm -f confcache
11087
11088test "x$prefix" = xNONE && prefix=$ac_default_prefix
11089# Let make expand exec_prefix.
11090test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11091
11092DEFS=-DHAVE_CONFIG_H
11093
11094ac_libobjs=
11095ac_ltlibobjs=
e41fda1d 11096U=
01027315
TT
11097for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11098 # 1. Remove the extension, and $U if already installed.
11099 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11100 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
11101 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
11102 # will be set to the directory where LIBOBJS objects are built.
11103 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11104 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
11105done
11106LIBOBJS=$ac_libobjs
11107
11108LTLIBOBJS=$ac_ltlibobjs
11109
11110
11111if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
11112 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
11113Usually this means the macro was only invoked conditionally." "$LINENO" 5
11114fi
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
11116$as_echo_n "checking that generated files are newer than configure... " >&6; }
11117 if test -n "$am_sleep_pid"; then
11118 # Hide warnings about reused PIDs.
11119 wait $am_sleep_pid 2>/dev/null
11120 fi
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
11122$as_echo "done" >&6; }
11123 if test -n "$EXEEXT"; then
11124 am__EXEEXT_TRUE=
11125 am__EXEEXT_FALSE='#'
11126else
11127 am__EXEEXT_TRUE='#'
11128 am__EXEEXT_FALSE=
11129fi
11130
11131if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
11132 as_fn_error $? "conditional \"AMDEP\" was never defined.
11133Usually this means the macro was only invoked conditionally." "$LINENO" 5
11134fi
11135if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
11136 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
11137Usually this means the macro was only invoked conditionally." "$LINENO" 5
11138fi
11139if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
11140 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
11141Usually this means the macro was only invoked conditionally." "$LINENO" 5
11142fi
01027315
TT
11143if test -z "${SELFTEST_TRUE}" && test -z "${SELFTEST_FALSE}"; then
11144 as_fn_error $? "conditional \"SELFTEST\" was never defined.
11145Usually this means the macro was only invoked conditionally." "$LINENO" 5
ea3e7446
JB
11146fi
11147if test -z "${HAVE_PIPE_OR_PIPE2_TRUE}" && test -z "${HAVE_PIPE_OR_PIPE2_FALSE}"; then
11148 as_fn_error $? "conditional \"HAVE_PIPE_OR_PIPE2\" was never defined.
11149Usually this means the macro was only invoked conditionally." "$LINENO" 5
01027315
TT
11150fi
11151
11152: "${CONFIG_STATUS=./config.status}"
11153ac_write_fail=0
11154ac_clean_files_save=$ac_clean_files
11155ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11156{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
11157$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
11158as_write_fail=0
11159cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
11160#! $SHELL
11161# Generated by $as_me.
11162# Run this file to recreate the current configuration.
11163# Compiler output produced by configure, useful for debugging
11164# configure, is in config.log if it exists.
11165
11166debug=false
11167ac_cs_recheck=false
11168ac_cs_silent=false
11169
11170SHELL=\${CONFIG_SHELL-$SHELL}
11171export SHELL
11172_ASEOF
11173cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
11174## -------------------- ##
11175## M4sh Initialization. ##
11176## -------------------- ##
11177
11178# Be more Bourne compatible
11179DUALCASE=1; export DUALCASE # for MKS sh
11180if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
11181 emulate sh
11182 NULLCMD=:
11183 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
11184 # is contrary to our usage. Disable this feature.
11185 alias -g '${1+"$@"}'='"$@"'
11186 setopt NO_GLOB_SUBST
11187else
11188 case `(set -o) 2>/dev/null` in #(
11189 *posix*) :
11190 set -o posix ;; #(
11191 *) :
11192 ;;
11193esac
11194fi
11195
11196
11197as_nl='
11198'
11199export as_nl
11200# Printing a long string crashes Solaris 7 /usr/bin/printf.
11201as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11202as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
11203as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
11204# Prefer a ksh shell builtin over an external printf program on Solaris,
11205# but without wasting forks for bash or zsh.
11206if test -z "$BASH_VERSION$ZSH_VERSION" \
11207 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
11208 as_echo='print -r --'
11209 as_echo_n='print -rn --'
11210elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
11211 as_echo='printf %s\n'
11212 as_echo_n='printf %s'
11213else
11214 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
11215 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
11216 as_echo_n='/usr/ucb/echo -n'
11217 else
11218 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
11219 as_echo_n_body='eval
11220 arg=$1;
11221 case $arg in #(
11222 *"$as_nl"*)
11223 expr "X$arg" : "X\\(.*\\)$as_nl";
11224 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
11225 esac;
11226 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
11227 '
11228 export as_echo_n_body
11229 as_echo_n='sh -c $as_echo_n_body as_echo'
11230 fi
11231 export as_echo_body
11232 as_echo='sh -c $as_echo_body as_echo'
11233fi
11234
11235# The user is always right.
11236if test "${PATH_SEPARATOR+set}" != set; then
11237 PATH_SEPARATOR=:
11238 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11239 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11240 PATH_SEPARATOR=';'
11241 }
11242fi
11243
11244
11245# IFS
11246# We need space, tab and new line, in precisely that order. Quoting is
11247# there to prevent editors from complaining about space-tab.
11248# (If _AS_PATH_WALK were called with IFS unset, it would disable word
11249# splitting by setting IFS to empty value.)
11250IFS=" "" $as_nl"
11251
11252# Find who we are. Look in the path if we contain no directory separator.
11253as_myself=
11254case $0 in #((
11255 *[\\/]* ) as_myself=$0 ;;
11256 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11257for as_dir in $PATH
11258do
11259 IFS=$as_save_IFS
11260 test -z "$as_dir" && as_dir=.
11261 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11262 done
11263IFS=$as_save_IFS
11264
11265 ;;
11266esac
11267# We did not find ourselves, most probably we were run as `sh COMMAND'
11268# in which case we are not to be found in the path.
11269if test "x$as_myself" = x; then
11270 as_myself=$0
11271fi
11272if test ! -f "$as_myself"; then
11273 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11274 exit 1
11275fi
11276
11277# Unset variables that we do not need and which cause bugs (e.g. in
11278# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
11279# suppresses any "Segmentation fault" message there. '((' could
11280# trigger a bug in pdksh 5.2.14.
11281for as_var in BASH_ENV ENV MAIL MAILPATH
11282do eval test x\${$as_var+set} = xset \
11283 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
11284done
11285PS1='$ '
11286PS2='> '
11287PS4='+ '
11288
11289# NLS nuisances.
11290LC_ALL=C
11291export LC_ALL
11292LANGUAGE=C
11293export LANGUAGE
11294
11295# CDPATH.
11296(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11297
11298
11299# as_fn_error STATUS ERROR [LINENO LOG_FD]
11300# ----------------------------------------
11301# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11302# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
11303# script with STATUS, using 1 if that was 0.
11304as_fn_error ()
11305{
11306 as_status=$1; test $as_status -eq 0 && as_status=1
11307 if test "$4"; then
11308 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11309 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
11310 fi
11311 $as_echo "$as_me: error: $2" >&2
11312 as_fn_exit $as_status
11313} # as_fn_error
11314
11315
11316# as_fn_set_status STATUS
11317# -----------------------
11318# Set $? to STATUS, without forking.
11319as_fn_set_status ()
11320{
11321 return $1
11322} # as_fn_set_status
11323
11324# as_fn_exit STATUS
11325# -----------------
11326# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11327as_fn_exit ()
11328{
11329 set +e
11330 as_fn_set_status $1
11331 exit $1
11332} # as_fn_exit
11333
11334# as_fn_unset VAR
11335# ---------------
11336# Portably unset VAR.
11337as_fn_unset ()
11338{
11339 { eval $1=; unset $1;}
11340}
11341as_unset=as_fn_unset
11342# as_fn_append VAR VALUE
11343# ----------------------
11344# Append the text in VALUE to the end of the definition contained in VAR. Take
11345# advantage of any shell optimizations that allow amortized linear growth over
11346# repeated appends, instead of the typical quadratic growth present in naive
11347# implementations.
11348if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11349 eval 'as_fn_append ()
11350 {
11351 eval $1+=\$2
11352 }'
11353else
11354 as_fn_append ()
11355 {
11356 eval $1=\$$1\$2
11357 }
11358fi # as_fn_append
11359
11360# as_fn_arith ARG...
11361# ------------------
11362# Perform arithmetic evaluation on the ARGs, and store the result in the
11363# global $as_val. Take advantage of shells that can avoid forks. The arguments
11364# must be portable across $(()) and expr.
11365if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11366 eval 'as_fn_arith ()
11367 {
11368 as_val=$(( $* ))
11369 }'
11370else
11371 as_fn_arith ()
11372 {
11373 as_val=`expr "$@" || test $? -eq 1`
11374 }
11375fi # as_fn_arith
11376
11377
11378if expr a : '\(a\)' >/dev/null 2>&1 &&
11379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
11380 as_expr=expr
11381else
11382 as_expr=false
11383fi
11384
11385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11386 as_basename=basename
11387else
11388 as_basename=false
11389fi
11390
11391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11392 as_dirname=dirname
11393else
11394 as_dirname=false
11395fi
11396
11397as_me=`$as_basename -- "$0" ||
11398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11399 X"$0" : 'X\(//\)$' \| \
11400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11401$as_echo X/"$0" |
11402 sed '/^.*\/\([^/][^/]*\)\/*$/{
11403 s//\1/
11404 q
11405 }
11406 /^X\/\(\/\/\)$/{
11407 s//\1/
11408 q
11409 }
11410 /^X\/\(\/\).*/{
11411 s//\1/
11412 q
11413 }
11414 s/.*/./; q'`
11415
11416# Avoid depending upon Character Ranges.
11417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11420as_cr_digits='0123456789'
11421as_cr_alnum=$as_cr_Letters$as_cr_digits
11422
11423ECHO_C= ECHO_N= ECHO_T=
11424case `echo -n x` in #(((((
11425-n*)
11426 case `echo 'xy\c'` in
11427 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11428 xy) ECHO_C='\c';;
11429 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11430 ECHO_T=' ';;
11431 esac;;
11432*)
11433 ECHO_N='-n';;
11434esac
11435
11436rm -f conf$$ conf$$.exe conf$$.file
11437if test -d conf$$.dir; then
11438 rm -f conf$$.dir/conf$$.file
11439else
11440 rm -f conf$$.dir
11441 mkdir conf$$.dir 2>/dev/null
11442fi
11443if (echo >conf$$.file) 2>/dev/null; then
11444 if ln -s conf$$.file conf$$ 2>/dev/null; then
11445 as_ln_s='ln -s'
11446 # ... but there are two gotchas:
11447 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11448 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11449 # In both cases, we have to default to `cp -pR'.
11450 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11451 as_ln_s='cp -pR'
11452 elif ln conf$$.file conf$$ 2>/dev/null; then
11453 as_ln_s=ln
11454 else
11455 as_ln_s='cp -pR'
11456 fi
11457else
11458 as_ln_s='cp -pR'
11459fi
11460rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11461rmdir conf$$.dir 2>/dev/null
11462
11463
11464# as_fn_mkdir_p
11465# -------------
11466# Create "$as_dir" as a directory, including parents if necessary.
11467as_fn_mkdir_p ()
11468{
11469
11470 case $as_dir in #(
11471 -*) as_dir=./$as_dir;;
11472 esac
11473 test -d "$as_dir" || eval $as_mkdir_p || {
11474 as_dirs=
11475 while :; do
11476 case $as_dir in #(
11477 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11478 *) as_qdir=$as_dir;;
11479 esac
11480 as_dirs="'$as_qdir' $as_dirs"
11481 as_dir=`$as_dirname -- "$as_dir" ||
11482$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11483 X"$as_dir" : 'X\(//\)[^/]' \| \
11484 X"$as_dir" : 'X\(//\)$' \| \
11485 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11486$as_echo X"$as_dir" |
11487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11488 s//\1/
11489 q
11490 }
11491 /^X\(\/\/\)[^/].*/{
11492 s//\1/
11493 q
11494 }
11495 /^X\(\/\/\)$/{
11496 s//\1/
11497 q
11498 }
11499 /^X\(\/\).*/{
11500 s//\1/
11501 q
11502 }
11503 s/.*/./; q'`
11504 test -d "$as_dir" && break
11505 done
11506 test -z "$as_dirs" || eval "mkdir $as_dirs"
11507 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
11508
11509
11510} # as_fn_mkdir_p
11511if mkdir -p . 2>/dev/null; then
11512 as_mkdir_p='mkdir -p "$as_dir"'
11513else
11514 test -d ./-p && rmdir ./-p
11515 as_mkdir_p=false
11516fi
11517
11518
11519# as_fn_executable_p FILE
11520# -----------------------
11521# Test if FILE is an executable regular file.
11522as_fn_executable_p ()
11523{
11524 test -f "$1" && test -x "$1"
11525} # as_fn_executable_p
11526as_test_x='test -x'
11527as_executable_p=as_fn_executable_p
11528
11529# Sed expression to map a string onto a valid CPP name.
11530as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11531
11532# Sed expression to map a string onto a valid variable name.
11533as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11534
11535
11536exec 6>&1
11537## ----------------------------------- ##
11538## Main body of $CONFIG_STATUS script. ##
11539## ----------------------------------- ##
11540_ASEOF
11541test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11542
11543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11544# Save the log message, to keep $0 and so on meaningful, and to
11545# report actual input values of CONFIG_FILES etc. instead of their
11546# values after options handling.
11547ac_log="
11548This file was extended by gdbsupport $as_me 1.0, which was
11549generated by GNU Autoconf 2.69. Invocation command line was
11550
11551 CONFIG_FILES = $CONFIG_FILES
11552 CONFIG_HEADERS = $CONFIG_HEADERS
11553 CONFIG_LINKS = $CONFIG_LINKS
11554 CONFIG_COMMANDS = $CONFIG_COMMANDS
11555 $ $0 $@
11556
11557on `(hostname || uname -n) 2>/dev/null | sed 1q`
11558"
11559
11560_ACEOF
11561
11562case $ac_config_files in *"
11563"*) set x $ac_config_files; shift; ac_config_files=$*;;
11564esac
11565
11566case $ac_config_headers in *"
11567"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11568esac
11569
11570
11571cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11572# Files that config.status was made for.
11573config_files="$ac_config_files"
11574config_headers="$ac_config_headers"
11575config_commands="$ac_config_commands"
11576
11577_ACEOF
11578
11579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11580ac_cs_usage="\
11581\`$as_me' instantiates files and other configuration actions
11582from templates according to the current configuration. Unless the files
11583and actions are specified as TAGs, all are instantiated by default.
11584
11585Usage: $0 [OPTION]... [TAG]...
11586
11587 -h, --help print this help, then exit
11588 -V, --version print version number and configuration settings, then exit
11589 --config print configuration, then exit
11590 -q, --quiet, --silent
11591 do not print progress messages
11592 -d, --debug don't remove temporary files
11593 --recheck update $as_me by reconfiguring in the same conditions
11594 --file=FILE[:TEMPLATE]
11595 instantiate the configuration file FILE
11596 --header=FILE[:TEMPLATE]
11597 instantiate the configuration header FILE
11598
11599Configuration files:
11600$config_files
11601
11602Configuration headers:
11603$config_headers
11604
11605Configuration commands:
11606$config_commands
11607
11608Report bugs to the package provider."
11609
11610_ACEOF
11611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11612ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
11613ac_cs_version="\\
11614gdbsupport config.status 1.0
11615configured by $0, generated by GNU Autoconf 2.69,
11616 with options \\"\$ac_cs_config\\"
11617
11618Copyright (C) 2012 Free Software Foundation, Inc.
11619This config.status script is free software; the Free Software Foundation
11620gives unlimited permission to copy, distribute and modify it."
11621
11622ac_pwd='$ac_pwd'
11623srcdir='$srcdir'
11624INSTALL='$INSTALL'
11625MKDIR_P='$MKDIR_P'
11626AWK='$AWK'
11627test -n "\$AWK" || AWK=awk
11628_ACEOF
11629
11630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11631# The default lists apply if the user does not specify any file.
11632ac_need_defaults=:
11633while test $# != 0
11634do
11635 case $1 in
11636 --*=?*)
11637 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11638 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11639 ac_shift=:
11640 ;;
11641 --*=)
11642 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11643 ac_optarg=
11644 ac_shift=:
11645 ;;
11646 *)
11647 ac_option=$1
11648 ac_optarg=$2
11649 ac_shift=shift
11650 ;;
11651 esac
11652
11653 case $ac_option in
11654 # Handling of the options.
11655 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11656 ac_cs_recheck=: ;;
11657 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11658 $as_echo "$ac_cs_version"; exit ;;
11659 --config | --confi | --conf | --con | --co | --c )
11660 $as_echo "$ac_cs_config"; exit ;;
11661 --debug | --debu | --deb | --de | --d | -d )
11662 debug=: ;;
11663 --file | --fil | --fi | --f )
11664 $ac_shift
11665 case $ac_optarg in
11666 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11667 '') as_fn_error $? "missing file argument" ;;
11668 esac
11669 as_fn_append CONFIG_FILES " '$ac_optarg'"
11670 ac_need_defaults=false;;
11671 --header | --heade | --head | --hea )
11672 $ac_shift
11673 case $ac_optarg in
11674 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11675 esac
11676 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11677 ac_need_defaults=false;;
11678 --he | --h)
11679 # Conflict between --help and --header
11680 as_fn_error $? "ambiguous option: \`$1'
11681Try \`$0 --help' for more information.";;
11682 --help | --hel | -h )
11683 $as_echo "$ac_cs_usage"; exit ;;
11684 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11685 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11686 ac_cs_silent=: ;;
11687
11688 # This is an error.
11689 -*) as_fn_error $? "unrecognized option: \`$1'
11690Try \`$0 --help' for more information." ;;
11691
11692 *) as_fn_append ac_config_targets " $1"
11693 ac_need_defaults=false ;;
11694
11695 esac
11696 shift
11697done
11698
11699ac_configure_extra_args=
11700
11701if $ac_cs_silent; then
11702 exec 6>/dev/null
11703 ac_configure_extra_args="$ac_configure_extra_args --silent"
11704fi
11705
11706_ACEOF
11707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11708if \$ac_cs_recheck; then
11709 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11710 shift
11711 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11712 CONFIG_SHELL='$SHELL'
11713 export CONFIG_SHELL
11714 exec "\$@"
11715fi
11716
11717_ACEOF
11718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11719exec 5>>config.log
11720{
11721 echo
11722 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11723## Running $as_me. ##
11724_ASBOX
11725 $as_echo "$ac_log"
11726} >&5
11727
11728_ACEOF
11729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11730#
11731# INIT-COMMANDS
11732#
11733AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
11734
11735_ACEOF
11736
11737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11738
11739# Handling of arguments.
11740for ac_config_target in $ac_config_targets
11741do
11742 case $ac_config_target in
3684d331 11743 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
01027315
TT
11744 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
11745 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11746
11747 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
11748 esac
11749done
11750
11751
11752# If the user did not use the arguments to specify the items to instantiate,
11753# then the envvar interface is used. Set only those that are not.
11754# We use the long form for the default assignment because of an extremely
11755# bizarre bug on SunOS 4.1.3.
11756if $ac_need_defaults; then
11757 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11758 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11759 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11760fi
11761
11762# Have a temporary directory for convenience. Make it in the build tree
11763# simply because there is no reason against having it here, and in addition,
11764# creating and moving files from /tmp can sometimes cause problems.
11765# Hook for its removal unless debugging.
11766# Note that there is a small window in which the directory will not be cleaned:
11767# after its creation but before its name has been assigned to `$tmp'.
11768$debug ||
11769{
11770 tmp= ac_tmp=
11771 trap 'exit_status=$?
11772 : "${ac_tmp:=$tmp}"
11773 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11774' 0
11775 trap 'as_fn_exit 1' 1 2 13 15
11776}
11777# Create a (secure) tmp directory for tmp files.
11778
11779{
11780 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11781 test -d "$tmp"
11782} ||
11783{
11784 tmp=./conf$$-$RANDOM
11785 (umask 077 && mkdir "$tmp")
11786} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11787ac_tmp=$tmp
11788
11789# Set up the scripts for CONFIG_FILES section.
11790# No need to generate them if there are no CONFIG_FILES.
11791# This happens for instance with `./config.status config.h'.
11792if test -n "$CONFIG_FILES"; then
11793
11794
11795ac_cr=`echo X | tr X '\015'`
11796# On cygwin, bash can eat \r inside `` if the user requested igncr.
11797# But we know of no other shell where ac_cr would be empty at this
11798# point, so we can use a bashism as a fallback.
11799if test "x$ac_cr" = x; then
11800 eval ac_cr=\$\'\\r\'
11801fi
11802ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11803if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11804 ac_cs_awk_cr='\\r'
11805else
11806 ac_cs_awk_cr=$ac_cr
11807fi
11808
11809echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11810_ACEOF
11811
11812
11813{
11814 echo "cat >conf$$subs.awk <<_ACEOF" &&
11815 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11816 echo "_ACEOF"
11817} >conf$$subs.sh ||
11818 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11819ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11820ac_delim='%!_!# '
11821for ac_last_try in false false false false false :; do
11822 . ./conf$$subs.sh ||
11823 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11824
11825 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11826 if test $ac_delim_n = $ac_delim_num; then
11827 break
11828 elif $ac_last_try; then
11829 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11830 else
11831 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11832 fi
11833done
11834rm -f conf$$subs.sh
11835
11836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11837cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11838_ACEOF
11839sed -n '
11840h
11841s/^/S["/; s/!.*/"]=/
11842p
11843g
11844s/^[^!]*!//
11845:repl
11846t repl
11847s/'"$ac_delim"'$//
11848t delim
11849:nl
11850h
11851s/\(.\{148\}\)..*/\1/
11852t more1
11853s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11854p
11855n
11856b repl
11857:more1
11858s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11859p
11860g
11861s/.\{148\}//
11862t nl
11863:delim
11864h
11865s/\(.\{148\}\)..*/\1/
11866t more2
11867s/["\\]/\\&/g; s/^/"/; s/$/"/
11868p
11869b
11870:more2
11871s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11872p
11873g
11874s/.\{148\}//
11875t delim
11876' <conf$$subs.awk | sed '
11877/^[^""]/{
11878 N
11879 s/\n//
11880}
11881' >>$CONFIG_STATUS || ac_write_fail=1
11882rm -f conf$$subs.awk
11883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11884_ACAWK
11885cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
11886 for (key in S) S_is_set[key] = 1
11887 FS = "\a"
11888
11889}
11890{
11891 line = $ 0
11892 nfields = split(line, field, "@")
11893 substed = 0
11894 len = length(field[1])
11895 for (i = 2; i < nfields; i++) {
11896 key = field[i]
11897 keylen = length(key)
11898 if (S_is_set[key]) {
11899 value = S[key]
11900 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11901 len += length(value) + length(field[++i])
11902 substed = 1
11903 } else
11904 len += 1 + keylen
11905 }
11906
11907 print line
11908}
11909
11910_ACAWK
11911_ACEOF
11912cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11913if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11914 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11915else
11916 cat
11917fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11918 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
11919_ACEOF
11920
11921# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11922# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
11923# trailing colons and then remove the whole line if VPATH becomes empty
11924# (actually we leave an empty line to preserve line numbers).
11925if test "x$srcdir" = x.; then
11926 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11927h
11928s///
11929s/^/:/
11930s/[ ]*$/:/
11931s/:\$(srcdir):/:/g
11932s/:\${srcdir}:/:/g
11933s/:@srcdir@:/:/g
11934s/^:*//
11935s/:*$//
11936x
11937s/\(=[ ]*\).*/\1/
11938G
11939s/\n//
11940s/^[^=]*=[ ]*$//
11941}'
11942fi
11943
11944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11945fi # test -n "$CONFIG_FILES"
11946
11947# Set up the scripts for CONFIG_HEADERS section.
11948# No need to generate them if there are no CONFIG_HEADERS.
11949# This happens for instance with `./config.status Makefile'.
11950if test -n "$CONFIG_HEADERS"; then
11951cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
11952BEGIN {
11953_ACEOF
11954
11955# Transform confdefs.h into an awk script `defines.awk', embedded as
11956# here-document in config.status, that substitutes the proper values into
11957# config.h.in to produce config.h.
11958
11959# Create a delimiter string that does not exist in confdefs.h, to ease
11960# handling of long lines.
11961ac_delim='%!_!# '
11962for ac_last_try in false false :; do
11963 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11964 if test -z "$ac_tt"; then
11965 break
11966 elif $ac_last_try; then
11967 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
11968 else
11969 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11970 fi
11971done
11972
11973# For the awk script, D is an array of macro values keyed by name,
11974# likewise P contains macro parameters if any. Preserve backslash
11975# newline sequences.
11976
11977ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11978sed -n '
11979s/.\{148\}/&'"$ac_delim"'/g
11980t rset
11981:rset
11982s/^[ ]*#[ ]*define[ ][ ]*/ /
11983t def
11984d
11985:def
11986s/\\$//
11987t bsnl
11988s/["\\]/\\&/g
11989s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11990D["\1"]=" \3"/p
11991s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11992d
11993:bsnl
11994s/["\\]/\\&/g
11995s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11996D["\1"]=" \3\\\\\\n"\\/p
11997t cont
11998s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11999t cont
12000d
12001:cont
12002n
12003s/.\{148\}/&'"$ac_delim"'/g
12004t clear
12005:clear
12006s/\\$//
12007t bsnlc
12008s/["\\]/\\&/g; s/^/"/; s/$/"/p
12009d
12010:bsnlc
12011s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
12012b cont
12013' <confdefs.h | sed '
12014s/'"$ac_delim"'/"\\\
12015"/g' >>$CONFIG_STATUS || ac_write_fail=1
12016
12017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12018 for (key in D) D_is_set[key] = 1
12019 FS = "\a"
12020}
12021/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
12022 line = \$ 0
12023 split(line, arg, " ")
12024 if (arg[1] == "#") {
12025 defundef = arg[2]
12026 mac1 = arg[3]
12027 } else {
12028 defundef = substr(arg[1], 2)
12029 mac1 = arg[2]
12030 }
12031 split(mac1, mac2, "(") #)
12032 macro = mac2[1]
12033 prefix = substr(line, 1, index(line, defundef) - 1)
12034 if (D_is_set[macro]) {
12035 # Preserve the white space surrounding the "#".
12036 print prefix "define", macro P[macro] D[macro]
12037 next
12038 } else {
12039 # Replace #undef with comments. This is necessary, for example,
12040 # in the case of _POSIX_SOURCE, which is predefined and required
12041 # on some systems where configure will not decide to define it.
12042 if (defundef == "undef") {
12043 print "/*", prefix defundef, macro, "*/"
12044 next
12045 }
12046 }
12047}
12048{ print }
12049_ACAWK
12050_ACEOF
12051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12052 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
12053fi # test -n "$CONFIG_HEADERS"
12054
12055
12056eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
12057shift
12058for ac_tag
12059do
12060 case $ac_tag in
12061 :[FHLC]) ac_mode=$ac_tag; continue;;
12062 esac
12063 case $ac_mode$ac_tag in
12064 :[FHL]*:*);;
12065 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
12066 :[FH]-) ac_tag=-:-;;
12067 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12068 esac
12069 ac_save_IFS=$IFS
12070 IFS=:
12071 set x $ac_tag
12072 IFS=$ac_save_IFS
12073 shift
12074 ac_file=$1
12075 shift
12076
12077 case $ac_mode in
12078 :L) ac_source=$1;;
12079 :[FH])
12080 ac_file_inputs=
12081 for ac_f
12082 do
12083 case $ac_f in
12084 -) ac_f="$ac_tmp/stdin";;
12085 *) # Look for the file first in the build tree, then in the source tree
12086 # (if the path is not absolute). The absolute path cannot be DOS-style,
12087 # because $ac_f cannot contain `:'.
12088 test -f "$ac_f" ||
12089 case $ac_f in
12090 [\\/$]*) false;;
12091 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12092 esac ||
12093 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
12094 esac
12095 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
12096 as_fn_append ac_file_inputs " '$ac_f'"
12097 done
12098
12099 # Let's still pretend it is `configure' which instantiates (i.e., don't
12100 # use $as_me), people would be surprised to read:
12101 # /* config.h. Generated by config.status. */
12102 configure_input='Generated from '`
12103 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
12104 `' by configure.'
12105 if test x"$ac_file" != x-; then
12106 configure_input="$ac_file. $configure_input"
12107 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
12108$as_echo "$as_me: creating $ac_file" >&6;}
12109 fi
12110 # Neutralize special characters interpreted by sed in replacement strings.
12111 case $configure_input in #(
12112 *\&* | *\|* | *\\* )
12113 ac_sed_conf_input=`$as_echo "$configure_input" |
12114 sed 's/[\\\\&|]/\\\\&/g'`;; #(
12115 *) ac_sed_conf_input=$configure_input;;
12116 esac
12117
12118 case $ac_tag in
12119 *:-:* | *:-) cat >"$ac_tmp/stdin" \
12120 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
12121 esac
12122 ;;
12123 esac
12124
12125 ac_dir=`$as_dirname -- "$ac_file" ||
12126$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12127 X"$ac_file" : 'X\(//\)[^/]' \| \
12128 X"$ac_file" : 'X\(//\)$' \| \
12129 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12130$as_echo X"$ac_file" |
12131 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12132 s//\1/
12133 q
12134 }
12135 /^X\(\/\/\)[^/].*/{
12136 s//\1/
12137 q
12138 }
12139 /^X\(\/\/\)$/{
12140 s//\1/
12141 q
12142 }
12143 /^X\(\/\).*/{
12144 s//\1/
12145 q
12146 }
12147 s/.*/./; q'`
12148 as_dir="$ac_dir"; as_fn_mkdir_p
12149 ac_builddir=.
12150
12151case "$ac_dir" in
12152.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12153*)
12154 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
12155 # A ".." for each directory in $ac_dir_suffix.
12156 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
12157 case $ac_top_builddir_sub in
12158 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12159 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12160 esac ;;
12161esac
12162ac_abs_top_builddir=$ac_pwd
12163ac_abs_builddir=$ac_pwd$ac_dir_suffix
12164# for backward compatibility:
12165ac_top_builddir=$ac_top_build_prefix
12166
12167case $srcdir in
12168 .) # We are building in place.
12169 ac_srcdir=.
12170 ac_top_srcdir=$ac_top_builddir_sub
12171 ac_abs_top_srcdir=$ac_pwd ;;
12172 [\\/]* | ?:[\\/]* ) # Absolute name.
12173 ac_srcdir=$srcdir$ac_dir_suffix;
12174 ac_top_srcdir=$srcdir
12175 ac_abs_top_srcdir=$srcdir ;;
12176 *) # Relative name.
12177 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12178 ac_top_srcdir=$ac_top_build_prefix$srcdir
12179 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12180esac
12181ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12182
12183
12184 case $ac_mode in
12185 :F)
12186 #
12187 # CONFIG_FILE
12188 #
12189
12190 case $INSTALL in
12191 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12192 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12193 esac
12194 ac_MKDIR_P=$MKDIR_P
12195 case $MKDIR_P in
12196 [\\/$]* | ?:[\\/]* ) ;;
12197 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
12198 esac
12199_ACEOF
12200
12201cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12202# If the template does not know about datarootdir, expand it.
12203# FIXME: This hack should be removed a few years after 2.60.
12204ac_datarootdir_hack=; ac_datarootdir_seen=
12205ac_sed_dataroot='
12206/datarootdir/ {
12207 p
12208 q
12209}
12210/@datadir@/p
12211/@docdir@/p
12212/@infodir@/p
12213/@localedir@/p
12214/@mandir@/p'
12215case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12216*datarootdir*) ac_datarootdir_seen=yes;;
12217*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12219$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12220_ACEOF
12221cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12222 ac_datarootdir_hack='
12223 s&@datadir@&$datadir&g
12224 s&@docdir@&$docdir&g
12225 s&@infodir@&$infodir&g
12226 s&@localedir@&$localedir&g
12227 s&@mandir@&$mandir&g
12228 s&\\\${datarootdir}&$datarootdir&g' ;;
12229esac
12230_ACEOF
12231
12232# Neutralize VPATH when `$srcdir' = `.'.
12233# Shell code in configure.ac might set extrasub.
12234# FIXME: do we really want to maintain this feature?
12235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12236ac_sed_extra="$ac_vpsub
12237$extrasub
12238_ACEOF
12239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12240:t
12241/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12242s|@configure_input@|$ac_sed_conf_input|;t t
12243s&@top_builddir@&$ac_top_builddir_sub&;t t
12244s&@top_build_prefix@&$ac_top_build_prefix&;t t
12245s&@srcdir@&$ac_srcdir&;t t
12246s&@abs_srcdir@&$ac_abs_srcdir&;t t
12247s&@top_srcdir@&$ac_top_srcdir&;t t
12248s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12249s&@builddir@&$ac_builddir&;t t
12250s&@abs_builddir@&$ac_abs_builddir&;t t
12251s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12252s&@INSTALL@&$ac_INSTALL&;t t
12253s&@MKDIR_P@&$ac_MKDIR_P&;t t
12254$ac_datarootdir_hack
12255"
12256eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
12257 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12258
12259test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12260 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
12261 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
12262 "$ac_tmp/out"`; test -z "$ac_out"; } &&
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12264which seems to be undefined. Please make sure it is defined" >&5
12265$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12266which seems to be undefined. Please make sure it is defined" >&2;}
12267
12268 rm -f "$ac_tmp/stdin"
12269 case $ac_file in
12270 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
12271 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
12272 esac \
12273 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12274 ;;
12275 :H)
12276 #
12277 # CONFIG_HEADER
12278 #
12279 if test x"$ac_file" != x-; then
12280 {
12281 $as_echo "/* $configure_input */" \
12282 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
12283 } >"$ac_tmp/config.h" \
12284 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12285 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
12287$as_echo "$as_me: $ac_file is unchanged" >&6;}
12288 else
12289 rm -f "$ac_file"
12290 mv "$ac_tmp/config.h" "$ac_file" \
12291 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12292 fi
12293 else
12294 $as_echo "/* $configure_input */" \
12295 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
12296 || as_fn_error $? "could not create -" "$LINENO" 5
12297 fi
12298# Compute "$ac_file"'s index in $config_headers.
12299_am_arg="$ac_file"
12300_am_stamp_count=1
12301for _am_header in $config_headers :; do
12302 case $_am_header in
12303 $_am_arg | $_am_arg:* )
12304 break ;;
12305 * )
12306 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
12307 esac
12308done
12309echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
12310$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12311 X"$_am_arg" : 'X\(//\)[^/]' \| \
12312 X"$_am_arg" : 'X\(//\)$' \| \
12313 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
12314$as_echo X"$_am_arg" |
12315 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12316 s//\1/
12317 q
12318 }
12319 /^X\(\/\/\)[^/].*/{
12320 s//\1/
12321 q
12322 }
12323 /^X\(\/\/\)$/{
12324 s//\1/
12325 q
12326 }
12327 /^X\(\/\).*/{
12328 s//\1/
12329 q
12330 }
12331 s/.*/./; q'`/stamp-h$_am_stamp_count
12332 ;;
12333
12334 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12335$as_echo "$as_me: executing $ac_file commands" >&6;}
12336 ;;
12337 esac
12338
12339
12340 case $ac_file$ac_mode in
12341 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
12342 # Older Autoconf quotes --file arguments for eval, but not when files
12343 # are listed without --file. Let's play safe and only enable the eval
12344 # if we detect the quoting.
12345 case $CONFIG_FILES in
12346 *\'*) eval set x "$CONFIG_FILES" ;;
12347 *) set x $CONFIG_FILES ;;
12348 esac
12349 shift
12350 for mf
12351 do
12352 # Strip MF so we end up with the name of the file.
12353 mf=`echo "$mf" | sed -e 's/:.*$//'`
12354 # Check whether this is an Automake generated Makefile or not.
12355 # We used to match only the files named 'Makefile.in', but
12356 # some people rename them; so instead we look at the file content.
12357 # Grep'ing the first line is not enough: some people post-process
12358 # each Makefile.in and add a new line on top of each file to say so.
12359 # Grep'ing the whole file is not good either: AIX grep has a line
12360 # limit of 2048, but all sed's we know have understand at least 4000.
12361 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
12362 dirpart=`$as_dirname -- "$mf" ||
12363$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12364 X"$mf" : 'X\(//\)[^/]' \| \
12365 X"$mf" : 'X\(//\)$' \| \
12366 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
12367$as_echo X"$mf" |
12368 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12369 s//\1/
12370 q
12371 }
12372 /^X\(\/\/\)[^/].*/{
12373 s//\1/
12374 q
12375 }
12376 /^X\(\/\/\)$/{
12377 s//\1/
12378 q
12379 }
12380 /^X\(\/\).*/{
12381 s//\1/
12382 q
12383 }
12384 s/.*/./; q'`
12385 else
12386 continue
12387 fi
12388 # Extract the definition of DEPDIR, am__include, and am__quote
12389 # from the Makefile without running 'make'.
12390 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
12391 test -z "$DEPDIR" && continue
12392 am__include=`sed -n 's/^am__include = //p' < "$mf"`
12393 test -z "$am__include" && continue
12394 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
12395 # Find all dependency output files, they are included files with
12396 # $(DEPDIR) in their names. We invoke sed twice because it is the
12397 # simplest approach to changing $(DEPDIR) to its actual value in the
12398 # expansion.
12399 for file in `sed -n "
12400 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
12401 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
12402 # Make sure the directory exists.
12403 test -f "$dirpart/$file" && continue
12404 fdir=`$as_dirname -- "$file" ||
12405$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12406 X"$file" : 'X\(//\)[^/]' \| \
12407 X"$file" : 'X\(//\)$' \| \
12408 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
12409$as_echo X"$file" |
12410 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12411 s//\1/
12412 q
12413 }
12414 /^X\(\/\/\)[^/].*/{
12415 s//\1/
12416 q
12417 }
12418 /^X\(\/\/\)$/{
12419 s//\1/
12420 q
12421 }
12422 /^X\(\/\).*/{
12423 s//\1/
12424 q
12425 }
12426 s/.*/./; q'`
12427 as_dir=$dirpart/$fdir; as_fn_mkdir_p
12428 # echo "creating $dirpart/$file"
12429 echo '# dummy' > "$dirpart/$file"
12430 done
12431 done
12432}
12433 ;;
12434
12435 esac
12436done # for ac_tag
12437
12438
12439as_fn_exit 0
12440_ACEOF
12441ac_clean_files=$ac_clean_files_save
12442
12443test $ac_write_fail = 0 ||
12444 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
12445
12446
12447# configure is writing to config.log, and then calls config.status.
12448# config.status does its own redirection, appending to config.log.
12449# Unfortunately, on DOS this fails, as config.log is still kept open
12450# by configure, so config.status won't be able to write to it; its
12451# output is simply discarded. So we exec the FD to /dev/null,
12452# effectively closing config.log, so it can be properly (re)opened and
12453# appended to by config.status. When coming back to configure, we
12454# need to make the FD available again.
12455if test "$no_create" != yes; then
12456 ac_cs_success=:
12457 ac_config_status_args=
12458 test "$silent" = yes &&
12459 ac_config_status_args="$ac_config_status_args --quiet"
12460 exec 5>/dev/null
12461 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12462 exec 5>>config.log
12463 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12464 # would make configure fail if this is the last instruction.
12465 $ac_cs_success || as_fn_exit 1
12466fi
12467if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12469$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
12470fi
12471