Change gdbsupport not to rely on BFD
[deliverable/binutils-gdb.git] / gdbserver / configure
CommitLineData
d6e9fb05 1#! /bin/sh
d6e9fb05 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
d6e9fb05
JK
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
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 :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
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'
bec39cab 50else
81ecdfbb
RW
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 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
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.
d0ac1c44 90as_myself=
81ecdfbb
RW
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
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
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;}
81ecdfbb
RW
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
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
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
bec39cab 211do
81ecdfbb
RW
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 :
d0ac1c44
SM
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
81ecdfbb
RW
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."
bec39cab 266 else
81ecdfbb
RW
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."
bec39cab 271 fi
81ecdfbb
RW
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"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
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
81ecdfbb
RW
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
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
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
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
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
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
bec39cab 418
81ecdfbb
RW
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
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'`
bec39cab 456
dae5f5cf
DJ
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
b80864fb 463
bec39cab 464
81ecdfbb
RW
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 |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
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; }
bec39cab 487
d0ac1c44
SM
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
bec39cab
AC
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
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
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';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 522 as_ln_s='ln -s'
81ecdfbb
RW
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.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
dae5f5cf 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
d6e9fb05 546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
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
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
bec39cab
AC
559
560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
d6e9fb05 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
dae5f5cf 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab 584
feacfcac 585ac_unique_file="server.cc"
bec39cab
AC
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
05ea2a05 622ac_header_list=
c971b7fa 623ac_subst_vars='LTLIBOBJS
698b3e08 624LIBOBJS
c9a1864a 625GNULIB_STDINT_H
fa593d66
PA
626extra_libraries
627IPA_DEPFILES
81ecdfbb
RW
628srv_xmlfiles
629srv_xmlbuiltin
81ecdfbb
RW
630GDBSERVER_LIBS
631GDBSERVER_DEPFILES
632RDYNAMIC
633REPORT_BUGS_TEXI
634REPORT_BUGS_TO
635PKGVERSION
d4596a3d
PA
636WERROR_CFLAGS
637WARN_CFLAGS
0fb4aa4b
PA
638ustinc
639ustlibs
db6878ac
SM
640CCDEPMODE
641CONFIG_SRC_SUBDIR
9a665d62
TT
642CATOBJEXT
643GENCAT
644INSTOBJEXT
645DATADIRNAME
646CATALOGS
647POSUB
648GMSGFMT
649XGETTEXT
650INCINTL
651LIBINTL_DEP
652LIBINTL
653USE_NLS
db6878ac
SM
654DEPDIR
655am__leading_dot
656host_noncanonical
657target_noncanonical
05ea2a05
TT
658LTLIBIPT
659LIBIPT
660HAVE_LIBIPT
5e030278
TT
661PTHREAD_CFLAGS
662PTHREAD_LIBS
663PTHREAD_CC
664ax_pthread_config
665SED
9c232dda 666ALLOCA
0bcda685
PA
667CXX_DIALECT
668HAVE_CXX11
c971b7fa 669RANLIB
e1d2394b 670AR
81ecdfbb
RW
671INSTALL_DATA
672INSTALL_SCRIPT
673INSTALL_PROGRAM
674target_os
675target_vendor
676target_cpu
677target
678host_os
679host_vendor
680host_cpu
681host
682build_os
683build_vendor
684build_cpu
685build
bdaed379
HD
686INSTALL_STRIP_PROGRAM
687STRIP
688install_sh
770d76d7
PA
689EGREP
690GREP
691CPP
3bc3d82a
PA
692ac_ct_CXX
693CXXFLAGS
694CXX
81ecdfbb
RW
695OBJEXT
696EXEEXT
697ac_ct_CC
698CPPFLAGS
699LDFLAGS
700CFLAGS
701CC
c9a1864a
YQ
702MAINT
703MAINTAINER_MODE_FALSE
704MAINTAINER_MODE_TRUE
81ecdfbb
RW
705target_alias
706host_alias
707build_alias
708LIBS
709ECHO_T
710ECHO_N
711ECHO_C
712DEFS
713mandir
714localedir
715libdir
716psdir
717pdfdir
718dvidir
719htmldir
720infodir
721docdir
722oldincludedir
723includedir
724localstatedir
725sharedstatedir
726sysconfdir
727datadir
728datarootdir
729libexecdir
730sbindir
731bindir
732program_transform_name
733prefix
734exec_prefix
735PACKAGE_URL
736PACKAGE_BUGREPORT
737PACKAGE_STRING
738PACKAGE_VERSION
739PACKAGE_TARNAME
740PACKAGE_NAME
741PATH_SEPARATOR
742SHELL'
bec39cab 743ac_subst_files=''
81ecdfbb
RW
744ac_user_opts='
745enable_option_checking
c9a1864a 746enable_maintainer_mode
589bc927 747enable_largefile
05ea2a05
TT
748with_intel_pt
749with_gnu_ld
750enable_rpath
751with_libipt_prefix
9f1528a1 752with_libipt_type
db6878ac 753enable_unit_tests
0fb4aa4b
PA
754with_ust
755with_ust_include
756with_ust_lib
d4596a3d 757enable_werror
8f13a3ce
MF
758enable_build_warnings
759enable_gdb_build_warnings
81ecdfbb
RW
760with_pkgversion
761with_bugurl
96f15937 762with_libthread_db
c2a66c29 763enable_inprocess_agent
81ecdfbb
RW
764'
765 ac_precious_vars='build_alias
766host_alias
767target_alias
768CC
769CFLAGS
770LDFLAGS
771LIBS
772CPPFLAGS
3bc3d82a
PA
773CXX
774CXXFLAGS
775CCC
81ecdfbb
RW
776CPP'
777
d6e9fb05
JK
778
779# Initialize some variables set by options.
bec39cab
AC
780ac_init_help=
781ac_init_version=false
81ecdfbb
RW
782ac_unrecognized_opts=
783ac_unrecognized_sep=
d6e9fb05
JK
784# The variables have the same names as the options, with
785# dashes changed to underlines.
bec39cab 786cache_file=/dev/null
d6e9fb05 787exec_prefix=NONE
d6e9fb05 788no_create=
d6e9fb05
JK
789no_recursion=
790prefix=NONE
791program_prefix=NONE
792program_suffix=NONE
793program_transform_name=s,x,x,
794silent=
795site=
796srcdir=
d6e9fb05
JK
797verbose=
798x_includes=NONE
799x_libraries=NONE
bec39cab
AC
800
801# Installation directory options.
802# These are left unexpanded so users can "make install exec_prefix=/foo"
803# and all the variables that are supposed to be based on exec_prefix
804# by default will actually change.
805# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 806# (The list follows the same order as the GNU Coding Standards.)
d6e9fb05
JK
807bindir='${exec_prefix}/bin'
808sbindir='${exec_prefix}/sbin'
809libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
810datarootdir='${prefix}/share'
811datadir='${datarootdir}'
d6e9fb05
JK
812sysconfdir='${prefix}/etc'
813sharedstatedir='${prefix}/com'
814localstatedir='${prefix}/var'
d6e9fb05
JK
815includedir='${prefix}/include'
816oldincludedir='/usr/include'
81ecdfbb
RW
817docdir='${datarootdir}/doc/${PACKAGE}'
818infodir='${datarootdir}/info'
819htmldir='${docdir}'
820dvidir='${docdir}'
821pdfdir='${docdir}'
822psdir='${docdir}'
823libdir='${exec_prefix}/lib'
824localedir='${datarootdir}/locale'
825mandir='${datarootdir}/man'
d6e9fb05 826
d6e9fb05 827ac_prev=
81ecdfbb 828ac_dashdash=
d6e9fb05
JK
829for ac_option
830do
d6e9fb05
JK
831 # If the previous option needs an argument, assign it.
832 if test -n "$ac_prev"; then
81ecdfbb 833 eval $ac_prev=\$ac_option
d6e9fb05
JK
834 ac_prev=
835 continue
836 fi
837
81ecdfbb 838 case $ac_option in
d0ac1c44
SM
839 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
840 *=) ac_optarg= ;;
841 *) ac_optarg=yes ;;
81ecdfbb 842 esac
d6e9fb05
JK
843
844 # Accept the important Cygnus configure options, so we can diagnose typos.
845
81ecdfbb
RW
846 case $ac_dashdash$ac_option in
847 --)
848 ac_dashdash=yes ;;
d6e9fb05
JK
849
850 -bindir | --bindir | --bindi | --bind | --bin | --bi)
851 ac_prev=bindir ;;
852 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 853 bindir=$ac_optarg ;;
d6e9fb05
JK
854
855 -build | --build | --buil | --bui | --bu)
bec39cab 856 ac_prev=build_alias ;;
d6e9fb05 857 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 858 build_alias=$ac_optarg ;;
d6e9fb05
JK
859
860 -cache-file | --cache-file | --cache-fil | --cache-fi \
861 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
862 ac_prev=cache_file ;;
863 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
864 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
865 cache_file=$ac_optarg ;;
866
867 --config-cache | -C)
868 cache_file=config.cache ;;
d6e9fb05 869
81ecdfbb 870 -datadir | --datadir | --datadi | --datad)
d6e9fb05 871 ac_prev=datadir ;;
81ecdfbb 872 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 873 datadir=$ac_optarg ;;
d6e9fb05 874
81ecdfbb
RW
875 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
876 | --dataroo | --dataro | --datar)
877 ac_prev=datarootdir ;;
878 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
879 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
880 datarootdir=$ac_optarg ;;
881
d6e9fb05 882 -disable-* | --disable-*)
81ecdfbb 883 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
d6e9fb05 884 # Reject names that are not valid shell variable names.
81ecdfbb 885 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 886 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
887 ac_useropt_orig=$ac_useropt
888 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
889 case $ac_user_opts in
890 *"
891"enable_$ac_useropt"
892"*) ;;
893 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
894 ac_unrecognized_sep=', ';;
895 esac
896 eval enable_$ac_useropt=no ;;
897
898 -docdir | --docdir | --docdi | --doc | --do)
899 ac_prev=docdir ;;
900 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
901 docdir=$ac_optarg ;;
902
903 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
904 ac_prev=dvidir ;;
905 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
906 dvidir=$ac_optarg ;;
d6e9fb05
JK
907
908 -enable-* | --enable-*)
81ecdfbb 909 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
d6e9fb05 910 # Reject names that are not valid shell variable names.
81ecdfbb 911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 912 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
dae5f5cf 921 esac
81ecdfbb 922 eval enable_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
923
924 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
925 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
926 | --exec | --exe | --ex)
927 ac_prev=exec_prefix ;;
928 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
929 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
930 | --exec=* | --exe=* | --ex=*)
bec39cab 931 exec_prefix=$ac_optarg ;;
d6e9fb05
JK
932
933 -gas | --gas | --ga | --g)
934 # Obsolete; use --with-gas.
935 with_gas=yes ;;
936
bec39cab
AC
937 -help | --help | --hel | --he | -h)
938 ac_init_help=long ;;
939 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
940 ac_init_help=recursive ;;
941 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
942 ac_init_help=short ;;
d6e9fb05
JK
943
944 -host | --host | --hos | --ho)
bec39cab 945 ac_prev=host_alias ;;
d6e9fb05 946 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 947 host_alias=$ac_optarg ;;
d6e9fb05 948
81ecdfbb
RW
949 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
950 ac_prev=htmldir ;;
951 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
952 | --ht=*)
953 htmldir=$ac_optarg ;;
954
d6e9fb05
JK
955 -includedir | --includedir | --includedi | --included | --include \
956 | --includ | --inclu | --incl | --inc)
957 ac_prev=includedir ;;
958 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
959 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 960 includedir=$ac_optarg ;;
d6e9fb05
JK
961
962 -infodir | --infodir | --infodi | --infod | --info | --inf)
963 ac_prev=infodir ;;
964 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 965 infodir=$ac_optarg ;;
d6e9fb05
JK
966
967 -libdir | --libdir | --libdi | --libd)
968 ac_prev=libdir ;;
969 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 970 libdir=$ac_optarg ;;
d6e9fb05
JK
971
972 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
973 | --libexe | --libex | --libe)
974 ac_prev=libexecdir ;;
975 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
976 | --libexe=* | --libex=* | --libe=*)
bec39cab 977 libexecdir=$ac_optarg ;;
d6e9fb05 978
81ecdfbb
RW
979 -localedir | --localedir | --localedi | --localed | --locale)
980 ac_prev=localedir ;;
981 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
982 localedir=$ac_optarg ;;
983
d6e9fb05 984 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 985 | --localstate | --localstat | --localsta | --localst | --locals)
d6e9fb05
JK
986 ac_prev=localstatedir ;;
987 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 988 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 989 localstatedir=$ac_optarg ;;
d6e9fb05
JK
990
991 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
992 ac_prev=mandir ;;
993 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 994 mandir=$ac_optarg ;;
d6e9fb05
JK
995
996 -nfp | --nfp | --nf)
997 # Obsolete; use --without-fp.
998 with_fp=no ;;
999
1000 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1001 | --no-cr | --no-c | -n)
d6e9fb05
JK
1002 no_create=yes ;;
1003
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 no_recursion=yes ;;
1007
1008 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1009 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1010 | --oldin | --oldi | --old | --ol | --o)
1011 ac_prev=oldincludedir ;;
1012 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1013 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1014 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1015 oldincludedir=$ac_optarg ;;
d6e9fb05
JK
1016
1017 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1018 ac_prev=prefix ;;
1019 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1020 prefix=$ac_optarg ;;
d6e9fb05
JK
1021
1022 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1023 | --program-pre | --program-pr | --program-p)
1024 ac_prev=program_prefix ;;
1025 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1026 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1027 program_prefix=$ac_optarg ;;
d6e9fb05
JK
1028
1029 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1030 | --program-suf | --program-su | --program-s)
1031 ac_prev=program_suffix ;;
1032 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1033 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1034 program_suffix=$ac_optarg ;;
d6e9fb05
JK
1035
1036 -program-transform-name | --program-transform-name \
1037 | --program-transform-nam | --program-transform-na \
1038 | --program-transform-n | --program-transform- \
1039 | --program-transform | --program-transfor \
1040 | --program-transfo | --program-transf \
1041 | --program-trans | --program-tran \
1042 | --progr-tra | --program-tr | --program-t)
1043 ac_prev=program_transform_name ;;
1044 -program-transform-name=* | --program-transform-name=* \
1045 | --program-transform-nam=* | --program-transform-na=* \
1046 | --program-transform-n=* | --program-transform-=* \
1047 | --program-transform=* | --program-transfor=* \
1048 | --program-transfo=* | --program-transf=* \
1049 | --program-trans=* | --program-tran=* \
1050 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1051 program_transform_name=$ac_optarg ;;
d6e9fb05 1052
81ecdfbb
RW
1053 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1054 ac_prev=pdfdir ;;
1055 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1056 pdfdir=$ac_optarg ;;
1057
1058 -psdir | --psdir | --psdi | --psd | --ps)
1059 ac_prev=psdir ;;
1060 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1061 psdir=$ac_optarg ;;
1062
d6e9fb05
JK
1063 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1064 | -silent | --silent | --silen | --sile | --sil)
1065 silent=yes ;;
1066
1067 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1068 ac_prev=sbindir ;;
1069 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1070 | --sbi=* | --sb=*)
bec39cab 1071 sbindir=$ac_optarg ;;
d6e9fb05
JK
1072
1073 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1074 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1075 | --sharedst | --shareds | --shared | --share | --shar \
1076 | --sha | --sh)
1077 ac_prev=sharedstatedir ;;
1078 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1079 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1080 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1081 | --sha=* | --sh=*)
bec39cab 1082 sharedstatedir=$ac_optarg ;;
d6e9fb05
JK
1083
1084 -site | --site | --sit)
1085 ac_prev=site ;;
1086 -site=* | --site=* | --sit=*)
bec39cab 1087 site=$ac_optarg ;;
434c4c77 1088
d6e9fb05
JK
1089 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1090 ac_prev=srcdir ;;
1091 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1092 srcdir=$ac_optarg ;;
d6e9fb05
JK
1093
1094 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1095 | --syscon | --sysco | --sysc | --sys | --sy)
1096 ac_prev=sysconfdir ;;
1097 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1098 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1099 sysconfdir=$ac_optarg ;;
d6e9fb05
JK
1100
1101 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1102 ac_prev=target_alias ;;
d6e9fb05 1103 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1104 target_alias=$ac_optarg ;;
d6e9fb05
JK
1105
1106 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1107 verbose=yes ;;
1108
bec39cab
AC
1109 -version | --version | --versio | --versi | --vers | -V)
1110 ac_init_version=: ;;
d6e9fb05
JK
1111
1112 -with-* | --with-*)
81ecdfbb 1113 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
d6e9fb05 1114 # Reject names that are not valid shell variable names.
81ecdfbb 1115 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1116 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
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--with-$ac_useropt_orig"
1124 ac_unrecognized_sep=', ';;
dae5f5cf 1125 esac
81ecdfbb 1126 eval with_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
1127
1128 -without-* | --without-*)
81ecdfbb 1129 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
d6e9fb05 1130 # Reject names that are not valid shell variable names.
81ecdfbb 1131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1132 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"with_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
1141 esac
1142 eval with_$ac_useropt=no ;;
d6e9fb05
JK
1143
1144 --x)
1145 # Obsolete; use --with-x.
1146 with_x=yes ;;
1147
1148 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1149 | --x-incl | --x-inc | --x-in | --x-i)
1150 ac_prev=x_includes ;;
1151 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1152 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1153 x_includes=$ac_optarg ;;
d6e9fb05
JK
1154
1155 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1156 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1157 ac_prev=x_libraries ;;
1158 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1159 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1160 x_libraries=$ac_optarg ;;
d6e9fb05 1161
d0ac1c44
SM
1162 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1163Try \`$0 --help' for more information"
d6e9fb05
JK
1164 ;;
1165
bec39cab
AC
1166 *=*)
1167 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1168 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1169 case $ac_envvar in #(
1170 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1171 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1172 esac
1173 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1174 export $ac_envvar ;;
1175
d6e9fb05 1176 *)
bec39cab 1177 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1178 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1179 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1180 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1181 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
d6e9fb05
JK
1182 ;;
1183
1184 esac
1185done
1186
1187if test -n "$ac_prev"; then
bec39cab 1188 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1189 as_fn_error $? "missing argument to $ac_option"
d6e9fb05 1190fi
d6e9fb05 1191
81ecdfbb
RW
1192if test -n "$ac_unrecognized_opts"; then
1193 case $enable_option_checking in
1194 no) ;;
d0ac1c44 1195 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1196 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
dae5f5cf 1197 esac
81ecdfbb 1198fi
dae5f5cf 1199
81ecdfbb
RW
1200# Check all directory arguments for consistency.
1201for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1202 datadir sysconfdir sharedstatedir localstatedir includedir \
1203 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1204 libdir localedir mandir
dae5f5cf 1205do
81ecdfbb
RW
1206 eval ac_val=\$$ac_var
1207 # Remove trailing slashes.
1208 case $ac_val in
1209 */ )
1210 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1211 eval $ac_var=\$ac_val;;
1212 esac
1213 # Be sure to have absolute directory names.
dae5f5cf 1214 case $ac_val in
81ecdfbb
RW
1215 [\\/$]* | ?:[\\/]* ) continue;;
1216 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
d6e9fb05 1217 esac
d0ac1c44 1218 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
d6e9fb05
JK
1219done
1220
bec39cab
AC
1221# There might be people who depend on the old broken behavior: `$host'
1222# used to hold the argument of --host etc.
1223# FIXME: To remove some day.
1224build=$build_alias
1225host=$host_alias
1226target=$target_alias
1227
1228# FIXME: To remove some day.
1229if test "x$host_alias" != x; then
1230 if test "x$build_alias" = x; then
1231 cross_compiling=maybe
bec39cab
AC
1232 elif test "x$build_alias" != "x$host_alias"; then
1233 cross_compiling=yes
1234 fi
1235fi
d6e9fb05 1236
bec39cab
AC
1237ac_tool_prefix=
1238test -n "$host_alias" && ac_tool_prefix=$host_alias-
1239
1240test "$silent" = yes && exec 6>/dev/null
d6e9fb05 1241
d6e9fb05 1242
81ecdfbb
RW
1243ac_pwd=`pwd` && test -n "$ac_pwd" &&
1244ac_ls_di=`ls -di .` &&
1245ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1246 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1247test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1248 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1249
1250
d6e9fb05
JK
1251# Find the source files, if location was not specified.
1252if test -z "$srcdir"; then
1253 ac_srcdir_defaulted=yes
81ecdfbb
RW
1254 # Try the directory containing this script, then the parent directory.
1255 ac_confdir=`$as_dirname -- "$as_myself" ||
1256$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1257 X"$as_myself" : 'X\(//\)[^/]' \| \
1258 X"$as_myself" : 'X\(//\)$' \| \
1259 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1260$as_echo X"$as_myself" |
1261 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1262 s//\1/
1263 q
1264 }
1265 /^X\(\/\/\)[^/].*/{
1266 s//\1/
1267 q
1268 }
1269 /^X\(\/\/\)$/{
1270 s//\1/
1271 q
1272 }
1273 /^X\(\/\).*/{
1274 s//\1/
1275 q
1276 }
1277 s/.*/./; q'`
d6e9fb05 1278 srcdir=$ac_confdir
81ecdfbb 1279 if test ! -r "$srcdir/$ac_unique_file"; then
d6e9fb05
JK
1280 srcdir=..
1281 fi
1282else
1283 ac_srcdir_defaulted=no
1284fi
81ecdfbb
RW
1285if test ! -r "$srcdir/$ac_unique_file"; then
1286 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1287 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1288fi
1289ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1290ac_abs_confdir=`(
d0ac1c44 1291 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1292 pwd)`
1293# When building in place, set srcdir=.
1294if test "$ac_abs_confdir" = "$ac_pwd"; then
1295 srcdir=.
1296fi
1297# Remove unnecessary trailing slashes from srcdir.
1298# Double slashes in file names in object file debugging info
1299# mess up M-x gdb in Emacs.
1300case $srcdir in
1301*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1302esac
1303for ac_var in $ac_precious_vars; do
1304 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_env_${ac_var}_value=\$${ac_var}
1306 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1307 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1308done
d6e9fb05 1309
bec39cab
AC
1310#
1311# Report the --help message.
1312#
1313if test "$ac_init_help" = "long"; then
1314 # Omit some internal or obsolete options to make the list less imposing.
1315 # This message is too long to be a string in the A/UX 3.1 sh.
1316 cat <<_ACEOF
1317\`configure' configures this package to adapt to many kinds of systems.
1318
1319Usage: $0 [OPTION]... [VAR=VALUE]...
1320
1321To assign environment variables (e.g., CC, CFLAGS...), specify them as
1322VAR=VALUE. See below for descriptions of some of the useful variables.
1323
1324Defaults for the options are specified in brackets.
1325
1326Configuration:
1327 -h, --help display this help and exit
1328 --help=short display options specific to this package
1329 --help=recursive display the short help of all the included packages
1330 -V, --version display version information and exit
d0ac1c44 1331 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1332 --cache-file=FILE cache test results in FILE [disabled]
1333 -C, --config-cache alias for \`--cache-file=config.cache'
1334 -n, --no-create do not create output files
1335 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1336
bec39cab
AC
1337Installation directories:
1338 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1339 [$ac_default_prefix]
bec39cab 1340 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1341 [PREFIX]
bec39cab
AC
1342
1343By default, \`make install' will install all the files in
1344\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1345an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1346for instance \`--prefix=\$HOME'.
1347
1348For better control, use the options below.
1349
1350Fine tuning of the installation directories:
81ecdfbb
RW
1351 --bindir=DIR user executables [EPREFIX/bin]
1352 --sbindir=DIR system admin executables [EPREFIX/sbin]
1353 --libexecdir=DIR program executables [EPREFIX/libexec]
1354 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1355 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1356 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1357 --libdir=DIR object code libraries [EPREFIX/lib]
1358 --includedir=DIR C header files [PREFIX/include]
1359 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1360 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1361 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1362 --infodir=DIR info documentation [DATAROOTDIR/info]
1363 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1364 --mandir=DIR man documentation [DATAROOTDIR/man]
1365 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1366 --htmldir=DIR html documentation [DOCDIR]
1367 --dvidir=DIR dvi documentation [DOCDIR]
1368 --pdfdir=DIR pdf documentation [DOCDIR]
1369 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1370_ACEOF
1371
1372 cat <<\_ACEOF
1373
dcdb98d2
DJ
1374Program names:
1375 --program-prefix=PREFIX prepend PREFIX to installed program names
1376 --program-suffix=SUFFIX append SUFFIX to installed program names
1377 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1378
bec39cab
AC
1379System types:
1380 --build=BUILD configure for building on BUILD [guessed]
1381 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1382 --target=TARGET configure for building compilers for TARGET [HOST]
1383_ACEOF
1384fi
1385
1386if test -n "$ac_init_help"; then
1387
1388 cat <<\_ACEOF
1389
d4596a3d
PA
1390Optional Features:
1391 --disable-option-checking ignore unrecognized --enable/--with options
1392 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1393 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1394 --enable-maintainer-mode
1395 enable make rules and dependencies not useful (and
1396 sometimes confusing) to the casual installer
589bc927 1397 --disable-largefile omit support for large files
db6878ac 1398 --disable-rpath do not hardcode runtime library paths
8ecfd7bd
SDJ
1399 --enable-unit-tests Enable the inclusion of unit tests when compiling
1400 GDB
d4596a3d 1401 --enable-werror treat compile warnings as errors
8f13a3ce
MF
1402 --enable-build-warnings enable build-time compiler warnings if gcc is used
1403 --enable-gdb-build-warnings
1404 enable GDB specific build-time compiler warnings if
1405 gcc is used
c2a66c29
NS
1406 --enable-inprocess-agent
1407 inprocess agent
d4596a3d 1408
c16158bc
JM
1409Optional Packages:
1410 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1411 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
05ea2a05
TT
1412 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1413 --with-gnu-ld assume the C compiler uses GNU ld default=no
1414 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1415 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1416 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
0fb4aa4b
PA
1417 --with-ust=PATH Specify prefix directory for the installed UST package
1418 Equivalent to --with-ust-include=PATH/include
1419 plus --with-ust-lib=PATH/lib
1420 --with-ust-include=PATH Specify directory for installed UST include files
1421 --with-ust-lib=PATH Specify the directory for the installed UST library
c16158bc
JM
1422 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1423 --with-bugurl=URL Direct users to URL to report a bug
96f15937
PP
1424 --with-libthread-db=PATH
1425 use given libthread_db directly
c16158bc 1426
bec39cab
AC
1427Some influential environment variables:
1428 CC C compiler command
1429 CFLAGS C compiler flags
1430 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1431 nonstandard directory <lib dir>
81ecdfbb 1432 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1433 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1434 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1435 CXX C++ compiler command
1436 CXXFLAGS C++ compiler flags
bec39cab
AC
1437 CPP C preprocessor
1438
1439Use these variables to override the choices made by `configure' or to help
1440it to find libraries and programs with nonstandard names/locations.
1441
81ecdfbb 1442Report bugs to the package provider.
bec39cab 1443_ACEOF
81ecdfbb 1444ac_status=$?
bec39cab
AC
1445fi
1446
1447if test "$ac_init_help" = "recursive"; then
1448 # If there are subdirs, report their specific --help.
bec39cab 1449 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1450 test -d "$ac_dir" ||
1451 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1452 continue
bec39cab
AC
1453 ac_builddir=.
1454
81ecdfbb
RW
1455case "$ac_dir" in
1456.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1457*)
1458 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1459 # A ".." for each directory in $ac_dir_suffix.
1460 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1461 case $ac_top_builddir_sub in
1462 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1463 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1464 esac ;;
1465esac
1466ac_abs_top_builddir=$ac_pwd
1467ac_abs_builddir=$ac_pwd$ac_dir_suffix
1468# for backward compatibility:
1469ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1470
1471case $srcdir in
81ecdfbb 1472 .) # We are building in place.
bec39cab 1473 ac_srcdir=.
81ecdfbb
RW
1474 ac_top_srcdir=$ac_top_builddir_sub
1475 ac_abs_top_srcdir=$ac_pwd ;;
1476 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1477 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1478 ac_top_srcdir=$srcdir
1479 ac_abs_top_srcdir=$srcdir ;;
1480 *) # Relative name.
1481 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1482 ac_top_srcdir=$ac_top_build_prefix$srcdir
1483 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
dae5f5cf 1484esac
81ecdfbb
RW
1485ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1486
1487 cd "$ac_dir" || { ac_status=$?; continue; }
1488 # Check for guested configure.
1489 if test -f "$ac_srcdir/configure.gnu"; then
1490 echo &&
1491 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1492 elif test -f "$ac_srcdir/configure"; then
1493 echo &&
1494 $SHELL "$ac_srcdir/configure" --help=recursive
434c4c77 1495 else
81ecdfbb
RW
1496 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1497 fi || ac_status=$?
1498 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1499 done
1500fi
1501
81ecdfbb 1502test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1503if $ac_init_version; then
1504 cat <<\_ACEOF
81ecdfbb 1505configure
d0ac1c44 1506generated by GNU Autoconf 2.69
bec39cab 1507
d0ac1c44 1508Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1509This configure script is free software; the Free Software Foundation
1510gives unlimited permission to copy, distribute and modify it.
1511_ACEOF
81ecdfbb 1512 exit
bec39cab 1513fi
bec39cab 1514
81ecdfbb
RW
1515## ------------------------ ##
1516## Autoconf initialization. ##
1517## ------------------------ ##
bec39cab 1518
81ecdfbb
RW
1519# ac_fn_c_try_compile LINENO
1520# --------------------------
1521# Try to compile conftest.$ac_ext, and return whether this succeeded.
1522ac_fn_c_try_compile ()
bec39cab 1523{
81ecdfbb
RW
1524 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1525 rm -f conftest.$ac_objext
1526 if { { ac_try="$ac_compile"
1527case "(($ac_try" in
1528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1529 *) ac_try_echo=$ac_try;;
1530esac
1531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1532$as_echo "$ac_try_echo"; } >&5
1533 (eval "$ac_compile") 2>conftest.err
1534 ac_status=$?
1535 if test -s conftest.err; then
1536 grep -v '^ *+' conftest.err >conftest.er1
1537 cat conftest.er1 >&5
1538 mv -f conftest.er1 conftest.err
1539 fi
1540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1541 test $ac_status = 0; } && {
1542 test -z "$ac_c_werror_flag" ||
1543 test ! -s conftest.err
1544 } && test -s conftest.$ac_objext; then :
1545 ac_retval=0
1546else
1547 $as_echo "$as_me: failed program was:" >&5
1548sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1549
81ecdfbb
RW
1550 ac_retval=1
1551fi
d0ac1c44
SM
1552 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1553 as_fn_set_status $ac_retval
bec39cab 1554
81ecdfbb 1555} # ac_fn_c_try_compile
bec39cab 1556
3bc3d82a
PA
1557# ac_fn_cxx_try_compile LINENO
1558# ----------------------------
1559# Try to compile conftest.$ac_ext, and return whether this succeeded.
1560ac_fn_cxx_try_compile ()
1561{
1562 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563 rm -f conftest.$ac_objext
1564 if { { ac_try="$ac_compile"
1565case "(($ac_try" in
1566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567 *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571 (eval "$ac_compile") 2>conftest.err
1572 ac_status=$?
1573 if test -s conftest.err; then
1574 grep -v '^ *+' conftest.err >conftest.er1
1575 cat conftest.er1 >&5
1576 mv -f conftest.er1 conftest.err
1577 fi
1578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1579 test $ac_status = 0; } && {
1580 test -z "$ac_cxx_werror_flag" ||
1581 test ! -s conftest.err
1582 } && test -s conftest.$ac_objext; then :
1583 ac_retval=0
1584else
1585 $as_echo "$as_me: failed program was:" >&5
1586sed 's/^/| /' conftest.$ac_ext >&5
1587
1588 ac_retval=1
1589fi
d0ac1c44
SM
1590 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1591 as_fn_set_status $ac_retval
3bc3d82a
PA
1592
1593} # ac_fn_cxx_try_compile
1594
81ecdfbb
RW
1595# ac_fn_c_try_cpp LINENO
1596# ----------------------
1597# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1598ac_fn_c_try_cpp ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 if { { ac_try="$ac_cpp conftest.$ac_ext"
1602case "(($ac_try" in
1603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1604 *) ac_try_echo=$ac_try;;
1605esac
1606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1607$as_echo "$ac_try_echo"; } >&5
1608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1609 ac_status=$?
1610 if test -s conftest.err; then
1611 grep -v '^ *+' conftest.err >conftest.er1
1612 cat conftest.er1 >&5
1613 mv -f conftest.er1 conftest.err
1614 fi
1615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1616 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1617 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1618 test ! -s conftest.err
1619 }; then :
1620 ac_retval=0
1621else
1622 $as_echo "$as_me: failed program was:" >&5
1623sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1624
81ecdfbb
RW
1625 ac_retval=1
1626fi
d0ac1c44
SM
1627 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1628 as_fn_set_status $ac_retval
bec39cab 1629
81ecdfbb
RW
1630} # ac_fn_c_try_cpp
1631
1632# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1633# -------------------------------------------------------
1634# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1635# the include files in INCLUDES and setting the cache variable VAR
1636# accordingly.
1637ac_fn_c_check_header_mongrel ()
1638{
1639 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1640 if eval \${$3+:} false; then :
81ecdfbb
RW
1641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1642$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1643if eval \${$3+:} false; then :
81ecdfbb
RW
1644 $as_echo_n "(cached) " >&6
1645fi
1646eval ac_res=\$$3
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1648$as_echo "$ac_res" >&6; }
1649else
1650 # Is the header compilable?
1651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1652$as_echo_n "checking $2 usability... " >&6; }
1653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1654/* end confdefs.h. */
1655$4
1656#include <$2>
1657_ACEOF
1658if ac_fn_c_try_compile "$LINENO"; then :
1659 ac_header_compiler=yes
1660else
1661 ac_header_compiler=no
1662fi
1663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1665$as_echo "$ac_header_compiler" >&6; }
1666
1667# Is the header present?
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1669$as_echo_n "checking $2 presence... " >&6; }
1670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1671/* end confdefs.h. */
1672#include <$2>
1673_ACEOF
1674if ac_fn_c_try_cpp "$LINENO"; then :
1675 ac_header_preproc=yes
1676else
1677 ac_header_preproc=no
1678fi
d0ac1c44 1679rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1681$as_echo "$ac_header_preproc" >&6; }
1682
1683# So? What about this header?
1684case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1685 yes:no: )
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1687$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1689$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1690 ;;
1691 no:yes:* )
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1693$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1695$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1697$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1699$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1701$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1702 ;;
1703esac
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1705$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1706if eval \${$3+:} false; then :
81ecdfbb
RW
1707 $as_echo_n "(cached) " >&6
1708else
1709 eval "$3=\$ac_header_compiler"
1710fi
1711eval ac_res=\$$3
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713$as_echo "$ac_res" >&6; }
1714fi
d0ac1c44 1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1716
1717} # ac_fn_c_check_header_mongrel
1718
1719# ac_fn_c_try_run LINENO
1720# ----------------------
1721# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1722# that executables *can* be run.
1723ac_fn_c_try_run ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732$as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_link") 2>&5
1734 ac_status=$?
1735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1737 { { case "(($ac_try" in
1738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739 *) ac_try_echo=$ac_try;;
1740esac
1741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1742$as_echo "$ac_try_echo"; } >&5
1743 (eval "$ac_try") 2>&5
1744 ac_status=$?
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; }; }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: program exited with status $ac_status" >&5
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=$ac_status
1754fi
1755 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1756 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1757 as_fn_set_status $ac_retval
81ecdfbb
RW
1758
1759} # ac_fn_c_try_run
1760
1761# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1762# -------------------------------------------------------
1763# Tests whether HEADER exists and can be compiled using the include files in
1764# INCLUDES, setting the cache variable VAR accordingly.
1765ac_fn_c_check_header_compile ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1770if eval \${$3+:} false; then :
81ecdfbb
RW
1771 $as_echo_n "(cached) " >&6
1772else
1773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775$4
1776#include <$2>
1777_ACEOF
1778if ac_fn_c_try_compile "$LINENO"; then :
1779 eval "$3=yes"
1780else
1781 eval "$3=no"
1782fi
1783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1784fi
1785eval ac_res=\$$3
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1787$as_echo "$ac_res" >&6; }
d0ac1c44 1788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1789
1790} # ac_fn_c_check_header_compile
1791
eb0edac8
GB
1792# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1793# -------------------------------------------
1794# Tests whether TYPE exists after having included INCLUDES, setting cache
1795# variable VAR accordingly.
1796ac_fn_c_check_type ()
1797{
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1800$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1801if eval \${$3+:} false; then :
eb0edac8
GB
1802 $as_echo_n "(cached) " >&6
1803else
1804 eval "$3=no"
1805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1806/* end confdefs.h. */
1807$4
1808int
1809main ()
1810{
1811if (sizeof ($2))
1812 return 0;
1813 ;
1814 return 0;
1815}
1816_ACEOF
1817if ac_fn_c_try_compile "$LINENO"; then :
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821int
1822main ()
1823{
1824if (sizeof (($2)))
1825 return 0;
1826 ;
1827 return 0;
1828}
1829_ACEOF
1830if ac_fn_c_try_compile "$LINENO"; then :
1831
1832else
1833 eval "$3=yes"
1834fi
1835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1836fi
1837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1838fi
1839eval ac_res=\$$3
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1841$as_echo "$ac_res" >&6; }
d0ac1c44 1842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
eb0edac8
GB
1843
1844} # ac_fn_c_check_type
1845
404f2902
FCE
1846# ac_fn_c_try_link LINENO
1847# -----------------------
1848# Try to link conftest.$ac_ext, and return whether this succeeded.
1849ac_fn_c_try_link ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852 rm -f conftest.$ac_objext conftest$ac_exeext
1853 if { { ac_try="$ac_link"
1854case "(($ac_try" in
1855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1856 *) ac_try_echo=$ac_try;;
1857esac
1858eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1859$as_echo "$ac_try_echo"; } >&5
1860 (eval "$ac_link") 2>conftest.err
1861 ac_status=$?
1862 if test -s conftest.err; then
1863 grep -v '^ *+' conftest.err >conftest.er1
1864 cat conftest.er1 >&5
1865 mv -f conftest.er1 conftest.err
1866 fi
1867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1868 test $ac_status = 0; } && {
1869 test -z "$ac_c_werror_flag" ||
1870 test ! -s conftest.err
1871 } && test -s conftest$ac_exeext && {
1872 test "$cross_compiling" = yes ||
1873 test -x conftest$ac_exeext
1874 }; then :
1875 ac_retval=0
1876else
1877 $as_echo "$as_me: failed program was:" >&5
1878sed 's/^/| /' conftest.$ac_ext >&5
1879
1880 ac_retval=1
1881fi
1882 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1883 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1884 # interfere with the next link command; also delete a directory that is
1885 # left behind by Apple's compiler. We do this before executing the actions.
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_link
1891
81ecdfbb
RW
1892# ac_fn_c_check_func LINENO FUNC VAR
1893# ----------------------------------
1894# Tests whether FUNC exists, setting the cache variable VAR accordingly
1895ac_fn_c_check_func ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1900if eval \${$3+:} false; then :
81ecdfbb
RW
1901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1907#define $2 innocuous_$2
1908
1909/* System header to define __stub macros and hopefully few prototypes,
1910 which can conflict with char $2 (); below.
1911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1912 <limits.h> exists even on freestanding compilers. */
1913
1914#ifdef __STDC__
1915# include <limits.h>
1916#else
1917# include <assert.h>
1918#endif
1919
1920#undef $2
1921
1922/* Override any GCC internal prototype to avoid an error.
1923 Use char because int might match the return type of a GCC
1924 builtin and then its argument prototype would still apply. */
1925#ifdef __cplusplus
1926extern "C"
1927#endif
1928char $2 ();
1929/* The GNU C library defines this for functions which it implements
1930 to always fail with ENOSYS. Some functions are actually named
1931 something starting with __ and the normal name is an alias. */
1932#if defined __stub_$2 || defined __stub___$2
1933choke me
1934#endif
1935
1936int
1937main ()
1938{
1939return $2 ();
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_link "$LINENO"; then :
1945 eval "$3=yes"
1946else
1947 eval "$3=no"
1948fi
1949rm -f core conftest.err conftest.$ac_objext \
1950 conftest$ac_exeext conftest.$ac_ext
1951fi
1952eval ac_res=\$$3
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1954$as_echo "$ac_res" >&6; }
d0ac1c44 1955 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1956
1957} # ac_fn_c_check_func
1958
d0ac1c44
SM
1959# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1960# ---------------------------------------------
1961# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1962# accordingly.
81ecdfbb
RW
1963ac_fn_c_check_decl ()
1964{
1965 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0fb4aa4b
PA
1966 as_decl_name=`echo $2|sed 's/ *(.*//'`
1967 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1969$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 1970if eval \${$3+:} false; then :
81ecdfbb
RW
1971 $as_echo_n "(cached) " >&6
1972else
1973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1974/* end confdefs.h. */
1975$4
1976int
1977main ()
1978{
0fb4aa4b
PA
1979#ifndef $as_decl_name
1980#ifdef __cplusplus
1981 (void) $as_decl_use;
1982#else
1983 (void) $as_decl_name;
1984#endif
81ecdfbb
RW
1985#endif
1986
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992 eval "$3=yes"
1993else
1994 eval "$3=no"
1995fi
1996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1997fi
1998eval ac_res=\$$3
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2000$as_echo "$ac_res" >&6; }
d0ac1c44 2001 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
2002
2003} # ac_fn_c_check_decl
2004
05ea2a05
TT
2005# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2006# ----------------------------------------------------
2007# Tries to find if the field MEMBER exists in type AGGR, after including
2008# INCLUDES, setting cache variable VAR accordingly.
2009ac_fn_c_check_member ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2013$as_echo_n "checking for $2.$3... " >&6; }
2014if eval \${$4+:} false; then :
2015 $as_echo_n "(cached) " >&6
2016else
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$5
2020int
2021main ()
2022{
2023static $2 ac_aggr;
2024if (ac_aggr.$3)
2025return 0;
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 eval "$4=yes"
2032else
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$5
2036int
2037main ()
2038{
2039static $2 ac_aggr;
2040if (sizeof ac_aggr.$3)
2041return 0;
2042 ;
2043 return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"; then :
2047 eval "$4=yes"
2048else
2049 eval "$4=no"
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054fi
2055eval ac_res=\$$4
2056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2057$as_echo "$ac_res" >&6; }
2058 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2059
2060} # ac_fn_c_check_member
2061
21987b9c
TT
2062# ac_fn_cxx_try_link LINENO
2063# -------------------------
2064# Try to link conftest.$ac_ext, and return whether this succeeded.
2065ac_fn_cxx_try_link ()
2066{
2067 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068 rm -f conftest.$ac_objext conftest$ac_exeext
2069 if { { ac_try="$ac_link"
2070case "(($ac_try" in
2071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072 *) ac_try_echo=$ac_try;;
2073esac
2074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075$as_echo "$ac_try_echo"; } >&5
2076 (eval "$ac_link") 2>conftest.err
2077 ac_status=$?
2078 if test -s conftest.err; then
2079 grep -v '^ *+' conftest.err >conftest.er1
2080 cat conftest.er1 >&5
2081 mv -f conftest.er1 conftest.err
2082 fi
2083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084 test $ac_status = 0; } && {
2085 test -z "$ac_cxx_werror_flag" ||
2086 test ! -s conftest.err
2087 } && test -s conftest$ac_exeext && {
2088 test "$cross_compiling" = yes ||
2089 test -x conftest$ac_exeext
2090 }; then :
2091 ac_retval=0
2092else
2093 $as_echo "$as_me: failed program was:" >&5
2094sed 's/^/| /' conftest.$ac_ext >&5
2095
2096 ac_retval=1
2097fi
2098 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2099 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2100 # interfere with the next link command; also delete a directory that is
2101 # left behind by Apple's compiler. We do this before executing the actions.
2102 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2103 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2104 as_fn_set_status $ac_retval
2105
2106} # ac_fn_cxx_try_link
2107
2108# ac_fn_cxx_check_func LINENO FUNC VAR
2109# ------------------------------------
2110# Tests whether FUNC exists, setting the cache variable VAR accordingly
2111ac_fn_cxx_check_func ()
2112{
2113 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2115$as_echo_n "checking for $2... " >&6; }
2116if eval \${$3+:} false; then :
2117 $as_echo_n "(cached) " >&6
2118else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2122 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2123#define $2 innocuous_$2
2124
2125/* System header to define __stub macros and hopefully few prototypes,
2126 which can conflict with char $2 (); below.
2127 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2128 <limits.h> exists even on freestanding compilers. */
2129
2130#ifdef __STDC__
2131# include <limits.h>
2132#else
2133# include <assert.h>
2134#endif
2135
2136#undef $2
2137
2138/* Override any GCC internal prototype to avoid an error.
2139 Use char because int might match the return type of a GCC
2140 builtin and then its argument prototype would still apply. */
2141#ifdef __cplusplus
2142extern "C"
2143#endif
2144char $2 ();
2145/* The GNU C library defines this for functions which it implements
2146 to always fail with ENOSYS. Some functions are actually named
2147 something starting with __ and the normal name is an alias. */
2148#if defined __stub_$2 || defined __stub___$2
2149choke me
2150#endif
2151
2152int
2153main ()
2154{
2155return $2 ();
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_cxx_try_link "$LINENO"; then :
2161 eval "$3=yes"
2162else
2163 eval "$3=no"
2164fi
2165rm -f core conftest.err conftest.$ac_objext \
2166 conftest$ac_exeext conftest.$ac_ext
2167fi
2168eval ac_res=\$$3
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170$as_echo "$ac_res" >&6; }
2171 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2172
2173} # ac_fn_cxx_check_func
2174
07697489
PA
2175# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2176# --------------------------------------------
2177# Tries to find the compile-time value of EXPR in a program that includes
2178# INCLUDES, setting VAR accordingly. Returns whether the value could be
2179# computed
2180ac_fn_c_compute_int ()
2181{
2182 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183 if test "$cross_compiling" = yes; then
2184 # Depending upon the size, compute the lo and hi bounds.
2185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187$4
2188int
2189main ()
2190{
2191static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2192test_array [0] = 0;
2193return test_array [0];
07697489
PA
2194
2195 ;
2196 return 0;
2197}
2198_ACEOF
2199if ac_fn_c_try_compile "$LINENO"; then :
2200 ac_lo=0 ac_mid=0
2201 while :; do
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205int
2206main ()
2207{
2208static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2209test_array [0] = 0;
2210return test_array [0];
07697489
PA
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217 ac_hi=$ac_mid; break
2218else
2219 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2220 if test $ac_lo -le $ac_mid; then
2221 ac_lo= ac_hi=
2222 break
2223 fi
2224 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2225fi
2226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227 done
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231$4
2232int
2233main ()
2234{
2235static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2236test_array [0] = 0;
2237return test_array [0];
07697489
PA
2238
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243if ac_fn_c_try_compile "$LINENO"; then :
2244 ac_hi=-1 ac_mid=-1
2245 while :; do
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2253test_array [0] = 0;
2254return test_array [0];
07697489
PA
2255
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_compile "$LINENO"; then :
2261 ac_lo=$ac_mid; break
2262else
2263 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2264 if test $ac_mid -le $ac_hi; then
2265 ac_lo= ac_hi=
2266 break
2267 fi
2268 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271 done
2272else
2273 ac_lo= ac_hi=
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278# Binary search between lo and hi bounds.
2279while test "x$ac_lo" != "x$ac_hi"; do
2280 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h. */
2283$4
2284int
2285main ()
2286{
2287static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2288test_array [0] = 0;
2289return test_array [0];
07697489
PA
2290
2291 ;
2292 return 0;
2293}
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"; then :
2296 ac_hi=$ac_mid
2297else
2298 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301done
2302case $ac_lo in #((
2303?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2304'') ac_retval=1 ;;
2305esac
2306 else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$4
2310static long int longval () { return $2; }
2311static unsigned long int ulongval () { return $2; }
2312#include <stdio.h>
2313#include <stdlib.h>
2314int
2315main ()
2316{
2317
2318 FILE *f = fopen ("conftest.val", "w");
2319 if (! f)
2320 return 1;
2321 if (($2) < 0)
2322 {
2323 long int i = longval ();
2324 if (i != ($2))
2325 return 1;
2326 fprintf (f, "%ld", i);
2327 }
2328 else
2329 {
2330 unsigned long int i = ulongval ();
2331 if (i != ($2))
2332 return 1;
2333 fprintf (f, "%lu", i);
2334 }
2335 /* Do not output a trailing newline, as this causes \r\n confusion
2336 on some platforms. */
2337 return ferror (f) || fclose (f) != 0;
2338
2339 ;
2340 return 0;
2341}
2342_ACEOF
2343if ac_fn_c_try_run "$LINENO"; then :
2344 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2345else
2346 ac_retval=1
2347fi
2348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2349 conftest.$ac_objext conftest.beam conftest.$ac_ext
2350rm -f conftest.val
2351
2352 fi
d0ac1c44
SM
2353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354 as_fn_set_status $ac_retval
07697489
PA
2355
2356} # ac_fn_c_compute_int
81ecdfbb
RW
2357cat >config.log <<_ACEOF
2358This file contains any messages produced by compilers while
2359running configure, to aid debugging if configure makes a mistake.
2360
2361It was created by $as_me, which was
d0ac1c44 2362generated by GNU Autoconf 2.69. Invocation command line was
81ecdfbb
RW
2363
2364 $ $0 $@
2365
2366_ACEOF
2367exec 5>>config.log
2368{
2369cat <<_ASUNAME
2370## --------- ##
2371## Platform. ##
2372## --------- ##
2373
2374hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2375uname -m = `(uname -m) 2>/dev/null || echo unknown`
2376uname -r = `(uname -r) 2>/dev/null || echo unknown`
2377uname -s = `(uname -s) 2>/dev/null || echo unknown`
2378uname -v = `(uname -v) 2>/dev/null || echo unknown`
2379
2380/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2381/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2382
2383/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2384/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2385/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2386/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2387/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2388/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2389/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2390
2391_ASUNAME
2392
2393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2394for as_dir in $PATH
2395do
2396 IFS=$as_save_IFS
2397 test -z "$as_dir" && as_dir=.
2398 $as_echo "PATH: $as_dir"
2399 done
2400IFS=$as_save_IFS
2401
2402} >&5
2403
2404cat >&5 <<_ACEOF
2405
2406
2407## ----------- ##
2408## Core tests. ##
2409## ----------- ##
bec39cab
AC
2410
2411_ACEOF
2412
2413
2414# Keep a trace of the command line.
2415# Strip out --no-create and --no-recursion so they do not pile up.
2416# Strip out --silent because we don't want to record it for future runs.
2417# Also quote any args containing shell meta-characters.
2418# Make two passes to allow for proper duplicate-argument suppression.
2419ac_configure_args=
2420ac_configure_args0=
2421ac_configure_args1=
bec39cab
AC
2422ac_must_keep_next=false
2423for ac_pass in 1 2
2424do
2425 for ac_arg
2426 do
2427 case $ac_arg in
2428 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2429 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2430 | -silent | --silent | --silen | --sile | --sil)
2431 continue ;;
81ecdfbb
RW
2432 *\'*)
2433 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2434 esac
2435 case $ac_pass in
81ecdfbb 2436 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
bec39cab 2437 2)
81ecdfbb 2438 as_fn_append ac_configure_args1 " '$ac_arg'"
bec39cab
AC
2439 if test $ac_must_keep_next = true; then
2440 ac_must_keep_next=false # Got value, back to normal.
2441 else
2442 case $ac_arg in
2443 *=* | --config-cache | -C | -disable-* | --disable-* \
2444 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2445 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2446 | -with-* | --with-* | -without-* | --without-* | --x)
2447 case "$ac_configure_args0 " in
2448 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2449 esac
2450 ;;
2451 -* ) ac_must_keep_next=true ;;
2452 esac
2453 fi
81ecdfbb 2454 as_fn_append ac_configure_args " '$ac_arg'"
bec39cab
AC
2455 ;;
2456 esac
2457 done
2458done
81ecdfbb
RW
2459{ ac_configure_args0=; unset ac_configure_args0;}
2460{ ac_configure_args1=; unset ac_configure_args1;}
bec39cab
AC
2461
2462# When interrupted or exit'd, cleanup temporary files, and complete
2463# config.log. We remove comments because anyway the quotes in there
2464# would cause problems or look ugly.
81ecdfbb
RW
2465# WARNING: Use '\'' to represent an apostrophe within the trap.
2466# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
bec39cab
AC
2467trap 'exit_status=$?
2468 # Save into config.log some information that might help in debugging.
2469 {
2470 echo
2471
d0ac1c44 2472 $as_echo "## ---------------- ##
bec39cab 2473## Cache variables. ##
d0ac1c44 2474## ---------------- ##"
bec39cab
AC
2475 echo
2476 # The following way of writing the cache mishandles newlines in values,
81ecdfbb
RW
2477(
2478 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2479 eval ac_val=\$$ac_var
2480 case $ac_val in #(
2481 *${as_nl}*)
2482 case $ac_var in #(
2483 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2484$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2485 esac
2486 case $ac_var in #(
2487 _ | IFS | as_nl) ;; #(
2488 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2489 *) { eval $ac_var=; unset $ac_var;} ;;
2490 esac ;;
2491 esac
2492 done
bec39cab 2493 (set) 2>&1 |
81ecdfbb
RW
2494 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2495 *${as_nl}ac_space=\ *)
bec39cab 2496 sed -n \
81ecdfbb
RW
2497 "s/'\''/'\''\\\\'\'''\''/g;
2498 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2499 ;; #(
bec39cab 2500 *)
81ecdfbb 2501 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 2502 ;;
81ecdfbb
RW
2503 esac |
2504 sort
2505)
bec39cab
AC
2506 echo
2507
d0ac1c44 2508 $as_echo "## ----------------- ##
bec39cab 2509## Output variables. ##
d0ac1c44 2510## ----------------- ##"
bec39cab
AC
2511 echo
2512 for ac_var in $ac_subst_vars
2513 do
81ecdfbb
RW
2514 eval ac_val=\$$ac_var
2515 case $ac_val in
2516 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2517 esac
2518 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2519 done | sort
2520 echo
2521
2522 if test -n "$ac_subst_files"; then
d0ac1c44 2523 $as_echo "## ------------------- ##
81ecdfbb 2524## File substitutions. ##
d0ac1c44 2525## ------------------- ##"
bec39cab
AC
2526 echo
2527 for ac_var in $ac_subst_files
2528 do
81ecdfbb
RW
2529 eval ac_val=\$$ac_var
2530 case $ac_val in
2531 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2532 esac
2533 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2534 done | sort
2535 echo
434c4c77 2536 fi
bec39cab
AC
2537
2538 if test -s confdefs.h; then
d0ac1c44 2539 $as_echo "## ----------- ##
bec39cab 2540## confdefs.h. ##
d0ac1c44 2541## ----------- ##"
bec39cab 2542 echo
81ecdfbb 2543 cat confdefs.h
bec39cab
AC
2544 echo
2545 fi
2546 test "$ac_signal" != 0 &&
81ecdfbb
RW
2547 $as_echo "$as_me: caught signal $ac_signal"
2548 $as_echo "$as_me: exit $exit_status"
bec39cab 2549 } >&5
81ecdfbb
RW
2550 rm -f core *.core core.conftest.* &&
2551 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 2552 exit $exit_status
81ecdfbb 2553' 0
bec39cab 2554for ac_signal in 1 2 13 15; do
81ecdfbb 2555 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
bec39cab
AC
2556done
2557ac_signal=0
2558
2559# confdefs.h avoids OS command line length limits that DEFS can exceed.
81ecdfbb
RW
2560rm -f -r conftest* confdefs.h
2561
2562$as_echo "/* confdefs.h */" > confdefs.h
bec39cab
AC
2563
2564# Predefined preprocessor variables.
2565
2566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_NAME "$PACKAGE_NAME"
2568_ACEOF
2569
bec39cab
AC
2570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2572_ACEOF
2573
bec39cab
AC
2574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_VERSION "$PACKAGE_VERSION"
2576_ACEOF
2577
bec39cab
AC
2578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_STRING "$PACKAGE_STRING"
2580_ACEOF
2581
bec39cab
AC
2582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2584_ACEOF
2585
81ecdfbb
RW
2586cat >>confdefs.h <<_ACEOF
2587#define PACKAGE_URL "$PACKAGE_URL"
2588_ACEOF
2589
bec39cab
AC
2590
2591# Let the site file select an alternate cache file if it wants to.
81ecdfbb
RW
2592# Prefer an explicitly selected file to automatically selected ones.
2593ac_site_file1=NONE
2594ac_site_file2=NONE
2595if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2596 # We do not want a PATH search for config.site.
2597 case $CONFIG_SITE in #((
2598 -*) ac_site_file1=./$CONFIG_SITE;;
2599 */*) ac_site_file1=$CONFIG_SITE;;
2600 *) ac_site_file1=./$CONFIG_SITE;;
2601 esac
81ecdfbb
RW
2602elif test "x$prefix" != xNONE; then
2603 ac_site_file1=$prefix/share/config.site
2604 ac_site_file2=$prefix/etc/config.site
2605else
2606 ac_site_file1=$ac_default_prefix/share/config.site
2607 ac_site_file2=$ac_default_prefix/etc/config.site
d6e9fb05 2608fi
81ecdfbb
RW
2609for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2610do
2611 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2612 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2614$as_echo "$as_me: loading site script $ac_site_file" >&6;}
bec39cab 2615 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2616 . "$ac_site_file" \
2617 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2619as_fn_error $? "failed to load site script $ac_site_file
2620See \`config.log' for more details" "$LINENO" 5; }
d6e9fb05
JK
2621 fi
2622done
2623
2624if test -r "$cache_file"; then
d0ac1c44
SM
2625 # Some versions of bash will fail to source /dev/null (special files
2626 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2627 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2628 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2629$as_echo "$as_me: loading cache $cache_file" >&6;}
bec39cab 2630 case $cache_file in
81ecdfbb
RW
2631 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2632 *) . "./$cache_file";;
bec39cab
AC
2633 esac
2634 fi
d6e9fb05 2635else
81ecdfbb
RW
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2637$as_echo "$as_me: creating cache $cache_file" >&6;}
bec39cab 2638 >$cache_file
d6e9fb05
JK
2639fi
2640
05ea2a05
TT
2641as_fn_append ac_header_list " stdlib.h"
2642as_fn_append ac_header_list " unistd.h"
2643as_fn_append ac_header_list " sys/param.h"
bec39cab
AC
2644# Check that the precious variables saved in the cache have kept the same
2645# value.
2646ac_cache_corrupted=false
81ecdfbb 2647for ac_var in $ac_precious_vars; do
bec39cab
AC
2648 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2649 eval ac_new_set=\$ac_env_${ac_var}_set
81ecdfbb
RW
2650 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2651 eval ac_new_val=\$ac_env_${ac_var}_value
bec39cab
AC
2652 case $ac_old_set,$ac_new_set in
2653 set,)
81ecdfbb
RW
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2655$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
bec39cab
AC
2656 ac_cache_corrupted=: ;;
2657 ,set)
81ecdfbb
RW
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2659$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
bec39cab
AC
2660 ac_cache_corrupted=: ;;
2661 ,);;
2662 *)
2663 if test "x$ac_old_val" != "x$ac_new_val"; then
81ecdfbb
RW
2664 # differences in whitespace do not lead to failure.
2665 ac_old_val_w=`echo x $ac_old_val`
2666 ac_new_val_w=`echo x $ac_new_val`
2667 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2669$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2670 ac_cache_corrupted=:
2671 else
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2673$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2674 eval $ac_var=\$ac_old_val
2675 fi
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2677$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2679$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
2680 fi;;
2681 esac
2682 # Pass precious variables to config.status.
2683 if test "$ac_new_set" = set; then
2684 case $ac_new_val in
81ecdfbb 2685 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2686 *) ac_arg=$ac_var=$ac_new_val ;;
2687 esac
2688 case " $ac_configure_args " in
2689 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
81ecdfbb 2690 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
bec39cab 2691 esac
d6e9fb05 2692 fi
bec39cab
AC
2693done
2694if $ac_cache_corrupted; then
81ecdfbb
RW
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2698$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2699 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
d6e9fb05 2700fi
81ecdfbb
RW
2701## -------------------- ##
2702## Main body of script. ##
2703## -------------------- ##
d6e9fb05 2704
dae5f5cf
DJ
2705ac_ext=c
2706ac_cpp='$CPP $CPPFLAGS'
2707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2709ac_compiler_gnu=$ac_cv_c_compiler_gnu
2710
d6e9fb05 2711
84563040 2712
bec39cab
AC
2713
2714
81ecdfbb 2715ac_config_headers="$ac_config_headers config.h:config.in"
bec39cab
AC
2716
2717
e28b3332 2718
c9a1864a
YQ
2719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2720$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2721 # Check whether --enable-maintainer-mode was given.
2722if test "${enable_maintainer_mode+set}" = set; then :
2723 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2724else
2725 USE_MAINTAINER_MODE=no
2726fi
2727
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2729$as_echo "$USE_MAINTAINER_MODE" >&6; }
2730 if test $USE_MAINTAINER_MODE = yes; then
2731 MAINTAINER_MODE_TRUE=
2732 MAINTAINER_MODE_FALSE='#'
2733else
2734 MAINTAINER_MODE_TRUE='#'
2735 MAINTAINER_MODE_FALSE=
2736fi
2737
2738 MAINT=$MAINTAINER_MODE_TRUE
2739
2740
2741
bec39cab
AC
2742ac_ext=c
2743ac_cpp='$CPP $CPPFLAGS'
2744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2746ac_compiler_gnu=$ac_cv_c_compiler_gnu
2747if test -n "$ac_tool_prefix"; then
2748 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2749set dummy ${ac_tool_prefix}gcc; ac_word=$2
81ecdfbb
RW
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2751$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2752if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2753 $as_echo_n "(cached) " >&6
84563040
DJ
2754else
2755 if test -n "$CC"; then
2756 ac_cv_prog_CC="$CC" # Let the user override the test.
2757else
bec39cab
AC
2758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2759for as_dir in $PATH
2760do
2761 IFS=$as_save_IFS
2762 test -z "$as_dir" && as_dir=.
81ecdfbb 2763 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2765 ac_cv_prog_CC="${ac_tool_prefix}gcc"
81ecdfbb 2766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2767 break 2
2768 fi
2769done
81ecdfbb
RW
2770 done
2771IFS=$as_save_IFS
bec39cab 2772
84563040
DJ
2773fi
2774fi
bec39cab 2775CC=$ac_cv_prog_CC
84563040 2776if test -n "$CC"; then
81ecdfbb
RW
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2778$as_echo "$CC" >&6; }
84563040 2779else
81ecdfbb
RW
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2781$as_echo "no" >&6; }
84563040
DJ
2782fi
2783
81ecdfbb 2784
bec39cab
AC
2785fi
2786if test -z "$ac_cv_prog_CC"; then
2787 ac_ct_CC=$CC
2788 # Extract the first word of "gcc", so it can be a program name with args.
2789set dummy gcc; ac_word=$2
81ecdfbb
RW
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2792if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2793 $as_echo_n "(cached) " >&6
84563040 2794else
bec39cab
AC
2795 if test -n "$ac_ct_CC"; then
2796 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
84563040 2797else
bec39cab
AC
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
2800do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
81ecdfbb 2803 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2805 ac_cv_prog_ac_ct_CC="gcc"
81ecdfbb 2806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2807 break 2
2808 fi
2809done
81ecdfbb
RW
2810 done
2811IFS=$as_save_IFS
bec39cab
AC
2812
2813fi
2814fi
2815ac_ct_CC=$ac_cv_prog_ac_ct_CC
2816if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2818$as_echo "$ac_ct_CC" >&6; }
bec39cab 2819else
81ecdfbb
RW
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821$as_echo "no" >&6; }
bec39cab
AC
2822fi
2823
81ecdfbb
RW
2824 if test "x$ac_ct_CC" = x; then
2825 CC=""
2826 else
2827 case $cross_compiling:$ac_tool_warned in
2828yes:)
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2830$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2831ac_tool_warned=yes ;;
2832esac
2833 CC=$ac_ct_CC
2834 fi
bec39cab
AC
2835else
2836 CC="$ac_cv_prog_CC"
2837fi
2838
2839if test -z "$CC"; then
81ecdfbb
RW
2840 if test -n "$ac_tool_prefix"; then
2841 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 2842set dummy ${ac_tool_prefix}cc; ac_word=$2
81ecdfbb
RW
2843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2844$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2845if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2846 $as_echo_n "(cached) " >&6
bec39cab
AC
2847else
2848 if test -n "$CC"; then
2849 ac_cv_prog_CC="$CC" # Let the user override the test.
2850else
2851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2852for as_dir in $PATH
2853do
2854 IFS=$as_save_IFS
2855 test -z "$as_dir" && as_dir=.
81ecdfbb 2856 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2858 ac_cv_prog_CC="${ac_tool_prefix}cc"
81ecdfbb 2859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2860 break 2
2861 fi
2862done
81ecdfbb
RW
2863 done
2864IFS=$as_save_IFS
bec39cab
AC
2865
2866fi
2867fi
2868CC=$ac_cv_prog_CC
2869if test -n "$CC"; then
81ecdfbb
RW
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2871$as_echo "$CC" >&6; }
bec39cab 2872else
81ecdfbb
RW
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2874$as_echo "no" >&6; }
bec39cab
AC
2875fi
2876
81ecdfbb
RW
2877
2878 fi
dae5f5cf 2879fi
81ecdfbb 2880if test -z "$CC"; then
dae5f5cf
DJ
2881 # Extract the first word of "cc", so it can be a program name with args.
2882set dummy cc; ac_word=$2
81ecdfbb
RW
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2885if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2886 $as_echo_n "(cached) " >&6
dae5f5cf 2887else
81ecdfbb
RW
2888 if test -n "$CC"; then
2889 ac_cv_prog_CC="$CC" # Let the user override the test.
dae5f5cf 2890else
81ecdfbb 2891 ac_prog_rejected=no
dae5f5cf
DJ
2892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2893for as_dir in $PATH
2894do
2895 IFS=$as_save_IFS
2896 test -z "$as_dir" && as_dir=.
81ecdfbb 2897 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2899 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2900 ac_prog_rejected=yes
2901 continue
2902 fi
2903 ac_cv_prog_CC="cc"
2904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
dae5f5cf 2905 break 2
b80864fb 2906 fi
dae5f5cf 2907done
81ecdfbb
RW
2908 done
2909IFS=$as_save_IFS
bec39cab 2910
84563040
DJ
2911if test $ac_prog_rejected = yes; then
2912 # We found a bogon in the path, so make sure we never use it.
2913 set dummy $ac_cv_prog_CC
2914 shift
bec39cab 2915 if test $# != 0; then
84563040
DJ
2916 # We chose a different compiler from the bogus one.
2917 # However, it has the same basename, so the bogon will be chosen
2918 # first if we set CC to just the basename; use the full file name.
2919 shift
bec39cab 2920 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
84563040
DJ
2921 fi
2922fi
2923fi
2924fi
bec39cab 2925CC=$ac_cv_prog_CC
84563040 2926if test -n "$CC"; then
81ecdfbb
RW
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2928$as_echo "$CC" >&6; }
84563040 2929else
81ecdfbb
RW
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2931$as_echo "no" >&6; }
84563040
DJ
2932fi
2933
81ecdfbb 2934
bec39cab
AC
2935fi
2936if test -z "$CC"; then
2937 if test -n "$ac_tool_prefix"; then
81ecdfbb 2938 for ac_prog in cl.exe
bec39cab
AC
2939 do
2940 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2943$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2944if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2945 $as_echo_n "(cached) " >&6
84563040
DJ
2946else
2947 if test -n "$CC"; then
2948 ac_cv_prog_CC="$CC" # Let the user override the test.
2949else
bec39cab
AC
2950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951for as_dir in $PATH
2952do
2953 IFS=$as_save_IFS
2954 test -z "$as_dir" && as_dir=.
81ecdfbb 2955 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2957 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2959 break 2
2960 fi
2961done
81ecdfbb
RW
2962 done
2963IFS=$as_save_IFS
bec39cab 2964
84563040
DJ
2965fi
2966fi
bec39cab 2967CC=$ac_cv_prog_CC
84563040 2968if test -n "$CC"; then
81ecdfbb
RW
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2970$as_echo "$CC" >&6; }
84563040 2971else
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2973$as_echo "no" >&6; }
84563040 2974fi
bec39cab 2975
81ecdfbb 2976
bec39cab
AC
2977 test -n "$CC" && break
2978 done
2979fi
2980if test -z "$CC"; then
2981 ac_ct_CC=$CC
81ecdfbb 2982 for ac_prog in cl.exe
bec39cab
AC
2983do
2984 # Extract the first word of "$ac_prog", so it can be a program name with args.
2985set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2987$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2988if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2989 $as_echo_n "(cached) " >&6
bec39cab
AC
2990else
2991 if test -n "$ac_ct_CC"; then
2992 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2993else
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997 IFS=$as_save_IFS
2998 test -z "$as_dir" && as_dir=.
81ecdfbb 2999 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3001 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3003 break 2
84563040 3004 fi
bec39cab 3005done
81ecdfbb
RW
3006 done
3007IFS=$as_save_IFS
bec39cab
AC
3008
3009fi
3010fi
3011ac_ct_CC=$ac_cv_prog_ac_ct_CC
3012if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3014$as_echo "$ac_ct_CC" >&6; }
bec39cab 3015else
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3017$as_echo "no" >&6; }
84563040
DJ
3018fi
3019
81ecdfbb 3020
bec39cab
AC
3021 test -n "$ac_ct_CC" && break
3022done
84563040 3023
81ecdfbb
RW
3024 if test "x$ac_ct_CC" = x; then
3025 CC=""
3026 else
3027 case $cross_compiling:$ac_tool_warned in
3028yes:)
3029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3031ac_tool_warned=yes ;;
3032esac
3033 CC=$ac_ct_CC
3034 fi
bec39cab
AC
3035fi
3036
3037fi
3038
3039
81ecdfbb
RW
3040test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3042as_fn_error $? "no acceptable C compiler found in \$PATH
3043See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3044
3045# Provide some information about the compiler.
81ecdfbb
RW
3046$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3047set X $ac_compile
3048ac_compiler=$2
3049for ac_option in --version -v -V -qversion; do
3050 { { ac_try="$ac_compiler $ac_option >&5"
3051case "(($ac_try" in
3052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3053 *) ac_try_echo=$ac_try;;
3054esac
3055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3056$as_echo "$ac_try_echo"; } >&5
3057 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3058 ac_status=$?
81ecdfbb
RW
3059 if test -s conftest.err; then
3060 sed '10a\
3061... rest of stderr output deleted ...
3062 10q' conftest.err >conftest.er1
3063 cat conftest.er1 >&5
81ecdfbb 3064 fi
d0ac1c44 3065 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3067 test $ac_status = 0; }
3068done
bec39cab 3069
81ecdfbb 3070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3071/* end confdefs.h. */
3072
3073int
3074main ()
3075{
3076
3077 ;
3078 return 0;
3079}
3080_ACEOF
3081ac_clean_files_save=$ac_clean_files
d0ac1c44 3082ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3083# Try to create an executable without -o first, disregard a.out.
3084# It will help us diagnose broken compilers, and finding out an intuition
3085# of exeext.
d0ac1c44
SM
3086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3087$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3088ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3089
3090# The possible output files:
3091ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3092
3093ac_rmfiles=
3094for ac_file in $ac_files
3095do
3096 case $ac_file in
3097 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3098 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3099 esac
3100done
3101rm -f $ac_rmfiles
3102
3103if { { ac_try="$ac_link_default"
3104case "(($ac_try" in
3105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106 *) ac_try_echo=$ac_try;;
3107esac
3108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3109$as_echo "$ac_try_echo"; } >&5
3110 (eval "$ac_link_default") 2>&5
bec39cab 3111 ac_status=$?
81ecdfbb
RW
3112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113 test $ac_status = 0; }; then :
3114 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3115# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3116# in a Makefile. We should not override ac_cv_exeext if it was cached,
3117# so that the user can short-circuit this test for compilers unknown to
3118# Autoconf.
3119for ac_file in $ac_files ''
bec39cab
AC
3120do
3121 test -f "$ac_file" || continue
3122 case $ac_file in
81ecdfbb 3123 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
bec39cab
AC
3124 ;;
3125 [ab].out )
3126 # We found the default executable, but exeext='' is most
3127 # certainly right.
3128 break;;
3129 *.* )
81ecdfbb
RW
3130 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3131 then :; else
3132 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3133 fi
3134 # We set ac_cv_exeext here because the later test for it is not
3135 # safe: cross compilers may not add the suffix if given an `-o'
3136 # argument, so we may need to know it at that point already.
3137 # Even if this section looks crufty: it has the advantage of
3138 # actually working.
bec39cab
AC
3139 break;;
3140 * )
3141 break;;
3142 esac
3143done
81ecdfbb
RW
3144test "$ac_cv_exeext" = no && ac_cv_exeext=
3145
bec39cab 3146else
81ecdfbb
RW
3147 ac_file=''
3148fi
81ecdfbb 3149if test -z "$ac_file"; then :
d0ac1c44
SM
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3151$as_echo "no" >&6; }
3152$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3153sed 's/^/| /' conftest.$ac_ext >&5
3154
81ecdfbb
RW
3155{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3157as_fn_error 77 "C compiler cannot create executables
3158See \`config.log' for more details" "$LINENO" 5; }
3159else
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3161$as_echo "yes" >&6; }
bec39cab 3162fi
d0ac1c44
SM
3163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3164$as_echo_n "checking for C compiler default output file name... " >&6; }
3165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3166$as_echo "$ac_file" >&6; }
bec39cab 3167ac_exeext=$ac_cv_exeext
bec39cab 3168
d0ac1c44 3169rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
bec39cab 3170ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3172$as_echo_n "checking for suffix of executables... " >&6; }
3173if { { ac_try="$ac_link"
3174case "(($ac_try" in
3175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3176 *) ac_try_echo=$ac_try;;
3177esac
3178eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3179$as_echo "$ac_try_echo"; } >&5
3180 (eval "$ac_link") 2>&5
bec39cab 3181 ac_status=$?
81ecdfbb
RW
3182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3183 test $ac_status = 0; }; then :
bec39cab
AC
3184 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3185# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3186# work properly (i.e., refer to `conftest.exe'), while it won't with
3187# `rm'.
3188for ac_file in conftest.exe conftest conftest.*; do
3189 test -f "$ac_file" || continue
3190 case $ac_file in
81ecdfbb 3191 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
bec39cab 3192 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
bec39cab
AC
3193 break;;
3194 * ) break;;
3195 esac
3196done
84563040 3197else
81ecdfbb
RW
3198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3200as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3201See \`config.log' for more details" "$LINENO" 5; }
84563040 3202fi
d0ac1c44 3203rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3205$as_echo "$ac_cv_exeext" >&6; }
bec39cab
AC
3206
3207rm -f conftest.$ac_ext
3208EXEEXT=$ac_cv_exeext
3209ac_exeext=$EXEEXT
d0ac1c44
SM
3210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3211/* end confdefs.h. */
3212#include <stdio.h>
3213int
3214main ()
3215{
3216FILE *f = fopen ("conftest.out", "w");
3217 return ferror (f) || fclose (f) != 0;
3218
3219 ;
3220 return 0;
3221}
3222_ACEOF
3223ac_clean_files="$ac_clean_files conftest.out"
3224# Check that the compiler produces executables we can run. If not, either
3225# the compiler is broken, or we cross compile.
3226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3227$as_echo_n "checking whether we are cross compiling... " >&6; }
3228if test "$cross_compiling" != yes; then
3229 { { ac_try="$ac_link"
3230case "(($ac_try" in
3231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3232 *) ac_try_echo=$ac_try;;
3233esac
3234eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3235$as_echo "$ac_try_echo"; } >&5
3236 (eval "$ac_link") 2>&5
3237 ac_status=$?
3238 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3239 test $ac_status = 0; }
3240 if { ac_try='./conftest$ac_cv_exeext'
3241 { { case "(($ac_try" in
3242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3243 *) ac_try_echo=$ac_try;;
3244esac
3245eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3246$as_echo "$ac_try_echo"; } >&5
3247 (eval "$ac_try") 2>&5
3248 ac_status=$?
3249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3250 test $ac_status = 0; }; }; then
3251 cross_compiling=no
3252 else
3253 if test "$cross_compiling" = maybe; then
3254 cross_compiling=yes
3255 else
3256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3258as_fn_error $? "cannot run C compiled programs.
3259If you meant to cross compile, use \`--host'.
3260See \`config.log' for more details" "$LINENO" 5; }
3261 fi
3262 fi
3263fi
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3265$as_echo "$cross_compiling" >&6; }
3266
3267rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3268ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3270$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3271if ${ac_cv_objext+:} false; then :
81ecdfbb 3272 $as_echo_n "(cached) " >&6
bec39cab 3273else
81ecdfbb 3274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3275/* end confdefs.h. */
3276
3277int
3278main ()
3279{
3280
3281 ;
3282 return 0;
3283}
3284_ACEOF
3285rm -f conftest.o conftest.obj
81ecdfbb
RW
3286if { { ac_try="$ac_compile"
3287case "(($ac_try" in
3288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3289 *) ac_try_echo=$ac_try;;
3290esac
3291eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3292$as_echo "$ac_try_echo"; } >&5
3293 (eval "$ac_compile") 2>&5
bec39cab 3294 ac_status=$?
81ecdfbb
RW
3295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3296 test $ac_status = 0; }; then :
3297 for ac_file in conftest.o conftest.obj conftest.*; do
3298 test -f "$ac_file" || continue;
bec39cab 3299 case $ac_file in
81ecdfbb 3300 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3301 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3302 break;;
3303 esac
3304done
3305else
81ecdfbb 3306 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3307sed 's/^/| /' conftest.$ac_ext >&5
3308
81ecdfbb
RW
3309{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3311as_fn_error $? "cannot compute suffix of object files: cannot compile
3312See \`config.log' for more details" "$LINENO" 5; }
84563040 3313fi
bec39cab
AC
3314rm -f conftest.$ac_cv_objext conftest.$ac_ext
3315fi
81ecdfbb
RW
3316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3317$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3318OBJEXT=$ac_cv_objext
3319ac_objext=$OBJEXT
81ecdfbb
RW
3320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3321$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3322if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3323 $as_echo_n "(cached) " >&6
bec39cab 3324else
81ecdfbb 3325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3326/* end confdefs.h. */
3327
3328int
3329main ()
3330{
3331#ifndef __GNUC__
3332 choke me
3333#endif
84563040 3334
bec39cab
AC
3335 ;
3336 return 0;
3337}
3338_ACEOF
81ecdfbb 3339if ac_fn_c_try_compile "$LINENO"; then :
bec39cab 3340 ac_compiler_gnu=yes
84563040 3341else
81ecdfbb 3342 ac_compiler_gnu=no
84563040 3343fi
81ecdfbb 3344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3345ac_cv_c_compiler_gnu=$ac_compiler_gnu
84563040 3346
bec39cab 3347fi
81ecdfbb
RW
3348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3349$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3350if test $ac_compiler_gnu = yes; then
3351 GCC=yes
3352else
3353 GCC=
3354fi
bec39cab
AC
3355ac_test_CFLAGS=${CFLAGS+set}
3356ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3358$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3359if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb
RW
3360 $as_echo_n "(cached) " >&6
3361else
3362 ac_save_c_werror_flag=$ac_c_werror_flag
3363 ac_c_werror_flag=yes
3364 ac_cv_prog_cc_g=no
3365 CFLAGS="-g"
3366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3367/* end confdefs.h. */
3368
3369int
3370main ()
3371{
3372
3373 ;
3374 return 0;
3375}
3376_ACEOF
81ecdfbb 3377if ac_fn_c_try_compile "$LINENO"; then :
84563040
DJ
3378 ac_cv_prog_cc_g=yes
3379else
81ecdfbb
RW
3380 CFLAGS=""
3381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3382/* end confdefs.h. */
3383
3384int
3385main ()
3386{
3387
3388 ;
3389 return 0;
3390}
3391_ACEOF
3392if ac_fn_c_try_compile "$LINENO"; then :
3393
3394else
3395 ac_c_werror_flag=$ac_save_c_werror_flag
3396 CFLAGS="-g"
3397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3398/* end confdefs.h. */
3399
3400int
3401main ()
3402{
84563040 3403
81ecdfbb
RW
3404 ;
3405 return 0;
3406}
3407_ACEOF
3408if ac_fn_c_try_compile "$LINENO"; then :
3409 ac_cv_prog_cc_g=yes
3410fi
3411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 3412fi
81ecdfbb 3413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3414fi
81ecdfbb
RW
3415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3416 ac_c_werror_flag=$ac_save_c_werror_flag
3417fi
3418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3419$as_echo "$ac_cv_prog_cc_g" >&6; }
84563040 3420if test "$ac_test_CFLAGS" = set; then
bec39cab 3421 CFLAGS=$ac_save_CFLAGS
84563040
DJ
3422elif test $ac_cv_prog_cc_g = yes; then
3423 if test "$GCC" = yes; then
3424 CFLAGS="-g -O2"
3425 else
3426 CFLAGS="-g"
3427 fi
3428else
3429 if test "$GCC" = yes; then
3430 CFLAGS="-O2"
3431 else
3432 CFLAGS=
3433 fi
3434fi
81ecdfbb
RW
3435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3436$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3437if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3438 $as_echo_n "(cached) " >&6
bec39cab 3439else
81ecdfbb 3440 ac_cv_prog_cc_c89=no
bec39cab 3441ac_save_CC=$CC
81ecdfbb 3442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3443/* end confdefs.h. */
3444#include <stdarg.h>
3445#include <stdio.h>
d0ac1c44 3446struct stat;
bec39cab
AC
3447/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3448struct buf { int x; };
3449FILE * (*rcsopen) (struct buf *, struct stat *, int);
3450static char *e (p, i)
3451 char **p;
3452 int i;
3453{
3454 return p[i];
3455}
3456static char *f (char * (*g) (char **, int), char **p, ...)
3457{
3458 char *s;
3459 va_list v;
3460 va_start (v,p);
3461 s = g (p, va_arg (v,int));
3462 va_end (v);
3463 return s;
3464}
3465
3466/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3467 function prototypes and stuff, but not '\xHH' hex character constants.
3468 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3469 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3470 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3471 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3472 that's true only with -std. */
bec39cab
AC
3473int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3474
81ecdfbb
RW
3475/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3476 inside strings and character constants. */
3477#define FOO(x) 'x'
3478int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3479
bec39cab
AC
3480int test (int i, double x);
3481struct s1 {int (*f) (int a);};
3482struct s2 {int (*f) (double a);};
3483int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3484int argc;
3485char **argv;
3486int
3487main ()
3488{
3489return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3490 ;
3491 return 0;
3492}
3493_ACEOF
81ecdfbb
RW
3494for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3495 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3496do
3497 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3498 if ac_fn_c_try_compile "$LINENO"; then :
3499 ac_cv_prog_cc_c89=$ac_arg
bec39cab 3500fi
81ecdfbb
RW
3501rm -f core conftest.err conftest.$ac_objext
3502 test "x$ac_cv_prog_cc_c89" != "xno" && break
bec39cab 3503done
81ecdfbb 3504rm -f conftest.$ac_ext
bec39cab
AC
3505CC=$ac_save_CC
3506
3507fi
81ecdfbb
RW
3508# AC_CACHE_VAL
3509case "x$ac_cv_prog_cc_c89" in
3510 x)
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3512$as_echo "none needed" >&6; } ;;
3513 xno)
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3515$as_echo "unsupported" >&6; } ;;
bec39cab 3516 *)
81ecdfbb
RW
3517 CC="$CC $ac_cv_prog_cc_c89"
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3519$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bec39cab 3520esac
81ecdfbb 3521if test "x$ac_cv_prog_cc_c89" != xno; then :
bec39cab 3522
dae5f5cf
DJ
3523fi
3524
dae5f5cf 3525ac_ext=c
bec39cab
AC
3526ac_cpp='$CPP $CPPFLAGS'
3527ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3528ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3529ac_compiler_gnu=$ac_cv_c_compiler_gnu
84563040 3530
3bc3d82a
PA
3531ac_ext=cpp
3532ac_cpp='$CXXCPP $CPPFLAGS'
3533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3536if test -z "$CXX"; then
3537 if test -n "$CCC"; then
3538 CXX=$CCC
3539 else
3540 if test -n "$ac_tool_prefix"; then
3541 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3542 do
3543 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3544set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3546$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3547if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3548 $as_echo_n "(cached) " >&6
3549else
3550 if test -n "$CXX"; then
3551 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3552else
3553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3554for as_dir in $PATH
3555do
3556 IFS=$as_save_IFS
3557 test -z "$as_dir" && as_dir=.
3558 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3560 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3562 break 2
3563 fi
3564done
3565 done
3566IFS=$as_save_IFS
3567
3568fi
3569fi
3570CXX=$ac_cv_prog_CXX
3571if test -n "$CXX"; then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3573$as_echo "$CXX" >&6; }
3574else
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3576$as_echo "no" >&6; }
3577fi
3578
3579
3580 test -n "$CXX" && break
3581 done
3582fi
3583if test -z "$CXX"; then
3584 ac_ct_CXX=$CXX
3585 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3586do
3587 # Extract the first word of "$ac_prog", so it can be a program name with args.
3588set dummy $ac_prog; ac_word=$2
3589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3590$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3591if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3592 $as_echo_n "(cached) " >&6
3593else
3594 if test -n "$ac_ct_CXX"; then
3595 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3596else
3597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598for as_dir in $PATH
3599do
3600 IFS=$as_save_IFS
3601 test -z "$as_dir" && as_dir=.
3602 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3604 ac_cv_prog_ac_ct_CXX="$ac_prog"
3605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3606 break 2
3607 fi
3608done
3609 done
3610IFS=$as_save_IFS
3611
3612fi
3613fi
3614ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3615if test -n "$ac_ct_CXX"; then
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3617$as_echo "$ac_ct_CXX" >&6; }
3618else
3619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3620$as_echo "no" >&6; }
3621fi
3622
3623
3624 test -n "$ac_ct_CXX" && break
3625done
3626
3627 if test "x$ac_ct_CXX" = x; then
3628 CXX="g++"
3629 else
3630 case $cross_compiling:$ac_tool_warned in
3631yes:)
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3634ac_tool_warned=yes ;;
3635esac
3636 CXX=$ac_ct_CXX
3637 fi
3638fi
3639
3640 fi
3641fi
3642# Provide some information about the compiler.
3643$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3644set X $ac_compile
3645ac_compiler=$2
3646for ac_option in --version -v -V -qversion; do
3647 { { ac_try="$ac_compiler $ac_option >&5"
3648case "(($ac_try" in
3649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3650 *) ac_try_echo=$ac_try;;
3651esac
3652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3653$as_echo "$ac_try_echo"; } >&5
3654 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3655 ac_status=$?
3656 if test -s conftest.err; then
3657 sed '10a\
3658... rest of stderr output deleted ...
3659 10q' conftest.err >conftest.er1
3660 cat conftest.er1 >&5
3bc3d82a 3661 fi
d0ac1c44 3662 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3663 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3664 test $ac_status = 0; }
3665done
3666
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3668$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3669if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3670 $as_echo_n "(cached) " >&6
3671else
3672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3673/* end confdefs.h. */
3674
3675int
3676main ()
3677{
3678#ifndef __GNUC__
3679 choke me
3680#endif
3681
3682 ;
3683 return 0;
3684}
3685_ACEOF
3686if ac_fn_cxx_try_compile "$LINENO"; then :
3687 ac_compiler_gnu=yes
3688else
3689 ac_compiler_gnu=no
3690fi
3691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3692ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3693
3694fi
3695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3696$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3697if test $ac_compiler_gnu = yes; then
3698 GXX=yes
3699else
3700 GXX=
3701fi
3702ac_test_CXXFLAGS=${CXXFLAGS+set}
3703ac_save_CXXFLAGS=$CXXFLAGS
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3705$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3706if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3707 $as_echo_n "(cached) " >&6
3708else
3709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3710 ac_cxx_werror_flag=yes
3711 ac_cv_prog_cxx_g=no
3712 CXXFLAGS="-g"
3713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3714/* end confdefs.h. */
3715
3716int
3717main ()
3718{
3719
3720 ;
3721 return 0;
3722}
3723_ACEOF
3724if ac_fn_cxx_try_compile "$LINENO"; then :
3725 ac_cv_prog_cxx_g=yes
3726else
3727 CXXFLAGS=""
3728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3729/* end confdefs.h. */
3730
3731int
3732main ()
3733{
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
3739if ac_fn_cxx_try_compile "$LINENO"; then :
3740
3741else
3742 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3743 CXXFLAGS="-g"
3744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745/* end confdefs.h. */
3746
3747int
3748main ()
3749{
3750
3751 ;
3752 return 0;
3753}
3754_ACEOF
3755if ac_fn_cxx_try_compile "$LINENO"; then :
3756 ac_cv_prog_cxx_g=yes
3757fi
3758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3759fi
3760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3761fi
3762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3763 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3764fi
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3766$as_echo "$ac_cv_prog_cxx_g" >&6; }
3767if test "$ac_test_CXXFLAGS" = set; then
3768 CXXFLAGS=$ac_save_CXXFLAGS
3769elif test $ac_cv_prog_cxx_g = yes; then
3770 if test "$GXX" = yes; then
3771 CXXFLAGS="-g -O2"
3772 else
3773 CXXFLAGS="-g"
3774 fi
3775else
3776 if test "$GXX" = yes; then
3777 CXXFLAGS="-O2"
3778 else
3779 CXXFLAGS=
3780 fi
3781fi
3782ac_ext=c
3783ac_cpp='$CPP $CPPFLAGS'
3784ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3785ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3786ac_compiler_gnu=$ac_cv_c_compiler_gnu
3787
c9a1864a
YQ
3788
3789ac_ext=c
3790ac_cpp='$CPP $CPPFLAGS'
3791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3793ac_compiler_gnu=$ac_cv_c_compiler_gnu
3794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3795$as_echo_n "checking how to run the C preprocessor... " >&6; }
3796# On Suns, sometimes $CPP names a directory.
3797if test -n "$CPP" && test -d "$CPP"; then
3798 CPP=
3799fi
3800if test -z "$CPP"; then
d0ac1c44 3801 if ${ac_cv_prog_CPP+:} false; then :
c9a1864a
YQ
3802 $as_echo_n "(cached) " >&6
3803else
3804 # Double quotes because CPP needs to be expanded
3805 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3806 do
3807 ac_preproc_ok=false
3808for ac_c_preproc_warn_flag in '' yes
3809do
3810 # Use a header file that comes with gcc, so configuring glibc
3811 # with a fresh cross-compiler works.
3812 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3813 # <limits.h> exists even on freestanding compilers.
3814 # On the NeXT, cc -E runs the code through the compiler's parser,
3815 # not just through cpp. "Syntax error" is here to catch this case.
3816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3817/* end confdefs.h. */
3818#ifdef __STDC__
3819# include <limits.h>
3820#else
3821# include <assert.h>
3822#endif
3823 Syntax error
3824_ACEOF
3825if ac_fn_c_try_cpp "$LINENO"; then :
3826
3827else
3828 # Broken: fails on valid input.
3829continue
3830fi
d0ac1c44 3831rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3832
3833 # OK, works on sane cases. Now check whether nonexistent headers
3834 # can be detected and how.
3835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3836/* end confdefs.h. */
3837#include <ac_nonexistent.h>
3838_ACEOF
3839if ac_fn_c_try_cpp "$LINENO"; then :
3840 # Broken: success on invalid input.
3841continue
3842else
3843 # Passes both tests.
3844ac_preproc_ok=:
3845break
3846fi
d0ac1c44 3847rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3848
3849done
3850# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3851rm -f conftest.i conftest.err conftest.$ac_ext
c9a1864a
YQ
3852if $ac_preproc_ok; then :
3853 break
3854fi
3855
3856 done
3857 ac_cv_prog_CPP=$CPP
3858
3859fi
3860 CPP=$ac_cv_prog_CPP
3861else
3862 ac_cv_prog_CPP=$CPP
3863fi
3864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3865$as_echo "$CPP" >&6; }
3866ac_preproc_ok=false
3867for ac_c_preproc_warn_flag in '' yes
3868do
3869 # Use a header file that comes with gcc, so configuring glibc
3870 # with a fresh cross-compiler works.
3871 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3872 # <limits.h> exists even on freestanding compilers.
3873 # On the NeXT, cc -E runs the code through the compiler's parser,
3874 # not just through cpp. "Syntax error" is here to catch this case.
3875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3876/* end confdefs.h. */
3877#ifdef __STDC__
3878# include <limits.h>
3879#else
3880# include <assert.h>
3881#endif
3882 Syntax error
3883_ACEOF
3884if ac_fn_c_try_cpp "$LINENO"; then :
3885
3886else
3887 # Broken: fails on valid input.
3888continue
3889fi
d0ac1c44 3890rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3891
3892 # OK, works on sane cases. Now check whether nonexistent headers
3893 # can be detected and how.
81ecdfbb 3894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3895/* end confdefs.h. */
3896#include <ac_nonexistent.h>
3897_ACEOF
81ecdfbb 3898if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3899 # Broken: success on invalid input.
3900continue
3901else
bec39cab
AC
3902 # Passes both tests.
3903ac_preproc_ok=:
3904break
3905fi
d0ac1c44 3906rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab
AC
3907
3908done
3909# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3910rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
3911if $ac_preproc_ok; then :
3912
3913else
3914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3916as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3917See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3918fi
3919
81ecdfbb
RW
3920ac_ext=c
3921ac_cpp='$CPP $CPPFLAGS'
3922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3924ac_compiler_gnu=$ac_cv_c_compiler_gnu
bec39cab 3925
81ecdfbb
RW
3926
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3928$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 3929if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 3930 $as_echo_n "(cached) " >&6
bec39cab 3931else
81ecdfbb
RW
3932 if test -z "$GREP"; then
3933 ac_path_GREP_found=false
3934 # Loop through the user's path and test for each of PROGNAME-LIST
3935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3936for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
bec39cab 3937do
81ecdfbb
RW
3938 IFS=$as_save_IFS
3939 test -z "$as_dir" && as_dir=.
3940 for ac_prog in grep ggrep; do
3941 for ac_exec_ext in '' $ac_executable_extensions; do
3942 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3943 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
3944# Check for GNU ac_path_GREP and select it if it is found.
3945 # Check for GNU $ac_path_GREP
3946case `"$ac_path_GREP" --version 2>&1` in
3947*GNU*)
3948 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3949*)
3950 ac_count=0
3951 $as_echo_n 0123456789 >"conftest.in"
3952 while :
3953 do
3954 cat "conftest.in" "conftest.in" >"conftest.tmp"
3955 mv "conftest.tmp" "conftest.in"
3956 cp "conftest.in" "conftest.nl"
3957 $as_echo 'GREP' >> "conftest.nl"
3958 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3959 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3960 as_fn_arith $ac_count + 1 && ac_count=$as_val
3961 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3962 # Best one so far, save it but keep looking for a better one
3963 ac_cv_path_GREP="$ac_path_GREP"
3964 ac_path_GREP_max=$ac_count
3965 fi
3966 # 10*(2^10) chars as input seems more than enough
3967 test $ac_count -gt 10 && break
3968 done
3969 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3970esac
3971
3972 $ac_path_GREP_found && break 3
3973 done
3974 done
3975 done
3976IFS=$as_save_IFS
3977 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 3978 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
bec39cab
AC
3979 fi
3980else
81ecdfbb 3981 ac_cv_path_GREP=$GREP
bec39cab 3982fi
bec39cab 3983
84563040 3984fi
81ecdfbb
RW
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3986$as_echo "$ac_cv_path_GREP" >&6; }
3987 GREP="$ac_cv_path_GREP"
bec39cab 3988
bec39cab 3989
81ecdfbb
RW
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3991$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 3992if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb
RW
3993 $as_echo_n "(cached) " >&6
3994else
3995 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3996 then ac_cv_path_EGREP="$GREP -E"
3997 else
3998 if test -z "$EGREP"; then
3999 ac_path_EGREP_found=false
4000 # Loop through the user's path and test for each of PROGNAME-LIST
4001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4002for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4003do
4004 IFS=$as_save_IFS
4005 test -z "$as_dir" && as_dir=.
4006 for ac_prog in egrep; do
4007 for ac_exec_ext in '' $ac_executable_extensions; do
4008 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4009 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4010# Check for GNU ac_path_EGREP and select it if it is found.
4011 # Check for GNU $ac_path_EGREP
4012case `"$ac_path_EGREP" --version 2>&1` in
4013*GNU*)
4014 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4015*)
4016 ac_count=0
4017 $as_echo_n 0123456789 >"conftest.in"
4018 while :
4019 do
4020 cat "conftest.in" "conftest.in" >"conftest.tmp"
4021 mv "conftest.tmp" "conftest.in"
4022 cp "conftest.in" "conftest.nl"
4023 $as_echo 'EGREP' >> "conftest.nl"
4024 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4025 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4026 as_fn_arith $ac_count + 1 && ac_count=$as_val
4027 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4028 # Best one so far, save it but keep looking for a better one
4029 ac_cv_path_EGREP="$ac_path_EGREP"
4030 ac_path_EGREP_max=$ac_count
4031 fi
4032 # 10*(2^10) chars as input seems more than enough
4033 test $ac_count -gt 10 && break
4034 done
4035 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4036esac
bec39cab 4037
81ecdfbb
RW
4038 $ac_path_EGREP_found && break 3
4039 done
4040 done
4041 done
4042IFS=$as_save_IFS
4043 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4044 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4045 fi
bec39cab 4046else
81ecdfbb 4047 ac_cv_path_EGREP=$EGREP
84563040 4048fi
bec39cab 4049
81ecdfbb 4050 fi
b80864fb 4051fi
81ecdfbb
RW
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4053$as_echo "$ac_cv_path_EGREP" >&6; }
4054 EGREP="$ac_cv_path_EGREP"
b80864fb
DJ
4055
4056
c971b7fa
PA
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4058$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4059if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4060 $as_echo_n "(cached) " >&6
4061else
4062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063/* end confdefs.h. */
4064#include <stdlib.h>
4065#include <stdarg.h>
4066#include <string.h>
4067#include <float.h>
bec39cab 4068
c971b7fa
PA
4069int
4070main ()
4071{
bec39cab 4072
c971b7fa
PA
4073 ;
4074 return 0;
4075}
4076_ACEOF
4077if ac_fn_c_try_compile "$LINENO"; then :
4078 ac_cv_header_stdc=yes
84563040 4079else
c971b7fa
PA
4080 ac_cv_header_stdc=no
4081fi
4082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 4083
c971b7fa
PA
4084if test $ac_cv_header_stdc = yes; then
4085 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4087/* end confdefs.h. */
c971b7fa 4088#include <string.h>
bec39cab
AC
4089
4090_ACEOF
84563040 4091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
c971b7fa
PA
4092 $EGREP "memchr" >/dev/null 2>&1; then :
4093
84563040 4094else
c971b7fa 4095 ac_cv_header_stdc=no
84563040
DJ
4096fi
4097rm -f conftest*
4098
770d76d7 4099fi
81ecdfbb 4100
c971b7fa
PA
4101if test $ac_cv_header_stdc = yes; then
4102 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4104/* end confdefs.h. */
4105#include <stdlib.h>
4106
4107_ACEOF
4108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4109 $EGREP "free" >/dev/null 2>&1; then :
4110
770d76d7 4111else
c971b7fa 4112 ac_cv_header_stdc=no
bec39cab 4113fi
c971b7fa 4114rm -f conftest*
bec39cab
AC
4115
4116fi
c971b7fa
PA
4117
4118if test $ac_cv_header_stdc = yes; then
4119 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4120 if test "$cross_compiling" = yes; then :
4121 :
770d76d7 4122else
c971b7fa
PA
4123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4124/* end confdefs.h. */
4125#include <ctype.h>
4126#include <stdlib.h>
4127#if ((' ' & 0x0FF) == 0x020)
4128# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4129# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4130#else
4131# define ISLOWER(c) \
4132 (('a' <= (c) && (c) <= 'i') \
4133 || ('j' <= (c) && (c) <= 'r') \
4134 || ('s' <= (c) && (c) <= 'z'))
4135# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4136#endif
4137
4138#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4139int
4140main ()
4141{
4142 int i;
4143 for (i = 0; i < 256; i++)
4144 if (XOR (islower (i), ISLOWER (i))
4145 || toupper (i) != TOUPPER (i))
4146 return 2;
4147 return 0;
4148}
4149_ACEOF
4150if ac_fn_c_try_run "$LINENO"; then :
4151
770d76d7 4152else
c971b7fa
PA
4153 ac_cv_header_stdc=no
4154fi
4155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4156 conftest.$ac_objext conftest.beam conftest.$ac_ext
4157fi
bec39cab 4158
770d76d7
PA
4159fi
4160fi
c971b7fa
PA
4161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4162$as_echo "$ac_cv_header_stdc" >&6; }
4163if test $ac_cv_header_stdc = yes; then
4164
4165$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4166
770d76d7 4167fi
bec39cab 4168
c971b7fa
PA
4169# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4170for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4171 inttypes.h stdint.h unistd.h
4172do :
4173 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4174ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4175"
d0ac1c44 4176if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4177 cat >>confdefs.h <<_ACEOF
4178#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4179_ACEOF
4180
81ecdfbb 4181fi
bec39cab 4182
c971b7fa 4183done
bec39cab
AC
4184
4185
4186
c971b7fa 4187 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4188if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa 4189 MINIX=yes
770d76d7 4190else
c971b7fa 4191 MINIX=
770d76d7 4192fi
bec39cab
AC
4193
4194
c971b7fa
PA
4195 if test "$MINIX" = yes; then
4196
4197$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4198
4199
4200$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4201
4202
4203$as_echo "#define _MINIX 1" >>confdefs.h
4204
770d76d7 4205 fi
bec39cab 4206
c971b7fa
PA
4207
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4209$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4210if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa 4211 $as_echo_n "(cached) " >&6
770d76d7 4212else
c971b7fa
PA
4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4214/* end confdefs.h. */
bec39cab 4215
d0ac1c44
SM
4216# define __EXTENSIONS__ 1
4217 $ac_includes_default
c971b7fa
PA
4218int
4219main ()
4220{
4221
4222 ;
4223 return 0;
4224}
4225_ACEOF
4226if ac_fn_c_try_compile "$LINENO"; then :
4227 ac_cv_safe_to_define___extensions__=yes
770d76d7 4228else
c971b7fa
PA
4229 ac_cv_safe_to_define___extensions__=no
4230fi
4231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
770d76d7 4232fi
c971b7fa
PA
4233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4234$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4235 test $ac_cv_safe_to_define___extensions__ = yes &&
4236 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4237
4238 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4239
4240 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4241
4242 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4243
4244 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4245
bec39cab 4246
c9a1864a 4247
589bc927
TT
4248# Check whether --enable-largefile was given.
4249if test "${enable_largefile+set}" = set; then :
4250 enableval=$enable_largefile;
4251fi
4252
4253if test "$enable_largefile" != no; then
4254
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4256$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4257if ${ac_cv_sys_largefile_CC+:} false; then :
589bc927
TT
4258 $as_echo_n "(cached) " >&6
4259else
4260 ac_cv_sys_largefile_CC=no
4261 if test "$GCC" != yes; then
4262 ac_save_CC=$CC
4263 while :; do
4264 # IRIX 6.2 and later do not support large files by default,
4265 # so use the C compiler's -n32 option if that helps.
4266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4267/* end confdefs.h. */
4268#include <sys/types.h>
4269 /* Check that off_t can represent 2**63 - 1 correctly.
4270 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4271 since some C++ compilers masquerading as C compilers
4272 incorrectly reject 9223372036854775807. */
4273#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4274 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4275 && LARGE_OFF_T % 2147483647 == 1)
4276 ? 1 : -1];
4277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
4284_ACEOF
4285 if ac_fn_c_try_compile "$LINENO"; then :
4286 break
4287fi
4288rm -f core conftest.err conftest.$ac_objext
4289 CC="$CC -n32"
4290 if ac_fn_c_try_compile "$LINENO"; then :
4291 ac_cv_sys_largefile_CC=' -n32'; break
4292fi
4293rm -f core conftest.err conftest.$ac_objext
4294 break
4295 done
4296 CC=$ac_save_CC
4297 rm -f conftest.$ac_ext
4298 fi
4299fi
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4301$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4302 if test "$ac_cv_sys_largefile_CC" != no; then
4303 CC=$CC$ac_cv_sys_largefile_CC
4304 fi
4305
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4307$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4308if ${ac_cv_sys_file_offset_bits+:} false; then :
589bc927
TT
4309 $as_echo_n "(cached) " >&6
4310else
4311 while :; do
4312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4313/* end confdefs.h. */
4314#include <sys/types.h>
4315 /* Check that off_t can represent 2**63 - 1 correctly.
4316 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4317 since some C++ compilers masquerading as C compilers
4318 incorrectly reject 9223372036854775807. */
4319#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4320 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4321 && LARGE_OFF_T % 2147483647 == 1)
4322 ? 1 : -1];
4323int
4324main ()
4325{
4326
4327 ;
4328 return 0;
4329}
4330_ACEOF
4331if ac_fn_c_try_compile "$LINENO"; then :
4332 ac_cv_sys_file_offset_bits=no; break
4333fi
4334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4336/* end confdefs.h. */
4337#define _FILE_OFFSET_BITS 64
4338#include <sys/types.h>
4339 /* Check that off_t can represent 2**63 - 1 correctly.
4340 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4341 since some C++ compilers masquerading as C compilers
4342 incorrectly reject 9223372036854775807. */
4343#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4344 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4345 && LARGE_OFF_T % 2147483647 == 1)
4346 ? 1 : -1];
4347int
4348main ()
4349{
4350
4351 ;
4352 return 0;
4353}
4354_ACEOF
4355if ac_fn_c_try_compile "$LINENO"; then :
4356 ac_cv_sys_file_offset_bits=64; break
4357fi
4358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4359 ac_cv_sys_file_offset_bits=unknown
4360 break
4361done
4362fi
4363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4364$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4365case $ac_cv_sys_file_offset_bits in #(
4366 no | unknown) ;;
4367 *)
4368cat >>confdefs.h <<_ACEOF
4369#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4370_ACEOF
4371;;
4372esac
4373rm -rf conftest*
4374 if test $ac_cv_sys_file_offset_bits = unknown; then
4375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4376$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4377if ${ac_cv_sys_large_files+:} false; then :
589bc927
TT
4378 $as_echo_n "(cached) " >&6
4379else
4380 while :; do
4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382/* end confdefs.h. */
4383#include <sys/types.h>
4384 /* Check that off_t can represent 2**63 - 1 correctly.
4385 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4386 since some C++ compilers masquerading as C compilers
4387 incorrectly reject 9223372036854775807. */
4388#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4389 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4390 && LARGE_OFF_T % 2147483647 == 1)
4391 ? 1 : -1];
4392int
4393main ()
4394{
4395
4396 ;
4397 return 0;
4398}
4399_ACEOF
4400if ac_fn_c_try_compile "$LINENO"; then :
4401 ac_cv_sys_large_files=no; break
4402fi
4403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#define _LARGE_FILES 1
4407#include <sys/types.h>
4408 /* Check that off_t can represent 2**63 - 1 correctly.
4409 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4410 since some C++ compilers masquerading as C compilers
4411 incorrectly reject 9223372036854775807. */
4412#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4413 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4414 && LARGE_OFF_T % 2147483647 == 1)
4415 ? 1 : -1];
4416int
4417main ()
4418{
4419
4420 ;
4421 return 0;
4422}
4423_ACEOF
4424if ac_fn_c_try_compile "$LINENO"; then :
4425 ac_cv_sys_large_files=1; break
4426fi
4427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4428 ac_cv_sys_large_files=unknown
4429 break
4430done
4431fi
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4433$as_echo "$ac_cv_sys_large_files" >&6; }
4434case $ac_cv_sys_large_files in #(
4435 no | unknown) ;;
4436 *)
4437cat >>confdefs.h <<_ACEOF
4438#define _LARGE_FILES $ac_cv_sys_large_files
4439_ACEOF
4440;;
4441esac
4442rm -rf conftest*
4443 fi
d0ac1c44
SM
4444
4445
589bc927
TT
4446fi
4447
770d76d7
PA
4448ac_aux_dir=
4449for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4450 if test -f "$ac_dir/install-sh"; then
4451 ac_aux_dir=$ac_dir
4452 ac_install_sh="$ac_aux_dir/install-sh -c"
4453 break
4454 elif test -f "$ac_dir/install.sh"; then
4455 ac_aux_dir=$ac_dir
4456 ac_install_sh="$ac_aux_dir/install.sh -c"
4457 break
4458 elif test -f "$ac_dir/shtool"; then
4459 ac_aux_dir=$ac_dir
4460 ac_install_sh="$ac_aux_dir/shtool install -c"
4461 break
4462 fi
770d76d7
PA
4463done
4464if test -z "$ac_aux_dir"; then
d0ac1c44 4465 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
770d76d7
PA
4466fi
4467
4468# These three variables are undocumented and unsupported,
4469# and are intended to be withdrawn in a future Autoconf release.
4470# They can cause serious problems if a builder's source tree is in a directory
4471# whose full name contains unusual characters.
4472ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4473ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4474ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
c9a1864a 4475
bec39cab 4476
bdaed379
HD
4477# Expand $ac_aux_dir to an absolute path.
4478am_aux_dir=`cd "$ac_aux_dir" && pwd`
4479
4480if test x"${install_sh+set}" != xset; then
4481 case $am_aux_dir in
4482 *\ * | *\ *)
4483 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4484 *)
4485 install_sh="\${SHELL} $am_aux_dir/install-sh"
4486 esac
4487fi
4488
4489# Installed binaries are usually stripped using 'strip' when the user
4490# run "make install-strip". However 'strip' might not be the right
4491# tool to use in cross-compilation environments, therefore Automake
4492# will honor the 'STRIP' environment variable to overrule this program.
4493if test "$cross_compiling" != no; then
4494 if test -n "$ac_tool_prefix"; then
4495 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4496set dummy ${ac_tool_prefix}strip; ac_word=$2
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498$as_echo_n "checking for $ac_word... " >&6; }
4499if ${ac_cv_prog_STRIP+:} false; then :
4500 $as_echo_n "(cached) " >&6
4501else
4502 if test -n "$STRIP"; then
4503 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4504else
4505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4506for as_dir in $PATH
4507do
4508 IFS=$as_save_IFS
4509 test -z "$as_dir" && as_dir=.
4510 for ac_exec_ext in '' $ac_executable_extensions; do
4511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4512 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4514 break 2
4515 fi
4516done
4517 done
4518IFS=$as_save_IFS
4519
4520fi
4521fi
4522STRIP=$ac_cv_prog_STRIP
4523if test -n "$STRIP"; then
4524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4525$as_echo "$STRIP" >&6; }
4526else
4527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528$as_echo "no" >&6; }
4529fi
4530
4531
4532fi
4533if test -z "$ac_cv_prog_STRIP"; then
4534 ac_ct_STRIP=$STRIP
4535 # Extract the first word of "strip", so it can be a program name with args.
4536set dummy strip; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4540 $as_echo_n "(cached) " >&6
4541else
4542 if test -n "$ac_ct_STRIP"; then
4543 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4544else
4545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4546for as_dir in $PATH
4547do
4548 IFS=$as_save_IFS
4549 test -z "$as_dir" && as_dir=.
4550 for ac_exec_ext in '' $ac_executable_extensions; do
4551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4552 ac_cv_prog_ac_ct_STRIP="strip"
4553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4554 break 2
4555 fi
4556done
4557 done
4558IFS=$as_save_IFS
4559
4560fi
4561fi
4562ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4563if test -n "$ac_ct_STRIP"; then
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4565$as_echo "$ac_ct_STRIP" >&6; }
4566else
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4568$as_echo "no" >&6; }
4569fi
4570
4571 if test "x$ac_ct_STRIP" = x; then
4572 STRIP=":"
4573 else
4574 case $cross_compiling:$ac_tool_warned in
4575yes:)
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4577$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4578ac_tool_warned=yes ;;
4579esac
4580 STRIP=$ac_ct_STRIP
4581 fi
4582else
4583 STRIP="$ac_cv_prog_STRIP"
4584fi
4585
4586fi
4587INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4588
4589
770d76d7
PA
4590# Make sure we can run config.sub.
4591$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4592 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7
PA
4593
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4595$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4596if ${ac_cv_build+:} false; then :
81ecdfbb
RW
4597 $as_echo_n "(cached) " >&6
4598else
770d76d7
PA
4599 ac_build_alias=$build_alias
4600test "x$ac_build_alias" = x &&
4601 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4602test "x$ac_build_alias" = x &&
d0ac1c44 4603 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
770d76d7 4604ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4605 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
770d76d7
PA
4606
4607fi
4608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4609$as_echo "$ac_cv_build" >&6; }
4610case $ac_cv_build in
4611*-*-*) ;;
d0ac1c44 4612*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7
PA
4613esac
4614build=$ac_cv_build
4615ac_save_IFS=$IFS; IFS='-'
4616set x $ac_cv_build
4617shift
4618build_cpu=$1
4619build_vendor=$2
4620shift; shift
4621# Remember, the first character of IFS is used to create $*,
4622# except with old shells:
4623build_os=$*
4624IFS=$ac_save_IFS
4625case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4626
4627
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4629$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4630if ${ac_cv_host+:} false; then :
770d76d7
PA
4631 $as_echo_n "(cached) " >&6
4632else
4633 if test "x$host_alias" = x; then
4634 ac_cv_host=$ac_cv_build
4635else
4636 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4637 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
770d76d7
PA
4638fi
4639
4640fi
4641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4642$as_echo "$ac_cv_host" >&6; }
4643case $ac_cv_host in
4644*-*-*) ;;
d0ac1c44 4645*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
770d76d7
PA
4646esac
4647host=$ac_cv_host
4648ac_save_IFS=$IFS; IFS='-'
4649set x $ac_cv_host
4650shift
4651host_cpu=$1
4652host_vendor=$2
4653shift; shift
4654# Remember, the first character of IFS is used to create $*,
4655# except with old shells:
4656host_os=$*
4657IFS=$ac_save_IFS
4658case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4659
4660
c971b7fa
PA
4661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4662$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4663if ${ac_cv_target+:} false; then :
770d76d7
PA
4664 $as_echo_n "(cached) " >&6
4665else
c971b7fa
PA
4666 if test "x$target_alias" = x; then
4667 ac_cv_target=$ac_cv_host
770d76d7 4668else
c971b7fa 4669 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4670 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
770d76d7 4671fi
770d76d7
PA
4672
4673fi
c971b7fa
PA
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4675$as_echo "$ac_cv_target" >&6; }
4676case $ac_cv_target in
4677*-*-*) ;;
d0ac1c44 4678*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
4679esac
4680target=$ac_cv_target
4681ac_save_IFS=$IFS; IFS='-'
4682set x $ac_cv_target
4683shift
4684target_cpu=$1
4685target_vendor=$2
4686shift; shift
4687# Remember, the first character of IFS is used to create $*,
4688# except with old shells:
4689target_os=$*
4690IFS=$ac_save_IFS
4691case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
770d76d7 4692
770d76d7 4693
c971b7fa
PA
4694# The aliases save the names the user supplied, while $host etc.
4695# will get canonicalized.
4696test -n "$target_alias" &&
4697 test "$program_prefix$program_suffix$program_transform_name" = \
4698 NONENONEs,x,x, &&
4699 program_prefix=${target_alias}-
770d76d7 4700
770d76d7 4701
c971b7fa
PA
4702# Find a good install program. We prefer a C program (faster),
4703# so one script is as good as another. But avoid the broken or
4704# incompatible versions:
4705# SysV /etc/install, /usr/sbin/install
4706# SunOS /usr/etc/install
4707# IRIX /sbin/install
4708# AIX /bin/install
4709# AmigaOS /C/install, which installs bootblocks on floppy discs
4710# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4711# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4712# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4713# OS/2's system install, which has a completely different semantic
4714# ./install, which can be erroneously created by make from ./install.sh.
4715# Reject install programs that cannot install multiple files.
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4717$as_echo_n "checking for a BSD-compatible install... " >&6; }
4718if test -z "$INSTALL"; then
d0ac1c44 4719if ${ac_cv_path_install+:} false; then :
c971b7fa 4720 $as_echo_n "(cached) " >&6
81ecdfbb
RW
4721else
4722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4723for as_dir in $PATH
fd462a61 4724do
81ecdfbb
RW
4725 IFS=$as_save_IFS
4726 test -z "$as_dir" && as_dir=.
4727 # Account for people who put trailing slashes in PATH elements.
4728case $as_dir/ in #((
4729 ./ | .// | /[cC]/* | \
4730 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4731 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4732 /usr/ucb/* ) ;;
4733 *)
4734 # OSF1 and SCO ODT 3.0 have their own names for install.
4735 # Don't use installbsd from OSF since it installs stuff as root
4736 # by default.
4737 for ac_prog in ginstall scoinst install; do
4738 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4739 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
81ecdfbb
RW
4740 if test $ac_prog = install &&
4741 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4742 # AIX install. It has an incompatible calling convention.
4743 :
4744 elif test $ac_prog = install &&
4745 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4746 # program-specific install script used by HP pwplus--don't use.
4747 :
4748 else
4749 rm -rf conftest.one conftest.two conftest.dir
4750 echo one > conftest.one
4751 echo two > conftest.two
4752 mkdir conftest.dir
4753 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4754 test -s conftest.one && test -s conftest.two &&
4755 test -s conftest.dir/conftest.one &&
4756 test -s conftest.dir/conftest.two
4757 then
4758 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4759 break 3
4760 fi
4761 fi
4762 fi
4763 done
4764 done
4765 ;;
4766esac
fd462a61 4767
81ecdfbb
RW
4768 done
4769IFS=$as_save_IFS
fd462a61 4770
81ecdfbb 4771rm -rf conftest.one conftest.two conftest.dir
fd462a61 4772
fd462a61 4773fi
81ecdfbb
RW
4774 if test "${ac_cv_path_install+set}" = set; then
4775 INSTALL=$ac_cv_path_install
4776 else
4777 # As a last resort, use the slow shell script. Don't cache a
4778 # value for INSTALL within a source directory, because that will
4779 # break other packages using the cache if that directory is
4780 # removed, or if the value is a relative name.
4781 INSTALL=$ac_install_sh
4782 fi
fd462a61 4783fi
81ecdfbb
RW
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4785$as_echo "$INSTALL" >&6; }
fd462a61 4786
81ecdfbb
RW
4787# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4788# It thinks the first close brace ends the variable substitution.
4789test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
fd462a61 4790
81ecdfbb 4791test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
fd462a61 4792
81ecdfbb 4793test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
e28b3332 4794
e1d2394b
MS
4795if test -n "$ac_tool_prefix"; then
4796 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4797set dummy ${ac_tool_prefix}ar; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4800if ${ac_cv_prog_AR+:} false; then :
e1d2394b
MS
4801 $as_echo_n "(cached) " >&6
4802else
4803 if test -n "$AR"; then
4804 ac_cv_prog_AR="$AR" # Let the user override the test.
4805else
4806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4807for as_dir in $PATH
4808do
4809 IFS=$as_save_IFS
4810 test -z "$as_dir" && as_dir=.
4811 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4813 ac_cv_prog_AR="${ac_tool_prefix}ar"
4814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4815 break 2
4816 fi
4817done
4818 done
4819IFS=$as_save_IFS
4820
4821fi
4822fi
4823AR=$ac_cv_prog_AR
4824if test -n "$AR"; then
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4826$as_echo "$AR" >&6; }
4827else
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
4830fi
4831
4832
4833fi
4834if test -z "$ac_cv_prog_AR"; then
4835 ac_ct_AR=$AR
4836 # Extract the first word of "ar", so it can be a program name with args.
4837set dummy ar; ac_word=$2
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4840if ${ac_cv_prog_ac_ct_AR+:} false; then :
e1d2394b
MS
4841 $as_echo_n "(cached) " >&6
4842else
4843 if test -n "$ac_ct_AR"; then
4844 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4845else
4846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849 IFS=$as_save_IFS
4850 test -z "$as_dir" && as_dir=.
4851 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4853 ac_cv_prog_ac_ct_AR="ar"
4854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855 break 2
4856 fi
4857done
4858 done
4859IFS=$as_save_IFS
4860
4861fi
4862fi
4863ac_ct_AR=$ac_cv_prog_ac_ct_AR
4864if test -n "$ac_ct_AR"; then
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4866$as_echo "$ac_ct_AR" >&6; }
4867else
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4869$as_echo "no" >&6; }
4870fi
4871
4872 if test "x$ac_ct_AR" = x; then
4873 AR=""
4874 else
4875 case $cross_compiling:$ac_tool_warned in
4876yes:)
4877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4879ac_tool_warned=yes ;;
4880esac
4881 AR=$ac_ct_AR
4882 fi
4883else
4884 AR="$ac_cv_prog_AR"
4885fi
4886
c971b7fa
PA
4887if test -n "$ac_tool_prefix"; then
4888 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4889set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4892if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb
RW
4893 $as_echo_n "(cached) " >&6
4894else
c971b7fa
PA
4895 if test -n "$RANLIB"; then
4896 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
e28b3332 4897else
c971b7fa
PA
4898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in $PATH
4900do
4901 IFS=$as_save_IFS
4902 test -z "$as_dir" && as_dir=.
4903 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4905 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4907 break 2
4908 fi
4909done
4910 done
4911IFS=$as_save_IFS
4912
4913fi
4914fi
4915RANLIB=$ac_cv_prog_RANLIB
4916if test -n "$RANLIB"; then
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4918$as_echo "$RANLIB" >&6; }
4919else
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4921$as_echo "no" >&6; }
4922fi
4923
4924
4925fi
4926if test -z "$ac_cv_prog_RANLIB"; then
4927 ac_ct_RANLIB=$RANLIB
4928 # Extract the first word of "ranlib", so it can be a program name with args.
4929set dummy ranlib; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4932if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
4933 $as_echo_n "(cached) " >&6
4934else
4935 if test -n "$ac_ct_RANLIB"; then
4936 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4937else
4938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in $PATH
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4945 ac_cv_prog_ac_ct_RANLIB="ranlib"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
4953fi
4954fi
4955ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4956if test -n "$ac_ct_RANLIB"; then
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4958$as_echo "$ac_ct_RANLIB" >&6; }
4959else
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4961$as_echo "no" >&6; }
4962fi
4963
4964 if test "x$ac_ct_RANLIB" = x; then
4965 RANLIB=":"
4966 else
4967 case $cross_compiling:$ac_tool_warned in
4968yes:)
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4971ac_tool_warned=yes ;;
4972esac
4973 RANLIB=$ac_ct_RANLIB
4974 fi
4975else
4976 RANLIB="$ac_cv_prog_RANLIB"
4977fi
4978
4979
4980test "$program_prefix" != NONE &&
4981 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4982# Use a double $ so make ignores it.
4983test "$program_suffix" != NONE &&
4984 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4985# Double any \ or $.
4986# By default was `s,x,x', remove it if useless.
4987ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4988program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4989
4990
0bcda685
PA
4991# We require a C++11 compiler. Check if one is available, and if
4992# necessary, set CXX_DIALECT to some -std=xxx switch.
4993
458412c3 4994 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
4995 ac_ext=cpp
4996ac_cpp='$CXXCPP $CPPFLAGS'
4997ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4998ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4999ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5000 CXX_DIALECT=""
5001 ac_success=no
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5003$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5004if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5005 $as_echo_n "(cached) " >&6
5006else
5007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5008/* end confdefs.h. */
5009
5010
5011// If the compiler admits that it is not ready for C++11, why torture it?
5012// Hopefully, this will speed up the test.
5013
5014#ifndef __cplusplus
5015
5016#error "This is not a C++ compiler"
5017
5018#elif __cplusplus < 201103L
5019
5020#error "This is not a C++11 compiler"
5021
5022#else
5023
5024namespace cxx11
5025{
5026
5027 namespace test_static_assert
5028 {
5029
5030 template <typename T>
5031 struct check
5032 {
5033 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5034 };
5035
5036 }
5037
5038 namespace test_final_override
5039 {
5040
5041 struct Base
5042 {
5043 virtual void f() {}
5044 };
5045
5046 struct Derived : public Base
5047 {
5048 virtual void f() override {}
5049 };
5050
5051 }
5052
5053 namespace test_double_right_angle_brackets
5054 {
5055
5056 template < typename T >
5057 struct check {};
5058
5059 typedef check<void> single_type;
5060 typedef check<check<void>> double_type;
5061 typedef check<check<check<void>>> triple_type;
5062 typedef check<check<check<check<void>>>> quadruple_type;
5063
5064 }
5065
5066 namespace test_decltype
5067 {
5068
5069 int
5070 f()
5071 {
5072 int a = 1;
5073 decltype(a) b = 2;
5074 return a + b;
5075 }
5076
5077 }
5078
5079 namespace test_type_deduction
5080 {
5081
5082 template < typename T1, typename T2 >
5083 struct is_same
5084 {
5085 static const bool value = false;
5086 };
5087
5088 template < typename T >
5089 struct is_same<T, T>
5090 {
5091 static const bool value = true;
5092 };
5093
5094 template < typename T1, typename T2 >
5095 auto
5096 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5097 {
5098 return a1 + a2;
5099 }
5100
5101 int
5102 test(const int c, volatile int v)
5103 {
5104 static_assert(is_same<int, decltype(0)>::value == true, "");
5105 static_assert(is_same<int, decltype(c)>::value == false, "");
5106 static_assert(is_same<int, decltype(v)>::value == false, "");
5107 auto ac = c;
5108 auto av = v;
5109 auto sumi = ac + av + 'x';
5110 auto sumf = ac + av + 1.0;
5111 static_assert(is_same<int, decltype(ac)>::value == true, "");
5112 static_assert(is_same<int, decltype(av)>::value == true, "");
5113 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5114 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5115 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5116 return (sumf > 0.0) ? sumi : add(c, v);
5117 }
5118
5119 }
5120
5121 namespace test_noexcept
5122 {
5123
5124 int f() { return 0; }
5125 int g() noexcept { return 0; }
5126
5127 static_assert(noexcept(f()) == false, "");
5128 static_assert(noexcept(g()) == true, "");
5129
5130 }
5131
5132 namespace test_constexpr
5133 {
5134
5135 template < typename CharT >
5136 unsigned long constexpr
5137 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5138 {
5139 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5140 }
5141
5142 template < typename CharT >
5143 unsigned long constexpr
5144 strlen_c(const CharT *const s) noexcept
5145 {
5146 return strlen_c_r(s, 0UL);
5147 }
5148
5149 static_assert(strlen_c("") == 0UL, "");
5150 static_assert(strlen_c("1") == 1UL, "");
5151 static_assert(strlen_c("example") == 7UL, "");
5152 static_assert(strlen_c("another\0example") == 7UL, "");
5153
5154 }
5155
5156 namespace test_rvalue_references
5157 {
5158
5159 template < int N >
5160 struct answer
5161 {
5162 static constexpr int value = N;
5163 };
5164
5165 answer<1> f(int&) { return answer<1>(); }
5166 answer<2> f(const int&) { return answer<2>(); }
5167 answer<3> f(int&&) { return answer<3>(); }
5168
5169 void
5170 test()
5171 {
5172 int i = 0;
5173 const int c = 0;
5174 static_assert(decltype(f(i))::value == 1, "");
5175 static_assert(decltype(f(c))::value == 2, "");
5176 static_assert(decltype(f(0))::value == 3, "");
5177 }
5178
5179 }
5180
5181 namespace test_uniform_initialization
5182 {
5183
5184 struct test
5185 {
5186 static const int zero {};
5187 static const int one {1};
5188 };
5189
5190 static_assert(test::zero == 0, "");
5191 static_assert(test::one == 1, "");
5192
5193 }
5194
5195 namespace test_lambdas
5196 {
5197
5198 void
5199 test1()
5200 {
5201 auto lambda1 = [](){};
5202 auto lambda2 = lambda1;
5203 lambda1();
5204 lambda2();
5205 }
5206
5207 int
5208 test2()
5209 {
5210 auto a = [](int i, int j){ return i + j; }(1, 2);
5211 auto b = []() -> int { return '0'; }();
5212 auto c = [=](){ return a + b; }();
5213 auto d = [&](){ return c; }();
5214 auto e = [a, &b](int x) mutable {
5215 const auto identity = [](int y){ return y; };
5216 for (auto i = 0; i < a; ++i)
5217 a += b--;
5218 return x + identity(a + b);
5219 }(0);
5220 return a + b + c + d + e;
5221 }
5222
5223 int
5224 test3()
5225 {
5226 const auto nullary = [](){ return 0; };
5227 const auto unary = [](int x){ return x; };
5228 using nullary_t = decltype(nullary);
5229 using unary_t = decltype(unary);
5230 const auto higher1st = [](nullary_t f){ return f(); };
5231 const auto higher2nd = [unary](nullary_t f1){
5232 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5233 };
5234 return higher1st(nullary) + higher2nd(nullary)(unary);
5235 }
5236
5237 }
5238
5239 namespace test_variadic_templates
5240 {
5241
5242 template <int...>
5243 struct sum;
5244
5245 template <int N0, int... N1toN>
5246 struct sum<N0, N1toN...>
5247 {
5248 static constexpr auto value = N0 + sum<N1toN...>::value;
5249 };
5250
5251 template <>
5252 struct sum<>
5253 {
5254 static constexpr auto value = 0;
5255 };
5256
5257 static_assert(sum<>::value == 0, "");
5258 static_assert(sum<1>::value == 1, "");
5259 static_assert(sum<23>::value == 23, "");
5260 static_assert(sum<1, 2>::value == 3, "");
5261 static_assert(sum<5, 5, 11>::value == 21, "");
5262 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5263
5264 }
5265
5266 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5267 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5268 // because of this.
5269 namespace test_template_alias_sfinae
5270 {
5271
5272 struct foo {};
5273
5274 template<typename T>
5275 using member = typename T::member_type;
5276
5277 template<typename T>
5278 void func(...) {}
5279
5280 template<typename T>
5281 void func(member<T>*) {}
5282
5283 void test();
5284
5285 void test() { func<foo>(0); }
5286
5287 }
5288
5289} // namespace cxx11
5290
5291#endif // __cplusplus >= 201103L
5292
5293
5294
5295_ACEOF
5296if ac_fn_cxx_try_compile "$LINENO"; then :
5297 ax_cv_cxx_compile_cxx11=yes
5298else
5299 ax_cv_cxx_compile_cxx11=no
5300fi
5301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5302fi
5303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5304$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5305 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5306 ac_success=yes
5307 fi
5308
5309 if test x$ac_success = xno; then
458412c3
TT
5310 for alternative in ${ax_cxx_compile_alternatives}; do
5311 switch="-std=gnu++${alternative}"
0bcda685
PA
5312 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5314$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5315if eval \${$cachevar+:} false; then :
0bcda685
PA
5316 $as_echo_n "(cached) " >&6
5317else
5318 ac_save_CXX="$CXX"
5319 CXX="$CXX $switch"
5320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
5323
5324// If the compiler admits that it is not ready for C++11, why torture it?
5325// Hopefully, this will speed up the test.
5326
5327#ifndef __cplusplus
5328
5329#error "This is not a C++ compiler"
5330
5331#elif __cplusplus < 201103L
5332
5333#error "This is not a C++11 compiler"
5334
5335#else
5336
5337namespace cxx11
5338{
5339
5340 namespace test_static_assert
5341 {
5342
5343 template <typename T>
5344 struct check
5345 {
5346 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5347 };
5348
5349 }
5350
5351 namespace test_final_override
5352 {
5353
5354 struct Base
5355 {
5356 virtual void f() {}
5357 };
5358
5359 struct Derived : public Base
5360 {
5361 virtual void f() override {}
5362 };
5363
5364 }
5365
5366 namespace test_double_right_angle_brackets
5367 {
5368
5369 template < typename T >
5370 struct check {};
5371
5372 typedef check<void> single_type;
5373 typedef check<check<void>> double_type;
5374 typedef check<check<check<void>>> triple_type;
5375 typedef check<check<check<check<void>>>> quadruple_type;
5376
5377 }
5378
5379 namespace test_decltype
5380 {
5381
5382 int
5383 f()
5384 {
5385 int a = 1;
5386 decltype(a) b = 2;
5387 return a + b;
5388 }
5389
5390 }
5391
5392 namespace test_type_deduction
5393 {
5394
5395 template < typename T1, typename T2 >
5396 struct is_same
5397 {
5398 static const bool value = false;
5399 };
5400
5401 template < typename T >
5402 struct is_same<T, T>
5403 {
5404 static const bool value = true;
5405 };
5406
5407 template < typename T1, typename T2 >
5408 auto
5409 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5410 {
5411 return a1 + a2;
5412 }
5413
5414 int
5415 test(const int c, volatile int v)
5416 {
5417 static_assert(is_same<int, decltype(0)>::value == true, "");
5418 static_assert(is_same<int, decltype(c)>::value == false, "");
5419 static_assert(is_same<int, decltype(v)>::value == false, "");
5420 auto ac = c;
5421 auto av = v;
5422 auto sumi = ac + av + 'x';
5423 auto sumf = ac + av + 1.0;
5424 static_assert(is_same<int, decltype(ac)>::value == true, "");
5425 static_assert(is_same<int, decltype(av)>::value == true, "");
5426 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5427 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5428 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5429 return (sumf > 0.0) ? sumi : add(c, v);
5430 }
5431
5432 }
5433
5434 namespace test_noexcept
5435 {
5436
5437 int f() { return 0; }
5438 int g() noexcept { return 0; }
5439
5440 static_assert(noexcept(f()) == false, "");
5441 static_assert(noexcept(g()) == true, "");
5442
5443 }
5444
5445 namespace test_constexpr
5446 {
5447
5448 template < typename CharT >
5449 unsigned long constexpr
5450 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5451 {
5452 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5453 }
5454
5455 template < typename CharT >
5456 unsigned long constexpr
5457 strlen_c(const CharT *const s) noexcept
5458 {
5459 return strlen_c_r(s, 0UL);
5460 }
5461
5462 static_assert(strlen_c("") == 0UL, "");
5463 static_assert(strlen_c("1") == 1UL, "");
5464 static_assert(strlen_c("example") == 7UL, "");
5465 static_assert(strlen_c("another\0example") == 7UL, "");
5466
5467 }
5468
5469 namespace test_rvalue_references
5470 {
5471
5472 template < int N >
5473 struct answer
5474 {
5475 static constexpr int value = N;
5476 };
5477
5478 answer<1> f(int&) { return answer<1>(); }
5479 answer<2> f(const int&) { return answer<2>(); }
5480 answer<3> f(int&&) { return answer<3>(); }
5481
5482 void
5483 test()
5484 {
5485 int i = 0;
5486 const int c = 0;
5487 static_assert(decltype(f(i))::value == 1, "");
5488 static_assert(decltype(f(c))::value == 2, "");
5489 static_assert(decltype(f(0))::value == 3, "");
5490 }
5491
5492 }
5493
5494 namespace test_uniform_initialization
5495 {
5496
5497 struct test
5498 {
5499 static const int zero {};
5500 static const int one {1};
5501 };
5502
5503 static_assert(test::zero == 0, "");
5504 static_assert(test::one == 1, "");
5505
5506 }
5507
5508 namespace test_lambdas
5509 {
5510
5511 void
5512 test1()
5513 {
5514 auto lambda1 = [](){};
5515 auto lambda2 = lambda1;
5516 lambda1();
5517 lambda2();
5518 }
5519
5520 int
5521 test2()
5522 {
5523 auto a = [](int i, int j){ return i + j; }(1, 2);
5524 auto b = []() -> int { return '0'; }();
5525 auto c = [=](){ return a + b; }();
5526 auto d = [&](){ return c; }();
5527 auto e = [a, &b](int x) mutable {
5528 const auto identity = [](int y){ return y; };
5529 for (auto i = 0; i < a; ++i)
5530 a += b--;
5531 return x + identity(a + b);
5532 }(0);
5533 return a + b + c + d + e;
5534 }
5535
5536 int
5537 test3()
5538 {
5539 const auto nullary = [](){ return 0; };
5540 const auto unary = [](int x){ return x; };
5541 using nullary_t = decltype(nullary);
5542 using unary_t = decltype(unary);
5543 const auto higher1st = [](nullary_t f){ return f(); };
5544 const auto higher2nd = [unary](nullary_t f1){
5545 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5546 };
5547 return higher1st(nullary) + higher2nd(nullary)(unary);
5548 }
5549
5550 }
5551
5552 namespace test_variadic_templates
5553 {
5554
5555 template <int...>
5556 struct sum;
5557
5558 template <int N0, int... N1toN>
5559 struct sum<N0, N1toN...>
5560 {
5561 static constexpr auto value = N0 + sum<N1toN...>::value;
5562 };
5563
5564 template <>
5565 struct sum<>
5566 {
5567 static constexpr auto value = 0;
5568 };
5569
5570 static_assert(sum<>::value == 0, "");
5571 static_assert(sum<1>::value == 1, "");
5572 static_assert(sum<23>::value == 23, "");
5573 static_assert(sum<1, 2>::value == 3, "");
5574 static_assert(sum<5, 5, 11>::value == 21, "");
5575 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5576
5577 }
5578
5579 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5580 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5581 // because of this.
5582 namespace test_template_alias_sfinae
5583 {
5584
5585 struct foo {};
5586
5587 template<typename T>
5588 using member = typename T::member_type;
5589
5590 template<typename T>
5591 void func(...) {}
5592
5593 template<typename T>
5594 void func(member<T>*) {}
5595
5596 void test();
5597
5598 void test() { func<foo>(0); }
5599
5600 }
5601
5602} // namespace cxx11
5603
5604#endif // __cplusplus >= 201103L
5605
5606
5607
5608_ACEOF
5609if ac_fn_cxx_try_compile "$LINENO"; then :
5610 eval $cachevar=yes
5611else
5612 eval $cachevar=no
5613fi
5614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5615 CXX="$ac_save_CXX"
5616fi
5617eval ac_res=\$$cachevar
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5619$as_echo "$ac_res" >&6; }
5620 if eval test x\$$cachevar = xyes; then
5621 CXX_DIALECT="$switch"
5622 ac_success=yes
5623 break
5624 fi
5625 done
5626 fi
5627
5628 if test x$ac_success = xno; then
458412c3
TT
5629 for alternative in ${ax_cxx_compile_alternatives}; do
5630 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5631 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5633$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5634if eval \${$cachevar+:} false; then :
0bcda685
PA
5635 $as_echo_n "(cached) " >&6
5636else
5637 ac_save_CXX="$CXX"
458412c3
TT
5638 CXX="$CXX $switch"
5639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5640/* end confdefs.h. */
5641
5642
5643// If the compiler admits that it is not ready for C++11, why torture it?
5644// Hopefully, this will speed up the test.
5645
5646#ifndef __cplusplus
5647
5648#error "This is not a C++ compiler"
5649
5650#elif __cplusplus < 201103L
5651
5652#error "This is not a C++11 compiler"
5653
5654#else
5655
5656namespace cxx11
5657{
5658
5659 namespace test_static_assert
5660 {
5661
5662 template <typename T>
5663 struct check
5664 {
5665 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5666 };
5667
5668 }
5669
5670 namespace test_final_override
5671 {
5672
5673 struct Base
5674 {
5675 virtual void f() {}
5676 };
5677
5678 struct Derived : public Base
5679 {
5680 virtual void f() override {}
5681 };
5682
5683 }
5684
5685 namespace test_double_right_angle_brackets
5686 {
5687
5688 template < typename T >
5689 struct check {};
5690
5691 typedef check<void> single_type;
5692 typedef check<check<void>> double_type;
5693 typedef check<check<check<void>>> triple_type;
5694 typedef check<check<check<check<void>>>> quadruple_type;
5695
5696 }
5697
5698 namespace test_decltype
5699 {
5700
5701 int
5702 f()
5703 {
5704 int a = 1;
5705 decltype(a) b = 2;
5706 return a + b;
5707 }
5708
5709 }
5710
5711 namespace test_type_deduction
5712 {
5713
5714 template < typename T1, typename T2 >
5715 struct is_same
5716 {
5717 static const bool value = false;
5718 };
5719
5720 template < typename T >
5721 struct is_same<T, T>
5722 {
5723 static const bool value = true;
5724 };
5725
5726 template < typename T1, typename T2 >
5727 auto
5728 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5729 {
5730 return a1 + a2;
5731 }
5732
5733 int
5734 test(const int c, volatile int v)
5735 {
5736 static_assert(is_same<int, decltype(0)>::value == true, "");
5737 static_assert(is_same<int, decltype(c)>::value == false, "");
5738 static_assert(is_same<int, decltype(v)>::value == false, "");
5739 auto ac = c;
5740 auto av = v;
5741 auto sumi = ac + av + 'x';
5742 auto sumf = ac + av + 1.0;
5743 static_assert(is_same<int, decltype(ac)>::value == true, "");
5744 static_assert(is_same<int, decltype(av)>::value == true, "");
5745 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5746 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5747 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5748 return (sumf > 0.0) ? sumi : add(c, v);
5749 }
5750
5751 }
5752
5753 namespace test_noexcept
5754 {
5755
5756 int f() { return 0; }
5757 int g() noexcept { return 0; }
5758
5759 static_assert(noexcept(f()) == false, "");
5760 static_assert(noexcept(g()) == true, "");
5761
5762 }
5763
5764 namespace test_constexpr
5765 {
5766
5767 template < typename CharT >
5768 unsigned long constexpr
5769 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5770 {
5771 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5772 }
5773
5774 template < typename CharT >
5775 unsigned long constexpr
5776 strlen_c(const CharT *const s) noexcept
5777 {
5778 return strlen_c_r(s, 0UL);
5779 }
5780
5781 static_assert(strlen_c("") == 0UL, "");
5782 static_assert(strlen_c("1") == 1UL, "");
5783 static_assert(strlen_c("example") == 7UL, "");
5784 static_assert(strlen_c("another\0example") == 7UL, "");
5785
5786 }
5787
5788 namespace test_rvalue_references
5789 {
5790
5791 template < int N >
5792 struct answer
5793 {
5794 static constexpr int value = N;
5795 };
5796
5797 answer<1> f(int&) { return answer<1>(); }
5798 answer<2> f(const int&) { return answer<2>(); }
5799 answer<3> f(int&&) { return answer<3>(); }
5800
5801 void
5802 test()
5803 {
5804 int i = 0;
5805 const int c = 0;
5806 static_assert(decltype(f(i))::value == 1, "");
5807 static_assert(decltype(f(c))::value == 2, "");
5808 static_assert(decltype(f(0))::value == 3, "");
5809 }
5810
5811 }
5812
5813 namespace test_uniform_initialization
5814 {
5815
5816 struct test
5817 {
5818 static const int zero {};
5819 static const int one {1};
5820 };
5821
5822 static_assert(test::zero == 0, "");
5823 static_assert(test::one == 1, "");
5824
5825 }
5826
5827 namespace test_lambdas
5828 {
5829
5830 void
5831 test1()
5832 {
5833 auto lambda1 = [](){};
5834 auto lambda2 = lambda1;
5835 lambda1();
5836 lambda2();
5837 }
5838
5839 int
5840 test2()
5841 {
5842 auto a = [](int i, int j){ return i + j; }(1, 2);
5843 auto b = []() -> int { return '0'; }();
5844 auto c = [=](){ return a + b; }();
5845 auto d = [&](){ return c; }();
5846 auto e = [a, &b](int x) mutable {
5847 const auto identity = [](int y){ return y; };
5848 for (auto i = 0; i < a; ++i)
5849 a += b--;
5850 return x + identity(a + b);
5851 }(0);
5852 return a + b + c + d + e;
5853 }
5854
5855 int
5856 test3()
5857 {
5858 const auto nullary = [](){ return 0; };
5859 const auto unary = [](int x){ return x; };
5860 using nullary_t = decltype(nullary);
5861 using unary_t = decltype(unary);
5862 const auto higher1st = [](nullary_t f){ return f(); };
5863 const auto higher2nd = [unary](nullary_t f1){
5864 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5865 };
5866 return higher1st(nullary) + higher2nd(nullary)(unary);
5867 }
5868
5869 }
5870
5871 namespace test_variadic_templates
5872 {
5873
5874 template <int...>
5875 struct sum;
5876
5877 template <int N0, int... N1toN>
5878 struct sum<N0, N1toN...>
5879 {
5880 static constexpr auto value = N0 + sum<N1toN...>::value;
5881 };
5882
5883 template <>
5884 struct sum<>
5885 {
5886 static constexpr auto value = 0;
5887 };
5888
5889 static_assert(sum<>::value == 0, "");
5890 static_assert(sum<1>::value == 1, "");
5891 static_assert(sum<23>::value == 23, "");
5892 static_assert(sum<1, 2>::value == 3, "");
5893 static_assert(sum<5, 5, 11>::value == 21, "");
5894 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5895
5896 }
5897
5898 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5899 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5900 // because of this.
5901 namespace test_template_alias_sfinae
5902 {
5903
5904 struct foo {};
5905
5906 template<typename T>
5907 using member = typename T::member_type;
5908
5909 template<typename T>
5910 void func(...) {}
5911
5912 template<typename T>
5913 void func(member<T>*) {}
5914
5915 void test();
5916
5917 void test() { func<foo>(0); }
5918
5919 }
5920
5921} // namespace cxx11
5922
5923#endif // __cplusplus >= 201103L
5924
5925
5926
5927_ACEOF
5928if ac_fn_cxx_try_compile "$LINENO"; then :
5929 eval $cachevar=yes
5930else
5931 eval $cachevar=no
5932fi
5933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
458412c3 5934 CXX="$ac_save_CXX"
0bcda685
PA
5935fi
5936eval ac_res=\$$cachevar
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5938$as_echo "$ac_res" >&6; }
458412c3
TT
5939 if eval test x\$$cachevar = xyes; then
5940 CXX_DIALECT="$switch"
5941 ac_success=yes
5942 break
5943 fi
5944 done
5945 if test x$ac_success = xyes; then
0bcda685
PA
5946 break
5947 fi
5948 done
5949 fi
5950 ac_ext=c
5951ac_cpp='$CPP $CPPFLAGS'
5952ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5953ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5954ac_compiler_gnu=$ac_cv_c_compiler_gnu
5955
5956 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5957 if test x$ac_success = xno; then
d0ac1c44 5958 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
5959 fi
5960 fi
5961 if test x$ac_success = xno; then
5962 HAVE_CXX11=0
5963 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5964$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5965 else
5966 HAVE_CXX11=1
5967
5968$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5969
5970 fi
5971
5972
5973
5974
c971b7fa
PA
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5976$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 5977if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
5978 $as_echo_n "(cached) " >&6
5979else
5980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5981/* end confdefs.h. */
5982#include <stdlib.h>
5983#include <stdarg.h>
5984#include <string.h>
5985#include <float.h>
5986
5987int
5988main ()
5989{
5990
5991 ;
5992 return 0;
5993}
5994_ACEOF
5995if ac_fn_c_try_compile "$LINENO"; then :
5996 ac_cv_header_stdc=yes
5997else
5998 ac_cv_header_stdc=no
5999fi
6000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6001
6002if test $ac_cv_header_stdc = yes; then
6003 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6005/* end confdefs.h. */
6006#include <string.h>
6007
6008_ACEOF
6009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
6010 $EGREP "memchr" >/dev/null 2>&1; then :
6011
68070c10 6012else
81ecdfbb
RW
6013 ac_cv_header_stdc=no
6014fi
6015rm -f conftest*
68070c10
PA
6016
6017fi
68070c10 6018
81ecdfbb
RW
6019if test $ac_cv_header_stdc = yes; then
6020 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022/* end confdefs.h. */
6023#include <stdlib.h>
68070c10 6024
68070c10 6025_ACEOF
81ecdfbb
RW
6026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6027 $EGREP "free" >/dev/null 2>&1; then :
68070c10
PA
6028
6029else
81ecdfbb 6030 ac_cv_header_stdc=no
68070c10 6031fi
81ecdfbb
RW
6032rm -f conftest*
6033
68070c10
PA
6034fi
6035
81ecdfbb
RW
6036if test $ac_cv_header_stdc = yes; then
6037 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6038 if test "$cross_compiling" = yes; then :
6039 :
43d5792c 6040else
81ecdfbb 6041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6042/* end confdefs.h. */
81ecdfbb
RW
6043#include <ctype.h>
6044#include <stdlib.h>
6045#if ((' ' & 0x0FF) == 0x020)
6046# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6047# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6048#else
6049# define ISLOWER(c) \
6050 (('a' <= (c) && (c) <= 'i') \
6051 || ('j' <= (c) && (c) <= 'r') \
6052 || ('s' <= (c) && (c) <= 'z'))
6053# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6054#endif
6055
6056#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bec39cab
AC
6057int
6058main ()
6059{
81ecdfbb
RW
6060 int i;
6061 for (i = 0; i < 256; i++)
6062 if (XOR (islower (i), ISLOWER (i))
6063 || toupper (i) != TOUPPER (i))
6064 return 2;
bec39cab
AC
6065 return 0;
6066}
6067_ACEOF
81ecdfbb 6068if ac_fn_c_try_run "$LINENO"; then :
bec39cab 6069
81ecdfbb
RW
6070else
6071 ac_cv_header_stdc=no
43d5792c 6072fi
81ecdfbb
RW
6073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6074 conftest.$ac_objext conftest.beam conftest.$ac_ext
43d5792c 6075fi
e122f1f5 6076
68070c10 6077fi
81ecdfbb
RW
6078fi
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6080$as_echo "$ac_cv_header_stdc" >&6; }
6081if test $ac_cv_header_stdc = yes; then
68070c10 6082
81ecdfbb 6083$as_echo "#define STDC_HEADERS 1" >>confdefs.h
68070c10 6084
68070c10 6085fi
68070c10 6086
68070c10 6087
db6878ac
SM
6088ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6089if test "x$ac_cv_type_size_t" = xyes; then :
8ecfd7bd 6090
db6878ac 6091else
4d696a5c 6092
db6878ac
SM
6093cat >>confdefs.h <<_ACEOF
6094#define size_t unsigned int
6095_ACEOF
4d696a5c 6096
8ecfd7bd
SDJ
6097fi
6098
6099
6d580b63 6100
8ecfd7bd 6101
db6878ac
SM
6102 for ac_header in $ac_header_list
6103do :
6104 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6105ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6106"
6107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6108 cat >>confdefs.h <<_ACEOF
6109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6110_ACEOF
8ecfd7bd 6111
6d580b63
YQ
6112fi
6113
db6878ac 6114done
8ecfd7bd 6115
bd885420 6116
bd885420
YQ
6117
6118
6119
6120
6121
db6878ac
SM
6122ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6123if test "x$ac_cv_type_pid_t" = xyes; then :
bd885420 6124
61c125b9 6125else
60d6cfc9 6126
db6878ac
SM
6127cat >>confdefs.h <<_ACEOF
6128#define pid_t int
6129_ACEOF
60d6cfc9 6130
db6878ac 6131fi
61c125b9 6132
db6878ac
SM
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6134$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6135if ${ac_cv_path_SED+:} false; then :
61c125b9
TT
6136 $as_echo_n "(cached) " >&6
6137else
db6878ac
SM
6138 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6139 for ac_i in 1 2 3 4 5 6 7; do
6140 ac_script="$ac_script$as_nl$ac_script"
6141 done
6142 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6143 { ac_script=; unset ac_script;}
6144 if test -z "$SED"; then
6145 ac_path_SED_found=false
6146 # Loop through the user's path and test for each of PROGNAME-LIST
6147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150 IFS=$as_save_IFS
6151 test -z "$as_dir" && as_dir=.
6152 for ac_prog in sed gsed; do
6153 for ac_exec_ext in '' $ac_executable_extensions; do
6154 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6155 as_fn_executable_p "$ac_path_SED" || continue
6156# Check for GNU ac_path_SED and select it if it is found.
6157 # Check for GNU $ac_path_SED
6158case `"$ac_path_SED" --version 2>&1` in
6159*GNU*)
6160 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6161*)
6162 ac_count=0
6163 $as_echo_n 0123456789 >"conftest.in"
6164 while :
6165 do
6166 cat "conftest.in" "conftest.in" >"conftest.tmp"
6167 mv "conftest.tmp" "conftest.in"
6168 cp "conftest.in" "conftest.nl"
6169 $as_echo '' >> "conftest.nl"
6170 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6171 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6172 as_fn_arith $ac_count + 1 && ac_count=$as_val
6173 if test $ac_count -gt ${ac_path_SED_max-0}; then
6174 # Best one so far, save it but keep looking for a better one
6175 ac_cv_path_SED="$ac_path_SED"
6176 ac_path_SED_max=$ac_count
61c125b9 6177 fi
db6878ac
SM
6178 # 10*(2^10) chars as input seems more than enough
6179 test $ac_count -gt 10 && break
61c125b9 6180 done
db6878ac
SM
6181 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6182esac
61c125b9 6183
db6878ac
SM
6184 $ac_path_SED_found && break 3
6185 done
6186 done
6187 done
6188IFS=$as_save_IFS
6189 if test -z "$ac_cv_path_SED"; then
6190 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6191 fi
61c125b9 6192else
db6878ac 6193 ac_cv_path_SED=$SED
61c125b9
TT
6194fi
6195
6196fi
db6878ac
SM
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6198$as_echo "$ac_cv_path_SED" >&6; }
6199 SED="$ac_cv_path_SED"
6200 rm -f conftest.sed
61c125b9 6201
d0ac1c44 6202
db6878ac
SM
6203 if test "X$prefix" = "XNONE"; then
6204 acl_final_prefix="$ac_default_prefix"
6205 else
6206 acl_final_prefix="$prefix"
6207 fi
6208 if test "X$exec_prefix" = "XNONE"; then
6209 acl_final_exec_prefix='${prefix}'
6210 else
6211 acl_final_exec_prefix="$exec_prefix"
6212 fi
6213 acl_save_prefix="$prefix"
6214 prefix="$acl_final_prefix"
6215 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6216 prefix="$acl_save_prefix"
05ea2a05
TT
6217
6218
6219# Check whether --with-gnu-ld was given.
6220if test "${with_gnu_ld+set}" = set; then :
6221 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6222else
6223 with_gnu_ld=no
6224fi
6225
6226# Prepare PATH_SEPARATOR.
6227# The user is always right.
6228if test "${PATH_SEPARATOR+set}" != set; then
6229 echo "#! /bin/sh" >conf$$.sh
6230 echo "exit 0" >>conf$$.sh
6231 chmod +x conf$$.sh
6232 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6233 PATH_SEPARATOR=';'
6234 else
6235 PATH_SEPARATOR=:
6236 fi
6237 rm -f conf$$.sh
6238fi
6239ac_prog=ld
6240if test "$GCC" = yes; then
6241 # Check if gcc -print-prog-name=ld gives a path.
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6243$as_echo_n "checking for ld used by GCC... " >&6; }
6244 case $host in
6245 *-*-mingw*)
6246 # gcc leaves a trailing carriage return which upsets mingw
6247 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6248 *)
6249 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6250 esac
6251 case $ac_prog in
6252 # Accept absolute paths.
6253 [\\/]* | [A-Za-z]:[\\/]*)
6254 re_direlt='/[^/][^/]*/\.\./'
6255 # Canonicalize the path of ld
6256 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6257 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6258 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6259 done
6260 test -z "$LD" && LD="$ac_prog"
6261 ;;
6262 "")
6263 # If it fails, then pretend we aren't using GCC.
6264 ac_prog=ld
6265 ;;
6266 *)
6267 # If it is relative, then search for the first ld in PATH.
6268 with_gnu_ld=unknown
6269 ;;
6270 esac
6271elif test "$with_gnu_ld" = yes; then
6272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6273$as_echo_n "checking for GNU ld... " >&6; }
6274else
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6276$as_echo_n "checking for non-GNU ld... " >&6; }
6277fi
6278if ${acl_cv_path_LD+:} false; then :
6279 $as_echo_n "(cached) " >&6
6280else
6281 if test -z "$LD"; then
6282 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6283 for ac_dir in $PATH; do
6284 test -z "$ac_dir" && ac_dir=.
6285 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6286 acl_cv_path_LD="$ac_dir/$ac_prog"
6287 # Check to see if the program is GNU ld. I'd rather use --version,
6288 # but apparently some GNU ld's only accept -v.
6289 # Break only if it was the GNU/non-GNU ld that we prefer.
6290 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6291 test "$with_gnu_ld" != no && break
6292 else
6293 test "$with_gnu_ld" != yes && break
6294 fi
6295 fi
6296 done
6297 IFS="$ac_save_ifs"
6298else
6299 acl_cv_path_LD="$LD" # Let the user override the test with a path.
6300fi
6301fi
6302
6303LD="$acl_cv_path_LD"
6304if test -n "$LD"; then
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6306$as_echo "$LD" >&6; }
6307else
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6309$as_echo "no" >&6; }
6310fi
6311test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6313$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6314if ${acl_cv_prog_gnu_ld+:} false; then :
6315 $as_echo_n "(cached) " >&6
6316else
6317 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6318if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6319 acl_cv_prog_gnu_ld=yes
6320else
6321 acl_cv_prog_gnu_ld=no
6322fi
6323fi
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
6325$as_echo "$acl_cv_prog_gnu_ld" >&6; }
6326with_gnu_ld=$acl_cv_prog_gnu_ld
6327
6328
6329
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
6331$as_echo_n "checking for shared library run path origin... " >&6; }
6332if ${acl_cv_rpath+:} false; then :
6333 $as_echo_n "(cached) " >&6
6334else
6335
6336 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6337 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6338 . ./conftest.sh
6339 rm -f ./conftest.sh
6340 acl_cv_rpath=done
6341
6342fi
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
6344$as_echo "$acl_cv_rpath" >&6; }
6345 wl="$acl_cv_wl"
6346 libext="$acl_cv_libext"
6347 shlibext="$acl_cv_shlibext"
6348 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6349 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6350 hardcode_direct="$acl_cv_hardcode_direct"
6351 hardcode_minus_L="$acl_cv_hardcode_minus_L"
6352 # Check whether --enable-rpath was given.
6353if test "${enable_rpath+set}" = set; then :
6354 enableval=$enable_rpath; :
6355else
6356 enable_rpath=yes
6357fi
6358
6359
6360
db6878ac
SM
6361 # Set the 'development' global.
6362 . $srcdir/../bfd/development.sh
6363
3266f10b
TT
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6365$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 6366if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
6367 $as_echo_n "(cached) " >&6
6368else
6369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6370/* end confdefs.h. */
6371#include <stdlib.h>
6372#include <stdarg.h>
6373#include <string.h>
6374#include <float.h>
6375
6376int
6377main ()
6378{
6379
6380 ;
6381 return 0;
6382}
6383_ACEOF
6384if ac_fn_c_try_compile "$LINENO"; then :
6385 ac_cv_header_stdc=yes
6386else
6387 ac_cv_header_stdc=no
6388fi
6389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6390
6391if test $ac_cv_header_stdc = yes; then
6392 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6394/* end confdefs.h. */
6395#include <string.h>
6396
6397_ACEOF
6398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6399 $EGREP "memchr" >/dev/null 2>&1; then :
6400
6401else
6402 ac_cv_header_stdc=no
6403fi
6404rm -f conftest*
6405
6406fi
6407
6408if test $ac_cv_header_stdc = yes; then
6409 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411/* end confdefs.h. */
6412#include <stdlib.h>
6413
6414_ACEOF
6415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6416 $EGREP "free" >/dev/null 2>&1; then :
6417
6418else
6419 ac_cv_header_stdc=no
6420fi
6421rm -f conftest*
6422
6423fi
6424
6425if test $ac_cv_header_stdc = yes; then
6426 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6427 if test "$cross_compiling" = yes; then :
6428 :
6429else
6430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6431/* end confdefs.h. */
6432#include <ctype.h>
6433#include <stdlib.h>
6434#if ((' ' & 0x0FF) == 0x020)
6435# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6436# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6437#else
6438# define ISLOWER(c) \
6439 (('a' <= (c) && (c) <= 'i') \
6440 || ('j' <= (c) && (c) <= 'r') \
6441 || ('s' <= (c) && (c) <= 'z'))
6442# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6443#endif
6444
6445#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6446int
6447main ()
6448{
6449 int i;
6450 for (i = 0; i < 256; i++)
6451 if (XOR (islower (i), ISLOWER (i))
6452 || toupper (i) != TOUPPER (i))
6453 return 2;
6454 return 0;
6455}
6456_ACEOF
6457if ac_fn_c_try_run "$LINENO"; then :
6458
6459else
6460 ac_cv_header_stdc=no
6461fi
6462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6463 conftest.$ac_objext conftest.beam conftest.$ac_ext
6464fi
6465
6466fi
6467fi
6468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6469$as_echo "$ac_cv_header_stdc" >&6; }
6470if test $ac_cv_header_stdc = yes; then
6471
6472$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6473
3266f10b
TT
6474fi
6475
6476 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6477# for constant arguments. Useless!
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6479$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 6480if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
6481 $as_echo_n "(cached) " >&6
6482else
6483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484/* end confdefs.h. */
6485#include <alloca.h>
6486int
6487main ()
6488{
6489char *p = (char *) alloca (2 * sizeof (int));
6490 if (p) return 0;
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495if ac_fn_c_try_link "$LINENO"; then :
6496 ac_cv_working_alloca_h=yes
6497else
6498 ac_cv_working_alloca_h=no
6499fi
6500rm -f core conftest.err conftest.$ac_objext \
6501 conftest$ac_exeext conftest.$ac_ext
6502fi
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6504$as_echo "$ac_cv_working_alloca_h" >&6; }
6505if test $ac_cv_working_alloca_h = yes; then
6506
6507$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6508
6509fi
6510
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6512$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 6513if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
6514 $as_echo_n "(cached) " >&6
6515else
6516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517/* end confdefs.h. */
6518#ifdef __GNUC__
6519# define alloca __builtin_alloca
6520#else
6521# ifdef _MSC_VER
6522# include <malloc.h>
6523# define alloca _alloca
6524# else
6525# ifdef HAVE_ALLOCA_H
6526# include <alloca.h>
6527# else
6528# ifdef _AIX
6529 #pragma alloca
6530# else
6531# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 6532void *alloca (size_t);
3266f10b
TT
6533# endif
6534# endif
6535# endif
6536# endif
6537#endif
6538
6539int
6540main ()
6541{
6542char *p = (char *) alloca (1);
6543 if (p) return 0;
6544 ;
6545 return 0;
6546}
6547_ACEOF
6548if ac_fn_c_try_link "$LINENO"; then :
6549 ac_cv_func_alloca_works=yes
6550else
6551 ac_cv_func_alloca_works=no
6552fi
6553rm -f core conftest.err conftest.$ac_objext \
6554 conftest$ac_exeext conftest.$ac_ext
6555fi
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6557$as_echo "$ac_cv_func_alloca_works" >&6; }
6558
6559if test $ac_cv_func_alloca_works = yes; then
6560
6561$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6562
6563else
6564 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6565# that cause trouble. Some versions do not even contain alloca or
6566# contain a buggy version. If you still want to use their alloca,
6567# use ar to extract alloca.o from them instead of compiling alloca.c.
6568
6569ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6570
6571$as_echo "#define C_ALLOCA 1" >>confdefs.h
6572
6573
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6575$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 6576if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
6577 $as_echo_n "(cached) " >&6
6578else
6579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6580/* end confdefs.h. */
6581#if defined CRAY && ! defined CRAY2
6582webecray
6583#else
6584wenotbecray
6585#endif
6586
6587_ACEOF
6588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6589 $EGREP "webecray" >/dev/null 2>&1; then :
6590 ac_cv_os_cray=yes
6591else
6592 ac_cv_os_cray=no
6593fi
6594rm -f conftest*
6595
6596fi
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6598$as_echo "$ac_cv_os_cray" >&6; }
6599if test $ac_cv_os_cray = yes; then
6600 for ac_func in _getb67 GETB67 getb67; do
6601 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6602ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6603if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
6604
6605cat >>confdefs.h <<_ACEOF
6606#define CRAY_STACKSEG_END $ac_func
6607_ACEOF
6608
6609 break
6610fi
6611
6612 done
6613fi
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6616$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 6617if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
6618 $as_echo_n "(cached) " >&6
6619else
6620 if test "$cross_compiling" = yes; then :
6621 ac_cv_c_stack_direction=0
6622else
6623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6624/* end confdefs.h. */
6625$ac_includes_default
6626int
d0ac1c44 6627find_stack_direction (int *addr, int depth)
3266f10b 6628{
d0ac1c44
SM
6629 int dir, dummy = 0;
6630 if (! addr)
6631 addr = &dummy;
6632 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6633 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6634 return dir + dummy;
3266f10b
TT
6635}
6636
6637int
d0ac1c44 6638main (int argc, char **argv)
3266f10b 6639{
d0ac1c44 6640 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
6641}
6642_ACEOF
6643if ac_fn_c_try_run "$LINENO"; then :
6644 ac_cv_c_stack_direction=1
6645else
6646 ac_cv_c_stack_direction=-1
6647fi
6648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6649 conftest.$ac_objext conftest.beam conftest.$ac_ext
6650fi
6651
6652fi
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6654$as_echo "$ac_cv_c_stack_direction" >&6; }
6655cat >>confdefs.h <<_ACEOF
6656#define STACK_DIRECTION $ac_cv_c_stack_direction
6657_ACEOF
6658
6659
6660fi
6661
6662
b2ceabe8
TT
6663 WIN32APILIBS=
6664 case ${host} in
6665 *mingw32*)
6666
6667$as_echo "#define USE_WIN32API 1" >>confdefs.h
6668
6669 WIN32APILIBS="-lws2_32"
6670 ;;
6671 esac
6672
3266f10b
TT
6673
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
6675$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 6676if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
6677 $as_echo_n "(cached) " >&6
6678else
6679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6680/* end confdefs.h. */
6681#include <langinfo.h>
6682int
6683main ()
6684{
6685char* cs = nl_langinfo(CODESET);
6686 ;
6687 return 0;
6688}
6689_ACEOF
6690if ac_fn_c_try_link "$LINENO"; then :
6691 am_cv_langinfo_codeset=yes
6692else
6693 am_cv_langinfo_codeset=no
6694fi
6695rm -f core conftest.err conftest.$ac_objext \
6696 conftest$ac_exeext conftest.$ac_ext
6697
6698fi
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
6700$as_echo "$am_cv_langinfo_codeset" >&6; }
6701 if test $am_cv_langinfo_codeset = yes; then
6702
6703$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6704
6705 fi
6706
6707
05ea2a05 6708 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
3266f10b
TT
6709do :
6710 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6711ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 6712if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
6713 cat >>confdefs.h <<_ACEOF
6714#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6715_ACEOF
6716
6717fi
6718
6719done
6720
6721
05ea2a05
TT
6722
6723for ac_func in getpagesize
3266f10b 6724do :
05ea2a05
TT
6725 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
6726if test "x$ac_cv_func_getpagesize" = xyes; then :
3266f10b 6727 cat >>confdefs.h <<_ACEOF
05ea2a05 6728#define HAVE_GETPAGESIZE 1
3266f10b
TT
6729_ACEOF
6730
6731fi
6732done
6733
05ea2a05
TT
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
6735$as_echo_n "checking for working mmap... " >&6; }
6736if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
6737 $as_echo_n "(cached) " >&6
3266f10b 6738else
05ea2a05
TT
6739 if test "$cross_compiling" = yes; then :
6740 ac_cv_func_mmap_fixed_mapped=no
6741else
6742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6743/* end confdefs.h. */
6744$ac_includes_default
6745/* malloc might have been renamed as rpl_malloc. */
6746#undef malloc
6747
6748/* Thanks to Mike Haertel and Jim Avera for this test.
6749 Here is a matrix of mmap possibilities:
6750 mmap private not fixed
6751 mmap private fixed at somewhere currently unmapped
6752 mmap private fixed at somewhere already mapped
6753 mmap shared not fixed
6754 mmap shared fixed at somewhere currently unmapped
6755 mmap shared fixed at somewhere already mapped
6756 For private mappings, we should verify that changes cannot be read()
6757 back from the file, nor mmap's back from the file at a different
6758 address. (There have been systems where private was not correctly
6759 implemented like the infamous i386 svr4.0, and systems where the
6760 VM page cache was not coherent with the file system buffer cache
6761 like early versions of FreeBSD and possibly contemporary NetBSD.)
6762 For shared mappings, we should conversely verify that changes get
6763 propagated back to all the places they're supposed to be.
6764
6765 Grep wants private fixed already mapped.
6766 The main things grep needs to know about mmap are:
6767 * does it exist and is it safe to write into the mmap'd area
6768 * how to use it (BSD variants) */
6769
6770#include <fcntl.h>
6771#include <sys/mman.h>
6772
6773#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
6774char *malloc ();
6775#endif
3266f10b 6776
05ea2a05
TT
6777/* This mess was copied from the GNU getpagesize.h. */
6778#ifndef HAVE_GETPAGESIZE
6779# ifdef _SC_PAGESIZE
6780# define getpagesize() sysconf(_SC_PAGESIZE)
6781# else /* no _SC_PAGESIZE */
6782# ifdef HAVE_SYS_PARAM_H
6783# include <sys/param.h>
6784# ifdef EXEC_PAGESIZE
6785# define getpagesize() EXEC_PAGESIZE
6786# else /* no EXEC_PAGESIZE */
6787# ifdef NBPG
6788# define getpagesize() NBPG * CLSIZE
6789# ifndef CLSIZE
6790# define CLSIZE 1
6791# endif /* no CLSIZE */
6792# else /* no NBPG */
6793# ifdef NBPC
6794# define getpagesize() NBPC
6795# else /* no NBPC */
6796# ifdef PAGESIZE
6797# define getpagesize() PAGESIZE
6798# endif /* PAGESIZE */
6799# endif /* no NBPC */
6800# endif /* no NBPG */
6801# endif /* no EXEC_PAGESIZE */
6802# else /* no HAVE_SYS_PARAM_H */
6803# define getpagesize() 8192 /* punt totally */
6804# endif /* no HAVE_SYS_PARAM_H */
6805# endif /* no _SC_PAGESIZE */
6806
6807#endif /* no HAVE_GETPAGESIZE */
3266f10b 6808
05ea2a05
TT
6809int
6810main ()
6811{
6812 char *data, *data2, *data3;
6813 const char *cdata2;
6814 int i, pagesize;
6815 int fd, fd2;
3266f10b 6816
05ea2a05 6817 pagesize = getpagesize ();
5e030278 6818
05ea2a05
TT
6819 /* First, make a file with some known garbage in it. */
6820 data = (char *) malloc (pagesize);
6821 if (!data)
6822 return 1;
6823 for (i = 0; i < pagesize; ++i)
6824 *(data + i) = rand ();
6825 umask (0);
6826 fd = creat ("conftest.mmap", 0600);
6827 if (fd < 0)
6828 return 2;
6829 if (write (fd, data, pagesize) != pagesize)
6830 return 3;
6831 close (fd);
6832
6833 /* Next, check that the tail of a page is zero-filled. File must have
6834 non-zero length, otherwise we risk SIGBUS for entire page. */
6835 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
6836 if (fd2 < 0)
6837 return 4;
6838 cdata2 = "";
6839 if (write (fd2, cdata2, 1) != 1)
6840 return 5;
6841 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
6842 if (data2 == MAP_FAILED)
6843 return 6;
6844 for (i = 0; i < pagesize; ++i)
6845 if (*(data2 + i))
6846 return 7;
6847 close (fd2);
6848 if (munmap (data2, pagesize))
6849 return 8;
6850
6851 /* Next, try to mmap the file at a fixed address which already has
6852 something else allocated at it. If we can, also make sure that
6853 we see the same garbage. */
6854 fd = open ("conftest.mmap", O_RDWR);
6855 if (fd < 0)
6856 return 9;
6857 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
6858 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6859 return 10;
6860 for (i = 0; i < pagesize; ++i)
6861 if (*(data + i) != *(data2 + i))
6862 return 11;
6863
6864 /* Finally, make sure that changes to the mapped area do not
6865 percolate back to the file as seen by read(). (This is a bug on
6866 some variants of i386 svr4.0.) */
6867 for (i = 0; i < pagesize; ++i)
6868 *(data2 + i) = *(data2 + i) + 1;
6869 data3 = (char *) malloc (pagesize);
6870 if (!data3)
6871 return 12;
6872 if (read (fd, data3, pagesize) != pagesize)
6873 return 13;
6874 for (i = 0; i < pagesize; ++i)
6875 if (*(data + i) != *(data3 + i))
6876 return 14;
6877 close (fd);
6878 return 0;
6879}
6880_ACEOF
6881if ac_fn_c_try_run "$LINENO"; then :
6882 ac_cv_func_mmap_fixed_mapped=yes
6883else
6884 ac_cv_func_mmap_fixed_mapped=no
6885fi
6886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6887 conftest.$ac_objext conftest.beam conftest.$ac_ext
6888fi
5e030278 6889
05ea2a05
TT
6890fi
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
6892$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
6893if test $ac_cv_func_mmap_fixed_mapped = yes; then
5e030278 6894
05ea2a05 6895$as_echo "#define HAVE_MMAP 1" >>confdefs.h
5e030278 6896
05ea2a05
TT
6897fi
6898rm -f conftest.mmap conftest.txt
5e030278 6899
05ea2a05
TT
6900 for ac_header in vfork.h
6901do :
6902 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
6903if test "x$ac_cv_header_vfork_h" = xyes; then :
6904 cat >>confdefs.h <<_ACEOF
6905#define HAVE_VFORK_H 1
6906_ACEOF
5e030278 6907
05ea2a05 6908fi
5e030278 6909
05ea2a05 6910done
5e030278 6911
05ea2a05
TT
6912for ac_func in fork vfork
6913do :
6914 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6915ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6916if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6917 cat >>confdefs.h <<_ACEOF
6918#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6919_ACEOF
6920
6921fi
6922done
6923
6924if test "x$ac_cv_func_fork" = xyes; then
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6926$as_echo_n "checking for working fork... " >&6; }
6927if ${ac_cv_func_fork_works+:} false; then :
6928 $as_echo_n "(cached) " >&6
6929else
6930 if test "$cross_compiling" = yes; then :
6931 ac_cv_func_fork_works=cross
6932else
6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934/* end confdefs.h. */
6935$ac_includes_default
6936int
6937main ()
6938{
6939
6940 /* By Ruediger Kuhlmann. */
6941 return fork () < 0;
6942
6943 ;
6944 return 0;
6945}
6946_ACEOF
6947if ac_fn_c_try_run "$LINENO"; then :
6948 ac_cv_func_fork_works=yes
6949else
6950 ac_cv_func_fork_works=no
6951fi
6952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6953 conftest.$ac_objext conftest.beam conftest.$ac_ext
6954fi
6955
6956fi
6957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6958$as_echo "$ac_cv_func_fork_works" >&6; }
6959
6960else
6961 ac_cv_func_fork_works=$ac_cv_func_fork
6962fi
6963if test "x$ac_cv_func_fork_works" = xcross; then
6964 case $host in
6965 *-*-amigaos* | *-*-msdosdjgpp*)
6966 # Override, as these systems have only a dummy fork() stub
6967 ac_cv_func_fork_works=no
6968 ;;
6969 *)
6970 ac_cv_func_fork_works=yes
6971 ;;
6972 esac
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6974$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6975fi
6976ac_cv_func_vfork_works=$ac_cv_func_vfork
6977if test "x$ac_cv_func_vfork" = xyes; then
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6979$as_echo_n "checking for working vfork... " >&6; }
6980if ${ac_cv_func_vfork_works+:} false; then :
6981 $as_echo_n "(cached) " >&6
6982else
6983 if test "$cross_compiling" = yes; then :
6984 ac_cv_func_vfork_works=cross
6985else
6986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6987/* end confdefs.h. */
6988/* Thanks to Paul Eggert for this test. */
6989$ac_includes_default
6990#include <sys/wait.h>
6991#ifdef HAVE_VFORK_H
6992# include <vfork.h>
6993#endif
6994/* On some sparc systems, changes by the child to local and incoming
6995 argument registers are propagated back to the parent. The compiler
6996 is told about this with #include <vfork.h>, but some compilers
6997 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6998 static variable whose address is put into a register that is
6999 clobbered by the vfork. */
7000static void
7001#ifdef __cplusplus
7002sparc_address_test (int arg)
7003# else
7004sparc_address_test (arg) int arg;
7005#endif
7006{
7007 static pid_t child;
7008 if (!child) {
7009 child = vfork ();
7010 if (child < 0) {
7011 perror ("vfork");
7012 _exit(2);
7013 }
7014 if (!child) {
7015 arg = getpid();
7016 write(-1, "", 0);
7017 _exit (arg);
7018 }
7019 }
7020}
7021
7022int
7023main ()
7024{
7025 pid_t parent = getpid ();
7026 pid_t child;
7027
7028 sparc_address_test (0);
7029
7030 child = vfork ();
7031
7032 if (child == 0) {
7033 /* Here is another test for sparc vfork register problems. This
7034 test uses lots of local variables, at least as many local
7035 variables as main has allocated so far including compiler
7036 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7037 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7038 reuse the register of parent for one of the local variables,
7039 since it will think that parent can't possibly be used any more
7040 in this routine. Assigning to the local variable will thus
7041 munge parent in the parent process. */
7042 pid_t
7043 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7044 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7045 /* Convince the compiler that p..p7 are live; otherwise, it might
7046 use the same hardware register for all 8 local variables. */
7047 if (p != p1 || p != p2 || p != p3 || p != p4
7048 || p != p5 || p != p6 || p != p7)
7049 _exit(1);
7050
7051 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7052 from child file descriptors. If the child closes a descriptor
7053 before it execs or exits, this munges the parent's descriptor
7054 as well. Test for this by closing stdout in the child. */
7055 _exit(close(fileno(stdout)) != 0);
7056 } else {
7057 int status;
7058 struct stat st;
7059
7060 while (wait(&status) != child)
7061 ;
7062 return (
7063 /* Was there some problem with vforking? */
7064 child < 0
7065
7066 /* Did the child fail? (This shouldn't happen.) */
7067 || status
7068
7069 /* Did the vfork/compiler bug occur? */
7070 || parent != getpid()
7071
7072 /* Did the file descriptor bug occur? */
7073 || fstat(fileno(stdout), &st) != 0
7074 );
7075 }
7076}
7077_ACEOF
7078if ac_fn_c_try_run "$LINENO"; then :
7079 ac_cv_func_vfork_works=yes
7080else
7081 ac_cv_func_vfork_works=no
7082fi
7083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7084 conftest.$ac_objext conftest.beam conftest.$ac_ext
7085fi
7086
7087fi
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
7089$as_echo "$ac_cv_func_vfork_works" >&6; }
7090
7091fi;
7092if test "x$ac_cv_func_fork_works" = xcross; then
7093 ac_cv_func_vfork_works=$ac_cv_func_vfork
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7095$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
7096fi
7097
7098if test "x$ac_cv_func_vfork_works" = xyes; then
7099
7100$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
7101
7102else
7103
7104$as_echo "#define vfork fork" >>confdefs.h
7105
7106fi
7107if test "x$ac_cv_func_fork_works" = xyes; then
7108
7109$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
7110
7111fi
7112
7113 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
7114 ptrace64 sbrk setns sigaltstack sigprocmask \
7115 setpgid setpgrp getrusage getauxval
7116do :
7117 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7118ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7119if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7120 cat >>confdefs.h <<_ACEOF
7121#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7122_ACEOF
7123
7124fi
7125done
7126
7127
7128 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
7129"
7130if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
7131 ac_have_decl=1
7132else
7133 ac_have_decl=0
7134fi
7135
7136cat >>confdefs.h <<_ACEOF
7137#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
7138_ACEOF
7139
7140
7141 if test "$cross_compiling" = yes; then :
7142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7143/* end confdefs.h. */
7144#include <sys/personality.h>
7145int
7146main ()
7147{
7148
7149 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
7150 # define ADDR_NO_RANDOMIZE 0x0040000
7151 # endif
7152 /* Test the flag could be set and stays set. */
7153 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
7154 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
7155 return 1
7156 ;
7157 return 0;
7158}
7159_ACEOF
7160if ac_fn_c_try_link "$LINENO"; then :
7161 have_personality=true
7162else
7163 have_personality=false
7164fi
7165rm -f core conftest.err conftest.$ac_objext \
7166 conftest$ac_exeext conftest.$ac_ext
7167else
7168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7169/* end confdefs.h. */
7170#include <sys/personality.h>
7171int
7172main ()
7173{
7174
7175 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
7176 # define ADDR_NO_RANDOMIZE 0x0040000
7177 # endif
7178 /* Test the flag could be set and stays set. */
7179 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
7180 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
7181 return 1
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186if ac_fn_c_try_run "$LINENO"; then :
7187 have_personality=true
7188else
7189 have_personality=false
7190fi
7191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7192 conftest.$ac_objext conftest.beam conftest.$ac_ext
7193fi
7194
7195 if $have_personality
7196 then
7197
7198$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
7199
7200 fi
7201
7202 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
7203if test "x$ac_cv_have_decl_strstr" = xyes; then :
7204 ac_have_decl=1
7205else
7206 ac_have_decl=0
7207fi
7208
7209cat >>confdefs.h <<_ACEOF
7210#define HAVE_DECL_STRSTR $ac_have_decl
7211_ACEOF
7212
7213
7214 # ----------------------- #
7215 # Checks for structures. #
7216 # ----------------------- #
7217
7218 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
7219if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7220
7221cat >>confdefs.h <<_ACEOF
7222#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7223_ACEOF
7224
7225
7226fi
7227ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
7228if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7229
7230cat >>confdefs.h <<_ACEOF
7231#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7232_ACEOF
7233
7234
7235fi
7236
7237
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7239$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7240if ${ac_cv_search_kinfo_getfile+:} false; then :
7241 $as_echo_n "(cached) " >&6
7242else
7243 ac_func_search_save_LIBS=$LIBS
7244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247/* Override any GCC internal prototype to avoid an error.
7248 Use char because int might match the return type of a GCC
7249 builtin and then its argument prototype would still apply. */
7250#ifdef __cplusplus
7251extern "C"
7252#endif
7253char kinfo_getfile ();
7254int
7255main ()
7256{
7257return kinfo_getfile ();
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262for ac_lib in '' util util-freebsd; do
7263 if test -z "$ac_lib"; then
7264 ac_res="none required"
7265 else
7266 ac_res=-l$ac_lib
7267 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7268 fi
7269 if ac_fn_c_try_link "$LINENO"; then :
7270 ac_cv_search_kinfo_getfile=$ac_res
7271fi
7272rm -f core conftest.err conftest.$ac_objext \
7273 conftest$ac_exeext
7274 if ${ac_cv_search_kinfo_getfile+:} false; then :
7275 break
7276fi
7277done
7278if ${ac_cv_search_kinfo_getfile+:} false; then :
7279
7280else
7281 ac_cv_search_kinfo_getfile=no
7282fi
7283rm conftest.$ac_ext
7284LIBS=$ac_func_search_save_LIBS
7285fi
7286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7287$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7288ac_res=$ac_cv_search_kinfo_getfile
7289if test "$ac_res" != no; then :
7290 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7291
7292$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7293
7294fi
7295
7296
7297 # Check for std::thread. This does not work on some platforms, like
7298 # mingw and DJGPP.
7299 ac_ext=cpp
7300ac_cpp='$CXXCPP $CPPFLAGS'
7301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7304
7305
7306
7307
7308
7309ac_ext=c
7310ac_cpp='$CPP $CPPFLAGS'
7311ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7312ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7313ac_compiler_gnu=$ac_cv_c_compiler_gnu
7314
7315ax_pthread_ok=no
7316
7317# We used to check for pthread.h first, but this fails if pthread.h
7318# requires special compiler flags (e.g. on Tru64 or Sequent).
7319# It gets checked for in the link test anyway.
7320
7321# First of all, check if the user has set any of the PTHREAD_LIBS,
5e030278
TT
7322# etcetera environment variables, and if threads linking works using
7323# them:
7324if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
7325 ax_pthread_save_CC="$CC"
7326 ax_pthread_save_CFLAGS="$CFLAGS"
7327 ax_pthread_save_LIBS="$LIBS"
05ea2a05
TT
7328 if test "x$PTHREAD_CC" != "x"; then :
7329 CC="$PTHREAD_CC"
7330fi
7331 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7332 LIBS="$PTHREAD_LIBS $LIBS"
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7334$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7336/* end confdefs.h. */
7337
7338/* Override any GCC internal prototype to avoid an error.
7339 Use char because int might match the return type of a GCC
7340 builtin and then its argument prototype would still apply. */
7341#ifdef __cplusplus
7342extern "C"
7343#endif
7344char pthread_join ();
7345int
7346main ()
7347{
7348return pthread_join ();
7349 ;
7350 return 0;
7351}
7352_ACEOF
7353if ac_fn_c_try_link "$LINENO"; then :
7354 ax_pthread_ok=yes
7355fi
7356rm -f core conftest.err conftest.$ac_objext \
7357 conftest$ac_exeext conftest.$ac_ext
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7359$as_echo "$ax_pthread_ok" >&6; }
7360 if test "x$ax_pthread_ok" = "xno"; then
7361 PTHREAD_LIBS=""
7362 PTHREAD_CFLAGS=""
7363 fi
7364 CC="$ax_pthread_save_CC"
7365 CFLAGS="$ax_pthread_save_CFLAGS"
7366 LIBS="$ax_pthread_save_LIBS"
7367fi
7368
7369# We must check for the threads library under a number of different
7370# names; the ordering is very important because some systems
7371# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7372# libraries is broken (non-POSIX).
7373
7374# Create a list of thread flags to try. Items starting with a "-" are
7375# C compiler flags, and other items are library names, except for "none"
7376# which indicates that we try without any flags at all, and "pthread-config"
7377# which is a program returning the flags for the Pth emulation library.
7378
7379ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
7380
7381# The ordering *is* (sometimes) important. Some notes on the
7382# individual items follow:
7383
7384# pthreads: AIX (must check this before -lpthread)
7385# none: in case threads are in libc; should be tried before -Kthread and
7386# other compiler flags to prevent continual compiler warnings
7387# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7388# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7389# (Note: HP C rejects this with "bad form for `-t' option")
7390# -pthreads: Solaris/gcc (Note: HP C also rejects)
7391# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7392# doesn't hurt to check since this sometimes defines pthreads and
7393# -D_REENTRANT too), HP C (must be checked before -lpthread, which
7394# is present but should not be used directly; and before -mthreads,
7395# because the compiler interprets this as "-mt" + "-hreads")
7396# -mthreads: Mingw32/gcc, Lynx/gcc
7397# pthread: Linux, etcetera
7398# --thread-safe: KAI C++
7399# pthread-config: use pthread-config program (for GNU Pth library)
7400
7401case $host_os in
7402
7403 freebsd*)
7404
7405 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7406 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7407
7408 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
7409 ;;
7410
7411 hpux*)
7412
7413 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7414 # multi-threading and also sets -lpthread."
7415
7416 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7417 ;;
7418
7419 openedition*)
7420
7421 # IBM z/OS requires a feature-test macro to be defined in order to
7422 # enable POSIX threads at all, so give the user a hint if this is
7423 # not set. (We don't define these ourselves, as they can affect
7424 # other portions of the system API in unpredictable ways.)
7425
7426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7427/* end confdefs.h. */
7428
7429# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7430 AX_PTHREAD_ZOS_MISSING
7431# endif
7432
7433_ACEOF
7434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7435 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7437$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7438fi
7439rm -f conftest*
7440
7441 ;;
7442
7443 solaris*)
7444
7445 # On Solaris (at least, for some versions), libc contains stubbed
7446 # (non-functional) versions of the pthreads routines, so link-based
7447 # tests will erroneously succeed. (N.B.: The stubs are missing
7448 # pthread_cleanup_push, or rather a function called by this macro,
7449 # so we could check for that, but who knows whether they'll stub
7450 # that too in a future libc.) So we'll check first for the
7451 # standard Solaris way of linking pthreads (-mt -lpthread).
7452
7453 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
7454 ;;
7455esac
7456
7457# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
7458
7459if test "x$GCC" = "xyes"; then :
7460 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
7461fi
7462
7463# The presence of a feature test macro requesting re-entrant function
7464# definitions is, on some systems, a strong hint that pthreads support is
7465# correctly enabled
7466
7467case $host_os in
7468 darwin* | hpux* | linux* | osf* | solaris*)
7469 ax_pthread_check_macro="_REENTRANT"
7470 ;;
7471
7472 aix*)
7473 ax_pthread_check_macro="_THREAD_SAFE"
7474 ;;
7475
7476 *)
7477 ax_pthread_check_macro="--"
7478 ;;
7479esac
7480if test "x$ax_pthread_check_macro" = "x--"; then :
7481 ax_pthread_check_cond=0
7482else
7483 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
7484fi
7485
7486# Are we compiling with Clang?
7487
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
7489$as_echo_n "checking whether $CC is Clang... " >&6; }
7490if ${ax_cv_PTHREAD_CLANG+:} false; then :
7491 $as_echo_n "(cached) " >&6
7492else
7493 ax_cv_PTHREAD_CLANG=no
7494 # Note that Autoconf sets GCC=yes for Clang as well as GCC
7495 if test "x$GCC" = "xyes"; then
7496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7497/* end confdefs.h. */
7498/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
7499# if defined(__clang__) && defined(__llvm__)
7500 AX_PTHREAD_CC_IS_CLANG
7501# endif
7502
7503_ACEOF
7504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7505 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
7506 ax_cv_PTHREAD_CLANG=yes
7507fi
7508rm -f conftest*
7509
7510 fi
7511
7512fi
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
7514$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
7515ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
7516
7517ax_pthread_clang_warning=no
7518
7519# Clang needs special handling, because older versions handle the -pthread
7520# option in a rather... idiosyncratic way
7521
7522if test "x$ax_pthread_clang" = "xyes"; then
7523
7524 # Clang takes -pthread; it has never supported any other flag
7525
7526 # (Note 1: This will need to be revisited if a system that Clang
7527 # supports has POSIX threads in a separate library. This tends not
7528 # to be the way of modern systems, but it's conceivable.)
7529
7530 # (Note 2: On some systems, notably Darwin, -pthread is not needed
7531 # to get POSIX threads support; the API is always present and
7532 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
7533 # -pthread does define _REENTRANT, and while the Darwin headers
7534 # ignore this macro, third-party headers might not.)
7535
7536 PTHREAD_CFLAGS="-pthread"
7537 PTHREAD_LIBS=
7538
7539 ax_pthread_ok=yes
7540
7541 # However, older versions of Clang make a point of warning the user
7542 # that, in an invocation where only linking and no compilation is
7543 # taking place, the -pthread option has no effect ("argument unused
7544 # during compilation"). They expect -pthread to be passed in only
7545 # when source code is being compiled.
7546 #
7547 # Problem is, this is at odds with the way Automake and most other
7548 # C build frameworks function, which is that the same flags used in
7549 # compilation (CFLAGS) are also used in linking. Many systems
7550 # supported by AX_PTHREAD require exactly this for POSIX threads
7551 # support, and in fact it is often not straightforward to specify a
7552 # flag that is used only in the compilation phase and not in
7553 # linking. Such a scenario is extremely rare in practice.
7554 #
7555 # Even though use of the -pthread flag in linking would only print
7556 # a warning, this can be a nuisance for well-run software projects
7557 # that build with -Werror. So if the active version of Clang has
7558 # this misfeature, we search for an option to squash it.
7559
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
7561$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
7562if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
7563 $as_echo_n "(cached) " >&6
7564else
7565 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
7566 # Create an alternate version of $ac_link that compiles and
7567 # links in two steps (.c -> .o, .o -> exe) instead of one
7568 # (.c -> exe), because the warning occurs only in the second
7569 # step
7570 ax_pthread_save_ac_link="$ac_link"
7571 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
7572 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
7573 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
7574 ax_pthread_save_CFLAGS="$CFLAGS"
7575 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
7576 if test "x$ax_pthread_try" = "xunknown"; then :
7577 break
7578fi
7579 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
7580 ac_link="$ax_pthread_save_ac_link"
7581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7582/* end confdefs.h. */
7583int main(void){return 0;}
7584_ACEOF
7585if ac_fn_c_try_link "$LINENO"; then :
7586 ac_link="$ax_pthread_2step_ac_link"
7587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7588/* end confdefs.h. */
7589int main(void){return 0;}
7590_ACEOF
7591if ac_fn_c_try_link "$LINENO"; then :
7592 break
7593fi
7594rm -f core conftest.err conftest.$ac_objext \
7595 conftest$ac_exeext conftest.$ac_ext
7596
7597fi
7598rm -f core conftest.err conftest.$ac_objext \
7599 conftest$ac_exeext conftest.$ac_ext
7600 done
7601 ac_link="$ax_pthread_save_ac_link"
7602 CFLAGS="$ax_pthread_save_CFLAGS"
7603 if test "x$ax_pthread_try" = "x"; then :
7604 ax_pthread_try=no
7605fi
7606 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
7607
7608fi
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
7610$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
7611
7612 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
7613 no | unknown) ;;
7614 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
7615 esac
7616
7617fi # $ax_pthread_clang = yes
7618
7619if test "x$ax_pthread_ok" = "xno"; then
7620for ax_pthread_try_flag in $ax_pthread_flags; do
7621
7622 case $ax_pthread_try_flag in
7623 none)
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7625$as_echo_n "checking whether pthreads work without any flags... " >&6; }
7626 ;;
7627
7628 -mt,pthread)
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7630$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7631 PTHREAD_CFLAGS="-mt"
7632 PTHREAD_LIBS="-lpthread"
7633 ;;
7634
7635 -*)
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
7637$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
7638 PTHREAD_CFLAGS="$ax_pthread_try_flag"
7639 ;;
7640
7641 pthread-config)
7642 # Extract the first word of "pthread-config", so it can be a program name with args.
7643set dummy pthread-config; ac_word=$2
7644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7645$as_echo_n "checking for $ac_word... " >&6; }
7646if ${ac_cv_prog_ax_pthread_config+:} false; then :
7647 $as_echo_n "(cached) " >&6
7648else
7649 if test -n "$ax_pthread_config"; then
7650 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
7651else
7652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653for as_dir in $PATH
7654do
7655 IFS=$as_save_IFS
7656 test -z "$as_dir" && as_dir=.
7657 for ac_exec_ext in '' $ac_executable_extensions; do
7658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7659 ac_cv_prog_ax_pthread_config="yes"
7660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7661 break 2
7662 fi
7663done
7664 done
7665IFS=$as_save_IFS
7666
7667 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
7668fi
7669fi
7670ax_pthread_config=$ac_cv_prog_ax_pthread_config
7671if test -n "$ax_pthread_config"; then
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
7673$as_echo "$ax_pthread_config" >&6; }
7674else
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676$as_echo "no" >&6; }
7677fi
7678
7679
7680 if test "x$ax_pthread_config" = "xno"; then :
7681 continue
7682fi
7683 PTHREAD_CFLAGS="`pthread-config --cflags`"
7684 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
7685 ;;
7686
7687 *)
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
7689$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
7690 PTHREAD_LIBS="-l$ax_pthread_try_flag"
7691 ;;
7692 esac
7693
7694 ax_pthread_save_CFLAGS="$CFLAGS"
7695 ax_pthread_save_LIBS="$LIBS"
7696 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7697 LIBS="$PTHREAD_LIBS $LIBS"
7698
7699 # Check for various functions. We must include pthread.h,
7700 # since some functions may be macros. (On the Sequent, we
7701 # need a special flag -Kthread to make this header compile.)
7702 # We check for pthread_join because it is in -lpthread on IRIX
7703 # while pthread_create is in libc. We check for pthread_attr_init
7704 # due to DEC craziness with -lpthreads. We check for
7705 # pthread_cleanup_push because it is one of the few pthread
7706 # functions on Solaris that doesn't have a non-functional libc stub.
7707 # We try pthread_create on general principles.
7708
7709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7710/* end confdefs.h. */
7711#include <pthread.h>
7712# if $ax_pthread_check_cond
7713# error "$ax_pthread_check_macro must be defined"
7714# endif
7715 static void routine(void *a) { a = 0; }
7716 static void *start_routine(void *a) { return a; }
7717int
7718main ()
7719{
7720pthread_t th; pthread_attr_t attr;
7721 pthread_create(&th, 0, start_routine, 0);
7722 pthread_join(th, 0);
7723 pthread_attr_init(&attr);
7724 pthread_cleanup_push(routine, 0);
7725 pthread_cleanup_pop(0) /* ; */
7726 ;
7727 return 0;
7728}
7729_ACEOF
7730if ac_fn_c_try_link "$LINENO"; then :
7731 ax_pthread_ok=yes
7732fi
7733rm -f core conftest.err conftest.$ac_objext \
7734 conftest$ac_exeext conftest.$ac_ext
7735
7736 CFLAGS="$ax_pthread_save_CFLAGS"
7737 LIBS="$ax_pthread_save_LIBS"
7738
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7740$as_echo "$ax_pthread_ok" >&6; }
7741 if test "x$ax_pthread_ok" = "xyes"; then :
7742 break
7743fi
7744
7745 PTHREAD_LIBS=""
7746 PTHREAD_CFLAGS=""
7747done
7748fi
7749
7750# Various other checks:
7751if test "x$ax_pthread_ok" = "xyes"; then
7752 ax_pthread_save_CFLAGS="$CFLAGS"
7753 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
7754 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7755 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
7756
7757 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
7759$as_echo_n "checking for joinable pthread attribute... " >&6; }
7760if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
7761 $as_echo_n "(cached) " >&6
7762else
7763 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
7764 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
7765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7766/* end confdefs.h. */
7767#include <pthread.h>
7768int
7769main ()
7770{
7771int attr = $ax_pthread_attr; return attr /* ; */
7772 ;
7773 return 0;
7774}
7775_ACEOF
7776if ac_fn_c_try_link "$LINENO"; then :
7777 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
7778fi
7779rm -f core conftest.err conftest.$ac_objext \
7780 conftest$ac_exeext conftest.$ac_ext
7781 done
7782
7783fi
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
7785$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
7786 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
7787 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
7788 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
7789
7790cat >>confdefs.h <<_ACEOF
7791#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
7792_ACEOF
7793
7794 ax_pthread_joinable_attr_defined=yes
7795
7796fi
7797
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
7799$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
7800if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
7801 $as_echo_n "(cached) " >&6
7802else
7803 ax_cv_PTHREAD_SPECIAL_FLAGS=no
7804 case $host_os in
7805 solaris*)
7806 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
7807 ;;
7808 esac
7809
7810fi
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
7812$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
7813 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
7814 test "x$ax_pthread_special_flags_added" != "xyes"; then :
7815 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
7816 ax_pthread_special_flags_added=yes
7817fi
7818
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
7820$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
7821if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
7822 $as_echo_n "(cached) " >&6
7823else
7824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825/* end confdefs.h. */
7826#include <pthread.h>
7827int
7828main ()
7829{
7830int i = PTHREAD_PRIO_INHERIT;
7831 ;
7832 return 0;
7833}
7834_ACEOF
7835if ac_fn_c_try_link "$LINENO"; then :
7836 ax_cv_PTHREAD_PRIO_INHERIT=yes
7837else
7838 ax_cv_PTHREAD_PRIO_INHERIT=no
7839fi
7840rm -f core conftest.err conftest.$ac_objext \
7841 conftest$ac_exeext conftest.$ac_ext
7842
7843fi
7844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
7845$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
7846 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
7847 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
7848
7849$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
7850
7851 ax_pthread_prio_inherit_defined=yes
7852
7853fi
7854
7855 CFLAGS="$ax_pthread_save_CFLAGS"
7856 LIBS="$ax_pthread_save_LIBS"
7857
7858 # More AIX lossage: compile with *_r variant
7859 if test "x$GCC" != "xyes"; then
7860 case $host_os in
7861 aix*)
7862 case "x/$CC" in #(
7863 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
7864 #handle absolute path differently from PATH based program lookup
7865 case "x$CC" in #(
7866 x/*) :
7867 if as_fn_executable_p ${CC}_r; then :
7868 PTHREAD_CC="${CC}_r"
7869fi ;; #(
7870 *) :
7871 for ac_prog in ${CC}_r
7872do
7873 # Extract the first word of "$ac_prog", so it can be a program name with args.
7874set dummy $ac_prog; ac_word=$2
7875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7876$as_echo_n "checking for $ac_word... " >&6; }
7877if ${ac_cv_prog_PTHREAD_CC+:} false; then :
7878 $as_echo_n "(cached) " >&6
7879else
7880 if test -n "$PTHREAD_CC"; then
7881 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
7882else
7883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886 IFS=$as_save_IFS
7887 test -z "$as_dir" && as_dir=.
7888 for ac_exec_ext in '' $ac_executable_extensions; do
7889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7890 ac_cv_prog_PTHREAD_CC="$ac_prog"
7891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7892 break 2
7893 fi
7894done
7895 done
7896IFS=$as_save_IFS
7897
7898fi
7899fi
7900PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
7901if test -n "$PTHREAD_CC"; then
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
7903$as_echo "$PTHREAD_CC" >&6; }
7904else
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7906$as_echo "no" >&6; }
7907fi
7908
7909
7910 test -n "$PTHREAD_CC" && break
7911done
7912test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7913 ;;
7914esac ;; #(
7915 *) :
7916 ;;
7917esac
7918 ;;
7919 esac
7920 fi
7921fi
7922
7923test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7924
7925
7926
7927
7928
7929# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
7930if test "x$ax_pthread_ok" = "xyes"; then
7931 threads=yes
7932 :
7933else
7934 ax_pthread_ok=no
7935 threads=no
7936fi
7937ac_ext=cpp
7938ac_cpp='$CXXCPP $CPPFLAGS'
7939ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7940ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7941ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7942
7943
7944 if test "$threads" = "yes"; then
7945 save_LIBS="$LIBS"
7946 LIBS="$PTHREAD_LIBS $LIBS"
7947 save_CXXFLAGS="$CXXFLAGS"
7948 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
7950$as_echo_n "checking for std::thread... " >&6; }
7951if ${gdb_cv_cxx_std_thread+:} false; then :
7952 $as_echo_n "(cached) " >&6
7953else
7954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7955/* end confdefs.h. */
7956#include <thread>
7957 void callback() { }
7958int
7959main ()
7960{
7961std::thread t(callback);
7962 ;
7963 return 0;
7964}
7965_ACEOF
7966if ac_fn_cxx_try_compile "$LINENO"; then :
7967 gdb_cv_cxx_std_thread=yes
7968else
7969 gdb_cv_cxx_std_thread=no
7970fi
7971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7972fi
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
7974$as_echo "$gdb_cv_cxx_std_thread" >&6; }
7975
7976 # This check must be here, while LIBS includes any necessary
7977 # threading library.
7978 for ac_func in pthread_sigmask pthread_setname_np
7979do :
7980 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7981ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
7982if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7983 cat >>confdefs.h <<_ACEOF
7984#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7985_ACEOF
7986
7987fi
7988done
7989
7990
7991 LIBS="$save_LIBS"
7992 CXXFLAGS="$save_CXXFLAGS"
7993 fi
7994 if test "$gdb_cv_cxx_std_thread" = "yes"; then
7995
7996$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
7997
7998 fi
7999 ac_ext=c
8000ac_cpp='$CPP $CPPFLAGS'
8001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8003ac_compiler_gnu=$ac_cv_c_compiler_gnu
8004
8005
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
8007$as_echo_n "checking for sigsetjmp... " >&6; }
8008if ${gdb_cv_func_sigsetjmp+:} false; then :
8009 $as_echo_n "(cached) " >&6
8010else
8011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278
TT
8012/* end confdefs.h. */
8013
05ea2a05
TT
8014 #include <setjmp.h>
8015
5e030278
TT
8016int
8017main ()
8018{
05ea2a05 8019sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
5e030278
TT
8020 ;
8021 return 0;
8022}
8023_ACEOF
05ea2a05
TT
8024if ac_fn_c_try_compile "$LINENO"; then :
8025 gdb_cv_func_sigsetjmp=yes
8026else
8027 gdb_cv_func_sigsetjmp=no
5e030278 8028fi
05ea2a05 8029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278 8030fi
05ea2a05
TT
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
8032$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
8033 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 8034
05ea2a05 8035$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 8036
05ea2a05 8037 fi
5e030278 8038
5e030278 8039
05ea2a05
TT
8040# Check whether --with-intel_pt was given.
8041if test "${with_intel_pt+set}" = set; then :
8042 withval=$with_intel_pt;
8043else
8044 with_intel_pt=auto
8045fi
5e030278 8046
05ea2a05
TT
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
8048$as_echo_n "checking whether to use intel pt... " >&6; }
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
8050$as_echo "$with_intel_pt" >&6; }
5e030278 8051
05ea2a05
TT
8052 if test "${with_intel_pt}" = no; then
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
8054$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
8055 HAVE_LIBIPT=no
8056 else
8057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278
TT
8058/* end confdefs.h. */
8059
05ea2a05
TT
8060 #include <linux/perf_event.h>
8061 #ifndef PERF_ATTR_SIZE_VER5
8062 # error
8063 #endif
5e030278
TT
8064
8065_ACEOF
05ea2a05
TT
8066if ac_fn_c_try_cpp "$LINENO"; then :
8067 perf_event=yes
8068else
8069 perf_event=no
5e030278 8070fi
05ea2a05
TT
8071rm -f conftest.err conftest.i conftest.$ac_ext
8072 if test "$perf_event" != yes; then
8073 if test "$with_intel_pt" = yes; then
8074 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
8075 else
8076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
8077$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
8078 fi
8079 fi
5e030278 8080
5e030278 8081
5e030278 8082
5e030278 8083
5e030278 8084
5e030278 8085
5e030278 8086
5e030278 8087
5e030278 8088
05ea2a05 8089 use_additional=yes
5e030278 8090
05ea2a05
TT
8091 acl_save_prefix="$prefix"
8092 prefix="$acl_final_prefix"
8093 acl_save_exec_prefix="$exec_prefix"
8094 exec_prefix="$acl_final_exec_prefix"
5e030278 8095
05ea2a05
TT
8096 eval additional_includedir=\"$includedir\"
8097 eval additional_libdir=\"$libdir\"
5e030278 8098
05ea2a05
TT
8099 exec_prefix="$acl_save_exec_prefix"
8100 prefix="$acl_save_prefix"
5e030278 8101
5e030278 8102
05ea2a05
TT
8103# Check whether --with-libipt-prefix was given.
8104if test "${with_libipt_prefix+set}" = set; then :
8105 withval=$with_libipt_prefix;
8106 if test "X$withval" = "Xno"; then
8107 use_additional=no
8108 else
8109 if test "X$withval" = "X"; then
5e030278 8110
05ea2a05
TT
8111 acl_save_prefix="$prefix"
8112 prefix="$acl_final_prefix"
8113 acl_save_exec_prefix="$exec_prefix"
8114 exec_prefix="$acl_final_exec_prefix"
5e030278 8115
05ea2a05
TT
8116 eval additional_includedir=\"$includedir\"
8117 eval additional_libdir=\"$libdir\"
5e030278 8118
05ea2a05
TT
8119 exec_prefix="$acl_save_exec_prefix"
8120 prefix="$acl_save_prefix"
5e030278 8121
05ea2a05
TT
8122 else
8123 additional_includedir="$withval/include"
8124 additional_libdir="$withval/lib"
8125 fi
8126 fi
5e030278 8127
05ea2a05 8128fi
5e030278 8129
9f1528a1
AB
8130
8131# Check whether --with-libipt-type was given.
8132if test "${with_libipt_type+set}" = set; then :
8133 withval=$with_libipt_type; with_libipt_type=$withval
8134else
8135 with_libipt_type=auto
8136fi
8137
8138 lib_type=`eval echo \$with_libipt_type`
8139
05ea2a05
TT
8140 LIBIPT=
8141 LTLIBIPT=
8142 INCIPT=
8143 rpathdirs=
8144 ltrpathdirs=
8145 names_already_handled=
8146 names_next_round='ipt '
8147 while test -n "$names_next_round"; do
8148 names_this_round="$names_next_round"
8149 names_next_round=
8150 for name in $names_this_round; do
8151 already_handled=
8152 for n in $names_already_handled; do
8153 if test "$n" = "$name"; then
8154 already_handled=yes
8155 break
8156 fi
8157 done
8158 if test -z "$already_handled"; then
8159 names_already_handled="$names_already_handled $name"
8160 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8161 eval value=\"\$HAVE_LIB$uppername\"
8162 if test -n "$value"; then
8163 if test "$value" = yes; then
8164 eval value=\"\$LIB$uppername\"
8165 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
8166 eval value=\"\$LTLIB$uppername\"
8167 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
8168 else
8169 :
8170 fi
8171 else
8172 found_dir=
8173 found_la=
8174 found_so=
8175 found_a=
8176 if test $use_additional = yes; then
9f1528a1 8177 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
8178 found_dir="$additional_libdir"
8179 found_so="$additional_libdir/lib$name.$shlibext"
8180 if test -f "$additional_libdir/lib$name.la"; then
8181 found_la="$additional_libdir/lib$name.la"
8182 fi
9f1528a1 8183 elif test x$lib_type != xshared; then
05ea2a05
TT
8184 if test -f "$additional_libdir/lib$name.$libext"; then
8185 found_dir="$additional_libdir"
8186 found_a="$additional_libdir/lib$name.$libext"
8187 if test -f "$additional_libdir/lib$name.la"; then
8188 found_la="$additional_libdir/lib$name.la"
8189 fi
8190 fi
8191 fi
8192 fi
8193 if test "X$found_dir" = "X"; then
8194 for x in $LDFLAGS $LTLIBIPT; do
8195
8196 acl_save_prefix="$prefix"
8197 prefix="$acl_final_prefix"
8198 acl_save_exec_prefix="$exec_prefix"
8199 exec_prefix="$acl_final_exec_prefix"
8200 eval x=\"$x\"
8201 exec_prefix="$acl_save_exec_prefix"
8202 prefix="$acl_save_prefix"
8203
8204 case "$x" in
8205 -L*)
8206 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8207 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
8208 found_dir="$dir"
8209 found_so="$dir/lib$name.$shlibext"
8210 if test -f "$dir/lib$name.la"; then
8211 found_la="$dir/lib$name.la"
8212 fi
9f1528a1 8213 elif test x$lib_type != xshared; then
05ea2a05
TT
8214 if test -f "$dir/lib$name.$libext"; then
8215 found_dir="$dir"
8216 found_a="$dir/lib$name.$libext"
8217 if test -f "$dir/lib$name.la"; then
8218 found_la="$dir/lib$name.la"
8219 fi
8220 fi
8221 fi
8222 ;;
8223 esac
8224 if test "X$found_dir" != "X"; then
8225 break
8226 fi
8227 done
8228 fi
8229 if test "X$found_dir" != "X"; then
8230 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
8231 if test "X$found_so" != "X"; then
8232 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8233 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8234 else
8235 haveit=
8236 for x in $ltrpathdirs; do
8237 if test "X$x" = "X$found_dir"; then
8238 haveit=yes
8239 break
8240 fi
8241 done
8242 if test -z "$haveit"; then
8243 ltrpathdirs="$ltrpathdirs $found_dir"
8244 fi
8245 if test "$hardcode_direct" = yes; then
8246 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8247 else
8248 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8249 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8250 haveit=
8251 for x in $rpathdirs; do
8252 if test "X$x" = "X$found_dir"; then
8253 haveit=yes
8254 break
8255 fi
8256 done
8257 if test -z "$haveit"; then
8258 rpathdirs="$rpathdirs $found_dir"
8259 fi
8260 else
8261 haveit=
8262 for x in $LDFLAGS $LIBIPT; do
8263
8264 acl_save_prefix="$prefix"
8265 prefix="$acl_final_prefix"
8266 acl_save_exec_prefix="$exec_prefix"
8267 exec_prefix="$acl_final_exec_prefix"
8268 eval x=\"$x\"
8269 exec_prefix="$acl_save_exec_prefix"
8270 prefix="$acl_save_prefix"
8271
8272 if test "X$x" = "X-L$found_dir"; then
8273 haveit=yes
8274 break
8275 fi
8276 done
8277 if test -z "$haveit"; then
8278 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
8279 fi
8280 if test "$hardcode_minus_L" != no; then
8281 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8282 else
8283 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8284 fi
8285 fi
8286 fi
8287 fi
8288 else
8289 if test "X$found_a" != "X"; then
8290 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
8291 else
8292 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
8293 fi
8294 fi
8295 additional_includedir=
8296 case "$found_dir" in
8297 */lib | */lib/)
8298 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8299 additional_includedir="$basedir/include"
8300 ;;
8301 esac
8302 if test "X$additional_includedir" != "X"; then
8303 if test "X$additional_includedir" != "X/usr/include"; then
8304 haveit=
8305 if test "X$additional_includedir" = "X/usr/local/include"; then
8306 if test -n "$GCC"; then
8307 case $host_os in
8308 linux*) haveit=yes;;
8309 esac
8310 fi
8311 fi
8312 if test -z "$haveit"; then
8313 for x in $CPPFLAGS $INCIPT; do
8314
8315 acl_save_prefix="$prefix"
8316 prefix="$acl_final_prefix"
8317 acl_save_exec_prefix="$exec_prefix"
8318 exec_prefix="$acl_final_exec_prefix"
8319 eval x=\"$x\"
8320 exec_prefix="$acl_save_exec_prefix"
8321 prefix="$acl_save_prefix"
8322
8323 if test "X$x" = "X-I$additional_includedir"; then
8324 haveit=yes
8325 break
8326 fi
8327 done
8328 if test -z "$haveit"; then
8329 if test -d "$additional_includedir"; then
8330 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
8331 fi
8332 fi
8333 fi
8334 fi
8335 fi
8336 if test -n "$found_la"; then
8337 save_libdir="$libdir"
8338 case "$found_la" in
8339 */* | *\\*) . "$found_la" ;;
8340 *) . "./$found_la" ;;
8341 esac
8342 libdir="$save_libdir"
8343 for dep in $dependency_libs; do
8344 case "$dep" in
8345 -L*)
8346 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8347 if test "X$additional_libdir" != "X/usr/lib"; then
8348 haveit=
8349 if test "X$additional_libdir" = "X/usr/local/lib"; then
8350 if test -n "$GCC"; then
8351 case $host_os in
8352 linux*) haveit=yes;;
8353 esac
8354 fi
8355 fi
8356 if test -z "$haveit"; then
8357 haveit=
8358 for x in $LDFLAGS $LIBIPT; do
8359
8360 acl_save_prefix="$prefix"
8361 prefix="$acl_final_prefix"
8362 acl_save_exec_prefix="$exec_prefix"
8363 exec_prefix="$acl_final_exec_prefix"
8364 eval x=\"$x\"
8365 exec_prefix="$acl_save_exec_prefix"
8366 prefix="$acl_save_prefix"
8367
8368 if test "X$x" = "X-L$additional_libdir"; then
8369 haveit=yes
8370 break
8371 fi
8372 done
8373 if test -z "$haveit"; then
8374 if test -d "$additional_libdir"; then
8375 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
8376 fi
8377 fi
8378 haveit=
8379 for x in $LDFLAGS $LTLIBIPT; do
8380
8381 acl_save_prefix="$prefix"
8382 prefix="$acl_final_prefix"
8383 acl_save_exec_prefix="$exec_prefix"
8384 exec_prefix="$acl_final_exec_prefix"
8385 eval x=\"$x\"
8386 exec_prefix="$acl_save_exec_prefix"
8387 prefix="$acl_save_prefix"
8388
8389 if test "X$x" = "X-L$additional_libdir"; then
8390 haveit=yes
8391 break
8392 fi
8393 done
8394 if test -z "$haveit"; then
8395 if test -d "$additional_libdir"; then
8396 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
8397 fi
8398 fi
8399 fi
8400 fi
8401 ;;
8402 -R*)
8403 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8404 if test "$enable_rpath" != no; then
8405 haveit=
8406 for x in $rpathdirs; do
8407 if test "X$x" = "X$dir"; then
8408 haveit=yes
8409 break
8410 fi
8411 done
8412 if test -z "$haveit"; then
8413 rpathdirs="$rpathdirs $dir"
8414 fi
8415 haveit=
8416 for x in $ltrpathdirs; do
8417 if test "X$x" = "X$dir"; then
8418 haveit=yes
8419 break
8420 fi
8421 done
8422 if test -z "$haveit"; then
8423 ltrpathdirs="$ltrpathdirs $dir"
8424 fi
8425 fi
8426 ;;
8427 -l*)
8428 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8429 ;;
8430 *.la)
8431 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8432 ;;
8433 *)
8434 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
8435 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
8436 ;;
8437 esac
8438 done
8439 fi
8440 else
9f1528a1
AB
8441 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8442 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8443 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
8444 else
8445 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
8446 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
8447 fi
05ea2a05
TT
8448 fi
8449 fi
8450 fi
8451 done
8452 done
8453 if test "X$rpathdirs" != "X"; then
8454 if test -n "$hardcode_libdir_separator"; then
8455 alldirs=
8456 for found_dir in $rpathdirs; do
8457 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8458 done
8459 acl_save_libdir="$libdir"
8460 libdir="$alldirs"
8461 eval flag=\"$hardcode_libdir_flag_spec\"
8462 libdir="$acl_save_libdir"
8463 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8464 else
8465 for found_dir in $rpathdirs; do
8466 acl_save_libdir="$libdir"
8467 libdir="$found_dir"
8468 eval flag=\"$hardcode_libdir_flag_spec\"
8469 libdir="$acl_save_libdir"
8470 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8471 done
8472 fi
8473 fi
8474 if test "X$ltrpathdirs" != "X"; then
8475 for found_dir in $ltrpathdirs; do
8476 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
8477 done
8478 fi
5e030278 8479
5e030278 8480
05ea2a05 8481 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 8482
05ea2a05
TT
8483 for element in $INCIPT; do
8484 haveit=
8485 for x in $CPPFLAGS; do
5e030278 8486
05ea2a05
TT
8487 acl_save_prefix="$prefix"
8488 prefix="$acl_final_prefix"
8489 acl_save_exec_prefix="$exec_prefix"
8490 exec_prefix="$acl_final_exec_prefix"
8491 eval x=\"$x\"
8492 exec_prefix="$acl_save_exec_prefix"
8493 prefix="$acl_save_prefix"
8494
8495 if test "X$x" = "X$element"; then
8496 haveit=yes
8497 break
8498 fi
8499 done
8500 if test -z "$haveit"; then
8501 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8502 fi
8503 done
8504
8505
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
8507$as_echo_n "checking for libipt... " >&6; }
8508if ${ac_cv_libipt+:} false; then :
8509 $as_echo_n "(cached) " >&6
8510else
8511
8512 ac_save_LIBS="$LIBS"
8513 LIBS="$LIBS $LIBIPT"
8514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 8515/* end confdefs.h. */
05ea2a05
TT
8516#include "intel-pt.h"
8517int
8518main ()
8519{
8520pt_insn_alloc_decoder (0);
8521 ;
8522 return 0;
8523}
5e030278
TT
8524_ACEOF
8525if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
8526 ac_cv_libipt=yes
8527else
8528 ac_cv_libipt=no
5e030278
TT
8529fi
8530rm -f core conftest.err conftest.$ac_objext \
8531 conftest$ac_exeext conftest.$ac_ext
05ea2a05 8532 LIBS="$ac_save_LIBS"
5e030278
TT
8533
8534fi
05ea2a05
TT
8535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
8536$as_echo "$ac_cv_libipt" >&6; }
8537 if test "$ac_cv_libipt" = yes; then
8538 HAVE_LIBIPT=yes
5e030278 8539
05ea2a05 8540$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
5e030278 8541
05ea2a05
TT
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
8543$as_echo_n "checking how to link with libipt... " >&6; }
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
8545$as_echo "$LIBIPT" >&6; }
8546 else
8547 HAVE_LIBIPT=no
8548 CPPFLAGS="$ac_save_CPPFLAGS"
8549 LIBIPT=
8550 LTLIBIPT=
8551 fi
5e030278 8552
5e030278 8553
5e030278 8554
5e030278 8555
5e030278 8556
5e030278 8557
05ea2a05
TT
8558 if test "$HAVE_LIBIPT" != yes; then
8559 if test "$with_intel_pt" = yes; then
8560 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
8561 else
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
8563$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
8564 fi
8565 else
8566 save_LIBS=$LIBS
8567 LIBS="$LIBS $LIBIPT"
8568 for ac_func in pt_insn_event
8569do :
8570 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
8571if test "x$ac_cv_func_pt_insn_event" = xyes; then :
8572 cat >>confdefs.h <<_ACEOF
8573#define HAVE_PT_INSN_EVENT 1
8574_ACEOF
5e030278 8575
5e030278 8576fi
05ea2a05
TT
8577done
8578
8579 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
8580"
8581if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
8582
8583cat >>confdefs.h <<_ACEOF
8584#define HAVE_STRUCT_PT_INSN_ENABLED 1
8585_ACEOF
5e030278
TT
8586
8587
5e030278 8588fi
05ea2a05
TT
8589ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
8590"
8591if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
5e030278 8592
05ea2a05
TT
8593cat >>confdefs.h <<_ACEOF
8594#define HAVE_STRUCT_PT_INSN_RESYNCED 1
8595_ACEOF
5e030278 8596
5e030278 8597
05ea2a05 8598fi
5e030278 8599
05ea2a05
TT
8600 LIBS=$save_LIBS
8601 fi
8602 fi
8603
8604 if test "$ac_cv_header_sys_procfs_h" = yes; then
8605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
8606$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
8607 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
8608 $as_echo_n "(cached) " >&6
8609else
8610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 8611/* end confdefs.h. */
05ea2a05
TT
8612
8613#define _SYSCALL32
8614/* Needed for new procfs interface on sparc-solaris. */
8615#define _STRUCTURED_PROC 1
8616#include <sys/procfs.h>
5e030278
TT
8617int
8618main ()
8619{
05ea2a05 8620gregset_t avar
5e030278
TT
8621 ;
8622 return 0;
8623}
8624_ACEOF
05ea2a05
TT
8625if ac_fn_c_try_compile "$LINENO"; then :
8626 bfd_cv_have_sys_procfs_type_gregset_t=yes
8627else
8628 bfd_cv_have_sys_procfs_type_gregset_t=no
5e030278 8629
5e030278 8630fi
05ea2a05 8631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
8632fi
8633
05ea2a05 8634 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5e030278 8635
05ea2a05
TT
8636$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
8637
8638 fi
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
8640$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
8641
8642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
8643$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
8644 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
5e030278
TT
8645 $as_echo_n "(cached) " >&6
8646else
05ea2a05 8647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 8648/* end confdefs.h. */
05ea2a05
TT
8649
8650#define _SYSCALL32
8651/* Needed for new procfs interface on sparc-solaris. */
8652#define _STRUCTURED_PROC 1
8653#include <sys/procfs.h>
5e030278
TT
8654int
8655main ()
8656{
05ea2a05 8657fpregset_t avar
5e030278
TT
8658 ;
8659 return 0;
8660}
8661_ACEOF
05ea2a05 8662if ac_fn_c_try_compile "$LINENO"; then :
db6878ac
SM
8663 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8664else
8665 bfd_cv_have_sys_procfs_type_fpregset_t=no
8666
8667fi
8668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8669fi
8670
8671 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8672
8673$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
8674
8675 fi
8676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
8677$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
8678
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
8680$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
8681 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
8682 $as_echo_n "(cached) " >&6
8683else
8684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8685/* end confdefs.h. */
8686
8687#define _SYSCALL32
8688/* Needed for new procfs interface on sparc-solaris. */
8689#define _STRUCTURED_PROC 1
8690#include <sys/procfs.h>
8691int
8692main ()
8693{
8694prgregset_t avar
8695 ;
8696 return 0;
8697}
8698_ACEOF
8699if ac_fn_c_try_compile "$LINENO"; then :
8700 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8701else
8702 bfd_cv_have_sys_procfs_type_prgregset_t=no
8703
8704fi
8705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8706fi
8707
8708 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8709
8710$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
8711
8712 fi
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
8714$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
8715
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
8717$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
8718 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
8719 $as_echo_n "(cached) " >&6
8720else
8721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8722/* end confdefs.h. */
8723
8724#define _SYSCALL32
8725/* Needed for new procfs interface on sparc-solaris. */
8726#define _STRUCTURED_PROC 1
8727#include <sys/procfs.h>
8728int
8729main ()
8730{
8731prfpregset_t avar
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736if ac_fn_c_try_compile "$LINENO"; then :
8737 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8738else
8739 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8740
8741fi
8742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8743fi
8744
8745 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8746
8747$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
8748
8749 fi
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
8751$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
8752
8753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
8754$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
8755 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
8756 $as_echo_n "(cached) " >&6
8757else
8758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8759/* end confdefs.h. */
8760
8761#define _SYSCALL32
8762/* Needed for new procfs interface on sparc-solaris. */
8763#define _STRUCTURED_PROC 1
8764#include <sys/procfs.h>
8765int
8766main ()
8767{
8768prgregset32_t avar
8769 ;
8770 return 0;
8771}
8772_ACEOF
8773if ac_fn_c_try_compile "$LINENO"; then :
8774 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8775else
8776 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8777
8778fi
8779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8780fi
8781
8782 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8783
8784$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
8785
8786 fi
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
8788$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
8789
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
8791$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
8792 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
8793 $as_echo_n "(cached) " >&6
8794else
8795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8796/* end confdefs.h. */
8797
8798#define _SYSCALL32
8799/* Needed for new procfs interface on sparc-solaris. */
8800#define _STRUCTURED_PROC 1
8801#include <sys/procfs.h>
8802int
8803main ()
8804{
8805lwpid_t avar
8806 ;
8807 return 0;
8808}
8809_ACEOF
8810if ac_fn_c_try_compile "$LINENO"; then :
8811 bfd_cv_have_sys_procfs_type_lwpid_t=yes
05ea2a05 8812else
db6878ac 8813 bfd_cv_have_sys_procfs_type_lwpid_t=no
5e030278
TT
8814
8815fi
05ea2a05
TT
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8817fi
5e030278 8818
db6878ac 8819 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5e030278 8820
db6878ac 8821$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
5e030278 8822
05ea2a05 8823 fi
db6878ac
SM
8824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
8825$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
5e030278 8826
db6878ac
SM
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
8828$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
8829 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
5e030278
TT
8830 $as_echo_n "(cached) " >&6
8831else
05ea2a05
TT
8832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8833/* end confdefs.h. */
5e030278 8834
05ea2a05
TT
8835#define _SYSCALL32
8836/* Needed for new procfs interface on sparc-solaris. */
8837#define _STRUCTURED_PROC 1
8838#include <sys/procfs.h>
8839int
8840main ()
8841{
db6878ac 8842psaddr_t avar
05ea2a05
TT
8843 ;
8844 return 0;
8845}
8846_ACEOF
8847if ac_fn_c_try_compile "$LINENO"; then :
db6878ac 8848 bfd_cv_have_sys_procfs_type_psaddr_t=yes
05ea2a05 8849else
db6878ac 8850 bfd_cv_have_sys_procfs_type_psaddr_t=no
05ea2a05
TT
8851
8852fi
8853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
8854fi
8855
db6878ac 8856 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
05ea2a05 8857
db6878ac 8858$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
05ea2a05
TT
8859
8860 fi
db6878ac
SM
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
8862$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
05ea2a05 8863
db6878ac
SM
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
8865$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
8866 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
5e030278
TT
8867 $as_echo_n "(cached) " >&6
8868else
8869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870/* end confdefs.h. */
05ea2a05
TT
8871
8872#define _SYSCALL32
8873/* Needed for new procfs interface on sparc-solaris. */
8874#define _STRUCTURED_PROC 1
8875#include <sys/procfs.h>
5e030278
TT
8876int
8877main ()
8878{
db6878ac 8879elf_fpregset_t avar
5e030278
TT
8880 ;
8881 return 0;
8882}
8883_ACEOF
05ea2a05 8884if ac_fn_c_try_compile "$LINENO"; then :
db6878ac 8885 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
5e030278 8886else
db6878ac 8887 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
5e030278
TT
8888
8889fi
05ea2a05
TT
8890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8891fi
5e030278 8892
db6878ac 8893 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
5e030278 8894
db6878ac 8895$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
5e030278 8896
05ea2a05 8897 fi
db6878ac
SM
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
8899$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
5e030278 8900
db6878ac
SM
8901 fi
8902
8903
8904
8905# Check whether we will enable the inclusion of unit tests when
8906# compiling GDB.
8907#
8908# The default value of this option changes depending whether we're on
8909# development mode (in which case it's "true") or not (in which case
8910# it's "false"). The $development variable is set by the GDB_AC_COMMON
8911# macro, which must therefore be used before GDB_AC_SELFTEST.
8912
8913if test "x$development" != xtrue && test "x$development" != xfalse; then :
8914 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
8915fi
8916
8917# Check whether --enable-unit-tests was given.
8918if test "${enable_unit_tests+set}" = set; then :
8919 enableval=$enable_unit_tests; case "${enableval}" in
8920 yes) enable_unittests=true ;;
8921 no) enable_unittests=false ;;
8922 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
8923esac
8924else
8925 enable_unittests=$development
8926fi
8927
8928
8929if $enable_unittests; then
8930
8931$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
8932
8933
8934 srv_selftest_objs="gdbsupport/selftest.o"
8935
8936fi
8937
8938
8939 case ${build_alias} in
8940 "") build_noncanonical=${build} ;;
8941 *) build_noncanonical=${build_alias} ;;
8942esac
8943
8944 case ${host_alias} in
8945 "") host_noncanonical=${build_noncanonical} ;;
8946 *) host_noncanonical=${host_alias} ;;
8947esac
8948
8949 case ${target_alias} in
8950 "") target_noncanonical=${host_noncanonical} ;;
8951 *) target_noncanonical=${target_alias} ;;
8952esac
8953
8954
8955
8956
8957
8958
8959# Dependency checking.
8960rm -rf .tst 2>/dev/null
8961mkdir .tst 2>/dev/null
8962if test -d .tst; then
8963 am__leading_dot=.
8964else
8965 am__leading_dot=_
8966fi
8967rmdir .tst 2>/dev/null
8968
8969DEPDIR="${am__leading_dot}deps"
8970
8971ac_config_commands="$ac_config_commands depdir"
8972
8973
8974
9a665d62
TT
8975# If we haven't got the data from the intl directory,
8976# assume NLS is disabled.
8977USE_NLS=no
8978LIBINTL=
8979LIBINTL_DEP=
8980INCINTL=
8981XGETTEXT=
8982GMSGFMT=
8983POSUB=
8984
8985if test -f ../intl/config.intl; then
8986 . ../intl/config.intl
8987fi
8988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
8989$as_echo_n "checking whether NLS is requested... " >&6; }
8990if test x"$USE_NLS" != xyes; then
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
8993else
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8995$as_echo "yes" >&6; }
8996
8997$as_echo "#define ENABLE_NLS 1" >>confdefs.h
8998
8999
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
9001$as_echo_n "checking for catalogs to be installed... " >&6; }
9002 # Look for .po and .gmo files in the source directory.
9003 CATALOGS=
9004 XLINGUAS=
9005 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
9006 # If there aren't any .gmo files the shell will give us the
9007 # literal string "../path/to/srcdir/po/*.gmo" which has to be
9008 # weeded out.
9009 case "$cat" in *\**)
9010 continue;;
9011 esac
9012 # The quadruple backslash is collapsed to a double backslash
9013 # by the backticks, then collapsed again by the double quotes,
9014 # leaving us with one backslash in the sed expression (right
9015 # before the dot that mustn't act as a wildcard).
9016 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
9017 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
9018 # The user is allowed to set LINGUAS to a list of languages to
9019 # install catalogs for. If it's empty that means "all of them."
9020 if test "x$LINGUAS" = x; then
9021 CATALOGS="$CATALOGS $cat"
9022 XLINGUAS="$XLINGUAS $lang"
9023 else
9024 case "$LINGUAS" in *$lang*)
9025 CATALOGS="$CATALOGS $cat"
9026 XLINGUAS="$XLINGUAS $lang"
9027 ;;
9028 esac
9029 fi
9030 done
9031 LINGUAS="$XLINGUAS"
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
9033$as_echo "$LINGUAS" >&6; }
9034
9035
9036 DATADIRNAME=share
9037
9038 INSTOBJEXT=.mo
9039
9040 GENCAT=gencat
9041
9042 CATOBJEXT=.gmo
9043
9044fi
9045
db6878ac
SM
9046# Create sub-directories for objects and dependencies.
9047CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
9048
9049
9050ac_config_commands="$ac_config_commands gdbdepdir"
9051
9052
9053depcc="$CC" am_compiler_list=
9054
9055am_depcomp=$ac_aux_dir/depcomp
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
9057$as_echo_n "checking dependency style of $depcc... " >&6; }
9058if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5e030278
TT
9059 $as_echo_n "(cached) " >&6
9060else
db6878ac
SM
9061 if test -f "$am_depcomp"; then
9062 # We make a subdir and do the tests there. Otherwise we can end up
9063 # making bogus files that we don't know about and never remove. For
9064 # instance it was reported that on HP-UX the gcc test will end up
9065 # making a dummy file named `D' -- because `-MD' means `put the output
9066 # in D'.
9067 mkdir conftest.dir
9068 # Copy depcomp to subdir because otherwise we won't find it if we're
9069 # using a relative directory.
9070 cp "$am_depcomp" conftest.dir
9071 cd conftest.dir
9072 # We will build objects and dependencies in a subdirectory because
9073 # it helps to detect inapplicable dependency modes. For instance
9074 # both Tru64's cc and ICC support -MD to output dependencies as a
9075 # side effect of compilation, but ICC will put the dependencies in
9076 # the current directory while Tru64 will put them in the object
9077 # directory.
9078 mkdir sub
05ea2a05 9079
db6878ac
SM
9080 am_cv_CC_dependencies_compiler_type=none
9081 if test "$am_compiler_list" = ""; then
9082 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9083 fi
9084 for depmode in $am_compiler_list; do
9085 if test $depmode = none; then break; fi
9086
9087 $as_echo "$as_me:$LINENO: trying $depmode" >&5
9088 # Setup a source with many dependencies, because some compilers
9089 # like to wrap large dependency lists on column 80 (with \), and
9090 # we should not choose a depcomp mode which is confused by this.
9091 #
9092 # We need to recreate these files for each test, as the compiler may
9093 # overwrite some of them when testing with obscure command lines.
9094 # This happens at least with the AIX C compiler.
9095 : > sub/conftest.c
9096 for i in 1 2 3 4 5 6; do
9097 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9098 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9099 # Solaris 8's {/usr,}/bin/sh.
9100 touch sub/conftst$i.h
9101 done
9102 echo "include sub/conftest.Po" > confmf
9103
9104 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9105 # mode. It turns out that the SunPro C++ compiler does not properly
9106 # handle `-M -o', and we need to detect this.
9107 depcmd="depmode=$depmode \
9108 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9109 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9110 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
9111 echo "| $depcmd" | sed -e 's/ */ /g' >&5
9112 if env $depcmd > conftest.err 2>&1 &&
9113 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
9114 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
9115 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
9116 # icc doesn't choke on unknown options, it will just issue warnings
9117 # or remarks (even with -Werror). So we grep stderr for any message
9118 # that says an option was ignored or not supported.
9119 # When given -MP, icc 7.0 and 7.1 complain thusly:
9120 # icc: Command line warning: ignoring option '-M'; no argument required
9121 # The diagnosis changed in icc 8.0:
9122 # icc: Command line remark: option '-MP' not supported
9123 if (grep 'ignoring option' conftest.err ||
9124 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9125 am_cv_CC_dependencies_compiler_type=$depmode
9126 $as_echo "$as_me:$LINENO: success" >&5
9127 break
9128 fi
9129 fi
9130 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
9131 sed -e 's/^/| /' < conftest.err >&5
9132 done
9133
9134 cd ..
9135 rm -rf conftest.dir
9136else
9137 am_cv_CC_dependencies_compiler_type=none
9138fi
9139
9140fi
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
9142$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
9143if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
9144then as_fn_error $? "no usable dependency style found" "$LINENO" 5
9145else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
9146
9147fi
9148
9149
9150for 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
9151do :
9152 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9153ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9154if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9155 cat >>confdefs.h <<_ACEOF
9156#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9157_ACEOF
9158
9159fi
9160
9161done
9162
9163for ac_header in vfork.h
9164do :
9165 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9166if test "x$ac_cv_header_vfork_h" = xyes; then :
9167 cat >>confdefs.h <<_ACEOF
9168#define HAVE_VFORK_H 1
05ea2a05 9169_ACEOF
5e030278 9170
5e030278
TT
9171fi
9172
db6878ac 9173done
5e030278 9174
db6878ac
SM
9175for ac_func in fork vfork
9176do :
9177 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9178ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9179if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9180 cat >>confdefs.h <<_ACEOF
9181#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9182_ACEOF
5e030278 9183
db6878ac
SM
9184fi
9185done
5e030278 9186
db6878ac
SM
9187if test "x$ac_cv_func_fork" = xyes; then
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9189$as_echo_n "checking for working fork... " >&6; }
9190if ${ac_cv_func_fork_works+:} false; then :
05ea2a05 9191 $as_echo_n "(cached) " >&6
db6878ac
SM
9192else
9193 if test "$cross_compiling" = yes; then :
9194 ac_cv_func_fork_works=cross
05ea2a05
TT
9195else
9196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9197/* end confdefs.h. */
db6878ac 9198$ac_includes_default
05ea2a05
TT
9199int
9200main ()
9201{
db6878ac
SM
9202
9203 /* By Ruediger Kuhlmann. */
9204 return fork () < 0;
9205
05ea2a05
TT
9206 ;
9207 return 0;
9208}
9209_ACEOF
db6878ac
SM
9210if ac_fn_c_try_run "$LINENO"; then :
9211 ac_cv_func_fork_works=yes
05ea2a05 9212else
db6878ac 9213 ac_cv_func_fork_works=no
05ea2a05 9214fi
db6878ac
SM
9215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9216 conftest.$ac_objext conftest.beam conftest.$ac_ext
05ea2a05 9217fi
5e030278 9218
db6878ac
SM
9219fi
9220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9221$as_echo "$ac_cv_func_fork_works" >&6; }
5e030278 9222
db6878ac
SM
9223else
9224 ac_cv_func_fork_works=$ac_cv_func_fork
9225fi
9226if test "x$ac_cv_func_fork_works" = xcross; then
9227 case $host in
9228 *-*-amigaos* | *-*-msdosdjgpp*)
9229 # Override, as these systems have only a dummy fork() stub
9230 ac_cv_func_fork_works=no
9231 ;;
9232 *)
9233 ac_cv_func_fork_works=yes
9234 ;;
9235 esac
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9237$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
9238fi
9239ac_cv_func_vfork_works=$ac_cv_func_vfork
9240if test "x$ac_cv_func_vfork" = xyes; then
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9242$as_echo_n "checking for working vfork... " >&6; }
9243if ${ac_cv_func_vfork_works+:} false; then :
5e030278 9244 $as_echo_n "(cached) " >&6
db6878ac
SM
9245else
9246 if test "$cross_compiling" = yes; then :
9247 ac_cv_func_vfork_works=cross
5e030278
TT
9248else
9249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9250/* end confdefs.h. */
db6878ac
SM
9251/* Thanks to Paul Eggert for this test. */
9252$ac_includes_default
9253#include <sys/wait.h>
9254#ifdef HAVE_VFORK_H
9255# include <vfork.h>
9256#endif
9257/* On some sparc systems, changes by the child to local and incoming
9258 argument registers are propagated back to the parent. The compiler
9259 is told about this with #include <vfork.h>, but some compilers
9260 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9261 static variable whose address is put into a register that is
9262 clobbered by the vfork. */
9263static void
9264#ifdef __cplusplus
9265sparc_address_test (int arg)
9266# else
9267sparc_address_test (arg) int arg;
9268#endif
9269{
9270 static pid_t child;
9271 if (!child) {
9272 child = vfork ();
9273 if (child < 0) {
9274 perror ("vfork");
9275 _exit(2);
9276 }
9277 if (!child) {
9278 arg = getpid();
9279 write(-1, "", 0);
9280 _exit (arg);
9281 }
9282 }
9283}
05ea2a05 9284
5e030278
TT
9285int
9286main ()
9287{
db6878ac
SM
9288 pid_t parent = getpid ();
9289 pid_t child;
9290
9291 sparc_address_test (0);
9292
9293 child = vfork ();
9294
9295 if (child == 0) {
9296 /* Here is another test for sparc vfork register problems. This
9297 test uses lots of local variables, at least as many local
9298 variables as main has allocated so far including compiler
9299 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9300 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9301 reuse the register of parent for one of the local variables,
9302 since it will think that parent can't possibly be used any more
9303 in this routine. Assigning to the local variable will thus
9304 munge parent in the parent process. */
9305 pid_t
9306 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9307 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9308 /* Convince the compiler that p..p7 are live; otherwise, it might
9309 use the same hardware register for all 8 local variables. */
9310 if (p != p1 || p != p2 || p != p3 || p != p4
9311 || p != p5 || p != p6 || p != p7)
9312 _exit(1);
9313
9314 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9315 from child file descriptors. If the child closes a descriptor
9316 before it execs or exits, this munges the parent's descriptor
9317 as well. Test for this by closing stdout in the child. */
9318 _exit(close(fileno(stdout)) != 0);
9319 } else {
9320 int status;
9321 struct stat st;
9322
9323 while (wait(&status) != child)
9324 ;
9325 return (
9326 /* Was there some problem with vforking? */
9327 child < 0
9328
9329 /* Did the child fail? (This shouldn't happen.) */
9330 || status
9331
9332 /* Did the vfork/compiler bug occur? */
9333 || parent != getpid()
9334
9335 /* Did the file descriptor bug occur? */
9336 || fstat(fileno(stdout), &st) != 0
9337 );
9338 }
5e030278
TT
9339}
9340_ACEOF
db6878ac
SM
9341if ac_fn_c_try_run "$LINENO"; then :
9342 ac_cv_func_vfork_works=yes
5e030278 9343else
db6878ac 9344 ac_cv_func_vfork_works=no
5e030278 9345fi
db6878ac
SM
9346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9347 conftest.$ac_objext conftest.beam conftest.$ac_ext
5e030278 9348fi
5e030278 9349
db6878ac
SM
9350fi
9351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9352$as_echo "$ac_cv_func_vfork_works" >&6; }
5e030278 9353
db6878ac
SM
9354fi;
9355if test "x$ac_cv_func_fork_works" = xcross; then
9356 ac_cv_func_vfork_works=$ac_cv_func_vfork
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9358$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9359fi
5e030278 9360
db6878ac 9361if test "x$ac_cv_func_vfork_works" = xyes; then
5e030278 9362
db6878ac 9363$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
e9bcb658 9364
e9bcb658 9365else
db6878ac
SM
9366
9367$as_echo "#define vfork fork" >>confdefs.h
05ea2a05 9368
e9bcb658 9369fi
db6878ac 9370if test "x$ac_cv_func_fork_works" = xyes; then
e9bcb658 9371
db6878ac 9372$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
05ea2a05 9373
db6878ac 9374fi
05ea2a05 9375
db6878ac
SM
9376for ac_func in pread pwrite pread64
9377do :
9378 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9379ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9380if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9381 cat >>confdefs.h <<_ACEOF
9382#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9383_ACEOF
e9bcb658 9384
db6878ac
SM
9385fi
9386done
e9bcb658 9387
3266f10b 9388
eb7aa561
PA
9389# Check the return and argument types of ptrace.
9390
9391
9392for ac_header in sys/ptrace.h ptrace.h
9393do :
9394 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9395ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 9396if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb7aa561
PA
9397 cat >>confdefs.h <<_ACEOF
9398#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9399_ACEOF
9400
9401fi
9402
9403done
9404
9405
9406gdb_ptrace_headers='
9407#include <sys/types.h>
9408#if HAVE_SYS_PTRACE_H
9409# include <sys/ptrace.h>
9410#endif
9411#if HAVE_UNISTD_H
9412# include <unistd.h>
9413#endif
9414'
9415# There is no point in checking if we don't have a prototype.
9b30624b 9416ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
eb7aa561 9417"
d0ac1c44 9418if test "x$ac_cv_have_decl_ptrace" = xyes; then :
eb7aa561
PA
9419 ac_have_decl=1
9420else
9421 ac_have_decl=0
9422fi
9423
9424cat >>confdefs.h <<_ACEOF
9425#define HAVE_DECL_PTRACE $ac_have_decl
9426_ACEOF
9427if test $ac_have_decl = 1; then :
9428
9429else
9430
9431 : ${gdb_cv_func_ptrace_ret='int'}
9432 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
9433
9434fi
9435
9436# Check return type. Varargs (used on GNU/Linux) conflict with the
9437# empty argument list, so check for that explicitly.
9438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
9439$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 9440if ${gdb_cv_func_ptrace_ret+:} false; then :
eb7aa561
PA
9441 $as_echo_n "(cached) " >&6
9442else
9443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9444/* end confdefs.h. */
9445$gdb_ptrace_headers
9446int
9447main ()
9448{
9449extern long ptrace (enum __ptrace_request, ...);
9450 ;
9451 return 0;
9452}
9453_ACEOF
9b30624b 9454if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9455 gdb_cv_func_ptrace_ret='long'
9456else
9457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9458/* end confdefs.h. */
9459$gdb_ptrace_headers
9460int
9461main ()
9462{
9463extern int ptrace ();
9464 ;
9465 return 0;
9466}
9467_ACEOF
9b30624b 9468if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9469 gdb_cv_func_ptrace_ret='int'
9470else
9471 gdb_cv_func_ptrace_ret='long'
9472fi
9473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9474fi
9475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9476fi
9477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
9478$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
9479
9480cat >>confdefs.h <<_ACEOF
9481#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
9482_ACEOF
9483
9484# Check argument types.
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
9486$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 9487if ${gdb_cv_func_ptrace_args+:} false; then :
eb7aa561
PA
9488 $as_echo_n "(cached) " >&6
9489else
9490
9491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9492/* end confdefs.h. */
9493$gdb_ptrace_headers
9494int
9495main ()
9496{
9497extern long ptrace (enum __ptrace_request, ...);
9498 ;
9499 return 0;
9500}
9501_ACEOF
9b30624b 9502if ac_fn_c_try_compile "$LINENO"; then :
54019719 9503 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
eb7aa561
PA
9504else
9505
9506for gdb_arg1 in 'int' 'long'; do
9507 for gdb_arg2 in 'pid_t' 'int' 'long'; do
9508 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
9509 for gdb_arg4 in 'int' 'long' 'void *'; do
9510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9511/* end confdefs.h. */
9512$gdb_ptrace_headers
9513int
9514main ()
9515{
9516
9517extern $gdb_cv_func_ptrace_ret
9518 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
9519
9520 ;
9521 return 0;
9522}
9523_ACEOF
9b30624b 9524if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9525 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
9526 break 4;
9527fi
9528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9529 for gdb_arg5 in 'int *' 'int' 'long'; do
9530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9531/* end confdefs.h. */
9532$gdb_ptrace_headers
9533int
9534main ()
9535{
9536
9537extern $gdb_cv_func_ptrace_ret
9538 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
9539
9540 ;
9541 return 0;
9542}
9543_ACEOF
9b30624b 9544if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9545
9546gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
9547 break 5;
9548fi
9549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9550 done
9551 done
9552 done
9553 done
9554done
9555# Provide a safe default value.
9556: ${gdb_cv_func_ptrace_args='int,int,long,long'}
9557
9558fi
9559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9560fi
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
9562$as_echo "$gdb_cv_func_ptrace_args" >&6; }
9563ac_save_IFS=$IFS; IFS=','
9564set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
9565IFS=$ac_save_IFS
9566shift
9567
54019719
PA
9568cat >>confdefs.h <<_ACEOF
9569#define PTRACE_TYPE_ARG1 $1
9570_ACEOF
9571
9572
eb7aa561
PA
9573cat >>confdefs.h <<_ACEOF
9574#define PTRACE_TYPE_ARG3 $3
9575_ACEOF
9576
9577
9578cat >>confdefs.h <<_ACEOF
9579#define PTRACE_TYPE_ARG4 $4
9580_ACEOF
9581
9582if test -n "$5"; then
9583
9584cat >>confdefs.h <<_ACEOF
9585#define PTRACE_TYPE_ARG5 $5
9586_ACEOF
9587
9588fi
9589
9590
0fb4aa4b
PA
9591# Check for UST
9592ustlibs=""
9593ustinc=""
9594
9595
9596# Check whether --with-ust was given.
9597if test "${with_ust+set}" = set; then :
9598 withval=$with_ust;
9599fi
9600
9601
9602# Check whether --with-ust_include was given.
9603if test "${with_ust_include+set}" = set; then :
9604 withval=$with_ust_include;
9605fi
9606
9607
9608# Check whether --with-ust_lib was given.
9609if test "${with_ust_lib+set}" = set; then :
9610 withval=$with_ust_lib;
9611fi
9612
9613
9614case $with_ust in
9615 no)
9616 ustlibs=
9617 ustinc=
9618 ;;
9619 "" | yes)
9620 ustlibs=" -lust "
9621 ustinc=""
9622 ;;
9623 *)
9624 ustlibs="-L$with_ust/lib -lust"
9625 ustinc="-I$with_ust/include "
9626 ;;
9627esac
9628if test "x$with_ust_include" != x; then
9629 ustinc="-I$with_ust_include "
9630fi
9631if test "x$with_ust_lib" != x; then
9632 ustlibs="-L$with_ust_lib -lust"
9633fi
9634
9635if test "x$with_ust" != "xno"; then
9636 saved_CFLAGS="$CFLAGS"
9637 CFLAGS="$CFLAGS $ustinc"
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
9639$as_echo_n "checking for ust... " >&6; }
9640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9641/* end confdefs.h. */
9642
9643#define CONFIG_UST_GDB_INTEGRATION
9644#include <ust/ust.h>
9645
9646int
9647main ()
9648{
9649
9650 ;
9651 return 0;
9652}
9653_ACEOF
9654if ac_fn_c_try_compile "$LINENO"; then :
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9656$as_echo "yes" >&6; };
9657$as_echo "#define HAVE_UST 1" >>confdefs.h
9658
9659else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }; ustlibs= ; ustinc=
9662fi
9663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9664 CFLAGS="$saved_CFLAGS"
9665fi
9666
9667# Flags needed for UST
9668
9669
9670
8f13a3ce 9671
d4596a3d
PA
9672# Check whether --enable-werror was given.
9673if test "${enable_werror+set}" = set; then :
9674 enableval=$enable_werror; case "${enableval}" in
9675 yes | y) ERROR_ON_WARNING="yes" ;;
9676 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 9677 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
d4596a3d
PA
9678 esac
9679fi
9680
9681
9a084706 9682# Enable -Werror by default when using gcc. Turn it off for releases.
8f13a3ce 9683if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
d4596a3d
PA
9684 ERROR_ON_WARNING=yes
9685fi
9686
9687WERROR_CFLAGS=""
9688if test "${ERROR_ON_WARNING}" = yes ; then
9689 WERROR_CFLAGS="-Werror"
9690fi
9691
cf6de44d 9692# The options we'll try to enable.
aac331e4 9693build_warnings="-Wall -Wpointer-arith \
a0de763e 9694-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
8f13a3ce 9695-Wno-switch -Wno-char-subscripts \
cf6de44d 9696-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 9697-Wno-sign-compare -Wno-error=maybe-uninitialized \
458412c3 9698-Wno-mismatched-tags \
632e107b 9699-Wno-error=deprecated-register \
85e26832 9700-Wsuggest-override \
1a34f210 9701-Wimplicit-fallthrough=3 \
96643e35 9702-Wduplicated-cond \
33a6bc35
TT
9703-Wshadow=local \
9704-Wdeprecated-copy \
9705-Wdeprecated-copy-dtor \
bb564c58 9706-Wredundant-move \
8ddd8e0e 9707-Wmissing-declarations \
a0761e34 9708-Wmissing-prototypes \
898e7f60
SM
9709-Wstrict-null-sentinel \
9710"
8f13a3ce 9711
8f13a3ce 9712case "${host}" in
5bfda255
YQ
9713 *-*-mingw32*)
9714 # Enable -Wno-format by default when using gcc on mingw since many
9715 # GCC versions complain about %I64.
9716 build_warnings="$build_warnings -Wno-format" ;;
9717 *-*-solaris*)
9718 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
9719 # doesn't understand.
9720 build_warnings="$build_warnings -Wno-unknown-pragmas"
9721 # Solaris 11 <unistd.h> marks vfork deprecated.
9722 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
9723 *)
9724 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
9725 # but there's a special case for this below.
9726 build_warnings="$build_warnings -Wformat-nonliteral" ;;
8f13a3ce
MF
9727esac
9728
9729# Check whether --enable-build-warnings was given.
9730if test "${enable_build_warnings+set}" = set; then :
9731 enableval=$enable_build_warnings; case "${enableval}" in
9732 yes) ;;
9733 no) build_warnings="-w";;
9734 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9735 build_warnings="${build_warnings} ${t}";;
9736 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9737 build_warnings="${t} ${build_warnings}";;
9738 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9739esac
9740if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9741 echo "Setting compiler warning flags = $build_warnings" 6>&1
9742fi
9743fi
9744# Check whether --enable-gdb-build-warnings was given.
9745if test "${enable_gdb_build_warnings+set}" = set; then :
9746 enableval=$enable_gdb_build_warnings; case "${enableval}" in
9747 yes) ;;
9748 no) build_warnings="-w";;
9749 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9750 build_warnings="${build_warnings} ${t}";;
9751 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9752 build_warnings="${t} ${build_warnings}";;
9753 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9754esac
9755if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9756 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9757fi
3bc3d82a
PA
9758fi
9759
9760# The set of warnings supported by a C++ compiler is not the same as
9761# of the C compiler.
cf6de44d 9762ac_ext=cpp
3bc3d82a
PA
9763ac_cpp='$CXXCPP $CPPFLAGS'
9764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9767
3bc3d82a 9768
d4596a3d 9769WARN_CFLAGS=""
8f13a3ce 9770if test "x${build_warnings}" != x -a "x$GCC" = xyes
d4596a3d
PA
9771then
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
9773$as_echo_n "checking compiler warning flags... " >&6; }
9774 # Separate out the -Werror flag as some files just cannot be
9775 # compiled with it enabled.
9776 for w in ${build_warnings}; do
7544db95
PA
9777 # GCC does not complain about -Wno-unknown-warning. Invert
9778 # and test -Wunknown-warning instead.
9779 case $w in
9780 -Wno-*)
9781 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
9782 -Wformat-nonliteral)
9783 # gcc requires -Wformat before -Wformat-nonliteral
9784 # will work, so stick them together.
9785 w="-Wformat $w"
9786 wtest="$w"
9787 ;;
7544db95
PA
9788 *)
9789 wtest=$w ;;
9790 esac
9791
d4596a3d
PA
9792 case $w in
9793 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
9794 *)
9795 # Check whether GCC accepts it.
d4596a3d 9796 saved_CFLAGS="$CFLAGS"
3e019bdc 9797 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 9798 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 9799 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
9800 if test "x$w" = "x-Wunused-variable"; then
9801 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
9802 # fixed in GCC 4.9. This test is derived from the gdb
9803 # source code that triggered this bug in GCC.
9804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805/* end confdefs.h. */
9806struct scoped_restore_base {};
9807 struct scoped_restore_tmpl : public scoped_restore_base {
9808 ~scoped_restore_tmpl() {}
9809 };
9810int
9811main ()
9812{
9813const scoped_restore_base &b = scoped_restore_tmpl();
9814 ;
9815 return 0;
9816}
9817_ACEOF
9818if ac_fn_cxx_try_compile "$LINENO"; then :
9819 WARN_CFLAGS="${WARN_CFLAGS} $w"
9820fi
9821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9822 else
9823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d4596a3d
PA
9824/* end confdefs.h. */
9825
9826int
9827main ()
9828{
9829
9830 ;
9831 return 0;
9832}
9833_ACEOF
3bc3d82a 9834if ac_fn_cxx_try_compile "$LINENO"; then :
d4596a3d
PA
9835 WARN_CFLAGS="${WARN_CFLAGS} $w"
9836fi
9837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 9838 fi
d4596a3d 9839 CFLAGS="$saved_CFLAGS"
3bc3d82a 9840 CXXFLAGS="$saved_CXXFLAGS"
d4596a3d
PA
9841 esac
9842 done
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
9844$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
9845fi
9846
9847
9848
cf6de44d 9849ac_ext=c
3bc3d82a
PA
9850ac_cpp='$CPP $CPPFLAGS'
9851ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9852ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9853ac_compiler_gnu=$ac_cv_c_compiler_gnu
9854
3bc3d82a 9855
8f13a3ce 9856
10e86dd7
DE
9857old_LIBS="$LIBS"
9858LIBS="$LIBS -ldl"
9859for ac_func in dladdr
9860do :
9861 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
d0ac1c44 9862if test "x$ac_cv_func_dladdr" = xyes; then :
10e86dd7
DE
9863 cat >>confdefs.h <<_ACEOF
9864#define HAVE_DLADDR 1
9865_ACEOF
9866
9867fi
9868done
9869
9870LIBS="$old_LIBS"
9871
07697489
PA
9872
9873 # Check for presence and size of long long.
9874 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 9875if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
9876
9877cat >>confdefs.h <<_ACEOF
9878#define HAVE_LONG_LONG 1
9879_ACEOF
9880
9881# The cast to long int works around a bug in the HP C Compiler
9882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9884# This bug is HP SR number 8606223364.
9885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9886$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 9887if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
9888 $as_echo_n "(cached) " >&6
9889else
9890 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
9891
9892else
9893 if test "$ac_cv_type_long_long" = yes; then
9894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9896as_fn_error 77 "cannot compute sizeof (long long)
9897See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
9898 else
9899 ac_cv_sizeof_long_long=0
9900 fi
9901fi
9902
9903fi
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9905$as_echo "$ac_cv_sizeof_long_long" >&6; }
9906
9907
9908
9909cat >>confdefs.h <<_ACEOF
9910#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9911_ACEOF
9912
9913
9914fi
9915
9916
d0ac1c44
SM
9917 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
9918ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
9919if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
9920 ac_have_decl=1
9921else
9922 ac_have_decl=0
9923fi
9924
9925cat >>confdefs.h <<_ACEOF
9926#define HAVE_DECL_BASENAME $ac_have_decl
9927_ACEOF
9928ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 9929if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
9930 ac_have_decl=1
9931else
9932 ac_have_decl=0
9933fi
9934
9935cat >>confdefs.h <<_ACEOF
9936#define HAVE_DECL_FFS $ac_have_decl
9937_ACEOF
9938ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 9939if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
9940 ac_have_decl=1
9941else
9942 ac_have_decl=0
9943fi
9944
9945cat >>confdefs.h <<_ACEOF
9946#define HAVE_DECL_ASPRINTF $ac_have_decl
9947_ACEOF
9948ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 9949if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
9950 ac_have_decl=1
9951else
9952 ac_have_decl=0
9953fi
9954
9955cat >>confdefs.h <<_ACEOF
9956#define HAVE_DECL_VASPRINTF $ac_have_decl
9957_ACEOF
9958ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 9959if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
9960 ac_have_decl=1
9961else
9962 ac_have_decl=0
9963fi
9964
9965cat >>confdefs.h <<_ACEOF
9966#define HAVE_DECL_SNPRINTF $ac_have_decl
9967_ACEOF
9968ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 9969if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
9970 ac_have_decl=1
9971else
9972 ac_have_decl=0
9973fi
9974
9975cat >>confdefs.h <<_ACEOF
9976#define HAVE_DECL_VSNPRINTF $ac_have_decl
9977_ACEOF
9978
9979 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 9980if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
9981 ac_have_decl=1
9982else
9983 ac_have_decl=0
9984fi
9985
9986cat >>confdefs.h <<_ACEOF
9987#define HAVE_DECL_STRTOL $ac_have_decl
9988_ACEOF
9989ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 9990if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
9991 ac_have_decl=1
9992else
9993 ac_have_decl=0
9994fi
9995
9996cat >>confdefs.h <<_ACEOF
9997#define HAVE_DECL_STRTOUL $ac_have_decl
9998_ACEOF
9999ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 10000if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
10001 ac_have_decl=1
10002else
10003 ac_have_decl=0
10004fi
10005
10006cat >>confdefs.h <<_ACEOF
10007#define HAVE_DECL_STRTOLL $ac_have_decl
10008_ACEOF
10009ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 10010if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
10011 ac_have_decl=1
10012else
10013 ac_have_decl=0
10014fi
10015
10016cat >>confdefs.h <<_ACEOF
10017#define HAVE_DECL_STRTOULL $ac_have_decl
10018_ACEOF
10019
10020 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 10021if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
10022 ac_have_decl=1
10023else
10024 ac_have_decl=0
10025fi
10026
10027cat >>confdefs.h <<_ACEOF
10028#define HAVE_DECL_STRVERSCMP $ac_have_decl
10029_ACEOF
10030
10031
10032
81ecdfbb 10033ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
d0ac1c44 10034if test "x$ac_cv_have_decl_perror" = xyes; then :
81ecdfbb
RW
10035 ac_have_decl=1
10036else
10037 ac_have_decl=0
f450004a 10038fi
81ecdfbb
RW
10039
10040cat >>confdefs.h <<_ACEOF
10041#define HAVE_DECL_PERROR $ac_have_decl
10042_ACEOF
bb0116a4 10043ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 10044if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
bb0116a4
JB
10045 ac_have_decl=1
10046else
10047 ac_have_decl=0
10048fi
10049
10050cat >>confdefs.h <<_ACEOF
10051#define HAVE_DECL_VASPRINTF $ac_have_decl
10052_ACEOF
10053ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 10054if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
bb0116a4
JB
10055 ac_have_decl=1
10056else
10057 ac_have_decl=0
10058fi
10059
10060cat >>confdefs.h <<_ACEOF
10061#define HAVE_DECL_VSNPRINTF $ac_have_decl
10062_ACEOF
81ecdfbb
RW
10063
10064
3e019bdc
SM
10065# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10066# Older amd64 Linux's don't have the fs_base and gs_base members of
10067# `struct user_regs_struct'.
f517c180
EA
10068ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
10069#include <sys/user.h>
239b6d10 10070"
d0ac1c44 10071if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
239b6d10
WT
10072
10073cat >>confdefs.h <<_ACEOF
10074#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10075_ACEOF
10076
10077
10078fi
f517c180
EA
10079ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
10080#include <sys/user.h>
239b6d10 10081"
d0ac1c44 10082if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
239b6d10
WT
10083
10084cat >>confdefs.h <<_ACEOF
10085#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10086_ACEOF
10087
10088
10089fi
10090
10091
10092
81ecdfbb
RW
10093ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
10094#include <sys/socket.h>
10095
10096"
d0ac1c44 10097if test "x$ac_cv_type_socklen_t" = xyes; then :
f450004a 10098
ccbd4912 10099cat >>confdefs.h <<_ACEOF
f450004a
DJ
10100#define HAVE_SOCKLEN_T 1
10101_ACEOF
10102
f450004a 10103
ccbd4912 10104fi
f450004a 10105
fb1e4ffc 10106
64da5dd5
JB
10107case "${target}" in
10108 *-android*)
10109 # Starting with NDK version 9, <elf.h> actually includes definitions
10110 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
10111 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
10112 # leading to conflicts with the defintions from <linux/elf.h>.
10113 # This makes it impossible for us to include both <elf.h> and
10114 # <linux/elf.h>, which means that, in practice, we do not have
10115 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
10116 # Therefore, do not try to auto-detect availability, as it would
10117 # get it wrong on this platform.
10118 ;;
10119 *)
10120 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
8365dcf5
TJB
10121
10122"
d0ac1c44 10123if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
8365dcf5
TJB
10124
10125cat >>confdefs.h <<_ACEOF
10126#define HAVE_ELF32_AUXV_T 1
10127_ACEOF
10128
10129
10130fi
10131ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
10132
10133"
d0ac1c44 10134if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
8365dcf5
TJB
10135
10136cat >>confdefs.h <<_ACEOF
10137#define HAVE_ELF64_AUXV_T 1
10138_ACEOF
10139
10140
10141fi
10142
64da5dd5 10143esac
8365dcf5 10144
c16158bc
JM
10145
10146
81ecdfbb
RW
10147# Check whether --with-pkgversion was given.
10148if test "${with_pkgversion+set}" = set; then :
10149 withval=$with_pkgversion; case "$withval" in
d0ac1c44 10150 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
10151 no) PKGVERSION= ;;
10152 *) PKGVERSION="($withval) " ;;
10153 esac
10154else
10155 PKGVERSION="(GDB) "
10156
81ecdfbb
RW
10157fi
10158
c16158bc
JM
10159
10160
10161
10162
81ecdfbb
RW
10163# Check whether --with-bugurl was given.
10164if test "${with_bugurl+set}" = set; then :
10165 withval=$with_bugurl; case "$withval" in
d0ac1c44 10166 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
10167 no) BUGURL=
10168 ;;
10169 *) BUGURL="$withval"
10170 ;;
10171 esac
10172else
10173 BUGURL="http://www.gnu.org/software/gdb/bugs/"
10174
81ecdfbb
RW
10175fi
10176
c16158bc
JM
10177 case ${BUGURL} in
10178 "")
10179 REPORT_BUGS_TO=
10180 REPORT_BUGS_TEXI=
10181 ;;
10182 *)
10183 REPORT_BUGS_TO="<$BUGURL>"
10184 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
10185 ;;
10186 esac;
10187
10188
10189
10190
10191cat >>confdefs.h <<_ACEOF
10192#define PKGVERSION "$PKGVERSION"
10193_ACEOF
10194
10195
10196cat >>confdefs.h <<_ACEOF
10197#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
10198_ACEOF
10199
10200
8838b45e
NS
10201# Check for various supplementary target information (beyond the
10202# triplet) which might affect the choices in configure.srv.
10203case "${target}" in
10204 i[34567]86-*-linux*)
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
10206$as_echo_n "checking if building for x86-64... " >&6; }
d0ac1c44 10207if ${gdb_cv_i386_is_x86_64+:} false; then :
8838b45e
NS
10208 $as_echo_n "(cached) " >&6
10209else
10210 save_CPPFLAGS="$CPPFLAGS"
10211 CPPFLAGS="$CPPFLAGS $CFLAGS"
10212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10213/* end confdefs.h. */
10214
10215#if __x86_64__
10216got it
10217#endif
10218
10219_ACEOF
10220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10221 $EGREP "got it" >/dev/null 2>&1; then :
10222 gdb_cv_i386_is_x86_64=yes
10223else
10224 gdb_cv_i386_is_x86_64=no
10225fi
10226rm -f conftest*
10227
10228 CPPFLAGS="$save_CPPFLAGS"
10229fi
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
10231$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
10232 ;;
201506da
PA
10233
10234 x86_64-*-linux*)
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
10236$as_echo_n "checking if building for x32... " >&6; }
d0ac1c44 10237if ${gdb_cv_x86_is_x32+:} false; then :
201506da
PA
10238 $as_echo_n "(cached) " >&6
10239else
10240 save_CPPFLAGS="$CPPFLAGS"
10241 CPPFLAGS="$CPPFLAGS $CFLAGS"
10242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10243/* end confdefs.h. */
10244
10245#if __x86_64__ && __ILP32__
10246got it
10247#endif
10248
10249_ACEOF
10250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10251 $EGREP "got it" >/dev/null 2>&1; then :
10252 gdb_cv_x86_is_x32=yes
10253else
10254 gdb_cv_x86_is_x32=no
10255fi
10256rm -f conftest*
10257
10258 CPPFLAGS="$save_CPPFLAGS"
10259fi
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
10261$as_echo "$gdb_cv_x86_is_x32" >&6; }
10262 ;;
10263
9ac544ce
MK
10264 m68k-*-*)
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
10266$as_echo_n "checking if building for Coldfire... " >&6; }
d0ac1c44 10267if ${gdb_cv_m68k_is_coldfire+:} false; then :
9ac544ce
MK
10268 $as_echo_n "(cached) " >&6
10269else
10270 save_CPPFLAGS="$CPPFLAGS"
10271 CPPFLAGS="$CPPFLAGS $CFLAGS"
10272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10273/* end confdefs.h. */
10274
10275#ifdef __mcoldfire__
10276got it
10277#endif
10278
10279_ACEOF
10280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10281 $EGREP "got it" >/dev/null 2>&1; then :
10282 gdb_cv_m68k_is_coldfire=yes
10283else
10284 gdb_cv_m68k_is_coldfire=no
10285fi
10286rm -f conftest*
10287
10288 CPPFLAGS="$save_CPPFLAGS"
10289fi
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
10291$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
10292 ;;
8838b45e
NS
10293esac
10294
7ea81414 10295. ${srcdir}/configure.srv
d6e9fb05 10296
68070c10
PA
10297if test "${srv_mingwce}" = "yes"; then
10298 LIBS="$LIBS -lws2"
10299elif test "${srv_mingw}" = "yes"; then
b2ceabe8
TT
10300 # WIN32APILIBS is set by GDB_AC_COMMON.
10301 LIBS="$LIBS $WIN32APILIBS"
ac8c974e
AR
10302elif test "${srv_qnx}" = "yes"; then
10303 LIBS="$LIBS -lsocket"
8ed54b31
JB
10304elif test "${srv_lynxos}" = "yes"; then
10305 LIBS="$LIBS -lnetinet"
68070c10
PA
10306fi
10307
58caa3dc 10308if test "${srv_linux_usrregs}" = "yes"; then
f450004a 10309
81ecdfbb 10310$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
58caa3dc
DJ
10311
10312fi
10313
10314if test "${srv_linux_regsets}" = "yes"; then
e9d25b98 10315
81ecdfbb 10316$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
e9d25b98
DJ
10317
10318
81ecdfbb
RW
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10320$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 10321 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 10322 $as_echo_n "(cached) " >&6
bec39cab 10323else
81ecdfbb 10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10325/* end confdefs.h. */
58caa3dc 10326#include <sys/ptrace.h>
bec39cab
AC
10327int
10328main ()
10329{
58caa3dc 10330PTRACE_GETREGS;
bec39cab
AC
10331 ;
10332 return 0;
10333}
10334_ACEOF
81ecdfbb 10335if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
10336 gdbsrv_cv_have_ptrace_getregs=yes
10337else
81ecdfbb 10338 gdbsrv_cv_have_ptrace_getregs=no
58caa3dc 10339fi
81ecdfbb 10340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
10341fi
10342
81ecdfbb
RW
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
10344$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
58caa3dc 10345 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
f450004a 10346
81ecdfbb 10347$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
58caa3dc
DJ
10348
10349 fi
10350
81ecdfbb
RW
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10352$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 10353 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 10354 $as_echo_n "(cached) " >&6
58caa3dc 10355else
81ecdfbb 10356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10357/* end confdefs.h. */
58caa3dc 10358#include <sys/ptrace.h>
bec39cab
AC
10359int
10360main ()
10361{
58caa3dc 10362PTRACE_GETFPXREGS;
bec39cab
AC
10363 ;
10364 return 0;
10365}
10366_ACEOF
81ecdfbb 10367if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
10368 gdbsrv_cv_have_ptrace_getfpxregs=yes
10369else
81ecdfbb 10370 gdbsrv_cv_have_ptrace_getfpxregs=no
58caa3dc 10371fi
81ecdfbb 10372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
10373fi
10374
81ecdfbb
RW
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
10376$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
58caa3dc 10377 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
f450004a 10378
81ecdfbb 10379$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
58caa3dc
DJ
10380
10381 fi
10382fi
10383
9accd112
MM
10384if test "${srv_linux_btrace}" = "yes"; then
10385
10386$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
10387
10388fi
10389
18f5fd81
TJB
10390if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
10392$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
d0ac1c44 10393 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
18f5fd81
TJB
10394 $as_echo_n "(cached) " >&6
10395else
10396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10397/* end confdefs.h. */
10398
10399#include <thread_db.h>
10400int
10401main ()
10402{
10403lwpid_t avar
10404 ;
10405 return 0;
10406}
10407_ACEOF
10408if ac_fn_c_try_compile "$LINENO"; then :
10409 gdbserver_cv_have_thread_db_type_lwpid_t=yes
10410else
10411 gdbserver_cv_have_thread_db_type_lwpid_t=no
10412
10413fi
10414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10415fi
10416
10417 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
10418
10419$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10420
10421 fi
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
10423$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
10424
10425fi
10426
10427if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
10429$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
d0ac1c44 10430 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
18f5fd81
TJB
10431 $as_echo_n "(cached) " >&6
10432else
10433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10434/* end confdefs.h. */
10435
10436#include <thread_db.h>
10437int
10438main ()
10439{
10440psaddr_t avar
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445if ac_fn_c_try_compile "$LINENO"; then :
10446 gdbserver_cv_have_thread_db_type_psaddr_t=yes
10447else
10448 gdbserver_cv_have_thread_db_type_psaddr_t=no
10449
10450fi
10451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10452fi
10453
10454 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
10455
10456$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10457
10458 fi
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
10460$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
10461
10462fi
10463
193f13e6
MK
10464old_LIBS="$LIBS"
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10466$as_echo_n "checking for dlopen in -ldl... " >&6; }
d0ac1c44 10467if ${ac_cv_lib_dl_dlopen+:} false; then :
193f13e6
MK
10468 $as_echo_n "(cached) " >&6
10469else
10470 ac_check_lib_save_LIBS=$LIBS
10471LIBS="-ldl $LIBS"
10472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10473/* end confdefs.h. */
10474
10475/* Override any GCC internal prototype to avoid an error.
10476 Use char because int might match the return type of a GCC
10477 builtin and then its argument prototype would still apply. */
10478#ifdef __cplusplus
10479extern "C"
10480#endif
10481char dlopen ();
10482int
10483main ()
10484{
10485return dlopen ();
10486 ;
10487 return 0;
10488}
10489_ACEOF
10490if ac_fn_c_try_link "$LINENO"; then :
10491 ac_cv_lib_dl_dlopen=yes
10492else
10493 ac_cv_lib_dl_dlopen=no
10494fi
10495rm -f core conftest.err conftest.$ac_objext \
10496 conftest$ac_exeext conftest.$ac_ext
10497LIBS=$ac_check_lib_save_LIBS
10498fi
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10500$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
d0ac1c44 10501if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
193f13e6
MK
10502 cat >>confdefs.h <<_ACEOF
10503#define HAVE_LIBDL 1
10504_ACEOF
10505
10506 LIBS="-ldl $LIBS"
10507
10508fi
10509
10510LIBS="$old_LIBS"
10511
0d62e5e8
DJ
10512srv_thread_depfiles=
10513srv_libs=
0d62e5e8
DJ
10514
10515if test "$srv_linux_thread_db" = "yes"; then
193f13e6
MK
10516 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
10517 srv_libs="-ldl"
f6528abd
JK
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
10519$as_echo_n "checking for the dynamic export flag... " >&6; }
193f13e6 10520 old_LDFLAGS="$LDFLAGS"
f6528abd
JK
10521 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
10522 # supported there.
10523 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
10524 LDFLAGS="$LDFLAGS $RDYNAMIC"
193f13e6 10525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
10526/* end confdefs.h. */
10527
10528int
10529main ()
10530{
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
81ecdfbb 10536if ac_fn_c_try_link "$LINENO"; then :
f6528abd
JK
10537 found="-Wl,--dynamic-list"
10538 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6de3c42 10539else
f6528abd
JK
10540 RDYNAMIC="-rdynamic"
10541 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
10542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10543/* end confdefs.h. */
10544
10545int
10546main ()
10547{
10548
10549 ;
10550 return 0;
10551}
10552_ACEOF
10553if ac_fn_c_try_link "$LINENO"; then :
10554 found="-rdynamic"
10555else
10556 found="no"
10557 RDYNAMIC=""
770d76d7
PA
10558fi
10559rm -f core conftest.err conftest.$ac_objext \
10560 conftest$ac_exeext conftest.$ac_ext
10561fi
10562rm -f core conftest.err conftest.$ac_objext \
10563 conftest$ac_exeext conftest.$ac_ext
10564
10565 LDFLAGS="$old_LDFLAGS"
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
10567$as_echo "$found" >&6; }
10568 else
10569 srv_libs="-lthread_db"
10570 fi
55a8c076 10571
770d76d7 10572 srv_thread_depfiles="thread-db.o proc-service.o"
7d4e5717
PA
10573
10574$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
10575
770d76d7
PA
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
10577$as_echo_n "checking for TD_VERSION... " >&6; }
d0ac1c44 10578if ${gdbsrv_cv_have_td_version+:} false; then :
770d76d7
PA
10579 $as_echo_n "(cached) " >&6
10580else
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582/* end confdefs.h. */
10583#include <thread_db.h>
55a8c076
YQ
10584int
10585main ()
10586{
770d76d7 10587TD_VERSION;
c9a1864a
YQ
10588 ;
10589 return 0;
10590}
10591_ACEOF
55a8c076 10592if ac_fn_c_try_compile "$LINENO"; then :
770d76d7 10593 gdbsrv_cv_have_td_version=yes
c9a1864a 10594else
770d76d7
PA
10595 gdbsrv_cv_have_td_version=no
10596fi
10597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10598fi
10599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
10600$as_echo "$gdbsrv_cv_have_td_version" >&6; }
0ad6b8ee 10601 if test "$gdbsrv_cv_have_td_version" = yes; then
c9a1864a 10602
770d76d7 10603$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
55a8c076 10604
770d76d7
PA
10605 fi
10606fi
c9a1864a
YQ
10607
10608
770d76d7
PA
10609# Check whether --with-libthread-db was given.
10610if test "${with_libthread_db+set}" = set; then :
10611 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
10612 srv_libs="$srv_libthread_db_path"
c9a1864a 10613
770d76d7 10614fi
c9a1864a
YQ
10615
10616
770d76d7 10617if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
c9a1864a 10618
770d76d7 10619$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
c9a1864a 10620
55a8c076 10621fi
c9a1864a 10622
770d76d7
PA
10623if test "$srv_xmlfiles" != ""; then
10624 srv_xmlbuiltin="xml-builtin.o"
c9a1864a 10625
770d76d7 10626$as_echo "#define USE_XML 1" >>confdefs.h
c9a1864a 10627
c9a1864a 10628
770d76d7
PA
10629 tmp_xmlfiles=$srv_xmlfiles
10630 srv_xmlfiles=""
10631 for f in $tmp_xmlfiles; do
10632 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
10633 done
c9a1864a
YQ
10634fi
10635
cd850b40 10636GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs"
770d76d7 10637GDBSERVER_LIBS="$srv_libs"
c9a1864a 10638
770d76d7
PA
10639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
10640$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
d0ac1c44 10641if ${gdbsrv_cv_have_sync_builtins+:} false; then :
770d76d7
PA
10642 $as_echo_n "(cached) " >&6
10643else
c9a1864a 10644
770d76d7
PA
10645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10646/* end confdefs.h. */
c9a1864a 10647
770d76d7
PA
10648int
10649main ()
10650{
10651int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
10652 ;
10653 return 0;
10654}
10655_ACEOF
10656if ac_fn_c_try_link "$LINENO"; then :
10657 gdbsrv_cv_have_sync_builtins=yes
10658else
c971b7fa 10659 gdbsrv_cv_have_sync_builtins=no
c9a1864a 10660fi
c971b7fa
PA
10661rm -f core conftest.err conftest.$ac_objext \
10662 conftest$ac_exeext conftest.$ac_ext
c9a1864a 10663fi
c971b7fa
PA
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
10665$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
0ad6b8ee 10666if test "$gdbsrv_cv_have_sync_builtins" = yes; then
c971b7fa
PA
10667
10668$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
10669
c9a1864a
YQ
10670fi
10671
c971b7fa
PA
10672saved_cflags="$CFLAGS"
10673CFLAGS="$CFLAGS -fvisibility=hidden"
10674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10675/* end confdefs.h. */
c9a1864a 10676
c971b7fa
PA
10677int
10678main ()
10679{
c9a1864a 10680
c971b7fa
PA
10681 ;
10682 return 0;
10683}
c9a1864a 10684_ACEOF
c971b7fa
PA
10685if ac_fn_c_try_compile "$LINENO"; then :
10686 gdbsrv_cv_have_visibility_hidden=yes
10687else
10688 gdbsrv_cv_have_visibility_hidden=no
c9a1864a 10689fi
c971b7fa
PA
10690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10691CFLAGS="$saved_cflags"
10692
c971b7fa
PA
10693IPA_DEPFILES=""
10694extra_libraries=""
c2a66c29 10695
c971b7fa
PA
10696# check whether to enable the inprocess agent
10697if test "$ipa_obj" != "" \
10698 -a "$gdbsrv_cv_have_sync_builtins" = yes \
10699 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
10700 have_ipa=true
10701else
10702 have_ipa=false
10703fi
fa593d66 10704
c971b7fa
PA
10705# Check whether --enable-inprocess-agent was given.
10706if test "${enable_inprocess_agent+set}" = set; then :
10707 enableval=$enable_inprocess_agent; case "$enableval" in
10708 yes) want_ipa=true ;;
10709 no) want_ipa=false ;;
d0ac1c44 10710 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
c971b7fa
PA
10711esac
10712else
10713 want_ipa=$have_ipa
10714fi
c2a66c29 10715
c9a1864a 10716
c971b7fa
PA
10717if $want_ipa ; then
10718 if $have_ipa ; then
10719 IPA_DEPFILES="$ipa_obj"
10720 extra_libraries="$extra_libraries libinproctrace.so"
10721 else
d0ac1c44 10722 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
c971b7fa
PA
10723 fi
10724fi
c9a1864a 10725
c9a1864a 10726
c2a66c29
NS
10727
10728
fa593d66
PA
10729
10730
10731
0d62e5e8 10732
1a627e7e 10733GNULIB=../gnulib/import
d6e9fb05 10734
c9a1864a
YQ
10735GNULIB_STDINT_H=
10736if test x"$STDINT_H" != x; then
c971b7fa 10737 GNULIB_STDINT_H=$GNULIB/$STDINT_H
c9a1864a 10738fi
d6e9fb05 10739
fb1e4ffc 10740
c971b7fa 10741ac_config_files="$ac_config_files Makefile"
81ecdfbb 10742
81ecdfbb 10743
bec39cab 10744cat >confcache <<\_ACEOF
d6e9fb05
JK
10745# This file is a shell script that caches the results of configure
10746# tests run on this system so they can be shared between configure
bec39cab
AC
10747# scripts and configure runs, see configure's option --config-cache.
10748# It is not useful on other systems. If it contains results you don't
10749# want to keep, you may remove or edit it.
d6e9fb05 10750#
bec39cab
AC
10751# config.status only pays attention to the cache file if you give it
10752# the --recheck option to rerun configure.
d6e9fb05 10753#
bec39cab
AC
10754# `ac_cv_env_foo' variables (set or unset) will be overridden when
10755# loading this file, other *unset* `ac_cv_foo' will be assigned the
10756# following values.
10757
10758_ACEOF
10759
d6e9fb05
JK
10760# The following way of writing the cache mishandles newlines in values,
10761# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 10762# So, we kill variables containing newlines.
d6e9fb05
JK
10763# Ultrix sh set writes to stderr and can't be redirected directly,
10764# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
10765(
10766 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10767 eval ac_val=\$$ac_var
10768 case $ac_val in #(
10769 *${as_nl}*)
10770 case $ac_var in #(
10771 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10772$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10773 esac
10774 case $ac_var in #(
10775 _ | IFS | as_nl) ;; #(
10776 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10777 *) { eval $ac_var=; unset $ac_var;} ;;
10778 esac ;;
10779 esac
10780 done
10781
bec39cab 10782 (set) 2>&1 |
81ecdfbb
RW
10783 case $as_nl`(ac_space=' '; set) 2>&1` in #(
10784 *${as_nl}ac_space=\ *)
10785 # `set' does not quote correctly, so add quotes: double-quote
10786 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
10787 sed -n \
10788 "s/'/'\\\\''/g;
10789 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 10790 ;; #(
bec39cab
AC
10791 *)
10792 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 10793 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 10794 ;;
81ecdfbb
RW
10795 esac |
10796 sort
10797) |
bec39cab 10798 sed '
81ecdfbb 10799 /^ac_cv_env_/b end
bec39cab 10800 t clear
81ecdfbb 10801 :clear
bec39cab
AC
10802 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10803 t end
81ecdfbb
RW
10804 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10805 :end' >>confcache
10806if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10807 if test -w "$cache_file"; then
d0ac1c44 10808 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10810$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
10811 if test ! -f "$cache_file" || test -h "$cache_file"; then
10812 cat confcache >"$cache_file"
10813 else
10814 case $cache_file in #(
10815 */* | ?:*)
10816 mv -f confcache "$cache_file"$$ &&
10817 mv -f "$cache_file"$$ "$cache_file" ;; #(
10818 *)
10819 mv -f confcache "$cache_file" ;;
10820 esac
10821 fi
10822 fi
d6e9fb05 10823 else
81ecdfbb
RW
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10825$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
d6e9fb05
JK
10826 fi
10827fi
10828rm -f confcache
10829
d6e9fb05
JK
10830test "x$prefix" = xNONE && prefix=$ac_default_prefix
10831# Let make expand exec_prefix.
10832test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10833
84563040 10834DEFS=-DHAVE_CONFIG_H
d6e9fb05 10835
bec39cab
AC
10836ac_libobjs=
10837ac_ltlibobjs=
d0ac1c44 10838U=
bec39cab
AC
10839for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10840 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
10841 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10842 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10843 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10844 # will be set to the directory where LIBOBJS objects are built.
10845 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10846 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
10847done
10848LIBOBJS=$ac_libobjs
d6e9fb05 10849
bec39cab
AC
10850LTLIBOBJS=$ac_ltlibobjs
10851
10852
c9a1864a 10853if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 10854 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c9a1864a
YQ
10855Usually this means the macro was only invoked conditionally." "$LINENO" 5
10856fi
bec39cab 10857
d0ac1c44 10858: "${CONFIG_STATUS=./config.status}"
81ecdfbb 10859ac_write_fail=0
bec39cab
AC
10860ac_clean_files_save=$ac_clean_files
10861ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
10862{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10863$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10864as_write_fail=0
10865cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
10866#! $SHELL
10867# Generated by $as_me.
d6e9fb05 10868# Run this file to recreate the current configuration.
d6e9fb05 10869# Compiler output produced by configure, useful for debugging
bec39cab
AC
10870# configure, is in config.log if it exists.
10871
10872debug=false
10873ac_cs_recheck=false
10874ac_cs_silent=false
bec39cab 10875
81ecdfbb
RW
10876SHELL=\${CONFIG_SHELL-$SHELL}
10877export SHELL
10878_ASEOF
10879cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10880## -------------------- ##
10881## M4sh Initialization. ##
10882## -------------------- ##
10883
10884# Be more Bourne compatible
10885DUALCASE=1; export DUALCASE # for MKS sh
10886if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
10887 emulate sh
10888 NULLCMD=:
81ecdfbb 10889 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
10890 # is contrary to our usage. Disable this feature.
10891 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
10892 setopt NO_GLOB_SUBST
10893else
10894 case `(set -o) 2>/dev/null` in #(
10895 *posix*) :
10896 set -o posix ;; #(
10897 *) :
10898 ;;
10899esac
bec39cab 10900fi
d6e9fb05 10901
81ecdfbb
RW
10902
10903as_nl='
10904'
10905export as_nl
10906# Printing a long string crashes Solaris 7 /usr/bin/printf.
10907as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10908as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10909as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10910# Prefer a ksh shell builtin over an external printf program on Solaris,
10911# but without wasting forks for bash or zsh.
10912if test -z "$BASH_VERSION$ZSH_VERSION" \
10913 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10914 as_echo='print -r --'
10915 as_echo_n='print -rn --'
10916elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
10917 as_echo='printf %s\n'
10918 as_echo_n='printf %s'
bec39cab 10919else
81ecdfbb
RW
10920 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
10921 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
10922 as_echo_n='/usr/ucb/echo -n'
10923 else
10924 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
10925 as_echo_n_body='eval
10926 arg=$1;
10927 case $arg in #(
10928 *"$as_nl"*)
10929 expr "X$arg" : "X\\(.*\\)$as_nl";
10930 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
10931 esac;
10932 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
10933 '
10934 export as_echo_n_body
10935 as_echo_n='sh -c $as_echo_n_body as_echo'
10936 fi
10937 export as_echo_body
10938 as_echo='sh -c $as_echo_body as_echo'
10939fi
10940
10941# The user is always right.
10942if test "${PATH_SEPARATOR+set}" != set; then
10943 PATH_SEPARATOR=:
10944 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10945 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10946 PATH_SEPARATOR=';'
10947 }
bec39cab
AC
10948fi
10949
10950
81ecdfbb
RW
10951# IFS
10952# We need space, tab and new line, in precisely that order. Quoting is
10953# there to prevent editors from complaining about space-tab.
10954# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10955# splitting by setting IFS to empty value.)
10956IFS=" "" $as_nl"
10957
10958# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 10959as_myself=
81ecdfbb
RW
10960case $0 in #((
10961 *[\\/]* ) as_myself=$0 ;;
10962 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10963for as_dir in $PATH
10964do
10965 IFS=$as_save_IFS
10966 test -z "$as_dir" && as_dir=.
10967 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10968 done
10969IFS=$as_save_IFS
10970
10971 ;;
10972esac
10973# We did not find ourselves, most probably we were run as `sh COMMAND'
10974# in which case we are not to be found in the path.
10975if test "x$as_myself" = x; then
10976 as_myself=$0
10977fi
10978if test ! -f "$as_myself"; then
10979 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10980 exit 1
10981fi
10982
10983# Unset variables that we do not need and which cause bugs (e.g. in
10984# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
10985# suppresses any "Segmentation fault" message there. '((' could
10986# trigger a bug in pdksh 5.2.14.
10987for as_var in BASH_ENV ENV MAIL MAILPATH
10988do eval test x\${$as_var+set} = xset \
10989 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
10990done
bec39cab
AC
10991PS1='$ '
10992PS2='> '
10993PS4='+ '
10994
10995# NLS nuisances.
81ecdfbb
RW
10996LC_ALL=C
10997export LC_ALL
10998LANGUAGE=C
10999export LANGUAGE
11000
11001# CDPATH.
11002(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11003
11004
d0ac1c44
SM
11005# as_fn_error STATUS ERROR [LINENO LOG_FD]
11006# ----------------------------------------
81ecdfbb
RW
11007# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11008# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 11009# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
11010as_fn_error ()
11011{
d0ac1c44
SM
11012 as_status=$1; test $as_status -eq 0 && as_status=1
11013 if test "$4"; then
11014 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11015 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
bec39cab 11016 fi
d0ac1c44 11017 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
11018 as_fn_exit $as_status
11019} # as_fn_error
11020
11021
11022# as_fn_set_status STATUS
11023# -----------------------
11024# Set $? to STATUS, without forking.
11025as_fn_set_status ()
11026{
11027 return $1
11028} # as_fn_set_status
11029
11030# as_fn_exit STATUS
11031# -----------------
11032# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11033as_fn_exit ()
11034{
11035 set +e
11036 as_fn_set_status $1
11037 exit $1
11038} # as_fn_exit
11039
11040# as_fn_unset VAR
11041# ---------------
11042# Portably unset VAR.
11043as_fn_unset ()
11044{
11045 { eval $1=; unset $1;}
11046}
11047as_unset=as_fn_unset
11048# as_fn_append VAR VALUE
11049# ----------------------
11050# Append the text in VALUE to the end of the definition contained in VAR. Take
11051# advantage of any shell optimizations that allow amortized linear growth over
11052# repeated appends, instead of the typical quadratic growth present in naive
11053# implementations.
11054if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11055 eval 'as_fn_append ()
11056 {
11057 eval $1+=\$2
11058 }'
11059else
11060 as_fn_append ()
11061 {
11062 eval $1=\$$1\$2
11063 }
11064fi # as_fn_append
11065
11066# as_fn_arith ARG...
11067# ------------------
11068# Perform arithmetic evaluation on the ARGs, and store the result in the
11069# global $as_val. Take advantage of shells that can avoid forks. The arguments
11070# must be portable across $(()) and expr.
11071if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11072 eval 'as_fn_arith ()
11073 {
11074 as_val=$(( $* ))
11075 }'
11076else
11077 as_fn_arith ()
11078 {
11079 as_val=`expr "$@" || test $? -eq 1`
11080 }
11081fi # as_fn_arith
11082
d6e9fb05 11083
81ecdfbb
RW
11084if expr a : '\(a\)' >/dev/null 2>&1 &&
11085 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
11086 as_expr=expr
11087else
11088 as_expr=false
11089fi
d6e9fb05 11090
81ecdfbb 11091if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
11092 as_basename=basename
11093else
11094 as_basename=false
11095fi
d6e9fb05 11096
81ecdfbb
RW
11097if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11098 as_dirname=dirname
11099else
11100 as_dirname=false
11101fi
d6e9fb05 11102
81ecdfbb 11103as_me=`$as_basename -- "$0" ||
bec39cab
AC
11104$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11105 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
11106 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11107$as_echo X/"$0" |
11108 sed '/^.*\/\([^/][^/]*\)\/*$/{
11109 s//\1/
11110 q
11111 }
11112 /^X\/\(\/\/\)$/{
11113 s//\1/
11114 q
11115 }
11116 /^X\/\(\/\).*/{
11117 s//\1/
11118 q
11119 }
11120 s/.*/./; q'`
bec39cab 11121
dae5f5cf
DJ
11122# Avoid depending upon Character Ranges.
11123as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11124as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11125as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11126as_cr_digits='0123456789'
11127as_cr_alnum=$as_cr_Letters$as_cr_digits
11128
81ecdfbb
RW
11129ECHO_C= ECHO_N= ECHO_T=
11130case `echo -n x` in #(((((
11131-n*)
11132 case `echo 'xy\c'` in
11133 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11134 xy) ECHO_C='\c';;
11135 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11136 ECHO_T=' ';;
11137 esac;;
11138*)
11139 ECHO_N='-n';;
bec39cab
AC
11140esac
11141
81ecdfbb
RW
11142rm -f conf$$ conf$$.exe conf$$.file
11143if test -d conf$$.dir; then
11144 rm -f conf$$.dir/conf$$.file
bec39cab 11145else
81ecdfbb
RW
11146 rm -f conf$$.dir
11147 mkdir conf$$.dir 2>/dev/null
bec39cab 11148fi
81ecdfbb
RW
11149if (echo >conf$$.file) 2>/dev/null; then
11150 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 11151 as_ln_s='ln -s'
81ecdfbb
RW
11152 # ... but there are two gotchas:
11153 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11154 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 11155 # In both cases, we have to default to `cp -pR'.
81ecdfbb 11156 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 11157 as_ln_s='cp -pR'
81ecdfbb
RW
11158 elif ln conf$$.file conf$$ 2>/dev/null; then
11159 as_ln_s=ln
11160 else
d0ac1c44 11161 as_ln_s='cp -pR'
dae5f5cf 11162 fi
bec39cab 11163else
d0ac1c44 11164 as_ln_s='cp -pR'
bec39cab 11165fi
81ecdfbb
RW
11166rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11167rmdir conf$$.dir 2>/dev/null
11168
11169
11170# as_fn_mkdir_p
11171# -------------
11172# Create "$as_dir" as a directory, including parents if necessary.
11173as_fn_mkdir_p ()
11174{
11175
11176 case $as_dir in #(
11177 -*) as_dir=./$as_dir;;
11178 esac
11179 test -d "$as_dir" || eval $as_mkdir_p || {
11180 as_dirs=
11181 while :; do
11182 case $as_dir in #(
11183 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11184 *) as_qdir=$as_dir;;
11185 esac
11186 as_dirs="'$as_qdir' $as_dirs"
11187 as_dir=`$as_dirname -- "$as_dir" ||
11188$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11189 X"$as_dir" : 'X\(//\)[^/]' \| \
11190 X"$as_dir" : 'X\(//\)$' \| \
11191 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11192$as_echo X"$as_dir" |
11193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11194 s//\1/
11195 q
11196 }
11197 /^X\(\/\/\)[^/].*/{
11198 s//\1/
11199 q
11200 }
11201 /^X\(\/\/\)$/{
11202 s//\1/
11203 q
11204 }
11205 /^X\(\/\).*/{
11206 s//\1/
11207 q
11208 }
11209 s/.*/./; q'`
11210 test -d "$as_dir" && break
11211 done
11212 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 11213 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
bec39cab 11214
81ecdfbb
RW
11215
11216} # as_fn_mkdir_p
bec39cab 11217if mkdir -p . 2>/dev/null; then
81ecdfbb 11218 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
11219else
11220 test -d ./-p && rmdir ./-p
11221 as_mkdir_p=false
11222fi
11223
d0ac1c44
SM
11224
11225# as_fn_executable_p FILE
11226# -----------------------
11227# Test if FILE is an executable regular file.
11228as_fn_executable_p ()
11229{
11230 test -f "$1" && test -x "$1"
11231} # as_fn_executable_p
11232as_test_x='test -x'
11233as_executable_p=as_fn_executable_p
bec39cab
AC
11234
11235# Sed expression to map a string onto a valid CPP name.
11236as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11237
11238# Sed expression to map a string onto a valid variable name.
11239as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11240
11241
bec39cab 11242exec 6>&1
81ecdfbb
RW
11243## ----------------------------------- ##
11244## Main body of $CONFIG_STATUS script. ##
11245## ----------------------------------- ##
11246_ASEOF
11247test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11248
11249cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11250# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 11251# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
11252# values after options handling.
11253ac_log="
bec39cab 11254This file was extended by $as_me, which was
d0ac1c44 11255generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
11256
11257 CONFIG_FILES = $CONFIG_FILES
11258 CONFIG_HEADERS = $CONFIG_HEADERS
11259 CONFIG_LINKS = $CONFIG_LINKS
11260 CONFIG_COMMANDS = $CONFIG_COMMANDS
11261 $ $0 $@
11262
81ecdfbb
RW
11263on `(hostname || uname -n) 2>/dev/null | sed 1q`
11264"
11265
bec39cab
AC
11266_ACEOF
11267
81ecdfbb
RW
11268case $ac_config_files in *"
11269"*) set x $ac_config_files; shift; ac_config_files=$*;;
11270esac
bec39cab 11271
81ecdfbb
RW
11272case $ac_config_headers in *"
11273"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11274esac
dae5f5cf 11275
dae5f5cf 11276
81ecdfbb
RW
11277cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11278# Files that config.status was made for.
11279config_files="$ac_config_files"
11280config_headers="$ac_config_headers"
11281config_commands="$ac_config_commands"
bec39cab 11282
81ecdfbb 11283_ACEOF
dae5f5cf 11284
81ecdfbb 11285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 11286ac_cs_usage="\
81ecdfbb
RW
11287\`$as_me' instantiates files and other configuration actions
11288from templates according to the current configuration. Unless the files
11289and actions are specified as TAGs, all are instantiated by default.
bec39cab 11290
81ecdfbb 11291Usage: $0 [OPTION]... [TAG]...
bec39cab
AC
11292
11293 -h, --help print this help, then exit
81ecdfbb 11294 -V, --version print version number and configuration settings, then exit
d0ac1c44 11295 --config print configuration, then exit
81ecdfbb
RW
11296 -q, --quiet, --silent
11297 do not print progress messages
bec39cab
AC
11298 -d, --debug don't remove temporary files
11299 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
11300 --file=FILE[:TEMPLATE]
11301 instantiate the configuration file FILE
11302 --header=FILE[:TEMPLATE]
11303 instantiate the configuration header FILE
bec39cab
AC
11304
11305Configuration files:
11306$config_files
11307
11308Configuration headers:
11309$config_headers
11310
11311Configuration commands:
11312$config_commands
11313
81ecdfbb 11314Report bugs to the package provider."
dae5f5cf 11315
81ecdfbb
RW
11316_ACEOF
11317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 11318ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
11319ac_cs_version="\\
11320config.status
d0ac1c44
SM
11321configured by $0, generated by GNU Autoconf 2.69,
11322 with options \\"\$ac_cs_config\\"
bec39cab 11323
d0ac1c44 11324Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
11325This config.status script is free software; the Free Software Foundation
11326gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
11327
11328ac_pwd='$ac_pwd'
11329srcdir='$srcdir'
11330INSTALL='$INSTALL'
11331test -n "\$AWK" || AWK=awk
bec39cab
AC
11332_ACEOF
11333
81ecdfbb
RW
11334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11335# The default lists apply if the user does not specify any file.
bec39cab
AC
11336ac_need_defaults=:
11337while test $# != 0
11338do
11339 case $1 in
d0ac1c44 11340 --*=?*)
81ecdfbb
RW
11341 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11342 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab
AC
11343 ac_shift=:
11344 ;;
d0ac1c44
SM
11345 --*=)
11346 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11347 ac_optarg=
11348 ac_shift=:
11349 ;;
81ecdfbb 11350 *)
bec39cab
AC
11351 ac_option=$1
11352 ac_optarg=$2
11353 ac_shift=shift
11354 ;;
bec39cab
AC
11355 esac
11356
11357 case $ac_option in
11358 # Handling of the options.
bec39cab
AC
11359 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11360 ac_cs_recheck=: ;;
81ecdfbb
RW
11361 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11362 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
11363 --config | --confi | --conf | --con | --co | --c )
11364 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 11365 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
11366 debug=: ;;
11367 --file | --fil | --fi | --f )
11368 $ac_shift
81ecdfbb
RW
11369 case $ac_optarg in
11370 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 11371 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
11372 esac
11373 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
11374 ac_need_defaults=false;;
11375 --header | --heade | --head | --hea )
11376 $ac_shift
81ecdfbb
RW
11377 case $ac_optarg in
11378 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11379 esac
11380 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 11381 ac_need_defaults=false;;
81ecdfbb
RW
11382 --he | --h)
11383 # Conflict between --help and --header
d0ac1c44 11384 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
11385Try \`$0 --help' for more information.";;
11386 --help | --hel | -h )
11387 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
11388 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11389 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11390 ac_cs_silent=: ;;
11391
11392 # This is an error.
d0ac1c44 11393 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 11394Try \`$0 --help' for more information." ;;
bec39cab 11395
81ecdfbb
RW
11396 *) as_fn_append ac_config_targets " $1"
11397 ac_need_defaults=false ;;
bec39cab
AC
11398
11399 esac
11400 shift
d6e9fb05 11401done
bec39cab
AC
11402
11403ac_configure_extra_args=
11404
11405if $ac_cs_silent; then
11406 exec 6>/dev/null
11407 ac_configure_extra_args="$ac_configure_extra_args --silent"
d6e9fb05 11408fi
d6e9fb05 11409
bec39cab 11410_ACEOF
81ecdfbb 11411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 11412if \$ac_cs_recheck; then
d0ac1c44 11413 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
11414 shift
11415 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11416 CONFIG_SHELL='$SHELL'
11417 export CONFIG_SHELL
11418 exec "\$@"
bec39cab 11419fi
d6e9fb05 11420
bec39cab 11421_ACEOF
81ecdfbb
RW
11422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11423exec 5>>config.log
11424{
11425 echo
11426 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11427## Running $as_me. ##
11428_ASBOX
11429 $as_echo "$ac_log"
11430} >&5
bec39cab 11431
81ecdfbb
RW
11432_ACEOF
11433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61c125b9
TT
11434#
11435# INIT-COMMANDS
11436#
11437ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
60d6cfc9 11438ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
61c125b9 11439
81ecdfbb 11440_ACEOF
bec39cab 11441
81ecdfbb 11442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80864fb 11443
81ecdfbb 11444# Handling of arguments.
bec39cab
AC
11445for ac_config_target in $ac_config_targets
11446do
81ecdfbb
RW
11447 case $ac_config_target in
11448 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
61c125b9 11449 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
60d6cfc9 11450 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
81ecdfbb 11451 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
81ecdfbb 11452
d0ac1c44 11453 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
d6e9fb05 11454 esac
bec39cab
AC
11455done
11456
81ecdfbb 11457
bec39cab
AC
11458# If the user did not use the arguments to specify the items to instantiate,
11459# then the envvar interface is used. Set only those that are not.
11460# We use the long form for the default assignment because of an extremely
11461# bizarre bug on SunOS 4.1.3.
11462if $ac_need_defaults; then
11463 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11464 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11465 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11466fi
d6e9fb05 11467
bec39cab 11468# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 11469# simply because there is no reason against having it here, and in addition,
bec39cab 11470# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
11471# Hook for its removal unless debugging.
11472# Note that there is a small window in which the directory will not be cleaned:
11473# after its creation but before its name has been assigned to `$tmp'.
bec39cab
AC
11474$debug ||
11475{
d0ac1c44 11476 tmp= ac_tmp=
81ecdfbb 11477 trap 'exit_status=$?
d0ac1c44
SM
11478 : "${ac_tmp:=$tmp}"
11479 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
11480' 0
11481 trap 'as_fn_exit 1' 1 2 13 15
bec39cab 11482}
bec39cab
AC
11483# Create a (secure) tmp directory for tmp files.
11484
11485{
81ecdfbb 11486 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 11487 test -d "$tmp"
bec39cab
AC
11488} ||
11489{
81ecdfbb
RW
11490 tmp=./conf$$-$RANDOM
11491 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
11492} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11493ac_tmp=$tmp
81ecdfbb
RW
11494
11495# Set up the scripts for CONFIG_FILES section.
11496# No need to generate them if there are no CONFIG_FILES.
11497# This happens for instance with `./config.status config.h'.
11498if test -n "$CONFIG_FILES"; then
11499
11500
11501ac_cr=`echo X | tr X '\015'`
11502# On cygwin, bash can eat \r inside `` if the user requested igncr.
11503# But we know of no other shell where ac_cr would be empty at this
11504# point, so we can use a bashism as a fallback.
11505if test "x$ac_cr" = x; then
11506 eval ac_cr=\$\'\\r\'
11507fi
11508ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11509if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 11510 ac_cs_awk_cr='\\r'
81ecdfbb
RW
11511else
11512 ac_cs_awk_cr=$ac_cr
11513fi
11514
d0ac1c44 11515echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
11516_ACEOF
11517
11518
11519{
11520 echo "cat >conf$$subs.awk <<_ACEOF" &&
11521 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11522 echo "_ACEOF"
11523} >conf$$subs.sh ||
d0ac1c44
SM
11524 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11525ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
11526ac_delim='%!_!# '
11527for ac_last_try in false false false false false :; do
11528 . ./conf$$subs.sh ||
d0ac1c44 11529 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
11530
11531 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11532 if test $ac_delim_n = $ac_delim_num; then
11533 break
11534 elif $ac_last_try; then
d0ac1c44 11535 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
11536 else
11537 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11538 fi
11539done
11540rm -f conf$$subs.sh
11541
11542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 11543cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
11544_ACEOF
11545sed -n '
11546h
11547s/^/S["/; s/!.*/"]=/
11548p
11549g
11550s/^[^!]*!//
11551:repl
11552t repl
11553s/'"$ac_delim"'$//
11554t delim
11555:nl
11556h
d0ac1c44 11557s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
11558t more1
11559s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11560p
11561n
11562b repl
11563:more1
11564s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11565p
11566g
11567s/.\{148\}//
11568t nl
11569:delim
11570h
d0ac1c44 11571s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
11572t more2
11573s/["\\]/\\&/g; s/^/"/; s/$/"/
11574p
11575b
11576:more2
11577s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11578p
11579g
11580s/.\{148\}//
11581t delim
11582' <conf$$subs.awk | sed '
11583/^[^""]/{
11584 N
11585 s/\n//
11586}
11587' >>$CONFIG_STATUS || ac_write_fail=1
11588rm -f conf$$subs.awk
11589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11590_ACAWK
d0ac1c44 11591cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
11592 for (key in S) S_is_set[key] = 1
11593 FS = "\a"
11594
11595}
bec39cab 11596{
81ecdfbb
RW
11597 line = $ 0
11598 nfields = split(line, field, "@")
11599 substed = 0
11600 len = length(field[1])
11601 for (i = 2; i < nfields; i++) {
11602 key = field[i]
11603 keylen = length(key)
11604 if (S_is_set[key]) {
11605 value = S[key]
11606 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11607 len += length(value) + length(field[++i])
11608 substed = 1
11609 } else
11610 len += 1 + keylen
11611 }
11612
11613 print line
bec39cab
AC
11614}
11615
81ecdfbb
RW
11616_ACAWK
11617_ACEOF
11618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11619if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11620 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11621else
11622 cat
d0ac1c44
SM
11623fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11624 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
dae5f5cf
DJ
11625_ACEOF
11626
d0ac1c44
SM
11627# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11628# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
11629# trailing colons and then remove the whole line if VPATH becomes empty
11630# (actually we leave an empty line to preserve line numbers).
11631if test "x$srcdir" = x.; then
d0ac1c44
SM
11632 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11633h
11634s///
11635s/^/:/
11636s/[ ]*$/:/
11637s/:\$(srcdir):/:/g
11638s/:\${srcdir}:/:/g
11639s/:@srcdir@:/:/g
11640s/^:*//
81ecdfbb 11641s/:*$//
d0ac1c44
SM
11642x
11643s/\(=[ ]*\).*/\1/
11644G
11645s/\n//
81ecdfbb
RW
11646s/^[^=]*=[ ]*$//
11647}'
11648fi
bec39cab 11649
81ecdfbb
RW
11650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11651fi # test -n "$CONFIG_FILES"
bec39cab 11652
81ecdfbb
RW
11653# Set up the scripts for CONFIG_HEADERS section.
11654# No need to generate them if there are no CONFIG_HEADERS.
11655# This happens for instance with `./config.status Makefile'.
11656if test -n "$CONFIG_HEADERS"; then
d0ac1c44 11657cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb 11658BEGIN {
b80864fb
DJ
11659_ACEOF
11660
81ecdfbb
RW
11661# Transform confdefs.h into an awk script `defines.awk', embedded as
11662# here-document in config.status, that substitutes the proper values into
11663# config.h.in to produce config.h.
11664
11665# Create a delimiter string that does not exist in confdefs.h, to ease
11666# handling of long lines.
11667ac_delim='%!_!# '
11668for ac_last_try in false false :; do
d0ac1c44
SM
11669 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11670 if test -z "$ac_tt"; then
81ecdfbb
RW
11671 break
11672 elif $ac_last_try; then
d0ac1c44 11673 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
11674 else
11675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
d6e9fb05 11676 fi
81ecdfbb 11677done
d6e9fb05 11678
81ecdfbb
RW
11679# For the awk script, D is an array of macro values keyed by name,
11680# likewise P contains macro parameters if any. Preserve backslash
11681# newline sequences.
11682
11683ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11684sed -n '
11685s/.\{148\}/&'"$ac_delim"'/g
11686t rset
11687:rset
11688s/^[ ]*#[ ]*define[ ][ ]*/ /
11689t def
11690d
11691:def
11692s/\\$//
11693t bsnl
11694s/["\\]/\\&/g
11695s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11696D["\1"]=" \3"/p
11697s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11698d
11699:bsnl
11700s/["\\]/\\&/g
11701s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11702D["\1"]=" \3\\\\\\n"\\/p
11703t cont
11704s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11705t cont
11706d
11707:cont
11708n
11709s/.\{148\}/&'"$ac_delim"'/g
11710t clear
11711:clear
11712s/\\$//
11713t bsnlc
11714s/["\\]/\\&/g; s/^/"/; s/$/"/p
11715d
11716:bsnlc
11717s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11718b cont
11719' <confdefs.h | sed '
11720s/'"$ac_delim"'/"\\\
11721"/g' >>$CONFIG_STATUS || ac_write_fail=1
11722
11723cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11724 for (key in D) D_is_set[key] = 1
11725 FS = "\a"
11726}
11727/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11728 line = \$ 0
11729 split(line, arg, " ")
11730 if (arg[1] == "#") {
11731 defundef = arg[2]
11732 mac1 = arg[3]
11733 } else {
11734 defundef = substr(arg[1], 2)
11735 mac1 = arg[2]
11736 }
11737 split(mac1, mac2, "(") #)
11738 macro = mac2[1]
11739 prefix = substr(line, 1, index(line, defundef) - 1)
11740 if (D_is_set[macro]) {
11741 # Preserve the white space surrounding the "#".
11742 print prefix "define", macro P[macro] D[macro]
11743 next
11744 } else {
11745 # Replace #undef with comments. This is necessary, for example,
11746 # in the case of _POSIX_SOURCE, which is predefined and required
11747 # on some systems where configure will not decide to define it.
11748 if (defundef == "undef") {
11749 print "/*", prefix defundef, macro, "*/"
11750 next
11751 }
11752 }
11753}
11754{ print }
11755_ACAWK
bec39cab 11756_ACEOF
81ecdfbb 11757cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 11758 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb
RW
11759fi # test -n "$CONFIG_HEADERS"
11760
11761
11762eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
11763shift
11764for ac_tag
11765do
11766 case $ac_tag in
11767 :[FHLC]) ac_mode=$ac_tag; continue;;
11768 esac
11769 case $ac_mode$ac_tag in
11770 :[FHL]*:*);;
d0ac1c44 11771 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
11772 :[FH]-) ac_tag=-:-;;
11773 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11774 esac
11775 ac_save_IFS=$IFS
11776 IFS=:
11777 set x $ac_tag
11778 IFS=$ac_save_IFS
11779 shift
11780 ac_file=$1
11781 shift
11782
11783 case $ac_mode in
11784 :L) ac_source=$1;;
11785 :[FH])
11786 ac_file_inputs=
11787 for ac_f
11788 do
11789 case $ac_f in
d0ac1c44 11790 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
11791 *) # Look for the file first in the build tree, then in the source tree
11792 # (if the path is not absolute). The absolute path cannot be DOS-style,
11793 # because $ac_f cannot contain `:'.
11794 test -f "$ac_f" ||
11795 case $ac_f in
11796 [\\/$]*) false;;
11797 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11798 esac ||
d0ac1c44 11799 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
11800 esac
11801 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11802 as_fn_append ac_file_inputs " '$ac_f'"
11803 done
11804
11805 # Let's still pretend it is `configure' which instantiates (i.e., don't
11806 # use $as_me), people would be surprised to read:
11807 # /* config.h. Generated by config.status. */
11808 configure_input='Generated from '`
11809 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11810 `' by configure.'
11811 if test x"$ac_file" != x-; then
11812 configure_input="$ac_file. $configure_input"
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11814$as_echo "$as_me: creating $ac_file" >&6;}
11815 fi
11816 # Neutralize special characters interpreted by sed in replacement strings.
11817 case $configure_input in #(
11818 *\&* | *\|* | *\\* )
11819 ac_sed_conf_input=`$as_echo "$configure_input" |
11820 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11821 *) ac_sed_conf_input=$configure_input;;
11822 esac
11823
11824 case $ac_tag in
d0ac1c44
SM
11825 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11826 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
11827 esac
11828 ;;
d6e9fb05
JK
11829 esac
11830
81ecdfbb 11831 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
11832$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11833 X"$ac_file" : 'X\(//\)[^/]' \| \
11834 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
11835 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11836$as_echo X"$ac_file" |
11837 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11838 s//\1/
11839 q
11840 }
11841 /^X\(\/\/\)[^/].*/{
11842 s//\1/
11843 q
11844 }
11845 /^X\(\/\/\)$/{
11846 s//\1/
11847 q
11848 }
11849 /^X\(\/\).*/{
11850 s//\1/
11851 q
11852 }
11853 s/.*/./; q'`
11854 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
11855 ac_builddir=.
11856
81ecdfbb
RW
11857case "$ac_dir" in
11858.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11859*)
11860 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11861 # A ".." for each directory in $ac_dir_suffix.
11862 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11863 case $ac_top_builddir_sub in
11864 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11865 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11866 esac ;;
11867esac
11868ac_abs_top_builddir=$ac_pwd
11869ac_abs_builddir=$ac_pwd$ac_dir_suffix
11870# for backward compatibility:
11871ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
11872
11873case $srcdir in
81ecdfbb 11874 .) # We are building in place.
bec39cab 11875 ac_srcdir=.
81ecdfbb
RW
11876 ac_top_srcdir=$ac_top_builddir_sub
11877 ac_abs_top_srcdir=$ac_pwd ;;
11878 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 11879 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
11880 ac_top_srcdir=$srcdir
11881 ac_abs_top_srcdir=$srcdir ;;
11882 *) # Relative name.
11883 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11884 ac_top_srcdir=$ac_top_build_prefix$srcdir
11885 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 11886esac
81ecdfbb 11887ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 11888
bec39cab 11889
81ecdfbb
RW
11890 case $ac_mode in
11891 :F)
11892 #
11893 # CONFIG_FILE
11894 #
d6e9fb05 11895
bec39cab
AC
11896 case $INSTALL in
11897 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 11898 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
d6e9fb05 11899 esac
81ecdfbb 11900_ACEOF
3db0444b 11901
81ecdfbb
RW
11902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11903# If the template does not know about datarootdir, expand it.
11904# FIXME: This hack should be removed a few years after 2.60.
11905ac_datarootdir_hack=; ac_datarootdir_seen=
11906ac_sed_dataroot='
11907/datarootdir/ {
11908 p
11909 q
11910}
11911/@datadir@/p
11912/@docdir@/p
11913/@infodir@/p
11914/@localedir@/p
11915/@mandir@/p'
11916case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
11917*datarootdir*) ac_datarootdir_seen=yes;;
11918*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11920$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11921_ACEOF
11922cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11923 ac_datarootdir_hack='
11924 s&@datadir@&$datadir&g
11925 s&@docdir@&$docdir&g
11926 s&@infodir@&$infodir&g
11927 s&@localedir@&$localedir&g
11928 s&@mandir@&$mandir&g
11929 s&\\\${datarootdir}&$datarootdir&g' ;;
11930esac
bec39cab 11931_ACEOF
81ecdfbb
RW
11932
11933# Neutralize VPATH when `$srcdir' = `.'.
11934# Shell code in configure.ac might set extrasub.
11935# FIXME: do we really want to maintain this feature?
11936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11937ac_sed_extra="$ac_vpsub
bec39cab
AC
11938$extrasub
11939_ACEOF
81ecdfbb 11940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
11941:t
11942/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
11943s|@configure_input@|$ac_sed_conf_input|;t t
11944s&@top_builddir@&$ac_top_builddir_sub&;t t
11945s&@top_build_prefix@&$ac_top_build_prefix&;t t
11946s&@srcdir@&$ac_srcdir&;t t
11947s&@abs_srcdir@&$ac_abs_srcdir&;t t
11948s&@top_srcdir@&$ac_top_srcdir&;t t
11949s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11950s&@builddir@&$ac_builddir&;t t
11951s&@abs_builddir@&$ac_abs_builddir&;t t
11952s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11953s&@INSTALL@&$ac_INSTALL&;t t
11954$ac_datarootdir_hack
11955"
d0ac1c44
SM
11956eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11957 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
11958
11959test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
11960 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11961 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
11962 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 11963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 11964which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 11965$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 11966which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 11967
d0ac1c44 11968 rm -f "$ac_tmp/stdin"
bec39cab 11969 case $ac_file in
d0ac1c44
SM
11970 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11971 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 11972 esac \
d0ac1c44 11973 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
11974 ;;
11975 :H)
11976 #
11977 # CONFIG_HEADER
11978 #
bec39cab 11979 if test x"$ac_file" != x-; then
81ecdfbb
RW
11980 {
11981 $as_echo "/* $configure_input */" \
d0ac1c44
SM
11982 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
11983 } >"$ac_tmp/config.h" \
11984 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11985 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
11987$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 11988 else
81ecdfbb 11989 rm -f "$ac_file"
d0ac1c44
SM
11990 mv "$ac_tmp/config.h" "$ac_file" \
11991 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
84563040 11992 fi
bec39cab 11993 else
81ecdfbb 11994 $as_echo "/* $configure_input */" \
d0ac1c44
SM
11995 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
11996 || as_fn_error $? "could not create -" "$LINENO" 5
d6e9fb05 11997 fi
81ecdfbb 11998 ;;
dae5f5cf 11999
81ecdfbb
RW
12000 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12001$as_echo "$as_me: executing $ac_file commands" >&6;}
12002 ;;
12003 esac
dae5f5cf
DJ
12004
12005
81ecdfbb 12006 case $ac_file$ac_mode in
c5adaa19 12007 "config.h":H) echo > stamp-h ;;
61c125b9 12008 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
60d6cfc9
YQ
12009 "gdbdepdir":C)
12010 for subdir in ${CONFIG_SRC_SUBDIR}
12011 do
12012 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
12013 done ;;
81ecdfbb 12014
bec39cab 12015 esac
81ecdfbb 12016done # for ac_tag
d6e9fb05 12017
bec39cab 12018
81ecdfbb 12019as_fn_exit 0
bec39cab 12020_ACEOF
bec39cab
AC
12021ac_clean_files=$ac_clean_files_save
12022
81ecdfbb 12023test $ac_write_fail = 0 ||
d0ac1c44 12024 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 12025
bec39cab
AC
12026
12027# configure is writing to config.log, and then calls config.status.
12028# config.status does its own redirection, appending to config.log.
12029# Unfortunately, on DOS this fails, as config.log is still kept open
12030# by configure, so config.status won't be able to write to it; its
12031# output is simply discarded. So we exec the FD to /dev/null,
12032# effectively closing config.log, so it can be properly (re)opened and
12033# appended to by config.status. When coming back to configure, we
12034# need to make the FD available again.
12035if test "$no_create" != yes; then
12036 ac_cs_success=:
12037 ac_config_status_args=
12038 test "$silent" = yes &&
12039 ac_config_status_args="$ac_config_status_args --quiet"
12040 exec 5>/dev/null
12041 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12042 exec 5>>config.log
12043 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12044 # would make configure fail if this is the last instruction.
d0ac1c44 12045 $ac_cs_success || as_fn_exit 1
81ecdfbb
RW
12046fi
12047if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12049$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
bec39cab 12050fi
d6e9fb05 12051
This page took 2.25208 seconds and 4 git commands to generate.