Add -Wstrict-null-sentinel to gdbsupport/warning.m4
[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
AC
584
585ac_unique_file="server.c"
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
05ea2a05
TT
640LTLIBIPT
641LIBIPT
642HAVE_LIBIPT
5e030278
TT
643PTHREAD_CFLAGS
644PTHREAD_LIBS
645PTHREAD_CC
646ax_pthread_config
647SED
9c232dda 648ALLOCA
61c125b9 649CCDEPMODE
60d6cfc9 650CONFIG_SRC_SUBDIR
61c125b9
TT
651DEPDIR
652am__leading_dot
bd885420
YQ
653host_noncanonical
654target_noncanonical
0bcda685
PA
655CXX_DIALECT
656HAVE_CXX11
c971b7fa 657RANLIB
e1d2394b 658AR
81ecdfbb
RW
659INSTALL_DATA
660INSTALL_SCRIPT
661INSTALL_PROGRAM
662target_os
663target_vendor
664target_cpu
665target
666host_os
667host_vendor
668host_cpu
669host
670build_os
671build_vendor
672build_cpu
673build
bdaed379
HD
674INSTALL_STRIP_PROGRAM
675STRIP
676install_sh
770d76d7
PA
677EGREP
678GREP
679CPP
3bc3d82a
PA
680ac_ct_CXX
681CXXFLAGS
682CXX
81ecdfbb
RW
683OBJEXT
684EXEEXT
685ac_ct_CC
686CPPFLAGS
687LDFLAGS
688CFLAGS
689CC
c9a1864a
YQ
690MAINT
691MAINTAINER_MODE_FALSE
692MAINTAINER_MODE_TRUE
81ecdfbb
RW
693target_alias
694host_alias
695build_alias
696LIBS
697ECHO_T
698ECHO_N
699ECHO_C
700DEFS
701mandir
702localedir
703libdir
704psdir
705pdfdir
706dvidir
707htmldir
708infodir
709docdir
710oldincludedir
711includedir
712localstatedir
713sharedstatedir
714sysconfdir
715datadir
716datarootdir
717libexecdir
718sbindir
719bindir
720program_transform_name
721prefix
722exec_prefix
723PACKAGE_URL
724PACKAGE_BUGREPORT
725PACKAGE_STRING
726PACKAGE_VERSION
727PACKAGE_TARNAME
728PACKAGE_NAME
729PATH_SEPARATOR
730SHELL'
bec39cab 731ac_subst_files=''
81ecdfbb
RW
732ac_user_opts='
733enable_option_checking
c9a1864a 734enable_maintainer_mode
589bc927 735enable_largefile
8ecfd7bd 736enable_unit_tests
05ea2a05
TT
737with_intel_pt
738with_gnu_ld
739enable_rpath
740with_libipt_prefix
0fb4aa4b
PA
741with_ust
742with_ust_include
743with_ust_lib
d4596a3d 744enable_werror
8f13a3ce
MF
745enable_build_warnings
746enable_gdb_build_warnings
81ecdfbb
RW
747with_pkgversion
748with_bugurl
96f15937 749with_libthread_db
c2a66c29 750enable_inprocess_agent
81ecdfbb
RW
751'
752 ac_precious_vars='build_alias
753host_alias
754target_alias
755CC
756CFLAGS
757LDFLAGS
758LIBS
759CPPFLAGS
3bc3d82a
PA
760CXX
761CXXFLAGS
762CCC
81ecdfbb
RW
763CPP'
764
d6e9fb05
JK
765
766# Initialize some variables set by options.
bec39cab
AC
767ac_init_help=
768ac_init_version=false
81ecdfbb
RW
769ac_unrecognized_opts=
770ac_unrecognized_sep=
d6e9fb05
JK
771# The variables have the same names as the options, with
772# dashes changed to underlines.
bec39cab 773cache_file=/dev/null
d6e9fb05 774exec_prefix=NONE
d6e9fb05 775no_create=
d6e9fb05
JK
776no_recursion=
777prefix=NONE
778program_prefix=NONE
779program_suffix=NONE
780program_transform_name=s,x,x,
781silent=
782site=
783srcdir=
d6e9fb05
JK
784verbose=
785x_includes=NONE
786x_libraries=NONE
bec39cab
AC
787
788# Installation directory options.
789# These are left unexpanded so users can "make install exec_prefix=/foo"
790# and all the variables that are supposed to be based on exec_prefix
791# by default will actually change.
792# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 793# (The list follows the same order as the GNU Coding Standards.)
d6e9fb05
JK
794bindir='${exec_prefix}/bin'
795sbindir='${exec_prefix}/sbin'
796libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
797datarootdir='${prefix}/share'
798datadir='${datarootdir}'
d6e9fb05
JK
799sysconfdir='${prefix}/etc'
800sharedstatedir='${prefix}/com'
801localstatedir='${prefix}/var'
d6e9fb05
JK
802includedir='${prefix}/include'
803oldincludedir='/usr/include'
81ecdfbb
RW
804docdir='${datarootdir}/doc/${PACKAGE}'
805infodir='${datarootdir}/info'
806htmldir='${docdir}'
807dvidir='${docdir}'
808pdfdir='${docdir}'
809psdir='${docdir}'
810libdir='${exec_prefix}/lib'
811localedir='${datarootdir}/locale'
812mandir='${datarootdir}/man'
d6e9fb05 813
d6e9fb05 814ac_prev=
81ecdfbb 815ac_dashdash=
d6e9fb05
JK
816for ac_option
817do
d6e9fb05
JK
818 # If the previous option needs an argument, assign it.
819 if test -n "$ac_prev"; then
81ecdfbb 820 eval $ac_prev=\$ac_option
d6e9fb05
JK
821 ac_prev=
822 continue
823 fi
824
81ecdfbb 825 case $ac_option in
d0ac1c44
SM
826 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
827 *=) ac_optarg= ;;
828 *) ac_optarg=yes ;;
81ecdfbb 829 esac
d6e9fb05
JK
830
831 # Accept the important Cygnus configure options, so we can diagnose typos.
832
81ecdfbb
RW
833 case $ac_dashdash$ac_option in
834 --)
835 ac_dashdash=yes ;;
d6e9fb05
JK
836
837 -bindir | --bindir | --bindi | --bind | --bin | --bi)
838 ac_prev=bindir ;;
839 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 840 bindir=$ac_optarg ;;
d6e9fb05
JK
841
842 -build | --build | --buil | --bui | --bu)
bec39cab 843 ac_prev=build_alias ;;
d6e9fb05 844 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 845 build_alias=$ac_optarg ;;
d6e9fb05
JK
846
847 -cache-file | --cache-file | --cache-fil | --cache-fi \
848 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
849 ac_prev=cache_file ;;
850 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
851 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
852 cache_file=$ac_optarg ;;
853
854 --config-cache | -C)
855 cache_file=config.cache ;;
d6e9fb05 856
81ecdfbb 857 -datadir | --datadir | --datadi | --datad)
d6e9fb05 858 ac_prev=datadir ;;
81ecdfbb 859 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 860 datadir=$ac_optarg ;;
d6e9fb05 861
81ecdfbb
RW
862 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
863 | --dataroo | --dataro | --datar)
864 ac_prev=datarootdir ;;
865 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
866 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
867 datarootdir=$ac_optarg ;;
868
d6e9fb05 869 -disable-* | --disable-*)
81ecdfbb 870 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
d6e9fb05 871 # Reject names that are not valid shell variable names.
81ecdfbb 872 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 873 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
874 ac_useropt_orig=$ac_useropt
875 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
876 case $ac_user_opts in
877 *"
878"enable_$ac_useropt"
879"*) ;;
880 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
881 ac_unrecognized_sep=', ';;
882 esac
883 eval enable_$ac_useropt=no ;;
884
885 -docdir | --docdir | --docdi | --doc | --do)
886 ac_prev=docdir ;;
887 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
888 docdir=$ac_optarg ;;
889
890 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
891 ac_prev=dvidir ;;
892 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
893 dvidir=$ac_optarg ;;
d6e9fb05
JK
894
895 -enable-* | --enable-*)
81ecdfbb 896 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
d6e9fb05 897 # Reject names that are not valid shell variable names.
81ecdfbb 898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 899 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
900 ac_useropt_orig=$ac_useropt
901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902 case $ac_user_opts in
903 *"
904"enable_$ac_useropt"
905"*) ;;
906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
907 ac_unrecognized_sep=', ';;
dae5f5cf 908 esac
81ecdfbb 909 eval enable_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
910
911 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
912 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
913 | --exec | --exe | --ex)
914 ac_prev=exec_prefix ;;
915 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
916 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
917 | --exec=* | --exe=* | --ex=*)
bec39cab 918 exec_prefix=$ac_optarg ;;
d6e9fb05
JK
919
920 -gas | --gas | --ga | --g)
921 # Obsolete; use --with-gas.
922 with_gas=yes ;;
923
bec39cab
AC
924 -help | --help | --hel | --he | -h)
925 ac_init_help=long ;;
926 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
927 ac_init_help=recursive ;;
928 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
929 ac_init_help=short ;;
d6e9fb05
JK
930
931 -host | --host | --hos | --ho)
bec39cab 932 ac_prev=host_alias ;;
d6e9fb05 933 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 934 host_alias=$ac_optarg ;;
d6e9fb05 935
81ecdfbb
RW
936 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
937 ac_prev=htmldir ;;
938 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
939 | --ht=*)
940 htmldir=$ac_optarg ;;
941
d6e9fb05
JK
942 -includedir | --includedir | --includedi | --included | --include \
943 | --includ | --inclu | --incl | --inc)
944 ac_prev=includedir ;;
945 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
946 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 947 includedir=$ac_optarg ;;
d6e9fb05
JK
948
949 -infodir | --infodir | --infodi | --infod | --info | --inf)
950 ac_prev=infodir ;;
951 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 952 infodir=$ac_optarg ;;
d6e9fb05
JK
953
954 -libdir | --libdir | --libdi | --libd)
955 ac_prev=libdir ;;
956 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 957 libdir=$ac_optarg ;;
d6e9fb05
JK
958
959 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
960 | --libexe | --libex | --libe)
961 ac_prev=libexecdir ;;
962 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
963 | --libexe=* | --libex=* | --libe=*)
bec39cab 964 libexecdir=$ac_optarg ;;
d6e9fb05 965
81ecdfbb
RW
966 -localedir | --localedir | --localedi | --localed | --locale)
967 ac_prev=localedir ;;
968 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
969 localedir=$ac_optarg ;;
970
d6e9fb05 971 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 972 | --localstate | --localstat | --localsta | --localst | --locals)
d6e9fb05
JK
973 ac_prev=localstatedir ;;
974 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 975 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 976 localstatedir=$ac_optarg ;;
d6e9fb05
JK
977
978 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
979 ac_prev=mandir ;;
980 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 981 mandir=$ac_optarg ;;
d6e9fb05
JK
982
983 -nfp | --nfp | --nf)
984 # Obsolete; use --without-fp.
985 with_fp=no ;;
986
987 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 988 | --no-cr | --no-c | -n)
d6e9fb05
JK
989 no_create=yes ;;
990
991 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
993 no_recursion=yes ;;
994
995 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
996 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
997 | --oldin | --oldi | --old | --ol | --o)
998 ac_prev=oldincludedir ;;
999 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1000 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1001 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1002 oldincludedir=$ac_optarg ;;
d6e9fb05
JK
1003
1004 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1005 ac_prev=prefix ;;
1006 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1007 prefix=$ac_optarg ;;
d6e9fb05
JK
1008
1009 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1010 | --program-pre | --program-pr | --program-p)
1011 ac_prev=program_prefix ;;
1012 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1013 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1014 program_prefix=$ac_optarg ;;
d6e9fb05
JK
1015
1016 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1017 | --program-suf | --program-su | --program-s)
1018 ac_prev=program_suffix ;;
1019 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1020 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1021 program_suffix=$ac_optarg ;;
d6e9fb05
JK
1022
1023 -program-transform-name | --program-transform-name \
1024 | --program-transform-nam | --program-transform-na \
1025 | --program-transform-n | --program-transform- \
1026 | --program-transform | --program-transfor \
1027 | --program-transfo | --program-transf \
1028 | --program-trans | --program-tran \
1029 | --progr-tra | --program-tr | --program-t)
1030 ac_prev=program_transform_name ;;
1031 -program-transform-name=* | --program-transform-name=* \
1032 | --program-transform-nam=* | --program-transform-na=* \
1033 | --program-transform-n=* | --program-transform-=* \
1034 | --program-transform=* | --program-transfor=* \
1035 | --program-transfo=* | --program-transf=* \
1036 | --program-trans=* | --program-tran=* \
1037 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1038 program_transform_name=$ac_optarg ;;
d6e9fb05 1039
81ecdfbb
RW
1040 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1041 ac_prev=pdfdir ;;
1042 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1043 pdfdir=$ac_optarg ;;
1044
1045 -psdir | --psdir | --psdi | --psd | --ps)
1046 ac_prev=psdir ;;
1047 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1048 psdir=$ac_optarg ;;
1049
d6e9fb05
JK
1050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1051 | -silent | --silent | --silen | --sile | --sil)
1052 silent=yes ;;
1053
1054 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1055 ac_prev=sbindir ;;
1056 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1057 | --sbi=* | --sb=*)
bec39cab 1058 sbindir=$ac_optarg ;;
d6e9fb05
JK
1059
1060 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1061 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1062 | --sharedst | --shareds | --shared | --share | --shar \
1063 | --sha | --sh)
1064 ac_prev=sharedstatedir ;;
1065 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1066 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1067 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1068 | --sha=* | --sh=*)
bec39cab 1069 sharedstatedir=$ac_optarg ;;
d6e9fb05
JK
1070
1071 -site | --site | --sit)
1072 ac_prev=site ;;
1073 -site=* | --site=* | --sit=*)
bec39cab 1074 site=$ac_optarg ;;
434c4c77 1075
d6e9fb05
JK
1076 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1077 ac_prev=srcdir ;;
1078 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1079 srcdir=$ac_optarg ;;
d6e9fb05
JK
1080
1081 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1082 | --syscon | --sysco | --sysc | --sys | --sy)
1083 ac_prev=sysconfdir ;;
1084 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1085 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1086 sysconfdir=$ac_optarg ;;
d6e9fb05
JK
1087
1088 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1089 ac_prev=target_alias ;;
d6e9fb05 1090 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1091 target_alias=$ac_optarg ;;
d6e9fb05
JK
1092
1093 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1094 verbose=yes ;;
1095
bec39cab
AC
1096 -version | --version | --versio | --versi | --vers | -V)
1097 ac_init_version=: ;;
d6e9fb05
JK
1098
1099 -with-* | --with-*)
81ecdfbb 1100 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
d6e9fb05 1101 # Reject names that are not valid shell variable names.
81ecdfbb 1102 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1103 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1104 ac_useropt_orig=$ac_useropt
1105 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1106 case $ac_user_opts in
1107 *"
1108"with_$ac_useropt"
1109"*) ;;
1110 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1111 ac_unrecognized_sep=', ';;
dae5f5cf 1112 esac
81ecdfbb 1113 eval with_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
1114
1115 -without-* | --without-*)
81ecdfbb 1116 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
d6e9fb05 1117 # Reject names that are not valid shell variable names.
81ecdfbb 1118 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1119 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1120 ac_useropt_orig=$ac_useropt
1121 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1122 case $ac_user_opts in
1123 *"
1124"with_$ac_useropt"
1125"*) ;;
1126 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1127 ac_unrecognized_sep=', ';;
1128 esac
1129 eval with_$ac_useropt=no ;;
d6e9fb05
JK
1130
1131 --x)
1132 # Obsolete; use --with-x.
1133 with_x=yes ;;
1134
1135 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136 | --x-incl | --x-inc | --x-in | --x-i)
1137 ac_prev=x_includes ;;
1138 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1140 x_includes=$ac_optarg ;;
d6e9fb05
JK
1141
1142 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144 ac_prev=x_libraries ;;
1145 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1147 x_libraries=$ac_optarg ;;
d6e9fb05 1148
d0ac1c44
SM
1149 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1150Try \`$0 --help' for more information"
d6e9fb05
JK
1151 ;;
1152
bec39cab
AC
1153 *=*)
1154 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1155 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1156 case $ac_envvar in #(
1157 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1158 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1159 esac
1160 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1161 export $ac_envvar ;;
1162
d6e9fb05 1163 *)
bec39cab 1164 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1165 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1166 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1167 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1168 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
d6e9fb05
JK
1169 ;;
1170
1171 esac
1172done
1173
1174if test -n "$ac_prev"; then
bec39cab 1175 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1176 as_fn_error $? "missing argument to $ac_option"
d6e9fb05 1177fi
d6e9fb05 1178
81ecdfbb
RW
1179if test -n "$ac_unrecognized_opts"; then
1180 case $enable_option_checking in
1181 no) ;;
d0ac1c44 1182 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1183 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
dae5f5cf 1184 esac
81ecdfbb 1185fi
dae5f5cf 1186
81ecdfbb
RW
1187# Check all directory arguments for consistency.
1188for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1189 datadir sysconfdir sharedstatedir localstatedir includedir \
1190 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1191 libdir localedir mandir
dae5f5cf 1192do
81ecdfbb
RW
1193 eval ac_val=\$$ac_var
1194 # Remove trailing slashes.
1195 case $ac_val in
1196 */ )
1197 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1198 eval $ac_var=\$ac_val;;
1199 esac
1200 # Be sure to have absolute directory names.
dae5f5cf 1201 case $ac_val in
81ecdfbb
RW
1202 [\\/$]* | ?:[\\/]* ) continue;;
1203 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
d6e9fb05 1204 esac
d0ac1c44 1205 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
d6e9fb05
JK
1206done
1207
bec39cab
AC
1208# There might be people who depend on the old broken behavior: `$host'
1209# used to hold the argument of --host etc.
1210# FIXME: To remove some day.
1211build=$build_alias
1212host=$host_alias
1213target=$target_alias
1214
1215# FIXME: To remove some day.
1216if test "x$host_alias" != x; then
1217 if test "x$build_alias" = x; then
1218 cross_compiling=maybe
bec39cab
AC
1219 elif test "x$build_alias" != "x$host_alias"; then
1220 cross_compiling=yes
1221 fi
1222fi
d6e9fb05 1223
bec39cab
AC
1224ac_tool_prefix=
1225test -n "$host_alias" && ac_tool_prefix=$host_alias-
1226
1227test "$silent" = yes && exec 6>/dev/null
d6e9fb05 1228
d6e9fb05 1229
81ecdfbb
RW
1230ac_pwd=`pwd` && test -n "$ac_pwd" &&
1231ac_ls_di=`ls -di .` &&
1232ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1233 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1234test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1235 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1236
1237
d6e9fb05
JK
1238# Find the source files, if location was not specified.
1239if test -z "$srcdir"; then
1240 ac_srcdir_defaulted=yes
81ecdfbb
RW
1241 # Try the directory containing this script, then the parent directory.
1242 ac_confdir=`$as_dirname -- "$as_myself" ||
1243$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1244 X"$as_myself" : 'X\(//\)[^/]' \| \
1245 X"$as_myself" : 'X\(//\)$' \| \
1246 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1247$as_echo X"$as_myself" |
1248 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1249 s//\1/
1250 q
1251 }
1252 /^X\(\/\/\)[^/].*/{
1253 s//\1/
1254 q
1255 }
1256 /^X\(\/\/\)$/{
1257 s//\1/
1258 q
1259 }
1260 /^X\(\/\).*/{
1261 s//\1/
1262 q
1263 }
1264 s/.*/./; q'`
d6e9fb05 1265 srcdir=$ac_confdir
81ecdfbb 1266 if test ! -r "$srcdir/$ac_unique_file"; then
d6e9fb05
JK
1267 srcdir=..
1268 fi
1269else
1270 ac_srcdir_defaulted=no
1271fi
81ecdfbb
RW
1272if test ! -r "$srcdir/$ac_unique_file"; then
1273 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1274 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1275fi
1276ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1277ac_abs_confdir=`(
d0ac1c44 1278 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1279 pwd)`
1280# When building in place, set srcdir=.
1281if test "$ac_abs_confdir" = "$ac_pwd"; then
1282 srcdir=.
1283fi
1284# Remove unnecessary trailing slashes from srcdir.
1285# Double slashes in file names in object file debugging info
1286# mess up M-x gdb in Emacs.
1287case $srcdir in
1288*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1289esac
1290for ac_var in $ac_precious_vars; do
1291 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1292 eval ac_env_${ac_var}_value=\$${ac_var}
1293 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1294 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1295done
d6e9fb05 1296
bec39cab
AC
1297#
1298# Report the --help message.
1299#
1300if test "$ac_init_help" = "long"; then
1301 # Omit some internal or obsolete options to make the list less imposing.
1302 # This message is too long to be a string in the A/UX 3.1 sh.
1303 cat <<_ACEOF
1304\`configure' configures this package to adapt to many kinds of systems.
1305
1306Usage: $0 [OPTION]... [VAR=VALUE]...
1307
1308To assign environment variables (e.g., CC, CFLAGS...), specify them as
1309VAR=VALUE. See below for descriptions of some of the useful variables.
1310
1311Defaults for the options are specified in brackets.
1312
1313Configuration:
1314 -h, --help display this help and exit
1315 --help=short display options specific to this package
1316 --help=recursive display the short help of all the included packages
1317 -V, --version display version information and exit
d0ac1c44 1318 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1319 --cache-file=FILE cache test results in FILE [disabled]
1320 -C, --config-cache alias for \`--cache-file=config.cache'
1321 -n, --no-create do not create output files
1322 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1323
bec39cab
AC
1324Installation directories:
1325 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1326 [$ac_default_prefix]
bec39cab 1327 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1328 [PREFIX]
bec39cab
AC
1329
1330By default, \`make install' will install all the files in
1331\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1332an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1333for instance \`--prefix=\$HOME'.
1334
1335For better control, use the options below.
1336
1337Fine tuning of the installation directories:
81ecdfbb
RW
1338 --bindir=DIR user executables [EPREFIX/bin]
1339 --sbindir=DIR system admin executables [EPREFIX/sbin]
1340 --libexecdir=DIR program executables [EPREFIX/libexec]
1341 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1342 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1343 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1344 --libdir=DIR object code libraries [EPREFIX/lib]
1345 --includedir=DIR C header files [PREFIX/include]
1346 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1347 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1348 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1349 --infodir=DIR info documentation [DATAROOTDIR/info]
1350 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1351 --mandir=DIR man documentation [DATAROOTDIR/man]
1352 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1353 --htmldir=DIR html documentation [DOCDIR]
1354 --dvidir=DIR dvi documentation [DOCDIR]
1355 --pdfdir=DIR pdf documentation [DOCDIR]
1356 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1357_ACEOF
1358
1359 cat <<\_ACEOF
1360
dcdb98d2
DJ
1361Program names:
1362 --program-prefix=PREFIX prepend PREFIX to installed program names
1363 --program-suffix=SUFFIX append SUFFIX to installed program names
1364 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1365
bec39cab
AC
1366System types:
1367 --build=BUILD configure for building on BUILD [guessed]
1368 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1369 --target=TARGET configure for building compilers for TARGET [HOST]
1370_ACEOF
1371fi
1372
1373if test -n "$ac_init_help"; then
1374
1375 cat <<\_ACEOF
1376
d4596a3d
PA
1377Optional Features:
1378 --disable-option-checking ignore unrecognized --enable/--with options
1379 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1380 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1381 --enable-maintainer-mode
1382 enable make rules and dependencies not useful (and
1383 sometimes confusing) to the casual installer
589bc927 1384 --disable-largefile omit support for large files
8ecfd7bd
SDJ
1385 --enable-unit-tests Enable the inclusion of unit tests when compiling
1386 GDB
05ea2a05 1387 --disable-rpath do not hardcode runtime library paths
d4596a3d 1388 --enable-werror treat compile warnings as errors
8f13a3ce
MF
1389 --enable-build-warnings enable build-time compiler warnings if gcc is used
1390 --enable-gdb-build-warnings
1391 enable GDB specific build-time compiler warnings if
1392 gcc is used
c2a66c29
NS
1393 --enable-inprocess-agent
1394 inprocess agent
d4596a3d 1395
c16158bc
JM
1396Optional Packages:
1397 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1398 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
05ea2a05
TT
1399 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1400 --with-gnu-ld assume the C compiler uses GNU ld default=no
1401 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1402 --without-libipt-prefix don't search for libipt in includedir and libdir
0fb4aa4b
PA
1403 --with-ust=PATH Specify prefix directory for the installed UST package
1404 Equivalent to --with-ust-include=PATH/include
1405 plus --with-ust-lib=PATH/lib
1406 --with-ust-include=PATH Specify directory for installed UST include files
1407 --with-ust-lib=PATH Specify the directory for the installed UST library
c16158bc
JM
1408 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1409 --with-bugurl=URL Direct users to URL to report a bug
96f15937
PP
1410 --with-libthread-db=PATH
1411 use given libthread_db directly
c16158bc 1412
bec39cab
AC
1413Some influential environment variables:
1414 CC C compiler command
1415 CFLAGS C compiler flags
1416 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1417 nonstandard directory <lib dir>
81ecdfbb 1418 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1419 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1420 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1421 CXX C++ compiler command
1422 CXXFLAGS C++ compiler flags
bec39cab
AC
1423 CPP C preprocessor
1424
1425Use these variables to override the choices made by `configure' or to help
1426it to find libraries and programs with nonstandard names/locations.
1427
81ecdfbb 1428Report bugs to the package provider.
bec39cab 1429_ACEOF
81ecdfbb 1430ac_status=$?
bec39cab
AC
1431fi
1432
1433if test "$ac_init_help" = "recursive"; then
1434 # If there are subdirs, report their specific --help.
bec39cab 1435 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1436 test -d "$ac_dir" ||
1437 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1438 continue
bec39cab
AC
1439 ac_builddir=.
1440
81ecdfbb
RW
1441case "$ac_dir" in
1442.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1443*)
1444 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1445 # A ".." for each directory in $ac_dir_suffix.
1446 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1447 case $ac_top_builddir_sub in
1448 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1449 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1450 esac ;;
1451esac
1452ac_abs_top_builddir=$ac_pwd
1453ac_abs_builddir=$ac_pwd$ac_dir_suffix
1454# for backward compatibility:
1455ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1456
1457case $srcdir in
81ecdfbb 1458 .) # We are building in place.
bec39cab 1459 ac_srcdir=.
81ecdfbb
RW
1460 ac_top_srcdir=$ac_top_builddir_sub
1461 ac_abs_top_srcdir=$ac_pwd ;;
1462 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1463 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1464 ac_top_srcdir=$srcdir
1465 ac_abs_top_srcdir=$srcdir ;;
1466 *) # Relative name.
1467 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1468 ac_top_srcdir=$ac_top_build_prefix$srcdir
1469 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
dae5f5cf 1470esac
81ecdfbb
RW
1471ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1472
1473 cd "$ac_dir" || { ac_status=$?; continue; }
1474 # Check for guested configure.
1475 if test -f "$ac_srcdir/configure.gnu"; then
1476 echo &&
1477 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1478 elif test -f "$ac_srcdir/configure"; then
1479 echo &&
1480 $SHELL "$ac_srcdir/configure" --help=recursive
434c4c77 1481 else
81ecdfbb
RW
1482 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1483 fi || ac_status=$?
1484 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1485 done
1486fi
1487
81ecdfbb 1488test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1489if $ac_init_version; then
1490 cat <<\_ACEOF
81ecdfbb 1491configure
d0ac1c44 1492generated by GNU Autoconf 2.69
bec39cab 1493
d0ac1c44 1494Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1495This configure script is free software; the Free Software Foundation
1496gives unlimited permission to copy, distribute and modify it.
1497_ACEOF
81ecdfbb 1498 exit
bec39cab 1499fi
bec39cab 1500
81ecdfbb
RW
1501## ------------------------ ##
1502## Autoconf initialization. ##
1503## ------------------------ ##
bec39cab 1504
81ecdfbb
RW
1505# ac_fn_c_try_compile LINENO
1506# --------------------------
1507# Try to compile conftest.$ac_ext, and return whether this succeeded.
1508ac_fn_c_try_compile ()
bec39cab 1509{
81ecdfbb
RW
1510 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1511 rm -f conftest.$ac_objext
1512 if { { ac_try="$ac_compile"
1513case "(($ac_try" in
1514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1515 *) ac_try_echo=$ac_try;;
1516esac
1517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1518$as_echo "$ac_try_echo"; } >&5
1519 (eval "$ac_compile") 2>conftest.err
1520 ac_status=$?
1521 if test -s conftest.err; then
1522 grep -v '^ *+' conftest.err >conftest.er1
1523 cat conftest.er1 >&5
1524 mv -f conftest.er1 conftest.err
1525 fi
1526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1527 test $ac_status = 0; } && {
1528 test -z "$ac_c_werror_flag" ||
1529 test ! -s conftest.err
1530 } && test -s conftest.$ac_objext; then :
1531 ac_retval=0
1532else
1533 $as_echo "$as_me: failed program was:" >&5
1534sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1535
81ecdfbb
RW
1536 ac_retval=1
1537fi
d0ac1c44
SM
1538 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1539 as_fn_set_status $ac_retval
bec39cab 1540
81ecdfbb 1541} # ac_fn_c_try_compile
bec39cab 1542
3bc3d82a
PA
1543# ac_fn_cxx_try_compile LINENO
1544# ----------------------------
1545# Try to compile conftest.$ac_ext, and return whether this succeeded.
1546ac_fn_cxx_try_compile ()
1547{
1548 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1549 rm -f conftest.$ac_objext
1550 if { { ac_try="$ac_compile"
1551case "(($ac_try" in
1552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1553 *) ac_try_echo=$ac_try;;
1554esac
1555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1556$as_echo "$ac_try_echo"; } >&5
1557 (eval "$ac_compile") 2>conftest.err
1558 ac_status=$?
1559 if test -s conftest.err; then
1560 grep -v '^ *+' conftest.err >conftest.er1
1561 cat conftest.er1 >&5
1562 mv -f conftest.er1 conftest.err
1563 fi
1564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1565 test $ac_status = 0; } && {
1566 test -z "$ac_cxx_werror_flag" ||
1567 test ! -s conftest.err
1568 } && test -s conftest.$ac_objext; then :
1569 ac_retval=0
1570else
1571 $as_echo "$as_me: failed program was:" >&5
1572sed 's/^/| /' conftest.$ac_ext >&5
1573
1574 ac_retval=1
1575fi
d0ac1c44
SM
1576 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1577 as_fn_set_status $ac_retval
3bc3d82a
PA
1578
1579} # ac_fn_cxx_try_compile
1580
81ecdfbb
RW
1581# ac_fn_c_try_cpp LINENO
1582# ----------------------
1583# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1584ac_fn_c_try_cpp ()
1585{
1586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1587 if { { ac_try="$ac_cpp conftest.$ac_ext"
1588case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1602 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1603 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 }; then :
1606 ac_retval=0
1607else
1608 $as_echo "$as_me: failed program was:" >&5
1609sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1610
81ecdfbb
RW
1611 ac_retval=1
1612fi
d0ac1c44
SM
1613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1614 as_fn_set_status $ac_retval
bec39cab 1615
81ecdfbb
RW
1616} # ac_fn_c_try_cpp
1617
1618# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1619# -------------------------------------------------------
1620# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1621# the include files in INCLUDES and setting the cache variable VAR
1622# accordingly.
1623ac_fn_c_check_header_mongrel ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1626 if eval \${$3+:} false; then :
81ecdfbb
RW
1627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1628$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1629if eval \${$3+:} false; then :
81ecdfbb
RW
1630 $as_echo_n "(cached) " >&6
1631fi
1632eval ac_res=\$$3
1633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1634$as_echo "$ac_res" >&6; }
1635else
1636 # Is the header compilable?
1637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1638$as_echo_n "checking $2 usability... " >&6; }
1639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1640/* end confdefs.h. */
1641$4
1642#include <$2>
1643_ACEOF
1644if ac_fn_c_try_compile "$LINENO"; then :
1645 ac_header_compiler=yes
1646else
1647 ac_header_compiler=no
1648fi
1649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1651$as_echo "$ac_header_compiler" >&6; }
1652
1653# Is the header present?
1654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1655$as_echo_n "checking $2 presence... " >&6; }
1656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1657/* end confdefs.h. */
1658#include <$2>
1659_ACEOF
1660if ac_fn_c_try_cpp "$LINENO"; then :
1661 ac_header_preproc=yes
1662else
1663 ac_header_preproc=no
1664fi
d0ac1c44 1665rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1667$as_echo "$ac_header_preproc" >&6; }
1668
1669# So? What about this header?
1670case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1671 yes:no: )
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1673$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1675$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1676 ;;
1677 no:yes:* )
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1679$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1681$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1683$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1685$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1687$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1688 ;;
1689esac
1690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1691$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1692if eval \${$3+:} false; then :
81ecdfbb
RW
1693 $as_echo_n "(cached) " >&6
1694else
1695 eval "$3=\$ac_header_compiler"
1696fi
1697eval ac_res=\$$3
1698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1699$as_echo "$ac_res" >&6; }
1700fi
d0ac1c44 1701 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1702
1703} # ac_fn_c_check_header_mongrel
1704
1705# ac_fn_c_try_run LINENO
1706# ----------------------
1707# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1708# that executables *can* be run.
1709ac_fn_c_try_run ()
1710{
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 if { { ac_try="$ac_link"
1713case "(($ac_try" in
1714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1715 *) ac_try_echo=$ac_try;;
1716esac
1717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1718$as_echo "$ac_try_echo"; } >&5
1719 (eval "$ac_link") 2>&5
1720 ac_status=$?
1721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1722 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1723 { { case "(($ac_try" in
1724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725 *) ac_try_echo=$ac_try;;
1726esac
1727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728$as_echo "$ac_try_echo"; } >&5
1729 (eval "$ac_try") 2>&5
1730 ac_status=$?
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; }; }; then :
1733 ac_retval=0
1734else
1735 $as_echo "$as_me: program exited with status $ac_status" >&5
1736 $as_echo "$as_me: failed program was:" >&5
1737sed 's/^/| /' conftest.$ac_ext >&5
1738
1739 ac_retval=$ac_status
1740fi
1741 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1743 as_fn_set_status $ac_retval
81ecdfbb
RW
1744
1745} # ac_fn_c_try_run
1746
1747# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1748# -------------------------------------------------------
1749# Tests whether HEADER exists and can be compiled using the include files in
1750# INCLUDES, setting the cache variable VAR accordingly.
1751ac_fn_c_check_header_compile ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1755$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1756if eval \${$3+:} false; then :
81ecdfbb
RW
1757 $as_echo_n "(cached) " >&6
1758else
1759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1760/* end confdefs.h. */
1761$4
1762#include <$2>
1763_ACEOF
1764if ac_fn_c_try_compile "$LINENO"; then :
1765 eval "$3=yes"
1766else
1767 eval "$3=no"
1768fi
1769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1770fi
1771eval ac_res=\$$3
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1773$as_echo "$ac_res" >&6; }
d0ac1c44 1774 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1775
1776} # ac_fn_c_check_header_compile
1777
eb0edac8
GB
1778# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1779# -------------------------------------------
1780# Tests whether TYPE exists after having included INCLUDES, setting cache
1781# variable VAR accordingly.
1782ac_fn_c_check_type ()
1783{
1784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1786$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1787if eval \${$3+:} false; then :
eb0edac8
GB
1788 $as_echo_n "(cached) " >&6
1789else
1790 eval "$3=no"
1791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794int
1795main ()
1796{
1797if (sizeof ($2))
1798 return 0;
1799 ;
1800 return 0;
1801}
1802_ACEOF
1803if ac_fn_c_try_compile "$LINENO"; then :
1804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806$4
1807int
1808main ()
1809{
1810if (sizeof (($2)))
1811 return 0;
1812 ;
1813 return 0;
1814}
1815_ACEOF
1816if ac_fn_c_try_compile "$LINENO"; then :
1817
1818else
1819 eval "$3=yes"
1820fi
1821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1822fi
1823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1824fi
1825eval ac_res=\$$3
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1827$as_echo "$ac_res" >&6; }
d0ac1c44 1828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
eb0edac8
GB
1829
1830} # ac_fn_c_check_type
1831
404f2902
FCE
1832# ac_fn_c_try_link LINENO
1833# -----------------------
1834# Try to link conftest.$ac_ext, and return whether this succeeded.
1835ac_fn_c_try_link ()
1836{
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 rm -f conftest.$ac_objext conftest$ac_exeext
1839 if { { ac_try="$ac_link"
1840case "(($ac_try" in
1841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1842 *) ac_try_echo=$ac_try;;
1843esac
1844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1845$as_echo "$ac_try_echo"; } >&5
1846 (eval "$ac_link") 2>conftest.err
1847 ac_status=$?
1848 if test -s conftest.err; then
1849 grep -v '^ *+' conftest.err >conftest.er1
1850 cat conftest.er1 >&5
1851 mv -f conftest.er1 conftest.err
1852 fi
1853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1854 test $ac_status = 0; } && {
1855 test -z "$ac_c_werror_flag" ||
1856 test ! -s conftest.err
1857 } && test -s conftest$ac_exeext && {
1858 test "$cross_compiling" = yes ||
1859 test -x conftest$ac_exeext
1860 }; then :
1861 ac_retval=0
1862else
1863 $as_echo "$as_me: failed program was:" >&5
1864sed 's/^/| /' conftest.$ac_ext >&5
1865
1866 ac_retval=1
1867fi
1868 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1869 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1870 # interfere with the next link command; also delete a directory that is
1871 # left behind by Apple's compiler. We do this before executing the actions.
1872 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1873 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1874 as_fn_set_status $ac_retval
1875
1876} # ac_fn_c_try_link
1877
81ecdfbb
RW
1878# ac_fn_c_check_func LINENO FUNC VAR
1879# ----------------------------------
1880# Tests whether FUNC exists, setting the cache variable VAR accordingly
1881ac_fn_c_check_func ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1886if eval \${$3+:} false; then :
81ecdfbb
RW
1887 $as_echo_n "(cached) " >&6
1888else
1889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1890/* end confdefs.h. */
1891/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1892 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1893#define $2 innocuous_$2
1894
1895/* System header to define __stub macros and hopefully few prototypes,
1896 which can conflict with char $2 (); below.
1897 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1898 <limits.h> exists even on freestanding compilers. */
1899
1900#ifdef __STDC__
1901# include <limits.h>
1902#else
1903# include <assert.h>
1904#endif
1905
1906#undef $2
1907
1908/* Override any GCC internal prototype to avoid an error.
1909 Use char because int might match the return type of a GCC
1910 builtin and then its argument prototype would still apply. */
1911#ifdef __cplusplus
1912extern "C"
1913#endif
1914char $2 ();
1915/* The GNU C library defines this for functions which it implements
1916 to always fail with ENOSYS. Some functions are actually named
1917 something starting with __ and the normal name is an alias. */
1918#if defined __stub_$2 || defined __stub___$2
1919choke me
1920#endif
1921
1922int
1923main ()
1924{
1925return $2 ();
1926 ;
1927 return 0;
1928}
1929_ACEOF
1930if ac_fn_c_try_link "$LINENO"; then :
1931 eval "$3=yes"
1932else
1933 eval "$3=no"
1934fi
1935rm -f core conftest.err conftest.$ac_objext \
1936 conftest$ac_exeext conftest.$ac_ext
1937fi
1938eval ac_res=\$$3
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940$as_echo "$ac_res" >&6; }
d0ac1c44 1941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1942
1943} # ac_fn_c_check_func
1944
d0ac1c44
SM
1945# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1946# ---------------------------------------------
1947# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1948# accordingly.
81ecdfbb
RW
1949ac_fn_c_check_decl ()
1950{
1951 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0fb4aa4b
PA
1952 as_decl_name=`echo $2|sed 's/ *(.*//'`
1953 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1955$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 1956if eval \${$3+:} false; then :
81ecdfbb
RW
1957 $as_echo_n "(cached) " >&6
1958else
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
0fb4aa4b
PA
1965#ifndef $as_decl_name
1966#ifdef __cplusplus
1967 (void) $as_decl_use;
1968#else
1969 (void) $as_decl_name;
1970#endif
81ecdfbb
RW
1971#endif
1972
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_compile "$LINENO"; then :
1978 eval "$3=yes"
1979else
1980 eval "$3=no"
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
d0ac1c44 1987 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1988
1989} # ac_fn_c_check_decl
1990
05ea2a05
TT
1991# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1992# ----------------------------------------------------
1993# Tries to find if the field MEMBER exists in type AGGR, after including
1994# INCLUDES, setting cache variable VAR accordingly.
1995ac_fn_c_check_member ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1999$as_echo_n "checking for $2.$3... " >&6; }
2000if eval \${$4+:} false; then :
2001 $as_echo_n "(cached) " >&6
2002else
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$5
2006int
2007main ()
2008{
2009static $2 ac_aggr;
2010if (ac_aggr.$3)
2011return 0;
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 eval "$4=yes"
2018else
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$5
2022int
2023main ()
2024{
2025static $2 ac_aggr;
2026if (sizeof ac_aggr.$3)
2027return 0;
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 eval "$4=yes"
2034else
2035 eval "$4=no"
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040fi
2041eval ac_res=\$$4
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2043$as_echo "$ac_res" >&6; }
2044 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2045
2046} # ac_fn_c_check_member
2047
21987b9c
TT
2048# ac_fn_cxx_try_link LINENO
2049# -------------------------
2050# Try to link conftest.$ac_ext, and return whether this succeeded.
2051ac_fn_cxx_try_link ()
2052{
2053 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2054 rm -f conftest.$ac_objext conftest$ac_exeext
2055 if { { ac_try="$ac_link"
2056case "(($ac_try" in
2057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2058 *) ac_try_echo=$ac_try;;
2059esac
2060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2061$as_echo "$ac_try_echo"; } >&5
2062 (eval "$ac_link") 2>conftest.err
2063 ac_status=$?
2064 if test -s conftest.err; then
2065 grep -v '^ *+' conftest.err >conftest.er1
2066 cat conftest.er1 >&5
2067 mv -f conftest.er1 conftest.err
2068 fi
2069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2070 test $ac_status = 0; } && {
2071 test -z "$ac_cxx_werror_flag" ||
2072 test ! -s conftest.err
2073 } && test -s conftest$ac_exeext && {
2074 test "$cross_compiling" = yes ||
2075 test -x conftest$ac_exeext
2076 }; then :
2077 ac_retval=0
2078else
2079 $as_echo "$as_me: failed program was:" >&5
2080sed 's/^/| /' conftest.$ac_ext >&5
2081
2082 ac_retval=1
2083fi
2084 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2085 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2086 # interfere with the next link command; also delete a directory that is
2087 # left behind by Apple's compiler. We do this before executing the actions.
2088 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2089 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2090 as_fn_set_status $ac_retval
2091
2092} # ac_fn_cxx_try_link
2093
2094# ac_fn_cxx_check_func LINENO FUNC VAR
2095# ------------------------------------
2096# Tests whether FUNC exists, setting the cache variable VAR accordingly
2097ac_fn_cxx_check_func ()
2098{
2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2101$as_echo_n "checking for $2... " >&6; }
2102if eval \${$3+:} false; then :
2103 $as_echo_n "(cached) " >&6
2104else
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2108 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2109#define $2 innocuous_$2
2110
2111/* System header to define __stub macros and hopefully few prototypes,
2112 which can conflict with char $2 (); below.
2113 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2114 <limits.h> exists even on freestanding compilers. */
2115
2116#ifdef __STDC__
2117# include <limits.h>
2118#else
2119# include <assert.h>
2120#endif
2121
2122#undef $2
2123
2124/* Override any GCC internal prototype to avoid an error.
2125 Use char because int might match the return type of a GCC
2126 builtin and then its argument prototype would still apply. */
2127#ifdef __cplusplus
2128extern "C"
2129#endif
2130char $2 ();
2131/* The GNU C library defines this for functions which it implements
2132 to always fail with ENOSYS. Some functions are actually named
2133 something starting with __ and the normal name is an alias. */
2134#if defined __stub_$2 || defined __stub___$2
2135choke me
2136#endif
2137
2138int
2139main ()
2140{
2141return $2 ();
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_cxx_try_link "$LINENO"; then :
2147 eval "$3=yes"
2148else
2149 eval "$3=no"
2150fi
2151rm -f core conftest.err conftest.$ac_objext \
2152 conftest$ac_exeext conftest.$ac_ext
2153fi
2154eval ac_res=\$$3
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2156$as_echo "$ac_res" >&6; }
2157 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2158
2159} # ac_fn_cxx_check_func
2160
07697489
PA
2161# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2162# --------------------------------------------
2163# Tries to find the compile-time value of EXPR in a program that includes
2164# INCLUDES, setting VAR accordingly. Returns whether the value could be
2165# computed
2166ac_fn_c_compute_int ()
2167{
2168 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169 if test "$cross_compiling" = yes; then
2170 # Depending upon the size, compute the lo and hi bounds.
2171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173$4
2174int
2175main ()
2176{
2177static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2178test_array [0] = 0;
2179return test_array [0];
07697489
PA
2180
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_compile "$LINENO"; then :
2186 ac_lo=0 ac_mid=0
2187 while :; do
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2195test_array [0] = 0;
2196return test_array [0];
07697489
PA
2197
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=$ac_mid; break
2204else
2205 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2206 if test $ac_lo -le $ac_mid; then
2207 ac_lo= ac_hi=
2208 break
2209 fi
2210 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2211fi
2212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 done
2214else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218int
2219main ()
2220{
2221static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2222test_array [0] = 0;
2223return test_array [0];
07697489
PA
2224
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_compile "$LINENO"; then :
2230 ac_hi=-1 ac_mid=-1
2231 while :; do
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233/* end confdefs.h. */
2234$4
2235int
2236main ()
2237{
2238static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2239test_array [0] = 0;
2240return test_array [0];
07697489
PA
2241
2242 ;
2243 return 0;
2244}
2245_ACEOF
2246if ac_fn_c_try_compile "$LINENO"; then :
2247 ac_lo=$ac_mid; break
2248else
2249 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2250 if test $ac_mid -le $ac_hi; then
2251 ac_lo= ac_hi=
2252 break
2253 fi
2254 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2255fi
2256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257 done
2258else
2259 ac_lo= ac_hi=
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264# Binary search between lo and hi bounds.
2265while test "x$ac_lo" != "x$ac_hi"; do
2266 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$4
2270int
2271main ()
2272{
2273static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2274test_array [0] = 0;
2275return test_array [0];
07697489
PA
2276
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"; then :
2282 ac_hi=$ac_mid
2283else
2284 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287done
2288case $ac_lo in #((
2289?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2290'') ac_retval=1 ;;
2291esac
2292 else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295$4
2296static long int longval () { return $2; }
2297static unsigned long int ulongval () { return $2; }
2298#include <stdio.h>
2299#include <stdlib.h>
2300int
2301main ()
2302{
2303
2304 FILE *f = fopen ("conftest.val", "w");
2305 if (! f)
2306 return 1;
2307 if (($2) < 0)
2308 {
2309 long int i = longval ();
2310 if (i != ($2))
2311 return 1;
2312 fprintf (f, "%ld", i);
2313 }
2314 else
2315 {
2316 unsigned long int i = ulongval ();
2317 if (i != ($2))
2318 return 1;
2319 fprintf (f, "%lu", i);
2320 }
2321 /* Do not output a trailing newline, as this causes \r\n confusion
2322 on some platforms. */
2323 return ferror (f) || fclose (f) != 0;
2324
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_run "$LINENO"; then :
2330 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2331else
2332 ac_retval=1
2333fi
2334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2335 conftest.$ac_objext conftest.beam conftest.$ac_ext
2336rm -f conftest.val
2337
2338 fi
d0ac1c44
SM
2339 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2340 as_fn_set_status $ac_retval
07697489
PA
2341
2342} # ac_fn_c_compute_int
81ecdfbb
RW
2343cat >config.log <<_ACEOF
2344This file contains any messages produced by compilers while
2345running configure, to aid debugging if configure makes a mistake.
2346
2347It was created by $as_me, which was
d0ac1c44 2348generated by GNU Autoconf 2.69. Invocation command line was
81ecdfbb
RW
2349
2350 $ $0 $@
2351
2352_ACEOF
2353exec 5>>config.log
2354{
2355cat <<_ASUNAME
2356## --------- ##
2357## Platform. ##
2358## --------- ##
2359
2360hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2361uname -m = `(uname -m) 2>/dev/null || echo unknown`
2362uname -r = `(uname -r) 2>/dev/null || echo unknown`
2363uname -s = `(uname -s) 2>/dev/null || echo unknown`
2364uname -v = `(uname -v) 2>/dev/null || echo unknown`
2365
2366/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2367/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2368
2369/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2370/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2371/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2372/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2373/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2374/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2375/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2376
2377_ASUNAME
2378
2379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380for as_dir in $PATH
2381do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
2384 $as_echo "PATH: $as_dir"
2385 done
2386IFS=$as_save_IFS
2387
2388} >&5
2389
2390cat >&5 <<_ACEOF
2391
2392
2393## ----------- ##
2394## Core tests. ##
2395## ----------- ##
bec39cab
AC
2396
2397_ACEOF
2398
2399
2400# Keep a trace of the command line.
2401# Strip out --no-create and --no-recursion so they do not pile up.
2402# Strip out --silent because we don't want to record it for future runs.
2403# Also quote any args containing shell meta-characters.
2404# Make two passes to allow for proper duplicate-argument suppression.
2405ac_configure_args=
2406ac_configure_args0=
2407ac_configure_args1=
bec39cab
AC
2408ac_must_keep_next=false
2409for ac_pass in 1 2
2410do
2411 for ac_arg
2412 do
2413 case $ac_arg in
2414 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2415 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2416 | -silent | --silent | --silen | --sile | --sil)
2417 continue ;;
81ecdfbb
RW
2418 *\'*)
2419 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2420 esac
2421 case $ac_pass in
81ecdfbb 2422 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
bec39cab 2423 2)
81ecdfbb 2424 as_fn_append ac_configure_args1 " '$ac_arg'"
bec39cab
AC
2425 if test $ac_must_keep_next = true; then
2426 ac_must_keep_next=false # Got value, back to normal.
2427 else
2428 case $ac_arg in
2429 *=* | --config-cache | -C | -disable-* | --disable-* \
2430 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2431 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2432 | -with-* | --with-* | -without-* | --without-* | --x)
2433 case "$ac_configure_args0 " in
2434 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2435 esac
2436 ;;
2437 -* ) ac_must_keep_next=true ;;
2438 esac
2439 fi
81ecdfbb 2440 as_fn_append ac_configure_args " '$ac_arg'"
bec39cab
AC
2441 ;;
2442 esac
2443 done
2444done
81ecdfbb
RW
2445{ ac_configure_args0=; unset ac_configure_args0;}
2446{ ac_configure_args1=; unset ac_configure_args1;}
bec39cab
AC
2447
2448# When interrupted or exit'd, cleanup temporary files, and complete
2449# config.log. We remove comments because anyway the quotes in there
2450# would cause problems or look ugly.
81ecdfbb
RW
2451# WARNING: Use '\'' to represent an apostrophe within the trap.
2452# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
bec39cab
AC
2453trap 'exit_status=$?
2454 # Save into config.log some information that might help in debugging.
2455 {
2456 echo
2457
d0ac1c44 2458 $as_echo "## ---------------- ##
bec39cab 2459## Cache variables. ##
d0ac1c44 2460## ---------------- ##"
bec39cab
AC
2461 echo
2462 # The following way of writing the cache mishandles newlines in values,
81ecdfbb
RW
2463(
2464 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2465 eval ac_val=\$$ac_var
2466 case $ac_val in #(
2467 *${as_nl}*)
2468 case $ac_var in #(
2469 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2470$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2471 esac
2472 case $ac_var in #(
2473 _ | IFS | as_nl) ;; #(
2474 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2475 *) { eval $ac_var=; unset $ac_var;} ;;
2476 esac ;;
2477 esac
2478 done
bec39cab 2479 (set) 2>&1 |
81ecdfbb
RW
2480 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2481 *${as_nl}ac_space=\ *)
bec39cab 2482 sed -n \
81ecdfbb
RW
2483 "s/'\''/'\''\\\\'\'''\''/g;
2484 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2485 ;; #(
bec39cab 2486 *)
81ecdfbb 2487 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 2488 ;;
81ecdfbb
RW
2489 esac |
2490 sort
2491)
bec39cab
AC
2492 echo
2493
d0ac1c44 2494 $as_echo "## ----------------- ##
bec39cab 2495## Output variables. ##
d0ac1c44 2496## ----------------- ##"
bec39cab
AC
2497 echo
2498 for ac_var in $ac_subst_vars
2499 do
81ecdfbb
RW
2500 eval ac_val=\$$ac_var
2501 case $ac_val in
2502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2503 esac
2504 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2505 done | sort
2506 echo
2507
2508 if test -n "$ac_subst_files"; then
d0ac1c44 2509 $as_echo "## ------------------- ##
81ecdfbb 2510## File substitutions. ##
d0ac1c44 2511## ------------------- ##"
bec39cab
AC
2512 echo
2513 for ac_var in $ac_subst_files
2514 do
81ecdfbb
RW
2515 eval ac_val=\$$ac_var
2516 case $ac_val in
2517 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2518 esac
2519 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2520 done | sort
2521 echo
434c4c77 2522 fi
bec39cab
AC
2523
2524 if test -s confdefs.h; then
d0ac1c44 2525 $as_echo "## ----------- ##
bec39cab 2526## confdefs.h. ##
d0ac1c44 2527## ----------- ##"
bec39cab 2528 echo
81ecdfbb 2529 cat confdefs.h
bec39cab
AC
2530 echo
2531 fi
2532 test "$ac_signal" != 0 &&
81ecdfbb
RW
2533 $as_echo "$as_me: caught signal $ac_signal"
2534 $as_echo "$as_me: exit $exit_status"
bec39cab 2535 } >&5
81ecdfbb
RW
2536 rm -f core *.core core.conftest.* &&
2537 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 2538 exit $exit_status
81ecdfbb 2539' 0
bec39cab 2540for ac_signal in 1 2 13 15; do
81ecdfbb 2541 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
bec39cab
AC
2542done
2543ac_signal=0
2544
2545# confdefs.h avoids OS command line length limits that DEFS can exceed.
81ecdfbb
RW
2546rm -f -r conftest* confdefs.h
2547
2548$as_echo "/* confdefs.h */" > confdefs.h
bec39cab
AC
2549
2550# Predefined preprocessor variables.
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_NAME "$PACKAGE_NAME"
2554_ACEOF
2555
bec39cab
AC
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2558_ACEOF
2559
bec39cab
AC
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_VERSION "$PACKAGE_VERSION"
2562_ACEOF
2563
bec39cab
AC
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_STRING "$PACKAGE_STRING"
2566_ACEOF
2567
bec39cab
AC
2568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2570_ACEOF
2571
81ecdfbb
RW
2572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_URL "$PACKAGE_URL"
2574_ACEOF
2575
bec39cab
AC
2576
2577# Let the site file select an alternate cache file if it wants to.
81ecdfbb
RW
2578# Prefer an explicitly selected file to automatically selected ones.
2579ac_site_file1=NONE
2580ac_site_file2=NONE
2581if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2582 # We do not want a PATH search for config.site.
2583 case $CONFIG_SITE in #((
2584 -*) ac_site_file1=./$CONFIG_SITE;;
2585 */*) ac_site_file1=$CONFIG_SITE;;
2586 *) ac_site_file1=./$CONFIG_SITE;;
2587 esac
81ecdfbb
RW
2588elif test "x$prefix" != xNONE; then
2589 ac_site_file1=$prefix/share/config.site
2590 ac_site_file2=$prefix/etc/config.site
2591else
2592 ac_site_file1=$ac_default_prefix/share/config.site
2593 ac_site_file2=$ac_default_prefix/etc/config.site
d6e9fb05 2594fi
81ecdfbb
RW
2595for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2596do
2597 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2598 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2600$as_echo "$as_me: loading site script $ac_site_file" >&6;}
bec39cab 2601 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2602 . "$ac_site_file" \
2603 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2605as_fn_error $? "failed to load site script $ac_site_file
2606See \`config.log' for more details" "$LINENO" 5; }
d6e9fb05
JK
2607 fi
2608done
2609
2610if test -r "$cache_file"; then
d0ac1c44
SM
2611 # Some versions of bash will fail to source /dev/null (special files
2612 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2613 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2615$as_echo "$as_me: loading cache $cache_file" >&6;}
bec39cab 2616 case $cache_file in
81ecdfbb
RW
2617 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2618 *) . "./$cache_file";;
bec39cab
AC
2619 esac
2620 fi
d6e9fb05 2621else
81ecdfbb
RW
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2623$as_echo "$as_me: creating cache $cache_file" >&6;}
bec39cab 2624 >$cache_file
d6e9fb05
JK
2625fi
2626
05ea2a05
TT
2627as_fn_append ac_header_list " stdlib.h"
2628as_fn_append ac_header_list " unistd.h"
2629as_fn_append ac_header_list " sys/param.h"
bec39cab
AC
2630# Check that the precious variables saved in the cache have kept the same
2631# value.
2632ac_cache_corrupted=false
81ecdfbb 2633for ac_var in $ac_precious_vars; do
bec39cab
AC
2634 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2635 eval ac_new_set=\$ac_env_${ac_var}_set
81ecdfbb
RW
2636 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2637 eval ac_new_val=\$ac_env_${ac_var}_value
bec39cab
AC
2638 case $ac_old_set,$ac_new_set in
2639 set,)
81ecdfbb
RW
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2641$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
bec39cab
AC
2642 ac_cache_corrupted=: ;;
2643 ,set)
81ecdfbb
RW
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2645$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
bec39cab
AC
2646 ac_cache_corrupted=: ;;
2647 ,);;
2648 *)
2649 if test "x$ac_old_val" != "x$ac_new_val"; then
81ecdfbb
RW
2650 # differences in whitespace do not lead to failure.
2651 ac_old_val_w=`echo x $ac_old_val`
2652 ac_new_val_w=`echo x $ac_new_val`
2653 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2655$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2656 ac_cache_corrupted=:
2657 else
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2659$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2660 eval $ac_var=\$ac_old_val
2661 fi
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2663$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2665$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
2666 fi;;
2667 esac
2668 # Pass precious variables to config.status.
2669 if test "$ac_new_set" = set; then
2670 case $ac_new_val in
81ecdfbb 2671 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2672 *) ac_arg=$ac_var=$ac_new_val ;;
2673 esac
2674 case " $ac_configure_args " in
2675 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
81ecdfbb 2676 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
bec39cab 2677 esac
d6e9fb05 2678 fi
bec39cab
AC
2679done
2680if $ac_cache_corrupted; then
81ecdfbb
RW
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2684$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2685 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
d6e9fb05 2686fi
81ecdfbb
RW
2687## -------------------- ##
2688## Main body of script. ##
2689## -------------------- ##
d6e9fb05 2690
dae5f5cf
DJ
2691ac_ext=c
2692ac_cpp='$CPP $CPPFLAGS'
2693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2695ac_compiler_gnu=$ac_cv_c_compiler_gnu
2696
d6e9fb05 2697
84563040 2698
bec39cab
AC
2699
2700
81ecdfbb 2701ac_config_headers="$ac_config_headers config.h:config.in"
bec39cab
AC
2702
2703
e28b3332 2704
c9a1864a
YQ
2705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2706$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2707 # Check whether --enable-maintainer-mode was given.
2708if test "${enable_maintainer_mode+set}" = set; then :
2709 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2710else
2711 USE_MAINTAINER_MODE=no
2712fi
2713
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2715$as_echo "$USE_MAINTAINER_MODE" >&6; }
2716 if test $USE_MAINTAINER_MODE = yes; then
2717 MAINTAINER_MODE_TRUE=
2718 MAINTAINER_MODE_FALSE='#'
2719else
2720 MAINTAINER_MODE_TRUE='#'
2721 MAINTAINER_MODE_FALSE=
2722fi
2723
2724 MAINT=$MAINTAINER_MODE_TRUE
2725
2726
2727
bec39cab
AC
2728ac_ext=c
2729ac_cpp='$CPP $CPPFLAGS'
2730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732ac_compiler_gnu=$ac_cv_c_compiler_gnu
2733if test -n "$ac_tool_prefix"; then
2734 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2735set dummy ${ac_tool_prefix}gcc; ac_word=$2
81ecdfbb
RW
2736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2737$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2738if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2739 $as_echo_n "(cached) " >&6
84563040
DJ
2740else
2741 if test -n "$CC"; then
2742 ac_cv_prog_CC="$CC" # Let the user override the test.
2743else
bec39cab
AC
2744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2745for as_dir in $PATH
2746do
2747 IFS=$as_save_IFS
2748 test -z "$as_dir" && as_dir=.
81ecdfbb 2749 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2751 ac_cv_prog_CC="${ac_tool_prefix}gcc"
81ecdfbb 2752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2753 break 2
2754 fi
2755done
81ecdfbb
RW
2756 done
2757IFS=$as_save_IFS
bec39cab 2758
84563040
DJ
2759fi
2760fi
bec39cab 2761CC=$ac_cv_prog_CC
84563040 2762if test -n "$CC"; then
81ecdfbb
RW
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2764$as_echo "$CC" >&6; }
84563040 2765else
81ecdfbb
RW
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2767$as_echo "no" >&6; }
84563040
DJ
2768fi
2769
81ecdfbb 2770
bec39cab
AC
2771fi
2772if test -z "$ac_cv_prog_CC"; then
2773 ac_ct_CC=$CC
2774 # Extract the first word of "gcc", so it can be a program name with args.
2775set dummy gcc; ac_word=$2
81ecdfbb
RW
2776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2777$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2778if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2779 $as_echo_n "(cached) " >&6
84563040 2780else
bec39cab
AC
2781 if test -n "$ac_ct_CC"; then
2782 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
84563040 2783else
bec39cab
AC
2784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2785for as_dir in $PATH
2786do
2787 IFS=$as_save_IFS
2788 test -z "$as_dir" && as_dir=.
81ecdfbb 2789 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2791 ac_cv_prog_ac_ct_CC="gcc"
81ecdfbb 2792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2793 break 2
2794 fi
2795done
81ecdfbb
RW
2796 done
2797IFS=$as_save_IFS
bec39cab
AC
2798
2799fi
2800fi
2801ac_ct_CC=$ac_cv_prog_ac_ct_CC
2802if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2804$as_echo "$ac_ct_CC" >&6; }
bec39cab 2805else
81ecdfbb
RW
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2807$as_echo "no" >&6; }
bec39cab
AC
2808fi
2809
81ecdfbb
RW
2810 if test "x$ac_ct_CC" = x; then
2811 CC=""
2812 else
2813 case $cross_compiling:$ac_tool_warned in
2814yes:)
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2817ac_tool_warned=yes ;;
2818esac
2819 CC=$ac_ct_CC
2820 fi
bec39cab
AC
2821else
2822 CC="$ac_cv_prog_CC"
2823fi
2824
2825if test -z "$CC"; then
81ecdfbb
RW
2826 if test -n "$ac_tool_prefix"; then
2827 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 2828set dummy ${ac_tool_prefix}cc; ac_word=$2
81ecdfbb
RW
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2830$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2831if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2832 $as_echo_n "(cached) " >&6
bec39cab
AC
2833else
2834 if test -n "$CC"; then
2835 ac_cv_prog_CC="$CC" # Let the user override the test.
2836else
2837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2838for as_dir in $PATH
2839do
2840 IFS=$as_save_IFS
2841 test -z "$as_dir" && as_dir=.
81ecdfbb 2842 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2844 ac_cv_prog_CC="${ac_tool_prefix}cc"
81ecdfbb 2845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2846 break 2
2847 fi
2848done
81ecdfbb
RW
2849 done
2850IFS=$as_save_IFS
bec39cab
AC
2851
2852fi
2853fi
2854CC=$ac_cv_prog_CC
2855if test -n "$CC"; then
81ecdfbb
RW
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2857$as_echo "$CC" >&6; }
bec39cab 2858else
81ecdfbb
RW
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2860$as_echo "no" >&6; }
bec39cab
AC
2861fi
2862
81ecdfbb
RW
2863
2864 fi
dae5f5cf 2865fi
81ecdfbb 2866if test -z "$CC"; then
dae5f5cf
DJ
2867 # Extract the first word of "cc", so it can be a program name with args.
2868set dummy cc; ac_word=$2
81ecdfbb
RW
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2870$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2871if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2872 $as_echo_n "(cached) " >&6
dae5f5cf 2873else
81ecdfbb
RW
2874 if test -n "$CC"; then
2875 ac_cv_prog_CC="$CC" # Let the user override the test.
dae5f5cf 2876else
81ecdfbb 2877 ac_prog_rejected=no
dae5f5cf
DJ
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881 IFS=$as_save_IFS
2882 test -z "$as_dir" && as_dir=.
81ecdfbb 2883 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2885 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2886 ac_prog_rejected=yes
2887 continue
2888 fi
2889 ac_cv_prog_CC="cc"
2890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
dae5f5cf 2891 break 2
b80864fb 2892 fi
dae5f5cf 2893done
81ecdfbb
RW
2894 done
2895IFS=$as_save_IFS
bec39cab 2896
84563040
DJ
2897if test $ac_prog_rejected = yes; then
2898 # We found a bogon in the path, so make sure we never use it.
2899 set dummy $ac_cv_prog_CC
2900 shift
bec39cab 2901 if test $# != 0; then
84563040
DJ
2902 # We chose a different compiler from the bogus one.
2903 # However, it has the same basename, so the bogon will be chosen
2904 # first if we set CC to just the basename; use the full file name.
2905 shift
bec39cab 2906 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
84563040
DJ
2907 fi
2908fi
2909fi
2910fi
bec39cab 2911CC=$ac_cv_prog_CC
84563040 2912if test -n "$CC"; then
81ecdfbb
RW
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2914$as_echo "$CC" >&6; }
84563040 2915else
81ecdfbb
RW
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2917$as_echo "no" >&6; }
84563040
DJ
2918fi
2919
81ecdfbb 2920
bec39cab
AC
2921fi
2922if test -z "$CC"; then
2923 if test -n "$ac_tool_prefix"; then
81ecdfbb 2924 for ac_prog in cl.exe
bec39cab
AC
2925 do
2926 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2927set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2929$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2930if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2931 $as_echo_n "(cached) " >&6
84563040
DJ
2932else
2933 if test -n "$CC"; then
2934 ac_cv_prog_CC="$CC" # Let the user override the test.
2935else
bec39cab
AC
2936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2937for as_dir in $PATH
2938do
2939 IFS=$as_save_IFS
2940 test -z "$as_dir" && as_dir=.
81ecdfbb 2941 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2943 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2945 break 2
2946 fi
2947done
81ecdfbb
RW
2948 done
2949IFS=$as_save_IFS
bec39cab 2950
84563040
DJ
2951fi
2952fi
bec39cab 2953CC=$ac_cv_prog_CC
84563040 2954if test -n "$CC"; then
81ecdfbb
RW
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2956$as_echo "$CC" >&6; }
84563040 2957else
81ecdfbb
RW
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2959$as_echo "no" >&6; }
84563040 2960fi
bec39cab 2961
81ecdfbb 2962
bec39cab
AC
2963 test -n "$CC" && break
2964 done
2965fi
2966if test -z "$CC"; then
2967 ac_ct_CC=$CC
81ecdfbb 2968 for ac_prog in cl.exe
bec39cab
AC
2969do
2970 # Extract the first word of "$ac_prog", so it can be a program name with args.
2971set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2973$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2974if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2975 $as_echo_n "(cached) " >&6
bec39cab
AC
2976else
2977 if test -n "$ac_ct_CC"; then
2978 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2979else
2980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2981for as_dir in $PATH
2982do
2983 IFS=$as_save_IFS
2984 test -z "$as_dir" && as_dir=.
81ecdfbb 2985 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2987 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2989 break 2
84563040 2990 fi
bec39cab 2991done
81ecdfbb
RW
2992 done
2993IFS=$as_save_IFS
bec39cab
AC
2994
2995fi
2996fi
2997ac_ct_CC=$ac_cv_prog_ac_ct_CC
2998if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3000$as_echo "$ac_ct_CC" >&6; }
bec39cab 3001else
81ecdfbb
RW
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3003$as_echo "no" >&6; }
84563040
DJ
3004fi
3005
81ecdfbb 3006
bec39cab
AC
3007 test -n "$ac_ct_CC" && break
3008done
84563040 3009
81ecdfbb
RW
3010 if test "x$ac_ct_CC" = x; then
3011 CC=""
3012 else
3013 case $cross_compiling:$ac_tool_warned in
3014yes:)
3015{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3016$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3017ac_tool_warned=yes ;;
3018esac
3019 CC=$ac_ct_CC
3020 fi
bec39cab
AC
3021fi
3022
3023fi
3024
3025
81ecdfbb
RW
3026test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3028as_fn_error $? "no acceptable C compiler found in \$PATH
3029See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3030
3031# Provide some information about the compiler.
81ecdfbb
RW
3032$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3033set X $ac_compile
3034ac_compiler=$2
3035for ac_option in --version -v -V -qversion; do
3036 { { ac_try="$ac_compiler $ac_option >&5"
3037case "(($ac_try" in
3038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3039 *) ac_try_echo=$ac_try;;
3040esac
3041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3042$as_echo "$ac_try_echo"; } >&5
3043 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3044 ac_status=$?
81ecdfbb
RW
3045 if test -s conftest.err; then
3046 sed '10a\
3047... rest of stderr output deleted ...
3048 10q' conftest.err >conftest.er1
3049 cat conftest.er1 >&5
81ecdfbb 3050 fi
d0ac1c44 3051 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3053 test $ac_status = 0; }
3054done
bec39cab 3055
81ecdfbb 3056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3057/* end confdefs.h. */
3058
3059int
3060main ()
3061{
3062
3063 ;
3064 return 0;
3065}
3066_ACEOF
3067ac_clean_files_save=$ac_clean_files
d0ac1c44 3068ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3069# Try to create an executable without -o first, disregard a.out.
3070# It will help us diagnose broken compilers, and finding out an intuition
3071# of exeext.
d0ac1c44
SM
3072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3073$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3074ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3075
3076# The possible output files:
3077ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3078
3079ac_rmfiles=
3080for ac_file in $ac_files
3081do
3082 case $ac_file in
3083 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3084 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3085 esac
3086done
3087rm -f $ac_rmfiles
3088
3089if { { ac_try="$ac_link_default"
3090case "(($ac_try" in
3091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3092 *) ac_try_echo=$ac_try;;
3093esac
3094eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3095$as_echo "$ac_try_echo"; } >&5
3096 (eval "$ac_link_default") 2>&5
bec39cab 3097 ac_status=$?
81ecdfbb
RW
3098 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3099 test $ac_status = 0; }; then :
3100 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3101# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3102# in a Makefile. We should not override ac_cv_exeext if it was cached,
3103# so that the user can short-circuit this test for compilers unknown to
3104# Autoconf.
3105for ac_file in $ac_files ''
bec39cab
AC
3106do
3107 test -f "$ac_file" || continue
3108 case $ac_file in
81ecdfbb 3109 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
bec39cab
AC
3110 ;;
3111 [ab].out )
3112 # We found the default executable, but exeext='' is most
3113 # certainly right.
3114 break;;
3115 *.* )
81ecdfbb
RW
3116 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3117 then :; else
3118 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3119 fi
3120 # We set ac_cv_exeext here because the later test for it is not
3121 # safe: cross compilers may not add the suffix if given an `-o'
3122 # argument, so we may need to know it at that point already.
3123 # Even if this section looks crufty: it has the advantage of
3124 # actually working.
bec39cab
AC
3125 break;;
3126 * )
3127 break;;
3128 esac
3129done
81ecdfbb
RW
3130test "$ac_cv_exeext" = no && ac_cv_exeext=
3131
bec39cab 3132else
81ecdfbb
RW
3133 ac_file=''
3134fi
81ecdfbb 3135if test -z "$ac_file"; then :
d0ac1c44
SM
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3137$as_echo "no" >&6; }
3138$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3139sed 's/^/| /' conftest.$ac_ext >&5
3140
81ecdfbb
RW
3141{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3143as_fn_error 77 "C compiler cannot create executables
3144See \`config.log' for more details" "$LINENO" 5; }
3145else
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3147$as_echo "yes" >&6; }
bec39cab 3148fi
d0ac1c44
SM
3149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3150$as_echo_n "checking for C compiler default output file name... " >&6; }
3151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3152$as_echo "$ac_file" >&6; }
bec39cab 3153ac_exeext=$ac_cv_exeext
bec39cab 3154
d0ac1c44 3155rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
bec39cab 3156ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3158$as_echo_n "checking for suffix of executables... " >&6; }
3159if { { ac_try="$ac_link"
3160case "(($ac_try" in
3161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3162 *) ac_try_echo=$ac_try;;
3163esac
3164eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3165$as_echo "$ac_try_echo"; } >&5
3166 (eval "$ac_link") 2>&5
bec39cab 3167 ac_status=$?
81ecdfbb
RW
3168 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3169 test $ac_status = 0; }; then :
bec39cab
AC
3170 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3171# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3172# work properly (i.e., refer to `conftest.exe'), while it won't with
3173# `rm'.
3174for ac_file in conftest.exe conftest conftest.*; do
3175 test -f "$ac_file" || continue
3176 case $ac_file in
81ecdfbb 3177 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
bec39cab 3178 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
bec39cab
AC
3179 break;;
3180 * ) break;;
3181 esac
3182done
84563040 3183else
81ecdfbb
RW
3184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3186as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3187See \`config.log' for more details" "$LINENO" 5; }
84563040 3188fi
d0ac1c44 3189rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3191$as_echo "$ac_cv_exeext" >&6; }
bec39cab
AC
3192
3193rm -f conftest.$ac_ext
3194EXEEXT=$ac_cv_exeext
3195ac_exeext=$EXEEXT
d0ac1c44
SM
3196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3197/* end confdefs.h. */
3198#include <stdio.h>
3199int
3200main ()
3201{
3202FILE *f = fopen ("conftest.out", "w");
3203 return ferror (f) || fclose (f) != 0;
3204
3205 ;
3206 return 0;
3207}
3208_ACEOF
3209ac_clean_files="$ac_clean_files conftest.out"
3210# Check that the compiler produces executables we can run. If not, either
3211# the compiler is broken, or we cross compile.
3212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3213$as_echo_n "checking whether we are cross compiling... " >&6; }
3214if test "$cross_compiling" != yes; then
3215 { { ac_try="$ac_link"
3216case "(($ac_try" in
3217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3218 *) ac_try_echo=$ac_try;;
3219esac
3220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3221$as_echo "$ac_try_echo"; } >&5
3222 (eval "$ac_link") 2>&5
3223 ac_status=$?
3224 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3225 test $ac_status = 0; }
3226 if { ac_try='./conftest$ac_cv_exeext'
3227 { { case "(($ac_try" in
3228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3229 *) ac_try_echo=$ac_try;;
3230esac
3231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3232$as_echo "$ac_try_echo"; } >&5
3233 (eval "$ac_try") 2>&5
3234 ac_status=$?
3235 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3236 test $ac_status = 0; }; }; then
3237 cross_compiling=no
3238 else
3239 if test "$cross_compiling" = maybe; then
3240 cross_compiling=yes
3241 else
3242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3244as_fn_error $? "cannot run C compiled programs.
3245If you meant to cross compile, use \`--host'.
3246See \`config.log' for more details" "$LINENO" 5; }
3247 fi
3248 fi
3249fi
3250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3251$as_echo "$cross_compiling" >&6; }
3252
3253rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3254ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3256$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3257if ${ac_cv_objext+:} false; then :
81ecdfbb 3258 $as_echo_n "(cached) " >&6
bec39cab 3259else
81ecdfbb 3260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3261/* end confdefs.h. */
3262
3263int
3264main ()
3265{
3266
3267 ;
3268 return 0;
3269}
3270_ACEOF
3271rm -f conftest.o conftest.obj
81ecdfbb
RW
3272if { { ac_try="$ac_compile"
3273case "(($ac_try" in
3274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3275 *) ac_try_echo=$ac_try;;
3276esac
3277eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3278$as_echo "$ac_try_echo"; } >&5
3279 (eval "$ac_compile") 2>&5
bec39cab 3280 ac_status=$?
81ecdfbb
RW
3281 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3282 test $ac_status = 0; }; then :
3283 for ac_file in conftest.o conftest.obj conftest.*; do
3284 test -f "$ac_file" || continue;
bec39cab 3285 case $ac_file in
81ecdfbb 3286 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3287 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3288 break;;
3289 esac
3290done
3291else
81ecdfbb 3292 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3293sed 's/^/| /' conftest.$ac_ext >&5
3294
81ecdfbb
RW
3295{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3297as_fn_error $? "cannot compute suffix of object files: cannot compile
3298See \`config.log' for more details" "$LINENO" 5; }
84563040 3299fi
bec39cab
AC
3300rm -f conftest.$ac_cv_objext conftest.$ac_ext
3301fi
81ecdfbb
RW
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3303$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3304OBJEXT=$ac_cv_objext
3305ac_objext=$OBJEXT
81ecdfbb
RW
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3307$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3308if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3309 $as_echo_n "(cached) " >&6
bec39cab 3310else
81ecdfbb 3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3312/* end confdefs.h. */
3313
3314int
3315main ()
3316{
3317#ifndef __GNUC__
3318 choke me
3319#endif
84563040 3320
bec39cab
AC
3321 ;
3322 return 0;
3323}
3324_ACEOF
81ecdfbb 3325if ac_fn_c_try_compile "$LINENO"; then :
bec39cab 3326 ac_compiler_gnu=yes
84563040 3327else
81ecdfbb 3328 ac_compiler_gnu=no
84563040 3329fi
81ecdfbb 3330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3331ac_cv_c_compiler_gnu=$ac_compiler_gnu
84563040 3332
bec39cab 3333fi
81ecdfbb
RW
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3335$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3336if test $ac_compiler_gnu = yes; then
3337 GCC=yes
3338else
3339 GCC=
3340fi
bec39cab
AC
3341ac_test_CFLAGS=${CFLAGS+set}
3342ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3344$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3345if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb
RW
3346 $as_echo_n "(cached) " >&6
3347else
3348 ac_save_c_werror_flag=$ac_c_werror_flag
3349 ac_c_werror_flag=yes
3350 ac_cv_prog_cc_g=no
3351 CFLAGS="-g"
3352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3353/* end confdefs.h. */
3354
3355int
3356main ()
3357{
3358
3359 ;
3360 return 0;
3361}
3362_ACEOF
81ecdfbb 3363if ac_fn_c_try_compile "$LINENO"; then :
84563040
DJ
3364 ac_cv_prog_cc_g=yes
3365else
81ecdfbb
RW
3366 CFLAGS=""
3367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3368/* end confdefs.h. */
3369
3370int
3371main ()
3372{
3373
3374 ;
3375 return 0;
3376}
3377_ACEOF
3378if ac_fn_c_try_compile "$LINENO"; then :
3379
3380else
3381 ac_c_werror_flag=$ac_save_c_werror_flag
3382 CFLAGS="-g"
3383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3384/* end confdefs.h. */
3385
3386int
3387main ()
3388{
84563040 3389
81ecdfbb
RW
3390 ;
3391 return 0;
3392}
3393_ACEOF
3394if ac_fn_c_try_compile "$LINENO"; then :
3395 ac_cv_prog_cc_g=yes
3396fi
3397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 3398fi
81ecdfbb 3399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3400fi
81ecdfbb
RW
3401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3402 ac_c_werror_flag=$ac_save_c_werror_flag
3403fi
3404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3405$as_echo "$ac_cv_prog_cc_g" >&6; }
84563040 3406if test "$ac_test_CFLAGS" = set; then
bec39cab 3407 CFLAGS=$ac_save_CFLAGS
84563040
DJ
3408elif test $ac_cv_prog_cc_g = yes; then
3409 if test "$GCC" = yes; then
3410 CFLAGS="-g -O2"
3411 else
3412 CFLAGS="-g"
3413 fi
3414else
3415 if test "$GCC" = yes; then
3416 CFLAGS="-O2"
3417 else
3418 CFLAGS=
3419 fi
3420fi
81ecdfbb
RW
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3422$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3423if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3424 $as_echo_n "(cached) " >&6
bec39cab 3425else
81ecdfbb 3426 ac_cv_prog_cc_c89=no
bec39cab 3427ac_save_CC=$CC
81ecdfbb 3428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3429/* end confdefs.h. */
3430#include <stdarg.h>
3431#include <stdio.h>
d0ac1c44 3432struct stat;
bec39cab
AC
3433/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3434struct buf { int x; };
3435FILE * (*rcsopen) (struct buf *, struct stat *, int);
3436static char *e (p, i)
3437 char **p;
3438 int i;
3439{
3440 return p[i];
3441}
3442static char *f (char * (*g) (char **, int), char **p, ...)
3443{
3444 char *s;
3445 va_list v;
3446 va_start (v,p);
3447 s = g (p, va_arg (v,int));
3448 va_end (v);
3449 return s;
3450}
3451
3452/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3453 function prototypes and stuff, but not '\xHH' hex character constants.
3454 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3455 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3456 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3457 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3458 that's true only with -std. */
bec39cab
AC
3459int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3460
81ecdfbb
RW
3461/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3462 inside strings and character constants. */
3463#define FOO(x) 'x'
3464int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3465
bec39cab
AC
3466int test (int i, double x);
3467struct s1 {int (*f) (int a);};
3468struct s2 {int (*f) (double a);};
3469int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3470int argc;
3471char **argv;
3472int
3473main ()
3474{
3475return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3476 ;
3477 return 0;
3478}
3479_ACEOF
81ecdfbb
RW
3480for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3481 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3482do
3483 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3484 if ac_fn_c_try_compile "$LINENO"; then :
3485 ac_cv_prog_cc_c89=$ac_arg
bec39cab 3486fi
81ecdfbb
RW
3487rm -f core conftest.err conftest.$ac_objext
3488 test "x$ac_cv_prog_cc_c89" != "xno" && break
bec39cab 3489done
81ecdfbb 3490rm -f conftest.$ac_ext
bec39cab
AC
3491CC=$ac_save_CC
3492
3493fi
81ecdfbb
RW
3494# AC_CACHE_VAL
3495case "x$ac_cv_prog_cc_c89" in
3496 x)
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3498$as_echo "none needed" >&6; } ;;
3499 xno)
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3501$as_echo "unsupported" >&6; } ;;
bec39cab 3502 *)
81ecdfbb
RW
3503 CC="$CC $ac_cv_prog_cc_c89"
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3505$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bec39cab 3506esac
81ecdfbb 3507if test "x$ac_cv_prog_cc_c89" != xno; then :
bec39cab 3508
dae5f5cf
DJ
3509fi
3510
dae5f5cf 3511ac_ext=c
bec39cab
AC
3512ac_cpp='$CPP $CPPFLAGS'
3513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3515ac_compiler_gnu=$ac_cv_c_compiler_gnu
84563040 3516
3bc3d82a
PA
3517ac_ext=cpp
3518ac_cpp='$CXXCPP $CPPFLAGS'
3519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3522if test -z "$CXX"; then
3523 if test -n "$CCC"; then
3524 CXX=$CCC
3525 else
3526 if test -n "$ac_tool_prefix"; then
3527 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3528 do
3529 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3530set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3532$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3533if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3534 $as_echo_n "(cached) " >&6
3535else
3536 if test -n "$CXX"; then
3537 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3538else
3539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3540for as_dir in $PATH
3541do
3542 IFS=$as_save_IFS
3543 test -z "$as_dir" && as_dir=.
3544 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3546 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3548 break 2
3549 fi
3550done
3551 done
3552IFS=$as_save_IFS
3553
3554fi
3555fi
3556CXX=$ac_cv_prog_CXX
3557if test -n "$CXX"; then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3559$as_echo "$CXX" >&6; }
3560else
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3562$as_echo "no" >&6; }
3563fi
3564
3565
3566 test -n "$CXX" && break
3567 done
3568fi
3569if test -z "$CXX"; then
3570 ac_ct_CXX=$CXX
3571 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3572do
3573 # Extract the first word of "$ac_prog", so it can be a program name with args.
3574set dummy $ac_prog; ac_word=$2
3575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3576$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3577if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3578 $as_echo_n "(cached) " >&6
3579else
3580 if test -n "$ac_ct_CXX"; then
3581 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3582else
3583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3584for as_dir in $PATH
3585do
3586 IFS=$as_save_IFS
3587 test -z "$as_dir" && as_dir=.
3588 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3590 ac_cv_prog_ac_ct_CXX="$ac_prog"
3591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3592 break 2
3593 fi
3594done
3595 done
3596IFS=$as_save_IFS
3597
3598fi
3599fi
3600ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3601if test -n "$ac_ct_CXX"; then
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3603$as_echo "$ac_ct_CXX" >&6; }
3604else
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3606$as_echo "no" >&6; }
3607fi
3608
3609
3610 test -n "$ac_ct_CXX" && break
3611done
3612
3613 if test "x$ac_ct_CXX" = x; then
3614 CXX="g++"
3615 else
3616 case $cross_compiling:$ac_tool_warned in
3617yes:)
3618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3620ac_tool_warned=yes ;;
3621esac
3622 CXX=$ac_ct_CXX
3623 fi
3624fi
3625
3626 fi
3627fi
3628# Provide some information about the compiler.
3629$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3630set X $ac_compile
3631ac_compiler=$2
3632for ac_option in --version -v -V -qversion; do
3633 { { ac_try="$ac_compiler $ac_option >&5"
3634case "(($ac_try" in
3635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3636 *) ac_try_echo=$ac_try;;
3637esac
3638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3639$as_echo "$ac_try_echo"; } >&5
3640 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3641 ac_status=$?
3642 if test -s conftest.err; then
3643 sed '10a\
3644... rest of stderr output deleted ...
3645 10q' conftest.err >conftest.er1
3646 cat conftest.er1 >&5
3bc3d82a 3647 fi
d0ac1c44 3648 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3649 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3650 test $ac_status = 0; }
3651done
3652
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3654$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3655if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3656 $as_echo_n "(cached) " >&6
3657else
3658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3659/* end confdefs.h. */
3660
3661int
3662main ()
3663{
3664#ifndef __GNUC__
3665 choke me
3666#endif
3667
3668 ;
3669 return 0;
3670}
3671_ACEOF
3672if ac_fn_cxx_try_compile "$LINENO"; then :
3673 ac_compiler_gnu=yes
3674else
3675 ac_compiler_gnu=no
3676fi
3677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3678ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3679
3680fi
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3682$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3683if test $ac_compiler_gnu = yes; then
3684 GXX=yes
3685else
3686 GXX=
3687fi
3688ac_test_CXXFLAGS=${CXXFLAGS+set}
3689ac_save_CXXFLAGS=$CXXFLAGS
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3691$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3692if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3693 $as_echo_n "(cached) " >&6
3694else
3695 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3696 ac_cxx_werror_flag=yes
3697 ac_cv_prog_cxx_g=no
3698 CXXFLAGS="-g"
3699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3700/* end confdefs.h. */
3701
3702int
3703main ()
3704{
3705
3706 ;
3707 return 0;
3708}
3709_ACEOF
3710if ac_fn_cxx_try_compile "$LINENO"; then :
3711 ac_cv_prog_cxx_g=yes
3712else
3713 CXXFLAGS=""
3714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3715/* end confdefs.h. */
3716
3717int
3718main ()
3719{
3720
3721 ;
3722 return 0;
3723}
3724_ACEOF
3725if ac_fn_cxx_try_compile "$LINENO"; then :
3726
3727else
3728 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3729 CXXFLAGS="-g"
3730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3731/* end confdefs.h. */
3732
3733int
3734main ()
3735{
3736
3737 ;
3738 return 0;
3739}
3740_ACEOF
3741if ac_fn_cxx_try_compile "$LINENO"; then :
3742 ac_cv_prog_cxx_g=yes
3743fi
3744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3745fi
3746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3747fi
3748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3749 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3750fi
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3752$as_echo "$ac_cv_prog_cxx_g" >&6; }
3753if test "$ac_test_CXXFLAGS" = set; then
3754 CXXFLAGS=$ac_save_CXXFLAGS
3755elif test $ac_cv_prog_cxx_g = yes; then
3756 if test "$GXX" = yes; then
3757 CXXFLAGS="-g -O2"
3758 else
3759 CXXFLAGS="-g"
3760 fi
3761else
3762 if test "$GXX" = yes; then
3763 CXXFLAGS="-O2"
3764 else
3765 CXXFLAGS=
3766 fi
3767fi
3768ac_ext=c
3769ac_cpp='$CPP $CPPFLAGS'
3770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3772ac_compiler_gnu=$ac_cv_c_compiler_gnu
3773
c9a1864a
YQ
3774
3775ac_ext=c
3776ac_cpp='$CPP $CPPFLAGS'
3777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3779ac_compiler_gnu=$ac_cv_c_compiler_gnu
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3781$as_echo_n "checking how to run the C preprocessor... " >&6; }
3782# On Suns, sometimes $CPP names a directory.
3783if test -n "$CPP" && test -d "$CPP"; then
3784 CPP=
3785fi
3786if test -z "$CPP"; then
d0ac1c44 3787 if ${ac_cv_prog_CPP+:} false; then :
c9a1864a
YQ
3788 $as_echo_n "(cached) " >&6
3789else
3790 # Double quotes because CPP needs to be expanded
3791 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3792 do
3793 ac_preproc_ok=false
3794for ac_c_preproc_warn_flag in '' yes
3795do
3796 # Use a header file that comes with gcc, so configuring glibc
3797 # with a fresh cross-compiler works.
3798 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3799 # <limits.h> exists even on freestanding compilers.
3800 # On the NeXT, cc -E runs the code through the compiler's parser,
3801 # not just through cpp. "Syntax error" is here to catch this case.
3802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3803/* end confdefs.h. */
3804#ifdef __STDC__
3805# include <limits.h>
3806#else
3807# include <assert.h>
3808#endif
3809 Syntax error
3810_ACEOF
3811if ac_fn_c_try_cpp "$LINENO"; then :
3812
3813else
3814 # Broken: fails on valid input.
3815continue
3816fi
d0ac1c44 3817rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3818
3819 # OK, works on sane cases. Now check whether nonexistent headers
3820 # can be detected and how.
3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3822/* end confdefs.h. */
3823#include <ac_nonexistent.h>
3824_ACEOF
3825if ac_fn_c_try_cpp "$LINENO"; then :
3826 # Broken: success on invalid input.
3827continue
3828else
3829 # Passes both tests.
3830ac_preproc_ok=:
3831break
3832fi
d0ac1c44 3833rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3834
3835done
3836# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3837rm -f conftest.i conftest.err conftest.$ac_ext
c9a1864a
YQ
3838if $ac_preproc_ok; then :
3839 break
3840fi
3841
3842 done
3843 ac_cv_prog_CPP=$CPP
3844
3845fi
3846 CPP=$ac_cv_prog_CPP
3847else
3848 ac_cv_prog_CPP=$CPP
3849fi
3850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3851$as_echo "$CPP" >&6; }
3852ac_preproc_ok=false
3853for ac_c_preproc_warn_flag in '' yes
3854do
3855 # Use a header file that comes with gcc, so configuring glibc
3856 # with a fresh cross-compiler works.
3857 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3858 # <limits.h> exists even on freestanding compilers.
3859 # On the NeXT, cc -E runs the code through the compiler's parser,
3860 # not just through cpp. "Syntax error" is here to catch this case.
3861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3862/* end confdefs.h. */
3863#ifdef __STDC__
3864# include <limits.h>
3865#else
3866# include <assert.h>
3867#endif
3868 Syntax error
3869_ACEOF
3870if ac_fn_c_try_cpp "$LINENO"; then :
3871
3872else
3873 # Broken: fails on valid input.
3874continue
3875fi
d0ac1c44 3876rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3877
3878 # OK, works on sane cases. Now check whether nonexistent headers
3879 # can be detected and how.
81ecdfbb 3880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3881/* end confdefs.h. */
3882#include <ac_nonexistent.h>
3883_ACEOF
81ecdfbb 3884if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3885 # Broken: success on invalid input.
3886continue
3887else
bec39cab
AC
3888 # Passes both tests.
3889ac_preproc_ok=:
3890break
3891fi
d0ac1c44 3892rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab
AC
3893
3894done
3895# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3896rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
3897if $ac_preproc_ok; then :
3898
3899else
3900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3902as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3903See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3904fi
3905
81ecdfbb
RW
3906ac_ext=c
3907ac_cpp='$CPP $CPPFLAGS'
3908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3910ac_compiler_gnu=$ac_cv_c_compiler_gnu
bec39cab 3911
81ecdfbb
RW
3912
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3914$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 3915if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 3916 $as_echo_n "(cached) " >&6
bec39cab 3917else
81ecdfbb
RW
3918 if test -z "$GREP"; then
3919 ac_path_GREP_found=false
3920 # Loop through the user's path and test for each of PROGNAME-LIST
3921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
bec39cab 3923do
81ecdfbb
RW
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
3926 for ac_prog in grep ggrep; do
3927 for ac_exec_ext in '' $ac_executable_extensions; do
3928 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3929 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
3930# Check for GNU ac_path_GREP and select it if it is found.
3931 # Check for GNU $ac_path_GREP
3932case `"$ac_path_GREP" --version 2>&1` in
3933*GNU*)
3934 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3935*)
3936 ac_count=0
3937 $as_echo_n 0123456789 >"conftest.in"
3938 while :
3939 do
3940 cat "conftest.in" "conftest.in" >"conftest.tmp"
3941 mv "conftest.tmp" "conftest.in"
3942 cp "conftest.in" "conftest.nl"
3943 $as_echo 'GREP' >> "conftest.nl"
3944 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3945 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3946 as_fn_arith $ac_count + 1 && ac_count=$as_val
3947 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3948 # Best one so far, save it but keep looking for a better one
3949 ac_cv_path_GREP="$ac_path_GREP"
3950 ac_path_GREP_max=$ac_count
3951 fi
3952 # 10*(2^10) chars as input seems more than enough
3953 test $ac_count -gt 10 && break
3954 done
3955 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3956esac
3957
3958 $ac_path_GREP_found && break 3
3959 done
3960 done
3961 done
3962IFS=$as_save_IFS
3963 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 3964 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
bec39cab
AC
3965 fi
3966else
81ecdfbb 3967 ac_cv_path_GREP=$GREP
bec39cab 3968fi
bec39cab 3969
84563040 3970fi
81ecdfbb
RW
3971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3972$as_echo "$ac_cv_path_GREP" >&6; }
3973 GREP="$ac_cv_path_GREP"
bec39cab 3974
bec39cab 3975
81ecdfbb
RW
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3977$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 3978if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb
RW
3979 $as_echo_n "(cached) " >&6
3980else
3981 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3982 then ac_cv_path_EGREP="$GREP -E"
3983 else
3984 if test -z "$EGREP"; then
3985 ac_path_EGREP_found=false
3986 # Loop through the user's path and test for each of PROGNAME-LIST
3987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3989do
3990 IFS=$as_save_IFS
3991 test -z "$as_dir" && as_dir=.
3992 for ac_prog in egrep; do
3993 for ac_exec_ext in '' $ac_executable_extensions; do
3994 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3995 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
3996# Check for GNU ac_path_EGREP and select it if it is found.
3997 # Check for GNU $ac_path_EGREP
3998case `"$ac_path_EGREP" --version 2>&1` in
3999*GNU*)
4000 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4001*)
4002 ac_count=0
4003 $as_echo_n 0123456789 >"conftest.in"
4004 while :
4005 do
4006 cat "conftest.in" "conftest.in" >"conftest.tmp"
4007 mv "conftest.tmp" "conftest.in"
4008 cp "conftest.in" "conftest.nl"
4009 $as_echo 'EGREP' >> "conftest.nl"
4010 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4011 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4012 as_fn_arith $ac_count + 1 && ac_count=$as_val
4013 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4014 # Best one so far, save it but keep looking for a better one
4015 ac_cv_path_EGREP="$ac_path_EGREP"
4016 ac_path_EGREP_max=$ac_count
4017 fi
4018 # 10*(2^10) chars as input seems more than enough
4019 test $ac_count -gt 10 && break
4020 done
4021 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4022esac
bec39cab 4023
81ecdfbb
RW
4024 $ac_path_EGREP_found && break 3
4025 done
4026 done
4027 done
4028IFS=$as_save_IFS
4029 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4030 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4031 fi
bec39cab 4032else
81ecdfbb 4033 ac_cv_path_EGREP=$EGREP
84563040 4034fi
bec39cab 4035
81ecdfbb 4036 fi
b80864fb 4037fi
81ecdfbb
RW
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4039$as_echo "$ac_cv_path_EGREP" >&6; }
4040 EGREP="$ac_cv_path_EGREP"
b80864fb
DJ
4041
4042
c971b7fa
PA
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4044$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4045if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4046 $as_echo_n "(cached) " >&6
4047else
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049/* end confdefs.h. */
4050#include <stdlib.h>
4051#include <stdarg.h>
4052#include <string.h>
4053#include <float.h>
bec39cab 4054
c971b7fa
PA
4055int
4056main ()
4057{
bec39cab 4058
c971b7fa
PA
4059 ;
4060 return 0;
4061}
4062_ACEOF
4063if ac_fn_c_try_compile "$LINENO"; then :
4064 ac_cv_header_stdc=yes
84563040 4065else
c971b7fa
PA
4066 ac_cv_header_stdc=no
4067fi
4068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 4069
c971b7fa
PA
4070if test $ac_cv_header_stdc = yes; then
4071 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4073/* end confdefs.h. */
c971b7fa 4074#include <string.h>
bec39cab
AC
4075
4076_ACEOF
84563040 4077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
c971b7fa
PA
4078 $EGREP "memchr" >/dev/null 2>&1; then :
4079
84563040 4080else
c971b7fa 4081 ac_cv_header_stdc=no
84563040
DJ
4082fi
4083rm -f conftest*
4084
770d76d7 4085fi
81ecdfbb 4086
c971b7fa
PA
4087if test $ac_cv_header_stdc = yes; then
4088 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4090/* end confdefs.h. */
4091#include <stdlib.h>
4092
4093_ACEOF
4094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4095 $EGREP "free" >/dev/null 2>&1; then :
4096
770d76d7 4097else
c971b7fa 4098 ac_cv_header_stdc=no
bec39cab 4099fi
c971b7fa 4100rm -f conftest*
bec39cab
AC
4101
4102fi
c971b7fa
PA
4103
4104if test $ac_cv_header_stdc = yes; then
4105 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4106 if test "$cross_compiling" = yes; then :
4107 :
770d76d7 4108else
c971b7fa
PA
4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110/* end confdefs.h. */
4111#include <ctype.h>
4112#include <stdlib.h>
4113#if ((' ' & 0x0FF) == 0x020)
4114# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4115# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4116#else
4117# define ISLOWER(c) \
4118 (('a' <= (c) && (c) <= 'i') \
4119 || ('j' <= (c) && (c) <= 'r') \
4120 || ('s' <= (c) && (c) <= 'z'))
4121# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4122#endif
4123
4124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4125int
4126main ()
4127{
4128 int i;
4129 for (i = 0; i < 256; i++)
4130 if (XOR (islower (i), ISLOWER (i))
4131 || toupper (i) != TOUPPER (i))
4132 return 2;
4133 return 0;
4134}
4135_ACEOF
4136if ac_fn_c_try_run "$LINENO"; then :
4137
770d76d7 4138else
c971b7fa
PA
4139 ac_cv_header_stdc=no
4140fi
4141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4142 conftest.$ac_objext conftest.beam conftest.$ac_ext
4143fi
bec39cab 4144
770d76d7
PA
4145fi
4146fi
c971b7fa
PA
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4148$as_echo "$ac_cv_header_stdc" >&6; }
4149if test $ac_cv_header_stdc = yes; then
4150
4151$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4152
770d76d7 4153fi
bec39cab 4154
c971b7fa
PA
4155# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4156for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4157 inttypes.h stdint.h unistd.h
4158do :
4159 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4160ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4161"
d0ac1c44 4162if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4163 cat >>confdefs.h <<_ACEOF
4164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4165_ACEOF
4166
81ecdfbb 4167fi
bec39cab 4168
c971b7fa 4169done
bec39cab
AC
4170
4171
4172
c971b7fa 4173 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4174if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa 4175 MINIX=yes
770d76d7 4176else
c971b7fa 4177 MINIX=
770d76d7 4178fi
bec39cab
AC
4179
4180
c971b7fa
PA
4181 if test "$MINIX" = yes; then
4182
4183$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4184
4185
4186$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4187
4188
4189$as_echo "#define _MINIX 1" >>confdefs.h
4190
770d76d7 4191 fi
bec39cab 4192
c971b7fa
PA
4193
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4195$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4196if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa 4197 $as_echo_n "(cached) " >&6
770d76d7 4198else
c971b7fa
PA
4199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4200/* end confdefs.h. */
bec39cab 4201
d0ac1c44
SM
4202# define __EXTENSIONS__ 1
4203 $ac_includes_default
c971b7fa
PA
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
4212if ac_fn_c_try_compile "$LINENO"; then :
4213 ac_cv_safe_to_define___extensions__=yes
770d76d7 4214else
c971b7fa
PA
4215 ac_cv_safe_to_define___extensions__=no
4216fi
4217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
770d76d7 4218fi
c971b7fa
PA
4219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4220$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4221 test $ac_cv_safe_to_define___extensions__ = yes &&
4222 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4223
4224 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4225
4226 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4227
4228 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4229
4230 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4231
bec39cab 4232
c9a1864a 4233
589bc927
TT
4234# Check whether --enable-largefile was given.
4235if test "${enable_largefile+set}" = set; then :
4236 enableval=$enable_largefile;
4237fi
4238
4239if test "$enable_largefile" != no; then
4240
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4242$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4243if ${ac_cv_sys_largefile_CC+:} false; then :
589bc927
TT
4244 $as_echo_n "(cached) " >&6
4245else
4246 ac_cv_sys_largefile_CC=no
4247 if test "$GCC" != yes; then
4248 ac_save_CC=$CC
4249 while :; do
4250 # IRIX 6.2 and later do not support large files by default,
4251 # so use the C compiler's -n32 option if that helps.
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253/* end confdefs.h. */
4254#include <sys/types.h>
4255 /* Check that off_t can represent 2**63 - 1 correctly.
4256 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4257 since some C++ compilers masquerading as C compilers
4258 incorrectly reject 9223372036854775807. */
4259#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4260 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4261 && LARGE_OFF_T % 2147483647 == 1)
4262 ? 1 : -1];
4263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
4271 if ac_fn_c_try_compile "$LINENO"; then :
4272 break
4273fi
4274rm -f core conftest.err conftest.$ac_objext
4275 CC="$CC -n32"
4276 if ac_fn_c_try_compile "$LINENO"; then :
4277 ac_cv_sys_largefile_CC=' -n32'; break
4278fi
4279rm -f core conftest.err conftest.$ac_objext
4280 break
4281 done
4282 CC=$ac_save_CC
4283 rm -f conftest.$ac_ext
4284 fi
4285fi
4286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4287$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4288 if test "$ac_cv_sys_largefile_CC" != no; then
4289 CC=$CC$ac_cv_sys_largefile_CC
4290 fi
4291
4292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4293$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4294if ${ac_cv_sys_file_offset_bits+:} false; then :
589bc927
TT
4295 $as_echo_n "(cached) " >&6
4296else
4297 while :; do
4298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4299/* end confdefs.h. */
4300#include <sys/types.h>
4301 /* Check that off_t can represent 2**63 - 1 correctly.
4302 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4303 since some C++ compilers masquerading as C compilers
4304 incorrectly reject 9223372036854775807. */
4305#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4306 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4307 && LARGE_OFF_T % 2147483647 == 1)
4308 ? 1 : -1];
4309int
4310main ()
4311{
4312
4313 ;
4314 return 0;
4315}
4316_ACEOF
4317if ac_fn_c_try_compile "$LINENO"; then :
4318 ac_cv_sys_file_offset_bits=no; break
4319fi
4320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4322/* end confdefs.h. */
4323#define _FILE_OFFSET_BITS 64
4324#include <sys/types.h>
4325 /* Check that off_t can represent 2**63 - 1 correctly.
4326 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4327 since some C++ compilers masquerading as C compilers
4328 incorrectly reject 9223372036854775807. */
4329#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4330 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4331 && LARGE_OFF_T % 2147483647 == 1)
4332 ? 1 : -1];
4333int
4334main ()
4335{
4336
4337 ;
4338 return 0;
4339}
4340_ACEOF
4341if ac_fn_c_try_compile "$LINENO"; then :
4342 ac_cv_sys_file_offset_bits=64; break
4343fi
4344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4345 ac_cv_sys_file_offset_bits=unknown
4346 break
4347done
4348fi
4349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4350$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4351case $ac_cv_sys_file_offset_bits in #(
4352 no | unknown) ;;
4353 *)
4354cat >>confdefs.h <<_ACEOF
4355#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4356_ACEOF
4357;;
4358esac
4359rm -rf conftest*
4360 if test $ac_cv_sys_file_offset_bits = unknown; then
4361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4362$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4363if ${ac_cv_sys_large_files+:} false; then :
589bc927
TT
4364 $as_echo_n "(cached) " >&6
4365else
4366 while :; do
4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4368/* end confdefs.h. */
4369#include <sys/types.h>
4370 /* Check that off_t can represent 2**63 - 1 correctly.
4371 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4372 since some C++ compilers masquerading as C compilers
4373 incorrectly reject 9223372036854775807. */
4374#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4375 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4376 && LARGE_OFF_T % 2147483647 == 1)
4377 ? 1 : -1];
4378int
4379main ()
4380{
4381
4382 ;
4383 return 0;
4384}
4385_ACEOF
4386if ac_fn_c_try_compile "$LINENO"; then :
4387 ac_cv_sys_large_files=no; break
4388fi
4389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391/* end confdefs.h. */
4392#define _LARGE_FILES 1
4393#include <sys/types.h>
4394 /* Check that off_t can represent 2**63 - 1 correctly.
4395 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4396 since some C++ compilers masquerading as C compilers
4397 incorrectly reject 9223372036854775807. */
4398#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4399 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4400 && LARGE_OFF_T % 2147483647 == 1)
4401 ? 1 : -1];
4402int
4403main ()
4404{
4405
4406 ;
4407 return 0;
4408}
4409_ACEOF
4410if ac_fn_c_try_compile "$LINENO"; then :
4411 ac_cv_sys_large_files=1; break
4412fi
4413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4414 ac_cv_sys_large_files=unknown
4415 break
4416done
4417fi
4418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4419$as_echo "$ac_cv_sys_large_files" >&6; }
4420case $ac_cv_sys_large_files in #(
4421 no | unknown) ;;
4422 *)
4423cat >>confdefs.h <<_ACEOF
4424#define _LARGE_FILES $ac_cv_sys_large_files
4425_ACEOF
4426;;
4427esac
4428rm -rf conftest*
4429 fi
d0ac1c44
SM
4430
4431
589bc927
TT
4432fi
4433
770d76d7
PA
4434ac_aux_dir=
4435for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4436 if test -f "$ac_dir/install-sh"; then
4437 ac_aux_dir=$ac_dir
4438 ac_install_sh="$ac_aux_dir/install-sh -c"
4439 break
4440 elif test -f "$ac_dir/install.sh"; then
4441 ac_aux_dir=$ac_dir
4442 ac_install_sh="$ac_aux_dir/install.sh -c"
4443 break
4444 elif test -f "$ac_dir/shtool"; then
4445 ac_aux_dir=$ac_dir
4446 ac_install_sh="$ac_aux_dir/shtool install -c"
4447 break
4448 fi
770d76d7
PA
4449done
4450if test -z "$ac_aux_dir"; then
d0ac1c44 4451 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
770d76d7
PA
4452fi
4453
4454# These three variables are undocumented and unsupported,
4455# and are intended to be withdrawn in a future Autoconf release.
4456# They can cause serious problems if a builder's source tree is in a directory
4457# whose full name contains unusual characters.
4458ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4459ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4460ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
c9a1864a 4461
bec39cab 4462
bdaed379
HD
4463# Expand $ac_aux_dir to an absolute path.
4464am_aux_dir=`cd "$ac_aux_dir" && pwd`
4465
4466if test x"${install_sh+set}" != xset; then
4467 case $am_aux_dir in
4468 *\ * | *\ *)
4469 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4470 *)
4471 install_sh="\${SHELL} $am_aux_dir/install-sh"
4472 esac
4473fi
4474
4475# Installed binaries are usually stripped using 'strip' when the user
4476# run "make install-strip". However 'strip' might not be the right
4477# tool to use in cross-compilation environments, therefore Automake
4478# will honor the 'STRIP' environment variable to overrule this program.
4479if test "$cross_compiling" != no; then
4480 if test -n "$ac_tool_prefix"; then
4481 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4482set dummy ${ac_tool_prefix}strip; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
4485if ${ac_cv_prog_STRIP+:} false; then :
4486 $as_echo_n "(cached) " >&6
4487else
4488 if test -n "$STRIP"; then
4489 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4490else
4491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4492for as_dir in $PATH
4493do
4494 IFS=$as_save_IFS
4495 test -z "$as_dir" && as_dir=.
4496 for ac_exec_ext in '' $ac_executable_extensions; do
4497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4498 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4500 break 2
4501 fi
4502done
4503 done
4504IFS=$as_save_IFS
4505
4506fi
4507fi
4508STRIP=$ac_cv_prog_STRIP
4509if test -n "$STRIP"; then
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4511$as_echo "$STRIP" >&6; }
4512else
4513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
4515fi
4516
4517
4518fi
4519if test -z "$ac_cv_prog_STRIP"; then
4520 ac_ct_STRIP=$STRIP
4521 # Extract the first word of "strip", so it can be a program name with args.
4522set dummy strip; ac_word=$2
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4524$as_echo_n "checking for $ac_word... " >&6; }
4525if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4526 $as_echo_n "(cached) " >&6
4527else
4528 if test -n "$ac_ct_STRIP"; then
4529 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4530else
4531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534 IFS=$as_save_IFS
4535 test -z "$as_dir" && as_dir=.
4536 for ac_exec_ext in '' $ac_executable_extensions; do
4537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4538 ac_cv_prog_ac_ct_STRIP="strip"
4539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4540 break 2
4541 fi
4542done
4543 done
4544IFS=$as_save_IFS
4545
4546fi
4547fi
4548ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4549if test -n "$ac_ct_STRIP"; then
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4551$as_echo "$ac_ct_STRIP" >&6; }
4552else
4553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554$as_echo "no" >&6; }
4555fi
4556
4557 if test "x$ac_ct_STRIP" = x; then
4558 STRIP=":"
4559 else
4560 case $cross_compiling:$ac_tool_warned in
4561yes:)
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4564ac_tool_warned=yes ;;
4565esac
4566 STRIP=$ac_ct_STRIP
4567 fi
4568else
4569 STRIP="$ac_cv_prog_STRIP"
4570fi
4571
4572fi
4573INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4574
4575
770d76d7
PA
4576# Make sure we can run config.sub.
4577$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4578 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7
PA
4579
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4581$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4582if ${ac_cv_build+:} false; then :
81ecdfbb
RW
4583 $as_echo_n "(cached) " >&6
4584else
770d76d7
PA
4585 ac_build_alias=$build_alias
4586test "x$ac_build_alias" = x &&
4587 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4588test "x$ac_build_alias" = x &&
d0ac1c44 4589 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
770d76d7 4590ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4591 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
770d76d7
PA
4592
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4595$as_echo "$ac_cv_build" >&6; }
4596case $ac_cv_build in
4597*-*-*) ;;
d0ac1c44 4598*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7
PA
4599esac
4600build=$ac_cv_build
4601ac_save_IFS=$IFS; IFS='-'
4602set x $ac_cv_build
4603shift
4604build_cpu=$1
4605build_vendor=$2
4606shift; shift
4607# Remember, the first character of IFS is used to create $*,
4608# except with old shells:
4609build_os=$*
4610IFS=$ac_save_IFS
4611case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4612
4613
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4615$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4616if ${ac_cv_host+:} false; then :
770d76d7
PA
4617 $as_echo_n "(cached) " >&6
4618else
4619 if test "x$host_alias" = x; then
4620 ac_cv_host=$ac_cv_build
4621else
4622 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4623 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
770d76d7
PA
4624fi
4625
4626fi
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4628$as_echo "$ac_cv_host" >&6; }
4629case $ac_cv_host in
4630*-*-*) ;;
d0ac1c44 4631*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
770d76d7
PA
4632esac
4633host=$ac_cv_host
4634ac_save_IFS=$IFS; IFS='-'
4635set x $ac_cv_host
4636shift
4637host_cpu=$1
4638host_vendor=$2
4639shift; shift
4640# Remember, the first character of IFS is used to create $*,
4641# except with old shells:
4642host_os=$*
4643IFS=$ac_save_IFS
4644case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4645
4646
c971b7fa
PA
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4648$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4649if ${ac_cv_target+:} false; then :
770d76d7
PA
4650 $as_echo_n "(cached) " >&6
4651else
c971b7fa
PA
4652 if test "x$target_alias" = x; then
4653 ac_cv_target=$ac_cv_host
770d76d7 4654else
c971b7fa 4655 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4656 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
770d76d7 4657fi
770d76d7
PA
4658
4659fi
c971b7fa
PA
4660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4661$as_echo "$ac_cv_target" >&6; }
4662case $ac_cv_target in
4663*-*-*) ;;
d0ac1c44 4664*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
4665esac
4666target=$ac_cv_target
4667ac_save_IFS=$IFS; IFS='-'
4668set x $ac_cv_target
4669shift
4670target_cpu=$1
4671target_vendor=$2
4672shift; shift
4673# Remember, the first character of IFS is used to create $*,
4674# except with old shells:
4675target_os=$*
4676IFS=$ac_save_IFS
4677case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
770d76d7 4678
770d76d7 4679
c971b7fa
PA
4680# The aliases save the names the user supplied, while $host etc.
4681# will get canonicalized.
4682test -n "$target_alias" &&
4683 test "$program_prefix$program_suffix$program_transform_name" = \
4684 NONENONEs,x,x, &&
4685 program_prefix=${target_alias}-
770d76d7 4686
770d76d7 4687
c971b7fa
PA
4688# Find a good install program. We prefer a C program (faster),
4689# so one script is as good as another. But avoid the broken or
4690# incompatible versions:
4691# SysV /etc/install, /usr/sbin/install
4692# SunOS /usr/etc/install
4693# IRIX /sbin/install
4694# AIX /bin/install
4695# AmigaOS /C/install, which installs bootblocks on floppy discs
4696# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4697# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4698# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4699# OS/2's system install, which has a completely different semantic
4700# ./install, which can be erroneously created by make from ./install.sh.
4701# Reject install programs that cannot install multiple files.
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4703$as_echo_n "checking for a BSD-compatible install... " >&6; }
4704if test -z "$INSTALL"; then
d0ac1c44 4705if ${ac_cv_path_install+:} false; then :
c971b7fa 4706 $as_echo_n "(cached) " >&6
81ecdfbb
RW
4707else
4708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4709for as_dir in $PATH
fd462a61 4710do
81ecdfbb
RW
4711 IFS=$as_save_IFS
4712 test -z "$as_dir" && as_dir=.
4713 # Account for people who put trailing slashes in PATH elements.
4714case $as_dir/ in #((
4715 ./ | .// | /[cC]/* | \
4716 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4717 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4718 /usr/ucb/* ) ;;
4719 *)
4720 # OSF1 and SCO ODT 3.0 have their own names for install.
4721 # Don't use installbsd from OSF since it installs stuff as root
4722 # by default.
4723 for ac_prog in ginstall scoinst install; do
4724 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4725 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
81ecdfbb
RW
4726 if test $ac_prog = install &&
4727 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4728 # AIX install. It has an incompatible calling convention.
4729 :
4730 elif test $ac_prog = install &&
4731 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4732 # program-specific install script used by HP pwplus--don't use.
4733 :
4734 else
4735 rm -rf conftest.one conftest.two conftest.dir
4736 echo one > conftest.one
4737 echo two > conftest.two
4738 mkdir conftest.dir
4739 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4740 test -s conftest.one && test -s conftest.two &&
4741 test -s conftest.dir/conftest.one &&
4742 test -s conftest.dir/conftest.two
4743 then
4744 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4745 break 3
4746 fi
4747 fi
4748 fi
4749 done
4750 done
4751 ;;
4752esac
fd462a61 4753
81ecdfbb
RW
4754 done
4755IFS=$as_save_IFS
fd462a61 4756
81ecdfbb 4757rm -rf conftest.one conftest.two conftest.dir
fd462a61 4758
fd462a61 4759fi
81ecdfbb
RW
4760 if test "${ac_cv_path_install+set}" = set; then
4761 INSTALL=$ac_cv_path_install
4762 else
4763 # As a last resort, use the slow shell script. Don't cache a
4764 # value for INSTALL within a source directory, because that will
4765 # break other packages using the cache if that directory is
4766 # removed, or if the value is a relative name.
4767 INSTALL=$ac_install_sh
4768 fi
fd462a61 4769fi
81ecdfbb
RW
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4771$as_echo "$INSTALL" >&6; }
fd462a61 4772
81ecdfbb
RW
4773# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4774# It thinks the first close brace ends the variable substitution.
4775test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
fd462a61 4776
81ecdfbb 4777test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
fd462a61 4778
81ecdfbb 4779test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
e28b3332 4780
e1d2394b
MS
4781if test -n "$ac_tool_prefix"; then
4782 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4783set dummy ${ac_tool_prefix}ar; ac_word=$2
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4786if ${ac_cv_prog_AR+:} false; then :
e1d2394b
MS
4787 $as_echo_n "(cached) " >&6
4788else
4789 if test -n "$AR"; then
4790 ac_cv_prog_AR="$AR" # Let the user override the test.
4791else
4792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793for as_dir in $PATH
4794do
4795 IFS=$as_save_IFS
4796 test -z "$as_dir" && as_dir=.
4797 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4799 ac_cv_prog_AR="${ac_tool_prefix}ar"
4800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4801 break 2
4802 fi
4803done
4804 done
4805IFS=$as_save_IFS
4806
4807fi
4808fi
4809AR=$ac_cv_prog_AR
4810if test -n "$AR"; then
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4812$as_echo "$AR" >&6; }
4813else
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4815$as_echo "no" >&6; }
4816fi
4817
4818
4819fi
4820if test -z "$ac_cv_prog_AR"; then
4821 ac_ct_AR=$AR
4822 # Extract the first word of "ar", so it can be a program name with args.
4823set dummy ar; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4826if ${ac_cv_prog_ac_ct_AR+:} false; then :
e1d2394b
MS
4827 $as_echo_n "(cached) " >&6
4828else
4829 if test -n "$ac_ct_AR"; then
4830 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4831else
4832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in $PATH
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
4837 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4839 ac_cv_prog_ac_ct_AR="ar"
4840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841 break 2
4842 fi
4843done
4844 done
4845IFS=$as_save_IFS
4846
4847fi
4848fi
4849ac_ct_AR=$ac_cv_prog_ac_ct_AR
4850if test -n "$ac_ct_AR"; then
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4852$as_echo "$ac_ct_AR" >&6; }
4853else
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
4858 if test "x$ac_ct_AR" = x; then
4859 AR=""
4860 else
4861 case $cross_compiling:$ac_tool_warned in
4862yes:)
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4865ac_tool_warned=yes ;;
4866esac
4867 AR=$ac_ct_AR
4868 fi
4869else
4870 AR="$ac_cv_prog_AR"
4871fi
4872
c971b7fa
PA
4873if test -n "$ac_tool_prefix"; then
4874 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4875set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4878if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb
RW
4879 $as_echo_n "(cached) " >&6
4880else
c971b7fa
PA
4881 if test -n "$RANLIB"; then
4882 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
e28b3332 4883else
c971b7fa
PA
4884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887 IFS=$as_save_IFS
4888 test -z "$as_dir" && as_dir=.
4889 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4891 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893 break 2
4894 fi
4895done
4896 done
4897IFS=$as_save_IFS
4898
4899fi
4900fi
4901RANLIB=$ac_cv_prog_RANLIB
4902if test -n "$RANLIB"; then
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4904$as_echo "$RANLIB" >&6; }
4905else
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911fi
4912if test -z "$ac_cv_prog_RANLIB"; then
4913 ac_ct_RANLIB=$RANLIB
4914 # Extract the first word of "ranlib", so it can be a program name with args.
4915set dummy ranlib; ac_word=$2
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4918if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
4919 $as_echo_n "(cached) " >&6
4920else
4921 if test -n "$ac_ct_RANLIB"; then
4922 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4923else
4924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in $PATH
4926do
4927 IFS=$as_save_IFS
4928 test -z "$as_dir" && as_dir=.
4929 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4931 ac_cv_prog_ac_ct_RANLIB="ranlib"
4932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933 break 2
4934 fi
4935done
4936 done
4937IFS=$as_save_IFS
4938
4939fi
4940fi
4941ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4942if test -n "$ac_ct_RANLIB"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4944$as_echo "$ac_ct_RANLIB" >&6; }
4945else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950 if test "x$ac_ct_RANLIB" = x; then
4951 RANLIB=":"
4952 else
4953 case $cross_compiling:$ac_tool_warned in
4954yes:)
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4957ac_tool_warned=yes ;;
4958esac
4959 RANLIB=$ac_ct_RANLIB
4960 fi
4961else
4962 RANLIB="$ac_cv_prog_RANLIB"
4963fi
4964
4965
4966test "$program_prefix" != NONE &&
4967 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4968# Use a double $ so make ignores it.
4969test "$program_suffix" != NONE &&
4970 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4971# Double any \ or $.
4972# By default was `s,x,x', remove it if useless.
4973ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4974program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4975
4976
0bcda685
PA
4977# We require a C++11 compiler. Check if one is available, and if
4978# necessary, set CXX_DIALECT to some -std=xxx switch.
4979
458412c3 4980 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
4981 ac_ext=cpp
4982ac_cpp='$CXXCPP $CPPFLAGS'
4983ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4984ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4985ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4986 CXX_DIALECT=""
4987 ac_success=no
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4989$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 4990if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
4991 $as_echo_n "(cached) " >&6
4992else
4993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4994/* end confdefs.h. */
4995
4996
4997// If the compiler admits that it is not ready for C++11, why torture it?
4998// Hopefully, this will speed up the test.
4999
5000#ifndef __cplusplus
5001
5002#error "This is not a C++ compiler"
5003
5004#elif __cplusplus < 201103L
5005
5006#error "This is not a C++11 compiler"
5007
5008#else
5009
5010namespace cxx11
5011{
5012
5013 namespace test_static_assert
5014 {
5015
5016 template <typename T>
5017 struct check
5018 {
5019 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5020 };
5021
5022 }
5023
5024 namespace test_final_override
5025 {
5026
5027 struct Base
5028 {
5029 virtual void f() {}
5030 };
5031
5032 struct Derived : public Base
5033 {
5034 virtual void f() override {}
5035 };
5036
5037 }
5038
5039 namespace test_double_right_angle_brackets
5040 {
5041
5042 template < typename T >
5043 struct check {};
5044
5045 typedef check<void> single_type;
5046 typedef check<check<void>> double_type;
5047 typedef check<check<check<void>>> triple_type;
5048 typedef check<check<check<check<void>>>> quadruple_type;
5049
5050 }
5051
5052 namespace test_decltype
5053 {
5054
5055 int
5056 f()
5057 {
5058 int a = 1;
5059 decltype(a) b = 2;
5060 return a + b;
5061 }
5062
5063 }
5064
5065 namespace test_type_deduction
5066 {
5067
5068 template < typename T1, typename T2 >
5069 struct is_same
5070 {
5071 static const bool value = false;
5072 };
5073
5074 template < typename T >
5075 struct is_same<T, T>
5076 {
5077 static const bool value = true;
5078 };
5079
5080 template < typename T1, typename T2 >
5081 auto
5082 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5083 {
5084 return a1 + a2;
5085 }
5086
5087 int
5088 test(const int c, volatile int v)
5089 {
5090 static_assert(is_same<int, decltype(0)>::value == true, "");
5091 static_assert(is_same<int, decltype(c)>::value == false, "");
5092 static_assert(is_same<int, decltype(v)>::value == false, "");
5093 auto ac = c;
5094 auto av = v;
5095 auto sumi = ac + av + 'x';
5096 auto sumf = ac + av + 1.0;
5097 static_assert(is_same<int, decltype(ac)>::value == true, "");
5098 static_assert(is_same<int, decltype(av)>::value == true, "");
5099 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5100 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5101 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5102 return (sumf > 0.0) ? sumi : add(c, v);
5103 }
5104
5105 }
5106
5107 namespace test_noexcept
5108 {
5109
5110 int f() { return 0; }
5111 int g() noexcept { return 0; }
5112
5113 static_assert(noexcept(f()) == false, "");
5114 static_assert(noexcept(g()) == true, "");
5115
5116 }
5117
5118 namespace test_constexpr
5119 {
5120
5121 template < typename CharT >
5122 unsigned long constexpr
5123 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5124 {
5125 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5126 }
5127
5128 template < typename CharT >
5129 unsigned long constexpr
5130 strlen_c(const CharT *const s) noexcept
5131 {
5132 return strlen_c_r(s, 0UL);
5133 }
5134
5135 static_assert(strlen_c("") == 0UL, "");
5136 static_assert(strlen_c("1") == 1UL, "");
5137 static_assert(strlen_c("example") == 7UL, "");
5138 static_assert(strlen_c("another\0example") == 7UL, "");
5139
5140 }
5141
5142 namespace test_rvalue_references
5143 {
5144
5145 template < int N >
5146 struct answer
5147 {
5148 static constexpr int value = N;
5149 };
5150
5151 answer<1> f(int&) { return answer<1>(); }
5152 answer<2> f(const int&) { return answer<2>(); }
5153 answer<3> f(int&&) { return answer<3>(); }
5154
5155 void
5156 test()
5157 {
5158 int i = 0;
5159 const int c = 0;
5160 static_assert(decltype(f(i))::value == 1, "");
5161 static_assert(decltype(f(c))::value == 2, "");
5162 static_assert(decltype(f(0))::value == 3, "");
5163 }
5164
5165 }
5166
5167 namespace test_uniform_initialization
5168 {
5169
5170 struct test
5171 {
5172 static const int zero {};
5173 static const int one {1};
5174 };
5175
5176 static_assert(test::zero == 0, "");
5177 static_assert(test::one == 1, "");
5178
5179 }
5180
5181 namespace test_lambdas
5182 {
5183
5184 void
5185 test1()
5186 {
5187 auto lambda1 = [](){};
5188 auto lambda2 = lambda1;
5189 lambda1();
5190 lambda2();
5191 }
5192
5193 int
5194 test2()
5195 {
5196 auto a = [](int i, int j){ return i + j; }(1, 2);
5197 auto b = []() -> int { return '0'; }();
5198 auto c = [=](){ return a + b; }();
5199 auto d = [&](){ return c; }();
5200 auto e = [a, &b](int x) mutable {
5201 const auto identity = [](int y){ return y; };
5202 for (auto i = 0; i < a; ++i)
5203 a += b--;
5204 return x + identity(a + b);
5205 }(0);
5206 return a + b + c + d + e;
5207 }
5208
5209 int
5210 test3()
5211 {
5212 const auto nullary = [](){ return 0; };
5213 const auto unary = [](int x){ return x; };
5214 using nullary_t = decltype(nullary);
5215 using unary_t = decltype(unary);
5216 const auto higher1st = [](nullary_t f){ return f(); };
5217 const auto higher2nd = [unary](nullary_t f1){
5218 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5219 };
5220 return higher1st(nullary) + higher2nd(nullary)(unary);
5221 }
5222
5223 }
5224
5225 namespace test_variadic_templates
5226 {
5227
5228 template <int...>
5229 struct sum;
5230
5231 template <int N0, int... N1toN>
5232 struct sum<N0, N1toN...>
5233 {
5234 static constexpr auto value = N0 + sum<N1toN...>::value;
5235 };
5236
5237 template <>
5238 struct sum<>
5239 {
5240 static constexpr auto value = 0;
5241 };
5242
5243 static_assert(sum<>::value == 0, "");
5244 static_assert(sum<1>::value == 1, "");
5245 static_assert(sum<23>::value == 23, "");
5246 static_assert(sum<1, 2>::value == 3, "");
5247 static_assert(sum<5, 5, 11>::value == 21, "");
5248 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5249
5250 }
5251
5252 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5253 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5254 // because of this.
5255 namespace test_template_alias_sfinae
5256 {
5257
5258 struct foo {};
5259
5260 template<typename T>
5261 using member = typename T::member_type;
5262
5263 template<typename T>
5264 void func(...) {}
5265
5266 template<typename T>
5267 void func(member<T>*) {}
5268
5269 void test();
5270
5271 void test() { func<foo>(0); }
5272
5273 }
5274
5275} // namespace cxx11
5276
5277#endif // __cplusplus >= 201103L
5278
5279
5280
5281_ACEOF
5282if ac_fn_cxx_try_compile "$LINENO"; then :
5283 ax_cv_cxx_compile_cxx11=yes
5284else
5285 ax_cv_cxx_compile_cxx11=no
5286fi
5287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5288fi
5289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5290$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5291 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5292 ac_success=yes
5293 fi
5294
5295 if test x$ac_success = xno; then
458412c3
TT
5296 for alternative in ${ax_cxx_compile_alternatives}; do
5297 switch="-std=gnu++${alternative}"
0bcda685
PA
5298 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5300$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5301if eval \${$cachevar+:} false; then :
0bcda685
PA
5302 $as_echo_n "(cached) " >&6
5303else
5304 ac_save_CXX="$CXX"
5305 CXX="$CXX $switch"
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5307/* end confdefs.h. */
5308
5309
5310// If the compiler admits that it is not ready for C++11, why torture it?
5311// Hopefully, this will speed up the test.
5312
5313#ifndef __cplusplus
5314
5315#error "This is not a C++ compiler"
5316
5317#elif __cplusplus < 201103L
5318
5319#error "This is not a C++11 compiler"
5320
5321#else
5322
5323namespace cxx11
5324{
5325
5326 namespace test_static_assert
5327 {
5328
5329 template <typename T>
5330 struct check
5331 {
5332 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5333 };
5334
5335 }
5336
5337 namespace test_final_override
5338 {
5339
5340 struct Base
5341 {
5342 virtual void f() {}
5343 };
5344
5345 struct Derived : public Base
5346 {
5347 virtual void f() override {}
5348 };
5349
5350 }
5351
5352 namespace test_double_right_angle_brackets
5353 {
5354
5355 template < typename T >
5356 struct check {};
5357
5358 typedef check<void> single_type;
5359 typedef check<check<void>> double_type;
5360 typedef check<check<check<void>>> triple_type;
5361 typedef check<check<check<check<void>>>> quadruple_type;
5362
5363 }
5364
5365 namespace test_decltype
5366 {
5367
5368 int
5369 f()
5370 {
5371 int a = 1;
5372 decltype(a) b = 2;
5373 return a + b;
5374 }
5375
5376 }
5377
5378 namespace test_type_deduction
5379 {
5380
5381 template < typename T1, typename T2 >
5382 struct is_same
5383 {
5384 static const bool value = false;
5385 };
5386
5387 template < typename T >
5388 struct is_same<T, T>
5389 {
5390 static const bool value = true;
5391 };
5392
5393 template < typename T1, typename T2 >
5394 auto
5395 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5396 {
5397 return a1 + a2;
5398 }
5399
5400 int
5401 test(const int c, volatile int v)
5402 {
5403 static_assert(is_same<int, decltype(0)>::value == true, "");
5404 static_assert(is_same<int, decltype(c)>::value == false, "");
5405 static_assert(is_same<int, decltype(v)>::value == false, "");
5406 auto ac = c;
5407 auto av = v;
5408 auto sumi = ac + av + 'x';
5409 auto sumf = ac + av + 1.0;
5410 static_assert(is_same<int, decltype(ac)>::value == true, "");
5411 static_assert(is_same<int, decltype(av)>::value == true, "");
5412 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5413 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5414 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5415 return (sumf > 0.0) ? sumi : add(c, v);
5416 }
5417
5418 }
5419
5420 namespace test_noexcept
5421 {
5422
5423 int f() { return 0; }
5424 int g() noexcept { return 0; }
5425
5426 static_assert(noexcept(f()) == false, "");
5427 static_assert(noexcept(g()) == true, "");
5428
5429 }
5430
5431 namespace test_constexpr
5432 {
5433
5434 template < typename CharT >
5435 unsigned long constexpr
5436 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5437 {
5438 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5439 }
5440
5441 template < typename CharT >
5442 unsigned long constexpr
5443 strlen_c(const CharT *const s) noexcept
5444 {
5445 return strlen_c_r(s, 0UL);
5446 }
5447
5448 static_assert(strlen_c("") == 0UL, "");
5449 static_assert(strlen_c("1") == 1UL, "");
5450 static_assert(strlen_c("example") == 7UL, "");
5451 static_assert(strlen_c("another\0example") == 7UL, "");
5452
5453 }
5454
5455 namespace test_rvalue_references
5456 {
5457
5458 template < int N >
5459 struct answer
5460 {
5461 static constexpr int value = N;
5462 };
5463
5464 answer<1> f(int&) { return answer<1>(); }
5465 answer<2> f(const int&) { return answer<2>(); }
5466 answer<3> f(int&&) { return answer<3>(); }
5467
5468 void
5469 test()
5470 {
5471 int i = 0;
5472 const int c = 0;
5473 static_assert(decltype(f(i))::value == 1, "");
5474 static_assert(decltype(f(c))::value == 2, "");
5475 static_assert(decltype(f(0))::value == 3, "");
5476 }
5477
5478 }
5479
5480 namespace test_uniform_initialization
5481 {
5482
5483 struct test
5484 {
5485 static const int zero {};
5486 static const int one {1};
5487 };
5488
5489 static_assert(test::zero == 0, "");
5490 static_assert(test::one == 1, "");
5491
5492 }
5493
5494 namespace test_lambdas
5495 {
5496
5497 void
5498 test1()
5499 {
5500 auto lambda1 = [](){};
5501 auto lambda2 = lambda1;
5502 lambda1();
5503 lambda2();
5504 }
5505
5506 int
5507 test2()
5508 {
5509 auto a = [](int i, int j){ return i + j; }(1, 2);
5510 auto b = []() -> int { return '0'; }();
5511 auto c = [=](){ return a + b; }();
5512 auto d = [&](){ return c; }();
5513 auto e = [a, &b](int x) mutable {
5514 const auto identity = [](int y){ return y; };
5515 for (auto i = 0; i < a; ++i)
5516 a += b--;
5517 return x + identity(a + b);
5518 }(0);
5519 return a + b + c + d + e;
5520 }
5521
5522 int
5523 test3()
5524 {
5525 const auto nullary = [](){ return 0; };
5526 const auto unary = [](int x){ return x; };
5527 using nullary_t = decltype(nullary);
5528 using unary_t = decltype(unary);
5529 const auto higher1st = [](nullary_t f){ return f(); };
5530 const auto higher2nd = [unary](nullary_t f1){
5531 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5532 };
5533 return higher1st(nullary) + higher2nd(nullary)(unary);
5534 }
5535
5536 }
5537
5538 namespace test_variadic_templates
5539 {
5540
5541 template <int...>
5542 struct sum;
5543
5544 template <int N0, int... N1toN>
5545 struct sum<N0, N1toN...>
5546 {
5547 static constexpr auto value = N0 + sum<N1toN...>::value;
5548 };
5549
5550 template <>
5551 struct sum<>
5552 {
5553 static constexpr auto value = 0;
5554 };
5555
5556 static_assert(sum<>::value == 0, "");
5557 static_assert(sum<1>::value == 1, "");
5558 static_assert(sum<23>::value == 23, "");
5559 static_assert(sum<1, 2>::value == 3, "");
5560 static_assert(sum<5, 5, 11>::value == 21, "");
5561 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5562
5563 }
5564
5565 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5566 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5567 // because of this.
5568 namespace test_template_alias_sfinae
5569 {
5570
5571 struct foo {};
5572
5573 template<typename T>
5574 using member = typename T::member_type;
5575
5576 template<typename T>
5577 void func(...) {}
5578
5579 template<typename T>
5580 void func(member<T>*) {}
5581
5582 void test();
5583
5584 void test() { func<foo>(0); }
5585
5586 }
5587
5588} // namespace cxx11
5589
5590#endif // __cplusplus >= 201103L
5591
5592
5593
5594_ACEOF
5595if ac_fn_cxx_try_compile "$LINENO"; then :
5596 eval $cachevar=yes
5597else
5598 eval $cachevar=no
5599fi
5600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5601 CXX="$ac_save_CXX"
5602fi
5603eval ac_res=\$$cachevar
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5605$as_echo "$ac_res" >&6; }
5606 if eval test x\$$cachevar = xyes; then
5607 CXX_DIALECT="$switch"
5608 ac_success=yes
5609 break
5610 fi
5611 done
5612 fi
5613
5614 if test x$ac_success = xno; then
458412c3
TT
5615 for alternative in ${ax_cxx_compile_alternatives}; do
5616 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5617 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5619$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5620if eval \${$cachevar+:} false; then :
0bcda685
PA
5621 $as_echo_n "(cached) " >&6
5622else
5623 ac_save_CXX="$CXX"
458412c3
TT
5624 CXX="$CXX $switch"
5625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5626/* end confdefs.h. */
5627
5628
5629// If the compiler admits that it is not ready for C++11, why torture it?
5630// Hopefully, this will speed up the test.
5631
5632#ifndef __cplusplus
5633
5634#error "This is not a C++ compiler"
5635
5636#elif __cplusplus < 201103L
5637
5638#error "This is not a C++11 compiler"
5639
5640#else
5641
5642namespace cxx11
5643{
5644
5645 namespace test_static_assert
5646 {
5647
5648 template <typename T>
5649 struct check
5650 {
5651 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5652 };
5653
5654 }
5655
5656 namespace test_final_override
5657 {
5658
5659 struct Base
5660 {
5661 virtual void f() {}
5662 };
5663
5664 struct Derived : public Base
5665 {
5666 virtual void f() override {}
5667 };
5668
5669 }
5670
5671 namespace test_double_right_angle_brackets
5672 {
5673
5674 template < typename T >
5675 struct check {};
5676
5677 typedef check<void> single_type;
5678 typedef check<check<void>> double_type;
5679 typedef check<check<check<void>>> triple_type;
5680 typedef check<check<check<check<void>>>> quadruple_type;
5681
5682 }
5683
5684 namespace test_decltype
5685 {
5686
5687 int
5688 f()
5689 {
5690 int a = 1;
5691 decltype(a) b = 2;
5692 return a + b;
5693 }
5694
5695 }
5696
5697 namespace test_type_deduction
5698 {
5699
5700 template < typename T1, typename T2 >
5701 struct is_same
5702 {
5703 static const bool value = false;
5704 };
5705
5706 template < typename T >
5707 struct is_same<T, T>
5708 {
5709 static const bool value = true;
5710 };
5711
5712 template < typename T1, typename T2 >
5713 auto
5714 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5715 {
5716 return a1 + a2;
5717 }
5718
5719 int
5720 test(const int c, volatile int v)
5721 {
5722 static_assert(is_same<int, decltype(0)>::value == true, "");
5723 static_assert(is_same<int, decltype(c)>::value == false, "");
5724 static_assert(is_same<int, decltype(v)>::value == false, "");
5725 auto ac = c;
5726 auto av = v;
5727 auto sumi = ac + av + 'x';
5728 auto sumf = ac + av + 1.0;
5729 static_assert(is_same<int, decltype(ac)>::value == true, "");
5730 static_assert(is_same<int, decltype(av)>::value == true, "");
5731 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5732 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5733 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5734 return (sumf > 0.0) ? sumi : add(c, v);
5735 }
5736
5737 }
5738
5739 namespace test_noexcept
5740 {
5741
5742 int f() { return 0; }
5743 int g() noexcept { return 0; }
5744
5745 static_assert(noexcept(f()) == false, "");
5746 static_assert(noexcept(g()) == true, "");
5747
5748 }
5749
5750 namespace test_constexpr
5751 {
5752
5753 template < typename CharT >
5754 unsigned long constexpr
5755 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5756 {
5757 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5758 }
5759
5760 template < typename CharT >
5761 unsigned long constexpr
5762 strlen_c(const CharT *const s) noexcept
5763 {
5764 return strlen_c_r(s, 0UL);
5765 }
5766
5767 static_assert(strlen_c("") == 0UL, "");
5768 static_assert(strlen_c("1") == 1UL, "");
5769 static_assert(strlen_c("example") == 7UL, "");
5770 static_assert(strlen_c("another\0example") == 7UL, "");
5771
5772 }
5773
5774 namespace test_rvalue_references
5775 {
5776
5777 template < int N >
5778 struct answer
5779 {
5780 static constexpr int value = N;
5781 };
5782
5783 answer<1> f(int&) { return answer<1>(); }
5784 answer<2> f(const int&) { return answer<2>(); }
5785 answer<3> f(int&&) { return answer<3>(); }
5786
5787 void
5788 test()
5789 {
5790 int i = 0;
5791 const int c = 0;
5792 static_assert(decltype(f(i))::value == 1, "");
5793 static_assert(decltype(f(c))::value == 2, "");
5794 static_assert(decltype(f(0))::value == 3, "");
5795 }
5796
5797 }
5798
5799 namespace test_uniform_initialization
5800 {
5801
5802 struct test
5803 {
5804 static const int zero {};
5805 static const int one {1};
5806 };
5807
5808 static_assert(test::zero == 0, "");
5809 static_assert(test::one == 1, "");
5810
5811 }
5812
5813 namespace test_lambdas
5814 {
5815
5816 void
5817 test1()
5818 {
5819 auto lambda1 = [](){};
5820 auto lambda2 = lambda1;
5821 lambda1();
5822 lambda2();
5823 }
5824
5825 int
5826 test2()
5827 {
5828 auto a = [](int i, int j){ return i + j; }(1, 2);
5829 auto b = []() -> int { return '0'; }();
5830 auto c = [=](){ return a + b; }();
5831 auto d = [&](){ return c; }();
5832 auto e = [a, &b](int x) mutable {
5833 const auto identity = [](int y){ return y; };
5834 for (auto i = 0; i < a; ++i)
5835 a += b--;
5836 return x + identity(a + b);
5837 }(0);
5838 return a + b + c + d + e;
5839 }
5840
5841 int
5842 test3()
5843 {
5844 const auto nullary = [](){ return 0; };
5845 const auto unary = [](int x){ return x; };
5846 using nullary_t = decltype(nullary);
5847 using unary_t = decltype(unary);
5848 const auto higher1st = [](nullary_t f){ return f(); };
5849 const auto higher2nd = [unary](nullary_t f1){
5850 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5851 };
5852 return higher1st(nullary) + higher2nd(nullary)(unary);
5853 }
5854
5855 }
5856
5857 namespace test_variadic_templates
5858 {
5859
5860 template <int...>
5861 struct sum;
5862
5863 template <int N0, int... N1toN>
5864 struct sum<N0, N1toN...>
5865 {
5866 static constexpr auto value = N0 + sum<N1toN...>::value;
5867 };
5868
5869 template <>
5870 struct sum<>
5871 {
5872 static constexpr auto value = 0;
5873 };
5874
5875 static_assert(sum<>::value == 0, "");
5876 static_assert(sum<1>::value == 1, "");
5877 static_assert(sum<23>::value == 23, "");
5878 static_assert(sum<1, 2>::value == 3, "");
5879 static_assert(sum<5, 5, 11>::value == 21, "");
5880 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5881
5882 }
5883
5884 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5885 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5886 // because of this.
5887 namespace test_template_alias_sfinae
5888 {
5889
5890 struct foo {};
5891
5892 template<typename T>
5893 using member = typename T::member_type;
5894
5895 template<typename T>
5896 void func(...) {}
5897
5898 template<typename T>
5899 void func(member<T>*) {}
5900
5901 void test();
5902
5903 void test() { func<foo>(0); }
5904
5905 }
5906
5907} // namespace cxx11
5908
5909#endif // __cplusplus >= 201103L
5910
5911
5912
5913_ACEOF
5914if ac_fn_cxx_try_compile "$LINENO"; then :
5915 eval $cachevar=yes
5916else
5917 eval $cachevar=no
5918fi
5919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
458412c3 5920 CXX="$ac_save_CXX"
0bcda685
PA
5921fi
5922eval ac_res=\$$cachevar
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5924$as_echo "$ac_res" >&6; }
458412c3
TT
5925 if eval test x\$$cachevar = xyes; then
5926 CXX_DIALECT="$switch"
5927 ac_success=yes
5928 break
5929 fi
5930 done
5931 if test x$ac_success = xyes; then
0bcda685
PA
5932 break
5933 fi
5934 done
5935 fi
5936 ac_ext=c
5937ac_cpp='$CPP $CPPFLAGS'
5938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5940ac_compiler_gnu=$ac_cv_c_compiler_gnu
5941
5942 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5943 if test x$ac_success = xno; then
d0ac1c44 5944 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
5945 fi
5946 fi
5947 if test x$ac_success = xno; then
5948 HAVE_CXX11=0
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5950$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5951 else
5952 HAVE_CXX11=1
5953
5954$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5955
5956 fi
5957
5958
5959
5960
c971b7fa
PA
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5962$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 5963if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
5964 $as_echo_n "(cached) " >&6
5965else
5966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5967/* end confdefs.h. */
5968#include <stdlib.h>
5969#include <stdarg.h>
5970#include <string.h>
5971#include <float.h>
5972
5973int
5974main ()
5975{
5976
5977 ;
5978 return 0;
5979}
5980_ACEOF
5981if ac_fn_c_try_compile "$LINENO"; then :
5982 ac_cv_header_stdc=yes
5983else
5984 ac_cv_header_stdc=no
5985fi
5986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5987
5988if test $ac_cv_header_stdc = yes; then
5989 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991/* end confdefs.h. */
5992#include <string.h>
5993
5994_ACEOF
5995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
5996 $EGREP "memchr" >/dev/null 2>&1; then :
5997
68070c10 5998else
81ecdfbb
RW
5999 ac_cv_header_stdc=no
6000fi
6001rm -f conftest*
68070c10
PA
6002
6003fi
68070c10 6004
81ecdfbb
RW
6005if test $ac_cv_header_stdc = yes; then
6006 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6008/* end confdefs.h. */
6009#include <stdlib.h>
68070c10 6010
68070c10 6011_ACEOF
81ecdfbb
RW
6012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6013 $EGREP "free" >/dev/null 2>&1; then :
68070c10
PA
6014
6015else
81ecdfbb 6016 ac_cv_header_stdc=no
68070c10 6017fi
81ecdfbb
RW
6018rm -f conftest*
6019
68070c10
PA
6020fi
6021
81ecdfbb
RW
6022if test $ac_cv_header_stdc = yes; then
6023 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6024 if test "$cross_compiling" = yes; then :
6025 :
43d5792c 6026else
81ecdfbb 6027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6028/* end confdefs.h. */
81ecdfbb
RW
6029#include <ctype.h>
6030#include <stdlib.h>
6031#if ((' ' & 0x0FF) == 0x020)
6032# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6033# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6034#else
6035# define ISLOWER(c) \
6036 (('a' <= (c) && (c) <= 'i') \
6037 || ('j' <= (c) && (c) <= 'r') \
6038 || ('s' <= (c) && (c) <= 'z'))
6039# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6040#endif
6041
6042#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bec39cab
AC
6043int
6044main ()
6045{
81ecdfbb
RW
6046 int i;
6047 for (i = 0; i < 256; i++)
6048 if (XOR (islower (i), ISLOWER (i))
6049 || toupper (i) != TOUPPER (i))
6050 return 2;
bec39cab
AC
6051 return 0;
6052}
6053_ACEOF
81ecdfbb 6054if ac_fn_c_try_run "$LINENO"; then :
bec39cab 6055
81ecdfbb
RW
6056else
6057 ac_cv_header_stdc=no
43d5792c 6058fi
81ecdfbb
RW
6059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6060 conftest.$ac_objext conftest.beam conftest.$ac_ext
43d5792c 6061fi
e122f1f5 6062
68070c10 6063fi
81ecdfbb
RW
6064fi
6065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6066$as_echo "$ac_cv_header_stdc" >&6; }
6067if test $ac_cv_header_stdc = yes; then
68070c10 6068
81ecdfbb 6069$as_echo "#define STDC_HEADERS 1" >>confdefs.h
68070c10 6070
68070c10 6071fi
68070c10 6072
68070c10 6073
17ef446e 6074# Set the 'development' global.
919adfe8 6075. $srcdir/../bfd/development.sh
17ef446e 6076
8ecfd7bd
SDJ
6077
6078# Check whether we will enable the inclusion of unit tests when
6079# compiling GDB.
6080#
6081# The default value of this option changes depending whether we're on
6082# development mode (in which case it's "true") or not (in which case
6083# it's "false").
6084# Check whether --enable-unit-tests was given.
6085if test "${enable_unit_tests+set}" = set; then :
6086 enableval=$enable_unit_tests; case "${enableval}" in
6087 yes) enable_unittests=true ;;
6088 no) enable_unittests=false ;;
6089 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
6090esac
6091else
6092 enable_unittests=$development
6093fi
6094
6095
6096if $enable_unittests; then
6d580b63
YQ
6097
6098$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
6099
8ecfd7bd 6100
268a13a5 6101 srv_selftest_objs="gdbsupport/selftest.o"
8ecfd7bd 6102
6d580b63
YQ
6103fi
6104
8ecfd7bd 6105
bd885420
YQ
6106 case ${build_alias} in
6107 "") build_noncanonical=${build} ;;
6108 *) build_noncanonical=${build_alias} ;;
6109esac
6110
6111 case ${host_alias} in
6112 "") host_noncanonical=${build_noncanonical} ;;
6113 *) host_noncanonical=${host_alias} ;;
6114esac
6115
6116 case ${target_alias} in
6117 "") target_noncanonical=${host_noncanonical} ;;
6118 *) target_noncanonical=${target_alias} ;;
6119esac
6120
6121
6122
6123
6124
6125
61c125b9
TT
6126# Dependency checking.
6127rm -rf .tst 2>/dev/null
6128mkdir .tst 2>/dev/null
6129if test -d .tst; then
6130 am__leading_dot=.
6131else
6132 am__leading_dot=_
6133fi
6134rmdir .tst 2>/dev/null
6135
6136DEPDIR="${am__leading_dot}deps"
6137
6138ac_config_commands="$ac_config_commands depdir"
6139
6140
60d6cfc9
YQ
6141
6142# Create sub-directories for objects and dependencies.
42cd72aa 6143CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
60d6cfc9
YQ
6144
6145
6146ac_config_commands="$ac_config_commands gdbdepdir"
6147
6148
61c125b9
TT
6149depcc="$CC" am_compiler_list=
6150
6151am_depcomp=$ac_aux_dir/depcomp
6152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6153$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6154if ${am_cv_CC_dependencies_compiler_type+:} false; then :
61c125b9
TT
6155 $as_echo_n "(cached) " >&6
6156else
6157 if test -f "$am_depcomp"; then
6158 # We make a subdir and do the tests there. Otherwise we can end up
6159 # making bogus files that we don't know about and never remove. For
6160 # instance it was reported that on HP-UX the gcc test will end up
6161 # making a dummy file named `D' -- because `-MD' means `put the output
6162 # in D'.
6163 mkdir conftest.dir
6164 # Copy depcomp to subdir because otherwise we won't find it if we're
6165 # using a relative directory.
6166 cp "$am_depcomp" conftest.dir
6167 cd conftest.dir
6168 # We will build objects and dependencies in a subdirectory because
6169 # it helps to detect inapplicable dependency modes. For instance
6170 # both Tru64's cc and ICC support -MD to output dependencies as a
6171 # side effect of compilation, but ICC will put the dependencies in
6172 # the current directory while Tru64 will put them in the object
6173 # directory.
6174 mkdir sub
6175
6176 am_cv_CC_dependencies_compiler_type=none
6177 if test "$am_compiler_list" = ""; then
6178 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6179 fi
6180 for depmode in $am_compiler_list; do
6181 if test $depmode = none; then break; fi
6182
6183 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6184 # Setup a source with many dependencies, because some compilers
6185 # like to wrap large dependency lists on column 80 (with \), and
6186 # we should not choose a depcomp mode which is confused by this.
6187 #
6188 # We need to recreate these files for each test, as the compiler may
6189 # overwrite some of them when testing with obscure command lines.
6190 # This happens at least with the AIX C compiler.
6191 : > sub/conftest.c
6192 for i in 1 2 3 4 5 6; do
6193 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6194 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6195 # Solaris 8's {/usr,}/bin/sh.
6196 touch sub/conftst$i.h
6197 done
6198 echo "include sub/conftest.Po" > confmf
6199
6200 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6201 # mode. It turns out that the SunPro C++ compiler does not properly
6202 # handle `-M -o', and we need to detect this.
6203 depcmd="depmode=$depmode \
6204 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6205 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6206 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6207 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6208 if env $depcmd > conftest.err 2>&1 &&
6209 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6210 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6211 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6212 # icc doesn't choke on unknown options, it will just issue warnings
6213 # or remarks (even with -Werror). So we grep stderr for any message
6214 # that says an option was ignored or not supported.
6215 # When given -MP, icc 7.0 and 7.1 complain thusly:
6216 # icc: Command line warning: ignoring option '-M'; no argument required
6217 # The diagnosis changed in icc 8.0:
6218 # icc: Command line remark: option '-MP' not supported
6219 if (grep 'ignoring option' conftest.err ||
6220 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6221 am_cv_CC_dependencies_compiler_type=$depmode
6222 $as_echo "$as_me:$LINENO: success" >&5
6223 break
6224 fi
6225 fi
6226 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6227 sed -e 's/^/| /' < conftest.err >&5
6228 done
6229
6230 cd ..
6231 rm -rf conftest.dir
6232else
6233 am_cv_CC_dependencies_compiler_type=none
6234fi
6235
6236fi
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6238$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6239if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6240then as_fn_error $? "no usable dependency style found" "$LINENO" 5
61c125b9
TT
6241else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6242
6243fi
6244
6245
648d586d
JB
6246gnulib_extra_configure_args=
6247# If large-file support is disabled, make sure gnulib does the same.
6248if test "$enable_largefile" = no; then
6249gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6250fi
6251
c971b7fa
PA
6252# Configure gnulib. We can't use AC_CONFIG_SUBDIRS as that'd expect
6253# to find the the source subdir to be configured directly under
6254# gdbserver/. We need to build gnulib under some other directory not
6255# "gnulib", to avoid the problem of both GDB and GDBserver wanting to
6256# build it in the same directory, when building in the source dir.
6257
919adfe8 6258 in_src="../gnulib"
c971b7fa 6259 in_build="build-gnulib-gdbserver"
648d586d 6260 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6261
6262 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6263 # so they do not pile up.
6264 ac_sub_configure_args=
6265 ac_prev=
6266 eval "set x $ac_configure_args"
6267 shift
6268 for ac_arg
6269 do
6270 if test -n "$ac_prev"; then
6271 ac_prev=
6272 continue
6273 fi
6274 case $ac_arg in
6275 -cache-file | --cache-file | --cache-fil | --cache-fi \
6276 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6277 ac_prev=cache_file ;;
6278 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6279 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6280 | --c=*)
6281 ;;
6282 --config-cache | -C)
6283 ;;
6284 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6285 ac_prev=srcdir ;;
6286 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6287 ;;
6288 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6289 ac_prev=prefix ;;
6290 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6291 ;;
6292 --disable-option-checking)
6293 ;;
6294 *)
6295 case $ac_arg in
6296 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6297 esac
6298 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6299 esac
6300 done
6301
6302 # Always prepend --prefix to ensure using the same prefix
6303 # in subdir configurations.
6304 ac_arg="--prefix=$prefix"
6305 case $ac_arg in
6306 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6307 esac
6308 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6309
6310 # Pass --silent
6311 if test "$silent" = yes; then
6312 ac_sub_configure_args="--silent $ac_sub_configure_args"
6313 fi
6314
6315 # Always prepend --disable-option-checking to silence warnings, since
6316 # different subdirs can have different --enable and --with options.
6317 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6318
6319 ac_popdir=`pwd`
6320 ac_dir=$in_build
6321
6322 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6323 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6324 $as_echo "$ac_msg" >&6
6325 as_dir="$ac_dir"; as_fn_mkdir_p
6326
38ea300a
PA
6327 case $srcdir in
6328 [\\/]* | ?:[\\/]* )
6329 ac_srcdir=$srcdir/$in_src ;;
6330 *) # Relative name.
6331 ac_srcdir=../$srcdir/$in_src ;;
6332 esac
c971b7fa
PA
6333
6334 cd "$ac_dir"
6335
6336 ac_sub_configure=$ac_srcdir/configure
6337
6338 # Make the cache file name correct relative to the subdirectory.
6339 case $cache_file in
6340 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6341 *) # Relative name.
6342 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6343 esac
6344
648d586d
JB
6345 if test -n "$in_extra_args"; then
6346 # Add the extra args at the end.
6347 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6348 fi
6349
c971b7fa
PA
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
6351$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6352 # The eval makes quoting arguments work.
6353 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6354 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6355 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6356
6357 cd "$ac_popdir"
6358
6359
0b04e523 6360
919adfe8 6361 in_src="../libiberty"
0b04e523 6362 in_build="build-libiberty-gdbserver"
648d586d 6363 in_extra_args=
0b04e523
TT
6364
6365 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6366 # so they do not pile up.
6367 ac_sub_configure_args=
6368 ac_prev=
6369 eval "set x $ac_configure_args"
6370 shift
6371 for ac_arg
6372 do
6373 if test -n "$ac_prev"; then
6374 ac_prev=
6375 continue
6376 fi
6377 case $ac_arg in
6378 -cache-file | --cache-file | --cache-fil | --cache-fi \
6379 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6380 ac_prev=cache_file ;;
6381 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6382 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6383 | --c=*)
6384 ;;
6385 --config-cache | -C)
6386 ;;
6387 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6388 ac_prev=srcdir ;;
6389 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6390 ;;
6391 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6392 ac_prev=prefix ;;
6393 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6394 ;;
6395 --disable-option-checking)
6396 ;;
6397 *)
6398 case $ac_arg in
6399 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6400 esac
6401 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6402 esac
6403 done
6404
6405 # Always prepend --prefix to ensure using the same prefix
6406 # in subdir configurations.
6407 ac_arg="--prefix=$prefix"
6408 case $ac_arg in
6409 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6410 esac
6411 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6412
6413 # Pass --silent
6414 if test "$silent" = yes; then
6415 ac_sub_configure_args="--silent $ac_sub_configure_args"
6416 fi
6417
6418 # Always prepend --disable-option-checking to silence warnings, since
6419 # different subdirs can have different --enable and --with options.
6420 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6421
6422 ac_popdir=`pwd`
6423 ac_dir=$in_build
6424
6425 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6426 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6427 $as_echo "$ac_msg" >&6
6428 as_dir="$ac_dir"; as_fn_mkdir_p
6429
6430 case $srcdir in
6431 [\\/]* | ?:[\\/]* )
6432 ac_srcdir=$srcdir/$in_src ;;
6433 *) # Relative name.
6434 ac_srcdir=../$srcdir/$in_src ;;
6435 esac
6436
6437 cd "$ac_dir"
6438
6439 ac_sub_configure=$ac_srcdir/configure
6440
6441 # Make the cache file name correct relative to the subdirectory.
6442 case $cache_file in
6443 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6444 *) # Relative name.
6445 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6446 esac
6447
648d586d
JB
6448 if test -n "$in_extra_args"; then
6449 # Add the extra args at the end.
6450 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6451 fi
6452
0b04e523
TT
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
6454$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6455 # The eval makes quoting arguments work.
6456 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6457 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6458 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
0b04e523
TT
6459
6460 cd "$ac_popdir"
6461
6462
05ea2a05 6463for 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
81ecdfbb
RW
6464do :
6465 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6466ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 6467if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
68070c10 6468 cat >>confdefs.h <<_ACEOF
81ecdfbb 6469#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
68070c10
PA
6470_ACEOF
6471
ec56be1b 6472fi
ec56be1b 6473
81ecdfbb
RW
6474done
6475
eb0edac8 6476ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 6477if test "x$ac_cv_type_pid_t" = xyes; then :
eb0edac8
GB
6478
6479else
6480
6481cat >>confdefs.h <<_ACEOF
6482#define pid_t int
6483_ACEOF
6484
6485fi
6486
6487for ac_header in vfork.h
6488do :
6489 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 6490if test "x$ac_cv_header_vfork_h" = xyes; then :
eb0edac8
GB
6491 cat >>confdefs.h <<_ACEOF
6492#define HAVE_VFORK_H 1
6493_ACEOF
6494
6495fi
6496
6497done
6498
6499for ac_func in fork vfork
6500do :
6501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6502ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6503if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
eb0edac8
GB
6504 cat >>confdefs.h <<_ACEOF
6505#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6506_ACEOF
6507
6508fi
6509done
6510
6511if test "x$ac_cv_func_fork" = xyes; then
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6513$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 6514if ${ac_cv_func_fork_works+:} false; then :
eb0edac8
GB
6515 $as_echo_n "(cached) " >&6
6516else
6517 if test "$cross_compiling" = yes; then :
6518 ac_cv_func_fork_works=cross
6519else
6520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6521/* end confdefs.h. */
6522$ac_includes_default
6523int
6524main ()
6525{
6526
6527 /* By Ruediger Kuhlmann. */
6528 return fork () < 0;
6529
6530 ;
6531 return 0;
6532}
6533_ACEOF
6534if ac_fn_c_try_run "$LINENO"; then :
6535 ac_cv_func_fork_works=yes
6536else
6537 ac_cv_func_fork_works=no
6538fi
6539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6540 conftest.$ac_objext conftest.beam conftest.$ac_ext
6541fi
6542
6543fi
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6545$as_echo "$ac_cv_func_fork_works" >&6; }
6546
6547else
6548 ac_cv_func_fork_works=$ac_cv_func_fork
6549fi
6550if test "x$ac_cv_func_fork_works" = xcross; then
6551 case $host in
6552 *-*-amigaos* | *-*-msdosdjgpp*)
6553 # Override, as these systems have only a dummy fork() stub
6554 ac_cv_func_fork_works=no
6555 ;;
6556 *)
6557 ac_cv_func_fork_works=yes
6558 ;;
6559 esac
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6561$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6562fi
6563ac_cv_func_vfork_works=$ac_cv_func_vfork
6564if test "x$ac_cv_func_vfork" = xyes; then
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6566$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 6567if ${ac_cv_func_vfork_works+:} false; then :
eb0edac8
GB
6568 $as_echo_n "(cached) " >&6
6569else
6570 if test "$cross_compiling" = yes; then :
6571 ac_cv_func_vfork_works=cross
6572else
6573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6574/* end confdefs.h. */
6575/* Thanks to Paul Eggert for this test. */
6576$ac_includes_default
6577#include <sys/wait.h>
6578#ifdef HAVE_VFORK_H
6579# include <vfork.h>
6580#endif
6581/* On some sparc systems, changes by the child to local and incoming
6582 argument registers are propagated back to the parent. The compiler
6583 is told about this with #include <vfork.h>, but some compilers
6584 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6585 static variable whose address is put into a register that is
6586 clobbered by the vfork. */
6587static void
6588#ifdef __cplusplus
6589sparc_address_test (int arg)
6590# else
6591sparc_address_test (arg) int arg;
6592#endif
6593{
6594 static pid_t child;
6595 if (!child) {
6596 child = vfork ();
6597 if (child < 0) {
6598 perror ("vfork");
6599 _exit(2);
6600 }
6601 if (!child) {
6602 arg = getpid();
6603 write(-1, "", 0);
6604 _exit (arg);
6605 }
6606 }
6607}
6608
6609int
6610main ()
6611{
6612 pid_t parent = getpid ();
6613 pid_t child;
6614
6615 sparc_address_test (0);
6616
6617 child = vfork ();
6618
6619 if (child == 0) {
6620 /* Here is another test for sparc vfork register problems. This
6621 test uses lots of local variables, at least as many local
6622 variables as main has allocated so far including compiler
6623 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
6624 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
6625 reuse the register of parent for one of the local variables,
6626 since it will think that parent can't possibly be used any more
6627 in this routine. Assigning to the local variable will thus
6628 munge parent in the parent process. */
6629 pid_t
6630 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6631 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6632 /* Convince the compiler that p..p7 are live; otherwise, it might
6633 use the same hardware register for all 8 local variables. */
6634 if (p != p1 || p != p2 || p != p3 || p != p4
6635 || p != p5 || p != p6 || p != p7)
6636 _exit(1);
6637
6638 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
6639 from child file descriptors. If the child closes a descriptor
6640 before it execs or exits, this munges the parent's descriptor
6641 as well. Test for this by closing stdout in the child. */
6642 _exit(close(fileno(stdout)) != 0);
6643 } else {
6644 int status;
6645 struct stat st;
6646
6647 while (wait(&status) != child)
6648 ;
6649 return (
6650 /* Was there some problem with vforking? */
6651 child < 0
6652
6653 /* Did the child fail? (This shouldn't happen.) */
6654 || status
6655
6656 /* Did the vfork/compiler bug occur? */
6657 || parent != getpid()
6658
6659 /* Did the file descriptor bug occur? */
6660 || fstat(fileno(stdout), &st) != 0
6661 );
6662 }
6663}
6664_ACEOF
6665if ac_fn_c_try_run "$LINENO"; then :
6666 ac_cv_func_vfork_works=yes
6667else
6668 ac_cv_func_vfork_works=no
6669fi
6670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6671 conftest.$ac_objext conftest.beam conftest.$ac_ext
6672fi
6673
6674fi
6675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
6676$as_echo "$ac_cv_func_vfork_works" >&6; }
6677
6678fi;
6679if test "x$ac_cv_func_fork_works" = xcross; then
6680 ac_cv_func_vfork_works=$ac_cv_func_vfork
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
6682$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
6683fi
6684
6685if test "x$ac_cv_func_vfork_works" = xyes; then
6686
6687$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
6688
6689else
6690
6691$as_echo "#define vfork fork" >>confdefs.h
6692
6693fi
6694if test "x$ac_cv_func_fork_works" = xyes; then
6695
6696$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
6697
6698fi
6699
05ea2a05 6700for ac_func in pread pwrite pread64
81ecdfbb
RW
6701do :
6702 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6703ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6704if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6705 cat >>confdefs.h <<_ACEOF
6706#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ec56be1b
PA
6707_ACEOF
6708
81ecdfbb
RW
6709fi
6710done
ec56be1b 6711
e122f1f5 6712
d0ac1c44
SM
6713ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6714if test "x$ac_cv_type_size_t" = xyes; then :
6715
6716else
6717
6718cat >>confdefs.h <<_ACEOF
6719#define size_t unsigned int
6720_ACEOF
6721
6722fi
6723
05ea2a05
TT
6724
6725
6726
6727 for ac_header in $ac_header_list
6728do :
6729 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6730ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6731"
6732if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6733 cat >>confdefs.h <<_ACEOF
6734#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6735_ACEOF
6736
6737fi
6738
6739done
6740
6741
6742
6743
6744
6745
6746
5e030278
TT
6747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6748$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6749if ${ac_cv_path_SED+:} false; then :
6750 $as_echo_n "(cached) " >&6
6751else
6752 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6753 for ac_i in 1 2 3 4 5 6 7; do
6754 ac_script="$ac_script$as_nl$ac_script"
6755 done
6756 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6757 { ac_script=; unset ac_script;}
6758 if test -z "$SED"; then
6759 ac_path_SED_found=false
6760 # Loop through the user's path and test for each of PROGNAME-LIST
6761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6762for as_dir in $PATH
6763do
6764 IFS=$as_save_IFS
6765 test -z "$as_dir" && as_dir=.
6766 for ac_prog in sed gsed; do
6767 for ac_exec_ext in '' $ac_executable_extensions; do
6768 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6769 as_fn_executable_p "$ac_path_SED" || continue
6770# Check for GNU ac_path_SED and select it if it is found.
6771 # Check for GNU $ac_path_SED
6772case `"$ac_path_SED" --version 2>&1` in
6773*GNU*)
6774 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6775*)
6776 ac_count=0
6777 $as_echo_n 0123456789 >"conftest.in"
6778 while :
6779 do
6780 cat "conftest.in" "conftest.in" >"conftest.tmp"
6781 mv "conftest.tmp" "conftest.in"
6782 cp "conftest.in" "conftest.nl"
6783 $as_echo '' >> "conftest.nl"
6784 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6785 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6786 as_fn_arith $ac_count + 1 && ac_count=$as_val
6787 if test $ac_count -gt ${ac_path_SED_max-0}; then
6788 # Best one so far, save it but keep looking for a better one
6789 ac_cv_path_SED="$ac_path_SED"
6790 ac_path_SED_max=$ac_count
6791 fi
6792 # 10*(2^10) chars as input seems more than enough
6793 test $ac_count -gt 10 && break
6794 done
6795 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6796esac
6797
6798 $ac_path_SED_found && break 3
6799 done
6800 done
6801 done
6802IFS=$as_save_IFS
6803 if test -z "$ac_cv_path_SED"; then
6804 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6805 fi
6806else
6807 ac_cv_path_SED=$SED
6808fi
6809
6810fi
6811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6812$as_echo "$ac_cv_path_SED" >&6; }
6813 SED="$ac_cv_path_SED"
6814 rm -f conftest.sed
6815
3266f10b 6816
05ea2a05
TT
6817 if test "X$prefix" = "XNONE"; then
6818 acl_final_prefix="$ac_default_prefix"
6819 else
6820 acl_final_prefix="$prefix"
6821 fi
6822 if test "X$exec_prefix" = "XNONE"; then
6823 acl_final_exec_prefix='${prefix}'
6824 else
6825 acl_final_exec_prefix="$exec_prefix"
6826 fi
6827 acl_save_prefix="$prefix"
6828 prefix="$acl_final_prefix"
6829 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6830 prefix="$acl_save_prefix"
6831
6832
6833# Check whether --with-gnu-ld was given.
6834if test "${with_gnu_ld+set}" = set; then :
6835 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6836else
6837 with_gnu_ld=no
6838fi
6839
6840# Prepare PATH_SEPARATOR.
6841# The user is always right.
6842if test "${PATH_SEPARATOR+set}" != set; then
6843 echo "#! /bin/sh" >conf$$.sh
6844 echo "exit 0" >>conf$$.sh
6845 chmod +x conf$$.sh
6846 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6847 PATH_SEPARATOR=';'
6848 else
6849 PATH_SEPARATOR=:
6850 fi
6851 rm -f conf$$.sh
6852fi
6853ac_prog=ld
6854if test "$GCC" = yes; then
6855 # Check if gcc -print-prog-name=ld gives a path.
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6857$as_echo_n "checking for ld used by GCC... " >&6; }
6858 case $host in
6859 *-*-mingw*)
6860 # gcc leaves a trailing carriage return which upsets mingw
6861 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6862 *)
6863 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6864 esac
6865 case $ac_prog in
6866 # Accept absolute paths.
6867 [\\/]* | [A-Za-z]:[\\/]*)
6868 re_direlt='/[^/][^/]*/\.\./'
6869 # Canonicalize the path of ld
6870 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6871 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6872 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6873 done
6874 test -z "$LD" && LD="$ac_prog"
6875 ;;
6876 "")
6877 # If it fails, then pretend we aren't using GCC.
6878 ac_prog=ld
6879 ;;
6880 *)
6881 # If it is relative, then search for the first ld in PATH.
6882 with_gnu_ld=unknown
6883 ;;
6884 esac
6885elif test "$with_gnu_ld" = yes; then
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6887$as_echo_n "checking for GNU ld... " >&6; }
6888else
6889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6890$as_echo_n "checking for non-GNU ld... " >&6; }
6891fi
6892if ${acl_cv_path_LD+:} false; then :
6893 $as_echo_n "(cached) " >&6
6894else
6895 if test -z "$LD"; then
6896 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6897 for ac_dir in $PATH; do
6898 test -z "$ac_dir" && ac_dir=.
6899 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6900 acl_cv_path_LD="$ac_dir/$ac_prog"
6901 # Check to see if the program is GNU ld. I'd rather use --version,
6902 # but apparently some GNU ld's only accept -v.
6903 # Break only if it was the GNU/non-GNU ld that we prefer.
6904 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6905 test "$with_gnu_ld" != no && break
6906 else
6907 test "$with_gnu_ld" != yes && break
6908 fi
6909 fi
6910 done
6911 IFS="$ac_save_ifs"
6912else
6913 acl_cv_path_LD="$LD" # Let the user override the test with a path.
6914fi
6915fi
6916
6917LD="$acl_cv_path_LD"
6918if test -n "$LD"; then
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6920$as_echo "$LD" >&6; }
6921else
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6923$as_echo "no" >&6; }
6924fi
6925test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6927$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6928if ${acl_cv_prog_gnu_ld+:} false; then :
6929 $as_echo_n "(cached) " >&6
6930else
6931 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6932if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6933 acl_cv_prog_gnu_ld=yes
6934else
6935 acl_cv_prog_gnu_ld=no
6936fi
6937fi
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
6939$as_echo "$acl_cv_prog_gnu_ld" >&6; }
6940with_gnu_ld=$acl_cv_prog_gnu_ld
6941
6942
6943
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
6945$as_echo_n "checking for shared library run path origin... " >&6; }
6946if ${acl_cv_rpath+:} false; then :
6947 $as_echo_n "(cached) " >&6
6948else
6949
6950 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6951 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6952 . ./conftest.sh
6953 rm -f ./conftest.sh
6954 acl_cv_rpath=done
6955
6956fi
6957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
6958$as_echo "$acl_cv_rpath" >&6; }
6959 wl="$acl_cv_wl"
6960 libext="$acl_cv_libext"
6961 shlibext="$acl_cv_shlibext"
6962 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6963 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6964 hardcode_direct="$acl_cv_hardcode_direct"
6965 hardcode_minus_L="$acl_cv_hardcode_minus_L"
6966 # Check whether --enable-rpath was given.
6967if test "${enable_rpath+set}" = set; then :
6968 enableval=$enable_rpath; :
6969else
6970 enable_rpath=yes
6971fi
6972
6973
6974
3266f10b
TT
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6976$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 6977if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
6978 $as_echo_n "(cached) " >&6
6979else
6980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6981/* end confdefs.h. */
6982#include <stdlib.h>
6983#include <stdarg.h>
6984#include <string.h>
6985#include <float.h>
6986
6987int
6988main ()
6989{
6990
6991 ;
6992 return 0;
6993}
6994_ACEOF
6995if ac_fn_c_try_compile "$LINENO"; then :
6996 ac_cv_header_stdc=yes
6997else
6998 ac_cv_header_stdc=no
6999fi
7000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7001
7002if test $ac_cv_header_stdc = yes; then
7003 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7005/* end confdefs.h. */
7006#include <string.h>
7007
7008_ACEOF
7009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7010 $EGREP "memchr" >/dev/null 2>&1; then :
7011
7012else
7013 ac_cv_header_stdc=no
7014fi
7015rm -f conftest*
7016
7017fi
7018
7019if test $ac_cv_header_stdc = yes; then
7020 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7022/* end confdefs.h. */
7023#include <stdlib.h>
7024
7025_ACEOF
7026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7027 $EGREP "free" >/dev/null 2>&1; then :
7028
7029else
7030 ac_cv_header_stdc=no
7031fi
7032rm -f conftest*
7033
7034fi
7035
7036if test $ac_cv_header_stdc = yes; then
7037 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7038 if test "$cross_compiling" = yes; then :
7039 :
7040else
7041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7042/* end confdefs.h. */
7043#include <ctype.h>
7044#include <stdlib.h>
7045#if ((' ' & 0x0FF) == 0x020)
7046# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7047# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7048#else
7049# define ISLOWER(c) \
7050 (('a' <= (c) && (c) <= 'i') \
7051 || ('j' <= (c) && (c) <= 'r') \
7052 || ('s' <= (c) && (c) <= 'z'))
7053# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7054#endif
7055
7056#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7057int
7058main ()
7059{
7060 int i;
7061 for (i = 0; i < 256; i++)
7062 if (XOR (islower (i), ISLOWER (i))
7063 || toupper (i) != TOUPPER (i))
7064 return 2;
7065 return 0;
7066}
7067_ACEOF
7068if ac_fn_c_try_run "$LINENO"; then :
7069
7070else
7071 ac_cv_header_stdc=no
7072fi
7073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7074 conftest.$ac_objext conftest.beam conftest.$ac_ext
7075fi
7076
7077fi
7078fi
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7080$as_echo "$ac_cv_header_stdc" >&6; }
7081if test $ac_cv_header_stdc = yes; then
7082
7083$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7084
3266f10b
TT
7085fi
7086
7087 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7088# for constant arguments. Useless!
7089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7090$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 7091if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
7092 $as_echo_n "(cached) " >&6
7093else
7094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095/* end confdefs.h. */
7096#include <alloca.h>
7097int
7098main ()
7099{
7100char *p = (char *) alloca (2 * sizeof (int));
7101 if (p) return 0;
7102 ;
7103 return 0;
7104}
7105_ACEOF
7106if ac_fn_c_try_link "$LINENO"; then :
7107 ac_cv_working_alloca_h=yes
7108else
7109 ac_cv_working_alloca_h=no
7110fi
7111rm -f core conftest.err conftest.$ac_objext \
7112 conftest$ac_exeext conftest.$ac_ext
7113fi
7114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7115$as_echo "$ac_cv_working_alloca_h" >&6; }
7116if test $ac_cv_working_alloca_h = yes; then
7117
7118$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7119
7120fi
7121
7122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7123$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 7124if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
7125 $as_echo_n "(cached) " >&6
7126else
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128/* end confdefs.h. */
7129#ifdef __GNUC__
7130# define alloca __builtin_alloca
7131#else
7132# ifdef _MSC_VER
7133# include <malloc.h>
7134# define alloca _alloca
7135# else
7136# ifdef HAVE_ALLOCA_H
7137# include <alloca.h>
7138# else
7139# ifdef _AIX
7140 #pragma alloca
7141# else
7142# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 7143void *alloca (size_t);
3266f10b
TT
7144# endif
7145# endif
7146# endif
7147# endif
7148#endif
7149
7150int
7151main ()
7152{
7153char *p = (char *) alloca (1);
7154 if (p) return 0;
7155 ;
7156 return 0;
7157}
7158_ACEOF
7159if ac_fn_c_try_link "$LINENO"; then :
7160 ac_cv_func_alloca_works=yes
7161else
7162 ac_cv_func_alloca_works=no
7163fi
7164rm -f core conftest.err conftest.$ac_objext \
7165 conftest$ac_exeext conftest.$ac_ext
7166fi
7167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7168$as_echo "$ac_cv_func_alloca_works" >&6; }
7169
7170if test $ac_cv_func_alloca_works = yes; then
7171
7172$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7173
7174else
7175 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7176# that cause trouble. Some versions do not even contain alloca or
7177# contain a buggy version. If you still want to use their alloca,
7178# use ar to extract alloca.o from them instead of compiling alloca.c.
7179
7180ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7181
7182$as_echo "#define C_ALLOCA 1" >>confdefs.h
7183
7184
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7186$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 7187if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
7188 $as_echo_n "(cached) " >&6
7189else
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192#if defined CRAY && ! defined CRAY2
7193webecray
7194#else
7195wenotbecray
7196#endif
7197
7198_ACEOF
7199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7200 $EGREP "webecray" >/dev/null 2>&1; then :
7201 ac_cv_os_cray=yes
7202else
7203 ac_cv_os_cray=no
7204fi
7205rm -f conftest*
7206
7207fi
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7209$as_echo "$ac_cv_os_cray" >&6; }
7210if test $ac_cv_os_cray = yes; then
7211 for ac_func in _getb67 GETB67 getb67; do
7212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7214if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
7215
7216cat >>confdefs.h <<_ACEOF
7217#define CRAY_STACKSEG_END $ac_func
7218_ACEOF
7219
7220 break
7221fi
7222
7223 done
7224fi
7225
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7227$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 7228if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
7229 $as_echo_n "(cached) " >&6
7230else
7231 if test "$cross_compiling" = yes; then :
7232 ac_cv_c_stack_direction=0
7233else
7234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7235/* end confdefs.h. */
7236$ac_includes_default
7237int
d0ac1c44 7238find_stack_direction (int *addr, int depth)
3266f10b 7239{
d0ac1c44
SM
7240 int dir, dummy = 0;
7241 if (! addr)
7242 addr = &dummy;
7243 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7244 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7245 return dir + dummy;
3266f10b
TT
7246}
7247
7248int
d0ac1c44 7249main (int argc, char **argv)
3266f10b 7250{
d0ac1c44 7251 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
7252}
7253_ACEOF
7254if ac_fn_c_try_run "$LINENO"; then :
7255 ac_cv_c_stack_direction=1
7256else
7257 ac_cv_c_stack_direction=-1
7258fi
7259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7260 conftest.$ac_objext conftest.beam conftest.$ac_ext
7261fi
7262
7263fi
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7265$as_echo "$ac_cv_c_stack_direction" >&6; }
7266cat >>confdefs.h <<_ACEOF
7267#define STACK_DIRECTION $ac_cv_c_stack_direction
7268_ACEOF
7269
7270
7271fi
7272
7273
b2ceabe8
TT
7274 WIN32APILIBS=
7275 case ${host} in
7276 *mingw32*)
7277
7278$as_echo "#define USE_WIN32API 1" >>confdefs.h
7279
7280 WIN32APILIBS="-lws2_32"
7281 ;;
7282 esac
7283
3266f10b
TT
7284
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7286$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 7287if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
7288 $as_echo_n "(cached) " >&6
7289else
7290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291/* end confdefs.h. */
7292#include <langinfo.h>
7293int
7294main ()
7295{
7296char* cs = nl_langinfo(CODESET);
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301if ac_fn_c_try_link "$LINENO"; then :
7302 am_cv_langinfo_codeset=yes
7303else
7304 am_cv_langinfo_codeset=no
7305fi
7306rm -f core conftest.err conftest.$ac_objext \
7307 conftest$ac_exeext conftest.$ac_ext
7308
7309fi
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7311$as_echo "$am_cv_langinfo_codeset" >&6; }
7312 if test $am_cv_langinfo_codeset = yes; then
7313
7314$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7315
7316 fi
7317
7318
05ea2a05 7319 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
7320do :
7321 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7322ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 7323if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
7324 cat >>confdefs.h <<_ACEOF
7325#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7326_ACEOF
7327
7328fi
7329
7330done
7331
7332
05ea2a05
TT
7333
7334for ac_func in getpagesize
3266f10b 7335do :
05ea2a05
TT
7336 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7337if test "x$ac_cv_func_getpagesize" = xyes; then :
3266f10b 7338 cat >>confdefs.h <<_ACEOF
05ea2a05 7339#define HAVE_GETPAGESIZE 1
3266f10b
TT
7340_ACEOF
7341
7342fi
7343done
7344
05ea2a05
TT
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7346$as_echo_n "checking for working mmap... " >&6; }
7347if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
7348 $as_echo_n "(cached) " >&6
3266f10b 7349else
05ea2a05
TT
7350 if test "$cross_compiling" = yes; then :
7351 ac_cv_func_mmap_fixed_mapped=no
7352else
7353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7354/* end confdefs.h. */
7355$ac_includes_default
7356/* malloc might have been renamed as rpl_malloc. */
7357#undef malloc
7358
7359/* Thanks to Mike Haertel and Jim Avera for this test.
7360 Here is a matrix of mmap possibilities:
7361 mmap private not fixed
7362 mmap private fixed at somewhere currently unmapped
7363 mmap private fixed at somewhere already mapped
7364 mmap shared not fixed
7365 mmap shared fixed at somewhere currently unmapped
7366 mmap shared fixed at somewhere already mapped
7367 For private mappings, we should verify that changes cannot be read()
7368 back from the file, nor mmap's back from the file at a different
7369 address. (There have been systems where private was not correctly
7370 implemented like the infamous i386 svr4.0, and systems where the
7371 VM page cache was not coherent with the file system buffer cache
7372 like early versions of FreeBSD and possibly contemporary NetBSD.)
7373 For shared mappings, we should conversely verify that changes get
7374 propagated back to all the places they're supposed to be.
7375
7376 Grep wants private fixed already mapped.
7377 The main things grep needs to know about mmap are:
7378 * does it exist and is it safe to write into the mmap'd area
7379 * how to use it (BSD variants) */
7380
7381#include <fcntl.h>
7382#include <sys/mman.h>
7383
7384#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7385char *malloc ();
7386#endif
3266f10b 7387
05ea2a05
TT
7388/* This mess was copied from the GNU getpagesize.h. */
7389#ifndef HAVE_GETPAGESIZE
7390# ifdef _SC_PAGESIZE
7391# define getpagesize() sysconf(_SC_PAGESIZE)
7392# else /* no _SC_PAGESIZE */
7393# ifdef HAVE_SYS_PARAM_H
7394# include <sys/param.h>
7395# ifdef EXEC_PAGESIZE
7396# define getpagesize() EXEC_PAGESIZE
7397# else /* no EXEC_PAGESIZE */
7398# ifdef NBPG
7399# define getpagesize() NBPG * CLSIZE
7400# ifndef CLSIZE
7401# define CLSIZE 1
7402# endif /* no CLSIZE */
7403# else /* no NBPG */
7404# ifdef NBPC
7405# define getpagesize() NBPC
7406# else /* no NBPC */
7407# ifdef PAGESIZE
7408# define getpagesize() PAGESIZE
7409# endif /* PAGESIZE */
7410# endif /* no NBPC */
7411# endif /* no NBPG */
7412# endif /* no EXEC_PAGESIZE */
7413# else /* no HAVE_SYS_PARAM_H */
7414# define getpagesize() 8192 /* punt totally */
7415# endif /* no HAVE_SYS_PARAM_H */
7416# endif /* no _SC_PAGESIZE */
7417
7418#endif /* no HAVE_GETPAGESIZE */
3266f10b 7419
05ea2a05
TT
7420int
7421main ()
7422{
7423 char *data, *data2, *data3;
7424 const char *cdata2;
7425 int i, pagesize;
7426 int fd, fd2;
3266f10b 7427
05ea2a05 7428 pagesize = getpagesize ();
5e030278 7429
05ea2a05
TT
7430 /* First, make a file with some known garbage in it. */
7431 data = (char *) malloc (pagesize);
7432 if (!data)
7433 return 1;
7434 for (i = 0; i < pagesize; ++i)
7435 *(data + i) = rand ();
7436 umask (0);
7437 fd = creat ("conftest.mmap", 0600);
7438 if (fd < 0)
7439 return 2;
7440 if (write (fd, data, pagesize) != pagesize)
7441 return 3;
7442 close (fd);
7443
7444 /* Next, check that the tail of a page is zero-filled. File must have
7445 non-zero length, otherwise we risk SIGBUS for entire page. */
7446 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7447 if (fd2 < 0)
7448 return 4;
7449 cdata2 = "";
7450 if (write (fd2, cdata2, 1) != 1)
7451 return 5;
7452 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7453 if (data2 == MAP_FAILED)
7454 return 6;
7455 for (i = 0; i < pagesize; ++i)
7456 if (*(data2 + i))
7457 return 7;
7458 close (fd2);
7459 if (munmap (data2, pagesize))
7460 return 8;
7461
7462 /* Next, try to mmap the file at a fixed address which already has
7463 something else allocated at it. If we can, also make sure that
7464 we see the same garbage. */
7465 fd = open ("conftest.mmap", O_RDWR);
7466 if (fd < 0)
7467 return 9;
7468 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7469 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7470 return 10;
7471 for (i = 0; i < pagesize; ++i)
7472 if (*(data + i) != *(data2 + i))
7473 return 11;
7474
7475 /* Finally, make sure that changes to the mapped area do not
7476 percolate back to the file as seen by read(). (This is a bug on
7477 some variants of i386 svr4.0.) */
7478 for (i = 0; i < pagesize; ++i)
7479 *(data2 + i) = *(data2 + i) + 1;
7480 data3 = (char *) malloc (pagesize);
7481 if (!data3)
7482 return 12;
7483 if (read (fd, data3, pagesize) != pagesize)
7484 return 13;
7485 for (i = 0; i < pagesize; ++i)
7486 if (*(data + i) != *(data3 + i))
7487 return 14;
7488 close (fd);
7489 return 0;
7490}
7491_ACEOF
7492if ac_fn_c_try_run "$LINENO"; then :
7493 ac_cv_func_mmap_fixed_mapped=yes
7494else
7495 ac_cv_func_mmap_fixed_mapped=no
7496fi
7497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7498 conftest.$ac_objext conftest.beam conftest.$ac_ext
7499fi
5e030278 7500
05ea2a05
TT
7501fi
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7503$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7504if test $ac_cv_func_mmap_fixed_mapped = yes; then
5e030278 7505
05ea2a05 7506$as_echo "#define HAVE_MMAP 1" >>confdefs.h
5e030278 7507
05ea2a05
TT
7508fi
7509rm -f conftest.mmap conftest.txt
5e030278 7510
05ea2a05
TT
7511 for ac_header in vfork.h
7512do :
7513 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
7514if test "x$ac_cv_header_vfork_h" = xyes; then :
7515 cat >>confdefs.h <<_ACEOF
7516#define HAVE_VFORK_H 1
7517_ACEOF
5e030278 7518
05ea2a05 7519fi
5e030278 7520
05ea2a05 7521done
5e030278 7522
05ea2a05
TT
7523for ac_func in fork vfork
7524do :
7525 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7526ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7527if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7528 cat >>confdefs.h <<_ACEOF
7529#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7530_ACEOF
7531
7532fi
7533done
7534
7535if test "x$ac_cv_func_fork" = xyes; then
7536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
7537$as_echo_n "checking for working fork... " >&6; }
7538if ${ac_cv_func_fork_works+:} false; then :
7539 $as_echo_n "(cached) " >&6
7540else
7541 if test "$cross_compiling" = yes; then :
7542 ac_cv_func_fork_works=cross
7543else
7544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545/* end confdefs.h. */
7546$ac_includes_default
7547int
7548main ()
7549{
7550
7551 /* By Ruediger Kuhlmann. */
7552 return fork () < 0;
7553
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558if ac_fn_c_try_run "$LINENO"; then :
7559 ac_cv_func_fork_works=yes
7560else
7561 ac_cv_func_fork_works=no
7562fi
7563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7564 conftest.$ac_objext conftest.beam conftest.$ac_ext
7565fi
7566
7567fi
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
7569$as_echo "$ac_cv_func_fork_works" >&6; }
7570
7571else
7572 ac_cv_func_fork_works=$ac_cv_func_fork
7573fi
7574if test "x$ac_cv_func_fork_works" = xcross; then
7575 case $host in
7576 *-*-amigaos* | *-*-msdosdjgpp*)
7577 # Override, as these systems have only a dummy fork() stub
7578 ac_cv_func_fork_works=no
7579 ;;
7580 *)
7581 ac_cv_func_fork_works=yes
7582 ;;
7583 esac
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7585$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
7586fi
7587ac_cv_func_vfork_works=$ac_cv_func_vfork
7588if test "x$ac_cv_func_vfork" = xyes; then
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
7590$as_echo_n "checking for working vfork... " >&6; }
7591if ${ac_cv_func_vfork_works+:} false; then :
7592 $as_echo_n "(cached) " >&6
7593else
7594 if test "$cross_compiling" = yes; then :
7595 ac_cv_func_vfork_works=cross
7596else
7597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7598/* end confdefs.h. */
7599/* Thanks to Paul Eggert for this test. */
7600$ac_includes_default
7601#include <sys/wait.h>
7602#ifdef HAVE_VFORK_H
7603# include <vfork.h>
7604#endif
7605/* On some sparc systems, changes by the child to local and incoming
7606 argument registers are propagated back to the parent. The compiler
7607 is told about this with #include <vfork.h>, but some compilers
7608 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7609 static variable whose address is put into a register that is
7610 clobbered by the vfork. */
7611static void
7612#ifdef __cplusplus
7613sparc_address_test (int arg)
7614# else
7615sparc_address_test (arg) int arg;
7616#endif
7617{
7618 static pid_t child;
7619 if (!child) {
7620 child = vfork ();
7621 if (child < 0) {
7622 perror ("vfork");
7623 _exit(2);
7624 }
7625 if (!child) {
7626 arg = getpid();
7627 write(-1, "", 0);
7628 _exit (arg);
7629 }
7630 }
7631}
7632
7633int
7634main ()
7635{
7636 pid_t parent = getpid ();
7637 pid_t child;
7638
7639 sparc_address_test (0);
7640
7641 child = vfork ();
7642
7643 if (child == 0) {
7644 /* Here is another test for sparc vfork register problems. This
7645 test uses lots of local variables, at least as many local
7646 variables as main has allocated so far including compiler
7647 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7648 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7649 reuse the register of parent for one of the local variables,
7650 since it will think that parent can't possibly be used any more
7651 in this routine. Assigning to the local variable will thus
7652 munge parent in the parent process. */
7653 pid_t
7654 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7655 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7656 /* Convince the compiler that p..p7 are live; otherwise, it might
7657 use the same hardware register for all 8 local variables. */
7658 if (p != p1 || p != p2 || p != p3 || p != p4
7659 || p != p5 || p != p6 || p != p7)
7660 _exit(1);
7661
7662 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7663 from child file descriptors. If the child closes a descriptor
7664 before it execs or exits, this munges the parent's descriptor
7665 as well. Test for this by closing stdout in the child. */
7666 _exit(close(fileno(stdout)) != 0);
7667 } else {
7668 int status;
7669 struct stat st;
7670
7671 while (wait(&status) != child)
7672 ;
7673 return (
7674 /* Was there some problem with vforking? */
7675 child < 0
7676
7677 /* Did the child fail? (This shouldn't happen.) */
7678 || status
7679
7680 /* Did the vfork/compiler bug occur? */
7681 || parent != getpid()
7682
7683 /* Did the file descriptor bug occur? */
7684 || fstat(fileno(stdout), &st) != 0
7685 );
7686 }
7687}
7688_ACEOF
7689if ac_fn_c_try_run "$LINENO"; then :
7690 ac_cv_func_vfork_works=yes
7691else
7692 ac_cv_func_vfork_works=no
7693fi
7694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7695 conftest.$ac_objext conftest.beam conftest.$ac_ext
7696fi
7697
7698fi
7699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
7700$as_echo "$ac_cv_func_vfork_works" >&6; }
7701
7702fi;
7703if test "x$ac_cv_func_fork_works" = xcross; then
7704 ac_cv_func_vfork_works=$ac_cv_func_vfork
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7706$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
7707fi
7708
7709if test "x$ac_cv_func_vfork_works" = xyes; then
7710
7711$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
7712
7713else
7714
7715$as_echo "#define vfork fork" >>confdefs.h
7716
7717fi
7718if test "x$ac_cv_func_fork_works" = xyes; then
7719
7720$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
7721
7722fi
7723
7724 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
7725 ptrace64 sbrk setns sigaltstack sigprocmask \
7726 setpgid setpgrp getrusage getauxval
7727do :
7728 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7729ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7730if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7731 cat >>confdefs.h <<_ACEOF
7732#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7733_ACEOF
7734
7735fi
7736done
7737
7738
7739 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
7740"
7741if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
7742 ac_have_decl=1
7743else
7744 ac_have_decl=0
7745fi
7746
7747cat >>confdefs.h <<_ACEOF
7748#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
7749_ACEOF
7750
7751
7752 if test "$cross_compiling" = yes; then :
7753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7754/* end confdefs.h. */
7755#include <sys/personality.h>
7756int
7757main ()
7758{
7759
7760 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
7761 # define ADDR_NO_RANDOMIZE 0x0040000
7762 # endif
7763 /* Test the flag could be set and stays set. */
7764 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
7765 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
7766 return 1
7767 ;
7768 return 0;
7769}
7770_ACEOF
7771if ac_fn_c_try_link "$LINENO"; then :
7772 have_personality=true
7773else
7774 have_personality=false
7775fi
7776rm -f core conftest.err conftest.$ac_objext \
7777 conftest$ac_exeext conftest.$ac_ext
7778else
7779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7780/* end confdefs.h. */
7781#include <sys/personality.h>
7782int
7783main ()
7784{
7785
7786 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
7787 # define ADDR_NO_RANDOMIZE 0x0040000
7788 # endif
7789 /* Test the flag could be set and stays set. */
7790 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
7791 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
7792 return 1
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797if ac_fn_c_try_run "$LINENO"; then :
7798 have_personality=true
7799else
7800 have_personality=false
7801fi
7802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7803 conftest.$ac_objext conftest.beam conftest.$ac_ext
7804fi
7805
7806 if $have_personality
7807 then
7808
7809$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
7810
7811 fi
7812
7813 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
7814if test "x$ac_cv_have_decl_strstr" = xyes; then :
7815 ac_have_decl=1
7816else
7817 ac_have_decl=0
7818fi
7819
7820cat >>confdefs.h <<_ACEOF
7821#define HAVE_DECL_STRSTR $ac_have_decl
7822_ACEOF
7823
7824
7825 # ----------------------- #
7826 # Checks for structures. #
7827 # ----------------------- #
7828
7829 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
7830if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7831
7832cat >>confdefs.h <<_ACEOF
7833#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7834_ACEOF
7835
7836
7837fi
7838ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
7839if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7840
7841cat >>confdefs.h <<_ACEOF
7842#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7843_ACEOF
7844
7845
7846fi
7847
7848
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7850$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7851if ${ac_cv_search_kinfo_getfile+:} false; then :
7852 $as_echo_n "(cached) " >&6
7853else
7854 ac_func_search_save_LIBS=$LIBS
7855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7856/* end confdefs.h. */
7857
7858/* Override any GCC internal prototype to avoid an error.
7859 Use char because int might match the return type of a GCC
7860 builtin and then its argument prototype would still apply. */
7861#ifdef __cplusplus
7862extern "C"
7863#endif
7864char kinfo_getfile ();
7865int
7866main ()
7867{
7868return kinfo_getfile ();
7869 ;
7870 return 0;
7871}
7872_ACEOF
7873for ac_lib in '' util util-freebsd; do
7874 if test -z "$ac_lib"; then
7875 ac_res="none required"
7876 else
7877 ac_res=-l$ac_lib
7878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7879 fi
7880 if ac_fn_c_try_link "$LINENO"; then :
7881 ac_cv_search_kinfo_getfile=$ac_res
7882fi
7883rm -f core conftest.err conftest.$ac_objext \
7884 conftest$ac_exeext
7885 if ${ac_cv_search_kinfo_getfile+:} false; then :
7886 break
7887fi
7888done
7889if ${ac_cv_search_kinfo_getfile+:} false; then :
7890
7891else
7892 ac_cv_search_kinfo_getfile=no
7893fi
7894rm conftest.$ac_ext
7895LIBS=$ac_func_search_save_LIBS
7896fi
7897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7898$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7899ac_res=$ac_cv_search_kinfo_getfile
7900if test "$ac_res" != no; then :
7901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7902
7903$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7904
7905fi
7906
7907
7908 # Check for std::thread. This does not work on some platforms, like
7909 # mingw and DJGPP.
7910 ac_ext=cpp
7911ac_cpp='$CXXCPP $CPPFLAGS'
7912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7915
7916
7917
7918
7919
7920ac_ext=c
7921ac_cpp='$CPP $CPPFLAGS'
7922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7924ac_compiler_gnu=$ac_cv_c_compiler_gnu
7925
7926ax_pthread_ok=no
7927
7928# We used to check for pthread.h first, but this fails if pthread.h
7929# requires special compiler flags (e.g. on Tru64 or Sequent).
7930# It gets checked for in the link test anyway.
7931
7932# First of all, check if the user has set any of the PTHREAD_LIBS,
5e030278
TT
7933# etcetera environment variables, and if threads linking works using
7934# them:
7935if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
7936 ax_pthread_save_CC="$CC"
7937 ax_pthread_save_CFLAGS="$CFLAGS"
7938 ax_pthread_save_LIBS="$LIBS"
05ea2a05
TT
7939 if test "x$PTHREAD_CC" != "x"; then :
7940 CC="$PTHREAD_CC"
7941fi
7942 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7943 LIBS="$PTHREAD_LIBS $LIBS"
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7945$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7947/* end confdefs.h. */
7948
7949/* Override any GCC internal prototype to avoid an error.
7950 Use char because int might match the return type of a GCC
7951 builtin and then its argument prototype would still apply. */
7952#ifdef __cplusplus
7953extern "C"
7954#endif
7955char pthread_join ();
7956int
7957main ()
7958{
7959return pthread_join ();
7960 ;
7961 return 0;
7962}
7963_ACEOF
7964if ac_fn_c_try_link "$LINENO"; then :
7965 ax_pthread_ok=yes
7966fi
7967rm -f core conftest.err conftest.$ac_objext \
7968 conftest$ac_exeext conftest.$ac_ext
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7970$as_echo "$ax_pthread_ok" >&6; }
7971 if test "x$ax_pthread_ok" = "xno"; then
7972 PTHREAD_LIBS=""
7973 PTHREAD_CFLAGS=""
7974 fi
7975 CC="$ax_pthread_save_CC"
7976 CFLAGS="$ax_pthread_save_CFLAGS"
7977 LIBS="$ax_pthread_save_LIBS"
7978fi
7979
7980# We must check for the threads library under a number of different
7981# names; the ordering is very important because some systems
7982# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7983# libraries is broken (non-POSIX).
7984
7985# Create a list of thread flags to try. Items starting with a "-" are
7986# C compiler flags, and other items are library names, except for "none"
7987# which indicates that we try without any flags at all, and "pthread-config"
7988# which is a program returning the flags for the Pth emulation library.
7989
7990ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
7991
7992# The ordering *is* (sometimes) important. Some notes on the
7993# individual items follow:
7994
7995# pthreads: AIX (must check this before -lpthread)
7996# none: in case threads are in libc; should be tried before -Kthread and
7997# other compiler flags to prevent continual compiler warnings
7998# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7999# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8000# (Note: HP C rejects this with "bad form for `-t' option")
8001# -pthreads: Solaris/gcc (Note: HP C also rejects)
8002# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8003# doesn't hurt to check since this sometimes defines pthreads and
8004# -D_REENTRANT too), HP C (must be checked before -lpthread, which
8005# is present but should not be used directly; and before -mthreads,
8006# because the compiler interprets this as "-mt" + "-hreads")
8007# -mthreads: Mingw32/gcc, Lynx/gcc
8008# pthread: Linux, etcetera
8009# --thread-safe: KAI C++
8010# pthread-config: use pthread-config program (for GNU Pth library)
8011
8012case $host_os in
8013
8014 freebsd*)
8015
8016 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8017 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8018
8019 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
8020 ;;
8021
8022 hpux*)
8023
8024 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8025 # multi-threading and also sets -lpthread."
8026
8027 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8028 ;;
8029
8030 openedition*)
8031
8032 # IBM z/OS requires a feature-test macro to be defined in order to
8033 # enable POSIX threads at all, so give the user a hint if this is
8034 # not set. (We don't define these ourselves, as they can affect
8035 # other portions of the system API in unpredictable ways.)
8036
8037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8038/* end confdefs.h. */
8039
8040# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8041 AX_PTHREAD_ZOS_MISSING
8042# endif
8043
8044_ACEOF
8045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8046 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8048$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8049fi
8050rm -f conftest*
8051
8052 ;;
8053
8054 solaris*)
8055
8056 # On Solaris (at least, for some versions), libc contains stubbed
8057 # (non-functional) versions of the pthreads routines, so link-based
8058 # tests will erroneously succeed. (N.B.: The stubs are missing
8059 # pthread_cleanup_push, or rather a function called by this macro,
8060 # so we could check for that, but who knows whether they'll stub
8061 # that too in a future libc.) So we'll check first for the
8062 # standard Solaris way of linking pthreads (-mt -lpthread).
8063
8064 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
8065 ;;
8066esac
8067
8068# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
8069
8070if test "x$GCC" = "xyes"; then :
8071 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
8072fi
8073
8074# The presence of a feature test macro requesting re-entrant function
8075# definitions is, on some systems, a strong hint that pthreads support is
8076# correctly enabled
8077
8078case $host_os in
8079 darwin* | hpux* | linux* | osf* | solaris*)
8080 ax_pthread_check_macro="_REENTRANT"
8081 ;;
8082
8083 aix*)
8084 ax_pthread_check_macro="_THREAD_SAFE"
8085 ;;
8086
8087 *)
8088 ax_pthread_check_macro="--"
8089 ;;
8090esac
8091if test "x$ax_pthread_check_macro" = "x--"; then :
8092 ax_pthread_check_cond=0
8093else
8094 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
8095fi
8096
8097# Are we compiling with Clang?
8098
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
8100$as_echo_n "checking whether $CC is Clang... " >&6; }
8101if ${ax_cv_PTHREAD_CLANG+:} false; then :
8102 $as_echo_n "(cached) " >&6
8103else
8104 ax_cv_PTHREAD_CLANG=no
8105 # Note that Autoconf sets GCC=yes for Clang as well as GCC
8106 if test "x$GCC" = "xyes"; then
8107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108/* end confdefs.h. */
8109/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
8110# if defined(__clang__) && defined(__llvm__)
8111 AX_PTHREAD_CC_IS_CLANG
8112# endif
8113
8114_ACEOF
8115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8116 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
8117 ax_cv_PTHREAD_CLANG=yes
8118fi
8119rm -f conftest*
8120
8121 fi
8122
8123fi
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
8125$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
8126ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
8127
8128ax_pthread_clang_warning=no
8129
8130# Clang needs special handling, because older versions handle the -pthread
8131# option in a rather... idiosyncratic way
8132
8133if test "x$ax_pthread_clang" = "xyes"; then
8134
8135 # Clang takes -pthread; it has never supported any other flag
8136
8137 # (Note 1: This will need to be revisited if a system that Clang
8138 # supports has POSIX threads in a separate library. This tends not
8139 # to be the way of modern systems, but it's conceivable.)
8140
8141 # (Note 2: On some systems, notably Darwin, -pthread is not needed
8142 # to get POSIX threads support; the API is always present and
8143 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
8144 # -pthread does define _REENTRANT, and while the Darwin headers
8145 # ignore this macro, third-party headers might not.)
8146
8147 PTHREAD_CFLAGS="-pthread"
8148 PTHREAD_LIBS=
8149
8150 ax_pthread_ok=yes
8151
8152 # However, older versions of Clang make a point of warning the user
8153 # that, in an invocation where only linking and no compilation is
8154 # taking place, the -pthread option has no effect ("argument unused
8155 # during compilation"). They expect -pthread to be passed in only
8156 # when source code is being compiled.
8157 #
8158 # Problem is, this is at odds with the way Automake and most other
8159 # C build frameworks function, which is that the same flags used in
8160 # compilation (CFLAGS) are also used in linking. Many systems
8161 # supported by AX_PTHREAD require exactly this for POSIX threads
8162 # support, and in fact it is often not straightforward to specify a
8163 # flag that is used only in the compilation phase and not in
8164 # linking. Such a scenario is extremely rare in practice.
8165 #
8166 # Even though use of the -pthread flag in linking would only print
8167 # a warning, this can be a nuisance for well-run software projects
8168 # that build with -Werror. So if the active version of Clang has
8169 # this misfeature, we search for an option to squash it.
8170
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
8172$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
8173if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
8174 $as_echo_n "(cached) " >&6
8175else
8176 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
8177 # Create an alternate version of $ac_link that compiles and
8178 # links in two steps (.c -> .o, .o -> exe) instead of one
8179 # (.c -> exe), because the warning occurs only in the second
8180 # step
8181 ax_pthread_save_ac_link="$ac_link"
8182 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
8183 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
8184 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
8185 ax_pthread_save_CFLAGS="$CFLAGS"
8186 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
8187 if test "x$ax_pthread_try" = "xunknown"; then :
8188 break
8189fi
8190 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
8191 ac_link="$ax_pthread_save_ac_link"
8192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8193/* end confdefs.h. */
8194int main(void){return 0;}
8195_ACEOF
8196if ac_fn_c_try_link "$LINENO"; then :
8197 ac_link="$ax_pthread_2step_ac_link"
8198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8199/* end confdefs.h. */
8200int main(void){return 0;}
8201_ACEOF
8202if ac_fn_c_try_link "$LINENO"; then :
8203 break
8204fi
8205rm -f core conftest.err conftest.$ac_objext \
8206 conftest$ac_exeext conftest.$ac_ext
8207
8208fi
8209rm -f core conftest.err conftest.$ac_objext \
8210 conftest$ac_exeext conftest.$ac_ext
8211 done
8212 ac_link="$ax_pthread_save_ac_link"
8213 CFLAGS="$ax_pthread_save_CFLAGS"
8214 if test "x$ax_pthread_try" = "x"; then :
8215 ax_pthread_try=no
8216fi
8217 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
8218
8219fi
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
8221$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
8222
8223 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
8224 no | unknown) ;;
8225 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
8226 esac
8227
8228fi # $ax_pthread_clang = yes
8229
8230if test "x$ax_pthread_ok" = "xno"; then
8231for ax_pthread_try_flag in $ax_pthread_flags; do
8232
8233 case $ax_pthread_try_flag in
8234 none)
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8236$as_echo_n "checking whether pthreads work without any flags... " >&6; }
8237 ;;
8238
8239 -mt,pthread)
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8241$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8242 PTHREAD_CFLAGS="-mt"
8243 PTHREAD_LIBS="-lpthread"
8244 ;;
8245
8246 -*)
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
8248$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
8249 PTHREAD_CFLAGS="$ax_pthread_try_flag"
8250 ;;
8251
8252 pthread-config)
8253 # Extract the first word of "pthread-config", so it can be a program name with args.
8254set dummy pthread-config; ac_word=$2
8255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8256$as_echo_n "checking for $ac_word... " >&6; }
8257if ${ac_cv_prog_ax_pthread_config+:} false; then :
8258 $as_echo_n "(cached) " >&6
8259else
8260 if test -n "$ax_pthread_config"; then
8261 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8262else
8263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8264for as_dir in $PATH
8265do
8266 IFS=$as_save_IFS
8267 test -z "$as_dir" && as_dir=.
8268 for ac_exec_ext in '' $ac_executable_extensions; do
8269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8270 ac_cv_prog_ax_pthread_config="yes"
8271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8272 break 2
8273 fi
8274done
8275 done
8276IFS=$as_save_IFS
8277
8278 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8279fi
8280fi
8281ax_pthread_config=$ac_cv_prog_ax_pthread_config
8282if test -n "$ax_pthread_config"; then
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8284$as_echo "$ax_pthread_config" >&6; }
8285else
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287$as_echo "no" >&6; }
8288fi
8289
8290
8291 if test "x$ax_pthread_config" = "xno"; then :
8292 continue
8293fi
8294 PTHREAD_CFLAGS="`pthread-config --cflags`"
8295 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8296 ;;
8297
8298 *)
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
8300$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
8301 PTHREAD_LIBS="-l$ax_pthread_try_flag"
8302 ;;
8303 esac
8304
8305 ax_pthread_save_CFLAGS="$CFLAGS"
8306 ax_pthread_save_LIBS="$LIBS"
8307 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8308 LIBS="$PTHREAD_LIBS $LIBS"
8309
8310 # Check for various functions. We must include pthread.h,
8311 # since some functions may be macros. (On the Sequent, we
8312 # need a special flag -Kthread to make this header compile.)
8313 # We check for pthread_join because it is in -lpthread on IRIX
8314 # while pthread_create is in libc. We check for pthread_attr_init
8315 # due to DEC craziness with -lpthreads. We check for
8316 # pthread_cleanup_push because it is one of the few pthread
8317 # functions on Solaris that doesn't have a non-functional libc stub.
8318 # We try pthread_create on general principles.
8319
8320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8321/* end confdefs.h. */
8322#include <pthread.h>
8323# if $ax_pthread_check_cond
8324# error "$ax_pthread_check_macro must be defined"
8325# endif
8326 static void routine(void *a) { a = 0; }
8327 static void *start_routine(void *a) { return a; }
8328int
8329main ()
8330{
8331pthread_t th; pthread_attr_t attr;
8332 pthread_create(&th, 0, start_routine, 0);
8333 pthread_join(th, 0);
8334 pthread_attr_init(&attr);
8335 pthread_cleanup_push(routine, 0);
8336 pthread_cleanup_pop(0) /* ; */
8337 ;
8338 return 0;
8339}
8340_ACEOF
8341if ac_fn_c_try_link "$LINENO"; then :
8342 ax_pthread_ok=yes
8343fi
8344rm -f core conftest.err conftest.$ac_objext \
8345 conftest$ac_exeext conftest.$ac_ext
8346
8347 CFLAGS="$ax_pthread_save_CFLAGS"
8348 LIBS="$ax_pthread_save_LIBS"
8349
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8351$as_echo "$ax_pthread_ok" >&6; }
8352 if test "x$ax_pthread_ok" = "xyes"; then :
8353 break
8354fi
8355
8356 PTHREAD_LIBS=""
8357 PTHREAD_CFLAGS=""
8358done
8359fi
8360
8361# Various other checks:
8362if test "x$ax_pthread_ok" = "xyes"; then
8363 ax_pthread_save_CFLAGS="$CFLAGS"
8364 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
8365 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8366 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
8367
8368 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8370$as_echo_n "checking for joinable pthread attribute... " >&6; }
8371if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8372 $as_echo_n "(cached) " >&6
8373else
8374 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8375 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8377/* end confdefs.h. */
8378#include <pthread.h>
8379int
8380main ()
8381{
8382int attr = $ax_pthread_attr; return attr /* ; */
8383 ;
8384 return 0;
8385}
8386_ACEOF
8387if ac_fn_c_try_link "$LINENO"; then :
8388 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
8389fi
8390rm -f core conftest.err conftest.$ac_objext \
8391 conftest$ac_exeext conftest.$ac_ext
8392 done
8393
8394fi
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8396$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8397 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
8398 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
8399 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
8400
8401cat >>confdefs.h <<_ACEOF
8402#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8403_ACEOF
8404
8405 ax_pthread_joinable_attr_defined=yes
8406
8407fi
8408
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
8410$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
8411if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8412 $as_echo_n "(cached) " >&6
8413else
8414 ax_cv_PTHREAD_SPECIAL_FLAGS=no
8415 case $host_os in
8416 solaris*)
8417 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
8418 ;;
8419 esac
8420
8421fi
8422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8423$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8424 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8425 test "x$ax_pthread_special_flags_added" != "xyes"; then :
8426 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8427 ax_pthread_special_flags_added=yes
8428fi
8429
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8431$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8432if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8433 $as_echo_n "(cached) " >&6
8434else
8435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8436/* end confdefs.h. */
8437#include <pthread.h>
8438int
8439main ()
8440{
8441int i = PTHREAD_PRIO_INHERIT;
8442 ;
8443 return 0;
8444}
8445_ACEOF
8446if ac_fn_c_try_link "$LINENO"; then :
8447 ax_cv_PTHREAD_PRIO_INHERIT=yes
8448else
8449 ax_cv_PTHREAD_PRIO_INHERIT=no
8450fi
8451rm -f core conftest.err conftest.$ac_objext \
8452 conftest$ac_exeext conftest.$ac_ext
8453
8454fi
8455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8456$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8457 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
8458 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
8459
8460$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8461
8462 ax_pthread_prio_inherit_defined=yes
8463
8464fi
8465
8466 CFLAGS="$ax_pthread_save_CFLAGS"
8467 LIBS="$ax_pthread_save_LIBS"
8468
8469 # More AIX lossage: compile with *_r variant
8470 if test "x$GCC" != "xyes"; then
8471 case $host_os in
8472 aix*)
8473 case "x/$CC" in #(
8474 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8475 #handle absolute path differently from PATH based program lookup
8476 case "x$CC" in #(
8477 x/*) :
8478 if as_fn_executable_p ${CC}_r; then :
8479 PTHREAD_CC="${CC}_r"
8480fi ;; #(
8481 *) :
8482 for ac_prog in ${CC}_r
8483do
8484 # Extract the first word of "$ac_prog", so it can be a program name with args.
8485set dummy $ac_prog; ac_word=$2
8486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8487$as_echo_n "checking for $ac_word... " >&6; }
8488if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8489 $as_echo_n "(cached) " >&6
8490else
8491 if test -n "$PTHREAD_CC"; then
8492 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8493else
8494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495for as_dir in $PATH
8496do
8497 IFS=$as_save_IFS
8498 test -z "$as_dir" && as_dir=.
8499 for ac_exec_ext in '' $ac_executable_extensions; do
8500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8501 ac_cv_prog_PTHREAD_CC="$ac_prog"
8502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8503 break 2
8504 fi
8505done
8506 done
8507IFS=$as_save_IFS
8508
8509fi
8510fi
8511PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8512if test -n "$PTHREAD_CC"; then
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8514$as_echo "$PTHREAD_CC" >&6; }
8515else
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517$as_echo "no" >&6; }
8518fi
8519
8520
8521 test -n "$PTHREAD_CC" && break
8522done
8523test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8524 ;;
8525esac ;; #(
8526 *) :
8527 ;;
8528esac
8529 ;;
8530 esac
8531 fi
8532fi
8533
8534test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8535
8536
8537
8538
8539
8540# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8541if test "x$ax_pthread_ok" = "xyes"; then
8542 threads=yes
8543 :
8544else
8545 ax_pthread_ok=no
8546 threads=no
8547fi
8548ac_ext=cpp
8549ac_cpp='$CXXCPP $CPPFLAGS'
8550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8553
8554
8555 if test "$threads" = "yes"; then
8556 save_LIBS="$LIBS"
8557 LIBS="$PTHREAD_LIBS $LIBS"
8558 save_CXXFLAGS="$CXXFLAGS"
8559 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
8561$as_echo_n "checking for std::thread... " >&6; }
8562if ${gdb_cv_cxx_std_thread+:} false; then :
8563 $as_echo_n "(cached) " >&6
8564else
8565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566/* end confdefs.h. */
8567#include <thread>
8568 void callback() { }
8569int
8570main ()
8571{
8572std::thread t(callback);
8573 ;
8574 return 0;
8575}
8576_ACEOF
8577if ac_fn_cxx_try_compile "$LINENO"; then :
8578 gdb_cv_cxx_std_thread=yes
8579else
8580 gdb_cv_cxx_std_thread=no
8581fi
8582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8583fi
8584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
8585$as_echo "$gdb_cv_cxx_std_thread" >&6; }
8586
8587 # This check must be here, while LIBS includes any necessary
8588 # threading library.
8589 for ac_func in pthread_sigmask pthread_setname_np
8590do :
8591 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8592ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
8593if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8594 cat >>confdefs.h <<_ACEOF
8595#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8596_ACEOF
8597
8598fi
8599done
8600
8601
8602 LIBS="$save_LIBS"
8603 CXXFLAGS="$save_CXXFLAGS"
8604 fi
8605 if test "$gdb_cv_cxx_std_thread" = "yes"; then
8606
8607$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
8608
8609 fi
8610 ac_ext=c
8611ac_cpp='$CPP $CPPFLAGS'
8612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8614ac_compiler_gnu=$ac_cv_c_compiler_gnu
8615
8616
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
8618$as_echo_n "checking for sigsetjmp... " >&6; }
8619if ${gdb_cv_func_sigsetjmp+:} false; then :
8620 $as_echo_n "(cached) " >&6
8621else
8622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278
TT
8623/* end confdefs.h. */
8624
05ea2a05
TT
8625 #include <setjmp.h>
8626
5e030278
TT
8627int
8628main ()
8629{
05ea2a05 8630sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
5e030278
TT
8631 ;
8632 return 0;
8633}
8634_ACEOF
05ea2a05
TT
8635if ac_fn_c_try_compile "$LINENO"; then :
8636 gdb_cv_func_sigsetjmp=yes
8637else
8638 gdb_cv_func_sigsetjmp=no
5e030278 8639fi
05ea2a05 8640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278 8641fi
05ea2a05
TT
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
8643$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
8644 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 8645
05ea2a05 8646$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 8647
05ea2a05 8648 fi
5e030278 8649
5e030278 8650
05ea2a05
TT
8651# Check whether --with-intel_pt was given.
8652if test "${with_intel_pt+set}" = set; then :
8653 withval=$with_intel_pt;
8654else
8655 with_intel_pt=auto
8656fi
5e030278 8657
05ea2a05
TT
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
8659$as_echo_n "checking whether to use intel pt... " >&6; }
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
8661$as_echo "$with_intel_pt" >&6; }
5e030278 8662
05ea2a05
TT
8663 if test "${with_intel_pt}" = no; then
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
8665$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
8666 HAVE_LIBIPT=no
8667 else
8668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278
TT
8669/* end confdefs.h. */
8670
05ea2a05
TT
8671 #include <linux/perf_event.h>
8672 #ifndef PERF_ATTR_SIZE_VER5
8673 # error
8674 #endif
5e030278
TT
8675
8676_ACEOF
05ea2a05
TT
8677if ac_fn_c_try_cpp "$LINENO"; then :
8678 perf_event=yes
8679else
8680 perf_event=no
5e030278 8681fi
05ea2a05
TT
8682rm -f conftest.err conftest.i conftest.$ac_ext
8683 if test "$perf_event" != yes; then
8684 if test "$with_intel_pt" = yes; then
8685 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
8686 else
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
8688$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
8689 fi
8690 fi
5e030278 8691
5e030278 8692
5e030278 8693
5e030278 8694
5e030278 8695
5e030278 8696
5e030278 8697
5e030278 8698
5e030278 8699
05ea2a05 8700 use_additional=yes
5e030278 8701
05ea2a05
TT
8702 acl_save_prefix="$prefix"
8703 prefix="$acl_final_prefix"
8704 acl_save_exec_prefix="$exec_prefix"
8705 exec_prefix="$acl_final_exec_prefix"
5e030278 8706
05ea2a05
TT
8707 eval additional_includedir=\"$includedir\"
8708 eval additional_libdir=\"$libdir\"
5e030278 8709
05ea2a05
TT
8710 exec_prefix="$acl_save_exec_prefix"
8711 prefix="$acl_save_prefix"
5e030278 8712
5e030278 8713
05ea2a05
TT
8714# Check whether --with-libipt-prefix was given.
8715if test "${with_libipt_prefix+set}" = set; then :
8716 withval=$with_libipt_prefix;
8717 if test "X$withval" = "Xno"; then
8718 use_additional=no
8719 else
8720 if test "X$withval" = "X"; then
5e030278 8721
05ea2a05
TT
8722 acl_save_prefix="$prefix"
8723 prefix="$acl_final_prefix"
8724 acl_save_exec_prefix="$exec_prefix"
8725 exec_prefix="$acl_final_exec_prefix"
5e030278 8726
05ea2a05
TT
8727 eval additional_includedir=\"$includedir\"
8728 eval additional_libdir=\"$libdir\"
5e030278 8729
05ea2a05
TT
8730 exec_prefix="$acl_save_exec_prefix"
8731 prefix="$acl_save_prefix"
5e030278 8732
05ea2a05
TT
8733 else
8734 additional_includedir="$withval/include"
8735 additional_libdir="$withval/lib"
8736 fi
8737 fi
5e030278 8738
05ea2a05 8739fi
5e030278 8740
05ea2a05
TT
8741 LIBIPT=
8742 LTLIBIPT=
8743 INCIPT=
8744 rpathdirs=
8745 ltrpathdirs=
8746 names_already_handled=
8747 names_next_round='ipt '
8748 while test -n "$names_next_round"; do
8749 names_this_round="$names_next_round"
8750 names_next_round=
8751 for name in $names_this_round; do
8752 already_handled=
8753 for n in $names_already_handled; do
8754 if test "$n" = "$name"; then
8755 already_handled=yes
8756 break
8757 fi
8758 done
8759 if test -z "$already_handled"; then
8760 names_already_handled="$names_already_handled $name"
8761 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8762 eval value=\"\$HAVE_LIB$uppername\"
8763 if test -n "$value"; then
8764 if test "$value" = yes; then
8765 eval value=\"\$LIB$uppername\"
8766 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
8767 eval value=\"\$LTLIB$uppername\"
8768 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
8769 else
8770 :
8771 fi
8772 else
8773 found_dir=
8774 found_la=
8775 found_so=
8776 found_a=
8777 if test $use_additional = yes; then
8778 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8779 found_dir="$additional_libdir"
8780 found_so="$additional_libdir/lib$name.$shlibext"
8781 if test -f "$additional_libdir/lib$name.la"; then
8782 found_la="$additional_libdir/lib$name.la"
8783 fi
8784 else
8785 if test -f "$additional_libdir/lib$name.$libext"; then
8786 found_dir="$additional_libdir"
8787 found_a="$additional_libdir/lib$name.$libext"
8788 if test -f "$additional_libdir/lib$name.la"; then
8789 found_la="$additional_libdir/lib$name.la"
8790 fi
8791 fi
8792 fi
8793 fi
8794 if test "X$found_dir" = "X"; then
8795 for x in $LDFLAGS $LTLIBIPT; do
8796
8797 acl_save_prefix="$prefix"
8798 prefix="$acl_final_prefix"
8799 acl_save_exec_prefix="$exec_prefix"
8800 exec_prefix="$acl_final_exec_prefix"
8801 eval x=\"$x\"
8802 exec_prefix="$acl_save_exec_prefix"
8803 prefix="$acl_save_prefix"
8804
8805 case "$x" in
8806 -L*)
8807 dir=`echo "X$x" | sed -e 's/^X-L//'`
8808 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8809 found_dir="$dir"
8810 found_so="$dir/lib$name.$shlibext"
8811 if test -f "$dir/lib$name.la"; then
8812 found_la="$dir/lib$name.la"
8813 fi
8814 else
8815 if test -f "$dir/lib$name.$libext"; then
8816 found_dir="$dir"
8817 found_a="$dir/lib$name.$libext"
8818 if test -f "$dir/lib$name.la"; then
8819 found_la="$dir/lib$name.la"
8820 fi
8821 fi
8822 fi
8823 ;;
8824 esac
8825 if test "X$found_dir" != "X"; then
8826 break
8827 fi
8828 done
8829 fi
8830 if test "X$found_dir" != "X"; then
8831 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
8832 if test "X$found_so" != "X"; then
8833 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8834 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8835 else
8836 haveit=
8837 for x in $ltrpathdirs; do
8838 if test "X$x" = "X$found_dir"; then
8839 haveit=yes
8840 break
8841 fi
8842 done
8843 if test -z "$haveit"; then
8844 ltrpathdirs="$ltrpathdirs $found_dir"
8845 fi
8846 if test "$hardcode_direct" = yes; then
8847 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8848 else
8849 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8850 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8851 haveit=
8852 for x in $rpathdirs; do
8853 if test "X$x" = "X$found_dir"; then
8854 haveit=yes
8855 break
8856 fi
8857 done
8858 if test -z "$haveit"; then
8859 rpathdirs="$rpathdirs $found_dir"
8860 fi
8861 else
8862 haveit=
8863 for x in $LDFLAGS $LIBIPT; do
8864
8865 acl_save_prefix="$prefix"
8866 prefix="$acl_final_prefix"
8867 acl_save_exec_prefix="$exec_prefix"
8868 exec_prefix="$acl_final_exec_prefix"
8869 eval x=\"$x\"
8870 exec_prefix="$acl_save_exec_prefix"
8871 prefix="$acl_save_prefix"
8872
8873 if test "X$x" = "X-L$found_dir"; then
8874 haveit=yes
8875 break
8876 fi
8877 done
8878 if test -z "$haveit"; then
8879 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
8880 fi
8881 if test "$hardcode_minus_L" != no; then
8882 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8883 else
8884 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8885 fi
8886 fi
8887 fi
8888 fi
8889 else
8890 if test "X$found_a" != "X"; then
8891 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
8892 else
8893 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
8894 fi
8895 fi
8896 additional_includedir=
8897 case "$found_dir" in
8898 */lib | */lib/)
8899 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8900 additional_includedir="$basedir/include"
8901 ;;
8902 esac
8903 if test "X$additional_includedir" != "X"; then
8904 if test "X$additional_includedir" != "X/usr/include"; then
8905 haveit=
8906 if test "X$additional_includedir" = "X/usr/local/include"; then
8907 if test -n "$GCC"; then
8908 case $host_os in
8909 linux*) haveit=yes;;
8910 esac
8911 fi
8912 fi
8913 if test -z "$haveit"; then
8914 for x in $CPPFLAGS $INCIPT; do
8915
8916 acl_save_prefix="$prefix"
8917 prefix="$acl_final_prefix"
8918 acl_save_exec_prefix="$exec_prefix"
8919 exec_prefix="$acl_final_exec_prefix"
8920 eval x=\"$x\"
8921 exec_prefix="$acl_save_exec_prefix"
8922 prefix="$acl_save_prefix"
8923
8924 if test "X$x" = "X-I$additional_includedir"; then
8925 haveit=yes
8926 break
8927 fi
8928 done
8929 if test -z "$haveit"; then
8930 if test -d "$additional_includedir"; then
8931 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
8932 fi
8933 fi
8934 fi
8935 fi
8936 fi
8937 if test -n "$found_la"; then
8938 save_libdir="$libdir"
8939 case "$found_la" in
8940 */* | *\\*) . "$found_la" ;;
8941 *) . "./$found_la" ;;
8942 esac
8943 libdir="$save_libdir"
8944 for dep in $dependency_libs; do
8945 case "$dep" in
8946 -L*)
8947 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8948 if test "X$additional_libdir" != "X/usr/lib"; then
8949 haveit=
8950 if test "X$additional_libdir" = "X/usr/local/lib"; then
8951 if test -n "$GCC"; then
8952 case $host_os in
8953 linux*) haveit=yes;;
8954 esac
8955 fi
8956 fi
8957 if test -z "$haveit"; then
8958 haveit=
8959 for x in $LDFLAGS $LIBIPT; do
8960
8961 acl_save_prefix="$prefix"
8962 prefix="$acl_final_prefix"
8963 acl_save_exec_prefix="$exec_prefix"
8964 exec_prefix="$acl_final_exec_prefix"
8965 eval x=\"$x\"
8966 exec_prefix="$acl_save_exec_prefix"
8967 prefix="$acl_save_prefix"
8968
8969 if test "X$x" = "X-L$additional_libdir"; then
8970 haveit=yes
8971 break
8972 fi
8973 done
8974 if test -z "$haveit"; then
8975 if test -d "$additional_libdir"; then
8976 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
8977 fi
8978 fi
8979 haveit=
8980 for x in $LDFLAGS $LTLIBIPT; do
8981
8982 acl_save_prefix="$prefix"
8983 prefix="$acl_final_prefix"
8984 acl_save_exec_prefix="$exec_prefix"
8985 exec_prefix="$acl_final_exec_prefix"
8986 eval x=\"$x\"
8987 exec_prefix="$acl_save_exec_prefix"
8988 prefix="$acl_save_prefix"
8989
8990 if test "X$x" = "X-L$additional_libdir"; then
8991 haveit=yes
8992 break
8993 fi
8994 done
8995 if test -z "$haveit"; then
8996 if test -d "$additional_libdir"; then
8997 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
8998 fi
8999 fi
9000 fi
9001 fi
9002 ;;
9003 -R*)
9004 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9005 if test "$enable_rpath" != no; then
9006 haveit=
9007 for x in $rpathdirs; do
9008 if test "X$x" = "X$dir"; then
9009 haveit=yes
9010 break
9011 fi
9012 done
9013 if test -z "$haveit"; then
9014 rpathdirs="$rpathdirs $dir"
9015 fi
9016 haveit=
9017 for x in $ltrpathdirs; do
9018 if test "X$x" = "X$dir"; then
9019 haveit=yes
9020 break
9021 fi
9022 done
9023 if test -z "$haveit"; then
9024 ltrpathdirs="$ltrpathdirs $dir"
9025 fi
9026 fi
9027 ;;
9028 -l*)
9029 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9030 ;;
9031 *.la)
9032 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9033 ;;
9034 *)
9035 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
9036 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
9037 ;;
9038 esac
9039 done
9040 fi
9041 else
9042 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9043 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
9044 fi
9045 fi
9046 fi
9047 done
9048 done
9049 if test "X$rpathdirs" != "X"; then
9050 if test -n "$hardcode_libdir_separator"; then
9051 alldirs=
9052 for found_dir in $rpathdirs; do
9053 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9054 done
9055 acl_save_libdir="$libdir"
9056 libdir="$alldirs"
9057 eval flag=\"$hardcode_libdir_flag_spec\"
9058 libdir="$acl_save_libdir"
9059 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
9060 else
9061 for found_dir in $rpathdirs; do
9062 acl_save_libdir="$libdir"
9063 libdir="$found_dir"
9064 eval flag=\"$hardcode_libdir_flag_spec\"
9065 libdir="$acl_save_libdir"
9066 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
9067 done
9068 fi
9069 fi
9070 if test "X$ltrpathdirs" != "X"; then
9071 for found_dir in $ltrpathdirs; do
9072 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
9073 done
9074 fi
5e030278 9075
5e030278 9076
05ea2a05 9077 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 9078
05ea2a05
TT
9079 for element in $INCIPT; do
9080 haveit=
9081 for x in $CPPFLAGS; do
5e030278 9082
05ea2a05
TT
9083 acl_save_prefix="$prefix"
9084 prefix="$acl_final_prefix"
9085 acl_save_exec_prefix="$exec_prefix"
9086 exec_prefix="$acl_final_exec_prefix"
9087 eval x=\"$x\"
9088 exec_prefix="$acl_save_exec_prefix"
9089 prefix="$acl_save_prefix"
9090
9091 if test "X$x" = "X$element"; then
9092 haveit=yes
9093 break
9094 fi
9095 done
9096 if test -z "$haveit"; then
9097 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9098 fi
9099 done
9100
9101
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
9103$as_echo_n "checking for libipt... " >&6; }
9104if ${ac_cv_libipt+:} false; then :
9105 $as_echo_n "(cached) " >&6
9106else
9107
9108 ac_save_LIBS="$LIBS"
9109 LIBS="$LIBS $LIBIPT"
9110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 9111/* end confdefs.h. */
05ea2a05
TT
9112#include "intel-pt.h"
9113int
9114main ()
9115{
9116pt_insn_alloc_decoder (0);
9117 ;
9118 return 0;
9119}
5e030278
TT
9120_ACEOF
9121if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
9122 ac_cv_libipt=yes
9123else
9124 ac_cv_libipt=no
5e030278
TT
9125fi
9126rm -f core conftest.err conftest.$ac_objext \
9127 conftest$ac_exeext conftest.$ac_ext
05ea2a05 9128 LIBS="$ac_save_LIBS"
5e030278
TT
9129
9130fi
05ea2a05
TT
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
9132$as_echo "$ac_cv_libipt" >&6; }
9133 if test "$ac_cv_libipt" = yes; then
9134 HAVE_LIBIPT=yes
5e030278 9135
05ea2a05 9136$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
5e030278 9137
05ea2a05
TT
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
9139$as_echo_n "checking how to link with libipt... " >&6; }
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
9141$as_echo "$LIBIPT" >&6; }
9142 else
9143 HAVE_LIBIPT=no
9144 CPPFLAGS="$ac_save_CPPFLAGS"
9145 LIBIPT=
9146 LTLIBIPT=
9147 fi
5e030278 9148
5e030278 9149
5e030278 9150
5e030278 9151
5e030278 9152
5e030278 9153
05ea2a05
TT
9154 if test "$HAVE_LIBIPT" != yes; then
9155 if test "$with_intel_pt" = yes; then
9156 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
9157 else
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
9159$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
9160 fi
9161 else
9162 save_LIBS=$LIBS
9163 LIBS="$LIBS $LIBIPT"
9164 for ac_func in pt_insn_event
9165do :
9166 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
9167if test "x$ac_cv_func_pt_insn_event" = xyes; then :
9168 cat >>confdefs.h <<_ACEOF
9169#define HAVE_PT_INSN_EVENT 1
9170_ACEOF
5e030278 9171
5e030278 9172fi
05ea2a05
TT
9173done
9174
9175 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
9176"
9177if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
9178
9179cat >>confdefs.h <<_ACEOF
9180#define HAVE_STRUCT_PT_INSN_ENABLED 1
9181_ACEOF
5e030278
TT
9182
9183
5e030278 9184fi
05ea2a05
TT
9185ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
9186"
9187if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
5e030278 9188
05ea2a05
TT
9189cat >>confdefs.h <<_ACEOF
9190#define HAVE_STRUCT_PT_INSN_RESYNCED 1
9191_ACEOF
5e030278 9192
5e030278 9193
05ea2a05 9194fi
5e030278 9195
05ea2a05
TT
9196 LIBS=$save_LIBS
9197 fi
9198 fi
9199
9200 if test "$ac_cv_header_sys_procfs_h" = yes; then
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
9202$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
9203 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
9204 $as_echo_n "(cached) " >&6
9205else
9206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 9207/* end confdefs.h. */
05ea2a05
TT
9208
9209#define _SYSCALL32
9210/* Needed for new procfs interface on sparc-solaris. */
9211#define _STRUCTURED_PROC 1
9212#include <sys/procfs.h>
5e030278
TT
9213int
9214main ()
9215{
05ea2a05 9216gregset_t avar
5e030278
TT
9217 ;
9218 return 0;
9219}
9220_ACEOF
05ea2a05
TT
9221if ac_fn_c_try_compile "$LINENO"; then :
9222 bfd_cv_have_sys_procfs_type_gregset_t=yes
9223else
9224 bfd_cv_have_sys_procfs_type_gregset_t=no
5e030278 9225
5e030278 9226fi
05ea2a05 9227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
9228fi
9229
05ea2a05 9230 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5e030278 9231
05ea2a05
TT
9232$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
9233
9234 fi
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
9236$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
9237
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
9239$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
9240 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
5e030278
TT
9241 $as_echo_n "(cached) " >&6
9242else
05ea2a05 9243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 9244/* end confdefs.h. */
05ea2a05
TT
9245
9246#define _SYSCALL32
9247/* Needed for new procfs interface on sparc-solaris. */
9248#define _STRUCTURED_PROC 1
9249#include <sys/procfs.h>
5e030278
TT
9250int
9251main ()
9252{
05ea2a05 9253fpregset_t avar
5e030278
TT
9254 ;
9255 return 0;
9256}
9257_ACEOF
05ea2a05
TT
9258if ac_fn_c_try_compile "$LINENO"; then :
9259 bfd_cv_have_sys_procfs_type_fpregset_t=yes
9260else
9261 bfd_cv_have_sys_procfs_type_fpregset_t=no
5e030278
TT
9262
9263fi
05ea2a05
TT
9264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9265fi
5e030278 9266
05ea2a05 9267 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5e030278 9268
05ea2a05 9269$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
5e030278 9270
05ea2a05
TT
9271 fi
9272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
9273$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
5e030278 9274
05ea2a05
TT
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
9276$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
9277 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
5e030278
TT
9278 $as_echo_n "(cached) " >&6
9279else
05ea2a05
TT
9280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9281/* end confdefs.h. */
5e030278 9282
05ea2a05
TT
9283#define _SYSCALL32
9284/* Needed for new procfs interface on sparc-solaris. */
9285#define _STRUCTURED_PROC 1
9286#include <sys/procfs.h>
9287int
9288main ()
9289{
9290prgregset_t avar
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295if ac_fn_c_try_compile "$LINENO"; then :
9296 bfd_cv_have_sys_procfs_type_prgregset_t=yes
9297else
9298 bfd_cv_have_sys_procfs_type_prgregset_t=no
9299
9300fi
9301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
9302fi
9303
05ea2a05
TT
9304 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
9305
9306$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
9307
9308 fi
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
9310$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
9311
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
9313$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
9314 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
5e030278
TT
9315 $as_echo_n "(cached) " >&6
9316else
9317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9318/* end confdefs.h. */
05ea2a05
TT
9319
9320#define _SYSCALL32
9321/* Needed for new procfs interface on sparc-solaris. */
9322#define _STRUCTURED_PROC 1
9323#include <sys/procfs.h>
5e030278
TT
9324int
9325main ()
9326{
05ea2a05 9327prfpregset_t avar
5e030278
TT
9328 ;
9329 return 0;
9330}
9331_ACEOF
05ea2a05
TT
9332if ac_fn_c_try_compile "$LINENO"; then :
9333 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5e030278 9334else
05ea2a05 9335 bfd_cv_have_sys_procfs_type_prfpregset_t=no
5e030278
TT
9336
9337fi
05ea2a05
TT
9338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9339fi
5e030278 9340
05ea2a05 9341 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5e030278 9342
05ea2a05 9343$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
5e030278 9344
05ea2a05
TT
9345 fi
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
9347$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
5e030278 9348
05ea2a05
TT
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
9350$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
9351 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
5e030278
TT
9352 $as_echo_n "(cached) " >&6
9353else
05ea2a05
TT
9354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355/* end confdefs.h. */
9356
9357#define _SYSCALL32
9358/* Needed for new procfs interface on sparc-solaris. */
9359#define _STRUCTURED_PROC 1
9360#include <sys/procfs.h>
9361int
9362main ()
9363{
9364prgregset32_t avar
9365 ;
9366 return 0;
9367}
9368_ACEOF
9369if ac_fn_c_try_compile "$LINENO"; then :
9370 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5e030278 9371else
05ea2a05 9372 bfd_cv_have_sys_procfs_type_prgregset32_t=no
5e030278
TT
9373
9374fi
05ea2a05 9375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
9376fi
9377
05ea2a05 9378 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5e030278 9379
05ea2a05 9380$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
5e030278 9381
05ea2a05
TT
9382 fi
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
9384$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
5e030278 9385
05ea2a05
TT
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
9387$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
9388 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
9389 $as_echo_n "(cached) " >&6
9390else
9391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392/* end confdefs.h. */
5e030278 9393
05ea2a05
TT
9394#define _SYSCALL32
9395/* Needed for new procfs interface on sparc-solaris. */
9396#define _STRUCTURED_PROC 1
9397#include <sys/procfs.h>
9398int
9399main ()
9400{
9401lwpid_t avar
9402 ;
9403 return 0;
9404}
9405_ACEOF
9406if ac_fn_c_try_compile "$LINENO"; then :
9407 bfd_cv_have_sys_procfs_type_lwpid_t=yes
9408else
9409 bfd_cv_have_sys_procfs_type_lwpid_t=no
5e030278 9410
05ea2a05
TT
9411fi
9412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9413fi
5e030278 9414
05ea2a05 9415 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5e030278 9416
05ea2a05 9417$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
5e030278 9418
05ea2a05
TT
9419 fi
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
9421$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
5e030278 9422
05ea2a05
TT
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
9424$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
9425 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
5e030278
TT
9426 $as_echo_n "(cached) " >&6
9427else
9428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9429/* end confdefs.h. */
05ea2a05
TT
9430
9431#define _SYSCALL32
9432/* Needed for new procfs interface on sparc-solaris. */
9433#define _STRUCTURED_PROC 1
9434#include <sys/procfs.h>
5e030278
TT
9435int
9436main ()
9437{
05ea2a05 9438psaddr_t avar
5e030278
TT
9439 ;
9440 return 0;
9441}
9442_ACEOF
05ea2a05
TT
9443if ac_fn_c_try_compile "$LINENO"; then :
9444 bfd_cv_have_sys_procfs_type_psaddr_t=yes
5e030278 9445else
05ea2a05
TT
9446 bfd_cv_have_sys_procfs_type_psaddr_t=no
9447
5e030278
TT
9448fi
9449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9450fi
5e030278 9451
05ea2a05 9452 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5e030278 9453
05ea2a05 9454$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
5e030278 9455
05ea2a05
TT
9456 fi
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
9458$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
5e030278 9459
05ea2a05
TT
9460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
9461$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
9462 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
e9bcb658
GB
9463 $as_echo_n "(cached) " >&6
9464else
9465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9466/* end confdefs.h. */
9467
05ea2a05
TT
9468#define _SYSCALL32
9469/* Needed for new procfs interface on sparc-solaris. */
9470#define _STRUCTURED_PROC 1
9471#include <sys/procfs.h>
e9bcb658
GB
9472int
9473main ()
9474{
05ea2a05 9475elf_fpregset_t avar
e9bcb658
GB
9476 ;
9477 return 0;
9478}
9479_ACEOF
9480if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 9481 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
e9bcb658 9482else
05ea2a05
TT
9483 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
9484
e9bcb658
GB
9485fi
9486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9487fi
e9bcb658 9488
05ea2a05
TT
9489 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
9490
9491$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
9492
9493 fi
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
9495$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
e9bcb658 9496
25c51f71 9497 fi
e9bcb658 9498
3266f10b 9499
eb7aa561
PA
9500# Check the return and argument types of ptrace.
9501
9502
9503for ac_header in sys/ptrace.h ptrace.h
9504do :
9505 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9506ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 9507if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb7aa561
PA
9508 cat >>confdefs.h <<_ACEOF
9509#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9510_ACEOF
9511
9512fi
9513
9514done
9515
9516
9517gdb_ptrace_headers='
9518#include <sys/types.h>
9519#if HAVE_SYS_PTRACE_H
9520# include <sys/ptrace.h>
9521#endif
9522#if HAVE_UNISTD_H
9523# include <unistd.h>
9524#endif
9525'
9526# There is no point in checking if we don't have a prototype.
9b30624b 9527ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
eb7aa561 9528"
d0ac1c44 9529if test "x$ac_cv_have_decl_ptrace" = xyes; then :
eb7aa561
PA
9530 ac_have_decl=1
9531else
9532 ac_have_decl=0
9533fi
9534
9535cat >>confdefs.h <<_ACEOF
9536#define HAVE_DECL_PTRACE $ac_have_decl
9537_ACEOF
9538if test $ac_have_decl = 1; then :
9539
9540else
9541
9542 : ${gdb_cv_func_ptrace_ret='int'}
9543 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
9544
9545fi
9546
9547# Check return type. Varargs (used on GNU/Linux) conflict with the
9548# empty argument list, so check for that explicitly.
9549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
9550$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 9551if ${gdb_cv_func_ptrace_ret+:} false; then :
eb7aa561
PA
9552 $as_echo_n "(cached) " >&6
9553else
9554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9555/* end confdefs.h. */
9556$gdb_ptrace_headers
9557int
9558main ()
9559{
9560extern long ptrace (enum __ptrace_request, ...);
9561 ;
9562 return 0;
9563}
9564_ACEOF
9b30624b 9565if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9566 gdb_cv_func_ptrace_ret='long'
9567else
9568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9569/* end confdefs.h. */
9570$gdb_ptrace_headers
9571int
9572main ()
9573{
9574extern int ptrace ();
9575 ;
9576 return 0;
9577}
9578_ACEOF
9b30624b 9579if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9580 gdb_cv_func_ptrace_ret='int'
9581else
9582 gdb_cv_func_ptrace_ret='long'
9583fi
9584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9585fi
9586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9587fi
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
9589$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
9590
9591cat >>confdefs.h <<_ACEOF
9592#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
9593_ACEOF
9594
9595# Check argument types.
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
9597$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 9598if ${gdb_cv_func_ptrace_args+:} false; then :
eb7aa561
PA
9599 $as_echo_n "(cached) " >&6
9600else
9601
9602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9603/* end confdefs.h. */
9604$gdb_ptrace_headers
9605int
9606main ()
9607{
9608extern long ptrace (enum __ptrace_request, ...);
9609 ;
9610 return 0;
9611}
9612_ACEOF
9b30624b 9613if ac_fn_c_try_compile "$LINENO"; then :
54019719 9614 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
eb7aa561
PA
9615else
9616
9617for gdb_arg1 in 'int' 'long'; do
9618 for gdb_arg2 in 'pid_t' 'int' 'long'; do
9619 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
9620 for gdb_arg4 in 'int' 'long' 'void *'; do
9621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9622/* end confdefs.h. */
9623$gdb_ptrace_headers
9624int
9625main ()
9626{
9627
9628extern $gdb_cv_func_ptrace_ret
9629 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
9630
9631 ;
9632 return 0;
9633}
9634_ACEOF
9b30624b 9635if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9636 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
9637 break 4;
9638fi
9639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9640 for gdb_arg5 in 'int *' 'int' 'long'; do
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9642/* end confdefs.h. */
9643$gdb_ptrace_headers
9644int
9645main ()
9646{
9647
9648extern $gdb_cv_func_ptrace_ret
9649 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
9650
9651 ;
9652 return 0;
9653}
9654_ACEOF
9b30624b 9655if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9656
9657gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
9658 break 5;
9659fi
9660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9661 done
9662 done
9663 done
9664 done
9665done
9666# Provide a safe default value.
9667: ${gdb_cv_func_ptrace_args='int,int,long,long'}
9668
9669fi
9670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9671fi
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
9673$as_echo "$gdb_cv_func_ptrace_args" >&6; }
9674ac_save_IFS=$IFS; IFS=','
9675set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
9676IFS=$ac_save_IFS
9677shift
9678
54019719
PA
9679cat >>confdefs.h <<_ACEOF
9680#define PTRACE_TYPE_ARG1 $1
9681_ACEOF
9682
9683
eb7aa561
PA
9684cat >>confdefs.h <<_ACEOF
9685#define PTRACE_TYPE_ARG3 $3
9686_ACEOF
9687
9688
9689cat >>confdefs.h <<_ACEOF
9690#define PTRACE_TYPE_ARG4 $4
9691_ACEOF
9692
9693if test -n "$5"; then
9694
9695cat >>confdefs.h <<_ACEOF
9696#define PTRACE_TYPE_ARG5 $5
9697_ACEOF
9698
9699fi
9700
9701
0fb4aa4b
PA
9702# Check for UST
9703ustlibs=""
9704ustinc=""
9705
9706
9707# Check whether --with-ust was given.
9708if test "${with_ust+set}" = set; then :
9709 withval=$with_ust;
9710fi
9711
9712
9713# Check whether --with-ust_include was given.
9714if test "${with_ust_include+set}" = set; then :
9715 withval=$with_ust_include;
9716fi
9717
9718
9719# Check whether --with-ust_lib was given.
9720if test "${with_ust_lib+set}" = set; then :
9721 withval=$with_ust_lib;
9722fi
9723
9724
9725case $with_ust in
9726 no)
9727 ustlibs=
9728 ustinc=
9729 ;;
9730 "" | yes)
9731 ustlibs=" -lust "
9732 ustinc=""
9733 ;;
9734 *)
9735 ustlibs="-L$with_ust/lib -lust"
9736 ustinc="-I$with_ust/include "
9737 ;;
9738esac
9739if test "x$with_ust_include" != x; then
9740 ustinc="-I$with_ust_include "
9741fi
9742if test "x$with_ust_lib" != x; then
9743 ustlibs="-L$with_ust_lib -lust"
9744fi
9745
9746if test "x$with_ust" != "xno"; then
9747 saved_CFLAGS="$CFLAGS"
9748 CFLAGS="$CFLAGS $ustinc"
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
9750$as_echo_n "checking for ust... " >&6; }
9751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9752/* end confdefs.h. */
9753
9754#define CONFIG_UST_GDB_INTEGRATION
9755#include <ust/ust.h>
9756
9757int
9758main ()
9759{
9760
9761 ;
9762 return 0;
9763}
9764_ACEOF
9765if ac_fn_c_try_compile "$LINENO"; then :
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9767$as_echo "yes" >&6; };
9768$as_echo "#define HAVE_UST 1" >>confdefs.h
9769
9770else
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }; ustlibs= ; ustinc=
9773fi
9774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9775 CFLAGS="$saved_CFLAGS"
9776fi
9777
9778# Flags needed for UST
9779
9780
9781
8f13a3ce 9782
d4596a3d
PA
9783# Check whether --enable-werror was given.
9784if test "${enable_werror+set}" = set; then :
9785 enableval=$enable_werror; case "${enableval}" in
9786 yes | y) ERROR_ON_WARNING="yes" ;;
9787 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 9788 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
d4596a3d
PA
9789 esac
9790fi
9791
9792
9a084706 9793# Enable -Werror by default when using gcc. Turn it off for releases.
8f13a3ce 9794if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
d4596a3d
PA
9795 ERROR_ON_WARNING=yes
9796fi
9797
9798WERROR_CFLAGS=""
9799if test "${ERROR_ON_WARNING}" = yes ; then
9800 WERROR_CFLAGS="-Werror"
9801fi
9802
cf6de44d 9803# The options we'll try to enable.
aac331e4 9804build_warnings="-Wall -Wpointer-arith \
a0de763e 9805-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
8f13a3ce 9806-Wno-switch -Wno-char-subscripts \
cf6de44d 9807-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 9808-Wno-sign-compare -Wno-error=maybe-uninitialized \
458412c3 9809-Wno-mismatched-tags \
632e107b 9810-Wno-error=deprecated-register \
85e26832 9811-Wsuggest-override \
1a34f210 9812-Wimplicit-fallthrough=3 \
96643e35 9813-Wduplicated-cond \
33a6bc35
TT
9814-Wshadow=local \
9815-Wdeprecated-copy \
9816-Wdeprecated-copy-dtor \
bb564c58 9817-Wredundant-move \
8ddd8e0e
SM
9818-Wmissing-declarations \
9819-Wstrict-null-sentinel"
8f13a3ce 9820
8f13a3ce 9821case "${host}" in
5bfda255
YQ
9822 *-*-mingw32*)
9823 # Enable -Wno-format by default when using gcc on mingw since many
9824 # GCC versions complain about %I64.
9825 build_warnings="$build_warnings -Wno-format" ;;
9826 *-*-solaris*)
9827 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
9828 # doesn't understand.
9829 build_warnings="$build_warnings -Wno-unknown-pragmas"
9830 # Solaris 11 <unistd.h> marks vfork deprecated.
9831 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
9832 *)
9833 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
9834 # but there's a special case for this below.
9835 build_warnings="$build_warnings -Wformat-nonliteral" ;;
8f13a3ce
MF
9836esac
9837
9838# Check whether --enable-build-warnings was given.
9839if test "${enable_build_warnings+set}" = set; then :
9840 enableval=$enable_build_warnings; case "${enableval}" in
9841 yes) ;;
9842 no) build_warnings="-w";;
9843 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9844 build_warnings="${build_warnings} ${t}";;
9845 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9846 build_warnings="${t} ${build_warnings}";;
9847 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9848esac
9849if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9850 echo "Setting compiler warning flags = $build_warnings" 6>&1
9851fi
9852fi
9853# Check whether --enable-gdb-build-warnings was given.
9854if test "${enable_gdb_build_warnings+set}" = set; then :
9855 enableval=$enable_gdb_build_warnings; case "${enableval}" in
9856 yes) ;;
9857 no) build_warnings="-w";;
9858 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9859 build_warnings="${build_warnings} ${t}";;
9860 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9861 build_warnings="${t} ${build_warnings}";;
9862 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9863esac
9864if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9865 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9866fi
3bc3d82a
PA
9867fi
9868
9869# The set of warnings supported by a C++ compiler is not the same as
9870# of the C compiler.
cf6de44d 9871ac_ext=cpp
3bc3d82a
PA
9872ac_cpp='$CXXCPP $CPPFLAGS'
9873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9876
3bc3d82a 9877
d4596a3d 9878WARN_CFLAGS=""
8f13a3ce 9879if test "x${build_warnings}" != x -a "x$GCC" = xyes
d4596a3d
PA
9880then
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
9882$as_echo_n "checking compiler warning flags... " >&6; }
9883 # Separate out the -Werror flag as some files just cannot be
9884 # compiled with it enabled.
9885 for w in ${build_warnings}; do
7544db95
PA
9886 # GCC does not complain about -Wno-unknown-warning. Invert
9887 # and test -Wunknown-warning instead.
9888 case $w in
9889 -Wno-*)
9890 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
9891 -Wformat-nonliteral)
9892 # gcc requires -Wformat before -Wformat-nonliteral
9893 # will work, so stick them together.
9894 w="-Wformat $w"
9895 wtest="$w"
9896 ;;
7544db95
PA
9897 *)
9898 wtest=$w ;;
9899 esac
9900
d4596a3d
PA
9901 case $w in
9902 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
9903 *)
9904 # Check whether GCC accepts it.
d4596a3d 9905 saved_CFLAGS="$CFLAGS"
3e019bdc 9906 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 9907 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 9908 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
9909 if test "x$w" = "x-Wunused-variable"; then
9910 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
9911 # fixed in GCC 4.9. This test is derived from the gdb
9912 # source code that triggered this bug in GCC.
9913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9914/* end confdefs.h. */
9915struct scoped_restore_base {};
9916 struct scoped_restore_tmpl : public scoped_restore_base {
9917 ~scoped_restore_tmpl() {}
9918 };
9919int
9920main ()
9921{
9922const scoped_restore_base &b = scoped_restore_tmpl();
9923 ;
9924 return 0;
9925}
9926_ACEOF
9927if ac_fn_cxx_try_compile "$LINENO"; then :
9928 WARN_CFLAGS="${WARN_CFLAGS} $w"
9929fi
9930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931 else
9932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d4596a3d
PA
9933/* end confdefs.h. */
9934
9935int
9936main ()
9937{
9938
9939 ;
9940 return 0;
9941}
9942_ACEOF
3bc3d82a 9943if ac_fn_cxx_try_compile "$LINENO"; then :
d4596a3d
PA
9944 WARN_CFLAGS="${WARN_CFLAGS} $w"
9945fi
9946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 9947 fi
d4596a3d 9948 CFLAGS="$saved_CFLAGS"
3bc3d82a 9949 CXXFLAGS="$saved_CXXFLAGS"
d4596a3d
PA
9950 esac
9951 done
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
9953$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
9954fi
9955
9956
9957
cf6de44d 9958ac_ext=c
3bc3d82a
PA
9959ac_cpp='$CPP $CPPFLAGS'
9960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9962ac_compiler_gnu=$ac_cv_c_compiler_gnu
9963
3bc3d82a 9964
8f13a3ce 9965
10e86dd7
DE
9966old_LIBS="$LIBS"
9967LIBS="$LIBS -ldl"
9968for ac_func in dladdr
9969do :
9970 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
d0ac1c44 9971if test "x$ac_cv_func_dladdr" = xyes; then :
10e86dd7
DE
9972 cat >>confdefs.h <<_ACEOF
9973#define HAVE_DLADDR 1
9974_ACEOF
9975
9976fi
9977done
9978
9979LIBS="$old_LIBS"
9980
07697489
PA
9981
9982 # Check for presence and size of long long.
9983 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 9984if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
9985
9986cat >>confdefs.h <<_ACEOF
9987#define HAVE_LONG_LONG 1
9988_ACEOF
9989
9990# The cast to long int works around a bug in the HP C Compiler
9991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9993# This bug is HP SR number 8606223364.
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9995$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 9996if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
9997 $as_echo_n "(cached) " >&6
9998else
9999 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10000
10001else
10002 if test "$ac_cv_type_long_long" = yes; then
10003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10005as_fn_error 77 "cannot compute sizeof (long long)
10006See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
10007 else
10008 ac_cv_sizeof_long_long=0
10009 fi
10010fi
10011
10012fi
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10014$as_echo "$ac_cv_sizeof_long_long" >&6; }
10015
10016
10017
10018cat >>confdefs.h <<_ACEOF
10019#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10020_ACEOF
10021
10022
10023fi
10024
10025
d0ac1c44
SM
10026 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
10027ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
10028if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
10029 ac_have_decl=1
10030else
10031 ac_have_decl=0
10032fi
10033
10034cat >>confdefs.h <<_ACEOF
10035#define HAVE_DECL_BASENAME $ac_have_decl
10036_ACEOF
10037ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 10038if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
10039 ac_have_decl=1
10040else
10041 ac_have_decl=0
10042fi
10043
10044cat >>confdefs.h <<_ACEOF
10045#define HAVE_DECL_FFS $ac_have_decl
10046_ACEOF
10047ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 10048if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
10049 ac_have_decl=1
10050else
10051 ac_have_decl=0
10052fi
10053
10054cat >>confdefs.h <<_ACEOF
10055#define HAVE_DECL_ASPRINTF $ac_have_decl
10056_ACEOF
10057ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 10058if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
10059 ac_have_decl=1
10060else
10061 ac_have_decl=0
10062fi
10063
10064cat >>confdefs.h <<_ACEOF
10065#define HAVE_DECL_VASPRINTF $ac_have_decl
10066_ACEOF
10067ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 10068if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
10069 ac_have_decl=1
10070else
10071 ac_have_decl=0
10072fi
10073
10074cat >>confdefs.h <<_ACEOF
10075#define HAVE_DECL_SNPRINTF $ac_have_decl
10076_ACEOF
10077ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 10078if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
10079 ac_have_decl=1
10080else
10081 ac_have_decl=0
10082fi
10083
10084cat >>confdefs.h <<_ACEOF
10085#define HAVE_DECL_VSNPRINTF $ac_have_decl
10086_ACEOF
10087
10088 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 10089if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
10090 ac_have_decl=1
10091else
10092 ac_have_decl=0
10093fi
10094
10095cat >>confdefs.h <<_ACEOF
10096#define HAVE_DECL_STRTOL $ac_have_decl
10097_ACEOF
10098ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 10099if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
10100 ac_have_decl=1
10101else
10102 ac_have_decl=0
10103fi
10104
10105cat >>confdefs.h <<_ACEOF
10106#define HAVE_DECL_STRTOUL $ac_have_decl
10107_ACEOF
10108ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 10109if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
10110 ac_have_decl=1
10111else
10112 ac_have_decl=0
10113fi
10114
10115cat >>confdefs.h <<_ACEOF
10116#define HAVE_DECL_STRTOLL $ac_have_decl
10117_ACEOF
10118ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 10119if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
10120 ac_have_decl=1
10121else
10122 ac_have_decl=0
10123fi
10124
10125cat >>confdefs.h <<_ACEOF
10126#define HAVE_DECL_STRTOULL $ac_have_decl
10127_ACEOF
10128
10129 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 10130if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
10131 ac_have_decl=1
10132else
10133 ac_have_decl=0
10134fi
10135
10136cat >>confdefs.h <<_ACEOF
10137#define HAVE_DECL_STRVERSCMP $ac_have_decl
10138_ACEOF
10139
10140
10141
81ecdfbb 10142ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
d0ac1c44 10143if test "x$ac_cv_have_decl_perror" = xyes; then :
81ecdfbb
RW
10144 ac_have_decl=1
10145else
10146 ac_have_decl=0
f450004a 10147fi
81ecdfbb
RW
10148
10149cat >>confdefs.h <<_ACEOF
10150#define HAVE_DECL_PERROR $ac_have_decl
10151_ACEOF
bb0116a4 10152ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 10153if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
bb0116a4
JB
10154 ac_have_decl=1
10155else
10156 ac_have_decl=0
10157fi
10158
10159cat >>confdefs.h <<_ACEOF
10160#define HAVE_DECL_VASPRINTF $ac_have_decl
10161_ACEOF
10162ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 10163if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
bb0116a4
JB
10164 ac_have_decl=1
10165else
10166 ac_have_decl=0
10167fi
10168
10169cat >>confdefs.h <<_ACEOF
10170#define HAVE_DECL_VSNPRINTF $ac_have_decl
10171_ACEOF
81ecdfbb
RW
10172
10173
3e019bdc
SM
10174# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10175# Older amd64 Linux's don't have the fs_base and gs_base members of
10176# `struct user_regs_struct'.
f517c180
EA
10177ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
10178#include <sys/user.h>
239b6d10 10179"
d0ac1c44 10180if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
239b6d10
WT
10181
10182cat >>confdefs.h <<_ACEOF
10183#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10184_ACEOF
10185
10186
10187fi
f517c180
EA
10188ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
10189#include <sys/user.h>
239b6d10 10190"
d0ac1c44 10191if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
239b6d10
WT
10192
10193cat >>confdefs.h <<_ACEOF
10194#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10195_ACEOF
10196
10197
10198fi
10199
10200
10201
81ecdfbb
RW
10202ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
10203#include <sys/socket.h>
10204
10205"
d0ac1c44 10206if test "x$ac_cv_type_socklen_t" = xyes; then :
f450004a 10207
ccbd4912 10208cat >>confdefs.h <<_ACEOF
f450004a
DJ
10209#define HAVE_SOCKLEN_T 1
10210_ACEOF
10211
f450004a 10212
ccbd4912 10213fi
f450004a 10214
fb1e4ffc 10215
64da5dd5
JB
10216case "${target}" in
10217 *-android*)
10218 # Starting with NDK version 9, <elf.h> actually includes definitions
10219 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
10220 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
10221 # leading to conflicts with the defintions from <linux/elf.h>.
10222 # This makes it impossible for us to include both <elf.h> and
10223 # <linux/elf.h>, which means that, in practice, we do not have
10224 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
10225 # Therefore, do not try to auto-detect availability, as it would
10226 # get it wrong on this platform.
10227 ;;
10228 *)
10229 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
8365dcf5
TJB
10230
10231"
d0ac1c44 10232if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
8365dcf5
TJB
10233
10234cat >>confdefs.h <<_ACEOF
10235#define HAVE_ELF32_AUXV_T 1
10236_ACEOF
10237
10238
10239fi
10240ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
10241
10242"
d0ac1c44 10243if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
8365dcf5
TJB
10244
10245cat >>confdefs.h <<_ACEOF
10246#define HAVE_ELF64_AUXV_T 1
10247_ACEOF
10248
10249
10250fi
10251
64da5dd5 10252esac
8365dcf5 10253
c16158bc
JM
10254
10255
81ecdfbb
RW
10256# Check whether --with-pkgversion was given.
10257if test "${with_pkgversion+set}" = set; then :
10258 withval=$with_pkgversion; case "$withval" in
d0ac1c44 10259 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
10260 no) PKGVERSION= ;;
10261 *) PKGVERSION="($withval) " ;;
10262 esac
10263else
10264 PKGVERSION="(GDB) "
10265
81ecdfbb
RW
10266fi
10267
c16158bc
JM
10268
10269
10270
10271
81ecdfbb
RW
10272# Check whether --with-bugurl was given.
10273if test "${with_bugurl+set}" = set; then :
10274 withval=$with_bugurl; case "$withval" in
d0ac1c44 10275 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
10276 no) BUGURL=
10277 ;;
10278 *) BUGURL="$withval"
10279 ;;
10280 esac
10281else
10282 BUGURL="http://www.gnu.org/software/gdb/bugs/"
10283
81ecdfbb
RW
10284fi
10285
c16158bc
JM
10286 case ${BUGURL} in
10287 "")
10288 REPORT_BUGS_TO=
10289 REPORT_BUGS_TEXI=
10290 ;;
10291 *)
10292 REPORT_BUGS_TO="<$BUGURL>"
10293 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
10294 ;;
10295 esac;
10296
10297
10298
10299
10300cat >>confdefs.h <<_ACEOF
10301#define PKGVERSION "$PKGVERSION"
10302_ACEOF
10303
10304
10305cat >>confdefs.h <<_ACEOF
10306#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
10307_ACEOF
10308
10309
8838b45e
NS
10310# Check for various supplementary target information (beyond the
10311# triplet) which might affect the choices in configure.srv.
10312case "${target}" in
10313 i[34567]86-*-linux*)
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
10315$as_echo_n "checking if building for x86-64... " >&6; }
d0ac1c44 10316if ${gdb_cv_i386_is_x86_64+:} false; then :
8838b45e
NS
10317 $as_echo_n "(cached) " >&6
10318else
10319 save_CPPFLAGS="$CPPFLAGS"
10320 CPPFLAGS="$CPPFLAGS $CFLAGS"
10321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10322/* end confdefs.h. */
10323
10324#if __x86_64__
10325got it
10326#endif
10327
10328_ACEOF
10329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10330 $EGREP "got it" >/dev/null 2>&1; then :
10331 gdb_cv_i386_is_x86_64=yes
10332else
10333 gdb_cv_i386_is_x86_64=no
10334fi
10335rm -f conftest*
10336
10337 CPPFLAGS="$save_CPPFLAGS"
10338fi
10339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
10340$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
10341 ;;
201506da
PA
10342
10343 x86_64-*-linux*)
10344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
10345$as_echo_n "checking if building for x32... " >&6; }
d0ac1c44 10346if ${gdb_cv_x86_is_x32+:} false; then :
201506da
PA
10347 $as_echo_n "(cached) " >&6
10348else
10349 save_CPPFLAGS="$CPPFLAGS"
10350 CPPFLAGS="$CPPFLAGS $CFLAGS"
10351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10352/* end confdefs.h. */
10353
10354#if __x86_64__ && __ILP32__
10355got it
10356#endif
10357
10358_ACEOF
10359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10360 $EGREP "got it" >/dev/null 2>&1; then :
10361 gdb_cv_x86_is_x32=yes
10362else
10363 gdb_cv_x86_is_x32=no
10364fi
10365rm -f conftest*
10366
10367 CPPFLAGS="$save_CPPFLAGS"
10368fi
10369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
10370$as_echo "$gdb_cv_x86_is_x32" >&6; }
10371 ;;
10372
9ac544ce
MK
10373 m68k-*-*)
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
10375$as_echo_n "checking if building for Coldfire... " >&6; }
d0ac1c44 10376if ${gdb_cv_m68k_is_coldfire+:} false; then :
9ac544ce
MK
10377 $as_echo_n "(cached) " >&6
10378else
10379 save_CPPFLAGS="$CPPFLAGS"
10380 CPPFLAGS="$CPPFLAGS $CFLAGS"
10381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10382/* end confdefs.h. */
10383
10384#ifdef __mcoldfire__
10385got it
10386#endif
10387
10388_ACEOF
10389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10390 $EGREP "got it" >/dev/null 2>&1; then :
10391 gdb_cv_m68k_is_coldfire=yes
10392else
10393 gdb_cv_m68k_is_coldfire=no
10394fi
10395rm -f conftest*
10396
10397 CPPFLAGS="$save_CPPFLAGS"
10398fi
10399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
10400$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
10401 ;;
8838b45e
NS
10402esac
10403
7ea81414 10404. ${srcdir}/configure.srv
d6e9fb05 10405
68070c10
PA
10406if test "${srv_mingwce}" = "yes"; then
10407 LIBS="$LIBS -lws2"
10408elif test "${srv_mingw}" = "yes"; then
b2ceabe8
TT
10409 # WIN32APILIBS is set by GDB_AC_COMMON.
10410 LIBS="$LIBS $WIN32APILIBS"
ac8c974e
AR
10411elif test "${srv_qnx}" = "yes"; then
10412 LIBS="$LIBS -lsocket"
8ed54b31
JB
10413elif test "${srv_lynxos}" = "yes"; then
10414 LIBS="$LIBS -lnetinet"
68070c10
PA
10415fi
10416
58caa3dc 10417if test "${srv_linux_usrregs}" = "yes"; then
f450004a 10418
81ecdfbb 10419$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
58caa3dc
DJ
10420
10421fi
10422
10423if test "${srv_linux_regsets}" = "yes"; then
e9d25b98 10424
81ecdfbb 10425$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
e9d25b98
DJ
10426
10427
81ecdfbb
RW
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10429$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 10430 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 10431 $as_echo_n "(cached) " >&6
bec39cab 10432else
81ecdfbb 10433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10434/* end confdefs.h. */
58caa3dc 10435#include <sys/ptrace.h>
bec39cab
AC
10436int
10437main ()
10438{
58caa3dc 10439PTRACE_GETREGS;
bec39cab
AC
10440 ;
10441 return 0;
10442}
10443_ACEOF
81ecdfbb 10444if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
10445 gdbsrv_cv_have_ptrace_getregs=yes
10446else
81ecdfbb 10447 gdbsrv_cv_have_ptrace_getregs=no
58caa3dc 10448fi
81ecdfbb 10449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
10450fi
10451
81ecdfbb
RW
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
10453$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
58caa3dc 10454 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
f450004a 10455
81ecdfbb 10456$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
58caa3dc
DJ
10457
10458 fi
10459
81ecdfbb
RW
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10461$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 10462 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 10463 $as_echo_n "(cached) " >&6
58caa3dc 10464else
81ecdfbb 10465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10466/* end confdefs.h. */
58caa3dc 10467#include <sys/ptrace.h>
bec39cab
AC
10468int
10469main ()
10470{
58caa3dc 10471PTRACE_GETFPXREGS;
bec39cab
AC
10472 ;
10473 return 0;
10474}
10475_ACEOF
81ecdfbb 10476if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
10477 gdbsrv_cv_have_ptrace_getfpxregs=yes
10478else
81ecdfbb 10479 gdbsrv_cv_have_ptrace_getfpxregs=no
58caa3dc 10480fi
81ecdfbb 10481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58caa3dc
DJ
10482fi
10483
81ecdfbb
RW
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
10485$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
58caa3dc 10486 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
f450004a 10487
81ecdfbb 10488$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
58caa3dc
DJ
10489
10490 fi
10491fi
10492
9accd112
MM
10493if test "${srv_linux_btrace}" = "yes"; then
10494
10495$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
10496
10497fi
10498
18f5fd81
TJB
10499if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
10501$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
d0ac1c44 10502 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
18f5fd81
TJB
10503 $as_echo_n "(cached) " >&6
10504else
10505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10506/* end confdefs.h. */
10507
10508#include <thread_db.h>
10509int
10510main ()
10511{
10512lwpid_t avar
10513 ;
10514 return 0;
10515}
10516_ACEOF
10517if ac_fn_c_try_compile "$LINENO"; then :
10518 gdbserver_cv_have_thread_db_type_lwpid_t=yes
10519else
10520 gdbserver_cv_have_thread_db_type_lwpid_t=no
10521
10522fi
10523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10524fi
10525
10526 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
10527
10528$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10529
10530 fi
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
10532$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
10533
10534fi
10535
10536if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
10538$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
d0ac1c44 10539 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
18f5fd81
TJB
10540 $as_echo_n "(cached) " >&6
10541else
10542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10543/* end confdefs.h. */
10544
10545#include <thread_db.h>
10546int
10547main ()
10548{
10549psaddr_t avar
10550 ;
10551 return 0;
10552}
10553_ACEOF
10554if ac_fn_c_try_compile "$LINENO"; then :
10555 gdbserver_cv_have_thread_db_type_psaddr_t=yes
10556else
10557 gdbserver_cv_have_thread_db_type_psaddr_t=no
10558
10559fi
10560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10561fi
10562
10563 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
10564
10565$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10566
10567 fi
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
10569$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
10570
10571fi
10572
193f13e6
MK
10573old_LIBS="$LIBS"
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10575$as_echo_n "checking for dlopen in -ldl... " >&6; }
d0ac1c44 10576if ${ac_cv_lib_dl_dlopen+:} false; then :
193f13e6
MK
10577 $as_echo_n "(cached) " >&6
10578else
10579 ac_check_lib_save_LIBS=$LIBS
10580LIBS="-ldl $LIBS"
10581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582/* end confdefs.h. */
10583
10584/* Override any GCC internal prototype to avoid an error.
10585 Use char because int might match the return type of a GCC
10586 builtin and then its argument prototype would still apply. */
10587#ifdef __cplusplus
10588extern "C"
10589#endif
10590char dlopen ();
10591int
10592main ()
10593{
10594return dlopen ();
10595 ;
10596 return 0;
10597}
10598_ACEOF
10599if ac_fn_c_try_link "$LINENO"; then :
10600 ac_cv_lib_dl_dlopen=yes
10601else
10602 ac_cv_lib_dl_dlopen=no
10603fi
10604rm -f core conftest.err conftest.$ac_objext \
10605 conftest$ac_exeext conftest.$ac_ext
10606LIBS=$ac_check_lib_save_LIBS
10607fi
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10609$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
d0ac1c44 10610if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
193f13e6
MK
10611 cat >>confdefs.h <<_ACEOF
10612#define HAVE_LIBDL 1
10613_ACEOF
10614
10615 LIBS="-ldl $LIBS"
10616
10617fi
10618
10619LIBS="$old_LIBS"
10620
0d62e5e8
DJ
10621srv_thread_depfiles=
10622srv_libs=
0d62e5e8
DJ
10623
10624if test "$srv_linux_thread_db" = "yes"; then
193f13e6
MK
10625 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
10626 srv_libs="-ldl"
f6528abd
JK
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
10628$as_echo_n "checking for the dynamic export flag... " >&6; }
193f13e6 10629 old_LDFLAGS="$LDFLAGS"
f6528abd
JK
10630 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
10631 # supported there.
10632 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
10633 LDFLAGS="$LDFLAGS $RDYNAMIC"
193f13e6 10634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
10635/* end confdefs.h. */
10636
10637int
10638main ()
10639{
10640
10641 ;
10642 return 0;
10643}
10644_ACEOF
81ecdfbb 10645if ac_fn_c_try_link "$LINENO"; then :
f6528abd
JK
10646 found="-Wl,--dynamic-list"
10647 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6de3c42 10648else
f6528abd
JK
10649 RDYNAMIC="-rdynamic"
10650 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
10651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652/* end confdefs.h. */
10653
10654int
10655main ()
10656{
10657
10658 ;
10659 return 0;
10660}
10661_ACEOF
10662if ac_fn_c_try_link "$LINENO"; then :
10663 found="-rdynamic"
10664else
10665 found="no"
10666 RDYNAMIC=""
770d76d7
PA
10667fi
10668rm -f core conftest.err conftest.$ac_objext \
10669 conftest$ac_exeext conftest.$ac_ext
10670fi
10671rm -f core conftest.err conftest.$ac_objext \
10672 conftest$ac_exeext conftest.$ac_ext
10673
10674 LDFLAGS="$old_LDFLAGS"
10675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
10676$as_echo "$found" >&6; }
10677 else
10678 srv_libs="-lthread_db"
10679 fi
55a8c076 10680
770d76d7 10681 srv_thread_depfiles="thread-db.o proc-service.o"
7d4e5717
PA
10682
10683$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
10684
770d76d7
PA
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
10686$as_echo_n "checking for TD_VERSION... " >&6; }
d0ac1c44 10687if ${gdbsrv_cv_have_td_version+:} false; then :
770d76d7
PA
10688 $as_echo_n "(cached) " >&6
10689else
10690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10691/* end confdefs.h. */
10692#include <thread_db.h>
55a8c076
YQ
10693int
10694main ()
10695{
770d76d7 10696TD_VERSION;
c9a1864a
YQ
10697 ;
10698 return 0;
10699}
10700_ACEOF
55a8c076 10701if ac_fn_c_try_compile "$LINENO"; then :
770d76d7 10702 gdbsrv_cv_have_td_version=yes
c9a1864a 10703else
770d76d7
PA
10704 gdbsrv_cv_have_td_version=no
10705fi
10706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10707fi
10708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
10709$as_echo "$gdbsrv_cv_have_td_version" >&6; }
0ad6b8ee 10710 if test "$gdbsrv_cv_have_td_version" = yes; then
c9a1864a 10711
770d76d7 10712$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
55a8c076 10713
770d76d7
PA
10714 fi
10715fi
c9a1864a
YQ
10716
10717
770d76d7
PA
10718# Check whether --with-libthread-db was given.
10719if test "${with_libthread_db+set}" = set; then :
10720 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
10721 srv_libs="$srv_libthread_db_path"
c9a1864a 10722
770d76d7 10723fi
c9a1864a
YQ
10724
10725
770d76d7 10726if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
c9a1864a 10727
770d76d7 10728$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
c9a1864a 10729
55a8c076 10730fi
c9a1864a 10731
770d76d7
PA
10732if test "$srv_xmlfiles" != ""; then
10733 srv_xmlbuiltin="xml-builtin.o"
c9a1864a 10734
770d76d7 10735$as_echo "#define USE_XML 1" >>confdefs.h
c9a1864a 10736
c9a1864a 10737
770d76d7
PA
10738 tmp_xmlfiles=$srv_xmlfiles
10739 srv_xmlfiles=""
10740 for f in $tmp_xmlfiles; do
10741 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
10742 done
c9a1864a
YQ
10743fi
10744
cd850b40 10745GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_selftest_objs"
770d76d7 10746GDBSERVER_LIBS="$srv_libs"
c9a1864a 10747
770d76d7
PA
10748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
10749$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
d0ac1c44 10750if ${gdbsrv_cv_have_sync_builtins+:} false; then :
770d76d7
PA
10751 $as_echo_n "(cached) " >&6
10752else
c9a1864a 10753
770d76d7
PA
10754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10755/* end confdefs.h. */
c9a1864a 10756
770d76d7
PA
10757int
10758main ()
10759{
10760int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
10761 ;
10762 return 0;
10763}
10764_ACEOF
10765if ac_fn_c_try_link "$LINENO"; then :
10766 gdbsrv_cv_have_sync_builtins=yes
10767else
c971b7fa 10768 gdbsrv_cv_have_sync_builtins=no
c9a1864a 10769fi
c971b7fa
PA
10770rm -f core conftest.err conftest.$ac_objext \
10771 conftest$ac_exeext conftest.$ac_ext
c9a1864a 10772fi
c971b7fa
PA
10773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
10774$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
0ad6b8ee 10775if test "$gdbsrv_cv_have_sync_builtins" = yes; then
c971b7fa
PA
10776
10777$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
10778
c9a1864a
YQ
10779fi
10780
c971b7fa
PA
10781saved_cflags="$CFLAGS"
10782CFLAGS="$CFLAGS -fvisibility=hidden"
10783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784/* end confdefs.h. */
c9a1864a 10785
c971b7fa
PA
10786int
10787main ()
10788{
c9a1864a 10789
c971b7fa
PA
10790 ;
10791 return 0;
10792}
c9a1864a 10793_ACEOF
c971b7fa
PA
10794if ac_fn_c_try_compile "$LINENO"; then :
10795 gdbsrv_cv_have_visibility_hidden=yes
10796else
10797 gdbsrv_cv_have_visibility_hidden=no
c9a1864a 10798fi
c971b7fa
PA
10799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10800CFLAGS="$saved_cflags"
10801
c971b7fa
PA
10802IPA_DEPFILES=""
10803extra_libraries=""
c2a66c29 10804
c971b7fa
PA
10805# check whether to enable the inprocess agent
10806if test "$ipa_obj" != "" \
10807 -a "$gdbsrv_cv_have_sync_builtins" = yes \
10808 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
10809 have_ipa=true
10810else
10811 have_ipa=false
10812fi
fa593d66 10813
c971b7fa
PA
10814# Check whether --enable-inprocess-agent was given.
10815if test "${enable_inprocess_agent+set}" = set; then :
10816 enableval=$enable_inprocess_agent; case "$enableval" in
10817 yes) want_ipa=true ;;
10818 no) want_ipa=false ;;
d0ac1c44 10819 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
c971b7fa
PA
10820esac
10821else
10822 want_ipa=$have_ipa
10823fi
c2a66c29 10824
c9a1864a 10825
c971b7fa
PA
10826if $want_ipa ; then
10827 if $have_ipa ; then
10828 IPA_DEPFILES="$ipa_obj"
10829 extra_libraries="$extra_libraries libinproctrace.so"
10830 else
d0ac1c44 10831 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
c971b7fa
PA
10832 fi
10833fi
c9a1864a 10834
c9a1864a 10835
c2a66c29
NS
10836
10837
fa593d66
PA
10838
10839
10840
0d62e5e8 10841
c971b7fa 10842GNULIB=build-gnulib-gdbserver/import
d6e9fb05 10843
c9a1864a
YQ
10844GNULIB_STDINT_H=
10845if test x"$STDINT_H" != x; then
c971b7fa 10846 GNULIB_STDINT_H=$GNULIB/$STDINT_H
c9a1864a 10847fi
d6e9fb05 10848
fb1e4ffc 10849
c971b7fa 10850ac_config_files="$ac_config_files Makefile"
81ecdfbb 10851
81ecdfbb 10852
bec39cab 10853cat >confcache <<\_ACEOF
d6e9fb05
JK
10854# This file is a shell script that caches the results of configure
10855# tests run on this system so they can be shared between configure
bec39cab
AC
10856# scripts and configure runs, see configure's option --config-cache.
10857# It is not useful on other systems. If it contains results you don't
10858# want to keep, you may remove or edit it.
d6e9fb05 10859#
bec39cab
AC
10860# config.status only pays attention to the cache file if you give it
10861# the --recheck option to rerun configure.
d6e9fb05 10862#
bec39cab
AC
10863# `ac_cv_env_foo' variables (set or unset) will be overridden when
10864# loading this file, other *unset* `ac_cv_foo' will be assigned the
10865# following values.
10866
10867_ACEOF
10868
d6e9fb05
JK
10869# The following way of writing the cache mishandles newlines in values,
10870# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 10871# So, we kill variables containing newlines.
d6e9fb05
JK
10872# Ultrix sh set writes to stderr and can't be redirected directly,
10873# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
10874(
10875 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10876 eval ac_val=\$$ac_var
10877 case $ac_val in #(
10878 *${as_nl}*)
10879 case $ac_var in #(
10880 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10881$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10882 esac
10883 case $ac_var in #(
10884 _ | IFS | as_nl) ;; #(
10885 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10886 *) { eval $ac_var=; unset $ac_var;} ;;
10887 esac ;;
10888 esac
10889 done
10890
bec39cab 10891 (set) 2>&1 |
81ecdfbb
RW
10892 case $as_nl`(ac_space=' '; set) 2>&1` in #(
10893 *${as_nl}ac_space=\ *)
10894 # `set' does not quote correctly, so add quotes: double-quote
10895 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
10896 sed -n \
10897 "s/'/'\\\\''/g;
10898 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 10899 ;; #(
bec39cab
AC
10900 *)
10901 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 10902 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 10903 ;;
81ecdfbb
RW
10904 esac |
10905 sort
10906) |
bec39cab 10907 sed '
81ecdfbb 10908 /^ac_cv_env_/b end
bec39cab 10909 t clear
81ecdfbb 10910 :clear
bec39cab
AC
10911 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10912 t end
81ecdfbb
RW
10913 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10914 :end' >>confcache
10915if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10916 if test -w "$cache_file"; then
d0ac1c44 10917 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
10918 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10919$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
10920 if test ! -f "$cache_file" || test -h "$cache_file"; then
10921 cat confcache >"$cache_file"
10922 else
10923 case $cache_file in #(
10924 */* | ?:*)
10925 mv -f confcache "$cache_file"$$ &&
10926 mv -f "$cache_file"$$ "$cache_file" ;; #(
10927 *)
10928 mv -f confcache "$cache_file" ;;
10929 esac
10930 fi
10931 fi
d6e9fb05 10932 else
81ecdfbb
RW
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10934$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
d6e9fb05
JK
10935 fi
10936fi
10937rm -f confcache
10938
d6e9fb05
JK
10939test "x$prefix" = xNONE && prefix=$ac_default_prefix
10940# Let make expand exec_prefix.
10941test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10942
84563040 10943DEFS=-DHAVE_CONFIG_H
d6e9fb05 10944
bec39cab
AC
10945ac_libobjs=
10946ac_ltlibobjs=
d0ac1c44 10947U=
bec39cab
AC
10948for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10949 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
10950 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10951 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10952 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10953 # will be set to the directory where LIBOBJS objects are built.
10954 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10955 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
10956done
10957LIBOBJS=$ac_libobjs
d6e9fb05 10958
bec39cab
AC
10959LTLIBOBJS=$ac_ltlibobjs
10960
10961
c9a1864a 10962if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 10963 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c9a1864a
YQ
10964Usually this means the macro was only invoked conditionally." "$LINENO" 5
10965fi
bec39cab 10966
d0ac1c44 10967: "${CONFIG_STATUS=./config.status}"
81ecdfbb 10968ac_write_fail=0
bec39cab
AC
10969ac_clean_files_save=$ac_clean_files
10970ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
10971{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10972$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10973as_write_fail=0
10974cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
10975#! $SHELL
10976# Generated by $as_me.
d6e9fb05 10977# Run this file to recreate the current configuration.
d6e9fb05 10978# Compiler output produced by configure, useful for debugging
bec39cab
AC
10979# configure, is in config.log if it exists.
10980
10981debug=false
10982ac_cs_recheck=false
10983ac_cs_silent=false
bec39cab 10984
81ecdfbb
RW
10985SHELL=\${CONFIG_SHELL-$SHELL}
10986export SHELL
10987_ASEOF
10988cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10989## -------------------- ##
10990## M4sh Initialization. ##
10991## -------------------- ##
10992
10993# Be more Bourne compatible
10994DUALCASE=1; export DUALCASE # for MKS sh
10995if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
10996 emulate sh
10997 NULLCMD=:
81ecdfbb 10998 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
10999 # is contrary to our usage. Disable this feature.
11000 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
11001 setopt NO_GLOB_SUBST
11002else
11003 case `(set -o) 2>/dev/null` in #(
11004 *posix*) :
11005 set -o posix ;; #(
11006 *) :
11007 ;;
11008esac
bec39cab 11009fi
d6e9fb05 11010
81ecdfbb
RW
11011
11012as_nl='
11013'
11014export as_nl
11015# Printing a long string crashes Solaris 7 /usr/bin/printf.
11016as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11017as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
11018as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
11019# Prefer a ksh shell builtin over an external printf program on Solaris,
11020# but without wasting forks for bash or zsh.
11021if test -z "$BASH_VERSION$ZSH_VERSION" \
11022 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
11023 as_echo='print -r --'
11024 as_echo_n='print -rn --'
11025elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
11026 as_echo='printf %s\n'
11027 as_echo_n='printf %s'
bec39cab 11028else
81ecdfbb
RW
11029 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
11030 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
11031 as_echo_n='/usr/ucb/echo -n'
11032 else
11033 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
11034 as_echo_n_body='eval
11035 arg=$1;
11036 case $arg in #(
11037 *"$as_nl"*)
11038 expr "X$arg" : "X\\(.*\\)$as_nl";
11039 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
11040 esac;
11041 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
11042 '
11043 export as_echo_n_body
11044 as_echo_n='sh -c $as_echo_n_body as_echo'
11045 fi
11046 export as_echo_body
11047 as_echo='sh -c $as_echo_body as_echo'
11048fi
11049
11050# The user is always right.
11051if test "${PATH_SEPARATOR+set}" != set; then
11052 PATH_SEPARATOR=:
11053 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11054 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11055 PATH_SEPARATOR=';'
11056 }
bec39cab
AC
11057fi
11058
11059
81ecdfbb
RW
11060# IFS
11061# We need space, tab and new line, in precisely that order. Quoting is
11062# there to prevent editors from complaining about space-tab.
11063# (If _AS_PATH_WALK were called with IFS unset, it would disable word
11064# splitting by setting IFS to empty value.)
11065IFS=" "" $as_nl"
11066
11067# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 11068as_myself=
81ecdfbb
RW
11069case $0 in #((
11070 *[\\/]* ) as_myself=$0 ;;
11071 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074 IFS=$as_save_IFS
11075 test -z "$as_dir" && as_dir=.
11076 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11077 done
11078IFS=$as_save_IFS
11079
11080 ;;
11081esac
11082# We did not find ourselves, most probably we were run as `sh COMMAND'
11083# in which case we are not to be found in the path.
11084if test "x$as_myself" = x; then
11085 as_myself=$0
11086fi
11087if test ! -f "$as_myself"; then
11088 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11089 exit 1
11090fi
11091
11092# Unset variables that we do not need and which cause bugs (e.g. in
11093# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
11094# suppresses any "Segmentation fault" message there. '((' could
11095# trigger a bug in pdksh 5.2.14.
11096for as_var in BASH_ENV ENV MAIL MAILPATH
11097do eval test x\${$as_var+set} = xset \
11098 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
11099done
bec39cab
AC
11100PS1='$ '
11101PS2='> '
11102PS4='+ '
11103
11104# NLS nuisances.
81ecdfbb
RW
11105LC_ALL=C
11106export LC_ALL
11107LANGUAGE=C
11108export LANGUAGE
11109
11110# CDPATH.
11111(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11112
11113
d0ac1c44
SM
11114# as_fn_error STATUS ERROR [LINENO LOG_FD]
11115# ----------------------------------------
81ecdfbb
RW
11116# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11117# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 11118# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
11119as_fn_error ()
11120{
d0ac1c44
SM
11121 as_status=$1; test $as_status -eq 0 && as_status=1
11122 if test "$4"; then
11123 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11124 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
bec39cab 11125 fi
d0ac1c44 11126 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
11127 as_fn_exit $as_status
11128} # as_fn_error
11129
11130
11131# as_fn_set_status STATUS
11132# -----------------------
11133# Set $? to STATUS, without forking.
11134as_fn_set_status ()
11135{
11136 return $1
11137} # as_fn_set_status
11138
11139# as_fn_exit STATUS
11140# -----------------
11141# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11142as_fn_exit ()
11143{
11144 set +e
11145 as_fn_set_status $1
11146 exit $1
11147} # as_fn_exit
11148
11149# as_fn_unset VAR
11150# ---------------
11151# Portably unset VAR.
11152as_fn_unset ()
11153{
11154 { eval $1=; unset $1;}
11155}
11156as_unset=as_fn_unset
11157# as_fn_append VAR VALUE
11158# ----------------------
11159# Append the text in VALUE to the end of the definition contained in VAR. Take
11160# advantage of any shell optimizations that allow amortized linear growth over
11161# repeated appends, instead of the typical quadratic growth present in naive
11162# implementations.
11163if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11164 eval 'as_fn_append ()
11165 {
11166 eval $1+=\$2
11167 }'
11168else
11169 as_fn_append ()
11170 {
11171 eval $1=\$$1\$2
11172 }
11173fi # as_fn_append
11174
11175# as_fn_arith ARG...
11176# ------------------
11177# Perform arithmetic evaluation on the ARGs, and store the result in the
11178# global $as_val. Take advantage of shells that can avoid forks. The arguments
11179# must be portable across $(()) and expr.
11180if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11181 eval 'as_fn_arith ()
11182 {
11183 as_val=$(( $* ))
11184 }'
11185else
11186 as_fn_arith ()
11187 {
11188 as_val=`expr "$@" || test $? -eq 1`
11189 }
11190fi # as_fn_arith
11191
d6e9fb05 11192
81ecdfbb
RW
11193if expr a : '\(a\)' >/dev/null 2>&1 &&
11194 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
11195 as_expr=expr
11196else
11197 as_expr=false
11198fi
d6e9fb05 11199
81ecdfbb 11200if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
11201 as_basename=basename
11202else
11203 as_basename=false
11204fi
d6e9fb05 11205
81ecdfbb
RW
11206if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11207 as_dirname=dirname
11208else
11209 as_dirname=false
11210fi
d6e9fb05 11211
81ecdfbb 11212as_me=`$as_basename -- "$0" ||
bec39cab
AC
11213$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11214 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
11215 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11216$as_echo X/"$0" |
11217 sed '/^.*\/\([^/][^/]*\)\/*$/{
11218 s//\1/
11219 q
11220 }
11221 /^X\/\(\/\/\)$/{
11222 s//\1/
11223 q
11224 }
11225 /^X\/\(\/\).*/{
11226 s//\1/
11227 q
11228 }
11229 s/.*/./; q'`
bec39cab 11230
dae5f5cf
DJ
11231# Avoid depending upon Character Ranges.
11232as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11233as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11234as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11235as_cr_digits='0123456789'
11236as_cr_alnum=$as_cr_Letters$as_cr_digits
11237
81ecdfbb
RW
11238ECHO_C= ECHO_N= ECHO_T=
11239case `echo -n x` in #(((((
11240-n*)
11241 case `echo 'xy\c'` in
11242 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11243 xy) ECHO_C='\c';;
11244 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11245 ECHO_T=' ';;
11246 esac;;
11247*)
11248 ECHO_N='-n';;
bec39cab
AC
11249esac
11250
81ecdfbb
RW
11251rm -f conf$$ conf$$.exe conf$$.file
11252if test -d conf$$.dir; then
11253 rm -f conf$$.dir/conf$$.file
bec39cab 11254else
81ecdfbb
RW
11255 rm -f conf$$.dir
11256 mkdir conf$$.dir 2>/dev/null
bec39cab 11257fi
81ecdfbb
RW
11258if (echo >conf$$.file) 2>/dev/null; then
11259 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 11260 as_ln_s='ln -s'
81ecdfbb
RW
11261 # ... but there are two gotchas:
11262 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11263 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 11264 # In both cases, we have to default to `cp -pR'.
81ecdfbb 11265 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 11266 as_ln_s='cp -pR'
81ecdfbb
RW
11267 elif ln conf$$.file conf$$ 2>/dev/null; then
11268 as_ln_s=ln
11269 else
d0ac1c44 11270 as_ln_s='cp -pR'
dae5f5cf 11271 fi
bec39cab 11272else
d0ac1c44 11273 as_ln_s='cp -pR'
bec39cab 11274fi
81ecdfbb
RW
11275rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11276rmdir conf$$.dir 2>/dev/null
11277
11278
11279# as_fn_mkdir_p
11280# -------------
11281# Create "$as_dir" as a directory, including parents if necessary.
11282as_fn_mkdir_p ()
11283{
11284
11285 case $as_dir in #(
11286 -*) as_dir=./$as_dir;;
11287 esac
11288 test -d "$as_dir" || eval $as_mkdir_p || {
11289 as_dirs=
11290 while :; do
11291 case $as_dir in #(
11292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11293 *) as_qdir=$as_dir;;
11294 esac
11295 as_dirs="'$as_qdir' $as_dirs"
11296 as_dir=`$as_dirname -- "$as_dir" ||
11297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11298 X"$as_dir" : 'X\(//\)[^/]' \| \
11299 X"$as_dir" : 'X\(//\)$' \| \
11300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11301$as_echo X"$as_dir" |
11302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11303 s//\1/
11304 q
11305 }
11306 /^X\(\/\/\)[^/].*/{
11307 s//\1/
11308 q
11309 }
11310 /^X\(\/\/\)$/{
11311 s//\1/
11312 q
11313 }
11314 /^X\(\/\).*/{
11315 s//\1/
11316 q
11317 }
11318 s/.*/./; q'`
11319 test -d "$as_dir" && break
11320 done
11321 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 11322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
bec39cab 11323
81ecdfbb
RW
11324
11325} # as_fn_mkdir_p
bec39cab 11326if mkdir -p . 2>/dev/null; then
81ecdfbb 11327 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
11328else
11329 test -d ./-p && rmdir ./-p
11330 as_mkdir_p=false
11331fi
11332
d0ac1c44
SM
11333
11334# as_fn_executable_p FILE
11335# -----------------------
11336# Test if FILE is an executable regular file.
11337as_fn_executable_p ()
11338{
11339 test -f "$1" && test -x "$1"
11340} # as_fn_executable_p
11341as_test_x='test -x'
11342as_executable_p=as_fn_executable_p
bec39cab
AC
11343
11344# Sed expression to map a string onto a valid CPP name.
11345as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11346
11347# Sed expression to map a string onto a valid variable name.
11348as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11349
11350
bec39cab 11351exec 6>&1
81ecdfbb
RW
11352## ----------------------------------- ##
11353## Main body of $CONFIG_STATUS script. ##
11354## ----------------------------------- ##
11355_ASEOF
11356test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11357
11358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11359# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 11360# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
11361# values after options handling.
11362ac_log="
bec39cab 11363This file was extended by $as_me, which was
d0ac1c44 11364generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
11365
11366 CONFIG_FILES = $CONFIG_FILES
11367 CONFIG_HEADERS = $CONFIG_HEADERS
11368 CONFIG_LINKS = $CONFIG_LINKS
11369 CONFIG_COMMANDS = $CONFIG_COMMANDS
11370 $ $0 $@
11371
81ecdfbb
RW
11372on `(hostname || uname -n) 2>/dev/null | sed 1q`
11373"
11374
bec39cab
AC
11375_ACEOF
11376
81ecdfbb
RW
11377case $ac_config_files in *"
11378"*) set x $ac_config_files; shift; ac_config_files=$*;;
11379esac
bec39cab 11380
81ecdfbb
RW
11381case $ac_config_headers in *"
11382"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11383esac
dae5f5cf 11384
dae5f5cf 11385
81ecdfbb
RW
11386cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11387# Files that config.status was made for.
11388config_files="$ac_config_files"
11389config_headers="$ac_config_headers"
11390config_commands="$ac_config_commands"
bec39cab 11391
81ecdfbb 11392_ACEOF
dae5f5cf 11393
81ecdfbb 11394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 11395ac_cs_usage="\
81ecdfbb
RW
11396\`$as_me' instantiates files and other configuration actions
11397from templates according to the current configuration. Unless the files
11398and actions are specified as TAGs, all are instantiated by default.
bec39cab 11399
81ecdfbb 11400Usage: $0 [OPTION]... [TAG]...
bec39cab
AC
11401
11402 -h, --help print this help, then exit
81ecdfbb 11403 -V, --version print version number and configuration settings, then exit
d0ac1c44 11404 --config print configuration, then exit
81ecdfbb
RW
11405 -q, --quiet, --silent
11406 do not print progress messages
bec39cab
AC
11407 -d, --debug don't remove temporary files
11408 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
11409 --file=FILE[:TEMPLATE]
11410 instantiate the configuration file FILE
11411 --header=FILE[:TEMPLATE]
11412 instantiate the configuration header FILE
bec39cab
AC
11413
11414Configuration files:
11415$config_files
11416
11417Configuration headers:
11418$config_headers
11419
11420Configuration commands:
11421$config_commands
11422
81ecdfbb 11423Report bugs to the package provider."
dae5f5cf 11424
81ecdfbb
RW
11425_ACEOF
11426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 11427ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
11428ac_cs_version="\\
11429config.status
d0ac1c44
SM
11430configured by $0, generated by GNU Autoconf 2.69,
11431 with options \\"\$ac_cs_config\\"
bec39cab 11432
d0ac1c44 11433Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
11434This config.status script is free software; the Free Software Foundation
11435gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
11436
11437ac_pwd='$ac_pwd'
11438srcdir='$srcdir'
11439INSTALL='$INSTALL'
11440test -n "\$AWK" || AWK=awk
bec39cab
AC
11441_ACEOF
11442
81ecdfbb
RW
11443cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11444# The default lists apply if the user does not specify any file.
bec39cab
AC
11445ac_need_defaults=:
11446while test $# != 0
11447do
11448 case $1 in
d0ac1c44 11449 --*=?*)
81ecdfbb
RW
11450 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11451 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab
AC
11452 ac_shift=:
11453 ;;
d0ac1c44
SM
11454 --*=)
11455 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11456 ac_optarg=
11457 ac_shift=:
11458 ;;
81ecdfbb 11459 *)
bec39cab
AC
11460 ac_option=$1
11461 ac_optarg=$2
11462 ac_shift=shift
11463 ;;
bec39cab
AC
11464 esac
11465
11466 case $ac_option in
11467 # Handling of the options.
bec39cab
AC
11468 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11469 ac_cs_recheck=: ;;
81ecdfbb
RW
11470 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11471 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
11472 --config | --confi | --conf | --con | --co | --c )
11473 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 11474 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
11475 debug=: ;;
11476 --file | --fil | --fi | --f )
11477 $ac_shift
81ecdfbb
RW
11478 case $ac_optarg in
11479 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 11480 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
11481 esac
11482 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
11483 ac_need_defaults=false;;
11484 --header | --heade | --head | --hea )
11485 $ac_shift
81ecdfbb
RW
11486 case $ac_optarg in
11487 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11488 esac
11489 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 11490 ac_need_defaults=false;;
81ecdfbb
RW
11491 --he | --h)
11492 # Conflict between --help and --header
d0ac1c44 11493 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
11494Try \`$0 --help' for more information.";;
11495 --help | --hel | -h )
11496 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
11497 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11498 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11499 ac_cs_silent=: ;;
11500
11501 # This is an error.
d0ac1c44 11502 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 11503Try \`$0 --help' for more information." ;;
bec39cab 11504
81ecdfbb
RW
11505 *) as_fn_append ac_config_targets " $1"
11506 ac_need_defaults=false ;;
bec39cab
AC
11507
11508 esac
11509 shift
d6e9fb05 11510done
bec39cab
AC
11511
11512ac_configure_extra_args=
11513
11514if $ac_cs_silent; then
11515 exec 6>/dev/null
11516 ac_configure_extra_args="$ac_configure_extra_args --silent"
d6e9fb05 11517fi
d6e9fb05 11518
bec39cab 11519_ACEOF
81ecdfbb 11520cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 11521if \$ac_cs_recheck; then
d0ac1c44 11522 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
11523 shift
11524 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11525 CONFIG_SHELL='$SHELL'
11526 export CONFIG_SHELL
11527 exec "\$@"
bec39cab 11528fi
d6e9fb05 11529
bec39cab 11530_ACEOF
81ecdfbb
RW
11531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11532exec 5>>config.log
11533{
11534 echo
11535 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11536## Running $as_me. ##
11537_ASBOX
11538 $as_echo "$ac_log"
11539} >&5
bec39cab 11540
81ecdfbb
RW
11541_ACEOF
11542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61c125b9
TT
11543#
11544# INIT-COMMANDS
11545#
11546ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
60d6cfc9 11547ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
61c125b9 11548
81ecdfbb 11549_ACEOF
bec39cab 11550
81ecdfbb 11551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80864fb 11552
81ecdfbb 11553# Handling of arguments.
bec39cab
AC
11554for ac_config_target in $ac_config_targets
11555do
81ecdfbb
RW
11556 case $ac_config_target in
11557 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
61c125b9 11558 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
60d6cfc9 11559 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
81ecdfbb 11560 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
81ecdfbb 11561
d0ac1c44 11562 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
d6e9fb05 11563 esac
bec39cab
AC
11564done
11565
81ecdfbb 11566
bec39cab
AC
11567# If the user did not use the arguments to specify the items to instantiate,
11568# then the envvar interface is used. Set only those that are not.
11569# We use the long form for the default assignment because of an extremely
11570# bizarre bug on SunOS 4.1.3.
11571if $ac_need_defaults; then
11572 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11573 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11574 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11575fi
d6e9fb05 11576
bec39cab 11577# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 11578# simply because there is no reason against having it here, and in addition,
bec39cab 11579# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
11580# Hook for its removal unless debugging.
11581# Note that there is a small window in which the directory will not be cleaned:
11582# after its creation but before its name has been assigned to `$tmp'.
bec39cab
AC
11583$debug ||
11584{
d0ac1c44 11585 tmp= ac_tmp=
81ecdfbb 11586 trap 'exit_status=$?
d0ac1c44
SM
11587 : "${ac_tmp:=$tmp}"
11588 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
11589' 0
11590 trap 'as_fn_exit 1' 1 2 13 15
bec39cab 11591}
bec39cab
AC
11592# Create a (secure) tmp directory for tmp files.
11593
11594{
81ecdfbb 11595 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 11596 test -d "$tmp"
bec39cab
AC
11597} ||
11598{
81ecdfbb
RW
11599 tmp=./conf$$-$RANDOM
11600 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
11601} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11602ac_tmp=$tmp
81ecdfbb
RW
11603
11604# Set up the scripts for CONFIG_FILES section.
11605# No need to generate them if there are no CONFIG_FILES.
11606# This happens for instance with `./config.status config.h'.
11607if test -n "$CONFIG_FILES"; then
11608
11609
11610ac_cr=`echo X | tr X '\015'`
11611# On cygwin, bash can eat \r inside `` if the user requested igncr.
11612# But we know of no other shell where ac_cr would be empty at this
11613# point, so we can use a bashism as a fallback.
11614if test "x$ac_cr" = x; then
11615 eval ac_cr=\$\'\\r\'
11616fi
11617ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11618if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 11619 ac_cs_awk_cr='\\r'
81ecdfbb
RW
11620else
11621 ac_cs_awk_cr=$ac_cr
11622fi
11623
d0ac1c44 11624echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
11625_ACEOF
11626
11627
11628{
11629 echo "cat >conf$$subs.awk <<_ACEOF" &&
11630 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11631 echo "_ACEOF"
11632} >conf$$subs.sh ||
d0ac1c44
SM
11633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11634ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
11635ac_delim='%!_!# '
11636for ac_last_try in false false false false false :; do
11637 . ./conf$$subs.sh ||
d0ac1c44 11638 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
11639
11640 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11641 if test $ac_delim_n = $ac_delim_num; then
11642 break
11643 elif $ac_last_try; then
d0ac1c44 11644 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
11645 else
11646 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11647 fi
11648done
11649rm -f conf$$subs.sh
11650
11651cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 11652cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
11653_ACEOF
11654sed -n '
11655h
11656s/^/S["/; s/!.*/"]=/
11657p
11658g
11659s/^[^!]*!//
11660:repl
11661t repl
11662s/'"$ac_delim"'$//
11663t delim
11664:nl
11665h
d0ac1c44 11666s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
11667t more1
11668s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11669p
11670n
11671b repl
11672:more1
11673s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11674p
11675g
11676s/.\{148\}//
11677t nl
11678:delim
11679h
d0ac1c44 11680s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
11681t more2
11682s/["\\]/\\&/g; s/^/"/; s/$/"/
11683p
11684b
11685:more2
11686s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11687p
11688g
11689s/.\{148\}//
11690t delim
11691' <conf$$subs.awk | sed '
11692/^[^""]/{
11693 N
11694 s/\n//
11695}
11696' >>$CONFIG_STATUS || ac_write_fail=1
11697rm -f conf$$subs.awk
11698cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11699_ACAWK
d0ac1c44 11700cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
11701 for (key in S) S_is_set[key] = 1
11702 FS = "\a"
11703
11704}
bec39cab 11705{
81ecdfbb
RW
11706 line = $ 0
11707 nfields = split(line, field, "@")
11708 substed = 0
11709 len = length(field[1])
11710 for (i = 2; i < nfields; i++) {
11711 key = field[i]
11712 keylen = length(key)
11713 if (S_is_set[key]) {
11714 value = S[key]
11715 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11716 len += length(value) + length(field[++i])
11717 substed = 1
11718 } else
11719 len += 1 + keylen
11720 }
11721
11722 print line
bec39cab
AC
11723}
11724
81ecdfbb
RW
11725_ACAWK
11726_ACEOF
11727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11728if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11729 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11730else
11731 cat
d0ac1c44
SM
11732fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11733 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
dae5f5cf
DJ
11734_ACEOF
11735
d0ac1c44
SM
11736# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11737# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
11738# trailing colons and then remove the whole line if VPATH becomes empty
11739# (actually we leave an empty line to preserve line numbers).
11740if test "x$srcdir" = x.; then
d0ac1c44
SM
11741 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11742h
11743s///
11744s/^/:/
11745s/[ ]*$/:/
11746s/:\$(srcdir):/:/g
11747s/:\${srcdir}:/:/g
11748s/:@srcdir@:/:/g
11749s/^:*//
81ecdfbb 11750s/:*$//
d0ac1c44
SM
11751x
11752s/\(=[ ]*\).*/\1/
11753G
11754s/\n//
81ecdfbb
RW
11755s/^[^=]*=[ ]*$//
11756}'
11757fi
bec39cab 11758
81ecdfbb
RW
11759cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11760fi # test -n "$CONFIG_FILES"
bec39cab 11761
81ecdfbb
RW
11762# Set up the scripts for CONFIG_HEADERS section.
11763# No need to generate them if there are no CONFIG_HEADERS.
11764# This happens for instance with `./config.status Makefile'.
11765if test -n "$CONFIG_HEADERS"; then
d0ac1c44 11766cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb 11767BEGIN {
b80864fb
DJ
11768_ACEOF
11769
81ecdfbb
RW
11770# Transform confdefs.h into an awk script `defines.awk', embedded as
11771# here-document in config.status, that substitutes the proper values into
11772# config.h.in to produce config.h.
11773
11774# Create a delimiter string that does not exist in confdefs.h, to ease
11775# handling of long lines.
11776ac_delim='%!_!# '
11777for ac_last_try in false false :; do
d0ac1c44
SM
11778 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11779 if test -z "$ac_tt"; then
81ecdfbb
RW
11780 break
11781 elif $ac_last_try; then
d0ac1c44 11782 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
11783 else
11784 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
d6e9fb05 11785 fi
81ecdfbb 11786done
d6e9fb05 11787
81ecdfbb
RW
11788# For the awk script, D is an array of macro values keyed by name,
11789# likewise P contains macro parameters if any. Preserve backslash
11790# newline sequences.
11791
11792ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11793sed -n '
11794s/.\{148\}/&'"$ac_delim"'/g
11795t rset
11796:rset
11797s/^[ ]*#[ ]*define[ ][ ]*/ /
11798t def
11799d
11800:def
11801s/\\$//
11802t bsnl
11803s/["\\]/\\&/g
11804s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11805D["\1"]=" \3"/p
11806s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11807d
11808:bsnl
11809s/["\\]/\\&/g
11810s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11811D["\1"]=" \3\\\\\\n"\\/p
11812t cont
11813s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11814t cont
11815d
11816:cont
11817n
11818s/.\{148\}/&'"$ac_delim"'/g
11819t clear
11820:clear
11821s/\\$//
11822t bsnlc
11823s/["\\]/\\&/g; s/^/"/; s/$/"/p
11824d
11825:bsnlc
11826s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11827b cont
11828' <confdefs.h | sed '
11829s/'"$ac_delim"'/"\\\
11830"/g' >>$CONFIG_STATUS || ac_write_fail=1
11831
11832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11833 for (key in D) D_is_set[key] = 1
11834 FS = "\a"
11835}
11836/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11837 line = \$ 0
11838 split(line, arg, " ")
11839 if (arg[1] == "#") {
11840 defundef = arg[2]
11841 mac1 = arg[3]
11842 } else {
11843 defundef = substr(arg[1], 2)
11844 mac1 = arg[2]
11845 }
11846 split(mac1, mac2, "(") #)
11847 macro = mac2[1]
11848 prefix = substr(line, 1, index(line, defundef) - 1)
11849 if (D_is_set[macro]) {
11850 # Preserve the white space surrounding the "#".
11851 print prefix "define", macro P[macro] D[macro]
11852 next
11853 } else {
11854 # Replace #undef with comments. This is necessary, for example,
11855 # in the case of _POSIX_SOURCE, which is predefined and required
11856 # on some systems where configure will not decide to define it.
11857 if (defundef == "undef") {
11858 print "/*", prefix defundef, macro, "*/"
11859 next
11860 }
11861 }
11862}
11863{ print }
11864_ACAWK
bec39cab 11865_ACEOF
81ecdfbb 11866cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 11867 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb
RW
11868fi # test -n "$CONFIG_HEADERS"
11869
11870
11871eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
11872shift
11873for ac_tag
11874do
11875 case $ac_tag in
11876 :[FHLC]) ac_mode=$ac_tag; continue;;
11877 esac
11878 case $ac_mode$ac_tag in
11879 :[FHL]*:*);;
d0ac1c44 11880 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
11881 :[FH]-) ac_tag=-:-;;
11882 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11883 esac
11884 ac_save_IFS=$IFS
11885 IFS=:
11886 set x $ac_tag
11887 IFS=$ac_save_IFS
11888 shift
11889 ac_file=$1
11890 shift
11891
11892 case $ac_mode in
11893 :L) ac_source=$1;;
11894 :[FH])
11895 ac_file_inputs=
11896 for ac_f
11897 do
11898 case $ac_f in
d0ac1c44 11899 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
11900 *) # Look for the file first in the build tree, then in the source tree
11901 # (if the path is not absolute). The absolute path cannot be DOS-style,
11902 # because $ac_f cannot contain `:'.
11903 test -f "$ac_f" ||
11904 case $ac_f in
11905 [\\/$]*) false;;
11906 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11907 esac ||
d0ac1c44 11908 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
11909 esac
11910 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11911 as_fn_append ac_file_inputs " '$ac_f'"
11912 done
11913
11914 # Let's still pretend it is `configure' which instantiates (i.e., don't
11915 # use $as_me), people would be surprised to read:
11916 # /* config.h. Generated by config.status. */
11917 configure_input='Generated from '`
11918 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11919 `' by configure.'
11920 if test x"$ac_file" != x-; then
11921 configure_input="$ac_file. $configure_input"
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11923$as_echo "$as_me: creating $ac_file" >&6;}
11924 fi
11925 # Neutralize special characters interpreted by sed in replacement strings.
11926 case $configure_input in #(
11927 *\&* | *\|* | *\\* )
11928 ac_sed_conf_input=`$as_echo "$configure_input" |
11929 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11930 *) ac_sed_conf_input=$configure_input;;
11931 esac
11932
11933 case $ac_tag in
d0ac1c44
SM
11934 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11935 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
11936 esac
11937 ;;
d6e9fb05
JK
11938 esac
11939
81ecdfbb 11940 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
11941$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11942 X"$ac_file" : 'X\(//\)[^/]' \| \
11943 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
11944 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11945$as_echo X"$ac_file" |
11946 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11947 s//\1/
11948 q
11949 }
11950 /^X\(\/\/\)[^/].*/{
11951 s//\1/
11952 q
11953 }
11954 /^X\(\/\/\)$/{
11955 s//\1/
11956 q
11957 }
11958 /^X\(\/\).*/{
11959 s//\1/
11960 q
11961 }
11962 s/.*/./; q'`
11963 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
11964 ac_builddir=.
11965
81ecdfbb
RW
11966case "$ac_dir" in
11967.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11968*)
11969 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11970 # A ".." for each directory in $ac_dir_suffix.
11971 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11972 case $ac_top_builddir_sub in
11973 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11974 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11975 esac ;;
11976esac
11977ac_abs_top_builddir=$ac_pwd
11978ac_abs_builddir=$ac_pwd$ac_dir_suffix
11979# for backward compatibility:
11980ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
11981
11982case $srcdir in
81ecdfbb 11983 .) # We are building in place.
bec39cab 11984 ac_srcdir=.
81ecdfbb
RW
11985 ac_top_srcdir=$ac_top_builddir_sub
11986 ac_abs_top_srcdir=$ac_pwd ;;
11987 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 11988 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
11989 ac_top_srcdir=$srcdir
11990 ac_abs_top_srcdir=$srcdir ;;
11991 *) # Relative name.
11992 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11993 ac_top_srcdir=$ac_top_build_prefix$srcdir
11994 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 11995esac
81ecdfbb 11996ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 11997
bec39cab 11998
81ecdfbb
RW
11999 case $ac_mode in
12000 :F)
12001 #
12002 # CONFIG_FILE
12003 #
d6e9fb05 12004
bec39cab
AC
12005 case $INSTALL in
12006 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 12007 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
d6e9fb05 12008 esac
81ecdfbb 12009_ACEOF
3db0444b 12010
81ecdfbb
RW
12011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12012# If the template does not know about datarootdir, expand it.
12013# FIXME: This hack should be removed a few years after 2.60.
12014ac_datarootdir_hack=; ac_datarootdir_seen=
12015ac_sed_dataroot='
12016/datarootdir/ {
12017 p
12018 q
12019}
12020/@datadir@/p
12021/@docdir@/p
12022/@infodir@/p
12023/@localedir@/p
12024/@mandir@/p'
12025case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12026*datarootdir*) ac_datarootdir_seen=yes;;
12027*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12029$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12030_ACEOF
12031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12032 ac_datarootdir_hack='
12033 s&@datadir@&$datadir&g
12034 s&@docdir@&$docdir&g
12035 s&@infodir@&$infodir&g
12036 s&@localedir@&$localedir&g
12037 s&@mandir@&$mandir&g
12038 s&\\\${datarootdir}&$datarootdir&g' ;;
12039esac
bec39cab 12040_ACEOF
81ecdfbb
RW
12041
12042# Neutralize VPATH when `$srcdir' = `.'.
12043# Shell code in configure.ac might set extrasub.
12044# FIXME: do we really want to maintain this feature?
12045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12046ac_sed_extra="$ac_vpsub
bec39cab
AC
12047$extrasub
12048_ACEOF
81ecdfbb 12049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
12050:t
12051/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
12052s|@configure_input@|$ac_sed_conf_input|;t t
12053s&@top_builddir@&$ac_top_builddir_sub&;t t
12054s&@top_build_prefix@&$ac_top_build_prefix&;t t
12055s&@srcdir@&$ac_srcdir&;t t
12056s&@abs_srcdir@&$ac_abs_srcdir&;t t
12057s&@top_srcdir@&$ac_top_srcdir&;t t
12058s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12059s&@builddir@&$ac_builddir&;t t
12060s&@abs_builddir@&$ac_abs_builddir&;t t
12061s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12062s&@INSTALL@&$ac_INSTALL&;t t
12063$ac_datarootdir_hack
12064"
d0ac1c44
SM
12065eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
12066 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
12067
12068test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
12069 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
12070 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
12071 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 12072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 12073which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 12074$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 12075which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 12076
d0ac1c44 12077 rm -f "$ac_tmp/stdin"
bec39cab 12078 case $ac_file in
d0ac1c44
SM
12079 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
12080 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 12081 esac \
d0ac1c44 12082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
12083 ;;
12084 :H)
12085 #
12086 # CONFIG_HEADER
12087 #
bec39cab 12088 if test x"$ac_file" != x-; then
81ecdfbb
RW
12089 {
12090 $as_echo "/* $configure_input */" \
d0ac1c44
SM
12091 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
12092 } >"$ac_tmp/config.h" \
12093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12094 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
12096$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 12097 else
81ecdfbb 12098 rm -f "$ac_file"
d0ac1c44
SM
12099 mv "$ac_tmp/config.h" "$ac_file" \
12100 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
84563040 12101 fi
bec39cab 12102 else
81ecdfbb 12103 $as_echo "/* $configure_input */" \
d0ac1c44
SM
12104 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
12105 || as_fn_error $? "could not create -" "$LINENO" 5
d6e9fb05 12106 fi
81ecdfbb 12107 ;;
dae5f5cf 12108
81ecdfbb
RW
12109 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12110$as_echo "$as_me: executing $ac_file commands" >&6;}
12111 ;;
12112 esac
dae5f5cf
DJ
12113
12114
81ecdfbb 12115 case $ac_file$ac_mode in
c5adaa19 12116 "config.h":H) echo > stamp-h ;;
61c125b9 12117 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
60d6cfc9
YQ
12118 "gdbdepdir":C)
12119 for subdir in ${CONFIG_SRC_SUBDIR}
12120 do
12121 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
12122 done ;;
81ecdfbb 12123
bec39cab 12124 esac
81ecdfbb 12125done # for ac_tag
d6e9fb05 12126
bec39cab 12127
81ecdfbb 12128as_fn_exit 0
bec39cab 12129_ACEOF
bec39cab
AC
12130ac_clean_files=$ac_clean_files_save
12131
81ecdfbb 12132test $ac_write_fail = 0 ||
d0ac1c44 12133 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 12134
bec39cab
AC
12135
12136# configure is writing to config.log, and then calls config.status.
12137# config.status does its own redirection, appending to config.log.
12138# Unfortunately, on DOS this fails, as config.log is still kept open
12139# by configure, so config.status won't be able to write to it; its
12140# output is simply discarded. So we exec the FD to /dev/null,
12141# effectively closing config.log, so it can be properly (re)opened and
12142# appended to by config.status. When coming back to configure, we
12143# need to make the FD available again.
12144if test "$no_create" != yes; then
12145 ac_cs_success=:
12146 ac_config_status_args=
12147 test "$silent" = yes &&
12148 ac_config_status_args="$ac_config_status_args --quiet"
12149 exec 5>/dev/null
12150 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12151 exec 5>>config.log
12152 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12153 # would make configure fail if this is the last instruction.
d0ac1c44 12154 $ac_cs_success || as_fn_exit 1
81ecdfbb
RW
12155fi
12156if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12158$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
bec39cab 12159fi
d6e9fb05 12160
This page took 2.907735 seconds and 4 git commands to generate.