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