Cast to bfd_vma in arm-tdep.c
[deliverable/binutils-gdb.git] / gdbserver / configure
... / ...
CommitLineData
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
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=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="server.cc"
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
622ac_header_list=
623ac_subst_vars='LTLIBOBJS
624LIBOBJS
625GNULIB_STDINT_H
626extra_libraries
627IPA_DEPFILES
628srv_xmlfiles
629srv_xmlbuiltin
630GDBSERVER_LIBS
631GDBSERVER_DEPFILES
632RDYNAMIC
633REPORT_BUGS_TEXI
634REPORT_BUGS_TO
635PKGVERSION
636WERROR_CFLAGS
637WARN_CFLAGS
638ustinc
639ustlibs
640CCDEPMODE
641CONFIG_SRC_SUBDIR
642DEPDIR
643am__leading_dot
644host_noncanonical
645target_noncanonical
646LTLIBIPT
647LIBIPT
648HAVE_LIBIPT
649PTHREAD_CFLAGS
650PTHREAD_LIBS
651PTHREAD_CC
652ax_pthread_config
653SED
654ALLOCA
655CXX_DIALECT
656HAVE_CXX11
657RANLIB
658AR
659INSTALL_DATA
660INSTALL_SCRIPT
661INSTALL_PROGRAM
662target_os
663target_vendor
664target_cpu
665target
666host_os
667host_vendor
668host_cpu
669host
670build_os
671build_vendor
672build_cpu
673build
674INSTALL_STRIP_PROGRAM
675STRIP
676install_sh
677EGREP
678GREP
679CPP
680ac_ct_CXX
681CXXFLAGS
682CXX
683OBJEXT
684EXEEXT
685ac_ct_CC
686CPPFLAGS
687LDFLAGS
688CFLAGS
689CC
690MAINT
691MAINTAINER_MODE_FALSE
692MAINTAINER_MODE_TRUE
693target_alias
694host_alias
695build_alias
696LIBS
697ECHO_T
698ECHO_N
699ECHO_C
700DEFS
701mandir
702localedir
703libdir
704psdir
705pdfdir
706dvidir
707htmldir
708infodir
709docdir
710oldincludedir
711includedir
712localstatedir
713sharedstatedir
714sysconfdir
715datadir
716datarootdir
717libexecdir
718sbindir
719bindir
720program_transform_name
721prefix
722exec_prefix
723PACKAGE_URL
724PACKAGE_BUGREPORT
725PACKAGE_STRING
726PACKAGE_VERSION
727PACKAGE_TARNAME
728PACKAGE_NAME
729PATH_SEPARATOR
730SHELL'
731ac_subst_files=''
732ac_user_opts='
733enable_option_checking
734enable_maintainer_mode
735enable_largefile
736with_intel_pt
737with_gnu_ld
738enable_rpath
739with_libipt_prefix
740with_libipt_type
741enable_unit_tests
742with_ust
743with_ust_include
744with_ust_lib
745enable_werror
746enable_build_warnings
747enable_gdb_build_warnings
748with_pkgversion
749with_bugurl
750with_libthread_db
751enable_inprocess_agent
752'
753 ac_precious_vars='build_alias
754host_alias
755target_alias
756CC
757CFLAGS
758LDFLAGS
759LIBS
760CPPFLAGS
761CXX
762CXXFLAGS
763CCC
764CPP'
765
766
767# Initialize some variables set by options.
768ac_init_help=
769ac_init_version=false
770ac_unrecognized_opts=
771ac_unrecognized_sep=
772# The variables have the same names as the options, with
773# dashes changed to underlines.
774cache_file=/dev/null
775exec_prefix=NONE
776no_create=
777no_recursion=
778prefix=NONE
779program_prefix=NONE
780program_suffix=NONE
781program_transform_name=s,x,x,
782silent=
783site=
784srcdir=
785verbose=
786x_includes=NONE
787x_libraries=NONE
788
789# Installation directory options.
790# These are left unexpanded so users can "make install exec_prefix=/foo"
791# and all the variables that are supposed to be based on exec_prefix
792# by default will actually change.
793# Use braces instead of parens because sh, perl, etc. also accept them.
794# (The list follows the same order as the GNU Coding Standards.)
795bindir='${exec_prefix}/bin'
796sbindir='${exec_prefix}/sbin'
797libexecdir='${exec_prefix}/libexec'
798datarootdir='${prefix}/share'
799datadir='${datarootdir}'
800sysconfdir='${prefix}/etc'
801sharedstatedir='${prefix}/com'
802localstatedir='${prefix}/var'
803includedir='${prefix}/include'
804oldincludedir='/usr/include'
805docdir='${datarootdir}/doc/${PACKAGE}'
806infodir='${datarootdir}/info'
807htmldir='${docdir}'
808dvidir='${docdir}'
809pdfdir='${docdir}'
810psdir='${docdir}'
811libdir='${exec_prefix}/lib'
812localedir='${datarootdir}/locale'
813mandir='${datarootdir}/man'
814
815ac_prev=
816ac_dashdash=
817for ac_option
818do
819 # If the previous option needs an argument, assign it.
820 if test -n "$ac_prev"; then
821 eval $ac_prev=\$ac_option
822 ac_prev=
823 continue
824 fi
825
826 case $ac_option in
827 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
828 *=) ac_optarg= ;;
829 *) ac_optarg=yes ;;
830 esac
831
832 # Accept the important Cygnus configure options, so we can diagnose typos.
833
834 case $ac_dashdash$ac_option in
835 --)
836 ac_dashdash=yes ;;
837
838 -bindir | --bindir | --bindi | --bind | --bin | --bi)
839 ac_prev=bindir ;;
840 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
841 bindir=$ac_optarg ;;
842
843 -build | --build | --buil | --bui | --bu)
844 ac_prev=build_alias ;;
845 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
846 build_alias=$ac_optarg ;;
847
848 -cache-file | --cache-file | --cache-fil | --cache-fi \
849 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
850 ac_prev=cache_file ;;
851 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
852 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
853 cache_file=$ac_optarg ;;
854
855 --config-cache | -C)
856 cache_file=config.cache ;;
857
858 -datadir | --datadir | --datadi | --datad)
859 ac_prev=datadir ;;
860 -datadir=* | --datadir=* | --datadi=* | --datad=*)
861 datadir=$ac_optarg ;;
862
863 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
864 | --dataroo | --dataro | --datar)
865 ac_prev=datarootdir ;;
866 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
867 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
868 datarootdir=$ac_optarg ;;
869
870 -disable-* | --disable-*)
871 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
872 # Reject names that are not valid shell variable names.
873 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
874 as_fn_error $? "invalid feature name: $ac_useropt"
875 ac_useropt_orig=$ac_useropt
876 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
877 case $ac_user_opts in
878 *"
879"enable_$ac_useropt"
880"*) ;;
881 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
882 ac_unrecognized_sep=', ';;
883 esac
884 eval enable_$ac_useropt=no ;;
885
886 -docdir | --docdir | --docdi | --doc | --do)
887 ac_prev=docdir ;;
888 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
889 docdir=$ac_optarg ;;
890
891 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
892 ac_prev=dvidir ;;
893 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
894 dvidir=$ac_optarg ;;
895
896 -enable-* | --enable-*)
897 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
898 # Reject names that are not valid shell variable names.
899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
900 as_fn_error $? "invalid feature name: $ac_useropt"
901 ac_useropt_orig=$ac_useropt
902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
903 case $ac_user_opts in
904 *"
905"enable_$ac_useropt"
906"*) ;;
907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
908 ac_unrecognized_sep=', ';;
909 esac
910 eval enable_$ac_useropt=\$ac_optarg ;;
911
912 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
913 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
914 | --exec | --exe | --ex)
915 ac_prev=exec_prefix ;;
916 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
917 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
918 | --exec=* | --exe=* | --ex=*)
919 exec_prefix=$ac_optarg ;;
920
921 -gas | --gas | --ga | --g)
922 # Obsolete; use --with-gas.
923 with_gas=yes ;;
924
925 -help | --help | --hel | --he | -h)
926 ac_init_help=long ;;
927 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
928 ac_init_help=recursive ;;
929 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
930 ac_init_help=short ;;
931
932 -host | --host | --hos | --ho)
933 ac_prev=host_alias ;;
934 -host=* | --host=* | --hos=* | --ho=*)
935 host_alias=$ac_optarg ;;
936
937 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
938 ac_prev=htmldir ;;
939 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
940 | --ht=*)
941 htmldir=$ac_optarg ;;
942
943 -includedir | --includedir | --includedi | --included | --include \
944 | --includ | --inclu | --incl | --inc)
945 ac_prev=includedir ;;
946 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
947 | --includ=* | --inclu=* | --incl=* | --inc=*)
948 includedir=$ac_optarg ;;
949
950 -infodir | --infodir | --infodi | --infod | --info | --inf)
951 ac_prev=infodir ;;
952 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
953 infodir=$ac_optarg ;;
954
955 -libdir | --libdir | --libdi | --libd)
956 ac_prev=libdir ;;
957 -libdir=* | --libdir=* | --libdi=* | --libd=*)
958 libdir=$ac_optarg ;;
959
960 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
961 | --libexe | --libex | --libe)
962 ac_prev=libexecdir ;;
963 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
964 | --libexe=* | --libex=* | --libe=*)
965 libexecdir=$ac_optarg ;;
966
967 -localedir | --localedir | --localedi | --localed | --locale)
968 ac_prev=localedir ;;
969 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
970 localedir=$ac_optarg ;;
971
972 -localstatedir | --localstatedir | --localstatedi | --localstated \
973 | --localstate | --localstat | --localsta | --localst | --locals)
974 ac_prev=localstatedir ;;
975 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
976 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
977 localstatedir=$ac_optarg ;;
978
979 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
980 ac_prev=mandir ;;
981 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
982 mandir=$ac_optarg ;;
983
984 -nfp | --nfp | --nf)
985 # Obsolete; use --without-fp.
986 with_fp=no ;;
987
988 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
989 | --no-cr | --no-c | -n)
990 no_create=yes ;;
991
992 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
994 no_recursion=yes ;;
995
996 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
997 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
998 | --oldin | --oldi | --old | --ol | --o)
999 ac_prev=oldincludedir ;;
1000 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1001 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1002 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1003 oldincludedir=$ac_optarg ;;
1004
1005 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1006 ac_prev=prefix ;;
1007 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1008 prefix=$ac_optarg ;;
1009
1010 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1011 | --program-pre | --program-pr | --program-p)
1012 ac_prev=program_prefix ;;
1013 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1014 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1015 program_prefix=$ac_optarg ;;
1016
1017 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1018 | --program-suf | --program-su | --program-s)
1019 ac_prev=program_suffix ;;
1020 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1021 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1022 program_suffix=$ac_optarg ;;
1023
1024 -program-transform-name | --program-transform-name \
1025 | --program-transform-nam | --program-transform-na \
1026 | --program-transform-n | --program-transform- \
1027 | --program-transform | --program-transfor \
1028 | --program-transfo | --program-transf \
1029 | --program-trans | --program-tran \
1030 | --progr-tra | --program-tr | --program-t)
1031 ac_prev=program_transform_name ;;
1032 -program-transform-name=* | --program-transform-name=* \
1033 | --program-transform-nam=* | --program-transform-na=* \
1034 | --program-transform-n=* | --program-transform-=* \
1035 | --program-transform=* | --program-transfor=* \
1036 | --program-transfo=* | --program-transf=* \
1037 | --program-trans=* | --program-tran=* \
1038 | --progr-tra=* | --program-tr=* | --program-t=*)
1039 program_transform_name=$ac_optarg ;;
1040
1041 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1042 ac_prev=pdfdir ;;
1043 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1044 pdfdir=$ac_optarg ;;
1045
1046 -psdir | --psdir | --psdi | --psd | --ps)
1047 ac_prev=psdir ;;
1048 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1049 psdir=$ac_optarg ;;
1050
1051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052 | -silent | --silent | --silen | --sile | --sil)
1053 silent=yes ;;
1054
1055 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1056 ac_prev=sbindir ;;
1057 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1058 | --sbi=* | --sb=*)
1059 sbindir=$ac_optarg ;;
1060
1061 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1062 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1063 | --sharedst | --shareds | --shared | --share | --shar \
1064 | --sha | --sh)
1065 ac_prev=sharedstatedir ;;
1066 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1067 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1068 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1069 | --sha=* | --sh=*)
1070 sharedstatedir=$ac_optarg ;;
1071
1072 -site | --site | --sit)
1073 ac_prev=site ;;
1074 -site=* | --site=* | --sit=*)
1075 site=$ac_optarg ;;
1076
1077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1078 ac_prev=srcdir ;;
1079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1080 srcdir=$ac_optarg ;;
1081
1082 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1083 | --syscon | --sysco | --sysc | --sys | --sy)
1084 ac_prev=sysconfdir ;;
1085 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1086 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1087 sysconfdir=$ac_optarg ;;
1088
1089 -target | --target | --targe | --targ | --tar | --ta | --t)
1090 ac_prev=target_alias ;;
1091 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1092 target_alias=$ac_optarg ;;
1093
1094 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1095 verbose=yes ;;
1096
1097 -version | --version | --versio | --versi | --vers | -V)
1098 ac_init_version=: ;;
1099
1100 -with-* | --with-*)
1101 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1102 # Reject names that are not valid shell variable names.
1103 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1104 as_fn_error $? "invalid package name: $ac_useropt"
1105 ac_useropt_orig=$ac_useropt
1106 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1107 case $ac_user_opts in
1108 *"
1109"with_$ac_useropt"
1110"*) ;;
1111 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1112 ac_unrecognized_sep=', ';;
1113 esac
1114 eval with_$ac_useropt=\$ac_optarg ;;
1115
1116 -without-* | --without-*)
1117 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1118 # Reject names that are not valid shell variable names.
1119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1120 as_fn_error $? "invalid package name: $ac_useropt"
1121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=no ;;
1131
1132 --x)
1133 # Obsolete; use --with-x.
1134 with_x=yes ;;
1135
1136 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1137 | --x-incl | --x-inc | --x-in | --x-i)
1138 ac_prev=x_includes ;;
1139 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1140 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1141 x_includes=$ac_optarg ;;
1142
1143 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1144 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1145 ac_prev=x_libraries ;;
1146 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1147 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1148 x_libraries=$ac_optarg ;;
1149
1150 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1151Try \`$0 --help' for more information"
1152 ;;
1153
1154 *=*)
1155 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156 # Reject names that are not valid shell variable names.
1157 case $ac_envvar in #(
1158 '' | [0-9]* | *[!_$as_cr_alnum]* )
1159 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1160 esac
1161 eval $ac_envvar=\$ac_optarg
1162 export $ac_envvar ;;
1163
1164 *)
1165 # FIXME: should be removed in autoconf 3.0.
1166 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1167 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1168 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1169 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1170 ;;
1171
1172 esac
1173done
1174
1175if test -n "$ac_prev"; then
1176 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1177 as_fn_error $? "missing argument to $ac_option"
1178fi
1179
1180if test -n "$ac_unrecognized_opts"; then
1181 case $enable_option_checking in
1182 no) ;;
1183 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1184 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1185 esac
1186fi
1187
1188# Check all directory arguments for consistency.
1189for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1190 datadir sysconfdir sharedstatedir localstatedir includedir \
1191 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1192 libdir localedir mandir
1193do
1194 eval ac_val=\$$ac_var
1195 # Remove trailing slashes.
1196 case $ac_val in
1197 */ )
1198 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1199 eval $ac_var=\$ac_val;;
1200 esac
1201 # Be sure to have absolute directory names.
1202 case $ac_val in
1203 [\\/$]* | ?:[\\/]* ) continue;;
1204 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1205 esac
1206 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1207done
1208
1209# There might be people who depend on the old broken behavior: `$host'
1210# used to hold the argument of --host etc.
1211# FIXME: To remove some day.
1212build=$build_alias
1213host=$host_alias
1214target=$target_alias
1215
1216# FIXME: To remove some day.
1217if test "x$host_alias" != x; then
1218 if test "x$build_alias" = x; then
1219 cross_compiling=maybe
1220 elif test "x$build_alias" != "x$host_alias"; then
1221 cross_compiling=yes
1222 fi
1223fi
1224
1225ac_tool_prefix=
1226test -n "$host_alias" && ac_tool_prefix=$host_alias-
1227
1228test "$silent" = yes && exec 6>/dev/null
1229
1230
1231ac_pwd=`pwd` && test -n "$ac_pwd" &&
1232ac_ls_di=`ls -di .` &&
1233ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1234 as_fn_error $? "working directory cannot be determined"
1235test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1236 as_fn_error $? "pwd does not report name of working directory"
1237
1238
1239# Find the source files, if location was not specified.
1240if test -z "$srcdir"; then
1241 ac_srcdir_defaulted=yes
1242 # Try the directory containing this script, then the parent directory.
1243 ac_confdir=`$as_dirname -- "$as_myself" ||
1244$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1245 X"$as_myself" : 'X\(//\)[^/]' \| \
1246 X"$as_myself" : 'X\(//\)$' \| \
1247 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1248$as_echo X"$as_myself" |
1249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1250 s//\1/
1251 q
1252 }
1253 /^X\(\/\/\)[^/].*/{
1254 s//\1/
1255 q
1256 }
1257 /^X\(\/\/\)$/{
1258 s//\1/
1259 q
1260 }
1261 /^X\(\/\).*/{
1262 s//\1/
1263 q
1264 }
1265 s/.*/./; q'`
1266 srcdir=$ac_confdir
1267 if test ! -r "$srcdir/$ac_unique_file"; then
1268 srcdir=..
1269 fi
1270else
1271 ac_srcdir_defaulted=no
1272fi
1273if test ! -r "$srcdir/$ac_unique_file"; then
1274 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1275 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1276fi
1277ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1278ac_abs_confdir=`(
1279 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1280 pwd)`
1281# When building in place, set srcdir=.
1282if test "$ac_abs_confdir" = "$ac_pwd"; then
1283 srcdir=.
1284fi
1285# Remove unnecessary trailing slashes from srcdir.
1286# Double slashes in file names in object file debugging info
1287# mess up M-x gdb in Emacs.
1288case $srcdir in
1289*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1290esac
1291for ac_var in $ac_precious_vars; do
1292 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1293 eval ac_env_${ac_var}_value=\$${ac_var}
1294 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1296done
1297
1298#
1299# Report the --help message.
1300#
1301if test "$ac_init_help" = "long"; then
1302 # Omit some internal or obsolete options to make the list less imposing.
1303 # This message is too long to be a string in the A/UX 3.1 sh.
1304 cat <<_ACEOF
1305\`configure' configures this package to adapt to many kinds of systems.
1306
1307Usage: $0 [OPTION]... [VAR=VALUE]...
1308
1309To assign environment variables (e.g., CC, CFLAGS...), specify them as
1310VAR=VALUE. See below for descriptions of some of the useful variables.
1311
1312Defaults for the options are specified in brackets.
1313
1314Configuration:
1315 -h, --help display this help and exit
1316 --help=short display options specific to this package
1317 --help=recursive display the short help of all the included packages
1318 -V, --version display version information and exit
1319 -q, --quiet, --silent do not print \`checking ...' messages
1320 --cache-file=FILE cache test results in FILE [disabled]
1321 -C, --config-cache alias for \`--cache-file=config.cache'
1322 -n, --no-create do not create output files
1323 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1324
1325Installation directories:
1326 --prefix=PREFIX install architecture-independent files in PREFIX
1327 [$ac_default_prefix]
1328 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1329 [PREFIX]
1330
1331By default, \`make install' will install all the files in
1332\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1333an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1334for instance \`--prefix=\$HOME'.
1335
1336For better control, use the options below.
1337
1338Fine tuning of the installation directories:
1339 --bindir=DIR user executables [EPREFIX/bin]
1340 --sbindir=DIR system admin executables [EPREFIX/sbin]
1341 --libexecdir=DIR program executables [EPREFIX/libexec]
1342 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1343 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1344 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1345 --libdir=DIR object code libraries [EPREFIX/lib]
1346 --includedir=DIR C header files [PREFIX/include]
1347 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1348 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1349 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1350 --infodir=DIR info documentation [DATAROOTDIR/info]
1351 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1352 --mandir=DIR man documentation [DATAROOTDIR/man]
1353 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1354 --htmldir=DIR html documentation [DOCDIR]
1355 --dvidir=DIR dvi documentation [DOCDIR]
1356 --pdfdir=DIR pdf documentation [DOCDIR]
1357 --psdir=DIR ps documentation [DOCDIR]
1358_ACEOF
1359
1360 cat <<\_ACEOF
1361
1362Program names:
1363 --program-prefix=PREFIX prepend PREFIX to installed program names
1364 --program-suffix=SUFFIX append SUFFIX to installed program names
1365 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1366
1367System types:
1368 --build=BUILD configure for building on BUILD [guessed]
1369 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1370 --target=TARGET configure for building compilers for TARGET [HOST]
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
1375
1376 cat <<\_ACEOF
1377
1378Optional Features:
1379 --disable-option-checking ignore unrecognized --enable/--with options
1380 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1381 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1382 --enable-maintainer-mode
1383 enable make rules and dependencies not useful (and
1384 sometimes confusing) to the casual installer
1385 --disable-largefile omit support for large files
1386 --disable-rpath do not hardcode runtime library paths
1387 --enable-unit-tests Enable the inclusion of unit tests when compiling
1388 GDB
1389 --enable-werror treat compile warnings as errors
1390 --enable-build-warnings enable build-time compiler warnings if gcc is used
1391 --enable-gdb-build-warnings
1392 enable GDB specific build-time compiler warnings if
1393 gcc is used
1394 --enable-inprocess-agent
1395 inprocess agent
1396
1397Optional Packages:
1398 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1399 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1400 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1401 --with-gnu-ld assume the C compiler uses GNU ld default=no
1402 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1403 --without-libipt-prefix don't search for libipt in includedir and libdir
1404 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1405 --with-ust=PATH Specify prefix directory for the installed UST package
1406 Equivalent to --with-ust-include=PATH/include
1407 plus --with-ust-lib=PATH/lib
1408 --with-ust-include=PATH Specify directory for installed UST include files
1409 --with-ust-lib=PATH Specify the directory for the installed UST library
1410 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1411 --with-bugurl=URL Direct users to URL to report a bug
1412 --with-libthread-db=PATH
1413 use given libthread_db directly
1414
1415Some influential environment variables:
1416 CC C compiler command
1417 CFLAGS C compiler flags
1418 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1419 nonstandard directory <lib dir>
1420 LIBS libraries to pass to the linker, e.g. -l<library>
1421 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1422 you have headers in a nonstandard directory <include dir>
1423 CXX C++ compiler command
1424 CXXFLAGS C++ compiler flags
1425 CPP C preprocessor
1426
1427Use these variables to override the choices made by `configure' or to help
1428it to find libraries and programs with nonstandard names/locations.
1429
1430Report bugs to the package provider.
1431_ACEOF
1432ac_status=$?
1433fi
1434
1435if test "$ac_init_help" = "recursive"; then
1436 # If there are subdirs, report their specific --help.
1437 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1438 test -d "$ac_dir" ||
1439 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1440 continue
1441 ac_builddir=.
1442
1443case "$ac_dir" in
1444.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1445*)
1446 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1447 # A ".." for each directory in $ac_dir_suffix.
1448 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1449 case $ac_top_builddir_sub in
1450 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1451 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1452 esac ;;
1453esac
1454ac_abs_top_builddir=$ac_pwd
1455ac_abs_builddir=$ac_pwd$ac_dir_suffix
1456# for backward compatibility:
1457ac_top_builddir=$ac_top_build_prefix
1458
1459case $srcdir in
1460 .) # We are building in place.
1461 ac_srcdir=.
1462 ac_top_srcdir=$ac_top_builddir_sub
1463 ac_abs_top_srcdir=$ac_pwd ;;
1464 [\\/]* | ?:[\\/]* ) # Absolute name.
1465 ac_srcdir=$srcdir$ac_dir_suffix;
1466 ac_top_srcdir=$srcdir
1467 ac_abs_top_srcdir=$srcdir ;;
1468 *) # Relative name.
1469 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1470 ac_top_srcdir=$ac_top_build_prefix$srcdir
1471 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1472esac
1473ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1474
1475 cd "$ac_dir" || { ac_status=$?; continue; }
1476 # Check for guested configure.
1477 if test -f "$ac_srcdir/configure.gnu"; then
1478 echo &&
1479 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1480 elif test -f "$ac_srcdir/configure"; then
1481 echo &&
1482 $SHELL "$ac_srcdir/configure" --help=recursive
1483 else
1484 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1485 fi || ac_status=$?
1486 cd "$ac_pwd" || { ac_status=$?; break; }
1487 done
1488fi
1489
1490test -n "$ac_init_help" && exit $ac_status
1491if $ac_init_version; then
1492 cat <<\_ACEOF
1493configure
1494generated by GNU Autoconf 2.69
1495
1496Copyright (C) 2012 Free Software Foundation, Inc.
1497This configure script is free software; the Free Software Foundation
1498gives unlimited permission to copy, distribute and modify it.
1499_ACEOF
1500 exit
1501fi
1502
1503## ------------------------ ##
1504## Autoconf initialization. ##
1505## ------------------------ ##
1506
1507# ac_fn_c_try_compile LINENO
1508# --------------------------
1509# Try to compile conftest.$ac_ext, and return whether this succeeded.
1510ac_fn_c_try_compile ()
1511{
1512 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1513 rm -f conftest.$ac_objext
1514 if { { ac_try="$ac_compile"
1515case "(($ac_try" in
1516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1517 *) ac_try_echo=$ac_try;;
1518esac
1519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1520$as_echo "$ac_try_echo"; } >&5
1521 (eval "$ac_compile") 2>conftest.err
1522 ac_status=$?
1523 if test -s conftest.err; then
1524 grep -v '^ *+' conftest.err >conftest.er1
1525 cat conftest.er1 >&5
1526 mv -f conftest.er1 conftest.err
1527 fi
1528 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1529 test $ac_status = 0; } && {
1530 test -z "$ac_c_werror_flag" ||
1531 test ! -s conftest.err
1532 } && test -s conftest.$ac_objext; then :
1533 ac_retval=0
1534else
1535 $as_echo "$as_me: failed program was:" >&5
1536sed 's/^/| /' conftest.$ac_ext >&5
1537
1538 ac_retval=1
1539fi
1540 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1541 as_fn_set_status $ac_retval
1542
1543} # ac_fn_c_try_compile
1544
1545# ac_fn_cxx_try_compile LINENO
1546# ----------------------------
1547# Try to compile conftest.$ac_ext, and return whether this succeeded.
1548ac_fn_cxx_try_compile ()
1549{
1550 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1551 rm -f conftest.$ac_objext
1552 if { { ac_try="$ac_compile"
1553case "(($ac_try" in
1554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1555 *) ac_try_echo=$ac_try;;
1556esac
1557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1558$as_echo "$ac_try_echo"; } >&5
1559 (eval "$ac_compile") 2>conftest.err
1560 ac_status=$?
1561 if test -s conftest.err; then
1562 grep -v '^ *+' conftest.err >conftest.er1
1563 cat conftest.er1 >&5
1564 mv -f conftest.er1 conftest.err
1565 fi
1566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1567 test $ac_status = 0; } && {
1568 test -z "$ac_cxx_werror_flag" ||
1569 test ! -s conftest.err
1570 } && test -s conftest.$ac_objext; then :
1571 ac_retval=0
1572else
1573 $as_echo "$as_me: failed program was:" >&5
1574sed 's/^/| /' conftest.$ac_ext >&5
1575
1576 ac_retval=1
1577fi
1578 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1579 as_fn_set_status $ac_retval
1580
1581} # ac_fn_cxx_try_compile
1582
1583# ac_fn_c_try_cpp LINENO
1584# ----------------------
1585# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1586ac_fn_c_try_cpp ()
1587{
1588 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1589 if { { ac_try="$ac_cpp conftest.$ac_ext"
1590case "(($ac_try" in
1591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1592 *) ac_try_echo=$ac_try;;
1593esac
1594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1595$as_echo "$ac_try_echo"; } >&5
1596 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1597 ac_status=$?
1598 if test -s conftest.err; then
1599 grep -v '^ *+' conftest.err >conftest.er1
1600 cat conftest.er1 >&5
1601 mv -f conftest.er1 conftest.err
1602 fi
1603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1604 test $ac_status = 0; } > conftest.i && {
1605 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1606 test ! -s conftest.err
1607 }; then :
1608 ac_retval=0
1609else
1610 $as_echo "$as_me: failed program was:" >&5
1611sed 's/^/| /' conftest.$ac_ext >&5
1612
1613 ac_retval=1
1614fi
1615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1616 as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_cpp
1619
1620# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1621# -------------------------------------------------------
1622# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1623# the include files in INCLUDES and setting the cache variable VAR
1624# accordingly.
1625ac_fn_c_check_header_mongrel ()
1626{
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 if eval \${$3+:} false; then :
1629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1630$as_echo_n "checking for $2... " >&6; }
1631if eval \${$3+:} false; then :
1632 $as_echo_n "(cached) " >&6
1633fi
1634eval ac_res=\$$3
1635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1636$as_echo "$ac_res" >&6; }
1637else
1638 # Is the header compilable?
1639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1640$as_echo_n "checking $2 usability... " >&6; }
1641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1642/* end confdefs.h. */
1643$4
1644#include <$2>
1645_ACEOF
1646if ac_fn_c_try_compile "$LINENO"; then :
1647 ac_header_compiler=yes
1648else
1649 ac_header_compiler=no
1650fi
1651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1653$as_echo "$ac_header_compiler" >&6; }
1654
1655# Is the header present?
1656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1657$as_echo_n "checking $2 presence... " >&6; }
1658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1659/* end confdefs.h. */
1660#include <$2>
1661_ACEOF
1662if ac_fn_c_try_cpp "$LINENO"; then :
1663 ac_header_preproc=yes
1664else
1665 ac_header_preproc=no
1666fi
1667rm -f conftest.err conftest.i conftest.$ac_ext
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1669$as_echo "$ac_header_preproc" >&6; }
1670
1671# So? What about this header?
1672case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1673 yes:no: )
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1675$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1677$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1678 ;;
1679 no:yes:* )
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1681$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1683$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1685$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1687$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1689$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1690 ;;
1691esac
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1693$as_echo_n "checking for $2... " >&6; }
1694if eval \${$3+:} false; then :
1695 $as_echo_n "(cached) " >&6
1696else
1697 eval "$3=\$ac_header_compiler"
1698fi
1699eval ac_res=\$$3
1700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1701$as_echo "$ac_res" >&6; }
1702fi
1703 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1704
1705} # ac_fn_c_check_header_mongrel
1706
1707# ac_fn_c_try_run LINENO
1708# ----------------------
1709# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1710# that executables *can* be run.
1711ac_fn_c_try_run ()
1712{
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 if { { ac_try="$ac_link"
1715case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718esac
1719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720$as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_link") 2>&5
1722 ac_status=$?
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1725 { { case "(($ac_try" in
1726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1727 *) ac_try_echo=$ac_try;;
1728esac
1729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1730$as_echo "$ac_try_echo"; } >&5
1731 (eval "$ac_try") 2>&5
1732 ac_status=$?
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; }; }; then :
1735 ac_retval=0
1736else
1737 $as_echo "$as_me: program exited with status $ac_status" >&5
1738 $as_echo "$as_me: failed program was:" >&5
1739sed 's/^/| /' conftest.$ac_ext >&5
1740
1741 ac_retval=$ac_status
1742fi
1743 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1745 as_fn_set_status $ac_retval
1746
1747} # ac_fn_c_try_run
1748
1749# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1750# -------------------------------------------------------
1751# Tests whether HEADER exists and can be compiled using the include files in
1752# INCLUDES, setting the cache variable VAR accordingly.
1753ac_fn_c_check_header_compile ()
1754{
1755 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1757$as_echo_n "checking for $2... " >&6; }
1758if eval \${$3+:} false; then :
1759 $as_echo_n "(cached) " >&6
1760else
1761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1762/* end confdefs.h. */
1763$4
1764#include <$2>
1765_ACEOF
1766if ac_fn_c_try_compile "$LINENO"; then :
1767 eval "$3=yes"
1768else
1769 eval "$3=no"
1770fi
1771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1777
1778} # ac_fn_c_check_header_compile
1779
1780# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1781# -------------------------------------------
1782# Tests whether TYPE exists after having included INCLUDES, setting cache
1783# variable VAR accordingly.
1784ac_fn_c_check_type ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
1789if eval \${$3+:} false; then :
1790 $as_echo_n "(cached) " >&6
1791else
1792 eval "$3=no"
1793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1794/* end confdefs.h. */
1795$4
1796int
1797main ()
1798{
1799if (sizeof ($2))
1800 return 0;
1801 ;
1802 return 0;
1803}
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809int
1810main ()
1811{
1812if (sizeof (($2)))
1813 return 0;
1814 ;
1815 return 0;
1816}
1817_ACEOF
1818if ac_fn_c_try_compile "$LINENO"; then :
1819
1820else
1821 eval "$3=yes"
1822fi
1823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1824fi
1825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1826fi
1827eval ac_res=\$$3
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1829$as_echo "$ac_res" >&6; }
1830 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1831
1832} # ac_fn_c_check_type
1833
1834# ac_fn_c_try_link LINENO
1835# -----------------------
1836# Try to link conftest.$ac_ext, and return whether this succeeded.
1837ac_fn_c_try_link ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 rm -f conftest.$ac_objext conftest$ac_exeext
1841 if { { ac_try="$ac_link"
1842case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_link") 2>conftest.err
1849 ac_status=$?
1850 if test -s conftest.err; then
1851 grep -v '^ *+' conftest.err >conftest.er1
1852 cat conftest.er1 >&5
1853 mv -f conftest.er1 conftest.err
1854 fi
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && {
1857 test -z "$ac_c_werror_flag" ||
1858 test ! -s conftest.err
1859 } && test -s conftest$ac_exeext && {
1860 test "$cross_compiling" = yes ||
1861 test -x conftest$ac_exeext
1862 }; then :
1863 ac_retval=0
1864else
1865 $as_echo "$as_me: failed program was:" >&5
1866sed 's/^/| /' conftest.$ac_ext >&5
1867
1868 ac_retval=1
1869fi
1870 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1871 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1872 # interfere with the next link command; also delete a directory that is
1873 # left behind by Apple's compiler. We do this before executing the actions.
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_link
1879
1880# ac_fn_c_check_func LINENO FUNC VAR
1881# ----------------------------------
1882# Tests whether FUNC exists, setting the cache variable VAR accordingly
1883ac_fn_c_check_func ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
1888if eval \${$3+:} false; then :
1889 $as_echo_n "(cached) " >&6
1890else
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1894 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1895#define $2 innocuous_$2
1896
1897/* System header to define __stub macros and hopefully few prototypes,
1898 which can conflict with char $2 (); below.
1899 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1900 <limits.h> exists even on freestanding compilers. */
1901
1902#ifdef __STDC__
1903# include <limits.h>
1904#else
1905# include <assert.h>
1906#endif
1907
1908#undef $2
1909
1910/* Override any GCC internal prototype to avoid an error.
1911 Use char because int might match the return type of a GCC
1912 builtin and then its argument prototype would still apply. */
1913#ifdef __cplusplus
1914extern "C"
1915#endif
1916char $2 ();
1917/* The GNU C library defines this for functions which it implements
1918 to always fail with ENOSYS. Some functions are actually named
1919 something starting with __ and the normal name is an alias. */
1920#if defined __stub_$2 || defined __stub___$2
1921choke me
1922#endif
1923
1924int
1925main ()
1926{
1927return $2 ();
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_link "$LINENO"; then :
1933 eval "$3=yes"
1934else
1935 eval "$3=no"
1936fi
1937rm -f core conftest.err conftest.$ac_objext \
1938 conftest$ac_exeext conftest.$ac_ext
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
1943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1944
1945} # ac_fn_c_check_func
1946
1947# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1948# ---------------------------------------------
1949# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1950# accordingly.
1951ac_fn_c_check_decl ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 as_decl_name=`echo $2|sed 's/ *(.*//'`
1955 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1957$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1958if eval \${$3+:} false; then :
1959 $as_echo_n "(cached) " >&6
1960else
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$4
1964int
1965main ()
1966{
1967#ifndef $as_decl_name
1968#ifdef __cplusplus
1969 (void) $as_decl_use;
1970#else
1971 (void) $as_decl_name;
1972#endif
1973#endif
1974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 eval "$3=yes"
1981else
1982 eval "$3=no"
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990
1991} # ac_fn_c_check_decl
1992
1993# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1994# ----------------------------------------------------
1995# Tries to find if the field MEMBER exists in type AGGR, after including
1996# INCLUDES, setting cache variable VAR accordingly.
1997ac_fn_c_check_member ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2001$as_echo_n "checking for $2.$3... " >&6; }
2002if eval \${$4+:} false; then :
2003 $as_echo_n "(cached) " >&6
2004else
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$5
2008int
2009main ()
2010{
2011static $2 ac_aggr;
2012if (ac_aggr.$3)
2013return 0;
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 eval "$4=yes"
2020else
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$5
2024int
2025main ()
2026{
2027static $2 ac_aggr;
2028if (sizeof ac_aggr.$3)
2029return 0;
2030 ;
2031 return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
2035 eval "$4=yes"
2036else
2037 eval "$4=no"
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042fi
2043eval ac_res=\$$4
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2045$as_echo "$ac_res" >&6; }
2046 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2047
2048} # ac_fn_c_check_member
2049
2050# ac_fn_cxx_try_link LINENO
2051# -------------------------
2052# Try to link conftest.$ac_ext, and return whether this succeeded.
2053ac_fn_cxx_try_link ()
2054{
2055 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2056 rm -f conftest.$ac_objext conftest$ac_exeext
2057 if { { ac_try="$ac_link"
2058case "(($ac_try" in
2059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2060 *) ac_try_echo=$ac_try;;
2061esac
2062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2063$as_echo "$ac_try_echo"; } >&5
2064 (eval "$ac_link") 2>conftest.err
2065 ac_status=$?
2066 if test -s conftest.err; then
2067 grep -v '^ *+' conftest.err >conftest.er1
2068 cat conftest.er1 >&5
2069 mv -f conftest.er1 conftest.err
2070 fi
2071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2072 test $ac_status = 0; } && {
2073 test -z "$ac_cxx_werror_flag" ||
2074 test ! -s conftest.err
2075 } && test -s conftest$ac_exeext && {
2076 test "$cross_compiling" = yes ||
2077 test -x conftest$ac_exeext
2078 }; then :
2079 ac_retval=0
2080else
2081 $as_echo "$as_me: failed program was:" >&5
2082sed 's/^/| /' conftest.$ac_ext >&5
2083
2084 ac_retval=1
2085fi
2086 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2087 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2088 # interfere with the next link command; also delete a directory that is
2089 # left behind by Apple's compiler. We do this before executing the actions.
2090 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2092 as_fn_set_status $ac_retval
2093
2094} # ac_fn_cxx_try_link
2095
2096# ac_fn_cxx_check_func LINENO FUNC VAR
2097# ------------------------------------
2098# Tests whether FUNC exists, setting the cache variable VAR accordingly
2099ac_fn_cxx_check_func ()
2100{
2101 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2103$as_echo_n "checking for $2... " >&6; }
2104if eval \${$3+:} false; then :
2105 $as_echo_n "(cached) " >&6
2106else
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108/* end confdefs.h. */
2109/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2110 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2111#define $2 innocuous_$2
2112
2113/* System header to define __stub macros and hopefully few prototypes,
2114 which can conflict with char $2 (); below.
2115 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2116 <limits.h> exists even on freestanding compilers. */
2117
2118#ifdef __STDC__
2119# include <limits.h>
2120#else
2121# include <assert.h>
2122#endif
2123
2124#undef $2
2125
2126/* Override any GCC internal prototype to avoid an error.
2127 Use char because int might match the return type of a GCC
2128 builtin and then its argument prototype would still apply. */
2129#ifdef __cplusplus
2130extern "C"
2131#endif
2132char $2 ();
2133/* The GNU C library defines this for functions which it implements
2134 to always fail with ENOSYS. Some functions are actually named
2135 something starting with __ and the normal name is an alias. */
2136#if defined __stub_$2 || defined __stub___$2
2137choke me
2138#endif
2139
2140int
2141main ()
2142{
2143return $2 ();
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_cxx_try_link "$LINENO"; then :
2149 eval "$3=yes"
2150else
2151 eval "$3=no"
2152fi
2153rm -f core conftest.err conftest.$ac_objext \
2154 conftest$ac_exeext conftest.$ac_ext
2155fi
2156eval ac_res=\$$3
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2158$as_echo "$ac_res" >&6; }
2159 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2160
2161} # ac_fn_cxx_check_func
2162
2163# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2164# --------------------------------------------
2165# Tries to find the compile-time value of EXPR in a program that includes
2166# INCLUDES, setting VAR accordingly. Returns whether the value could be
2167# computed
2168ac_fn_c_compute_int ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 if test "$cross_compiling" = yes; then
2172 # Depending upon the size, compute the lo and hi bounds.
2173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) >= 0)];
2180test_array [0] = 0;
2181return test_array [0];
2182
2183 ;
2184 return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_lo=0 ac_mid=0
2189 while :; do
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192$4
2193int
2194main ()
2195{
2196static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2197test_array [0] = 0;
2198return test_array [0];
2199
2200 ;
2201 return 0;
2202}
2203_ACEOF
2204if ac_fn_c_try_compile "$LINENO"; then :
2205 ac_hi=$ac_mid; break
2206else
2207 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2208 if test $ac_lo -le $ac_mid; then
2209 ac_lo= ac_hi=
2210 break
2211 fi
2212 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2213fi
2214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 done
2216else
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218/* end confdefs.h. */
2219$4
2220int
2221main ()
2222{
2223static int test_array [1 - 2 * !(($2) < 0)];
2224test_array [0] = 0;
2225return test_array [0];
2226
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_hi=-1 ac_mid=-1
2233 while :; do
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h. */
2236$4
2237int
2238main ()
2239{
2240static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2241test_array [0] = 0;
2242return test_array [0];
2243
2244 ;
2245 return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_compile "$LINENO"; then :
2249 ac_lo=$ac_mid; break
2250else
2251 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2252 if test $ac_mid -le $ac_hi; then
2253 ac_lo= ac_hi=
2254 break
2255 fi
2256 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2257fi
2258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259 done
2260else
2261 ac_lo= ac_hi=
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266# Binary search between lo and hi bounds.
2267while test "x$ac_lo" != "x$ac_hi"; do
2268 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2270/* end confdefs.h. */
2271$4
2272int
2273main ()
2274{
2275static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2276test_array [0] = 0;
2277return test_array [0];
2278
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_compile "$LINENO"; then :
2284 ac_hi=$ac_mid
2285else
2286 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289done
2290case $ac_lo in #((
2291?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2292'') ac_retval=1 ;;
2293esac
2294 else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$4
2298static long int longval () { return $2; }
2299static unsigned long int ulongval () { return $2; }
2300#include <stdio.h>
2301#include <stdlib.h>
2302int
2303main ()
2304{
2305
2306 FILE *f = fopen ("conftest.val", "w");
2307 if (! f)
2308 return 1;
2309 if (($2) < 0)
2310 {
2311 long int i = longval ();
2312 if (i != ($2))
2313 return 1;
2314 fprintf (f, "%ld", i);
2315 }
2316 else
2317 {
2318 unsigned long int i = ulongval ();
2319 if (i != ($2))
2320 return 1;
2321 fprintf (f, "%lu", i);
2322 }
2323 /* Do not output a trailing newline, as this causes \r\n confusion
2324 on some platforms. */
2325 return ferror (f) || fclose (f) != 0;
2326
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_run "$LINENO"; then :
2332 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2333else
2334 ac_retval=1
2335fi
2336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2337 conftest.$ac_objext conftest.beam conftest.$ac_ext
2338rm -f conftest.val
2339
2340 fi
2341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2342 as_fn_set_status $ac_retval
2343
2344} # ac_fn_c_compute_int
2345cat >config.log <<_ACEOF
2346This file contains any messages produced by compilers while
2347running configure, to aid debugging if configure makes a mistake.
2348
2349It was created by $as_me, which was
2350generated by GNU Autoconf 2.69. Invocation command line was
2351
2352 $ $0 $@
2353
2354_ACEOF
2355exec 5>>config.log
2356{
2357cat <<_ASUNAME
2358## --------- ##
2359## Platform. ##
2360## --------- ##
2361
2362hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2363uname -m = `(uname -m) 2>/dev/null || echo unknown`
2364uname -r = `(uname -r) 2>/dev/null || echo unknown`
2365uname -s = `(uname -s) 2>/dev/null || echo unknown`
2366uname -v = `(uname -v) 2>/dev/null || echo unknown`
2367
2368/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2369/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2370
2371/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2372/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2373/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2374/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2375/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2376/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2377/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2378
2379_ASUNAME
2380
2381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
2386 $as_echo "PATH: $as_dir"
2387 done
2388IFS=$as_save_IFS
2389
2390} >&5
2391
2392cat >&5 <<_ACEOF
2393
2394
2395## ----------- ##
2396## Core tests. ##
2397## ----------- ##
2398
2399_ACEOF
2400
2401
2402# Keep a trace of the command line.
2403# Strip out --no-create and --no-recursion so they do not pile up.
2404# Strip out --silent because we don't want to record it for future runs.
2405# Also quote any args containing shell meta-characters.
2406# Make two passes to allow for proper duplicate-argument suppression.
2407ac_configure_args=
2408ac_configure_args0=
2409ac_configure_args1=
2410ac_must_keep_next=false
2411for ac_pass in 1 2
2412do
2413 for ac_arg
2414 do
2415 case $ac_arg in
2416 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2417 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2418 | -silent | --silent | --silen | --sile | --sil)
2419 continue ;;
2420 *\'*)
2421 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2422 esac
2423 case $ac_pass in
2424 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2425 2)
2426 as_fn_append ac_configure_args1 " '$ac_arg'"
2427 if test $ac_must_keep_next = true; then
2428 ac_must_keep_next=false # Got value, back to normal.
2429 else
2430 case $ac_arg in
2431 *=* | --config-cache | -C | -disable-* | --disable-* \
2432 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2433 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2434 | -with-* | --with-* | -without-* | --without-* | --x)
2435 case "$ac_configure_args0 " in
2436 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2437 esac
2438 ;;
2439 -* ) ac_must_keep_next=true ;;
2440 esac
2441 fi
2442 as_fn_append ac_configure_args " '$ac_arg'"
2443 ;;
2444 esac
2445 done
2446done
2447{ ac_configure_args0=; unset ac_configure_args0;}
2448{ ac_configure_args1=; unset ac_configure_args1;}
2449
2450# When interrupted or exit'd, cleanup temporary files, and complete
2451# config.log. We remove comments because anyway the quotes in there
2452# would cause problems or look ugly.
2453# WARNING: Use '\'' to represent an apostrophe within the trap.
2454# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2455trap 'exit_status=$?
2456 # Save into config.log some information that might help in debugging.
2457 {
2458 echo
2459
2460 $as_echo "## ---------------- ##
2461## Cache variables. ##
2462## ---------------- ##"
2463 echo
2464 # The following way of writing the cache mishandles newlines in values,
2465(
2466 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2467 eval ac_val=\$$ac_var
2468 case $ac_val in #(
2469 *${as_nl}*)
2470 case $ac_var in #(
2471 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2472$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2473 esac
2474 case $ac_var in #(
2475 _ | IFS | as_nl) ;; #(
2476 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2477 *) { eval $ac_var=; unset $ac_var;} ;;
2478 esac ;;
2479 esac
2480 done
2481 (set) 2>&1 |
2482 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2483 *${as_nl}ac_space=\ *)
2484 sed -n \
2485 "s/'\''/'\''\\\\'\'''\''/g;
2486 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2487 ;; #(
2488 *)
2489 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2490 ;;
2491 esac |
2492 sort
2493)
2494 echo
2495
2496 $as_echo "## ----------------- ##
2497## Output variables. ##
2498## ----------------- ##"
2499 echo
2500 for ac_var in $ac_subst_vars
2501 do
2502 eval ac_val=\$$ac_var
2503 case $ac_val in
2504 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2505 esac
2506 $as_echo "$ac_var='\''$ac_val'\''"
2507 done | sort
2508 echo
2509
2510 if test -n "$ac_subst_files"; then
2511 $as_echo "## ------------------- ##
2512## File substitutions. ##
2513## ------------------- ##"
2514 echo
2515 for ac_var in $ac_subst_files
2516 do
2517 eval ac_val=\$$ac_var
2518 case $ac_val in
2519 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2520 esac
2521 $as_echo "$ac_var='\''$ac_val'\''"
2522 done | sort
2523 echo
2524 fi
2525
2526 if test -s confdefs.h; then
2527 $as_echo "## ----------- ##
2528## confdefs.h. ##
2529## ----------- ##"
2530 echo
2531 cat confdefs.h
2532 echo
2533 fi
2534 test "$ac_signal" != 0 &&
2535 $as_echo "$as_me: caught signal $ac_signal"
2536 $as_echo "$as_me: exit $exit_status"
2537 } >&5
2538 rm -f core *.core core.conftest.* &&
2539 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2540 exit $exit_status
2541' 0
2542for ac_signal in 1 2 13 15; do
2543 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2544done
2545ac_signal=0
2546
2547# confdefs.h avoids OS command line length limits that DEFS can exceed.
2548rm -f -r conftest* confdefs.h
2549
2550$as_echo "/* confdefs.h */" > confdefs.h
2551
2552# Predefined preprocessor variables.
2553
2554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_NAME "$PACKAGE_NAME"
2556_ACEOF
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2560_ACEOF
2561
2562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_VERSION "$PACKAGE_VERSION"
2564_ACEOF
2565
2566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_STRING "$PACKAGE_STRING"
2568_ACEOF
2569
2570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2572_ACEOF
2573
2574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_URL "$PACKAGE_URL"
2576_ACEOF
2577
2578
2579# Let the site file select an alternate cache file if it wants to.
2580# Prefer an explicitly selected file to automatically selected ones.
2581ac_site_file1=NONE
2582ac_site_file2=NONE
2583if test -n "$CONFIG_SITE"; then
2584 # We do not want a PATH search for config.site.
2585 case $CONFIG_SITE in #((
2586 -*) ac_site_file1=./$CONFIG_SITE;;
2587 */*) ac_site_file1=$CONFIG_SITE;;
2588 *) ac_site_file1=./$CONFIG_SITE;;
2589 esac
2590elif test "x$prefix" != xNONE; then
2591 ac_site_file1=$prefix/share/config.site
2592 ac_site_file2=$prefix/etc/config.site
2593else
2594 ac_site_file1=$ac_default_prefix/share/config.site
2595 ac_site_file2=$ac_default_prefix/etc/config.site
2596fi
2597for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2598do
2599 test "x$ac_site_file" = xNONE && continue
2600 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2602$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2603 sed 's/^/| /' "$ac_site_file" >&5
2604 . "$ac_site_file" \
2605 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2607as_fn_error $? "failed to load site script $ac_site_file
2608See \`config.log' for more details" "$LINENO" 5; }
2609 fi
2610done
2611
2612if test -r "$cache_file"; then
2613 # Some versions of bash will fail to source /dev/null (special files
2614 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2615 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2617$as_echo "$as_me: loading cache $cache_file" >&6;}
2618 case $cache_file in
2619 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2620 *) . "./$cache_file";;
2621 esac
2622 fi
2623else
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2625$as_echo "$as_me: creating cache $cache_file" >&6;}
2626 >$cache_file
2627fi
2628
2629as_fn_append ac_header_list " stdlib.h"
2630as_fn_append ac_header_list " unistd.h"
2631as_fn_append ac_header_list " sys/param.h"
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
2635for ac_var in $ac_precious_vars; do
2636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
2638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
2640 case $ac_old_set,$ac_new_set in
2641 set,)
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2644 ac_cache_corrupted=: ;;
2645 ,set)
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
2652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
2673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2688fi
2689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
2692
2693ac_ext=c
2694ac_cpp='$CPP $CPPFLAGS'
2695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
2698
2699
2700
2701
2702
2703ac_config_headers="$ac_config_headers config.h:config.in"
2704
2705
2706
2707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2708$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2709 # Check whether --enable-maintainer-mode was given.
2710if test "${enable_maintainer_mode+set}" = set; then :
2711 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2712else
2713 USE_MAINTAINER_MODE=no
2714fi
2715
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2717$as_echo "$USE_MAINTAINER_MODE" >&6; }
2718 if test $USE_MAINTAINER_MODE = yes; then
2719 MAINTAINER_MODE_TRUE=
2720 MAINTAINER_MODE_FALSE='#'
2721else
2722 MAINTAINER_MODE_TRUE='#'
2723 MAINTAINER_MODE_FALSE=
2724fi
2725
2726 MAINT=$MAINTAINER_MODE_TRUE
2727
2728
2729
2730ac_ext=c
2731ac_cpp='$CPP $CPPFLAGS'
2732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2734ac_compiler_gnu=$ac_cv_c_compiler_gnu
2735if test -n "$ac_tool_prefix"; then
2736 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2737set dummy ${ac_tool_prefix}gcc; ac_word=$2
2738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2739$as_echo_n "checking for $ac_word... " >&6; }
2740if ${ac_cv_prog_CC+:} false; then :
2741 $as_echo_n "(cached) " >&6
2742else
2743 if test -n "$CC"; then
2744 ac_cv_prog_CC="$CC" # Let the user override the test.
2745else
2746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2747for as_dir in $PATH
2748do
2749 IFS=$as_save_IFS
2750 test -z "$as_dir" && as_dir=.
2751 for ac_exec_ext in '' $ac_executable_extensions; do
2752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2753 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2755 break 2
2756 fi
2757done
2758 done
2759IFS=$as_save_IFS
2760
2761fi
2762fi
2763CC=$ac_cv_prog_CC
2764if test -n "$CC"; then
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2766$as_echo "$CC" >&6; }
2767else
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2769$as_echo "no" >&6; }
2770fi
2771
2772
2773fi
2774if test -z "$ac_cv_prog_CC"; then
2775 ac_ct_CC=$CC
2776 # Extract the first word of "gcc", so it can be a program name with args.
2777set dummy gcc; ac_word=$2
2778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2779$as_echo_n "checking for $ac_word... " >&6; }
2780if ${ac_cv_prog_ac_ct_CC+:} false; then :
2781 $as_echo_n "(cached) " >&6
2782else
2783 if test -n "$ac_ct_CC"; then
2784 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2785else
2786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2787for as_dir in $PATH
2788do
2789 IFS=$as_save_IFS
2790 test -z "$as_dir" && as_dir=.
2791 for ac_exec_ext in '' $ac_executable_extensions; do
2792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2793 ac_cv_prog_ac_ct_CC="gcc"
2794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2795 break 2
2796 fi
2797done
2798 done
2799IFS=$as_save_IFS
2800
2801fi
2802fi
2803ac_ct_CC=$ac_cv_prog_ac_ct_CC
2804if test -n "$ac_ct_CC"; then
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2806$as_echo "$ac_ct_CC" >&6; }
2807else
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2809$as_echo "no" >&6; }
2810fi
2811
2812 if test "x$ac_ct_CC" = x; then
2813 CC=""
2814 else
2815 case $cross_compiling:$ac_tool_warned in
2816yes:)
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2819ac_tool_warned=yes ;;
2820esac
2821 CC=$ac_ct_CC
2822 fi
2823else
2824 CC="$ac_cv_prog_CC"
2825fi
2826
2827if test -z "$CC"; then
2828 if test -n "$ac_tool_prefix"; then
2829 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2830set dummy ${ac_tool_prefix}cc; ac_word=$2
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2832$as_echo_n "checking for $ac_word... " >&6; }
2833if ${ac_cv_prog_CC+:} false; then :
2834 $as_echo_n "(cached) " >&6
2835else
2836 if test -n "$CC"; then
2837 ac_cv_prog_CC="$CC" # Let the user override the test.
2838else
2839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2840for as_dir in $PATH
2841do
2842 IFS=$as_save_IFS
2843 test -z "$as_dir" && as_dir=.
2844 for ac_exec_ext in '' $ac_executable_extensions; do
2845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2846 ac_cv_prog_CC="${ac_tool_prefix}cc"
2847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2848 break 2
2849 fi
2850done
2851 done
2852IFS=$as_save_IFS
2853
2854fi
2855fi
2856CC=$ac_cv_prog_CC
2857if test -n "$CC"; then
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2859$as_echo "$CC" >&6; }
2860else
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2862$as_echo "no" >&6; }
2863fi
2864
2865
2866 fi
2867fi
2868if test -z "$CC"; then
2869 # Extract the first word of "cc", so it can be a program name with args.
2870set dummy cc; ac_word=$2
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2872$as_echo_n "checking for $ac_word... " >&6; }
2873if ${ac_cv_prog_CC+:} false; then :
2874 $as_echo_n "(cached) " >&6
2875else
2876 if test -n "$CC"; then
2877 ac_cv_prog_CC="$CC" # Let the user override the test.
2878else
2879 ac_prog_rejected=no
2880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2881for as_dir in $PATH
2882do
2883 IFS=$as_save_IFS
2884 test -z "$as_dir" && as_dir=.
2885 for ac_exec_ext in '' $ac_executable_extensions; do
2886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2887 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2888 ac_prog_rejected=yes
2889 continue
2890 fi
2891 ac_cv_prog_CC="cc"
2892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2893 break 2
2894 fi
2895done
2896 done
2897IFS=$as_save_IFS
2898
2899if test $ac_prog_rejected = yes; then
2900 # We found a bogon in the path, so make sure we never use it.
2901 set dummy $ac_cv_prog_CC
2902 shift
2903 if test $# != 0; then
2904 # We chose a different compiler from the bogus one.
2905 # However, it has the same basename, so the bogon will be chosen
2906 # first if we set CC to just the basename; use the full file name.
2907 shift
2908 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2909 fi
2910fi
2911fi
2912fi
2913CC=$ac_cv_prog_CC
2914if test -n "$CC"; then
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2916$as_echo "$CC" >&6; }
2917else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919$as_echo "no" >&6; }
2920fi
2921
2922
2923fi
2924if test -z "$CC"; then
2925 if test -n "$ac_tool_prefix"; then
2926 for ac_prog in cl.exe
2927 do
2928 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2929set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2931$as_echo_n "checking for $ac_word... " >&6; }
2932if ${ac_cv_prog_CC+:} false; then :
2933 $as_echo_n "(cached) " >&6
2934else
2935 if test -n "$CC"; then
2936 ac_cv_prog_CC="$CC" # Let the user override the test.
2937else
2938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2939for as_dir in $PATH
2940do
2941 IFS=$as_save_IFS
2942 test -z "$as_dir" && as_dir=.
2943 for ac_exec_ext in '' $ac_executable_extensions; do
2944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2945 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2947 break 2
2948 fi
2949done
2950 done
2951IFS=$as_save_IFS
2952
2953fi
2954fi
2955CC=$ac_cv_prog_CC
2956if test -n "$CC"; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2958$as_echo "$CC" >&6; }
2959else
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2961$as_echo "no" >&6; }
2962fi
2963
2964
2965 test -n "$CC" && break
2966 done
2967fi
2968if test -z "$CC"; then
2969 ac_ct_CC=$CC
2970 for ac_prog in cl.exe
2971do
2972 # Extract the first word of "$ac_prog", so it can be a program name with args.
2973set dummy $ac_prog; ac_word=$2
2974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2975$as_echo_n "checking for $ac_word... " >&6; }
2976if ${ac_cv_prog_ac_ct_CC+:} false; then :
2977 $as_echo_n "(cached) " >&6
2978else
2979 if test -n "$ac_ct_CC"; then
2980 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2981else
2982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983for as_dir in $PATH
2984do
2985 IFS=$as_save_IFS
2986 test -z "$as_dir" && as_dir=.
2987 for ac_exec_ext in '' $ac_executable_extensions; do
2988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2989 ac_cv_prog_ac_ct_CC="$ac_prog"
2990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2991 break 2
2992 fi
2993done
2994 done
2995IFS=$as_save_IFS
2996
2997fi
2998fi
2999ac_ct_CC=$ac_cv_prog_ac_ct_CC
3000if test -n "$ac_ct_CC"; then
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3002$as_echo "$ac_ct_CC" >&6; }
3003else
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3005$as_echo "no" >&6; }
3006fi
3007
3008
3009 test -n "$ac_ct_CC" && break
3010done
3011
3012 if test "x$ac_ct_CC" = x; then
3013 CC=""
3014 else
3015 case $cross_compiling:$ac_tool_warned in
3016yes:)
3017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3019ac_tool_warned=yes ;;
3020esac
3021 CC=$ac_ct_CC
3022 fi
3023fi
3024
3025fi
3026
3027
3028test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3030as_fn_error $? "no acceptable C compiler found in \$PATH
3031See \`config.log' for more details" "$LINENO" 5; }
3032
3033# Provide some information about the compiler.
3034$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3035set X $ac_compile
3036ac_compiler=$2
3037for ac_option in --version -v -V -qversion; do
3038 { { ac_try="$ac_compiler $ac_option >&5"
3039case "(($ac_try" in
3040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3041 *) ac_try_echo=$ac_try;;
3042esac
3043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3044$as_echo "$ac_try_echo"; } >&5
3045 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3046 ac_status=$?
3047 if test -s conftest.err; then
3048 sed '10a\
3049... rest of stderr output deleted ...
3050 10q' conftest.err >conftest.er1
3051 cat conftest.er1 >&5
3052 fi
3053 rm -f conftest.er1 conftest.err
3054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3055 test $ac_status = 0; }
3056done
3057
3058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3059/* end confdefs.h. */
3060
3061int
3062main ()
3063{
3064
3065 ;
3066 return 0;
3067}
3068_ACEOF
3069ac_clean_files_save=$ac_clean_files
3070ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3071# Try to create an executable without -o first, disregard a.out.
3072# It will help us diagnose broken compilers, and finding out an intuition
3073# of exeext.
3074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3075$as_echo_n "checking whether the C compiler works... " >&6; }
3076ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3077
3078# The possible output files:
3079ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3080
3081ac_rmfiles=
3082for ac_file in $ac_files
3083do
3084 case $ac_file in
3085 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3086 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3087 esac
3088done
3089rm -f $ac_rmfiles
3090
3091if { { ac_try="$ac_link_default"
3092case "(($ac_try" in
3093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3094 *) ac_try_echo=$ac_try;;
3095esac
3096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3097$as_echo "$ac_try_echo"; } >&5
3098 (eval "$ac_link_default") 2>&5
3099 ac_status=$?
3100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3101 test $ac_status = 0; }; then :
3102 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3103# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3104# in a Makefile. We should not override ac_cv_exeext if it was cached,
3105# so that the user can short-circuit this test for compilers unknown to
3106# Autoconf.
3107for ac_file in $ac_files ''
3108do
3109 test -f "$ac_file" || continue
3110 case $ac_file in
3111 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3112 ;;
3113 [ab].out )
3114 # We found the default executable, but exeext='' is most
3115 # certainly right.
3116 break;;
3117 *.* )
3118 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3119 then :; else
3120 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3121 fi
3122 # We set ac_cv_exeext here because the later test for it is not
3123 # safe: cross compilers may not add the suffix if given an `-o'
3124 # argument, so we may need to know it at that point already.
3125 # Even if this section looks crufty: it has the advantage of
3126 # actually working.
3127 break;;
3128 * )
3129 break;;
3130 esac
3131done
3132test "$ac_cv_exeext" = no && ac_cv_exeext=
3133
3134else
3135 ac_file=''
3136fi
3137if test -z "$ac_file"; then :
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3139$as_echo "no" >&6; }
3140$as_echo "$as_me: failed program was:" >&5
3141sed 's/^/| /' conftest.$ac_ext >&5
3142
3143{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3145as_fn_error 77 "C compiler cannot create executables
3146See \`config.log' for more details" "$LINENO" 5; }
3147else
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3149$as_echo "yes" >&6; }
3150fi
3151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3152$as_echo_n "checking for C compiler default output file name... " >&6; }
3153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3154$as_echo "$ac_file" >&6; }
3155ac_exeext=$ac_cv_exeext
3156
3157rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3158ac_clean_files=$ac_clean_files_save
3159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3160$as_echo_n "checking for suffix of executables... " >&6; }
3161if { { ac_try="$ac_link"
3162case "(($ac_try" in
3163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3164 *) ac_try_echo=$ac_try;;
3165esac
3166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3167$as_echo "$ac_try_echo"; } >&5
3168 (eval "$ac_link") 2>&5
3169 ac_status=$?
3170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3171 test $ac_status = 0; }; then :
3172 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3173# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3174# work properly (i.e., refer to `conftest.exe'), while it won't with
3175# `rm'.
3176for ac_file in conftest.exe conftest conftest.*; do
3177 test -f "$ac_file" || continue
3178 case $ac_file in
3179 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3180 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3181 break;;
3182 * ) break;;
3183 esac
3184done
3185else
3186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3188as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3189See \`config.log' for more details" "$LINENO" 5; }
3190fi
3191rm -f conftest conftest$ac_cv_exeext
3192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3193$as_echo "$ac_cv_exeext" >&6; }
3194
3195rm -f conftest.$ac_ext
3196EXEEXT=$ac_cv_exeext
3197ac_exeext=$EXEEXT
3198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3199/* end confdefs.h. */
3200#include <stdio.h>
3201int
3202main ()
3203{
3204FILE *f = fopen ("conftest.out", "w");
3205 return ferror (f) || fclose (f) != 0;
3206
3207 ;
3208 return 0;
3209}
3210_ACEOF
3211ac_clean_files="$ac_clean_files conftest.out"
3212# Check that the compiler produces executables we can run. If not, either
3213# the compiler is broken, or we cross compile.
3214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3215$as_echo_n "checking whether we are cross compiling... " >&6; }
3216if test "$cross_compiling" != yes; then
3217 { { ac_try="$ac_link"
3218case "(($ac_try" in
3219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3220 *) ac_try_echo=$ac_try;;
3221esac
3222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3223$as_echo "$ac_try_echo"; } >&5
3224 (eval "$ac_link") 2>&5
3225 ac_status=$?
3226 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3227 test $ac_status = 0; }
3228 if { ac_try='./conftest$ac_cv_exeext'
3229 { { case "(($ac_try" in
3230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3231 *) ac_try_echo=$ac_try;;
3232esac
3233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3234$as_echo "$ac_try_echo"; } >&5
3235 (eval "$ac_try") 2>&5
3236 ac_status=$?
3237 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3238 test $ac_status = 0; }; }; then
3239 cross_compiling=no
3240 else
3241 if test "$cross_compiling" = maybe; then
3242 cross_compiling=yes
3243 else
3244 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3246as_fn_error $? "cannot run C compiled programs.
3247If you meant to cross compile, use \`--host'.
3248See \`config.log' for more details" "$LINENO" 5; }
3249 fi
3250 fi
3251fi
3252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3253$as_echo "$cross_compiling" >&6; }
3254
3255rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3256ac_clean_files=$ac_clean_files_save
3257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3258$as_echo_n "checking for suffix of object files... " >&6; }
3259if ${ac_cv_objext+:} false; then :
3260 $as_echo_n "(cached) " >&6
3261else
3262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3263/* end confdefs.h. */
3264
3265int
3266main ()
3267{
3268
3269 ;
3270 return 0;
3271}
3272_ACEOF
3273rm -f conftest.o conftest.obj
3274if { { ac_try="$ac_compile"
3275case "(($ac_try" in
3276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277 *) ac_try_echo=$ac_try;;
3278esac
3279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3280$as_echo "$ac_try_echo"; } >&5
3281 (eval "$ac_compile") 2>&5
3282 ac_status=$?
3283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3284 test $ac_status = 0; }; then :
3285 for ac_file in conftest.o conftest.obj conftest.*; do
3286 test -f "$ac_file" || continue;
3287 case $ac_file in
3288 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3289 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3290 break;;
3291 esac
3292done
3293else
3294 $as_echo "$as_me: failed program was:" >&5
3295sed 's/^/| /' conftest.$ac_ext >&5
3296
3297{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3299as_fn_error $? "cannot compute suffix of object files: cannot compile
3300See \`config.log' for more details" "$LINENO" 5; }
3301fi
3302rm -f conftest.$ac_cv_objext conftest.$ac_ext
3303fi
3304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3305$as_echo "$ac_cv_objext" >&6; }
3306OBJEXT=$ac_cv_objext
3307ac_objext=$OBJEXT
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3309$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3310if ${ac_cv_c_compiler_gnu+:} false; then :
3311 $as_echo_n "(cached) " >&6
3312else
3313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3314/* end confdefs.h. */
3315
3316int
3317main ()
3318{
3319#ifndef __GNUC__
3320 choke me
3321#endif
3322
3323 ;
3324 return 0;
3325}
3326_ACEOF
3327if ac_fn_c_try_compile "$LINENO"; then :
3328 ac_compiler_gnu=yes
3329else
3330 ac_compiler_gnu=no
3331fi
3332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3333ac_cv_c_compiler_gnu=$ac_compiler_gnu
3334
3335fi
3336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3337$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3338if test $ac_compiler_gnu = yes; then
3339 GCC=yes
3340else
3341 GCC=
3342fi
3343ac_test_CFLAGS=${CFLAGS+set}
3344ac_save_CFLAGS=$CFLAGS
3345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3346$as_echo_n "checking whether $CC accepts -g... " >&6; }
3347if ${ac_cv_prog_cc_g+:} false; then :
3348 $as_echo_n "(cached) " >&6
3349else
3350 ac_save_c_werror_flag=$ac_c_werror_flag
3351 ac_c_werror_flag=yes
3352 ac_cv_prog_cc_g=no
3353 CFLAGS="-g"
3354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3355/* end confdefs.h. */
3356
3357int
3358main ()
3359{
3360
3361 ;
3362 return 0;
3363}
3364_ACEOF
3365if ac_fn_c_try_compile "$LINENO"; then :
3366 ac_cv_prog_cc_g=yes
3367else
3368 CFLAGS=""
3369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3370/* end confdefs.h. */
3371
3372int
3373main ()
3374{
3375
3376 ;
3377 return 0;
3378}
3379_ACEOF
3380if ac_fn_c_try_compile "$LINENO"; then :
3381
3382else
3383 ac_c_werror_flag=$ac_save_c_werror_flag
3384 CFLAGS="-g"
3385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3386/* end confdefs.h. */
3387
3388int
3389main ()
3390{
3391
3392 ;
3393 return 0;
3394}
3395_ACEOF
3396if ac_fn_c_try_compile "$LINENO"; then :
3397 ac_cv_prog_cc_g=yes
3398fi
3399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3400fi
3401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3402fi
3403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3404 ac_c_werror_flag=$ac_save_c_werror_flag
3405fi
3406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3407$as_echo "$ac_cv_prog_cc_g" >&6; }
3408if test "$ac_test_CFLAGS" = set; then
3409 CFLAGS=$ac_save_CFLAGS
3410elif test $ac_cv_prog_cc_g = yes; then
3411 if test "$GCC" = yes; then
3412 CFLAGS="-g -O2"
3413 else
3414 CFLAGS="-g"
3415 fi
3416else
3417 if test "$GCC" = yes; then
3418 CFLAGS="-O2"
3419 else
3420 CFLAGS=
3421 fi
3422fi
3423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3424$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3425if ${ac_cv_prog_cc_c89+:} false; then :
3426 $as_echo_n "(cached) " >&6
3427else
3428 ac_cv_prog_cc_c89=no
3429ac_save_CC=$CC
3430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3431/* end confdefs.h. */
3432#include <stdarg.h>
3433#include <stdio.h>
3434struct stat;
3435/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3436struct buf { int x; };
3437FILE * (*rcsopen) (struct buf *, struct stat *, int);
3438static char *e (p, i)
3439 char **p;
3440 int i;
3441{
3442 return p[i];
3443}
3444static char *f (char * (*g) (char **, int), char **p, ...)
3445{
3446 char *s;
3447 va_list v;
3448 va_start (v,p);
3449 s = g (p, va_arg (v,int));
3450 va_end (v);
3451 return s;
3452}
3453
3454/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3455 function prototypes and stuff, but not '\xHH' hex character constants.
3456 These don't provoke an error unfortunately, instead are silently treated
3457 as 'x'. The following induces an error, until -std is added to get
3458 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3459 array size at least. It's necessary to write '\x00'==0 to get something
3460 that's true only with -std. */
3461int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3462
3463/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3464 inside strings and character constants. */
3465#define FOO(x) 'x'
3466int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3467
3468int test (int i, double x);
3469struct s1 {int (*f) (int a);};
3470struct s2 {int (*f) (double a);};
3471int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3472int argc;
3473char **argv;
3474int
3475main ()
3476{
3477return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3478 ;
3479 return 0;
3480}
3481_ACEOF
3482for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3483 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3484do
3485 CC="$ac_save_CC $ac_arg"
3486 if ac_fn_c_try_compile "$LINENO"; then :
3487 ac_cv_prog_cc_c89=$ac_arg
3488fi
3489rm -f core conftest.err conftest.$ac_objext
3490 test "x$ac_cv_prog_cc_c89" != "xno" && break
3491done
3492rm -f conftest.$ac_ext
3493CC=$ac_save_CC
3494
3495fi
3496# AC_CACHE_VAL
3497case "x$ac_cv_prog_cc_c89" in
3498 x)
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3500$as_echo "none needed" >&6; } ;;
3501 xno)
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3503$as_echo "unsupported" >&6; } ;;
3504 *)
3505 CC="$CC $ac_cv_prog_cc_c89"
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3507$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3508esac
3509if test "x$ac_cv_prog_cc_c89" != xno; then :
3510
3511fi
3512
3513ac_ext=c
3514ac_cpp='$CPP $CPPFLAGS'
3515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3516ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3517ac_compiler_gnu=$ac_cv_c_compiler_gnu
3518
3519ac_ext=cpp
3520ac_cpp='$CXXCPP $CPPFLAGS'
3521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3524if test -z "$CXX"; then
3525 if test -n "$CCC"; then
3526 CXX=$CCC
3527 else
3528 if test -n "$ac_tool_prefix"; then
3529 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3530 do
3531 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3534$as_echo_n "checking for $ac_word... " >&6; }
3535if ${ac_cv_prog_CXX+:} false; then :
3536 $as_echo_n "(cached) " >&6
3537else
3538 if test -n "$CXX"; then
3539 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3540else
3541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3542for as_dir in $PATH
3543do
3544 IFS=$as_save_IFS
3545 test -z "$as_dir" && as_dir=.
3546 for ac_exec_ext in '' $ac_executable_extensions; do
3547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3548 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3550 break 2
3551 fi
3552done
3553 done
3554IFS=$as_save_IFS
3555
3556fi
3557fi
3558CXX=$ac_cv_prog_CXX
3559if test -n "$CXX"; then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3561$as_echo "$CXX" >&6; }
3562else
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3564$as_echo "no" >&6; }
3565fi
3566
3567
3568 test -n "$CXX" && break
3569 done
3570fi
3571if test -z "$CXX"; then
3572 ac_ct_CXX=$CXX
3573 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3574do
3575 # Extract the first word of "$ac_prog", so it can be a program name with args.
3576set dummy $ac_prog; ac_word=$2
3577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
3579if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3580 $as_echo_n "(cached) " >&6
3581else
3582 if test -n "$ac_ct_CXX"; then
3583 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3584else
3585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3592 ac_cv_prog_ac_ct_CXX="$ac_prog"
3593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3594 break 2
3595 fi
3596done
3597 done
3598IFS=$as_save_IFS
3599
3600fi
3601fi
3602ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3603if test -n "$ac_ct_CXX"; then
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3605$as_echo "$ac_ct_CXX" >&6; }
3606else
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
3609fi
3610
3611
3612 test -n "$ac_ct_CXX" && break
3613done
3614
3615 if test "x$ac_ct_CXX" = x; then
3616 CXX="g++"
3617 else
3618 case $cross_compiling:$ac_tool_warned in
3619yes:)
3620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3622ac_tool_warned=yes ;;
3623esac
3624 CXX=$ac_ct_CXX
3625 fi
3626fi
3627
3628 fi
3629fi
3630# Provide some information about the compiler.
3631$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3632set X $ac_compile
3633ac_compiler=$2
3634for ac_option in --version -v -V -qversion; do
3635 { { ac_try="$ac_compiler $ac_option >&5"
3636case "(($ac_try" in
3637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3638 *) ac_try_echo=$ac_try;;
3639esac
3640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3641$as_echo "$ac_try_echo"; } >&5
3642 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3643 ac_status=$?
3644 if test -s conftest.err; then
3645 sed '10a\
3646... rest of stderr output deleted ...
3647 10q' conftest.err >conftest.er1
3648 cat conftest.er1 >&5
3649 fi
3650 rm -f conftest.er1 conftest.err
3651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3652 test $ac_status = 0; }
3653done
3654
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3656$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3657if ${ac_cv_cxx_compiler_gnu+:} false; then :
3658 $as_echo_n "(cached) " >&6
3659else
3660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3661/* end confdefs.h. */
3662
3663int
3664main ()
3665{
3666#ifndef __GNUC__
3667 choke me
3668#endif
3669
3670 ;
3671 return 0;
3672}
3673_ACEOF
3674if ac_fn_cxx_try_compile "$LINENO"; then :
3675 ac_compiler_gnu=yes
3676else
3677 ac_compiler_gnu=no
3678fi
3679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3680ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3681
3682fi
3683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3684$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3685if test $ac_compiler_gnu = yes; then
3686 GXX=yes
3687else
3688 GXX=
3689fi
3690ac_test_CXXFLAGS=${CXXFLAGS+set}
3691ac_save_CXXFLAGS=$CXXFLAGS
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3693$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3694if ${ac_cv_prog_cxx_g+:} false; then :
3695 $as_echo_n "(cached) " >&6
3696else
3697 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3698 ac_cxx_werror_flag=yes
3699 ac_cv_prog_cxx_g=no
3700 CXXFLAGS="-g"
3701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3702/* end confdefs.h. */
3703
3704int
3705main ()
3706{
3707
3708 ;
3709 return 0;
3710}
3711_ACEOF
3712if ac_fn_cxx_try_compile "$LINENO"; then :
3713 ac_cv_prog_cxx_g=yes
3714else
3715 CXXFLAGS=""
3716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3717/* end confdefs.h. */
3718
3719int
3720main ()
3721{
3722
3723 ;
3724 return 0;
3725}
3726_ACEOF
3727if ac_fn_cxx_try_compile "$LINENO"; then :
3728
3729else
3730 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3731 CXXFLAGS="-g"
3732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3733/* end confdefs.h. */
3734
3735int
3736main ()
3737{
3738
3739 ;
3740 return 0;
3741}
3742_ACEOF
3743if ac_fn_cxx_try_compile "$LINENO"; then :
3744 ac_cv_prog_cxx_g=yes
3745fi
3746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3747fi
3748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3749fi
3750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3751 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3752fi
3753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3754$as_echo "$ac_cv_prog_cxx_g" >&6; }
3755if test "$ac_test_CXXFLAGS" = set; then
3756 CXXFLAGS=$ac_save_CXXFLAGS
3757elif test $ac_cv_prog_cxx_g = yes; then
3758 if test "$GXX" = yes; then
3759 CXXFLAGS="-g -O2"
3760 else
3761 CXXFLAGS="-g"
3762 fi
3763else
3764 if test "$GXX" = yes; then
3765 CXXFLAGS="-O2"
3766 else
3767 CXXFLAGS=
3768 fi
3769fi
3770ac_ext=c
3771ac_cpp='$CPP $CPPFLAGS'
3772ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3773ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3774ac_compiler_gnu=$ac_cv_c_compiler_gnu
3775
3776
3777ac_ext=c
3778ac_cpp='$CPP $CPPFLAGS'
3779ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3780ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3781ac_compiler_gnu=$ac_cv_c_compiler_gnu
3782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3783$as_echo_n "checking how to run the C preprocessor... " >&6; }
3784# On Suns, sometimes $CPP names a directory.
3785if test -n "$CPP" && test -d "$CPP"; then
3786 CPP=
3787fi
3788if test -z "$CPP"; then
3789 if ${ac_cv_prog_CPP+:} false; then :
3790 $as_echo_n "(cached) " >&6
3791else
3792 # Double quotes because CPP needs to be expanded
3793 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3794 do
3795 ac_preproc_ok=false
3796for ac_c_preproc_warn_flag in '' yes
3797do
3798 # Use a header file that comes with gcc, so configuring glibc
3799 # with a fresh cross-compiler works.
3800 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3801 # <limits.h> exists even on freestanding compilers.
3802 # On the NeXT, cc -E runs the code through the compiler's parser,
3803 # not just through cpp. "Syntax error" is here to catch this case.
3804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3805/* end confdefs.h. */
3806#ifdef __STDC__
3807# include <limits.h>
3808#else
3809# include <assert.h>
3810#endif
3811 Syntax error
3812_ACEOF
3813if ac_fn_c_try_cpp "$LINENO"; then :
3814
3815else
3816 # Broken: fails on valid input.
3817continue
3818fi
3819rm -f conftest.err conftest.i conftest.$ac_ext
3820
3821 # OK, works on sane cases. Now check whether nonexistent headers
3822 # can be detected and how.
3823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3824/* end confdefs.h. */
3825#include <ac_nonexistent.h>
3826_ACEOF
3827if ac_fn_c_try_cpp "$LINENO"; then :
3828 # Broken: success on invalid input.
3829continue
3830else
3831 # Passes both tests.
3832ac_preproc_ok=:
3833break
3834fi
3835rm -f conftest.err conftest.i conftest.$ac_ext
3836
3837done
3838# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3839rm -f conftest.i conftest.err conftest.$ac_ext
3840if $ac_preproc_ok; then :
3841 break
3842fi
3843
3844 done
3845 ac_cv_prog_CPP=$CPP
3846
3847fi
3848 CPP=$ac_cv_prog_CPP
3849else
3850 ac_cv_prog_CPP=$CPP
3851fi
3852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3853$as_echo "$CPP" >&6; }
3854ac_preproc_ok=false
3855for ac_c_preproc_warn_flag in '' yes
3856do
3857 # Use a header file that comes with gcc, so configuring glibc
3858 # with a fresh cross-compiler works.
3859 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3860 # <limits.h> exists even on freestanding compilers.
3861 # On the NeXT, cc -E runs the code through the compiler's parser,
3862 # not just through cpp. "Syntax error" is here to catch this case.
3863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3864/* end confdefs.h. */
3865#ifdef __STDC__
3866# include <limits.h>
3867#else
3868# include <assert.h>
3869#endif
3870 Syntax error
3871_ACEOF
3872if ac_fn_c_try_cpp "$LINENO"; then :
3873
3874else
3875 # Broken: fails on valid input.
3876continue
3877fi
3878rm -f conftest.err conftest.i conftest.$ac_ext
3879
3880 # OK, works on sane cases. Now check whether nonexistent headers
3881 # can be detected and how.
3882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3883/* end confdefs.h. */
3884#include <ac_nonexistent.h>
3885_ACEOF
3886if ac_fn_c_try_cpp "$LINENO"; then :
3887 # Broken: success on invalid input.
3888continue
3889else
3890 # Passes both tests.
3891ac_preproc_ok=:
3892break
3893fi
3894rm -f conftest.err conftest.i conftest.$ac_ext
3895
3896done
3897# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3898rm -f conftest.i conftest.err conftest.$ac_ext
3899if $ac_preproc_ok; then :
3900
3901else
3902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3904as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3905See \`config.log' for more details" "$LINENO" 5; }
3906fi
3907
3908ac_ext=c
3909ac_cpp='$CPP $CPPFLAGS'
3910ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3911ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3912ac_compiler_gnu=$ac_cv_c_compiler_gnu
3913
3914
3915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3916$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3917if ${ac_cv_path_GREP+:} false; then :
3918 $as_echo_n "(cached) " >&6
3919else
3920 if test -z "$GREP"; then
3921 ac_path_GREP_found=false
3922 # Loop through the user's path and test for each of PROGNAME-LIST
3923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3924for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3925do
3926 IFS=$as_save_IFS
3927 test -z "$as_dir" && as_dir=.
3928 for ac_prog in grep ggrep; do
3929 for ac_exec_ext in '' $ac_executable_extensions; do
3930 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3931 as_fn_executable_p "$ac_path_GREP" || continue
3932# Check for GNU ac_path_GREP and select it if it is found.
3933 # Check for GNU $ac_path_GREP
3934case `"$ac_path_GREP" --version 2>&1` in
3935*GNU*)
3936 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3937*)
3938 ac_count=0
3939 $as_echo_n 0123456789 >"conftest.in"
3940 while :
3941 do
3942 cat "conftest.in" "conftest.in" >"conftest.tmp"
3943 mv "conftest.tmp" "conftest.in"
3944 cp "conftest.in" "conftest.nl"
3945 $as_echo 'GREP' >> "conftest.nl"
3946 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3947 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3948 as_fn_arith $ac_count + 1 && ac_count=$as_val
3949 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3950 # Best one so far, save it but keep looking for a better one
3951 ac_cv_path_GREP="$ac_path_GREP"
3952 ac_path_GREP_max=$ac_count
3953 fi
3954 # 10*(2^10) chars as input seems more than enough
3955 test $ac_count -gt 10 && break
3956 done
3957 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3958esac
3959
3960 $ac_path_GREP_found && break 3
3961 done
3962 done
3963 done
3964IFS=$as_save_IFS
3965 if test -z "$ac_cv_path_GREP"; then
3966 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3967 fi
3968else
3969 ac_cv_path_GREP=$GREP
3970fi
3971
3972fi
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3974$as_echo "$ac_cv_path_GREP" >&6; }
3975 GREP="$ac_cv_path_GREP"
3976
3977
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3979$as_echo_n "checking for egrep... " >&6; }
3980if ${ac_cv_path_EGREP+:} false; then :
3981 $as_echo_n "(cached) " >&6
3982else
3983 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3984 then ac_cv_path_EGREP="$GREP -E"
3985 else
3986 if test -z "$EGREP"; then
3987 ac_path_EGREP_found=false
3988 # Loop through the user's path and test for each of PROGNAME-LIST
3989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3991do
3992 IFS=$as_save_IFS
3993 test -z "$as_dir" && as_dir=.
3994 for ac_prog in egrep; do
3995 for ac_exec_ext in '' $ac_executable_extensions; do
3996 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3997 as_fn_executable_p "$ac_path_EGREP" || continue
3998# Check for GNU ac_path_EGREP and select it if it is found.
3999 # Check for GNU $ac_path_EGREP
4000case `"$ac_path_EGREP" --version 2>&1` in
4001*GNU*)
4002 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4003*)
4004 ac_count=0
4005 $as_echo_n 0123456789 >"conftest.in"
4006 while :
4007 do
4008 cat "conftest.in" "conftest.in" >"conftest.tmp"
4009 mv "conftest.tmp" "conftest.in"
4010 cp "conftest.in" "conftest.nl"
4011 $as_echo 'EGREP' >> "conftest.nl"
4012 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4013 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4014 as_fn_arith $ac_count + 1 && ac_count=$as_val
4015 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4016 # Best one so far, save it but keep looking for a better one
4017 ac_cv_path_EGREP="$ac_path_EGREP"
4018 ac_path_EGREP_max=$ac_count
4019 fi
4020 # 10*(2^10) chars as input seems more than enough
4021 test $ac_count -gt 10 && break
4022 done
4023 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4024esac
4025
4026 $ac_path_EGREP_found && break 3
4027 done
4028 done
4029 done
4030IFS=$as_save_IFS
4031 if test -z "$ac_cv_path_EGREP"; then
4032 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4033 fi
4034else
4035 ac_cv_path_EGREP=$EGREP
4036fi
4037
4038 fi
4039fi
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4041$as_echo "$ac_cv_path_EGREP" >&6; }
4042 EGREP="$ac_cv_path_EGREP"
4043
4044
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4046$as_echo_n "checking for ANSI C header files... " >&6; }
4047if ${ac_cv_header_stdc+:} false; then :
4048 $as_echo_n "(cached) " >&6
4049else
4050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
4052#include <stdlib.h>
4053#include <stdarg.h>
4054#include <string.h>
4055#include <float.h>
4056
4057int
4058main ()
4059{
4060
4061 ;
4062 return 0;
4063}
4064_ACEOF
4065if ac_fn_c_try_compile "$LINENO"; then :
4066 ac_cv_header_stdc=yes
4067else
4068 ac_cv_header_stdc=no
4069fi
4070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4071
4072if test $ac_cv_header_stdc = yes; then
4073 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4075/* end confdefs.h. */
4076#include <string.h>
4077
4078_ACEOF
4079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4080 $EGREP "memchr" >/dev/null 2>&1; then :
4081
4082else
4083 ac_cv_header_stdc=no
4084fi
4085rm -f conftest*
4086
4087fi
4088
4089if test $ac_cv_header_stdc = yes; then
4090 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4092/* end confdefs.h. */
4093#include <stdlib.h>
4094
4095_ACEOF
4096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4097 $EGREP "free" >/dev/null 2>&1; then :
4098
4099else
4100 ac_cv_header_stdc=no
4101fi
4102rm -f conftest*
4103
4104fi
4105
4106if test $ac_cv_header_stdc = yes; then
4107 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4108 if test "$cross_compiling" = yes; then :
4109 :
4110else
4111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4112/* end confdefs.h. */
4113#include <ctype.h>
4114#include <stdlib.h>
4115#if ((' ' & 0x0FF) == 0x020)
4116# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4117# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4118#else
4119# define ISLOWER(c) \
4120 (('a' <= (c) && (c) <= 'i') \
4121 || ('j' <= (c) && (c) <= 'r') \
4122 || ('s' <= (c) && (c) <= 'z'))
4123# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4124#endif
4125
4126#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4127int
4128main ()
4129{
4130 int i;
4131 for (i = 0; i < 256; i++)
4132 if (XOR (islower (i), ISLOWER (i))
4133 || toupper (i) != TOUPPER (i))
4134 return 2;
4135 return 0;
4136}
4137_ACEOF
4138if ac_fn_c_try_run "$LINENO"; then :
4139
4140else
4141 ac_cv_header_stdc=no
4142fi
4143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4144 conftest.$ac_objext conftest.beam conftest.$ac_ext
4145fi
4146
4147fi
4148fi
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4150$as_echo "$ac_cv_header_stdc" >&6; }
4151if test $ac_cv_header_stdc = yes; then
4152
4153$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4154
4155fi
4156
4157# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4158for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4159 inttypes.h stdint.h unistd.h
4160do :
4161 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4162ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4163"
4164if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4165 cat >>confdefs.h <<_ACEOF
4166#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4167_ACEOF
4168
4169fi
4170
4171done
4172
4173
4174
4175 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4176if test "x$ac_cv_header_minix_config_h" = xyes; then :
4177 MINIX=yes
4178else
4179 MINIX=
4180fi
4181
4182
4183 if test "$MINIX" = yes; then
4184
4185$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4186
4187
4188$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4189
4190
4191$as_echo "#define _MINIX 1" >>confdefs.h
4192
4193 fi
4194
4195
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4197$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4198if ${ac_cv_safe_to_define___extensions__+:} false; then :
4199 $as_echo_n "(cached) " >&6
4200else
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4202/* end confdefs.h. */
4203
4204# define __EXTENSIONS__ 1
4205 $ac_includes_default
4206int
4207main ()
4208{
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
4214if ac_fn_c_try_compile "$LINENO"; then :
4215 ac_cv_safe_to_define___extensions__=yes
4216else
4217 ac_cv_safe_to_define___extensions__=no
4218fi
4219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4220fi
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4222$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4223 test $ac_cv_safe_to_define___extensions__ = yes &&
4224 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4225
4226 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4227
4228 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4229
4230 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4231
4232 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4233
4234
4235
4236# Check whether --enable-largefile was given.
4237if test "${enable_largefile+set}" = set; then :
4238 enableval=$enable_largefile;
4239fi
4240
4241if test "$enable_largefile" != no; then
4242
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4244$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4245if ${ac_cv_sys_largefile_CC+:} false; then :
4246 $as_echo_n "(cached) " >&6
4247else
4248 ac_cv_sys_largefile_CC=no
4249 if test "$GCC" != yes; then
4250 ac_save_CC=$CC
4251 while :; do
4252 # IRIX 6.2 and later do not support large files by default,
4253 # so use the C compiler's -n32 option if that helps.
4254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4255/* end confdefs.h. */
4256#include <sys/types.h>
4257 /* Check that off_t can represent 2**63 - 1 correctly.
4258 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4259 since some C++ compilers masquerading as C compilers
4260 incorrectly reject 9223372036854775807. */
4261#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4262 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4263 && LARGE_OFF_T % 2147483647 == 1)
4264 ? 1 : -1];
4265int
4266main ()
4267{
4268
4269 ;
4270 return 0;
4271}
4272_ACEOF
4273 if ac_fn_c_try_compile "$LINENO"; then :
4274 break
4275fi
4276rm -f core conftest.err conftest.$ac_objext
4277 CC="$CC -n32"
4278 if ac_fn_c_try_compile "$LINENO"; then :
4279 ac_cv_sys_largefile_CC=' -n32'; break
4280fi
4281rm -f core conftest.err conftest.$ac_objext
4282 break
4283 done
4284 CC=$ac_save_CC
4285 rm -f conftest.$ac_ext
4286 fi
4287fi
4288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4289$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4290 if test "$ac_cv_sys_largefile_CC" != no; then
4291 CC=$CC$ac_cv_sys_largefile_CC
4292 fi
4293
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4295$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4296if ${ac_cv_sys_file_offset_bits+:} false; then :
4297 $as_echo_n "(cached) " >&6
4298else
4299 while :; do
4300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301/* end confdefs.h. */
4302#include <sys/types.h>
4303 /* Check that off_t can represent 2**63 - 1 correctly.
4304 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4305 since some C++ compilers masquerading as C compilers
4306 incorrectly reject 9223372036854775807. */
4307#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4308 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4309 && LARGE_OFF_T % 2147483647 == 1)
4310 ? 1 : -1];
4311int
4312main ()
4313{
4314
4315 ;
4316 return 0;
4317}
4318_ACEOF
4319if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_sys_file_offset_bits=no; break
4321fi
4322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4324/* end confdefs.h. */
4325#define _FILE_OFFSET_BITS 64
4326#include <sys/types.h>
4327 /* Check that off_t can represent 2**63 - 1 correctly.
4328 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4329 since some C++ compilers masquerading as C compilers
4330 incorrectly reject 9223372036854775807. */
4331#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4332 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4333 && LARGE_OFF_T % 2147483647 == 1)
4334 ? 1 : -1];
4335int
4336main ()
4337{
4338
4339 ;
4340 return 0;
4341}
4342_ACEOF
4343if ac_fn_c_try_compile "$LINENO"; then :
4344 ac_cv_sys_file_offset_bits=64; break
4345fi
4346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4347 ac_cv_sys_file_offset_bits=unknown
4348 break
4349done
4350fi
4351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4352$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4353case $ac_cv_sys_file_offset_bits in #(
4354 no | unknown) ;;
4355 *)
4356cat >>confdefs.h <<_ACEOF
4357#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4358_ACEOF
4359;;
4360esac
4361rm -rf conftest*
4362 if test $ac_cv_sys_file_offset_bits = unknown; then
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4364$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4365if ${ac_cv_sys_large_files+:} false; then :
4366 $as_echo_n "(cached) " >&6
4367else
4368 while :; do
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370/* end confdefs.h. */
4371#include <sys/types.h>
4372 /* Check that off_t can represent 2**63 - 1 correctly.
4373 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4374 since some C++ compilers masquerading as C compilers
4375 incorrectly reject 9223372036854775807. */
4376#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4377 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4378 && LARGE_OFF_T % 2147483647 == 1)
4379 ? 1 : -1];
4380int
4381main ()
4382{
4383
4384 ;
4385 return 0;
4386}
4387_ACEOF
4388if ac_fn_c_try_compile "$LINENO"; then :
4389 ac_cv_sys_large_files=no; break
4390fi
4391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4393/* end confdefs.h. */
4394#define _LARGE_FILES 1
4395#include <sys/types.h>
4396 /* Check that off_t can represent 2**63 - 1 correctly.
4397 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4398 since some C++ compilers masquerading as C compilers
4399 incorrectly reject 9223372036854775807. */
4400#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4401 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4402 && LARGE_OFF_T % 2147483647 == 1)
4403 ? 1 : -1];
4404int
4405main ()
4406{
4407
4408 ;
4409 return 0;
4410}
4411_ACEOF
4412if ac_fn_c_try_compile "$LINENO"; then :
4413 ac_cv_sys_large_files=1; break
4414fi
4415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4416 ac_cv_sys_large_files=unknown
4417 break
4418done
4419fi
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4421$as_echo "$ac_cv_sys_large_files" >&6; }
4422case $ac_cv_sys_large_files in #(
4423 no | unknown) ;;
4424 *)
4425cat >>confdefs.h <<_ACEOF
4426#define _LARGE_FILES $ac_cv_sys_large_files
4427_ACEOF
4428;;
4429esac
4430rm -rf conftest*
4431 fi
4432
4433
4434fi
4435
4436ac_aux_dir=
4437for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4438 if test -f "$ac_dir/install-sh"; then
4439 ac_aux_dir=$ac_dir
4440 ac_install_sh="$ac_aux_dir/install-sh -c"
4441 break
4442 elif test -f "$ac_dir/install.sh"; then
4443 ac_aux_dir=$ac_dir
4444 ac_install_sh="$ac_aux_dir/install.sh -c"
4445 break
4446 elif test -f "$ac_dir/shtool"; then
4447 ac_aux_dir=$ac_dir
4448 ac_install_sh="$ac_aux_dir/shtool install -c"
4449 break
4450 fi
4451done
4452if test -z "$ac_aux_dir"; then
4453 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4454fi
4455
4456# These three variables are undocumented and unsupported,
4457# and are intended to be withdrawn in a future Autoconf release.
4458# They can cause serious problems if a builder's source tree is in a directory
4459# whose full name contains unusual characters.
4460ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4461ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4462ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4463
4464
4465# Expand $ac_aux_dir to an absolute path.
4466am_aux_dir=`cd "$ac_aux_dir" && pwd`
4467
4468if test x"${install_sh+set}" != xset; then
4469 case $am_aux_dir in
4470 *\ * | *\ *)
4471 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4472 *)
4473 install_sh="\${SHELL} $am_aux_dir/install-sh"
4474 esac
4475fi
4476
4477# Installed binaries are usually stripped using 'strip' when the user
4478# run "make install-strip". However 'strip' might not be the right
4479# tool to use in cross-compilation environments, therefore Automake
4480# will honor the 'STRIP' environment variable to overrule this program.
4481if test "$cross_compiling" != no; then
4482 if test -n "$ac_tool_prefix"; then
4483 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4484set dummy ${ac_tool_prefix}strip; ac_word=$2
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
4487if ${ac_cv_prog_STRIP+:} false; then :
4488 $as_echo_n "(cached) " >&6
4489else
4490 if test -n "$STRIP"; then
4491 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4492else
4493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4494for as_dir in $PATH
4495do
4496 IFS=$as_save_IFS
4497 test -z "$as_dir" && as_dir=.
4498 for ac_exec_ext in '' $ac_executable_extensions; do
4499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4500 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4502 break 2
4503 fi
4504done
4505 done
4506IFS=$as_save_IFS
4507
4508fi
4509fi
4510STRIP=$ac_cv_prog_STRIP
4511if test -n "$STRIP"; then
4512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4513$as_echo "$STRIP" >&6; }
4514else
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
4517fi
4518
4519
4520fi
4521if test -z "$ac_cv_prog_STRIP"; then
4522 ac_ct_STRIP=$STRIP
4523 # Extract the first word of "strip", so it can be a program name with args.
4524set dummy strip; ac_word=$2
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4526$as_echo_n "checking for $ac_word... " >&6; }
4527if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4528 $as_echo_n "(cached) " >&6
4529else
4530 if test -n "$ac_ct_STRIP"; then
4531 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4532else
4533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4534for as_dir in $PATH
4535do
4536 IFS=$as_save_IFS
4537 test -z "$as_dir" && as_dir=.
4538 for ac_exec_ext in '' $ac_executable_extensions; do
4539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4540 ac_cv_prog_ac_ct_STRIP="strip"
4541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4542 break 2
4543 fi
4544done
4545 done
4546IFS=$as_save_IFS
4547
4548fi
4549fi
4550ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4551if test -n "$ac_ct_STRIP"; then
4552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4553$as_echo "$ac_ct_STRIP" >&6; }
4554else
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4556$as_echo "no" >&6; }
4557fi
4558
4559 if test "x$ac_ct_STRIP" = x; then
4560 STRIP=":"
4561 else
4562 case $cross_compiling:$ac_tool_warned in
4563yes:)
4564{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4565$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4566ac_tool_warned=yes ;;
4567esac
4568 STRIP=$ac_ct_STRIP
4569 fi
4570else
4571 STRIP="$ac_cv_prog_STRIP"
4572fi
4573
4574fi
4575INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4576
4577
4578# Make sure we can run config.sub.
4579$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4580 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4581
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4583$as_echo_n "checking build system type... " >&6; }
4584if ${ac_cv_build+:} false; then :
4585 $as_echo_n "(cached) " >&6
4586else
4587 ac_build_alias=$build_alias
4588test "x$ac_build_alias" = x &&
4589 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4590test "x$ac_build_alias" = x &&
4591 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4592ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4593 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4594
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4597$as_echo "$ac_cv_build" >&6; }
4598case $ac_cv_build in
4599*-*-*) ;;
4600*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4601esac
4602build=$ac_cv_build
4603ac_save_IFS=$IFS; IFS='-'
4604set x $ac_cv_build
4605shift
4606build_cpu=$1
4607build_vendor=$2
4608shift; shift
4609# Remember, the first character of IFS is used to create $*,
4610# except with old shells:
4611build_os=$*
4612IFS=$ac_save_IFS
4613case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4614
4615
4616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4617$as_echo_n "checking host system type... " >&6; }
4618if ${ac_cv_host+:} false; then :
4619 $as_echo_n "(cached) " >&6
4620else
4621 if test "x$host_alias" = x; then
4622 ac_cv_host=$ac_cv_build
4623else
4624 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4625 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4626fi
4627
4628fi
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4630$as_echo "$ac_cv_host" >&6; }
4631case $ac_cv_host in
4632*-*-*) ;;
4633*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4634esac
4635host=$ac_cv_host
4636ac_save_IFS=$IFS; IFS='-'
4637set x $ac_cv_host
4638shift
4639host_cpu=$1
4640host_vendor=$2
4641shift; shift
4642# Remember, the first character of IFS is used to create $*,
4643# except with old shells:
4644host_os=$*
4645IFS=$ac_save_IFS
4646case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4647
4648
4649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4650$as_echo_n "checking target system type... " >&6; }
4651if ${ac_cv_target+:} false; then :
4652 $as_echo_n "(cached) " >&6
4653else
4654 if test "x$target_alias" = x; then
4655 ac_cv_target=$ac_cv_host
4656else
4657 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4658 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4659fi
4660
4661fi
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4663$as_echo "$ac_cv_target" >&6; }
4664case $ac_cv_target in
4665*-*-*) ;;
4666*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4667esac
4668target=$ac_cv_target
4669ac_save_IFS=$IFS; IFS='-'
4670set x $ac_cv_target
4671shift
4672target_cpu=$1
4673target_vendor=$2
4674shift; shift
4675# Remember, the first character of IFS is used to create $*,
4676# except with old shells:
4677target_os=$*
4678IFS=$ac_save_IFS
4679case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4680
4681
4682# The aliases save the names the user supplied, while $host etc.
4683# will get canonicalized.
4684test -n "$target_alias" &&
4685 test "$program_prefix$program_suffix$program_transform_name" = \
4686 NONENONEs,x,x, &&
4687 program_prefix=${target_alias}-
4688
4689
4690# Find a good install program. We prefer a C program (faster),
4691# so one script is as good as another. But avoid the broken or
4692# incompatible versions:
4693# SysV /etc/install, /usr/sbin/install
4694# SunOS /usr/etc/install
4695# IRIX /sbin/install
4696# AIX /bin/install
4697# AmigaOS /C/install, which installs bootblocks on floppy discs
4698# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4699# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4700# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4701# OS/2's system install, which has a completely different semantic
4702# ./install, which can be erroneously created by make from ./install.sh.
4703# Reject install programs that cannot install multiple files.
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4705$as_echo_n "checking for a BSD-compatible install... " >&6; }
4706if test -z "$INSTALL"; then
4707if ${ac_cv_path_install+:} false; then :
4708 $as_echo_n "(cached) " >&6
4709else
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in $PATH
4712do
4713 IFS=$as_save_IFS
4714 test -z "$as_dir" && as_dir=.
4715 # Account for people who put trailing slashes in PATH elements.
4716case $as_dir/ in #((
4717 ./ | .// | /[cC]/* | \
4718 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4719 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4720 /usr/ucb/* ) ;;
4721 *)
4722 # OSF1 and SCO ODT 3.0 have their own names for install.
4723 # Don't use installbsd from OSF since it installs stuff as root
4724 # by default.
4725 for ac_prog in ginstall scoinst install; do
4726 for ac_exec_ext in '' $ac_executable_extensions; do
4727 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4728 if test $ac_prog = install &&
4729 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4730 # AIX install. It has an incompatible calling convention.
4731 :
4732 elif test $ac_prog = install &&
4733 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4734 # program-specific install script used by HP pwplus--don't use.
4735 :
4736 else
4737 rm -rf conftest.one conftest.two conftest.dir
4738 echo one > conftest.one
4739 echo two > conftest.two
4740 mkdir conftest.dir
4741 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4742 test -s conftest.one && test -s conftest.two &&
4743 test -s conftest.dir/conftest.one &&
4744 test -s conftest.dir/conftest.two
4745 then
4746 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4747 break 3
4748 fi
4749 fi
4750 fi
4751 done
4752 done
4753 ;;
4754esac
4755
4756 done
4757IFS=$as_save_IFS
4758
4759rm -rf conftest.one conftest.two conftest.dir
4760
4761fi
4762 if test "${ac_cv_path_install+set}" = set; then
4763 INSTALL=$ac_cv_path_install
4764 else
4765 # As a last resort, use the slow shell script. Don't cache a
4766 # value for INSTALL within a source directory, because that will
4767 # break other packages using the cache if that directory is
4768 # removed, or if the value is a relative name.
4769 INSTALL=$ac_install_sh
4770 fi
4771fi
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4773$as_echo "$INSTALL" >&6; }
4774
4775# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4776# It thinks the first close brace ends the variable substitution.
4777test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4778
4779test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4780
4781test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4782
4783if test -n "$ac_tool_prefix"; then
4784 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4785set dummy ${ac_tool_prefix}ar; ac_word=$2
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787$as_echo_n "checking for $ac_word... " >&6; }
4788if ${ac_cv_prog_AR+:} false; then :
4789 $as_echo_n "(cached) " >&6
4790else
4791 if test -n "$AR"; then
4792 ac_cv_prog_AR="$AR" # Let the user override the test.
4793else
4794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in $PATH
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
4799 for ac_exec_ext in '' $ac_executable_extensions; do
4800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4801 ac_cv_prog_AR="${ac_tool_prefix}ar"
4802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4803 break 2
4804 fi
4805done
4806 done
4807IFS=$as_save_IFS
4808
4809fi
4810fi
4811AR=$ac_cv_prog_AR
4812if test -n "$AR"; then
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4814$as_echo "$AR" >&6; }
4815else
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
4818fi
4819
4820
4821fi
4822if test -z "$ac_cv_prog_AR"; then
4823 ac_ct_AR=$AR
4824 # Extract the first word of "ar", so it can be a program name with args.
4825set dummy ar; ac_word=$2
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if ${ac_cv_prog_ac_ct_AR+:} false; then :
4829 $as_echo_n "(cached) " >&6
4830else
4831 if test -n "$ac_ct_AR"; then
4832 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4833else
4834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837 IFS=$as_save_IFS
4838 test -z "$as_dir" && as_dir=.
4839 for ac_exec_ext in '' $ac_executable_extensions; do
4840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4841 ac_cv_prog_ac_ct_AR="ar"
4842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843 break 2
4844 fi
4845done
4846 done
4847IFS=$as_save_IFS
4848
4849fi
4850fi
4851ac_ct_AR=$ac_cv_prog_ac_ct_AR
4852if test -n "$ac_ct_AR"; then
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4854$as_echo "$ac_ct_AR" >&6; }
4855else
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4857$as_echo "no" >&6; }
4858fi
4859
4860 if test "x$ac_ct_AR" = x; then
4861 AR=""
4862 else
4863 case $cross_compiling:$ac_tool_warned in
4864yes:)
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4867ac_tool_warned=yes ;;
4868esac
4869 AR=$ac_ct_AR
4870 fi
4871else
4872 AR="$ac_cv_prog_AR"
4873fi
4874
4875if test -n "$ac_tool_prefix"; then
4876 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4877set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879$as_echo_n "checking for $ac_word... " >&6; }
4880if ${ac_cv_prog_RANLIB+:} false; then :
4881 $as_echo_n "(cached) " >&6
4882else
4883 if test -n "$RANLIB"; then
4884 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4885else
4886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in $PATH
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
4891 for ac_exec_ext in '' $ac_executable_extensions; do
4892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4893 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895 break 2
4896 fi
4897done
4898 done
4899IFS=$as_save_IFS
4900
4901fi
4902fi
4903RANLIB=$ac_cv_prog_RANLIB
4904if test -n "$RANLIB"; then
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4906$as_echo "$RANLIB" >&6; }
4907else
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913fi
4914if test -z "$ac_cv_prog_RANLIB"; then
4915 ac_ct_RANLIB=$RANLIB
4916 # Extract the first word of "ranlib", so it can be a program name with args.
4917set dummy ranlib; ac_word=$2
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4919$as_echo_n "checking for $ac_word... " >&6; }
4920if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4921 $as_echo_n "(cached) " >&6
4922else
4923 if test -n "$ac_ct_RANLIB"; then
4924 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4925else
4926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927for as_dir in $PATH
4928do
4929 IFS=$as_save_IFS
4930 test -z "$as_dir" && as_dir=.
4931 for ac_exec_ext in '' $ac_executable_extensions; do
4932 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4933 ac_cv_prog_ac_ct_RANLIB="ranlib"
4934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935 break 2
4936 fi
4937done
4938 done
4939IFS=$as_save_IFS
4940
4941fi
4942fi
4943ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4944if test -n "$ac_ct_RANLIB"; then
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4946$as_echo "$ac_ct_RANLIB" >&6; }
4947else
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4949$as_echo "no" >&6; }
4950fi
4951
4952 if test "x$ac_ct_RANLIB" = x; then
4953 RANLIB=":"
4954 else
4955 case $cross_compiling:$ac_tool_warned in
4956yes:)
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4959ac_tool_warned=yes ;;
4960esac
4961 RANLIB=$ac_ct_RANLIB
4962 fi
4963else
4964 RANLIB="$ac_cv_prog_RANLIB"
4965fi
4966
4967
4968test "$program_prefix" != NONE &&
4969 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4970# Use a double $ so make ignores it.
4971test "$program_suffix" != NONE &&
4972 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4973# Double any \ or $.
4974# By default was `s,x,x', remove it if useless.
4975ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4976program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4977
4978
4979# We require a C++11 compiler. Check if one is available, and if
4980# necessary, set CXX_DIALECT to some -std=xxx switch.
4981
4982 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
4983 ac_ext=cpp
4984ac_cpp='$CXXCPP $CPPFLAGS'
4985ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4986ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4987ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4988 CXX_DIALECT=""
4989 ac_success=no
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4991$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4992if ${ax_cv_cxx_compile_cxx11+:} false; then :
4993 $as_echo_n "(cached) " >&6
4994else
4995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4996/* end confdefs.h. */
4997
4998
4999// If the compiler admits that it is not ready for C++11, why torture it?
5000// Hopefully, this will speed up the test.
5001
5002#ifndef __cplusplus
5003
5004#error "This is not a C++ compiler"
5005
5006#elif __cplusplus < 201103L
5007
5008#error "This is not a C++11 compiler"
5009
5010#else
5011
5012namespace cxx11
5013{
5014
5015 namespace test_static_assert
5016 {
5017
5018 template <typename T>
5019 struct check
5020 {
5021 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5022 };
5023
5024 }
5025
5026 namespace test_final_override
5027 {
5028
5029 struct Base
5030 {
5031 virtual void f() {}
5032 };
5033
5034 struct Derived : public Base
5035 {
5036 virtual void f() override {}
5037 };
5038
5039 }
5040
5041 namespace test_double_right_angle_brackets
5042 {
5043
5044 template < typename T >
5045 struct check {};
5046
5047 typedef check<void> single_type;
5048 typedef check<check<void>> double_type;
5049 typedef check<check<check<void>>> triple_type;
5050 typedef check<check<check<check<void>>>> quadruple_type;
5051
5052 }
5053
5054 namespace test_decltype
5055 {
5056
5057 int
5058 f()
5059 {
5060 int a = 1;
5061 decltype(a) b = 2;
5062 return a + b;
5063 }
5064
5065 }
5066
5067 namespace test_type_deduction
5068 {
5069
5070 template < typename T1, typename T2 >
5071 struct is_same
5072 {
5073 static const bool value = false;
5074 };
5075
5076 template < typename T >
5077 struct is_same<T, T>
5078 {
5079 static const bool value = true;
5080 };
5081
5082 template < typename T1, typename T2 >
5083 auto
5084 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5085 {
5086 return a1 + a2;
5087 }
5088
5089 int
5090 test(const int c, volatile int v)
5091 {
5092 static_assert(is_same<int, decltype(0)>::value == true, "");
5093 static_assert(is_same<int, decltype(c)>::value == false, "");
5094 static_assert(is_same<int, decltype(v)>::value == false, "");
5095 auto ac = c;
5096 auto av = v;
5097 auto sumi = ac + av + 'x';
5098 auto sumf = ac + av + 1.0;
5099 static_assert(is_same<int, decltype(ac)>::value == true, "");
5100 static_assert(is_same<int, decltype(av)>::value == true, "");
5101 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5102 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5103 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5104 return (sumf > 0.0) ? sumi : add(c, v);
5105 }
5106
5107 }
5108
5109 namespace test_noexcept
5110 {
5111
5112 int f() { return 0; }
5113 int g() noexcept { return 0; }
5114
5115 static_assert(noexcept(f()) == false, "");
5116 static_assert(noexcept(g()) == true, "");
5117
5118 }
5119
5120 namespace test_constexpr
5121 {
5122
5123 template < typename CharT >
5124 unsigned long constexpr
5125 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5126 {
5127 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5128 }
5129
5130 template < typename CharT >
5131 unsigned long constexpr
5132 strlen_c(const CharT *const s) noexcept
5133 {
5134 return strlen_c_r(s, 0UL);
5135 }
5136
5137 static_assert(strlen_c("") == 0UL, "");
5138 static_assert(strlen_c("1") == 1UL, "");
5139 static_assert(strlen_c("example") == 7UL, "");
5140 static_assert(strlen_c("another\0example") == 7UL, "");
5141
5142 }
5143
5144 namespace test_rvalue_references
5145 {
5146
5147 template < int N >
5148 struct answer
5149 {
5150 static constexpr int value = N;
5151 };
5152
5153 answer<1> f(int&) { return answer<1>(); }
5154 answer<2> f(const int&) { return answer<2>(); }
5155 answer<3> f(int&&) { return answer<3>(); }
5156
5157 void
5158 test()
5159 {
5160 int i = 0;
5161 const int c = 0;
5162 static_assert(decltype(f(i))::value == 1, "");
5163 static_assert(decltype(f(c))::value == 2, "");
5164 static_assert(decltype(f(0))::value == 3, "");
5165 }
5166
5167 }
5168
5169 namespace test_uniform_initialization
5170 {
5171
5172 struct test
5173 {
5174 static const int zero {};
5175 static const int one {1};
5176 };
5177
5178 static_assert(test::zero == 0, "");
5179 static_assert(test::one == 1, "");
5180
5181 }
5182
5183 namespace test_lambdas
5184 {
5185
5186 void
5187 test1()
5188 {
5189 auto lambda1 = [](){};
5190 auto lambda2 = lambda1;
5191 lambda1();
5192 lambda2();
5193 }
5194
5195 int
5196 test2()
5197 {
5198 auto a = [](int i, int j){ return i + j; }(1, 2);
5199 auto b = []() -> int { return '0'; }();
5200 auto c = [=](){ return a + b; }();
5201 auto d = [&](){ return c; }();
5202 auto e = [a, &b](int x) mutable {
5203 const auto identity = [](int y){ return y; };
5204 for (auto i = 0; i < a; ++i)
5205 a += b--;
5206 return x + identity(a + b);
5207 }(0);
5208 return a + b + c + d + e;
5209 }
5210
5211 int
5212 test3()
5213 {
5214 const auto nullary = [](){ return 0; };
5215 const auto unary = [](int x){ return x; };
5216 using nullary_t = decltype(nullary);
5217 using unary_t = decltype(unary);
5218 const auto higher1st = [](nullary_t f){ return f(); };
5219 const auto higher2nd = [unary](nullary_t f1){
5220 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5221 };
5222 return higher1st(nullary) + higher2nd(nullary)(unary);
5223 }
5224
5225 }
5226
5227 namespace test_variadic_templates
5228 {
5229
5230 template <int...>
5231 struct sum;
5232
5233 template <int N0, int... N1toN>
5234 struct sum<N0, N1toN...>
5235 {
5236 static constexpr auto value = N0 + sum<N1toN...>::value;
5237 };
5238
5239 template <>
5240 struct sum<>
5241 {
5242 static constexpr auto value = 0;
5243 };
5244
5245 static_assert(sum<>::value == 0, "");
5246 static_assert(sum<1>::value == 1, "");
5247 static_assert(sum<23>::value == 23, "");
5248 static_assert(sum<1, 2>::value == 3, "");
5249 static_assert(sum<5, 5, 11>::value == 21, "");
5250 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5251
5252 }
5253
5254 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5255 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5256 // because of this.
5257 namespace test_template_alias_sfinae
5258 {
5259
5260 struct foo {};
5261
5262 template<typename T>
5263 using member = typename T::member_type;
5264
5265 template<typename T>
5266 void func(...) {}
5267
5268 template<typename T>
5269 void func(member<T>*) {}
5270
5271 void test();
5272
5273 void test() { func<foo>(0); }
5274
5275 }
5276
5277} // namespace cxx11
5278
5279#endif // __cplusplus >= 201103L
5280
5281
5282
5283_ACEOF
5284if ac_fn_cxx_try_compile "$LINENO"; then :
5285 ax_cv_cxx_compile_cxx11=yes
5286else
5287 ax_cv_cxx_compile_cxx11=no
5288fi
5289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5290fi
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5292$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5293 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5294 ac_success=yes
5295 fi
5296
5297 if test x$ac_success = xno; then
5298 for alternative in ${ax_cxx_compile_alternatives}; do
5299 switch="-std=gnu++${alternative}"
5300 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5302$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5303if eval \${$cachevar+:} false; then :
5304 $as_echo_n "(cached) " >&6
5305else
5306 ac_save_CXX="$CXX"
5307 CXX="$CXX $switch"
5308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5309/* end confdefs.h. */
5310
5311
5312// If the compiler admits that it is not ready for C++11, why torture it?
5313// Hopefully, this will speed up the test.
5314
5315#ifndef __cplusplus
5316
5317#error "This is not a C++ compiler"
5318
5319#elif __cplusplus < 201103L
5320
5321#error "This is not a C++11 compiler"
5322
5323#else
5324
5325namespace cxx11
5326{
5327
5328 namespace test_static_assert
5329 {
5330
5331 template <typename T>
5332 struct check
5333 {
5334 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5335 };
5336
5337 }
5338
5339 namespace test_final_override
5340 {
5341
5342 struct Base
5343 {
5344 virtual void f() {}
5345 };
5346
5347 struct Derived : public Base
5348 {
5349 virtual void f() override {}
5350 };
5351
5352 }
5353
5354 namespace test_double_right_angle_brackets
5355 {
5356
5357 template < typename T >
5358 struct check {};
5359
5360 typedef check<void> single_type;
5361 typedef check<check<void>> double_type;
5362 typedef check<check<check<void>>> triple_type;
5363 typedef check<check<check<check<void>>>> quadruple_type;
5364
5365 }
5366
5367 namespace test_decltype
5368 {
5369
5370 int
5371 f()
5372 {
5373 int a = 1;
5374 decltype(a) b = 2;
5375 return a + b;
5376 }
5377
5378 }
5379
5380 namespace test_type_deduction
5381 {
5382
5383 template < typename T1, typename T2 >
5384 struct is_same
5385 {
5386 static const bool value = false;
5387 };
5388
5389 template < typename T >
5390 struct is_same<T, T>
5391 {
5392 static const bool value = true;
5393 };
5394
5395 template < typename T1, typename T2 >
5396 auto
5397 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5398 {
5399 return a1 + a2;
5400 }
5401
5402 int
5403 test(const int c, volatile int v)
5404 {
5405 static_assert(is_same<int, decltype(0)>::value == true, "");
5406 static_assert(is_same<int, decltype(c)>::value == false, "");
5407 static_assert(is_same<int, decltype(v)>::value == false, "");
5408 auto ac = c;
5409 auto av = v;
5410 auto sumi = ac + av + 'x';
5411 auto sumf = ac + av + 1.0;
5412 static_assert(is_same<int, decltype(ac)>::value == true, "");
5413 static_assert(is_same<int, decltype(av)>::value == true, "");
5414 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5415 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5416 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5417 return (sumf > 0.0) ? sumi : add(c, v);
5418 }
5419
5420 }
5421
5422 namespace test_noexcept
5423 {
5424
5425 int f() { return 0; }
5426 int g() noexcept { return 0; }
5427
5428 static_assert(noexcept(f()) == false, "");
5429 static_assert(noexcept(g()) == true, "");
5430
5431 }
5432
5433 namespace test_constexpr
5434 {
5435
5436 template < typename CharT >
5437 unsigned long constexpr
5438 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5439 {
5440 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5441 }
5442
5443 template < typename CharT >
5444 unsigned long constexpr
5445 strlen_c(const CharT *const s) noexcept
5446 {
5447 return strlen_c_r(s, 0UL);
5448 }
5449
5450 static_assert(strlen_c("") == 0UL, "");
5451 static_assert(strlen_c("1") == 1UL, "");
5452 static_assert(strlen_c("example") == 7UL, "");
5453 static_assert(strlen_c("another\0example") == 7UL, "");
5454
5455 }
5456
5457 namespace test_rvalue_references
5458 {
5459
5460 template < int N >
5461 struct answer
5462 {
5463 static constexpr int value = N;
5464 };
5465
5466 answer<1> f(int&) { return answer<1>(); }
5467 answer<2> f(const int&) { return answer<2>(); }
5468 answer<3> f(int&&) { return answer<3>(); }
5469
5470 void
5471 test()
5472 {
5473 int i = 0;
5474 const int c = 0;
5475 static_assert(decltype(f(i))::value == 1, "");
5476 static_assert(decltype(f(c))::value == 2, "");
5477 static_assert(decltype(f(0))::value == 3, "");
5478 }
5479
5480 }
5481
5482 namespace test_uniform_initialization
5483 {
5484
5485 struct test
5486 {
5487 static const int zero {};
5488 static const int one {1};
5489 };
5490
5491 static_assert(test::zero == 0, "");
5492 static_assert(test::one == 1, "");
5493
5494 }
5495
5496 namespace test_lambdas
5497 {
5498
5499 void
5500 test1()
5501 {
5502 auto lambda1 = [](){};
5503 auto lambda2 = lambda1;
5504 lambda1();
5505 lambda2();
5506 }
5507
5508 int
5509 test2()
5510 {
5511 auto a = [](int i, int j){ return i + j; }(1, 2);
5512 auto b = []() -> int { return '0'; }();
5513 auto c = [=](){ return a + b; }();
5514 auto d = [&](){ return c; }();
5515 auto e = [a, &b](int x) mutable {
5516 const auto identity = [](int y){ return y; };
5517 for (auto i = 0; i < a; ++i)
5518 a += b--;
5519 return x + identity(a + b);
5520 }(0);
5521 return a + b + c + d + e;
5522 }
5523
5524 int
5525 test3()
5526 {
5527 const auto nullary = [](){ return 0; };
5528 const auto unary = [](int x){ return x; };
5529 using nullary_t = decltype(nullary);
5530 using unary_t = decltype(unary);
5531 const auto higher1st = [](nullary_t f){ return f(); };
5532 const auto higher2nd = [unary](nullary_t f1){
5533 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5534 };
5535 return higher1st(nullary) + higher2nd(nullary)(unary);
5536 }
5537
5538 }
5539
5540 namespace test_variadic_templates
5541 {
5542
5543 template <int...>
5544 struct sum;
5545
5546 template <int N0, int... N1toN>
5547 struct sum<N0, N1toN...>
5548 {
5549 static constexpr auto value = N0 + sum<N1toN...>::value;
5550 };
5551
5552 template <>
5553 struct sum<>
5554 {
5555 static constexpr auto value = 0;
5556 };
5557
5558 static_assert(sum<>::value == 0, "");
5559 static_assert(sum<1>::value == 1, "");
5560 static_assert(sum<23>::value == 23, "");
5561 static_assert(sum<1, 2>::value == 3, "");
5562 static_assert(sum<5, 5, 11>::value == 21, "");
5563 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5564
5565 }
5566
5567 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5568 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5569 // because of this.
5570 namespace test_template_alias_sfinae
5571 {
5572
5573 struct foo {};
5574
5575 template<typename T>
5576 using member = typename T::member_type;
5577
5578 template<typename T>
5579 void func(...) {}
5580
5581 template<typename T>
5582 void func(member<T>*) {}
5583
5584 void test();
5585
5586 void test() { func<foo>(0); }
5587
5588 }
5589
5590} // namespace cxx11
5591
5592#endif // __cplusplus >= 201103L
5593
5594
5595
5596_ACEOF
5597if ac_fn_cxx_try_compile "$LINENO"; then :
5598 eval $cachevar=yes
5599else
5600 eval $cachevar=no
5601fi
5602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5603 CXX="$ac_save_CXX"
5604fi
5605eval ac_res=\$$cachevar
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5607$as_echo "$ac_res" >&6; }
5608 if eval test x\$$cachevar = xyes; then
5609 CXX_DIALECT="$switch"
5610 ac_success=yes
5611 break
5612 fi
5613 done
5614 fi
5615
5616 if test x$ac_success = xno; then
5617 for alternative in ${ax_cxx_compile_alternatives}; do
5618 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5619 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5621$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5622if eval \${$cachevar+:} false; then :
5623 $as_echo_n "(cached) " >&6
5624else
5625 ac_save_CXX="$CXX"
5626 CXX="$CXX $switch"
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628/* end confdefs.h. */
5629
5630
5631// If the compiler admits that it is not ready for C++11, why torture it?
5632// Hopefully, this will speed up the test.
5633
5634#ifndef __cplusplus
5635
5636#error "This is not a C++ compiler"
5637
5638#elif __cplusplus < 201103L
5639
5640#error "This is not a C++11 compiler"
5641
5642#else
5643
5644namespace cxx11
5645{
5646
5647 namespace test_static_assert
5648 {
5649
5650 template <typename T>
5651 struct check
5652 {
5653 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5654 };
5655
5656 }
5657
5658 namespace test_final_override
5659 {
5660
5661 struct Base
5662 {
5663 virtual void f() {}
5664 };
5665
5666 struct Derived : public Base
5667 {
5668 virtual void f() override {}
5669 };
5670
5671 }
5672
5673 namespace test_double_right_angle_brackets
5674 {
5675
5676 template < typename T >
5677 struct check {};
5678
5679 typedef check<void> single_type;
5680 typedef check<check<void>> double_type;
5681 typedef check<check<check<void>>> triple_type;
5682 typedef check<check<check<check<void>>>> quadruple_type;
5683
5684 }
5685
5686 namespace test_decltype
5687 {
5688
5689 int
5690 f()
5691 {
5692 int a = 1;
5693 decltype(a) b = 2;
5694 return a + b;
5695 }
5696
5697 }
5698
5699 namespace test_type_deduction
5700 {
5701
5702 template < typename T1, typename T2 >
5703 struct is_same
5704 {
5705 static const bool value = false;
5706 };
5707
5708 template < typename T >
5709 struct is_same<T, T>
5710 {
5711 static const bool value = true;
5712 };
5713
5714 template < typename T1, typename T2 >
5715 auto
5716 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5717 {
5718 return a1 + a2;
5719 }
5720
5721 int
5722 test(const int c, volatile int v)
5723 {
5724 static_assert(is_same<int, decltype(0)>::value == true, "");
5725 static_assert(is_same<int, decltype(c)>::value == false, "");
5726 static_assert(is_same<int, decltype(v)>::value == false, "");
5727 auto ac = c;
5728 auto av = v;
5729 auto sumi = ac + av + 'x';
5730 auto sumf = ac + av + 1.0;
5731 static_assert(is_same<int, decltype(ac)>::value == true, "");
5732 static_assert(is_same<int, decltype(av)>::value == true, "");
5733 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5734 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5735 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5736 return (sumf > 0.0) ? sumi : add(c, v);
5737 }
5738
5739 }
5740
5741 namespace test_noexcept
5742 {
5743
5744 int f() { return 0; }
5745 int g() noexcept { return 0; }
5746
5747 static_assert(noexcept(f()) == false, "");
5748 static_assert(noexcept(g()) == true, "");
5749
5750 }
5751
5752 namespace test_constexpr
5753 {
5754
5755 template < typename CharT >
5756 unsigned long constexpr
5757 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5758 {
5759 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5760 }
5761
5762 template < typename CharT >
5763 unsigned long constexpr
5764 strlen_c(const CharT *const s) noexcept
5765 {
5766 return strlen_c_r(s, 0UL);
5767 }
5768
5769 static_assert(strlen_c("") == 0UL, "");
5770 static_assert(strlen_c("1") == 1UL, "");
5771 static_assert(strlen_c("example") == 7UL, "");
5772 static_assert(strlen_c("another\0example") == 7UL, "");
5773
5774 }
5775
5776 namespace test_rvalue_references
5777 {
5778
5779 template < int N >
5780 struct answer
5781 {
5782 static constexpr int value = N;
5783 };
5784
5785 answer<1> f(int&) { return answer<1>(); }
5786 answer<2> f(const int&) { return answer<2>(); }
5787 answer<3> f(int&&) { return answer<3>(); }
5788
5789 void
5790 test()
5791 {
5792 int i = 0;
5793 const int c = 0;
5794 static_assert(decltype(f(i))::value == 1, "");
5795 static_assert(decltype(f(c))::value == 2, "");
5796 static_assert(decltype(f(0))::value == 3, "");
5797 }
5798
5799 }
5800
5801 namespace test_uniform_initialization
5802 {
5803
5804 struct test
5805 {
5806 static const int zero {};
5807 static const int one {1};
5808 };
5809
5810 static_assert(test::zero == 0, "");
5811 static_assert(test::one == 1, "");
5812
5813 }
5814
5815 namespace test_lambdas
5816 {
5817
5818 void
5819 test1()
5820 {
5821 auto lambda1 = [](){};
5822 auto lambda2 = lambda1;
5823 lambda1();
5824 lambda2();
5825 }
5826
5827 int
5828 test2()
5829 {
5830 auto a = [](int i, int j){ return i + j; }(1, 2);
5831 auto b = []() -> int { return '0'; }();
5832 auto c = [=](){ return a + b; }();
5833 auto d = [&](){ return c; }();
5834 auto e = [a, &b](int x) mutable {
5835 const auto identity = [](int y){ return y; };
5836 for (auto i = 0; i < a; ++i)
5837 a += b--;
5838 return x + identity(a + b);
5839 }(0);
5840 return a + b + c + d + e;
5841 }
5842
5843 int
5844 test3()
5845 {
5846 const auto nullary = [](){ return 0; };
5847 const auto unary = [](int x){ return x; };
5848 using nullary_t = decltype(nullary);
5849 using unary_t = decltype(unary);
5850 const auto higher1st = [](nullary_t f){ return f(); };
5851 const auto higher2nd = [unary](nullary_t f1){
5852 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5853 };
5854 return higher1st(nullary) + higher2nd(nullary)(unary);
5855 }
5856
5857 }
5858
5859 namespace test_variadic_templates
5860 {
5861
5862 template <int...>
5863 struct sum;
5864
5865 template <int N0, int... N1toN>
5866 struct sum<N0, N1toN...>
5867 {
5868 static constexpr auto value = N0 + sum<N1toN...>::value;
5869 };
5870
5871 template <>
5872 struct sum<>
5873 {
5874 static constexpr auto value = 0;
5875 };
5876
5877 static_assert(sum<>::value == 0, "");
5878 static_assert(sum<1>::value == 1, "");
5879 static_assert(sum<23>::value == 23, "");
5880 static_assert(sum<1, 2>::value == 3, "");
5881 static_assert(sum<5, 5, 11>::value == 21, "");
5882 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5883
5884 }
5885
5886 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5887 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5888 // because of this.
5889 namespace test_template_alias_sfinae
5890 {
5891
5892 struct foo {};
5893
5894 template<typename T>
5895 using member = typename T::member_type;
5896
5897 template<typename T>
5898 void func(...) {}
5899
5900 template<typename T>
5901 void func(member<T>*) {}
5902
5903 void test();
5904
5905 void test() { func<foo>(0); }
5906
5907 }
5908
5909} // namespace cxx11
5910
5911#endif // __cplusplus >= 201103L
5912
5913
5914
5915_ACEOF
5916if ac_fn_cxx_try_compile "$LINENO"; then :
5917 eval $cachevar=yes
5918else
5919 eval $cachevar=no
5920fi
5921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5922 CXX="$ac_save_CXX"
5923fi
5924eval ac_res=\$$cachevar
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5926$as_echo "$ac_res" >&6; }
5927 if eval test x\$$cachevar = xyes; then
5928 CXX_DIALECT="$switch"
5929 ac_success=yes
5930 break
5931 fi
5932 done
5933 if test x$ac_success = xyes; then
5934 break
5935 fi
5936 done
5937 fi
5938 ac_ext=c
5939ac_cpp='$CPP $CPPFLAGS'
5940ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5941ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5942ac_compiler_gnu=$ac_cv_c_compiler_gnu
5943
5944 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5945 if test x$ac_success = xno; then
5946 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5947 fi
5948 fi
5949 if test x$ac_success = xno; then
5950 HAVE_CXX11=0
5951 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5952$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5953 else
5954 HAVE_CXX11=1
5955
5956$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5957
5958 fi
5959
5960
5961
5962
5963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5964$as_echo_n "checking for ANSI C header files... " >&6; }
5965if ${ac_cv_header_stdc+:} false; then :
5966 $as_echo_n "(cached) " >&6
5967else
5968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5969/* end confdefs.h. */
5970#include <stdlib.h>
5971#include <stdarg.h>
5972#include <string.h>
5973#include <float.h>
5974
5975int
5976main ()
5977{
5978
5979 ;
5980 return 0;
5981}
5982_ACEOF
5983if ac_fn_c_try_compile "$LINENO"; then :
5984 ac_cv_header_stdc=yes
5985else
5986 ac_cv_header_stdc=no
5987fi
5988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5989
5990if test $ac_cv_header_stdc = yes; then
5991 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993/* end confdefs.h. */
5994#include <string.h>
5995
5996_ACEOF
5997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5998 $EGREP "memchr" >/dev/null 2>&1; then :
5999
6000else
6001 ac_cv_header_stdc=no
6002fi
6003rm -f conftest*
6004
6005fi
6006
6007if test $ac_cv_header_stdc = yes; then
6008 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6010/* end confdefs.h. */
6011#include <stdlib.h>
6012
6013_ACEOF
6014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6015 $EGREP "free" >/dev/null 2>&1; then :
6016
6017else
6018 ac_cv_header_stdc=no
6019fi
6020rm -f conftest*
6021
6022fi
6023
6024if test $ac_cv_header_stdc = yes; then
6025 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6026 if test "$cross_compiling" = yes; then :
6027 :
6028else
6029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6030/* end confdefs.h. */
6031#include <ctype.h>
6032#include <stdlib.h>
6033#if ((' ' & 0x0FF) == 0x020)
6034# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6035# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6036#else
6037# define ISLOWER(c) \
6038 (('a' <= (c) && (c) <= 'i') \
6039 || ('j' <= (c) && (c) <= 'r') \
6040 || ('s' <= (c) && (c) <= 'z'))
6041# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6042#endif
6043
6044#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6045int
6046main ()
6047{
6048 int i;
6049 for (i = 0; i < 256; i++)
6050 if (XOR (islower (i), ISLOWER (i))
6051 || toupper (i) != TOUPPER (i))
6052 return 2;
6053 return 0;
6054}
6055_ACEOF
6056if ac_fn_c_try_run "$LINENO"; then :
6057
6058else
6059 ac_cv_header_stdc=no
6060fi
6061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6062 conftest.$ac_objext conftest.beam conftest.$ac_ext
6063fi
6064
6065fi
6066fi
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6068$as_echo "$ac_cv_header_stdc" >&6; }
6069if test $ac_cv_header_stdc = yes; then
6070
6071$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6072
6073fi
6074
6075
6076ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6077if test "x$ac_cv_type_size_t" = xyes; then :
6078
6079else
6080
6081cat >>confdefs.h <<_ACEOF
6082#define size_t unsigned int
6083_ACEOF
6084
6085fi
6086
6087
6088
6089
6090 for ac_header in $ac_header_list
6091do :
6092 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6093ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6094"
6095if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6096 cat >>confdefs.h <<_ACEOF
6097#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6098_ACEOF
6099
6100fi
6101
6102done
6103
6104
6105
6106
6107
6108
6109
6110ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6111if test "x$ac_cv_type_pid_t" = xyes; then :
6112
6113else
6114
6115cat >>confdefs.h <<_ACEOF
6116#define pid_t int
6117_ACEOF
6118
6119fi
6120
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6122$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6123if ${ac_cv_path_SED+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125else
6126 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6127 for ac_i in 1 2 3 4 5 6 7; do
6128 ac_script="$ac_script$as_nl$ac_script"
6129 done
6130 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6131 { ac_script=; unset ac_script;}
6132 if test -z "$SED"; then
6133 ac_path_SED_found=false
6134 # Loop through the user's path and test for each of PROGNAME-LIST
6135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH
6137do
6138 IFS=$as_save_IFS
6139 test -z "$as_dir" && as_dir=.
6140 for ac_prog in sed gsed; do
6141 for ac_exec_ext in '' $ac_executable_extensions; do
6142 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6143 as_fn_executable_p "$ac_path_SED" || continue
6144# Check for GNU ac_path_SED and select it if it is found.
6145 # Check for GNU $ac_path_SED
6146case `"$ac_path_SED" --version 2>&1` in
6147*GNU*)
6148 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6149*)
6150 ac_count=0
6151 $as_echo_n 0123456789 >"conftest.in"
6152 while :
6153 do
6154 cat "conftest.in" "conftest.in" >"conftest.tmp"
6155 mv "conftest.tmp" "conftest.in"
6156 cp "conftest.in" "conftest.nl"
6157 $as_echo '' >> "conftest.nl"
6158 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6159 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6160 as_fn_arith $ac_count + 1 && ac_count=$as_val
6161 if test $ac_count -gt ${ac_path_SED_max-0}; then
6162 # Best one so far, save it but keep looking for a better one
6163 ac_cv_path_SED="$ac_path_SED"
6164 ac_path_SED_max=$ac_count
6165 fi
6166 # 10*(2^10) chars as input seems more than enough
6167 test $ac_count -gt 10 && break
6168 done
6169 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6170esac
6171
6172 $ac_path_SED_found && break 3
6173 done
6174 done
6175 done
6176IFS=$as_save_IFS
6177 if test -z "$ac_cv_path_SED"; then
6178 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6179 fi
6180else
6181 ac_cv_path_SED=$SED
6182fi
6183
6184fi
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6186$as_echo "$ac_cv_path_SED" >&6; }
6187 SED="$ac_cv_path_SED"
6188 rm -f conftest.sed
6189
6190
6191 if test "X$prefix" = "XNONE"; then
6192 acl_final_prefix="$ac_default_prefix"
6193 else
6194 acl_final_prefix="$prefix"
6195 fi
6196 if test "X$exec_prefix" = "XNONE"; then
6197 acl_final_exec_prefix='${prefix}'
6198 else
6199 acl_final_exec_prefix="$exec_prefix"
6200 fi
6201 acl_save_prefix="$prefix"
6202 prefix="$acl_final_prefix"
6203 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6204 prefix="$acl_save_prefix"
6205
6206
6207# Check whether --with-gnu-ld was given.
6208if test "${with_gnu_ld+set}" = set; then :
6209 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6210else
6211 with_gnu_ld=no
6212fi
6213
6214# Prepare PATH_SEPARATOR.
6215# The user is always right.
6216if test "${PATH_SEPARATOR+set}" != set; then
6217 echo "#! /bin/sh" >conf$$.sh
6218 echo "exit 0" >>conf$$.sh
6219 chmod +x conf$$.sh
6220 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6221 PATH_SEPARATOR=';'
6222 else
6223 PATH_SEPARATOR=:
6224 fi
6225 rm -f conf$$.sh
6226fi
6227ac_prog=ld
6228if test "$GCC" = yes; then
6229 # Check if gcc -print-prog-name=ld gives a path.
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6231$as_echo_n "checking for ld used by GCC... " >&6; }
6232 case $host in
6233 *-*-mingw*)
6234 # gcc leaves a trailing carriage return which upsets mingw
6235 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6236 *)
6237 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6238 esac
6239 case $ac_prog in
6240 # Accept absolute paths.
6241 [\\/]* | [A-Za-z]:[\\/]*)
6242 re_direlt='/[^/][^/]*/\.\./'
6243 # Canonicalize the path of ld
6244 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6245 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6246 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6247 done
6248 test -z "$LD" && LD="$ac_prog"
6249 ;;
6250 "")
6251 # If it fails, then pretend we aren't using GCC.
6252 ac_prog=ld
6253 ;;
6254 *)
6255 # If it is relative, then search for the first ld in PATH.
6256 with_gnu_ld=unknown
6257 ;;
6258 esac
6259elif test "$with_gnu_ld" = yes; then
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6261$as_echo_n "checking for GNU ld... " >&6; }
6262else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6264$as_echo_n "checking for non-GNU ld... " >&6; }
6265fi
6266if ${acl_cv_path_LD+:} false; then :
6267 $as_echo_n "(cached) " >&6
6268else
6269 if test -z "$LD"; then
6270 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6271 for ac_dir in $PATH; do
6272 test -z "$ac_dir" && ac_dir=.
6273 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6274 acl_cv_path_LD="$ac_dir/$ac_prog"
6275 # Check to see if the program is GNU ld. I'd rather use --version,
6276 # but apparently some GNU ld's only accept -v.
6277 # Break only if it was the GNU/non-GNU ld that we prefer.
6278 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6279 test "$with_gnu_ld" != no && break
6280 else
6281 test "$with_gnu_ld" != yes && break
6282 fi
6283 fi
6284 done
6285 IFS="$ac_save_ifs"
6286else
6287 acl_cv_path_LD="$LD" # Let the user override the test with a path.
6288fi
6289fi
6290
6291LD="$acl_cv_path_LD"
6292if test -n "$LD"; then
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6294$as_echo "$LD" >&6; }
6295else
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
6298fi
6299test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6301$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6302if ${acl_cv_prog_gnu_ld+:} false; then :
6303 $as_echo_n "(cached) " >&6
6304else
6305 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6306if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6307 acl_cv_prog_gnu_ld=yes
6308else
6309 acl_cv_prog_gnu_ld=no
6310fi
6311fi
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
6313$as_echo "$acl_cv_prog_gnu_ld" >&6; }
6314with_gnu_ld=$acl_cv_prog_gnu_ld
6315
6316
6317
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
6319$as_echo_n "checking for shared library run path origin... " >&6; }
6320if ${acl_cv_rpath+:} false; then :
6321 $as_echo_n "(cached) " >&6
6322else
6323
6324 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6325 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6326 . ./conftest.sh
6327 rm -f ./conftest.sh
6328 acl_cv_rpath=done
6329
6330fi
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
6332$as_echo "$acl_cv_rpath" >&6; }
6333 wl="$acl_cv_wl"
6334 libext="$acl_cv_libext"
6335 shlibext="$acl_cv_shlibext"
6336 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6337 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6338 hardcode_direct="$acl_cv_hardcode_direct"
6339 hardcode_minus_L="$acl_cv_hardcode_minus_L"
6340 # Check whether --enable-rpath was given.
6341if test "${enable_rpath+set}" = set; then :
6342 enableval=$enable_rpath; :
6343else
6344 enable_rpath=yes
6345fi
6346
6347
6348
6349 # Set the 'development' global.
6350 . $srcdir/../bfd/development.sh
6351
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6353$as_echo_n "checking for ANSI C header files... " >&6; }
6354if ${ac_cv_header_stdc+:} false; then :
6355 $as_echo_n "(cached) " >&6
6356else
6357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6358/* end confdefs.h. */
6359#include <stdlib.h>
6360#include <stdarg.h>
6361#include <string.h>
6362#include <float.h>
6363
6364int
6365main ()
6366{
6367
6368 ;
6369 return 0;
6370}
6371_ACEOF
6372if ac_fn_c_try_compile "$LINENO"; then :
6373 ac_cv_header_stdc=yes
6374else
6375 ac_cv_header_stdc=no
6376fi
6377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6378
6379if test $ac_cv_header_stdc = yes; then
6380 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6382/* end confdefs.h. */
6383#include <string.h>
6384
6385_ACEOF
6386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6387 $EGREP "memchr" >/dev/null 2>&1; then :
6388
6389else
6390 ac_cv_header_stdc=no
6391fi
6392rm -f conftest*
6393
6394fi
6395
6396if test $ac_cv_header_stdc = yes; then
6397 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6399/* end confdefs.h. */
6400#include <stdlib.h>
6401
6402_ACEOF
6403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6404 $EGREP "free" >/dev/null 2>&1; then :
6405
6406else
6407 ac_cv_header_stdc=no
6408fi
6409rm -f conftest*
6410
6411fi
6412
6413if test $ac_cv_header_stdc = yes; then
6414 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6415 if test "$cross_compiling" = yes; then :
6416 :
6417else
6418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6419/* end confdefs.h. */
6420#include <ctype.h>
6421#include <stdlib.h>
6422#if ((' ' & 0x0FF) == 0x020)
6423# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6424# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6425#else
6426# define ISLOWER(c) \
6427 (('a' <= (c) && (c) <= 'i') \
6428 || ('j' <= (c) && (c) <= 'r') \
6429 || ('s' <= (c) && (c) <= 'z'))
6430# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6431#endif
6432
6433#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6434int
6435main ()
6436{
6437 int i;
6438 for (i = 0; i < 256; i++)
6439 if (XOR (islower (i), ISLOWER (i))
6440 || toupper (i) != TOUPPER (i))
6441 return 2;
6442 return 0;
6443}
6444_ACEOF
6445if ac_fn_c_try_run "$LINENO"; then :
6446
6447else
6448 ac_cv_header_stdc=no
6449fi
6450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6451 conftest.$ac_objext conftest.beam conftest.$ac_ext
6452fi
6453
6454fi
6455fi
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6457$as_echo "$ac_cv_header_stdc" >&6; }
6458if test $ac_cv_header_stdc = yes; then
6459
6460$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6461
6462fi
6463
6464 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6465# for constant arguments. Useless!
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6467$as_echo_n "checking for working alloca.h... " >&6; }
6468if ${ac_cv_working_alloca_h+:} false; then :
6469 $as_echo_n "(cached) " >&6
6470else
6471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472/* end confdefs.h. */
6473#include <alloca.h>
6474int
6475main ()
6476{
6477char *p = (char *) alloca (2 * sizeof (int));
6478 if (p) return 0;
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483if ac_fn_c_try_link "$LINENO"; then :
6484 ac_cv_working_alloca_h=yes
6485else
6486 ac_cv_working_alloca_h=no
6487fi
6488rm -f core conftest.err conftest.$ac_objext \
6489 conftest$ac_exeext conftest.$ac_ext
6490fi
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6492$as_echo "$ac_cv_working_alloca_h" >&6; }
6493if test $ac_cv_working_alloca_h = yes; then
6494
6495$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6496
6497fi
6498
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6500$as_echo_n "checking for alloca... " >&6; }
6501if ${ac_cv_func_alloca_works+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6505/* end confdefs.h. */
6506#ifdef __GNUC__
6507# define alloca __builtin_alloca
6508#else
6509# ifdef _MSC_VER
6510# include <malloc.h>
6511# define alloca _alloca
6512# else
6513# ifdef HAVE_ALLOCA_H
6514# include <alloca.h>
6515# else
6516# ifdef _AIX
6517 #pragma alloca
6518# else
6519# ifndef alloca /* predefined by HP cc +Olibcalls */
6520void *alloca (size_t);
6521# endif
6522# endif
6523# endif
6524# endif
6525#endif
6526
6527int
6528main ()
6529{
6530char *p = (char *) alloca (1);
6531 if (p) return 0;
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536if ac_fn_c_try_link "$LINENO"; then :
6537 ac_cv_func_alloca_works=yes
6538else
6539 ac_cv_func_alloca_works=no
6540fi
6541rm -f core conftest.err conftest.$ac_objext \
6542 conftest$ac_exeext conftest.$ac_ext
6543fi
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6545$as_echo "$ac_cv_func_alloca_works" >&6; }
6546
6547if test $ac_cv_func_alloca_works = yes; then
6548
6549$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6550
6551else
6552 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6553# that cause trouble. Some versions do not even contain alloca or
6554# contain a buggy version. If you still want to use their alloca,
6555# use ar to extract alloca.o from them instead of compiling alloca.c.
6556
6557ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6558
6559$as_echo "#define C_ALLOCA 1" >>confdefs.h
6560
6561
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6563$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6564if ${ac_cv_os_cray+:} false; then :
6565 $as_echo_n "(cached) " >&6
6566else
6567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6568/* end confdefs.h. */
6569#if defined CRAY && ! defined CRAY2
6570webecray
6571#else
6572wenotbecray
6573#endif
6574
6575_ACEOF
6576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6577 $EGREP "webecray" >/dev/null 2>&1; then :
6578 ac_cv_os_cray=yes
6579else
6580 ac_cv_os_cray=no
6581fi
6582rm -f conftest*
6583
6584fi
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6586$as_echo "$ac_cv_os_cray" >&6; }
6587if test $ac_cv_os_cray = yes; then
6588 for ac_func in _getb67 GETB67 getb67; do
6589 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6590ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6591if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6592
6593cat >>confdefs.h <<_ACEOF
6594#define CRAY_STACKSEG_END $ac_func
6595_ACEOF
6596
6597 break
6598fi
6599
6600 done
6601fi
6602
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6604$as_echo_n "checking stack direction for C alloca... " >&6; }
6605if ${ac_cv_c_stack_direction+:} false; then :
6606 $as_echo_n "(cached) " >&6
6607else
6608 if test "$cross_compiling" = yes; then :
6609 ac_cv_c_stack_direction=0
6610else
6611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6612/* end confdefs.h. */
6613$ac_includes_default
6614int
6615find_stack_direction (int *addr, int depth)
6616{
6617 int dir, dummy = 0;
6618 if (! addr)
6619 addr = &dummy;
6620 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6621 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6622 return dir + dummy;
6623}
6624
6625int
6626main (int argc, char **argv)
6627{
6628 return find_stack_direction (0, argc + !argv + 20) < 0;
6629}
6630_ACEOF
6631if ac_fn_c_try_run "$LINENO"; then :
6632 ac_cv_c_stack_direction=1
6633else
6634 ac_cv_c_stack_direction=-1
6635fi
6636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6637 conftest.$ac_objext conftest.beam conftest.$ac_ext
6638fi
6639
6640fi
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6642$as_echo "$ac_cv_c_stack_direction" >&6; }
6643cat >>confdefs.h <<_ACEOF
6644#define STACK_DIRECTION $ac_cv_c_stack_direction
6645_ACEOF
6646
6647
6648fi
6649
6650
6651 WIN32APILIBS=
6652 case ${host} in
6653 *mingw32*)
6654
6655$as_echo "#define USE_WIN32API 1" >>confdefs.h
6656
6657 WIN32APILIBS="-lws2_32"
6658 ;;
6659 esac
6660
6661
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
6663$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
6664if ${am_cv_langinfo_codeset+:} false; then :
6665 $as_echo_n "(cached) " >&6
6666else
6667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6668/* end confdefs.h. */
6669#include <langinfo.h>
6670int
6671main ()
6672{
6673char* cs = nl_langinfo(CODESET);
6674 ;
6675 return 0;
6676}
6677_ACEOF
6678if ac_fn_c_try_link "$LINENO"; then :
6679 am_cv_langinfo_codeset=yes
6680else
6681 am_cv_langinfo_codeset=no
6682fi
6683rm -f core conftest.err conftest.$ac_objext \
6684 conftest$ac_exeext conftest.$ac_ext
6685
6686fi
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
6688$as_echo "$am_cv_langinfo_codeset" >&6; }
6689 if test $am_cv_langinfo_codeset = yes; then
6690
6691$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6692
6693 fi
6694
6695
6696 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 sys/procfs.h proc_service.h
6697do :
6698 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6699ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6700if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6701 cat >>confdefs.h <<_ACEOF
6702#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6703_ACEOF
6704
6705fi
6706
6707done
6708
6709
6710
6711for ac_func in getpagesize
6712do :
6713 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
6714if test "x$ac_cv_func_getpagesize" = xyes; then :
6715 cat >>confdefs.h <<_ACEOF
6716#define HAVE_GETPAGESIZE 1
6717_ACEOF
6718
6719fi
6720done
6721
6722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
6723$as_echo_n "checking for working mmap... " >&6; }
6724if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
6725 $as_echo_n "(cached) " >&6
6726else
6727 if test "$cross_compiling" = yes; then :
6728 ac_cv_func_mmap_fixed_mapped=no
6729else
6730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6731/* end confdefs.h. */
6732$ac_includes_default
6733/* malloc might have been renamed as rpl_malloc. */
6734#undef malloc
6735
6736/* Thanks to Mike Haertel and Jim Avera for this test.
6737 Here is a matrix of mmap possibilities:
6738 mmap private not fixed
6739 mmap private fixed at somewhere currently unmapped
6740 mmap private fixed at somewhere already mapped
6741 mmap shared not fixed
6742 mmap shared fixed at somewhere currently unmapped
6743 mmap shared fixed at somewhere already mapped
6744 For private mappings, we should verify that changes cannot be read()
6745 back from the file, nor mmap's back from the file at a different
6746 address. (There have been systems where private was not correctly
6747 implemented like the infamous i386 svr4.0, and systems where the
6748 VM page cache was not coherent with the file system buffer cache
6749 like early versions of FreeBSD and possibly contemporary NetBSD.)
6750 For shared mappings, we should conversely verify that changes get
6751 propagated back to all the places they're supposed to be.
6752
6753 Grep wants private fixed already mapped.
6754 The main things grep needs to know about mmap are:
6755 * does it exist and is it safe to write into the mmap'd area
6756 * how to use it (BSD variants) */
6757
6758#include <fcntl.h>
6759#include <sys/mman.h>
6760
6761#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
6762char *malloc ();
6763#endif
6764
6765/* This mess was copied from the GNU getpagesize.h. */
6766#ifndef HAVE_GETPAGESIZE
6767# ifdef _SC_PAGESIZE
6768# define getpagesize() sysconf(_SC_PAGESIZE)
6769# else /* no _SC_PAGESIZE */
6770# ifdef HAVE_SYS_PARAM_H
6771# include <sys/param.h>
6772# ifdef EXEC_PAGESIZE
6773# define getpagesize() EXEC_PAGESIZE
6774# else /* no EXEC_PAGESIZE */
6775# ifdef NBPG
6776# define getpagesize() NBPG * CLSIZE
6777# ifndef CLSIZE
6778# define CLSIZE 1
6779# endif /* no CLSIZE */
6780# else /* no NBPG */
6781# ifdef NBPC
6782# define getpagesize() NBPC
6783# else /* no NBPC */
6784# ifdef PAGESIZE
6785# define getpagesize() PAGESIZE
6786# endif /* PAGESIZE */
6787# endif /* no NBPC */
6788# endif /* no NBPG */
6789# endif /* no EXEC_PAGESIZE */
6790# else /* no HAVE_SYS_PARAM_H */
6791# define getpagesize() 8192 /* punt totally */
6792# endif /* no HAVE_SYS_PARAM_H */
6793# endif /* no _SC_PAGESIZE */
6794
6795#endif /* no HAVE_GETPAGESIZE */
6796
6797int
6798main ()
6799{
6800 char *data, *data2, *data3;
6801 const char *cdata2;
6802 int i, pagesize;
6803 int fd, fd2;
6804
6805 pagesize = getpagesize ();
6806
6807 /* First, make a file with some known garbage in it. */
6808 data = (char *) malloc (pagesize);
6809 if (!data)
6810 return 1;
6811 for (i = 0; i < pagesize; ++i)
6812 *(data + i) = rand ();
6813 umask (0);
6814 fd = creat ("conftest.mmap", 0600);
6815 if (fd < 0)
6816 return 2;
6817 if (write (fd, data, pagesize) != pagesize)
6818 return 3;
6819 close (fd);
6820
6821 /* Next, check that the tail of a page is zero-filled. File must have
6822 non-zero length, otherwise we risk SIGBUS for entire page. */
6823 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
6824 if (fd2 < 0)
6825 return 4;
6826 cdata2 = "";
6827 if (write (fd2, cdata2, 1) != 1)
6828 return 5;
6829 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
6830 if (data2 == MAP_FAILED)
6831 return 6;
6832 for (i = 0; i < pagesize; ++i)
6833 if (*(data2 + i))
6834 return 7;
6835 close (fd2);
6836 if (munmap (data2, pagesize))
6837 return 8;
6838
6839 /* Next, try to mmap the file at a fixed address which already has
6840 something else allocated at it. If we can, also make sure that
6841 we see the same garbage. */
6842 fd = open ("conftest.mmap", O_RDWR);
6843 if (fd < 0)
6844 return 9;
6845 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
6846 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6847 return 10;
6848 for (i = 0; i < pagesize; ++i)
6849 if (*(data + i) != *(data2 + i))
6850 return 11;
6851
6852 /* Finally, make sure that changes to the mapped area do not
6853 percolate back to the file as seen by read(). (This is a bug on
6854 some variants of i386 svr4.0.) */
6855 for (i = 0; i < pagesize; ++i)
6856 *(data2 + i) = *(data2 + i) + 1;
6857 data3 = (char *) malloc (pagesize);
6858 if (!data3)
6859 return 12;
6860 if (read (fd, data3, pagesize) != pagesize)
6861 return 13;
6862 for (i = 0; i < pagesize; ++i)
6863 if (*(data + i) != *(data3 + i))
6864 return 14;
6865 close (fd);
6866 return 0;
6867}
6868_ACEOF
6869if ac_fn_c_try_run "$LINENO"; then :
6870 ac_cv_func_mmap_fixed_mapped=yes
6871else
6872 ac_cv_func_mmap_fixed_mapped=no
6873fi
6874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6875 conftest.$ac_objext conftest.beam conftest.$ac_ext
6876fi
6877
6878fi
6879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
6880$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
6881if test $ac_cv_func_mmap_fixed_mapped = yes; then
6882
6883$as_echo "#define HAVE_MMAP 1" >>confdefs.h
6884
6885fi
6886rm -f conftest.mmap conftest.txt
6887
6888 for ac_header in vfork.h
6889do :
6890 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
6891if test "x$ac_cv_header_vfork_h" = xyes; then :
6892 cat >>confdefs.h <<_ACEOF
6893#define HAVE_VFORK_H 1
6894_ACEOF
6895
6896fi
6897
6898done
6899
6900for ac_func in fork vfork
6901do :
6902 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6903ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6904if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6905 cat >>confdefs.h <<_ACEOF
6906#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6907_ACEOF
6908
6909fi
6910done
6911
6912if test "x$ac_cv_func_fork" = xyes; then
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6914$as_echo_n "checking for working fork... " >&6; }
6915if ${ac_cv_func_fork_works+:} false; then :
6916 $as_echo_n "(cached) " >&6
6917else
6918 if test "$cross_compiling" = yes; then :
6919 ac_cv_func_fork_works=cross
6920else
6921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6922/* end confdefs.h. */
6923$ac_includes_default
6924int
6925main ()
6926{
6927
6928 /* By Ruediger Kuhlmann. */
6929 return fork () < 0;
6930
6931 ;
6932 return 0;
6933}
6934_ACEOF
6935if ac_fn_c_try_run "$LINENO"; then :
6936 ac_cv_func_fork_works=yes
6937else
6938 ac_cv_func_fork_works=no
6939fi
6940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6941 conftest.$ac_objext conftest.beam conftest.$ac_ext
6942fi
6943
6944fi
6945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6946$as_echo "$ac_cv_func_fork_works" >&6; }
6947
6948else
6949 ac_cv_func_fork_works=$ac_cv_func_fork
6950fi
6951if test "x$ac_cv_func_fork_works" = xcross; then
6952 case $host in
6953 *-*-amigaos* | *-*-msdosdjgpp*)
6954 # Override, as these systems have only a dummy fork() stub
6955 ac_cv_func_fork_works=no
6956 ;;
6957 *)
6958 ac_cv_func_fork_works=yes
6959 ;;
6960 esac
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6962$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6963fi
6964ac_cv_func_vfork_works=$ac_cv_func_vfork
6965if test "x$ac_cv_func_vfork" = xyes; then
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6967$as_echo_n "checking for working vfork... " >&6; }
6968if ${ac_cv_func_vfork_works+:} false; then :
6969 $as_echo_n "(cached) " >&6
6970else
6971 if test "$cross_compiling" = yes; then :
6972 ac_cv_func_vfork_works=cross
6973else
6974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975/* end confdefs.h. */
6976/* Thanks to Paul Eggert for this test. */
6977$ac_includes_default
6978#include <sys/wait.h>
6979#ifdef HAVE_VFORK_H
6980# include <vfork.h>
6981#endif
6982/* On some sparc systems, changes by the child to local and incoming
6983 argument registers are propagated back to the parent. The compiler
6984 is told about this with #include <vfork.h>, but some compilers
6985 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6986 static variable whose address is put into a register that is
6987 clobbered by the vfork. */
6988static void
6989#ifdef __cplusplus
6990sparc_address_test (int arg)
6991# else
6992sparc_address_test (arg) int arg;
6993#endif
6994{
6995 static pid_t child;
6996 if (!child) {
6997 child = vfork ();
6998 if (child < 0) {
6999 perror ("vfork");
7000 _exit(2);
7001 }
7002 if (!child) {
7003 arg = getpid();
7004 write(-1, "", 0);
7005 _exit (arg);
7006 }
7007 }
7008}
7009
7010int
7011main ()
7012{
7013 pid_t parent = getpid ();
7014 pid_t child;
7015
7016 sparc_address_test (0);
7017
7018 child = vfork ();
7019
7020 if (child == 0) {
7021 /* Here is another test for sparc vfork register problems. This
7022 test uses lots of local variables, at least as many local
7023 variables as main has allocated so far including compiler
7024 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7025 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7026 reuse the register of parent for one of the local variables,
7027 since it will think that parent can't possibly be used any more
7028 in this routine. Assigning to the local variable will thus
7029 munge parent in the parent process. */
7030 pid_t
7031 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7032 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7033 /* Convince the compiler that p..p7 are live; otherwise, it might
7034 use the same hardware register for all 8 local variables. */
7035 if (p != p1 || p != p2 || p != p3 || p != p4
7036 || p != p5 || p != p6 || p != p7)
7037 _exit(1);
7038
7039 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7040 from child file descriptors. If the child closes a descriptor
7041 before it execs or exits, this munges the parent's descriptor
7042 as well. Test for this by closing stdout in the child. */
7043 _exit(close(fileno(stdout)) != 0);
7044 } else {
7045 int status;
7046 struct stat st;
7047
7048 while (wait(&status) != child)
7049 ;
7050 return (
7051 /* Was there some problem with vforking? */
7052 child < 0
7053
7054 /* Did the child fail? (This shouldn't happen.) */
7055 || status
7056
7057 /* Did the vfork/compiler bug occur? */
7058 || parent != getpid()
7059
7060 /* Did the file descriptor bug occur? */
7061 || fstat(fileno(stdout), &st) != 0
7062 );
7063 }
7064}
7065_ACEOF
7066if ac_fn_c_try_run "$LINENO"; then :
7067 ac_cv_func_vfork_works=yes
7068else
7069 ac_cv_func_vfork_works=no
7070fi
7071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7072 conftest.$ac_objext conftest.beam conftest.$ac_ext
7073fi
7074
7075fi
7076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
7077$as_echo "$ac_cv_func_vfork_works" >&6; }
7078
7079fi;
7080if test "x$ac_cv_func_fork_works" = xcross; then
7081 ac_cv_func_vfork_works=$ac_cv_func_vfork
7082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7083$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
7084fi
7085
7086if test "x$ac_cv_func_vfork_works" = xyes; then
7087
7088$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
7089
7090else
7091
7092$as_echo "#define vfork fork" >>confdefs.h
7093
7094fi
7095if test "x$ac_cv_func_fork_works" = xyes; then
7096
7097$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
7098
7099fi
7100
7101 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
7102 ptrace64 sbrk setns sigaltstack sigprocmask \
7103 setpgid setpgrp getrusage getauxval
7104do :
7105 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7106ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7107if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7108 cat >>confdefs.h <<_ACEOF
7109#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7110_ACEOF
7111
7112fi
7113done
7114
7115
7116 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
7117"
7118if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
7119 ac_have_decl=1
7120else
7121 ac_have_decl=0
7122fi
7123
7124cat >>confdefs.h <<_ACEOF
7125#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
7126_ACEOF
7127
7128
7129 if test "$cross_compiling" = yes; then :
7130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7131/* end confdefs.h. */
7132#include <sys/personality.h>
7133int
7134main ()
7135{
7136
7137 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
7138 # define ADDR_NO_RANDOMIZE 0x0040000
7139 # endif
7140 /* Test the flag could be set and stays set. */
7141 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
7142 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
7143 return 1
7144 ;
7145 return 0;
7146}
7147_ACEOF
7148if ac_fn_c_try_link "$LINENO"; then :
7149 have_personality=true
7150else
7151 have_personality=false
7152fi
7153rm -f core conftest.err conftest.$ac_objext \
7154 conftest$ac_exeext conftest.$ac_ext
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158#include <sys/personality.h>
7159int
7160main ()
7161{
7162
7163 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
7164 # define ADDR_NO_RANDOMIZE 0x0040000
7165 # endif
7166 /* Test the flag could be set and stays set. */
7167 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
7168 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
7169 return 1
7170 ;
7171 return 0;
7172}
7173_ACEOF
7174if ac_fn_c_try_run "$LINENO"; then :
7175 have_personality=true
7176else
7177 have_personality=false
7178fi
7179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7180 conftest.$ac_objext conftest.beam conftest.$ac_ext
7181fi
7182
7183 if $have_personality
7184 then
7185
7186$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
7187
7188 fi
7189
7190 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
7191if test "x$ac_cv_have_decl_strstr" = xyes; then :
7192 ac_have_decl=1
7193else
7194 ac_have_decl=0
7195fi
7196
7197cat >>confdefs.h <<_ACEOF
7198#define HAVE_DECL_STRSTR $ac_have_decl
7199_ACEOF
7200
7201
7202 # ----------------------- #
7203 # Checks for structures. #
7204 # ----------------------- #
7205
7206 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
7207if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7208
7209cat >>confdefs.h <<_ACEOF
7210#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7211_ACEOF
7212
7213
7214fi
7215ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
7216if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7217
7218cat >>confdefs.h <<_ACEOF
7219#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7220_ACEOF
7221
7222
7223fi
7224
7225
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7227$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7228if ${ac_cv_search_kinfo_getfile+:} false; then :
7229 $as_echo_n "(cached) " >&6
7230else
7231 ac_func_search_save_LIBS=$LIBS
7232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7233/* end confdefs.h. */
7234
7235/* Override any GCC internal prototype to avoid an error.
7236 Use char because int might match the return type of a GCC
7237 builtin and then its argument prototype would still apply. */
7238#ifdef __cplusplus
7239extern "C"
7240#endif
7241char kinfo_getfile ();
7242int
7243main ()
7244{
7245return kinfo_getfile ();
7246 ;
7247 return 0;
7248}
7249_ACEOF
7250for ac_lib in '' util util-freebsd; do
7251 if test -z "$ac_lib"; then
7252 ac_res="none required"
7253 else
7254 ac_res=-l$ac_lib
7255 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7256 fi
7257 if ac_fn_c_try_link "$LINENO"; then :
7258 ac_cv_search_kinfo_getfile=$ac_res
7259fi
7260rm -f core conftest.err conftest.$ac_objext \
7261 conftest$ac_exeext
7262 if ${ac_cv_search_kinfo_getfile+:} false; then :
7263 break
7264fi
7265done
7266if ${ac_cv_search_kinfo_getfile+:} false; then :
7267
7268else
7269 ac_cv_search_kinfo_getfile=no
7270fi
7271rm conftest.$ac_ext
7272LIBS=$ac_func_search_save_LIBS
7273fi
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7275$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7276ac_res=$ac_cv_search_kinfo_getfile
7277if test "$ac_res" != no; then :
7278 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7279
7280$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7281
7282fi
7283
7284
7285 # Check for std::thread. This does not work on some platforms, like
7286 # mingw and DJGPP.
7287 ac_ext=cpp
7288ac_cpp='$CXXCPP $CPPFLAGS'
7289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7292
7293
7294
7295
7296
7297ac_ext=c
7298ac_cpp='$CPP $CPPFLAGS'
7299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7301ac_compiler_gnu=$ac_cv_c_compiler_gnu
7302
7303ax_pthread_ok=no
7304
7305# We used to check for pthread.h first, but this fails if pthread.h
7306# requires special compiler flags (e.g. on Tru64 or Sequent).
7307# It gets checked for in the link test anyway.
7308
7309# First of all, check if the user has set any of the PTHREAD_LIBS,
7310# etcetera environment variables, and if threads linking works using
7311# them:
7312if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
7313 ax_pthread_save_CC="$CC"
7314 ax_pthread_save_CFLAGS="$CFLAGS"
7315 ax_pthread_save_LIBS="$LIBS"
7316 if test "x$PTHREAD_CC" != "x"; then :
7317 CC="$PTHREAD_CC"
7318fi
7319 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7320 LIBS="$PTHREAD_LIBS $LIBS"
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7322$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7324/* end confdefs.h. */
7325
7326/* Override any GCC internal prototype to avoid an error.
7327 Use char because int might match the return type of a GCC
7328 builtin and then its argument prototype would still apply. */
7329#ifdef __cplusplus
7330extern "C"
7331#endif
7332char pthread_join ();
7333int
7334main ()
7335{
7336return pthread_join ();
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341if ac_fn_c_try_link "$LINENO"; then :
7342 ax_pthread_ok=yes
7343fi
7344rm -f core conftest.err conftest.$ac_objext \
7345 conftest$ac_exeext conftest.$ac_ext
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7347$as_echo "$ax_pthread_ok" >&6; }
7348 if test "x$ax_pthread_ok" = "xno"; then
7349 PTHREAD_LIBS=""
7350 PTHREAD_CFLAGS=""
7351 fi
7352 CC="$ax_pthread_save_CC"
7353 CFLAGS="$ax_pthread_save_CFLAGS"
7354 LIBS="$ax_pthread_save_LIBS"
7355fi
7356
7357# We must check for the threads library under a number of different
7358# names; the ordering is very important because some systems
7359# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7360# libraries is broken (non-POSIX).
7361
7362# Create a list of thread flags to try. Items starting with a "-" are
7363# C compiler flags, and other items are library names, except for "none"
7364# which indicates that we try without any flags at all, and "pthread-config"
7365# which is a program returning the flags for the Pth emulation library.
7366
7367ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
7368
7369# The ordering *is* (sometimes) important. Some notes on the
7370# individual items follow:
7371
7372# pthreads: AIX (must check this before -lpthread)
7373# none: in case threads are in libc; should be tried before -Kthread and
7374# other compiler flags to prevent continual compiler warnings
7375# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7376# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7377# (Note: HP C rejects this with "bad form for `-t' option")
7378# -pthreads: Solaris/gcc (Note: HP C also rejects)
7379# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7380# doesn't hurt to check since this sometimes defines pthreads and
7381# -D_REENTRANT too), HP C (must be checked before -lpthread, which
7382# is present but should not be used directly; and before -mthreads,
7383# because the compiler interprets this as "-mt" + "-hreads")
7384# -mthreads: Mingw32/gcc, Lynx/gcc
7385# pthread: Linux, etcetera
7386# --thread-safe: KAI C++
7387# pthread-config: use pthread-config program (for GNU Pth library)
7388
7389case $host_os in
7390
7391 freebsd*)
7392
7393 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7394 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7395
7396 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
7397 ;;
7398
7399 hpux*)
7400
7401 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7402 # multi-threading and also sets -lpthread."
7403
7404 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7405 ;;
7406
7407 openedition*)
7408
7409 # IBM z/OS requires a feature-test macro to be defined in order to
7410 # enable POSIX threads at all, so give the user a hint if this is
7411 # not set. (We don't define these ourselves, as they can affect
7412 # other portions of the system API in unpredictable ways.)
7413
7414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7415/* end confdefs.h. */
7416
7417# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7418 AX_PTHREAD_ZOS_MISSING
7419# endif
7420
7421_ACEOF
7422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7423 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7425$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7426fi
7427rm -f conftest*
7428
7429 ;;
7430
7431 solaris*)
7432
7433 # On Solaris (at least, for some versions), libc contains stubbed
7434 # (non-functional) versions of the pthreads routines, so link-based
7435 # tests will erroneously succeed. (N.B.: The stubs are missing
7436 # pthread_cleanup_push, or rather a function called by this macro,
7437 # so we could check for that, but who knows whether they'll stub
7438 # that too in a future libc.) So we'll check first for the
7439 # standard Solaris way of linking pthreads (-mt -lpthread).
7440
7441 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
7442 ;;
7443esac
7444
7445# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
7446
7447if test "x$GCC" = "xyes"; then :
7448 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
7449fi
7450
7451# The presence of a feature test macro requesting re-entrant function
7452# definitions is, on some systems, a strong hint that pthreads support is
7453# correctly enabled
7454
7455case $host_os in
7456 darwin* | hpux* | linux* | osf* | solaris*)
7457 ax_pthread_check_macro="_REENTRANT"
7458 ;;
7459
7460 aix*)
7461 ax_pthread_check_macro="_THREAD_SAFE"
7462 ;;
7463
7464 *)
7465 ax_pthread_check_macro="--"
7466 ;;
7467esac
7468if test "x$ax_pthread_check_macro" = "x--"; then :
7469 ax_pthread_check_cond=0
7470else
7471 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
7472fi
7473
7474# Are we compiling with Clang?
7475
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
7477$as_echo_n "checking whether $CC is Clang... " >&6; }
7478if ${ax_cv_PTHREAD_CLANG+:} false; then :
7479 $as_echo_n "(cached) " >&6
7480else
7481 ax_cv_PTHREAD_CLANG=no
7482 # Note that Autoconf sets GCC=yes for Clang as well as GCC
7483 if test "x$GCC" = "xyes"; then
7484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485/* end confdefs.h. */
7486/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
7487# if defined(__clang__) && defined(__llvm__)
7488 AX_PTHREAD_CC_IS_CLANG
7489# endif
7490
7491_ACEOF
7492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7493 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
7494 ax_cv_PTHREAD_CLANG=yes
7495fi
7496rm -f conftest*
7497
7498 fi
7499
7500fi
7501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
7502$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
7503ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
7504
7505ax_pthread_clang_warning=no
7506
7507# Clang needs special handling, because older versions handle the -pthread
7508# option in a rather... idiosyncratic way
7509
7510if test "x$ax_pthread_clang" = "xyes"; then
7511
7512 # Clang takes -pthread; it has never supported any other flag
7513
7514 # (Note 1: This will need to be revisited if a system that Clang
7515 # supports has POSIX threads in a separate library. This tends not
7516 # to be the way of modern systems, but it's conceivable.)
7517
7518 # (Note 2: On some systems, notably Darwin, -pthread is not needed
7519 # to get POSIX threads support; the API is always present and
7520 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
7521 # -pthread does define _REENTRANT, and while the Darwin headers
7522 # ignore this macro, third-party headers might not.)
7523
7524 PTHREAD_CFLAGS="-pthread"
7525 PTHREAD_LIBS=
7526
7527 ax_pthread_ok=yes
7528
7529 # However, older versions of Clang make a point of warning the user
7530 # that, in an invocation where only linking and no compilation is
7531 # taking place, the -pthread option has no effect ("argument unused
7532 # during compilation"). They expect -pthread to be passed in only
7533 # when source code is being compiled.
7534 #
7535 # Problem is, this is at odds with the way Automake and most other
7536 # C build frameworks function, which is that the same flags used in
7537 # compilation (CFLAGS) are also used in linking. Many systems
7538 # supported by AX_PTHREAD require exactly this for POSIX threads
7539 # support, and in fact it is often not straightforward to specify a
7540 # flag that is used only in the compilation phase and not in
7541 # linking. Such a scenario is extremely rare in practice.
7542 #
7543 # Even though use of the -pthread flag in linking would only print
7544 # a warning, this can be a nuisance for well-run software projects
7545 # that build with -Werror. So if the active version of Clang has
7546 # this misfeature, we search for an option to squash it.
7547
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
7549$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
7550if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
7551 $as_echo_n "(cached) " >&6
7552else
7553 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
7554 # Create an alternate version of $ac_link that compiles and
7555 # links in two steps (.c -> .o, .o -> exe) instead of one
7556 # (.c -> exe), because the warning occurs only in the second
7557 # step
7558 ax_pthread_save_ac_link="$ac_link"
7559 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
7560 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
7561 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
7562 ax_pthread_save_CFLAGS="$CFLAGS"
7563 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
7564 if test "x$ax_pthread_try" = "xunknown"; then :
7565 break
7566fi
7567 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
7568 ac_link="$ax_pthread_save_ac_link"
7569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570/* end confdefs.h. */
7571int main(void){return 0;}
7572_ACEOF
7573if ac_fn_c_try_link "$LINENO"; then :
7574 ac_link="$ax_pthread_2step_ac_link"
7575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7576/* end confdefs.h. */
7577int main(void){return 0;}
7578_ACEOF
7579if ac_fn_c_try_link "$LINENO"; then :
7580 break
7581fi
7582rm -f core conftest.err conftest.$ac_objext \
7583 conftest$ac_exeext conftest.$ac_ext
7584
7585fi
7586rm -f core conftest.err conftest.$ac_objext \
7587 conftest$ac_exeext conftest.$ac_ext
7588 done
7589 ac_link="$ax_pthread_save_ac_link"
7590 CFLAGS="$ax_pthread_save_CFLAGS"
7591 if test "x$ax_pthread_try" = "x"; then :
7592 ax_pthread_try=no
7593fi
7594 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
7595
7596fi
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
7598$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
7599
7600 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
7601 no | unknown) ;;
7602 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
7603 esac
7604
7605fi # $ax_pthread_clang = yes
7606
7607if test "x$ax_pthread_ok" = "xno"; then
7608for ax_pthread_try_flag in $ax_pthread_flags; do
7609
7610 case $ax_pthread_try_flag in
7611 none)
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7613$as_echo_n "checking whether pthreads work without any flags... " >&6; }
7614 ;;
7615
7616 -mt,pthread)
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7618$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7619 PTHREAD_CFLAGS="-mt"
7620 PTHREAD_LIBS="-lpthread"
7621 ;;
7622
7623 -*)
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
7625$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
7626 PTHREAD_CFLAGS="$ax_pthread_try_flag"
7627 ;;
7628
7629 pthread-config)
7630 # Extract the first word of "pthread-config", so it can be a program name with args.
7631set dummy pthread-config; ac_word=$2
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7633$as_echo_n "checking for $ac_word... " >&6; }
7634if ${ac_cv_prog_ax_pthread_config+:} false; then :
7635 $as_echo_n "(cached) " >&6
7636else
7637 if test -n "$ax_pthread_config"; then
7638 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
7639else
7640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7641for as_dir in $PATH
7642do
7643 IFS=$as_save_IFS
7644 test -z "$as_dir" && as_dir=.
7645 for ac_exec_ext in '' $ac_executable_extensions; do
7646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7647 ac_cv_prog_ax_pthread_config="yes"
7648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7649 break 2
7650 fi
7651done
7652 done
7653IFS=$as_save_IFS
7654
7655 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
7656fi
7657fi
7658ax_pthread_config=$ac_cv_prog_ax_pthread_config
7659if test -n "$ax_pthread_config"; then
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
7661$as_echo "$ax_pthread_config" >&6; }
7662else
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7664$as_echo "no" >&6; }
7665fi
7666
7667
7668 if test "x$ax_pthread_config" = "xno"; then :
7669 continue
7670fi
7671 PTHREAD_CFLAGS="`pthread-config --cflags`"
7672 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
7673 ;;
7674
7675 *)
7676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
7677$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
7678 PTHREAD_LIBS="-l$ax_pthread_try_flag"
7679 ;;
7680 esac
7681
7682 ax_pthread_save_CFLAGS="$CFLAGS"
7683 ax_pthread_save_LIBS="$LIBS"
7684 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7685 LIBS="$PTHREAD_LIBS $LIBS"
7686
7687 # Check for various functions. We must include pthread.h,
7688 # since some functions may be macros. (On the Sequent, we
7689 # need a special flag -Kthread to make this header compile.)
7690 # We check for pthread_join because it is in -lpthread on IRIX
7691 # while pthread_create is in libc. We check for pthread_attr_init
7692 # due to DEC craziness with -lpthreads. We check for
7693 # pthread_cleanup_push because it is one of the few pthread
7694 # functions on Solaris that doesn't have a non-functional libc stub.
7695 # We try pthread_create on general principles.
7696
7697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7698/* end confdefs.h. */
7699#include <pthread.h>
7700# if $ax_pthread_check_cond
7701# error "$ax_pthread_check_macro must be defined"
7702# endif
7703 static void routine(void *a) { a = 0; }
7704 static void *start_routine(void *a) { return a; }
7705int
7706main ()
7707{
7708pthread_t th; pthread_attr_t attr;
7709 pthread_create(&th, 0, start_routine, 0);
7710 pthread_join(th, 0);
7711 pthread_attr_init(&attr);
7712 pthread_cleanup_push(routine, 0);
7713 pthread_cleanup_pop(0) /* ; */
7714 ;
7715 return 0;
7716}
7717_ACEOF
7718if ac_fn_c_try_link "$LINENO"; then :
7719 ax_pthread_ok=yes
7720fi
7721rm -f core conftest.err conftest.$ac_objext \
7722 conftest$ac_exeext conftest.$ac_ext
7723
7724 CFLAGS="$ax_pthread_save_CFLAGS"
7725 LIBS="$ax_pthread_save_LIBS"
7726
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7728$as_echo "$ax_pthread_ok" >&6; }
7729 if test "x$ax_pthread_ok" = "xyes"; then :
7730 break
7731fi
7732
7733 PTHREAD_LIBS=""
7734 PTHREAD_CFLAGS=""
7735done
7736fi
7737
7738# Various other checks:
7739if test "x$ax_pthread_ok" = "xyes"; then
7740 ax_pthread_save_CFLAGS="$CFLAGS"
7741 ax_pthread_save_LIBS="$LIBS"
7742 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7743 LIBS="$PTHREAD_LIBS $LIBS"
7744
7745 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
7747$as_echo_n "checking for joinable pthread attribute... " >&6; }
7748if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
7749 $as_echo_n "(cached) " >&6
7750else
7751 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
7752 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
7753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7754/* end confdefs.h. */
7755#include <pthread.h>
7756int
7757main ()
7758{
7759int attr = $ax_pthread_attr; return attr /* ; */
7760 ;
7761 return 0;
7762}
7763_ACEOF
7764if ac_fn_c_try_link "$LINENO"; then :
7765 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
7766fi
7767rm -f core conftest.err conftest.$ac_objext \
7768 conftest$ac_exeext conftest.$ac_ext
7769 done
7770
7771fi
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
7773$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
7774 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
7775 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
7776 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
7777
7778cat >>confdefs.h <<_ACEOF
7779#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
7780_ACEOF
7781
7782 ax_pthread_joinable_attr_defined=yes
7783
7784fi
7785
7786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
7787$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
7788if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
7789 $as_echo_n "(cached) " >&6
7790else
7791 ax_cv_PTHREAD_SPECIAL_FLAGS=no
7792 case $host_os in
7793 solaris*)
7794 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
7795 ;;
7796 esac
7797
7798fi
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
7800$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
7801 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
7802 test "x$ax_pthread_special_flags_added" != "xyes"; then :
7803 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
7804 ax_pthread_special_flags_added=yes
7805fi
7806
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
7808$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
7809if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
7810 $as_echo_n "(cached) " >&6
7811else
7812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813/* end confdefs.h. */
7814#include <pthread.h>
7815int
7816main ()
7817{
7818int i = PTHREAD_PRIO_INHERIT;
7819 ;
7820 return 0;
7821}
7822_ACEOF
7823if ac_fn_c_try_link "$LINENO"; then :
7824 ax_cv_PTHREAD_PRIO_INHERIT=yes
7825else
7826 ax_cv_PTHREAD_PRIO_INHERIT=no
7827fi
7828rm -f core conftest.err conftest.$ac_objext \
7829 conftest$ac_exeext conftest.$ac_ext
7830
7831fi
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
7833$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
7834 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
7835 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
7836
7837$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
7838
7839 ax_pthread_prio_inherit_defined=yes
7840
7841fi
7842
7843 CFLAGS="$ax_pthread_save_CFLAGS"
7844 LIBS="$ax_pthread_save_LIBS"
7845
7846 # More AIX lossage: compile with *_r variant
7847 if test "x$GCC" != "xyes"; then
7848 case $host_os in
7849 aix*)
7850 case "x/$CC" in #(
7851 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
7852 #handle absolute path differently from PATH based program lookup
7853 case "x$CC" in #(
7854 x/*) :
7855 if as_fn_executable_p ${CC}_r; then :
7856 PTHREAD_CC="${CC}_r"
7857fi ;; #(
7858 *) :
7859 for ac_prog in ${CC}_r
7860do
7861 # Extract the first word of "$ac_prog", so it can be a program name with args.
7862set dummy $ac_prog; ac_word=$2
7863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7864$as_echo_n "checking for $ac_word... " >&6; }
7865if ${ac_cv_prog_PTHREAD_CC+:} false; then :
7866 $as_echo_n "(cached) " >&6
7867else
7868 if test -n "$PTHREAD_CC"; then
7869 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
7870else
7871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7872for as_dir in $PATH
7873do
7874 IFS=$as_save_IFS
7875 test -z "$as_dir" && as_dir=.
7876 for ac_exec_ext in '' $ac_executable_extensions; do
7877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7878 ac_cv_prog_PTHREAD_CC="$ac_prog"
7879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7880 break 2
7881 fi
7882done
7883 done
7884IFS=$as_save_IFS
7885
7886fi
7887fi
7888PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
7889if test -n "$PTHREAD_CC"; then
7890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
7891$as_echo "$PTHREAD_CC" >&6; }
7892else
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7894$as_echo "no" >&6; }
7895fi
7896
7897
7898 test -n "$PTHREAD_CC" && break
7899done
7900test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7901 ;;
7902esac ;; #(
7903 *) :
7904 ;;
7905esac
7906 ;;
7907 esac
7908 fi
7909fi
7910
7911test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7912
7913
7914
7915
7916
7917# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
7918if test "x$ax_pthread_ok" = "xyes"; then
7919 threads=yes
7920 :
7921else
7922 ax_pthread_ok=no
7923 threads=no
7924fi
7925ac_ext=cpp
7926ac_cpp='$CXXCPP $CPPFLAGS'
7927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7930
7931
7932 if test "$threads" = "yes"; then
7933 save_LIBS="$LIBS"
7934 LIBS="$PTHREAD_LIBS $LIBS"
7935 save_CXXFLAGS="$CXXFLAGS"
7936 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
7938$as_echo_n "checking for std::thread... " >&6; }
7939if ${gdb_cv_cxx_std_thread+:} false; then :
7940 $as_echo_n "(cached) " >&6
7941else
7942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7943/* end confdefs.h. */
7944#include <thread>
7945 void callback() { }
7946int
7947main ()
7948{
7949std::thread t(callback);
7950 ;
7951 return 0;
7952}
7953_ACEOF
7954if ac_fn_cxx_try_compile "$LINENO"; then :
7955 gdb_cv_cxx_std_thread=yes
7956else
7957 gdb_cv_cxx_std_thread=no
7958fi
7959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7960fi
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
7962$as_echo "$gdb_cv_cxx_std_thread" >&6; }
7963
7964 # This check must be here, while LIBS includes any necessary
7965 # threading library.
7966 for ac_func in pthread_sigmask pthread_setname_np
7967do :
7968 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7969ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
7970if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7971 cat >>confdefs.h <<_ACEOF
7972#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7973_ACEOF
7974
7975fi
7976done
7977
7978
7979 LIBS="$save_LIBS"
7980 CXXFLAGS="$save_CXXFLAGS"
7981 fi
7982 if test "$gdb_cv_cxx_std_thread" = "yes"; then
7983
7984$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
7985
7986 fi
7987 ac_ext=c
7988ac_cpp='$CPP $CPPFLAGS'
7989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7991ac_compiler_gnu=$ac_cv_c_compiler_gnu
7992
7993
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
7995$as_echo_n "checking for sigsetjmp... " >&6; }
7996if ${gdb_cv_func_sigsetjmp+:} false; then :
7997 $as_echo_n "(cached) " >&6
7998else
7999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8000/* end confdefs.h. */
8001
8002 #include <setjmp.h>
8003
8004int
8005main ()
8006{
8007sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012if ac_fn_c_try_compile "$LINENO"; then :
8013 gdb_cv_func_sigsetjmp=yes
8014else
8015 gdb_cv_func_sigsetjmp=no
8016fi
8017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8018fi
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
8020$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
8021 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
8022
8023$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
8024
8025 fi
8026
8027
8028# Check whether --with-intel_pt was given.
8029if test "${with_intel_pt+set}" = set; then :
8030 withval=$with_intel_pt;
8031else
8032 with_intel_pt=auto
8033fi
8034
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
8036$as_echo_n "checking whether to use intel pt... " >&6; }
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
8038$as_echo "$with_intel_pt" >&6; }
8039
8040 if test "${with_intel_pt}" = no; then
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
8042$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
8043 HAVE_LIBIPT=no
8044 else
8045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8046/* end confdefs.h. */
8047
8048 #include <linux/perf_event.h>
8049 #ifndef PERF_ATTR_SIZE_VER5
8050 # error
8051 #endif
8052
8053_ACEOF
8054if ac_fn_c_try_cpp "$LINENO"; then :
8055 perf_event=yes
8056else
8057 perf_event=no
8058fi
8059rm -f conftest.err conftest.i conftest.$ac_ext
8060 if test "$perf_event" != yes; then
8061 if test "$with_intel_pt" = yes; then
8062 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
8063 else
8064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
8065$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
8066 fi
8067 fi
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077 use_additional=yes
8078
8079 acl_save_prefix="$prefix"
8080 prefix="$acl_final_prefix"
8081 acl_save_exec_prefix="$exec_prefix"
8082 exec_prefix="$acl_final_exec_prefix"
8083
8084 eval additional_includedir=\"$includedir\"
8085 eval additional_libdir=\"$libdir\"
8086
8087 exec_prefix="$acl_save_exec_prefix"
8088 prefix="$acl_save_prefix"
8089
8090
8091# Check whether --with-libipt-prefix was given.
8092if test "${with_libipt_prefix+set}" = set; then :
8093 withval=$with_libipt_prefix;
8094 if test "X$withval" = "Xno"; then
8095 use_additional=no
8096 else
8097 if test "X$withval" = "X"; then
8098
8099 acl_save_prefix="$prefix"
8100 prefix="$acl_final_prefix"
8101 acl_save_exec_prefix="$exec_prefix"
8102 exec_prefix="$acl_final_exec_prefix"
8103
8104 eval additional_includedir=\"$includedir\"
8105 eval additional_libdir=\"$libdir\"
8106
8107 exec_prefix="$acl_save_exec_prefix"
8108 prefix="$acl_save_prefix"
8109
8110 else
8111 additional_includedir="$withval/include"
8112 additional_libdir="$withval/lib"
8113 fi
8114 fi
8115
8116fi
8117
8118
8119# Check whether --with-libipt-type was given.
8120if test "${with_libipt_type+set}" = set; then :
8121 withval=$with_libipt_type; with_libipt_type=$withval
8122else
8123 with_libipt_type=auto
8124fi
8125
8126 lib_type=`eval echo \$with_libipt_type`
8127
8128 LIBIPT=
8129 LTLIBIPT=
8130 INCIPT=
8131 rpathdirs=
8132 ltrpathdirs=
8133 names_already_handled=
8134 names_next_round='ipt '
8135 while test -n "$names_next_round"; do
8136 names_this_round="$names_next_round"
8137 names_next_round=
8138 for name in $names_this_round; do
8139 already_handled=
8140 for n in $names_already_handled; do
8141 if test "$n" = "$name"; then
8142 already_handled=yes
8143 break
8144 fi
8145 done
8146 if test -z "$already_handled"; then
8147 names_already_handled="$names_already_handled $name"
8148 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8149 eval value=\"\$HAVE_LIB$uppername\"
8150 if test -n "$value"; then
8151 if test "$value" = yes; then
8152 eval value=\"\$LIB$uppername\"
8153 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
8154 eval value=\"\$LTLIB$uppername\"
8155 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
8156 else
8157 :
8158 fi
8159 else
8160 found_dir=
8161 found_la=
8162 found_so=
8163 found_a=
8164 if test $use_additional = yes; then
8165 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8166 found_dir="$additional_libdir"
8167 found_so="$additional_libdir/lib$name.$shlibext"
8168 if test -f "$additional_libdir/lib$name.la"; then
8169 found_la="$additional_libdir/lib$name.la"
8170 fi
8171 elif test x$lib_type != xshared; then
8172 if test -f "$additional_libdir/lib$name.$libext"; then
8173 found_dir="$additional_libdir"
8174 found_a="$additional_libdir/lib$name.$libext"
8175 if test -f "$additional_libdir/lib$name.la"; then
8176 found_la="$additional_libdir/lib$name.la"
8177 fi
8178 fi
8179 fi
8180 fi
8181 if test "X$found_dir" = "X"; then
8182 for x in $LDFLAGS $LTLIBIPT; do
8183
8184 acl_save_prefix="$prefix"
8185 prefix="$acl_final_prefix"
8186 acl_save_exec_prefix="$exec_prefix"
8187 exec_prefix="$acl_final_exec_prefix"
8188 eval x=\"$x\"
8189 exec_prefix="$acl_save_exec_prefix"
8190 prefix="$acl_save_prefix"
8191
8192 case "$x" in
8193 -L*)
8194 dir=`echo "X$x" | sed -e 's/^X-L//'`
8195 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8196 found_dir="$dir"
8197 found_so="$dir/lib$name.$shlibext"
8198 if test -f "$dir/lib$name.la"; then
8199 found_la="$dir/lib$name.la"
8200 fi
8201 elif test x$lib_type != xshared; then
8202 if test -f "$dir/lib$name.$libext"; then
8203 found_dir="$dir"
8204 found_a="$dir/lib$name.$libext"
8205 if test -f "$dir/lib$name.la"; then
8206 found_la="$dir/lib$name.la"
8207 fi
8208 fi
8209 fi
8210 ;;
8211 esac
8212 if test "X$found_dir" != "X"; then
8213 break
8214 fi
8215 done
8216 fi
8217 if test "X$found_dir" != "X"; then
8218 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
8219 if test "X$found_so" != "X"; then
8220 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8221 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8222 else
8223 haveit=
8224 for x in $ltrpathdirs; do
8225 if test "X$x" = "X$found_dir"; then
8226 haveit=yes
8227 break
8228 fi
8229 done
8230 if test -z "$haveit"; then
8231 ltrpathdirs="$ltrpathdirs $found_dir"
8232 fi
8233 if test "$hardcode_direct" = yes; then
8234 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8235 else
8236 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8237 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8238 haveit=
8239 for x in $rpathdirs; do
8240 if test "X$x" = "X$found_dir"; then
8241 haveit=yes
8242 break
8243 fi
8244 done
8245 if test -z "$haveit"; then
8246 rpathdirs="$rpathdirs $found_dir"
8247 fi
8248 else
8249 haveit=
8250 for x in $LDFLAGS $LIBIPT; do
8251
8252 acl_save_prefix="$prefix"
8253 prefix="$acl_final_prefix"
8254 acl_save_exec_prefix="$exec_prefix"
8255 exec_prefix="$acl_final_exec_prefix"
8256 eval x=\"$x\"
8257 exec_prefix="$acl_save_exec_prefix"
8258 prefix="$acl_save_prefix"
8259
8260 if test "X$x" = "X-L$found_dir"; then
8261 haveit=yes
8262 break
8263 fi
8264 done
8265 if test -z "$haveit"; then
8266 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
8267 fi
8268 if test "$hardcode_minus_L" != no; then
8269 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8270 else
8271 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8272 fi
8273 fi
8274 fi
8275 fi
8276 else
8277 if test "X$found_a" != "X"; then
8278 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
8279 else
8280 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
8281 fi
8282 fi
8283 additional_includedir=
8284 case "$found_dir" in
8285 */lib | */lib/)
8286 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8287 additional_includedir="$basedir/include"
8288 ;;
8289 esac
8290 if test "X$additional_includedir" != "X"; then
8291 if test "X$additional_includedir" != "X/usr/include"; then
8292 haveit=
8293 if test "X$additional_includedir" = "X/usr/local/include"; then
8294 if test -n "$GCC"; then
8295 case $host_os in
8296 linux*) haveit=yes;;
8297 esac
8298 fi
8299 fi
8300 if test -z "$haveit"; then
8301 for x in $CPPFLAGS $INCIPT; do
8302
8303 acl_save_prefix="$prefix"
8304 prefix="$acl_final_prefix"
8305 acl_save_exec_prefix="$exec_prefix"
8306 exec_prefix="$acl_final_exec_prefix"
8307 eval x=\"$x\"
8308 exec_prefix="$acl_save_exec_prefix"
8309 prefix="$acl_save_prefix"
8310
8311 if test "X$x" = "X-I$additional_includedir"; then
8312 haveit=yes
8313 break
8314 fi
8315 done
8316 if test -z "$haveit"; then
8317 if test -d "$additional_includedir"; then
8318 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
8319 fi
8320 fi
8321 fi
8322 fi
8323 fi
8324 if test -n "$found_la"; then
8325 save_libdir="$libdir"
8326 case "$found_la" in
8327 */* | *\\*) . "$found_la" ;;
8328 *) . "./$found_la" ;;
8329 esac
8330 libdir="$save_libdir"
8331 for dep in $dependency_libs; do
8332 case "$dep" in
8333 -L*)
8334 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8335 if test "X$additional_libdir" != "X/usr/lib"; then
8336 haveit=
8337 if test "X$additional_libdir" = "X/usr/local/lib"; then
8338 if test -n "$GCC"; then
8339 case $host_os in
8340 linux*) haveit=yes;;
8341 esac
8342 fi
8343 fi
8344 if test -z "$haveit"; then
8345 haveit=
8346 for x in $LDFLAGS $LIBIPT; do
8347
8348 acl_save_prefix="$prefix"
8349 prefix="$acl_final_prefix"
8350 acl_save_exec_prefix="$exec_prefix"
8351 exec_prefix="$acl_final_exec_prefix"
8352 eval x=\"$x\"
8353 exec_prefix="$acl_save_exec_prefix"
8354 prefix="$acl_save_prefix"
8355
8356 if test "X$x" = "X-L$additional_libdir"; then
8357 haveit=yes
8358 break
8359 fi
8360 done
8361 if test -z "$haveit"; then
8362 if test -d "$additional_libdir"; then
8363 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
8364 fi
8365 fi
8366 haveit=
8367 for x in $LDFLAGS $LTLIBIPT; do
8368
8369 acl_save_prefix="$prefix"
8370 prefix="$acl_final_prefix"
8371 acl_save_exec_prefix="$exec_prefix"
8372 exec_prefix="$acl_final_exec_prefix"
8373 eval x=\"$x\"
8374 exec_prefix="$acl_save_exec_prefix"
8375 prefix="$acl_save_prefix"
8376
8377 if test "X$x" = "X-L$additional_libdir"; then
8378 haveit=yes
8379 break
8380 fi
8381 done
8382 if test -z "$haveit"; then
8383 if test -d "$additional_libdir"; then
8384 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
8385 fi
8386 fi
8387 fi
8388 fi
8389 ;;
8390 -R*)
8391 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8392 if test "$enable_rpath" != no; then
8393 haveit=
8394 for x in $rpathdirs; do
8395 if test "X$x" = "X$dir"; then
8396 haveit=yes
8397 break
8398 fi
8399 done
8400 if test -z "$haveit"; then
8401 rpathdirs="$rpathdirs $dir"
8402 fi
8403 haveit=
8404 for x in $ltrpathdirs; do
8405 if test "X$x" = "X$dir"; then
8406 haveit=yes
8407 break
8408 fi
8409 done
8410 if test -z "$haveit"; then
8411 ltrpathdirs="$ltrpathdirs $dir"
8412 fi
8413 fi
8414 ;;
8415 -l*)
8416 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8417 ;;
8418 *.la)
8419 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8420 ;;
8421 *)
8422 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
8423 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
8424 ;;
8425 esac
8426 done
8427 fi
8428 else
8429 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8430 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8431 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
8432 else
8433 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
8434 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
8435 fi
8436 fi
8437 fi
8438 fi
8439 done
8440 done
8441 if test "X$rpathdirs" != "X"; then
8442 if test -n "$hardcode_libdir_separator"; then
8443 alldirs=
8444 for found_dir in $rpathdirs; do
8445 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8446 done
8447 acl_save_libdir="$libdir"
8448 libdir="$alldirs"
8449 eval flag=\"$hardcode_libdir_flag_spec\"
8450 libdir="$acl_save_libdir"
8451 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8452 else
8453 for found_dir in $rpathdirs; do
8454 acl_save_libdir="$libdir"
8455 libdir="$found_dir"
8456 eval flag=\"$hardcode_libdir_flag_spec\"
8457 libdir="$acl_save_libdir"
8458 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8459 done
8460 fi
8461 fi
8462 if test "X$ltrpathdirs" != "X"; then
8463 for found_dir in $ltrpathdirs; do
8464 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
8465 done
8466 fi
8467
8468
8469 ac_save_CPPFLAGS="$CPPFLAGS"
8470
8471 for element in $INCIPT; do
8472 haveit=
8473 for x in $CPPFLAGS; do
8474
8475 acl_save_prefix="$prefix"
8476 prefix="$acl_final_prefix"
8477 acl_save_exec_prefix="$exec_prefix"
8478 exec_prefix="$acl_final_exec_prefix"
8479 eval x=\"$x\"
8480 exec_prefix="$acl_save_exec_prefix"
8481 prefix="$acl_save_prefix"
8482
8483 if test "X$x" = "X$element"; then
8484 haveit=yes
8485 break
8486 fi
8487 done
8488 if test -z "$haveit"; then
8489 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8490 fi
8491 done
8492
8493
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
8495$as_echo_n "checking for libipt... " >&6; }
8496if ${ac_cv_libipt+:} false; then :
8497 $as_echo_n "(cached) " >&6
8498else
8499
8500 ac_save_LIBS="$LIBS"
8501 LIBS="$LIBS $LIBIPT"
8502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8503/* end confdefs.h. */
8504#include "intel-pt.h"
8505int
8506main ()
8507{
8508pt_insn_alloc_decoder (0);
8509 ;
8510 return 0;
8511}
8512_ACEOF
8513if ac_fn_c_try_link "$LINENO"; then :
8514 ac_cv_libipt=yes
8515else
8516 ac_cv_libipt=no
8517fi
8518rm -f core conftest.err conftest.$ac_objext \
8519 conftest$ac_exeext conftest.$ac_ext
8520 LIBS="$ac_save_LIBS"
8521
8522fi
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
8524$as_echo "$ac_cv_libipt" >&6; }
8525 if test "$ac_cv_libipt" = yes; then
8526 HAVE_LIBIPT=yes
8527
8528$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
8529
8530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
8531$as_echo_n "checking how to link with libipt... " >&6; }
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
8533$as_echo "$LIBIPT" >&6; }
8534 else
8535 HAVE_LIBIPT=no
8536 CPPFLAGS="$ac_save_CPPFLAGS"
8537 LIBIPT=
8538 LTLIBIPT=
8539 fi
8540
8541
8542
8543
8544
8545
8546 if test "$HAVE_LIBIPT" != yes; then
8547 if test "$with_intel_pt" = yes; then
8548 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
8549 else
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
8551$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
8552 fi
8553 else
8554 save_LIBS=$LIBS
8555 LIBS="$LIBS $LIBIPT"
8556 for ac_func in pt_insn_event
8557do :
8558 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
8559if test "x$ac_cv_func_pt_insn_event" = xyes; then :
8560 cat >>confdefs.h <<_ACEOF
8561#define HAVE_PT_INSN_EVENT 1
8562_ACEOF
8563
8564fi
8565done
8566
8567 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
8568"
8569if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
8570
8571cat >>confdefs.h <<_ACEOF
8572#define HAVE_STRUCT_PT_INSN_ENABLED 1
8573_ACEOF
8574
8575
8576fi
8577ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
8578"
8579if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
8580
8581cat >>confdefs.h <<_ACEOF
8582#define HAVE_STRUCT_PT_INSN_RESYNCED 1
8583_ACEOF
8584
8585
8586fi
8587
8588 LIBS=$save_LIBS
8589 fi
8590 fi
8591
8592 if test "$ac_cv_header_sys_procfs_h" = yes; then
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
8594$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
8595 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
8596 $as_echo_n "(cached) " >&6
8597else
8598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8599/* end confdefs.h. */
8600
8601#define _SYSCALL32
8602/* Needed for new procfs interface on sparc-solaris. */
8603#define _STRUCTURED_PROC 1
8604#include <sys/procfs.h>
8605int
8606main ()
8607{
8608gregset_t avar
8609 ;
8610 return 0;
8611}
8612_ACEOF
8613if ac_fn_c_try_compile "$LINENO"; then :
8614 bfd_cv_have_sys_procfs_type_gregset_t=yes
8615else
8616 bfd_cv_have_sys_procfs_type_gregset_t=no
8617
8618fi
8619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8620fi
8621
8622 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8623
8624$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
8625
8626 fi
8627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
8628$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
8629
8630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
8631$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
8632 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
8633 $as_echo_n "(cached) " >&6
8634else
8635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8636/* end confdefs.h. */
8637
8638#define _SYSCALL32
8639/* Needed for new procfs interface on sparc-solaris. */
8640#define _STRUCTURED_PROC 1
8641#include <sys/procfs.h>
8642int
8643main ()
8644{
8645fpregset_t avar
8646 ;
8647 return 0;
8648}
8649_ACEOF
8650if ac_fn_c_try_compile "$LINENO"; then :
8651 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8652else
8653 bfd_cv_have_sys_procfs_type_fpregset_t=no
8654
8655fi
8656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8657fi
8658
8659 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8660
8661$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
8662
8663 fi
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
8665$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
8666
8667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
8668$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
8669 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
8670 $as_echo_n "(cached) " >&6
8671else
8672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8673/* end confdefs.h. */
8674
8675#define _SYSCALL32
8676/* Needed for new procfs interface on sparc-solaris. */
8677#define _STRUCTURED_PROC 1
8678#include <sys/procfs.h>
8679int
8680main ()
8681{
8682prgregset_t avar
8683 ;
8684 return 0;
8685}
8686_ACEOF
8687if ac_fn_c_try_compile "$LINENO"; then :
8688 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8689else
8690 bfd_cv_have_sys_procfs_type_prgregset_t=no
8691
8692fi
8693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8694fi
8695
8696 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8697
8698$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
8699
8700 fi
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
8702$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
8703
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
8705$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
8706 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
8707 $as_echo_n "(cached) " >&6
8708else
8709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8710/* end confdefs.h. */
8711
8712#define _SYSCALL32
8713/* Needed for new procfs interface on sparc-solaris. */
8714#define _STRUCTURED_PROC 1
8715#include <sys/procfs.h>
8716int
8717main ()
8718{
8719prfpregset_t avar
8720 ;
8721 return 0;
8722}
8723_ACEOF
8724if ac_fn_c_try_compile "$LINENO"; then :
8725 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8726else
8727 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8728
8729fi
8730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8731fi
8732
8733 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8734
8735$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
8736
8737 fi
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
8739$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
8740
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
8742$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
8743 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
8744 $as_echo_n "(cached) " >&6
8745else
8746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8747/* end confdefs.h. */
8748
8749#define _SYSCALL32
8750/* Needed for new procfs interface on sparc-solaris. */
8751#define _STRUCTURED_PROC 1
8752#include <sys/procfs.h>
8753int
8754main ()
8755{
8756prgregset32_t avar
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761if ac_fn_c_try_compile "$LINENO"; then :
8762 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8763else
8764 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8765
8766fi
8767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8768fi
8769
8770 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8771
8772$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
8773
8774 fi
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
8776$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
8777
8778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
8779$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
8780 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
8781 $as_echo_n "(cached) " >&6
8782else
8783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784/* end confdefs.h. */
8785
8786#define _SYSCALL32
8787/* Needed for new procfs interface on sparc-solaris. */
8788#define _STRUCTURED_PROC 1
8789#include <sys/procfs.h>
8790int
8791main ()
8792{
8793lwpid_t avar
8794 ;
8795 return 0;
8796}
8797_ACEOF
8798if ac_fn_c_try_compile "$LINENO"; then :
8799 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8800else
8801 bfd_cv_have_sys_procfs_type_lwpid_t=no
8802
8803fi
8804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8805fi
8806
8807 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8808
8809$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
8810
8811 fi
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
8813$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
8814
8815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
8816$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
8817 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
8818 $as_echo_n "(cached) " >&6
8819else
8820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8821/* end confdefs.h. */
8822
8823#define _SYSCALL32
8824/* Needed for new procfs interface on sparc-solaris. */
8825#define _STRUCTURED_PROC 1
8826#include <sys/procfs.h>
8827int
8828main ()
8829{
8830psaddr_t avar
8831 ;
8832 return 0;
8833}
8834_ACEOF
8835if ac_fn_c_try_compile "$LINENO"; then :
8836 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8837else
8838 bfd_cv_have_sys_procfs_type_psaddr_t=no
8839
8840fi
8841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8842fi
8843
8844 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8845
8846$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
8847
8848 fi
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
8850$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
8851
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
8853$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
8854 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
8855 $as_echo_n "(cached) " >&6
8856else
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8858/* end confdefs.h. */
8859
8860#define _SYSCALL32
8861/* Needed for new procfs interface on sparc-solaris. */
8862#define _STRUCTURED_PROC 1
8863#include <sys/procfs.h>
8864int
8865main ()
8866{
8867elf_fpregset_t avar
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872if ac_fn_c_try_compile "$LINENO"; then :
8873 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
8874else
8875 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
8876
8877fi
8878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8879fi
8880
8881 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
8882
8883$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
8884
8885 fi
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
8887$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
8888
8889 fi
8890
8891
8892
8893# Check whether we will enable the inclusion of unit tests when
8894# compiling GDB.
8895#
8896# The default value of this option changes depending whether we're on
8897# development mode (in which case it's "true") or not (in which case
8898# it's "false"). The $development variable is set by the GDB_AC_COMMON
8899# macro, which must therefore be used before GDB_AC_SELFTEST.
8900
8901if test "x$development" != xtrue && test "x$development" != xfalse; then :
8902 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
8903fi
8904
8905# Check whether --enable-unit-tests was given.
8906if test "${enable_unit_tests+set}" = set; then :
8907 enableval=$enable_unit_tests; case "${enableval}" in
8908 yes) enable_unittests=true ;;
8909 no) enable_unittests=false ;;
8910 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
8911esac
8912else
8913 enable_unittests=$development
8914fi
8915
8916
8917if $enable_unittests; then
8918
8919$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
8920
8921
8922 srv_selftest_objs="gdbsupport/selftest.o"
8923
8924fi
8925
8926
8927 case ${build_alias} in
8928 "") build_noncanonical=${build} ;;
8929 *) build_noncanonical=${build_alias} ;;
8930esac
8931
8932 case ${host_alias} in
8933 "") host_noncanonical=${build_noncanonical} ;;
8934 *) host_noncanonical=${host_alias} ;;
8935esac
8936
8937 case ${target_alias} in
8938 "") target_noncanonical=${host_noncanonical} ;;
8939 *) target_noncanonical=${target_alias} ;;
8940esac
8941
8942
8943
8944
8945
8946
8947# Dependency checking.
8948rm -rf .tst 2>/dev/null
8949mkdir .tst 2>/dev/null
8950if test -d .tst; then
8951 am__leading_dot=.
8952else
8953 am__leading_dot=_
8954fi
8955rmdir .tst 2>/dev/null
8956
8957DEPDIR="${am__leading_dot}deps"
8958
8959ac_config_commands="$ac_config_commands depdir"
8960
8961
8962
8963# Create sub-directories for objects and dependencies.
8964CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
8965
8966
8967ac_config_commands="$ac_config_commands gdbdepdir"
8968
8969
8970depcc="$CC" am_compiler_list=
8971
8972am_depcomp=$ac_aux_dir/depcomp
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
8974$as_echo_n "checking dependency style of $depcc... " >&6; }
8975if ${am_cv_CC_dependencies_compiler_type+:} false; then :
8976 $as_echo_n "(cached) " >&6
8977else
8978 if test -f "$am_depcomp"; then
8979 # We make a subdir and do the tests there. Otherwise we can end up
8980 # making bogus files that we don't know about and never remove. For
8981 # instance it was reported that on HP-UX the gcc test will end up
8982 # making a dummy file named `D' -- because `-MD' means `put the output
8983 # in D'.
8984 mkdir conftest.dir
8985 # Copy depcomp to subdir because otherwise we won't find it if we're
8986 # using a relative directory.
8987 cp "$am_depcomp" conftest.dir
8988 cd conftest.dir
8989 # We will build objects and dependencies in a subdirectory because
8990 # it helps to detect inapplicable dependency modes. For instance
8991 # both Tru64's cc and ICC support -MD to output dependencies as a
8992 # side effect of compilation, but ICC will put the dependencies in
8993 # the current directory while Tru64 will put them in the object
8994 # directory.
8995 mkdir sub
8996
8997 am_cv_CC_dependencies_compiler_type=none
8998 if test "$am_compiler_list" = ""; then
8999 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9000 fi
9001 for depmode in $am_compiler_list; do
9002 if test $depmode = none; then break; fi
9003
9004 $as_echo "$as_me:$LINENO: trying $depmode" >&5
9005 # Setup a source with many dependencies, because some compilers
9006 # like to wrap large dependency lists on column 80 (with \), and
9007 # we should not choose a depcomp mode which is confused by this.
9008 #
9009 # We need to recreate these files for each test, as the compiler may
9010 # overwrite some of them when testing with obscure command lines.
9011 # This happens at least with the AIX C compiler.
9012 : > sub/conftest.c
9013 for i in 1 2 3 4 5 6; do
9014 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9015 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9016 # Solaris 8's {/usr,}/bin/sh.
9017 touch sub/conftst$i.h
9018 done
9019 echo "include sub/conftest.Po" > confmf
9020
9021 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9022 # mode. It turns out that the SunPro C++ compiler does not properly
9023 # handle `-M -o', and we need to detect this.
9024 depcmd="depmode=$depmode \
9025 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9026 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9027 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
9028 echo "| $depcmd" | sed -e 's/ */ /g' >&5
9029 if env $depcmd > conftest.err 2>&1 &&
9030 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
9031 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
9032 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
9033 # icc doesn't choke on unknown options, it will just issue warnings
9034 # or remarks (even with -Werror). So we grep stderr for any message
9035 # that says an option was ignored or not supported.
9036 # When given -MP, icc 7.0 and 7.1 complain thusly:
9037 # icc: Command line warning: ignoring option '-M'; no argument required
9038 # The diagnosis changed in icc 8.0:
9039 # icc: Command line remark: option '-MP' not supported
9040 if (grep 'ignoring option' conftest.err ||
9041 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9042 am_cv_CC_dependencies_compiler_type=$depmode
9043 $as_echo "$as_me:$LINENO: success" >&5
9044 break
9045 fi
9046 fi
9047 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
9048 sed -e 's/^/| /' < conftest.err >&5
9049 done
9050
9051 cd ..
9052 rm -rf conftest.dir
9053else
9054 am_cv_CC_dependencies_compiler_type=none
9055fi
9056
9057fi
9058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
9059$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
9060if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
9061then as_fn_error $? "no usable dependency style found" "$LINENO" 5
9062else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
9063
9064fi
9065
9066
9067for ac_header in termios.h sys/reg.h string.h sys/procfs.h linux/elf.h fcntl.h signal.h sys/file.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h
9068do :
9069 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9070ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9071if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9072 cat >>confdefs.h <<_ACEOF
9073#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9074_ACEOF
9075
9076fi
9077
9078done
9079
9080for ac_header in vfork.h
9081do :
9082 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9083if test "x$ac_cv_header_vfork_h" = xyes; then :
9084 cat >>confdefs.h <<_ACEOF
9085#define HAVE_VFORK_H 1
9086_ACEOF
9087
9088fi
9089
9090done
9091
9092for ac_func in fork vfork
9093do :
9094 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9095ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9096if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9097 cat >>confdefs.h <<_ACEOF
9098#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9099_ACEOF
9100
9101fi
9102done
9103
9104if test "x$ac_cv_func_fork" = xyes; then
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9106$as_echo_n "checking for working fork... " >&6; }
9107if ${ac_cv_func_fork_works+:} false; then :
9108 $as_echo_n "(cached) " >&6
9109else
9110 if test "$cross_compiling" = yes; then :
9111 ac_cv_func_fork_works=cross
9112else
9113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9114/* end confdefs.h. */
9115$ac_includes_default
9116int
9117main ()
9118{
9119
9120 /* By Ruediger Kuhlmann. */
9121 return fork () < 0;
9122
9123 ;
9124 return 0;
9125}
9126_ACEOF
9127if ac_fn_c_try_run "$LINENO"; then :
9128 ac_cv_func_fork_works=yes
9129else
9130 ac_cv_func_fork_works=no
9131fi
9132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9133 conftest.$ac_objext conftest.beam conftest.$ac_ext
9134fi
9135
9136fi
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9138$as_echo "$ac_cv_func_fork_works" >&6; }
9139
9140else
9141 ac_cv_func_fork_works=$ac_cv_func_fork
9142fi
9143if test "x$ac_cv_func_fork_works" = xcross; then
9144 case $host in
9145 *-*-amigaos* | *-*-msdosdjgpp*)
9146 # Override, as these systems have only a dummy fork() stub
9147 ac_cv_func_fork_works=no
9148 ;;
9149 *)
9150 ac_cv_func_fork_works=yes
9151 ;;
9152 esac
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9154$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
9155fi
9156ac_cv_func_vfork_works=$ac_cv_func_vfork
9157if test "x$ac_cv_func_vfork" = xyes; then
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9159$as_echo_n "checking for working vfork... " >&6; }
9160if ${ac_cv_func_vfork_works+:} false; then :
9161 $as_echo_n "(cached) " >&6
9162else
9163 if test "$cross_compiling" = yes; then :
9164 ac_cv_func_vfork_works=cross
9165else
9166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9167/* end confdefs.h. */
9168/* Thanks to Paul Eggert for this test. */
9169$ac_includes_default
9170#include <sys/wait.h>
9171#ifdef HAVE_VFORK_H
9172# include <vfork.h>
9173#endif
9174/* On some sparc systems, changes by the child to local and incoming
9175 argument registers are propagated back to the parent. The compiler
9176 is told about this with #include <vfork.h>, but some compilers
9177 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9178 static variable whose address is put into a register that is
9179 clobbered by the vfork. */
9180static void
9181#ifdef __cplusplus
9182sparc_address_test (int arg)
9183# else
9184sparc_address_test (arg) int arg;
9185#endif
9186{
9187 static pid_t child;
9188 if (!child) {
9189 child = vfork ();
9190 if (child < 0) {
9191 perror ("vfork");
9192 _exit(2);
9193 }
9194 if (!child) {
9195 arg = getpid();
9196 write(-1, "", 0);
9197 _exit (arg);
9198 }
9199 }
9200}
9201
9202int
9203main ()
9204{
9205 pid_t parent = getpid ();
9206 pid_t child;
9207
9208 sparc_address_test (0);
9209
9210 child = vfork ();
9211
9212 if (child == 0) {
9213 /* Here is another test for sparc vfork register problems. This
9214 test uses lots of local variables, at least as many local
9215 variables as main has allocated so far including compiler
9216 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9217 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9218 reuse the register of parent for one of the local variables,
9219 since it will think that parent can't possibly be used any more
9220 in this routine. Assigning to the local variable will thus
9221 munge parent in the parent process. */
9222 pid_t
9223 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9224 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9225 /* Convince the compiler that p..p7 are live; otherwise, it might
9226 use the same hardware register for all 8 local variables. */
9227 if (p != p1 || p != p2 || p != p3 || p != p4
9228 || p != p5 || p != p6 || p != p7)
9229 _exit(1);
9230
9231 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9232 from child file descriptors. If the child closes a descriptor
9233 before it execs or exits, this munges the parent's descriptor
9234 as well. Test for this by closing stdout in the child. */
9235 _exit(close(fileno(stdout)) != 0);
9236 } else {
9237 int status;
9238 struct stat st;
9239
9240 while (wait(&status) != child)
9241 ;
9242 return (
9243 /* Was there some problem with vforking? */
9244 child < 0
9245
9246 /* Did the child fail? (This shouldn't happen.) */
9247 || status
9248
9249 /* Did the vfork/compiler bug occur? */
9250 || parent != getpid()
9251
9252 /* Did the file descriptor bug occur? */
9253 || fstat(fileno(stdout), &st) != 0
9254 );
9255 }
9256}
9257_ACEOF
9258if ac_fn_c_try_run "$LINENO"; then :
9259 ac_cv_func_vfork_works=yes
9260else
9261 ac_cv_func_vfork_works=no
9262fi
9263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9264 conftest.$ac_objext conftest.beam conftest.$ac_ext
9265fi
9266
9267fi
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9269$as_echo "$ac_cv_func_vfork_works" >&6; }
9270
9271fi;
9272if test "x$ac_cv_func_fork_works" = xcross; then
9273 ac_cv_func_vfork_works=$ac_cv_func_vfork
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9275$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9276fi
9277
9278if test "x$ac_cv_func_vfork_works" = xyes; then
9279
9280$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
9281
9282else
9283
9284$as_echo "#define vfork fork" >>confdefs.h
9285
9286fi
9287if test "x$ac_cv_func_fork_works" = xyes; then
9288
9289$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
9290
9291fi
9292
9293for ac_func in pread pwrite pread64
9294do :
9295 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9296ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9297if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9298 cat >>confdefs.h <<_ACEOF
9299#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9300_ACEOF
9301
9302fi
9303done
9304
9305
9306# Check the return and argument types of ptrace.
9307
9308
9309for ac_header in sys/ptrace.h ptrace.h
9310do :
9311 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9312ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9313if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9314 cat >>confdefs.h <<_ACEOF
9315#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9316_ACEOF
9317
9318fi
9319
9320done
9321
9322
9323gdb_ptrace_headers='
9324#include <sys/types.h>
9325#if HAVE_SYS_PTRACE_H
9326# include <sys/ptrace.h>
9327#endif
9328#if HAVE_UNISTD_H
9329# include <unistd.h>
9330#endif
9331'
9332# There is no point in checking if we don't have a prototype.
9333ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
9334"
9335if test "x$ac_cv_have_decl_ptrace" = xyes; then :
9336 ac_have_decl=1
9337else
9338 ac_have_decl=0
9339fi
9340
9341cat >>confdefs.h <<_ACEOF
9342#define HAVE_DECL_PTRACE $ac_have_decl
9343_ACEOF
9344if test $ac_have_decl = 1; then :
9345
9346else
9347
9348 : ${gdb_cv_func_ptrace_ret='int'}
9349 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
9350
9351fi
9352
9353# Check return type. Varargs (used on GNU/Linux) conflict with the
9354# empty argument list, so check for that explicitly.
9355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
9356$as_echo_n "checking return type of ptrace... " >&6; }
9357if ${gdb_cv_func_ptrace_ret+:} false; then :
9358 $as_echo_n "(cached) " >&6
9359else
9360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9361/* end confdefs.h. */
9362$gdb_ptrace_headers
9363int
9364main ()
9365{
9366extern long ptrace (enum __ptrace_request, ...);
9367 ;
9368 return 0;
9369}
9370_ACEOF
9371if ac_fn_c_try_compile "$LINENO"; then :
9372 gdb_cv_func_ptrace_ret='long'
9373else
9374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9375/* end confdefs.h. */
9376$gdb_ptrace_headers
9377int
9378main ()
9379{
9380extern int ptrace ();
9381 ;
9382 return 0;
9383}
9384_ACEOF
9385if ac_fn_c_try_compile "$LINENO"; then :
9386 gdb_cv_func_ptrace_ret='int'
9387else
9388 gdb_cv_func_ptrace_ret='long'
9389fi
9390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9391fi
9392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
9395$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
9396
9397cat >>confdefs.h <<_ACEOF
9398#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
9399_ACEOF
9400
9401# Check argument types.
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
9403$as_echo_n "checking types of arguments for ptrace... " >&6; }
9404if ${gdb_cv_func_ptrace_args+:} false; then :
9405 $as_echo_n "(cached) " >&6
9406else
9407
9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409/* end confdefs.h. */
9410$gdb_ptrace_headers
9411int
9412main ()
9413{
9414extern long ptrace (enum __ptrace_request, ...);
9415 ;
9416 return 0;
9417}
9418_ACEOF
9419if ac_fn_c_try_compile "$LINENO"; then :
9420 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
9421else
9422
9423for gdb_arg1 in 'int' 'long'; do
9424 for gdb_arg2 in 'pid_t' 'int' 'long'; do
9425 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
9426 for gdb_arg4 in 'int' 'long' 'void *'; do
9427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9428/* end confdefs.h. */
9429$gdb_ptrace_headers
9430int
9431main ()
9432{
9433
9434extern $gdb_cv_func_ptrace_ret
9435 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
9436
9437 ;
9438 return 0;
9439}
9440_ACEOF
9441if ac_fn_c_try_compile "$LINENO"; then :
9442 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
9443 break 4;
9444fi
9445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9446 for gdb_arg5 in 'int *' 'int' 'long'; do
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9448/* end confdefs.h. */
9449$gdb_ptrace_headers
9450int
9451main ()
9452{
9453
9454extern $gdb_cv_func_ptrace_ret
9455 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
9456
9457 ;
9458 return 0;
9459}
9460_ACEOF
9461if ac_fn_c_try_compile "$LINENO"; then :
9462
9463gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
9464 break 5;
9465fi
9466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9467 done
9468 done
9469 done
9470 done
9471done
9472# Provide a safe default value.
9473: ${gdb_cv_func_ptrace_args='int,int,long,long'}
9474
9475fi
9476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9477fi
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
9479$as_echo "$gdb_cv_func_ptrace_args" >&6; }
9480ac_save_IFS=$IFS; IFS=','
9481set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
9482IFS=$ac_save_IFS
9483shift
9484
9485cat >>confdefs.h <<_ACEOF
9486#define PTRACE_TYPE_ARG1 $1
9487_ACEOF
9488
9489
9490cat >>confdefs.h <<_ACEOF
9491#define PTRACE_TYPE_ARG3 $3
9492_ACEOF
9493
9494
9495cat >>confdefs.h <<_ACEOF
9496#define PTRACE_TYPE_ARG4 $4
9497_ACEOF
9498
9499if test -n "$5"; then
9500
9501cat >>confdefs.h <<_ACEOF
9502#define PTRACE_TYPE_ARG5 $5
9503_ACEOF
9504
9505fi
9506
9507
9508# Check for UST
9509ustlibs=""
9510ustinc=""
9511
9512
9513# Check whether --with-ust was given.
9514if test "${with_ust+set}" = set; then :
9515 withval=$with_ust;
9516fi
9517
9518
9519# Check whether --with-ust_include was given.
9520if test "${with_ust_include+set}" = set; then :
9521 withval=$with_ust_include;
9522fi
9523
9524
9525# Check whether --with-ust_lib was given.
9526if test "${with_ust_lib+set}" = set; then :
9527 withval=$with_ust_lib;
9528fi
9529
9530
9531case $with_ust in
9532 no)
9533 ustlibs=
9534 ustinc=
9535 ;;
9536 "" | yes)
9537 ustlibs=" -lust "
9538 ustinc=""
9539 ;;
9540 *)
9541 ustlibs="-L$with_ust/lib -lust"
9542 ustinc="-I$with_ust/include "
9543 ;;
9544esac
9545if test "x$with_ust_include" != x; then
9546 ustinc="-I$with_ust_include "
9547fi
9548if test "x$with_ust_lib" != x; then
9549 ustlibs="-L$with_ust_lib -lust"
9550fi
9551
9552if test "x$with_ust" != "xno"; then
9553 saved_CFLAGS="$CFLAGS"
9554 CFLAGS="$CFLAGS $ustinc"
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
9556$as_echo_n "checking for ust... " >&6; }
9557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9558/* end confdefs.h. */
9559
9560#define CONFIG_UST_GDB_INTEGRATION
9561#include <ust/ust.h>
9562
9563int
9564main ()
9565{
9566
9567 ;
9568 return 0;
9569}
9570_ACEOF
9571if ac_fn_c_try_compile "$LINENO"; then :
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9573$as_echo "yes" >&6; };
9574$as_echo "#define HAVE_UST 1" >>confdefs.h
9575
9576else
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578$as_echo "no" >&6; }; ustlibs= ; ustinc=
9579fi
9580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9581 CFLAGS="$saved_CFLAGS"
9582fi
9583
9584# Flags needed for UST
9585
9586
9587
9588
9589# Check whether --enable-werror was given.
9590if test "${enable_werror+set}" = set; then :
9591 enableval=$enable_werror; case "${enableval}" in
9592 yes | y) ERROR_ON_WARNING="yes" ;;
9593 no | n) ERROR_ON_WARNING="no" ;;
9594 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
9595 esac
9596fi
9597
9598
9599# Enable -Werror by default when using gcc. Turn it off for releases.
9600if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
9601 ERROR_ON_WARNING=yes
9602fi
9603
9604WERROR_CFLAGS=""
9605if test "${ERROR_ON_WARNING}" = yes ; then
9606 WERROR_CFLAGS="-Werror"
9607fi
9608
9609# The options we'll try to enable.
9610build_warnings="-Wall -Wpointer-arith \
9611-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
9612-Wno-switch -Wno-char-subscripts \
9613-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
9614-Wno-sign-compare -Wno-error=maybe-uninitialized \
9615-Wno-mismatched-tags \
9616-Wno-error=deprecated-register \
9617-Wsuggest-override \
9618-Wimplicit-fallthrough=3 \
9619-Wduplicated-cond \
9620-Wshadow=local \
9621-Wdeprecated-copy \
9622-Wdeprecated-copy-dtor \
9623-Wredundant-move \
9624-Wmissing-declarations \
9625-Wmissing-prototypes \
9626-Wstrict-null-sentinel \
9627"
9628
9629case "${host}" in
9630 *-*-mingw32*)
9631 # Enable -Wno-format by default when using gcc on mingw since many
9632 # GCC versions complain about %I64.
9633 build_warnings="$build_warnings -Wno-format" ;;
9634 *-*-solaris*)
9635 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
9636 # doesn't understand.
9637 build_warnings="$build_warnings -Wno-unknown-pragmas"
9638 # Solaris 11 <unistd.h> marks vfork deprecated.
9639 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
9640 *)
9641 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
9642 # but there's a special case for this below.
9643 build_warnings="$build_warnings -Wformat-nonliteral" ;;
9644esac
9645
9646# Check whether --enable-build-warnings was given.
9647if test "${enable_build_warnings+set}" = set; then :
9648 enableval=$enable_build_warnings; case "${enableval}" in
9649 yes) ;;
9650 no) build_warnings="-w";;
9651 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9652 build_warnings="${build_warnings} ${t}";;
9653 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9654 build_warnings="${t} ${build_warnings}";;
9655 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9656esac
9657if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9658 echo "Setting compiler warning flags = $build_warnings" 6>&1
9659fi
9660fi
9661# Check whether --enable-gdb-build-warnings was given.
9662if test "${enable_gdb_build_warnings+set}" = set; then :
9663 enableval=$enable_gdb_build_warnings; case "${enableval}" in
9664 yes) ;;
9665 no) build_warnings="-w";;
9666 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9667 build_warnings="${build_warnings} ${t}";;
9668 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9669 build_warnings="${t} ${build_warnings}";;
9670 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9671esac
9672if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9673 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9674fi
9675fi
9676
9677# The set of warnings supported by a C++ compiler is not the same as
9678# of the C compiler.
9679ac_ext=cpp
9680ac_cpp='$CXXCPP $CPPFLAGS'
9681ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9682ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9683ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9684
9685
9686WARN_CFLAGS=""
9687if test "x${build_warnings}" != x -a "x$GCC" = xyes
9688then
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
9690$as_echo_n "checking compiler warning flags... " >&6; }
9691 # Separate out the -Werror flag as some files just cannot be
9692 # compiled with it enabled.
9693 for w in ${build_warnings}; do
9694 # GCC does not complain about -Wno-unknown-warning. Invert
9695 # and test -Wunknown-warning instead.
9696 case $w in
9697 -Wno-*)
9698 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
9699 -Wformat-nonliteral)
9700 # gcc requires -Wformat before -Wformat-nonliteral
9701 # will work, so stick them together.
9702 w="-Wformat $w"
9703 wtest="$w"
9704 ;;
9705 *)
9706 wtest=$w ;;
9707 esac
9708
9709 case $w in
9710 -Werr*) WERROR_CFLAGS=-Werror ;;
9711 *)
9712 # Check whether GCC accepts it.
9713 saved_CFLAGS="$CFLAGS"
9714 CFLAGS="$CFLAGS -Werror $wtest"
9715 saved_CXXFLAGS="$CXXFLAGS"
9716 CXXFLAGS="$CXXFLAGS -Werror $wtest"
9717 if test "x$w" = "x-Wunused-variable"; then
9718 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
9719 # fixed in GCC 4.9. This test is derived from the gdb
9720 # source code that triggered this bug in GCC.
9721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9722/* end confdefs.h. */
9723struct scoped_restore_base {};
9724 struct scoped_restore_tmpl : public scoped_restore_base {
9725 ~scoped_restore_tmpl() {}
9726 };
9727int
9728main ()
9729{
9730const scoped_restore_base &b = scoped_restore_tmpl();
9731 ;
9732 return 0;
9733}
9734_ACEOF
9735if ac_fn_cxx_try_compile "$LINENO"; then :
9736 WARN_CFLAGS="${WARN_CFLAGS} $w"
9737fi
9738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9739 else
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741/* end confdefs.h. */
9742
9743int
9744main ()
9745{
9746
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751if ac_fn_cxx_try_compile "$LINENO"; then :
9752 WARN_CFLAGS="${WARN_CFLAGS} $w"
9753fi
9754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9755 fi
9756 CFLAGS="$saved_CFLAGS"
9757 CXXFLAGS="$saved_CXXFLAGS"
9758 esac
9759 done
9760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
9761$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
9762fi
9763
9764
9765
9766ac_ext=c
9767ac_cpp='$CPP $CPPFLAGS'
9768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9770ac_compiler_gnu=$ac_cv_c_compiler_gnu
9771
9772
9773
9774old_LIBS="$LIBS"
9775LIBS="$LIBS -ldl"
9776for ac_func in dladdr
9777do :
9778 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
9779if test "x$ac_cv_func_dladdr" = xyes; then :
9780 cat >>confdefs.h <<_ACEOF
9781#define HAVE_DLADDR 1
9782_ACEOF
9783
9784fi
9785done
9786
9787LIBS="$old_LIBS"
9788
9789
9790 # Check for presence and size of long long.
9791 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9792if test "x$ac_cv_type_long_long" = xyes; then :
9793
9794cat >>confdefs.h <<_ACEOF
9795#define HAVE_LONG_LONG 1
9796_ACEOF
9797
9798# The cast to long int works around a bug in the HP C Compiler
9799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9801# This bug is HP SR number 8606223364.
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9803$as_echo_n "checking size of long long... " >&6; }
9804if ${ac_cv_sizeof_long_long+:} false; then :
9805 $as_echo_n "(cached) " >&6
9806else
9807 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
9808
9809else
9810 if test "$ac_cv_type_long_long" = yes; then
9811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9813as_fn_error 77 "cannot compute sizeof (long long)
9814See \`config.log' for more details" "$LINENO" 5; }
9815 else
9816 ac_cv_sizeof_long_long=0
9817 fi
9818fi
9819
9820fi
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9822$as_echo "$ac_cv_sizeof_long_long" >&6; }
9823
9824
9825
9826cat >>confdefs.h <<_ACEOF
9827#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9828_ACEOF
9829
9830
9831fi
9832
9833
9834 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
9835ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
9836if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
9837 ac_have_decl=1
9838else
9839 ac_have_decl=0
9840fi
9841
9842cat >>confdefs.h <<_ACEOF
9843#define HAVE_DECL_BASENAME $ac_have_decl
9844_ACEOF
9845ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
9846if test "x$ac_cv_have_decl_ffs" = xyes; then :
9847 ac_have_decl=1
9848else
9849 ac_have_decl=0
9850fi
9851
9852cat >>confdefs.h <<_ACEOF
9853#define HAVE_DECL_FFS $ac_have_decl
9854_ACEOF
9855ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
9856if test "x$ac_cv_have_decl_asprintf" = xyes; then :
9857 ac_have_decl=1
9858else
9859 ac_have_decl=0
9860fi
9861
9862cat >>confdefs.h <<_ACEOF
9863#define HAVE_DECL_ASPRINTF $ac_have_decl
9864_ACEOF
9865ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
9866if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
9867 ac_have_decl=1
9868else
9869 ac_have_decl=0
9870fi
9871
9872cat >>confdefs.h <<_ACEOF
9873#define HAVE_DECL_VASPRINTF $ac_have_decl
9874_ACEOF
9875ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9876if test "x$ac_cv_have_decl_snprintf" = xyes; then :
9877 ac_have_decl=1
9878else
9879 ac_have_decl=0
9880fi
9881
9882cat >>confdefs.h <<_ACEOF
9883#define HAVE_DECL_SNPRINTF $ac_have_decl
9884_ACEOF
9885ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9886if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
9887 ac_have_decl=1
9888else
9889 ac_have_decl=0
9890fi
9891
9892cat >>confdefs.h <<_ACEOF
9893#define HAVE_DECL_VSNPRINTF $ac_have_decl
9894_ACEOF
9895
9896 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
9897if test "x$ac_cv_have_decl_strtol" = xyes; then :
9898 ac_have_decl=1
9899else
9900 ac_have_decl=0
9901fi
9902
9903cat >>confdefs.h <<_ACEOF
9904#define HAVE_DECL_STRTOL $ac_have_decl
9905_ACEOF
9906ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
9907if test "x$ac_cv_have_decl_strtoul" = xyes; then :
9908 ac_have_decl=1
9909else
9910 ac_have_decl=0
9911fi
9912
9913cat >>confdefs.h <<_ACEOF
9914#define HAVE_DECL_STRTOUL $ac_have_decl
9915_ACEOF
9916ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
9917if test "x$ac_cv_have_decl_strtoll" = xyes; then :
9918 ac_have_decl=1
9919else
9920 ac_have_decl=0
9921fi
9922
9923cat >>confdefs.h <<_ACEOF
9924#define HAVE_DECL_STRTOLL $ac_have_decl
9925_ACEOF
9926ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
9927if test "x$ac_cv_have_decl_strtoull" = xyes; then :
9928 ac_have_decl=1
9929else
9930 ac_have_decl=0
9931fi
9932
9933cat >>confdefs.h <<_ACEOF
9934#define HAVE_DECL_STRTOULL $ac_have_decl
9935_ACEOF
9936
9937 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
9938if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
9939 ac_have_decl=1
9940else
9941 ac_have_decl=0
9942fi
9943
9944cat >>confdefs.h <<_ACEOF
9945#define HAVE_DECL_STRVERSCMP $ac_have_decl
9946_ACEOF
9947
9948
9949
9950ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
9951if test "x$ac_cv_have_decl_perror" = xyes; then :
9952 ac_have_decl=1
9953else
9954 ac_have_decl=0
9955fi
9956
9957cat >>confdefs.h <<_ACEOF
9958#define HAVE_DECL_PERROR $ac_have_decl
9959_ACEOF
9960ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
9961if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
9962 ac_have_decl=1
9963else
9964 ac_have_decl=0
9965fi
9966
9967cat >>confdefs.h <<_ACEOF
9968#define HAVE_DECL_VASPRINTF $ac_have_decl
9969_ACEOF
9970ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9971if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
9972 ac_have_decl=1
9973else
9974 ac_have_decl=0
9975fi
9976
9977cat >>confdefs.h <<_ACEOF
9978#define HAVE_DECL_VSNPRINTF $ac_have_decl
9979_ACEOF
9980
9981
9982# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
9983# Older amd64 Linux's don't have the fs_base and gs_base members of
9984# `struct user_regs_struct'.
9985ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
9986#include <sys/user.h>
9987"
9988if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
9989
9990cat >>confdefs.h <<_ACEOF
9991#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
9992_ACEOF
9993
9994
9995fi
9996ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
9997#include <sys/user.h>
9998"
9999if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
10000
10001cat >>confdefs.h <<_ACEOF
10002#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10003_ACEOF
10004
10005
10006fi
10007
10008
10009
10010ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
10011#include <sys/socket.h>
10012
10013"
10014if test "x$ac_cv_type_socklen_t" = xyes; then :
10015
10016cat >>confdefs.h <<_ACEOF
10017#define HAVE_SOCKLEN_T 1
10018_ACEOF
10019
10020
10021fi
10022
10023
10024case "${target}" in
10025 *-android*)
10026 # Starting with NDK version 9, <elf.h> actually includes definitions
10027 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
10028 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
10029 # leading to conflicts with the defintions from <linux/elf.h>.
10030 # This makes it impossible for us to include both <elf.h> and
10031 # <linux/elf.h>, which means that, in practice, we do not have
10032 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
10033 # Therefore, do not try to auto-detect availability, as it would
10034 # get it wrong on this platform.
10035 ;;
10036 *)
10037 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
10038
10039"
10040if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
10041
10042cat >>confdefs.h <<_ACEOF
10043#define HAVE_ELF32_AUXV_T 1
10044_ACEOF
10045
10046
10047fi
10048ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
10049
10050"
10051if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
10052
10053cat >>confdefs.h <<_ACEOF
10054#define HAVE_ELF64_AUXV_T 1
10055_ACEOF
10056
10057
10058fi
10059
10060esac
10061
10062
10063
10064# Check whether --with-pkgversion was given.
10065if test "${with_pkgversion+set}" = set; then :
10066 withval=$with_pkgversion; case "$withval" in
10067 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
10068 no) PKGVERSION= ;;
10069 *) PKGVERSION="($withval) " ;;
10070 esac
10071else
10072 PKGVERSION="(GDB) "
10073
10074fi
10075
10076
10077
10078
10079
10080# Check whether --with-bugurl was given.
10081if test "${with_bugurl+set}" = set; then :
10082 withval=$with_bugurl; case "$withval" in
10083 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
10084 no) BUGURL=
10085 ;;
10086 *) BUGURL="$withval"
10087 ;;
10088 esac
10089else
10090 BUGURL="http://www.gnu.org/software/gdb/bugs/"
10091
10092fi
10093
10094 case ${BUGURL} in
10095 "")
10096 REPORT_BUGS_TO=
10097 REPORT_BUGS_TEXI=
10098 ;;
10099 *)
10100 REPORT_BUGS_TO="<$BUGURL>"
10101 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
10102 ;;
10103 esac;
10104
10105
10106
10107
10108cat >>confdefs.h <<_ACEOF
10109#define PKGVERSION "$PKGVERSION"
10110_ACEOF
10111
10112
10113cat >>confdefs.h <<_ACEOF
10114#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
10115_ACEOF
10116
10117
10118# Check for various supplementary target information (beyond the
10119# triplet) which might affect the choices in configure.srv.
10120case "${target}" in
10121 i[34567]86-*-linux*)
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
10123$as_echo_n "checking if building for x86-64... " >&6; }
10124if ${gdb_cv_i386_is_x86_64+:} false; then :
10125 $as_echo_n "(cached) " >&6
10126else
10127 save_CPPFLAGS="$CPPFLAGS"
10128 CPPFLAGS="$CPPFLAGS $CFLAGS"
10129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10130/* end confdefs.h. */
10131
10132#if __x86_64__
10133got it
10134#endif
10135
10136_ACEOF
10137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10138 $EGREP "got it" >/dev/null 2>&1; then :
10139 gdb_cv_i386_is_x86_64=yes
10140else
10141 gdb_cv_i386_is_x86_64=no
10142fi
10143rm -f conftest*
10144
10145 CPPFLAGS="$save_CPPFLAGS"
10146fi
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
10148$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
10149 ;;
10150
10151 x86_64-*-linux*)
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
10153$as_echo_n "checking if building for x32... " >&6; }
10154if ${gdb_cv_x86_is_x32+:} false; then :
10155 $as_echo_n "(cached) " >&6
10156else
10157 save_CPPFLAGS="$CPPFLAGS"
10158 CPPFLAGS="$CPPFLAGS $CFLAGS"
10159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10160/* end confdefs.h. */
10161
10162#if __x86_64__ && __ILP32__
10163got it
10164#endif
10165
10166_ACEOF
10167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10168 $EGREP "got it" >/dev/null 2>&1; then :
10169 gdb_cv_x86_is_x32=yes
10170else
10171 gdb_cv_x86_is_x32=no
10172fi
10173rm -f conftest*
10174
10175 CPPFLAGS="$save_CPPFLAGS"
10176fi
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
10178$as_echo "$gdb_cv_x86_is_x32" >&6; }
10179 ;;
10180
10181 m68k-*-*)
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
10183$as_echo_n "checking if building for Coldfire... " >&6; }
10184if ${gdb_cv_m68k_is_coldfire+:} false; then :
10185 $as_echo_n "(cached) " >&6
10186else
10187 save_CPPFLAGS="$CPPFLAGS"
10188 CPPFLAGS="$CPPFLAGS $CFLAGS"
10189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190/* end confdefs.h. */
10191
10192#ifdef __mcoldfire__
10193got it
10194#endif
10195
10196_ACEOF
10197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10198 $EGREP "got it" >/dev/null 2>&1; then :
10199 gdb_cv_m68k_is_coldfire=yes
10200else
10201 gdb_cv_m68k_is_coldfire=no
10202fi
10203rm -f conftest*
10204
10205 CPPFLAGS="$save_CPPFLAGS"
10206fi
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
10208$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
10209 ;;
10210esac
10211
10212. ${srcdir}/configure.srv
10213
10214if test "${srv_mingwce}" = "yes"; then
10215 LIBS="$LIBS -lws2"
10216elif test "${srv_mingw}" = "yes"; then
10217 # WIN32APILIBS is set by GDB_AC_COMMON.
10218 LIBS="$LIBS $WIN32APILIBS"
10219elif test "${srv_qnx}" = "yes"; then
10220 LIBS="$LIBS -lsocket"
10221elif test "${srv_lynxos}" = "yes"; then
10222 LIBS="$LIBS -lnetinet"
10223fi
10224
10225if test "${srv_linux_usrregs}" = "yes"; then
10226
10227$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
10228
10229fi
10230
10231if test "${srv_linux_regsets}" = "yes"; then
10232
10233$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
10234
10235
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10237$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10238 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
10239 $as_echo_n "(cached) " >&6
10240else
10241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10242/* end confdefs.h. */
10243#include <sys/ptrace.h>
10244int
10245main ()
10246{
10247PTRACE_GETREGS;
10248 ;
10249 return 0;
10250}
10251_ACEOF
10252if ac_fn_c_try_compile "$LINENO"; then :
10253 gdbsrv_cv_have_ptrace_getregs=yes
10254else
10255 gdbsrv_cv_have_ptrace_getregs=no
10256fi
10257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10258fi
10259
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
10261$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
10262 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
10263
10264$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
10265
10266 fi
10267
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10269$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10270 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
10271 $as_echo_n "(cached) " >&6
10272else
10273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10274/* end confdefs.h. */
10275#include <sys/ptrace.h>
10276int
10277main ()
10278{
10279PTRACE_GETFPXREGS;
10280 ;
10281 return 0;
10282}
10283_ACEOF
10284if ac_fn_c_try_compile "$LINENO"; then :
10285 gdbsrv_cv_have_ptrace_getfpxregs=yes
10286else
10287 gdbsrv_cv_have_ptrace_getfpxregs=no
10288fi
10289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10290fi
10291
10292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
10293$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
10294 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
10295
10296$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
10297
10298 fi
10299fi
10300
10301if test "${srv_linux_btrace}" = "yes"; then
10302
10303$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
10304
10305fi
10306
10307if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
10309$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
10310 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
10311 $as_echo_n "(cached) " >&6
10312else
10313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10314/* end confdefs.h. */
10315
10316#include <thread_db.h>
10317int
10318main ()
10319{
10320lwpid_t avar
10321 ;
10322 return 0;
10323}
10324_ACEOF
10325if ac_fn_c_try_compile "$LINENO"; then :
10326 gdbserver_cv_have_thread_db_type_lwpid_t=yes
10327else
10328 gdbserver_cv_have_thread_db_type_lwpid_t=no
10329
10330fi
10331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10332fi
10333
10334 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
10335
10336$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10337
10338 fi
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
10340$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
10341
10342fi
10343
10344if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
10346$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
10347 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
10348 $as_echo_n "(cached) " >&6
10349else
10350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10351/* end confdefs.h. */
10352
10353#include <thread_db.h>
10354int
10355main ()
10356{
10357psaddr_t avar
10358 ;
10359 return 0;
10360}
10361_ACEOF
10362if ac_fn_c_try_compile "$LINENO"; then :
10363 gdbserver_cv_have_thread_db_type_psaddr_t=yes
10364else
10365 gdbserver_cv_have_thread_db_type_psaddr_t=no
10366
10367fi
10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10369fi
10370
10371 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
10372
10373$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10374
10375 fi
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
10377$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
10378
10379fi
10380
10381old_LIBS="$LIBS"
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10383$as_echo_n "checking for dlopen in -ldl... " >&6; }
10384if ${ac_cv_lib_dl_dlopen+:} false; then :
10385 $as_echo_n "(cached) " >&6
10386else
10387 ac_check_lib_save_LIBS=$LIBS
10388LIBS="-ldl $LIBS"
10389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10390/* end confdefs.h. */
10391
10392/* Override any GCC internal prototype to avoid an error.
10393 Use char because int might match the return type of a GCC
10394 builtin and then its argument prototype would still apply. */
10395#ifdef __cplusplus
10396extern "C"
10397#endif
10398char dlopen ();
10399int
10400main ()
10401{
10402return dlopen ();
10403 ;
10404 return 0;
10405}
10406_ACEOF
10407if ac_fn_c_try_link "$LINENO"; then :
10408 ac_cv_lib_dl_dlopen=yes
10409else
10410 ac_cv_lib_dl_dlopen=no
10411fi
10412rm -f core conftest.err conftest.$ac_objext \
10413 conftest$ac_exeext conftest.$ac_ext
10414LIBS=$ac_check_lib_save_LIBS
10415fi
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10417$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10418if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10419 cat >>confdefs.h <<_ACEOF
10420#define HAVE_LIBDL 1
10421_ACEOF
10422
10423 LIBS="-ldl $LIBS"
10424
10425fi
10426
10427LIBS="$old_LIBS"
10428
10429srv_thread_depfiles=
10430srv_libs=
10431
10432if test "$srv_linux_thread_db" = "yes"; then
10433 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
10434 srv_libs="-ldl"
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
10436$as_echo_n "checking for the dynamic export flag... " >&6; }
10437 old_LDFLAGS="$LDFLAGS"
10438 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
10439 # supported there.
10440 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
10441 LDFLAGS="$LDFLAGS $RDYNAMIC"
10442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443/* end confdefs.h. */
10444
10445int
10446main ()
10447{
10448
10449 ;
10450 return 0;
10451}
10452_ACEOF
10453if ac_fn_c_try_link "$LINENO"; then :
10454 found="-Wl,--dynamic-list"
10455 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
10456else
10457 RDYNAMIC="-rdynamic"
10458 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
10459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10460/* end confdefs.h. */
10461
10462int
10463main ()
10464{
10465
10466 ;
10467 return 0;
10468}
10469_ACEOF
10470if ac_fn_c_try_link "$LINENO"; then :
10471 found="-rdynamic"
10472else
10473 found="no"
10474 RDYNAMIC=""
10475fi
10476rm -f core conftest.err conftest.$ac_objext \
10477 conftest$ac_exeext conftest.$ac_ext
10478fi
10479rm -f core conftest.err conftest.$ac_objext \
10480 conftest$ac_exeext conftest.$ac_ext
10481
10482 LDFLAGS="$old_LDFLAGS"
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
10484$as_echo "$found" >&6; }
10485 else
10486 srv_libs="-lthread_db"
10487 fi
10488
10489 srv_thread_depfiles="thread-db.o proc-service.o"
10490
10491$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
10492
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
10494$as_echo_n "checking for TD_VERSION... " >&6; }
10495if ${gdbsrv_cv_have_td_version+:} false; then :
10496 $as_echo_n "(cached) " >&6
10497else
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499/* end confdefs.h. */
10500#include <thread_db.h>
10501int
10502main ()
10503{
10504TD_VERSION;
10505 ;
10506 return 0;
10507}
10508_ACEOF
10509if ac_fn_c_try_compile "$LINENO"; then :
10510 gdbsrv_cv_have_td_version=yes
10511else
10512 gdbsrv_cv_have_td_version=no
10513fi
10514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10515fi
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
10517$as_echo "$gdbsrv_cv_have_td_version" >&6; }
10518 if test "$gdbsrv_cv_have_td_version" = yes; then
10519
10520$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
10521
10522 fi
10523fi
10524
10525
10526# Check whether --with-libthread-db was given.
10527if test "${with_libthread_db+set}" = set; then :
10528 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
10529 srv_libs="$srv_libthread_db_path"
10530
10531fi
10532
10533
10534if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
10535
10536$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
10537
10538fi
10539
10540if test "$srv_xmlfiles" != ""; then
10541 srv_xmlbuiltin="xml-builtin.o"
10542
10543$as_echo "#define USE_XML 1" >>confdefs.h
10544
10545
10546 tmp_xmlfiles=$srv_xmlfiles
10547 srv_xmlfiles=""
10548 for f in $tmp_xmlfiles; do
10549 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
10550 done
10551fi
10552
10553GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs"
10554GDBSERVER_LIBS="$srv_libs"
10555
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
10557$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
10558if ${gdbsrv_cv_have_sync_builtins+:} false; then :
10559 $as_echo_n "(cached) " >&6
10560else
10561
10562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10563/* end confdefs.h. */
10564
10565int
10566main ()
10567{
10568int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573if ac_fn_c_try_link "$LINENO"; then :
10574 gdbsrv_cv_have_sync_builtins=yes
10575else
10576 gdbsrv_cv_have_sync_builtins=no
10577fi
10578rm -f core conftest.err conftest.$ac_objext \
10579 conftest$ac_exeext conftest.$ac_ext
10580fi
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
10582$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
10583if test "$gdbsrv_cv_have_sync_builtins" = yes; then
10584
10585$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
10586
10587fi
10588
10589saved_cflags="$CFLAGS"
10590CFLAGS="$CFLAGS -fvisibility=hidden"
10591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10592/* end confdefs.h. */
10593
10594int
10595main ()
10596{
10597
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602if ac_fn_c_try_compile "$LINENO"; then :
10603 gdbsrv_cv_have_visibility_hidden=yes
10604else
10605 gdbsrv_cv_have_visibility_hidden=no
10606fi
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10608CFLAGS="$saved_cflags"
10609
10610IPA_DEPFILES=""
10611extra_libraries=""
10612
10613# check whether to enable the inprocess agent
10614if test "$ipa_obj" != "" \
10615 -a "$gdbsrv_cv_have_sync_builtins" = yes \
10616 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
10617 have_ipa=true
10618else
10619 have_ipa=false
10620fi
10621
10622# Check whether --enable-inprocess-agent was given.
10623if test "${enable_inprocess_agent+set}" = set; then :
10624 enableval=$enable_inprocess_agent; case "$enableval" in
10625 yes) want_ipa=true ;;
10626 no) want_ipa=false ;;
10627 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
10628esac
10629else
10630 want_ipa=$have_ipa
10631fi
10632
10633
10634if $want_ipa ; then
10635 if $have_ipa ; then
10636 IPA_DEPFILES="$ipa_obj"
10637 extra_libraries="$extra_libraries libinproctrace.so"
10638 else
10639 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
10640 fi
10641fi
10642
10643
10644
10645
10646
10647
10648
10649
10650GNULIB=../gnulib/import
10651
10652GNULIB_STDINT_H=
10653if test x"$STDINT_H" != x; then
10654 GNULIB_STDINT_H=$GNULIB/$STDINT_H
10655fi
10656
10657
10658ac_config_files="$ac_config_files Makefile"
10659
10660
10661cat >confcache <<\_ACEOF
10662# This file is a shell script that caches the results of configure
10663# tests run on this system so they can be shared between configure
10664# scripts and configure runs, see configure's option --config-cache.
10665# It is not useful on other systems. If it contains results you don't
10666# want to keep, you may remove or edit it.
10667#
10668# config.status only pays attention to the cache file if you give it
10669# the --recheck option to rerun configure.
10670#
10671# `ac_cv_env_foo' variables (set or unset) will be overridden when
10672# loading this file, other *unset* `ac_cv_foo' will be assigned the
10673# following values.
10674
10675_ACEOF
10676
10677# The following way of writing the cache mishandles newlines in values,
10678# but we know of no workaround that is simple, portable, and efficient.
10679# So, we kill variables containing newlines.
10680# Ultrix sh set writes to stderr and can't be redirected directly,
10681# and sets the high bit in the cache file unless we assign to the vars.
10682(
10683 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10684 eval ac_val=\$$ac_var
10685 case $ac_val in #(
10686 *${as_nl}*)
10687 case $ac_var in #(
10688 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10689$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10690 esac
10691 case $ac_var in #(
10692 _ | IFS | as_nl) ;; #(
10693 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10694 *) { eval $ac_var=; unset $ac_var;} ;;
10695 esac ;;
10696 esac
10697 done
10698
10699 (set) 2>&1 |
10700 case $as_nl`(ac_space=' '; set) 2>&1` in #(
10701 *${as_nl}ac_space=\ *)
10702 # `set' does not quote correctly, so add quotes: double-quote
10703 # substitution turns \\\\ into \\, and sed turns \\ into \.
10704 sed -n \
10705 "s/'/'\\\\''/g;
10706 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10707 ;; #(
10708 *)
10709 # `set' quotes correctly as required by POSIX, so do not add quotes.
10710 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10711 ;;
10712 esac |
10713 sort
10714) |
10715 sed '
10716 /^ac_cv_env_/b end
10717 t clear
10718 :clear
10719 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10720 t end
10721 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10722 :end' >>confcache
10723if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10724 if test -w "$cache_file"; then
10725 if test "x$cache_file" != "x/dev/null"; then
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10727$as_echo "$as_me: updating cache $cache_file" >&6;}
10728 if test ! -f "$cache_file" || test -h "$cache_file"; then
10729 cat confcache >"$cache_file"
10730 else
10731 case $cache_file in #(
10732 */* | ?:*)
10733 mv -f confcache "$cache_file"$$ &&
10734 mv -f "$cache_file"$$ "$cache_file" ;; #(
10735 *)
10736 mv -f confcache "$cache_file" ;;
10737 esac
10738 fi
10739 fi
10740 else
10741 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10742$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10743 fi
10744fi
10745rm -f confcache
10746
10747test "x$prefix" = xNONE && prefix=$ac_default_prefix
10748# Let make expand exec_prefix.
10749test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10750
10751DEFS=-DHAVE_CONFIG_H
10752
10753ac_libobjs=
10754ac_ltlibobjs=
10755U=
10756for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10757 # 1. Remove the extension, and $U if already installed.
10758 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10759 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10760 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10761 # will be set to the directory where LIBOBJS objects are built.
10762 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10763 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
10764done
10765LIBOBJS=$ac_libobjs
10766
10767LTLIBOBJS=$ac_ltlibobjs
10768
10769
10770if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
10771 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
10772Usually this means the macro was only invoked conditionally." "$LINENO" 5
10773fi
10774
10775: "${CONFIG_STATUS=./config.status}"
10776ac_write_fail=0
10777ac_clean_files_save=$ac_clean_files
10778ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10779{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10780$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10781as_write_fail=0
10782cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
10783#! $SHELL
10784# Generated by $as_me.
10785# Run this file to recreate the current configuration.
10786# Compiler output produced by configure, useful for debugging
10787# configure, is in config.log if it exists.
10788
10789debug=false
10790ac_cs_recheck=false
10791ac_cs_silent=false
10792
10793SHELL=\${CONFIG_SHELL-$SHELL}
10794export SHELL
10795_ASEOF
10796cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10797## -------------------- ##
10798## M4sh Initialization. ##
10799## -------------------- ##
10800
10801# Be more Bourne compatible
10802DUALCASE=1; export DUALCASE # for MKS sh
10803if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
10804 emulate sh
10805 NULLCMD=:
10806 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
10807 # is contrary to our usage. Disable this feature.
10808 alias -g '${1+"$@"}'='"$@"'
10809 setopt NO_GLOB_SUBST
10810else
10811 case `(set -o) 2>/dev/null` in #(
10812 *posix*) :
10813 set -o posix ;; #(
10814 *) :
10815 ;;
10816esac
10817fi
10818
10819
10820as_nl='
10821'
10822export as_nl
10823# Printing a long string crashes Solaris 7 /usr/bin/printf.
10824as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10825as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10826as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10827# Prefer a ksh shell builtin over an external printf program on Solaris,
10828# but without wasting forks for bash or zsh.
10829if test -z "$BASH_VERSION$ZSH_VERSION" \
10830 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10831 as_echo='print -r --'
10832 as_echo_n='print -rn --'
10833elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
10834 as_echo='printf %s\n'
10835 as_echo_n='printf %s'
10836else
10837 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
10838 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
10839 as_echo_n='/usr/ucb/echo -n'
10840 else
10841 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
10842 as_echo_n_body='eval
10843 arg=$1;
10844 case $arg in #(
10845 *"$as_nl"*)
10846 expr "X$arg" : "X\\(.*\\)$as_nl";
10847 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
10848 esac;
10849 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
10850 '
10851 export as_echo_n_body
10852 as_echo_n='sh -c $as_echo_n_body as_echo'
10853 fi
10854 export as_echo_body
10855 as_echo='sh -c $as_echo_body as_echo'
10856fi
10857
10858# The user is always right.
10859if test "${PATH_SEPARATOR+set}" != set; then
10860 PATH_SEPARATOR=:
10861 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10862 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10863 PATH_SEPARATOR=';'
10864 }
10865fi
10866
10867
10868# IFS
10869# We need space, tab and new line, in precisely that order. Quoting is
10870# there to prevent editors from complaining about space-tab.
10871# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10872# splitting by setting IFS to empty value.)
10873IFS=" "" $as_nl"
10874
10875# Find who we are. Look in the path if we contain no directory separator.
10876as_myself=
10877case $0 in #((
10878 *[\\/]* ) as_myself=$0 ;;
10879 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10880for as_dir in $PATH
10881do
10882 IFS=$as_save_IFS
10883 test -z "$as_dir" && as_dir=.
10884 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10885 done
10886IFS=$as_save_IFS
10887
10888 ;;
10889esac
10890# We did not find ourselves, most probably we were run as `sh COMMAND'
10891# in which case we are not to be found in the path.
10892if test "x$as_myself" = x; then
10893 as_myself=$0
10894fi
10895if test ! -f "$as_myself"; then
10896 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10897 exit 1
10898fi
10899
10900# Unset variables that we do not need and which cause bugs (e.g. in
10901# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
10902# suppresses any "Segmentation fault" message there. '((' could
10903# trigger a bug in pdksh 5.2.14.
10904for as_var in BASH_ENV ENV MAIL MAILPATH
10905do eval test x\${$as_var+set} = xset \
10906 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
10907done
10908PS1='$ '
10909PS2='> '
10910PS4='+ '
10911
10912# NLS nuisances.
10913LC_ALL=C
10914export LC_ALL
10915LANGUAGE=C
10916export LANGUAGE
10917
10918# CDPATH.
10919(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10920
10921
10922# as_fn_error STATUS ERROR [LINENO LOG_FD]
10923# ----------------------------------------
10924# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
10925# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
10926# script with STATUS, using 1 if that was 0.
10927as_fn_error ()
10928{
10929 as_status=$1; test $as_status -eq 0 && as_status=1
10930 if test "$4"; then
10931 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
10932 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
10933 fi
10934 $as_echo "$as_me: error: $2" >&2
10935 as_fn_exit $as_status
10936} # as_fn_error
10937
10938
10939# as_fn_set_status STATUS
10940# -----------------------
10941# Set $? to STATUS, without forking.
10942as_fn_set_status ()
10943{
10944 return $1
10945} # as_fn_set_status
10946
10947# as_fn_exit STATUS
10948# -----------------
10949# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
10950as_fn_exit ()
10951{
10952 set +e
10953 as_fn_set_status $1
10954 exit $1
10955} # as_fn_exit
10956
10957# as_fn_unset VAR
10958# ---------------
10959# Portably unset VAR.
10960as_fn_unset ()
10961{
10962 { eval $1=; unset $1;}
10963}
10964as_unset=as_fn_unset
10965# as_fn_append VAR VALUE
10966# ----------------------
10967# Append the text in VALUE to the end of the definition contained in VAR. Take
10968# advantage of any shell optimizations that allow amortized linear growth over
10969# repeated appends, instead of the typical quadratic growth present in naive
10970# implementations.
10971if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
10972 eval 'as_fn_append ()
10973 {
10974 eval $1+=\$2
10975 }'
10976else
10977 as_fn_append ()
10978 {
10979 eval $1=\$$1\$2
10980 }
10981fi # as_fn_append
10982
10983# as_fn_arith ARG...
10984# ------------------
10985# Perform arithmetic evaluation on the ARGs, and store the result in the
10986# global $as_val. Take advantage of shells that can avoid forks. The arguments
10987# must be portable across $(()) and expr.
10988if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
10989 eval 'as_fn_arith ()
10990 {
10991 as_val=$(( $* ))
10992 }'
10993else
10994 as_fn_arith ()
10995 {
10996 as_val=`expr "$@" || test $? -eq 1`
10997 }
10998fi # as_fn_arith
10999
11000
11001if expr a : '\(a\)' >/dev/null 2>&1 &&
11002 test "X`expr 00001 : '.*\(...\)'`" = X001; then
11003 as_expr=expr
11004else
11005 as_expr=false
11006fi
11007
11008if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11009 as_basename=basename
11010else
11011 as_basename=false
11012fi
11013
11014if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11015 as_dirname=dirname
11016else
11017 as_dirname=false
11018fi
11019
11020as_me=`$as_basename -- "$0" ||
11021$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11022 X"$0" : 'X\(//\)$' \| \
11023 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11024$as_echo X/"$0" |
11025 sed '/^.*\/\([^/][^/]*\)\/*$/{
11026 s//\1/
11027 q
11028 }
11029 /^X\/\(\/\/\)$/{
11030 s//\1/
11031 q
11032 }
11033 /^X\/\(\/\).*/{
11034 s//\1/
11035 q
11036 }
11037 s/.*/./; q'`
11038
11039# Avoid depending upon Character Ranges.
11040as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11041as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11042as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11043as_cr_digits='0123456789'
11044as_cr_alnum=$as_cr_Letters$as_cr_digits
11045
11046ECHO_C= ECHO_N= ECHO_T=
11047case `echo -n x` in #(((((
11048-n*)
11049 case `echo 'xy\c'` in
11050 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11051 xy) ECHO_C='\c';;
11052 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11053 ECHO_T=' ';;
11054 esac;;
11055*)
11056 ECHO_N='-n';;
11057esac
11058
11059rm -f conf$$ conf$$.exe conf$$.file
11060if test -d conf$$.dir; then
11061 rm -f conf$$.dir/conf$$.file
11062else
11063 rm -f conf$$.dir
11064 mkdir conf$$.dir 2>/dev/null
11065fi
11066if (echo >conf$$.file) 2>/dev/null; then
11067 if ln -s conf$$.file conf$$ 2>/dev/null; then
11068 as_ln_s='ln -s'
11069 # ... but there are two gotchas:
11070 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11071 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11072 # In both cases, we have to default to `cp -pR'.
11073 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11074 as_ln_s='cp -pR'
11075 elif ln conf$$.file conf$$ 2>/dev/null; then
11076 as_ln_s=ln
11077 else
11078 as_ln_s='cp -pR'
11079 fi
11080else
11081 as_ln_s='cp -pR'
11082fi
11083rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11084rmdir conf$$.dir 2>/dev/null
11085
11086
11087# as_fn_mkdir_p
11088# -------------
11089# Create "$as_dir" as a directory, including parents if necessary.
11090as_fn_mkdir_p ()
11091{
11092
11093 case $as_dir in #(
11094 -*) as_dir=./$as_dir;;
11095 esac
11096 test -d "$as_dir" || eval $as_mkdir_p || {
11097 as_dirs=
11098 while :; do
11099 case $as_dir in #(
11100 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11101 *) as_qdir=$as_dir;;
11102 esac
11103 as_dirs="'$as_qdir' $as_dirs"
11104 as_dir=`$as_dirname -- "$as_dir" ||
11105$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11106 X"$as_dir" : 'X\(//\)[^/]' \| \
11107 X"$as_dir" : 'X\(//\)$' \| \
11108 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11109$as_echo X"$as_dir" |
11110 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11111 s//\1/
11112 q
11113 }
11114 /^X\(\/\/\)[^/].*/{
11115 s//\1/
11116 q
11117 }
11118 /^X\(\/\/\)$/{
11119 s//\1/
11120 q
11121 }
11122 /^X\(\/\).*/{
11123 s//\1/
11124 q
11125 }
11126 s/.*/./; q'`
11127 test -d "$as_dir" && break
11128 done
11129 test -z "$as_dirs" || eval "mkdir $as_dirs"
11130 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
11131
11132
11133} # as_fn_mkdir_p
11134if mkdir -p . 2>/dev/null; then
11135 as_mkdir_p='mkdir -p "$as_dir"'
11136else
11137 test -d ./-p && rmdir ./-p
11138 as_mkdir_p=false
11139fi
11140
11141
11142# as_fn_executable_p FILE
11143# -----------------------
11144# Test if FILE is an executable regular file.
11145as_fn_executable_p ()
11146{
11147 test -f "$1" && test -x "$1"
11148} # as_fn_executable_p
11149as_test_x='test -x'
11150as_executable_p=as_fn_executable_p
11151
11152# Sed expression to map a string onto a valid CPP name.
11153as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11154
11155# Sed expression to map a string onto a valid variable name.
11156as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11157
11158
11159exec 6>&1
11160## ----------------------------------- ##
11161## Main body of $CONFIG_STATUS script. ##
11162## ----------------------------------- ##
11163_ASEOF
11164test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11165
11166cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11167# Save the log message, to keep $0 and so on meaningful, and to
11168# report actual input values of CONFIG_FILES etc. instead of their
11169# values after options handling.
11170ac_log="
11171This file was extended by $as_me, which was
11172generated by GNU Autoconf 2.69. Invocation command line was
11173
11174 CONFIG_FILES = $CONFIG_FILES
11175 CONFIG_HEADERS = $CONFIG_HEADERS
11176 CONFIG_LINKS = $CONFIG_LINKS
11177 CONFIG_COMMANDS = $CONFIG_COMMANDS
11178 $ $0 $@
11179
11180on `(hostname || uname -n) 2>/dev/null | sed 1q`
11181"
11182
11183_ACEOF
11184
11185case $ac_config_files in *"
11186"*) set x $ac_config_files; shift; ac_config_files=$*;;
11187esac
11188
11189case $ac_config_headers in *"
11190"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11191esac
11192
11193
11194cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11195# Files that config.status was made for.
11196config_files="$ac_config_files"
11197config_headers="$ac_config_headers"
11198config_commands="$ac_config_commands"
11199
11200_ACEOF
11201
11202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11203ac_cs_usage="\
11204\`$as_me' instantiates files and other configuration actions
11205from templates according to the current configuration. Unless the files
11206and actions are specified as TAGs, all are instantiated by default.
11207
11208Usage: $0 [OPTION]... [TAG]...
11209
11210 -h, --help print this help, then exit
11211 -V, --version print version number and configuration settings, then exit
11212 --config print configuration, then exit
11213 -q, --quiet, --silent
11214 do not print progress messages
11215 -d, --debug don't remove temporary files
11216 --recheck update $as_me by reconfiguring in the same conditions
11217 --file=FILE[:TEMPLATE]
11218 instantiate the configuration file FILE
11219 --header=FILE[:TEMPLATE]
11220 instantiate the configuration header FILE
11221
11222Configuration files:
11223$config_files
11224
11225Configuration headers:
11226$config_headers
11227
11228Configuration commands:
11229$config_commands
11230
11231Report bugs to the package provider."
11232
11233_ACEOF
11234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11235ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
11236ac_cs_version="\\
11237config.status
11238configured by $0, generated by GNU Autoconf 2.69,
11239 with options \\"\$ac_cs_config\\"
11240
11241Copyright (C) 2012 Free Software Foundation, Inc.
11242This config.status script is free software; the Free Software Foundation
11243gives unlimited permission to copy, distribute and modify it."
11244
11245ac_pwd='$ac_pwd'
11246srcdir='$srcdir'
11247INSTALL='$INSTALL'
11248test -n "\$AWK" || AWK=awk
11249_ACEOF
11250
11251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11252# The default lists apply if the user does not specify any file.
11253ac_need_defaults=:
11254while test $# != 0
11255do
11256 case $1 in
11257 --*=?*)
11258 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11259 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11260 ac_shift=:
11261 ;;
11262 --*=)
11263 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11264 ac_optarg=
11265 ac_shift=:
11266 ;;
11267 *)
11268 ac_option=$1
11269 ac_optarg=$2
11270 ac_shift=shift
11271 ;;
11272 esac
11273
11274 case $ac_option in
11275 # Handling of the options.
11276 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11277 ac_cs_recheck=: ;;
11278 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11279 $as_echo "$ac_cs_version"; exit ;;
11280 --config | --confi | --conf | --con | --co | --c )
11281 $as_echo "$ac_cs_config"; exit ;;
11282 --debug | --debu | --deb | --de | --d | -d )
11283 debug=: ;;
11284 --file | --fil | --fi | --f )
11285 $ac_shift
11286 case $ac_optarg in
11287 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11288 '') as_fn_error $? "missing file argument" ;;
11289 esac
11290 as_fn_append CONFIG_FILES " '$ac_optarg'"
11291 ac_need_defaults=false;;
11292 --header | --heade | --head | --hea )
11293 $ac_shift
11294 case $ac_optarg in
11295 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11296 esac
11297 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11298 ac_need_defaults=false;;
11299 --he | --h)
11300 # Conflict between --help and --header
11301 as_fn_error $? "ambiguous option: \`$1'
11302Try \`$0 --help' for more information.";;
11303 --help | --hel | -h )
11304 $as_echo "$ac_cs_usage"; exit ;;
11305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11306 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11307 ac_cs_silent=: ;;
11308
11309 # This is an error.
11310 -*) as_fn_error $? "unrecognized option: \`$1'
11311Try \`$0 --help' for more information." ;;
11312
11313 *) as_fn_append ac_config_targets " $1"
11314 ac_need_defaults=false ;;
11315
11316 esac
11317 shift
11318done
11319
11320ac_configure_extra_args=
11321
11322if $ac_cs_silent; then
11323 exec 6>/dev/null
11324 ac_configure_extra_args="$ac_configure_extra_args --silent"
11325fi
11326
11327_ACEOF
11328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11329if \$ac_cs_recheck; then
11330 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11331 shift
11332 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11333 CONFIG_SHELL='$SHELL'
11334 export CONFIG_SHELL
11335 exec "\$@"
11336fi
11337
11338_ACEOF
11339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11340exec 5>>config.log
11341{
11342 echo
11343 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11344## Running $as_me. ##
11345_ASBOX
11346 $as_echo "$ac_log"
11347} >&5
11348
11349_ACEOF
11350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11351#
11352# INIT-COMMANDS
11353#
11354ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
11355ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
11356
11357_ACEOF
11358
11359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11360
11361# Handling of arguments.
11362for ac_config_target in $ac_config_targets
11363do
11364 case $ac_config_target in
11365 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
11366 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
11367 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
11368 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11369
11370 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
11371 esac
11372done
11373
11374
11375# If the user did not use the arguments to specify the items to instantiate,
11376# then the envvar interface is used. Set only those that are not.
11377# We use the long form for the default assignment because of an extremely
11378# bizarre bug on SunOS 4.1.3.
11379if $ac_need_defaults; then
11380 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11381 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11382 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11383fi
11384
11385# Have a temporary directory for convenience. Make it in the build tree
11386# simply because there is no reason against having it here, and in addition,
11387# creating and moving files from /tmp can sometimes cause problems.
11388# Hook for its removal unless debugging.
11389# Note that there is a small window in which the directory will not be cleaned:
11390# after its creation but before its name has been assigned to `$tmp'.
11391$debug ||
11392{
11393 tmp= ac_tmp=
11394 trap 'exit_status=$?
11395 : "${ac_tmp:=$tmp}"
11396 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11397' 0
11398 trap 'as_fn_exit 1' 1 2 13 15
11399}
11400# Create a (secure) tmp directory for tmp files.
11401
11402{
11403 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11404 test -d "$tmp"
11405} ||
11406{
11407 tmp=./conf$$-$RANDOM
11408 (umask 077 && mkdir "$tmp")
11409} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11410ac_tmp=$tmp
11411
11412# Set up the scripts for CONFIG_FILES section.
11413# No need to generate them if there are no CONFIG_FILES.
11414# This happens for instance with `./config.status config.h'.
11415if test -n "$CONFIG_FILES"; then
11416
11417
11418ac_cr=`echo X | tr X '\015'`
11419# On cygwin, bash can eat \r inside `` if the user requested igncr.
11420# But we know of no other shell where ac_cr would be empty at this
11421# point, so we can use a bashism as a fallback.
11422if test "x$ac_cr" = x; then
11423 eval ac_cr=\$\'\\r\'
11424fi
11425ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11426if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11427 ac_cs_awk_cr='\\r'
11428else
11429 ac_cs_awk_cr=$ac_cr
11430fi
11431
11432echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11433_ACEOF
11434
11435
11436{
11437 echo "cat >conf$$subs.awk <<_ACEOF" &&
11438 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11439 echo "_ACEOF"
11440} >conf$$subs.sh ||
11441 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11442ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11443ac_delim='%!_!# '
11444for ac_last_try in false false false false false :; do
11445 . ./conf$$subs.sh ||
11446 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11447
11448 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11449 if test $ac_delim_n = $ac_delim_num; then
11450 break
11451 elif $ac_last_try; then
11452 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11453 else
11454 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11455 fi
11456done
11457rm -f conf$$subs.sh
11458
11459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11460cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11461_ACEOF
11462sed -n '
11463h
11464s/^/S["/; s/!.*/"]=/
11465p
11466g
11467s/^[^!]*!//
11468:repl
11469t repl
11470s/'"$ac_delim"'$//
11471t delim
11472:nl
11473h
11474s/\(.\{148\}\)..*/\1/
11475t more1
11476s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11477p
11478n
11479b repl
11480:more1
11481s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11482p
11483g
11484s/.\{148\}//
11485t nl
11486:delim
11487h
11488s/\(.\{148\}\)..*/\1/
11489t more2
11490s/["\\]/\\&/g; s/^/"/; s/$/"/
11491p
11492b
11493:more2
11494s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11495p
11496g
11497s/.\{148\}//
11498t delim
11499' <conf$$subs.awk | sed '
11500/^[^""]/{
11501 N
11502 s/\n//
11503}
11504' >>$CONFIG_STATUS || ac_write_fail=1
11505rm -f conf$$subs.awk
11506cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11507_ACAWK
11508cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
11509 for (key in S) S_is_set[key] = 1
11510 FS = "\a"
11511
11512}
11513{
11514 line = $ 0
11515 nfields = split(line, field, "@")
11516 substed = 0
11517 len = length(field[1])
11518 for (i = 2; i < nfields; i++) {
11519 key = field[i]
11520 keylen = length(key)
11521 if (S_is_set[key]) {
11522 value = S[key]
11523 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11524 len += length(value) + length(field[++i])
11525 substed = 1
11526 } else
11527 len += 1 + keylen
11528 }
11529
11530 print line
11531}
11532
11533_ACAWK
11534_ACEOF
11535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11536if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11537 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11538else
11539 cat
11540fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11541 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
11542_ACEOF
11543
11544# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11545# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
11546# trailing colons and then remove the whole line if VPATH becomes empty
11547# (actually we leave an empty line to preserve line numbers).
11548if test "x$srcdir" = x.; then
11549 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11550h
11551s///
11552s/^/:/
11553s/[ ]*$/:/
11554s/:\$(srcdir):/:/g
11555s/:\${srcdir}:/:/g
11556s/:@srcdir@:/:/g
11557s/^:*//
11558s/:*$//
11559x
11560s/\(=[ ]*\).*/\1/
11561G
11562s/\n//
11563s/^[^=]*=[ ]*$//
11564}'
11565fi
11566
11567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11568fi # test -n "$CONFIG_FILES"
11569
11570# Set up the scripts for CONFIG_HEADERS section.
11571# No need to generate them if there are no CONFIG_HEADERS.
11572# This happens for instance with `./config.status Makefile'.
11573if test -n "$CONFIG_HEADERS"; then
11574cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
11575BEGIN {
11576_ACEOF
11577
11578# Transform confdefs.h into an awk script `defines.awk', embedded as
11579# here-document in config.status, that substitutes the proper values into
11580# config.h.in to produce config.h.
11581
11582# Create a delimiter string that does not exist in confdefs.h, to ease
11583# handling of long lines.
11584ac_delim='%!_!# '
11585for ac_last_try in false false :; do
11586 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11587 if test -z "$ac_tt"; then
11588 break
11589 elif $ac_last_try; then
11590 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
11591 else
11592 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11593 fi
11594done
11595
11596# For the awk script, D is an array of macro values keyed by name,
11597# likewise P contains macro parameters if any. Preserve backslash
11598# newline sequences.
11599
11600ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11601sed -n '
11602s/.\{148\}/&'"$ac_delim"'/g
11603t rset
11604:rset
11605s/^[ ]*#[ ]*define[ ][ ]*/ /
11606t def
11607d
11608:def
11609s/\\$//
11610t bsnl
11611s/["\\]/\\&/g
11612s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11613D["\1"]=" \3"/p
11614s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11615d
11616:bsnl
11617s/["\\]/\\&/g
11618s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11619D["\1"]=" \3\\\\\\n"\\/p
11620t cont
11621s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11622t cont
11623d
11624:cont
11625n
11626s/.\{148\}/&'"$ac_delim"'/g
11627t clear
11628:clear
11629s/\\$//
11630t bsnlc
11631s/["\\]/\\&/g; s/^/"/; s/$/"/p
11632d
11633:bsnlc
11634s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11635b cont
11636' <confdefs.h | sed '
11637s/'"$ac_delim"'/"\\\
11638"/g' >>$CONFIG_STATUS || ac_write_fail=1
11639
11640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11641 for (key in D) D_is_set[key] = 1
11642 FS = "\a"
11643}
11644/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11645 line = \$ 0
11646 split(line, arg, " ")
11647 if (arg[1] == "#") {
11648 defundef = arg[2]
11649 mac1 = arg[3]
11650 } else {
11651 defundef = substr(arg[1], 2)
11652 mac1 = arg[2]
11653 }
11654 split(mac1, mac2, "(") #)
11655 macro = mac2[1]
11656 prefix = substr(line, 1, index(line, defundef) - 1)
11657 if (D_is_set[macro]) {
11658 # Preserve the white space surrounding the "#".
11659 print prefix "define", macro P[macro] D[macro]
11660 next
11661 } else {
11662 # Replace #undef with comments. This is necessary, for example,
11663 # in the case of _POSIX_SOURCE, which is predefined and required
11664 # on some systems where configure will not decide to define it.
11665 if (defundef == "undef") {
11666 print "/*", prefix defundef, macro, "*/"
11667 next
11668 }
11669 }
11670}
11671{ print }
11672_ACAWK
11673_ACEOF
11674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11675 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
11676fi # test -n "$CONFIG_HEADERS"
11677
11678
11679eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
11680shift
11681for ac_tag
11682do
11683 case $ac_tag in
11684 :[FHLC]) ac_mode=$ac_tag; continue;;
11685 esac
11686 case $ac_mode$ac_tag in
11687 :[FHL]*:*);;
11688 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
11689 :[FH]-) ac_tag=-:-;;
11690 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11691 esac
11692 ac_save_IFS=$IFS
11693 IFS=:
11694 set x $ac_tag
11695 IFS=$ac_save_IFS
11696 shift
11697 ac_file=$1
11698 shift
11699
11700 case $ac_mode in
11701 :L) ac_source=$1;;
11702 :[FH])
11703 ac_file_inputs=
11704 for ac_f
11705 do
11706 case $ac_f in
11707 -) ac_f="$ac_tmp/stdin";;
11708 *) # Look for the file first in the build tree, then in the source tree
11709 # (if the path is not absolute). The absolute path cannot be DOS-style,
11710 # because $ac_f cannot contain `:'.
11711 test -f "$ac_f" ||
11712 case $ac_f in
11713 [\\/$]*) false;;
11714 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11715 esac ||
11716 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
11717 esac
11718 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11719 as_fn_append ac_file_inputs " '$ac_f'"
11720 done
11721
11722 # Let's still pretend it is `configure' which instantiates (i.e., don't
11723 # use $as_me), people would be surprised to read:
11724 # /* config.h. Generated by config.status. */
11725 configure_input='Generated from '`
11726 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11727 `' by configure.'
11728 if test x"$ac_file" != x-; then
11729 configure_input="$ac_file. $configure_input"
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11731$as_echo "$as_me: creating $ac_file" >&6;}
11732 fi
11733 # Neutralize special characters interpreted by sed in replacement strings.
11734 case $configure_input in #(
11735 *\&* | *\|* | *\\* )
11736 ac_sed_conf_input=`$as_echo "$configure_input" |
11737 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11738 *) ac_sed_conf_input=$configure_input;;
11739 esac
11740
11741 case $ac_tag in
11742 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11743 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
11744 esac
11745 ;;
11746 esac
11747
11748 ac_dir=`$as_dirname -- "$ac_file" ||
11749$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11750 X"$ac_file" : 'X\(//\)[^/]' \| \
11751 X"$ac_file" : 'X\(//\)$' \| \
11752 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11753$as_echo X"$ac_file" |
11754 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11755 s//\1/
11756 q
11757 }
11758 /^X\(\/\/\)[^/].*/{
11759 s//\1/
11760 q
11761 }
11762 /^X\(\/\/\)$/{
11763 s//\1/
11764 q
11765 }
11766 /^X\(\/\).*/{
11767 s//\1/
11768 q
11769 }
11770 s/.*/./; q'`
11771 as_dir="$ac_dir"; as_fn_mkdir_p
11772 ac_builddir=.
11773
11774case "$ac_dir" in
11775.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11776*)
11777 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11778 # A ".." for each directory in $ac_dir_suffix.
11779 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11780 case $ac_top_builddir_sub in
11781 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11782 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11783 esac ;;
11784esac
11785ac_abs_top_builddir=$ac_pwd
11786ac_abs_builddir=$ac_pwd$ac_dir_suffix
11787# for backward compatibility:
11788ac_top_builddir=$ac_top_build_prefix
11789
11790case $srcdir in
11791 .) # We are building in place.
11792 ac_srcdir=.
11793 ac_top_srcdir=$ac_top_builddir_sub
11794 ac_abs_top_srcdir=$ac_pwd ;;
11795 [\\/]* | ?:[\\/]* ) # Absolute name.
11796 ac_srcdir=$srcdir$ac_dir_suffix;
11797 ac_top_srcdir=$srcdir
11798 ac_abs_top_srcdir=$srcdir ;;
11799 *) # Relative name.
11800 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11801 ac_top_srcdir=$ac_top_build_prefix$srcdir
11802 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11803esac
11804ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11805
11806
11807 case $ac_mode in
11808 :F)
11809 #
11810 # CONFIG_FILE
11811 #
11812
11813 case $INSTALL in
11814 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11815 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11816 esac
11817_ACEOF
11818
11819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11820# If the template does not know about datarootdir, expand it.
11821# FIXME: This hack should be removed a few years after 2.60.
11822ac_datarootdir_hack=; ac_datarootdir_seen=
11823ac_sed_dataroot='
11824/datarootdir/ {
11825 p
11826 q
11827}
11828/@datadir@/p
11829/@docdir@/p
11830/@infodir@/p
11831/@localedir@/p
11832/@mandir@/p'
11833case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
11834*datarootdir*) ac_datarootdir_seen=yes;;
11835*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11837$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11838_ACEOF
11839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11840 ac_datarootdir_hack='
11841 s&@datadir@&$datadir&g
11842 s&@docdir@&$docdir&g
11843 s&@infodir@&$infodir&g
11844 s&@localedir@&$localedir&g
11845 s&@mandir@&$mandir&g
11846 s&\\\${datarootdir}&$datarootdir&g' ;;
11847esac
11848_ACEOF
11849
11850# Neutralize VPATH when `$srcdir' = `.'.
11851# Shell code in configure.ac might set extrasub.
11852# FIXME: do we really want to maintain this feature?
11853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11854ac_sed_extra="$ac_vpsub
11855$extrasub
11856_ACEOF
11857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11858:t
11859/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11860s|@configure_input@|$ac_sed_conf_input|;t t
11861s&@top_builddir@&$ac_top_builddir_sub&;t t
11862s&@top_build_prefix@&$ac_top_build_prefix&;t t
11863s&@srcdir@&$ac_srcdir&;t t
11864s&@abs_srcdir@&$ac_abs_srcdir&;t t
11865s&@top_srcdir@&$ac_top_srcdir&;t t
11866s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11867s&@builddir@&$ac_builddir&;t t
11868s&@abs_builddir@&$ac_abs_builddir&;t t
11869s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11870s&@INSTALL@&$ac_INSTALL&;t t
11871$ac_datarootdir_hack
11872"
11873eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11874 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11875
11876test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11877 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11878 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
11879 "$ac_tmp/out"`; test -z "$ac_out"; } &&
11880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11881which seems to be undefined. Please make sure it is defined" >&5
11882$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11883which seems to be undefined. Please make sure it is defined" >&2;}
11884
11885 rm -f "$ac_tmp/stdin"
11886 case $ac_file in
11887 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11888 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
11889 esac \
11890 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11891 ;;
11892 :H)
11893 #
11894 # CONFIG_HEADER
11895 #
11896 if test x"$ac_file" != x-; then
11897 {
11898 $as_echo "/* $configure_input */" \
11899 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
11900 } >"$ac_tmp/config.h" \
11901 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11902 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
11904$as_echo "$as_me: $ac_file is unchanged" >&6;}
11905 else
11906 rm -f "$ac_file"
11907 mv "$ac_tmp/config.h" "$ac_file" \
11908 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11909 fi
11910 else
11911 $as_echo "/* $configure_input */" \
11912 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
11913 || as_fn_error $? "could not create -" "$LINENO" 5
11914 fi
11915 ;;
11916
11917 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
11918$as_echo "$as_me: executing $ac_file commands" >&6;}
11919 ;;
11920 esac
11921
11922
11923 case $ac_file$ac_mode in
11924 "config.h":H) echo > stamp-h ;;
11925 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
11926 "gdbdepdir":C)
11927 for subdir in ${CONFIG_SRC_SUBDIR}
11928 do
11929 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
11930 done ;;
11931
11932 esac
11933done # for ac_tag
11934
11935
11936as_fn_exit 0
11937_ACEOF
11938ac_clean_files=$ac_clean_files_save
11939
11940test $ac_write_fail = 0 ||
11941 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
11942
11943
11944# configure is writing to config.log, and then calls config.status.
11945# config.status does its own redirection, appending to config.log.
11946# Unfortunately, on DOS this fails, as config.log is still kept open
11947# by configure, so config.status won't be able to write to it; its
11948# output is simply discarded. So we exec the FD to /dev/null,
11949# effectively closing config.log, so it can be properly (re)opened and
11950# appended to by config.status. When coming back to configure, we
11951# need to make the FD available again.
11952if test "$no_create" != yes; then
11953 ac_cs_success=:
11954 ac_config_status_args=
11955 test "$silent" = yes &&
11956 ac_config_status_args="$ac_config_status_args --quiet"
11957 exec 5>/dev/null
11958 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11959 exec 5>>config.log
11960 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11961 # would make configure fail if this is the last instruction.
11962 $ac_cs_success || as_fn_exit 1
11963fi
11964if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
11966$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
11967fi
11968
This page took 0.070075 seconds and 4 git commands to generate.