Fix build on rhES5
[deliverable/binutils-gdb.git] / gdbserver / configure
CommitLineData
d6e9fb05 1#! /bin/sh
d6e9fb05 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
d6e9fb05
JK
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
bec39cab 50else
81ecdfbb
RW
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
bec39cab 418
81ecdfbb
RW
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
dae5f5cf
DJ
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
b80864fb 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
dae5f5cf 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
d6e9fb05 546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
bec39cab
AC
559
560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
d6e9fb05 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
dae5f5cf 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab 584
feacfcac 585ac_unique_file="server.cc"
bec39cab
AC
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
05ea2a05 622ac_header_list=
c971b7fa 623ac_subst_vars='LTLIBOBJS
698b3e08 624LIBOBJS
c9a1864a 625GNULIB_STDINT_H
fa593d66
PA
626extra_libraries
627IPA_DEPFILES
81ecdfbb
RW
628srv_xmlfiles
629srv_xmlbuiltin
81ecdfbb
RW
630GDBSERVER_LIBS
631GDBSERVER_DEPFILES
632RDYNAMIC
633REPORT_BUGS_TEXI
634REPORT_BUGS_TO
635PKGVERSION
d4596a3d
PA
636WERROR_CFLAGS
637WARN_CFLAGS
0fb4aa4b
PA
638ustinc
639ustlibs
db6878ac
SM
640CCDEPMODE
641CONFIG_SRC_SUBDIR
9a665d62
TT
642CATOBJEXT
643GENCAT
644INSTOBJEXT
645DATADIRNAME
646CATALOGS
647POSUB
648GMSGFMT
649XGETTEXT
650INCINTL
651LIBINTL_DEP
652LIBINTL
653USE_NLS
db6878ac
SM
654DEPDIR
655am__leading_dot
656host_noncanonical
657target_noncanonical
4635ff97 658WIN32APILIBS
05ea2a05
TT
659LTLIBIPT
660LIBIPT
661HAVE_LIBIPT
5e030278
TT
662PTHREAD_CFLAGS
663PTHREAD_LIBS
664PTHREAD_CC
665ax_pthread_config
666SED
9c232dda 667ALLOCA
0bcda685
PA
668CXX_DIALECT
669HAVE_CXX11
c971b7fa 670RANLIB
e1d2394b 671AR
81ecdfbb
RW
672INSTALL_DATA
673INSTALL_SCRIPT
674INSTALL_PROGRAM
675target_os
676target_vendor
677target_cpu
678target
679host_os
680host_vendor
681host_cpu
682host
683build_os
684build_vendor
685build_cpu
686build
bdaed379
HD
687INSTALL_STRIP_PROGRAM
688STRIP
689install_sh
770d76d7
PA
690EGREP
691GREP
692CPP
3bc3d82a
PA
693ac_ct_CXX
694CXXFLAGS
695CXX
81ecdfbb
RW
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
c9a1864a
YQ
703MAINT
704MAINTAINER_MODE_FALSE
705MAINTAINER_MODE_TRUE
81ecdfbb
RW
706target_alias
707host_alias
708build_alias
709LIBS
710ECHO_T
711ECHO_N
712ECHO_C
713DEFS
714mandir
715localedir
716libdir
717psdir
718pdfdir
719dvidir
720htmldir
721infodir
722docdir
723oldincludedir
724includedir
725localstatedir
726sharedstatedir
727sysconfdir
728datadir
729datarootdir
730libexecdir
731sbindir
732bindir
733program_transform_name
734prefix
735exec_prefix
736PACKAGE_URL
737PACKAGE_BUGREPORT
738PACKAGE_STRING
739PACKAGE_VERSION
740PACKAGE_TARNAME
741PACKAGE_NAME
742PATH_SEPARATOR
743SHELL'
bec39cab 744ac_subst_files=''
81ecdfbb
RW
745ac_user_opts='
746enable_option_checking
c9a1864a 747enable_maintainer_mode
589bc927 748enable_largefile
05ea2a05
TT
749with_intel_pt
750with_gnu_ld
751enable_rpath
752with_libipt_prefix
9f1528a1 753with_libipt_type
db6878ac 754enable_unit_tests
0fb4aa4b
PA
755with_ust
756with_ust_include
757with_ust_lib
d4596a3d 758enable_werror
8f13a3ce
MF
759enable_build_warnings
760enable_gdb_build_warnings
81ecdfbb
RW
761with_pkgversion
762with_bugurl
96f15937 763with_libthread_db
c2a66c29 764enable_inprocess_agent
81ecdfbb
RW
765'
766 ac_precious_vars='build_alias
767host_alias
768target_alias
769CC
770CFLAGS
771LDFLAGS
772LIBS
773CPPFLAGS
3bc3d82a
PA
774CXX
775CXXFLAGS
776CCC
81ecdfbb
RW
777CPP'
778
d6e9fb05
JK
779
780# Initialize some variables set by options.
bec39cab
AC
781ac_init_help=
782ac_init_version=false
81ecdfbb
RW
783ac_unrecognized_opts=
784ac_unrecognized_sep=
d6e9fb05
JK
785# The variables have the same names as the options, with
786# dashes changed to underlines.
bec39cab 787cache_file=/dev/null
d6e9fb05 788exec_prefix=NONE
d6e9fb05 789no_create=
d6e9fb05
JK
790no_recursion=
791prefix=NONE
792program_prefix=NONE
793program_suffix=NONE
794program_transform_name=s,x,x,
795silent=
796site=
797srcdir=
d6e9fb05
JK
798verbose=
799x_includes=NONE
800x_libraries=NONE
bec39cab
AC
801
802# Installation directory options.
803# These are left unexpanded so users can "make install exec_prefix=/foo"
804# and all the variables that are supposed to be based on exec_prefix
805# by default will actually change.
806# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 807# (The list follows the same order as the GNU Coding Standards.)
d6e9fb05
JK
808bindir='${exec_prefix}/bin'
809sbindir='${exec_prefix}/sbin'
810libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
811datarootdir='${prefix}/share'
812datadir='${datarootdir}'
d6e9fb05
JK
813sysconfdir='${prefix}/etc'
814sharedstatedir='${prefix}/com'
815localstatedir='${prefix}/var'
d6e9fb05
JK
816includedir='${prefix}/include'
817oldincludedir='/usr/include'
81ecdfbb
RW
818docdir='${datarootdir}/doc/${PACKAGE}'
819infodir='${datarootdir}/info'
820htmldir='${docdir}'
821dvidir='${docdir}'
822pdfdir='${docdir}'
823psdir='${docdir}'
824libdir='${exec_prefix}/lib'
825localedir='${datarootdir}/locale'
826mandir='${datarootdir}/man'
d6e9fb05 827
d6e9fb05 828ac_prev=
81ecdfbb 829ac_dashdash=
d6e9fb05
JK
830for ac_option
831do
d6e9fb05
JK
832 # If the previous option needs an argument, assign it.
833 if test -n "$ac_prev"; then
81ecdfbb 834 eval $ac_prev=\$ac_option
d6e9fb05
JK
835 ac_prev=
836 continue
837 fi
838
81ecdfbb 839 case $ac_option in
d0ac1c44
SM
840 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
841 *=) ac_optarg= ;;
842 *) ac_optarg=yes ;;
81ecdfbb 843 esac
d6e9fb05
JK
844
845 # Accept the important Cygnus configure options, so we can diagnose typos.
846
81ecdfbb
RW
847 case $ac_dashdash$ac_option in
848 --)
849 ac_dashdash=yes ;;
d6e9fb05
JK
850
851 -bindir | --bindir | --bindi | --bind | --bin | --bi)
852 ac_prev=bindir ;;
853 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 854 bindir=$ac_optarg ;;
d6e9fb05
JK
855
856 -build | --build | --buil | --bui | --bu)
bec39cab 857 ac_prev=build_alias ;;
d6e9fb05 858 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 859 build_alias=$ac_optarg ;;
d6e9fb05
JK
860
861 -cache-file | --cache-file | --cache-fil | --cache-fi \
862 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
863 ac_prev=cache_file ;;
864 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
865 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
866 cache_file=$ac_optarg ;;
867
868 --config-cache | -C)
869 cache_file=config.cache ;;
d6e9fb05 870
81ecdfbb 871 -datadir | --datadir | --datadi | --datad)
d6e9fb05 872 ac_prev=datadir ;;
81ecdfbb 873 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 874 datadir=$ac_optarg ;;
d6e9fb05 875
81ecdfbb
RW
876 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
877 | --dataroo | --dataro | --datar)
878 ac_prev=datarootdir ;;
879 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
880 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
881 datarootdir=$ac_optarg ;;
882
d6e9fb05 883 -disable-* | --disable-*)
81ecdfbb 884 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
d6e9fb05 885 # Reject names that are not valid shell variable names.
81ecdfbb 886 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 887 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
888 ac_useropt_orig=$ac_useropt
889 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
890 case $ac_user_opts in
891 *"
892"enable_$ac_useropt"
893"*) ;;
894 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
895 ac_unrecognized_sep=', ';;
896 esac
897 eval enable_$ac_useropt=no ;;
898
899 -docdir | --docdir | --docdi | --doc | --do)
900 ac_prev=docdir ;;
901 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
902 docdir=$ac_optarg ;;
903
904 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
905 ac_prev=dvidir ;;
906 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
907 dvidir=$ac_optarg ;;
d6e9fb05
JK
908
909 -enable-* | --enable-*)
81ecdfbb 910 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
d6e9fb05 911 # Reject names that are not valid shell variable names.
81ecdfbb 912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 913 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
914 ac_useropt_orig=$ac_useropt
915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
916 case $ac_user_opts in
917 *"
918"enable_$ac_useropt"
919"*) ;;
920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
921 ac_unrecognized_sep=', ';;
dae5f5cf 922 esac
81ecdfbb 923 eval enable_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
924
925 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
926 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
927 | --exec | --exe | --ex)
928 ac_prev=exec_prefix ;;
929 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
930 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
931 | --exec=* | --exe=* | --ex=*)
bec39cab 932 exec_prefix=$ac_optarg ;;
d6e9fb05
JK
933
934 -gas | --gas | --ga | --g)
935 # Obsolete; use --with-gas.
936 with_gas=yes ;;
937
bec39cab
AC
938 -help | --help | --hel | --he | -h)
939 ac_init_help=long ;;
940 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
941 ac_init_help=recursive ;;
942 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
943 ac_init_help=short ;;
d6e9fb05
JK
944
945 -host | --host | --hos | --ho)
bec39cab 946 ac_prev=host_alias ;;
d6e9fb05 947 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 948 host_alias=$ac_optarg ;;
d6e9fb05 949
81ecdfbb
RW
950 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
951 ac_prev=htmldir ;;
952 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
953 | --ht=*)
954 htmldir=$ac_optarg ;;
955
d6e9fb05
JK
956 -includedir | --includedir | --includedi | --included | --include \
957 | --includ | --inclu | --incl | --inc)
958 ac_prev=includedir ;;
959 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
960 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 961 includedir=$ac_optarg ;;
d6e9fb05
JK
962
963 -infodir | --infodir | --infodi | --infod | --info | --inf)
964 ac_prev=infodir ;;
965 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 966 infodir=$ac_optarg ;;
d6e9fb05
JK
967
968 -libdir | --libdir | --libdi | --libd)
969 ac_prev=libdir ;;
970 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 971 libdir=$ac_optarg ;;
d6e9fb05
JK
972
973 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
974 | --libexe | --libex | --libe)
975 ac_prev=libexecdir ;;
976 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
977 | --libexe=* | --libex=* | --libe=*)
bec39cab 978 libexecdir=$ac_optarg ;;
d6e9fb05 979
81ecdfbb
RW
980 -localedir | --localedir | --localedi | --localed | --locale)
981 ac_prev=localedir ;;
982 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
983 localedir=$ac_optarg ;;
984
d6e9fb05 985 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 986 | --localstate | --localstat | --localsta | --localst | --locals)
d6e9fb05
JK
987 ac_prev=localstatedir ;;
988 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 989 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 990 localstatedir=$ac_optarg ;;
d6e9fb05
JK
991
992 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
993 ac_prev=mandir ;;
994 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 995 mandir=$ac_optarg ;;
d6e9fb05
JK
996
997 -nfp | --nfp | --nf)
998 # Obsolete; use --without-fp.
999 with_fp=no ;;
1000
1001 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1002 | --no-cr | --no-c | -n)
d6e9fb05
JK
1003 no_create=yes ;;
1004
1005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 no_recursion=yes ;;
1008
1009 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1010 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1011 | --oldin | --oldi | --old | --ol | --o)
1012 ac_prev=oldincludedir ;;
1013 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1014 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1015 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1016 oldincludedir=$ac_optarg ;;
d6e9fb05
JK
1017
1018 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1019 ac_prev=prefix ;;
1020 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1021 prefix=$ac_optarg ;;
d6e9fb05
JK
1022
1023 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1024 | --program-pre | --program-pr | --program-p)
1025 ac_prev=program_prefix ;;
1026 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1027 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1028 program_prefix=$ac_optarg ;;
d6e9fb05
JK
1029
1030 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1031 | --program-suf | --program-su | --program-s)
1032 ac_prev=program_suffix ;;
1033 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1034 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1035 program_suffix=$ac_optarg ;;
d6e9fb05
JK
1036
1037 -program-transform-name | --program-transform-name \
1038 | --program-transform-nam | --program-transform-na \
1039 | --program-transform-n | --program-transform- \
1040 | --program-transform | --program-transfor \
1041 | --program-transfo | --program-transf \
1042 | --program-trans | --program-tran \
1043 | --progr-tra | --program-tr | --program-t)
1044 ac_prev=program_transform_name ;;
1045 -program-transform-name=* | --program-transform-name=* \
1046 | --program-transform-nam=* | --program-transform-na=* \
1047 | --program-transform-n=* | --program-transform-=* \
1048 | --program-transform=* | --program-transfor=* \
1049 | --program-transfo=* | --program-transf=* \
1050 | --program-trans=* | --program-tran=* \
1051 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1052 program_transform_name=$ac_optarg ;;
d6e9fb05 1053
81ecdfbb
RW
1054 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1055 ac_prev=pdfdir ;;
1056 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1057 pdfdir=$ac_optarg ;;
1058
1059 -psdir | --psdir | --psdi | --psd | --ps)
1060 ac_prev=psdir ;;
1061 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1062 psdir=$ac_optarg ;;
1063
d6e9fb05
JK
1064 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1065 | -silent | --silent | --silen | --sile | --sil)
1066 silent=yes ;;
1067
1068 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1069 ac_prev=sbindir ;;
1070 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1071 | --sbi=* | --sb=*)
bec39cab 1072 sbindir=$ac_optarg ;;
d6e9fb05
JK
1073
1074 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1075 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1076 | --sharedst | --shareds | --shared | --share | --shar \
1077 | --sha | --sh)
1078 ac_prev=sharedstatedir ;;
1079 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1080 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1081 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1082 | --sha=* | --sh=*)
bec39cab 1083 sharedstatedir=$ac_optarg ;;
d6e9fb05
JK
1084
1085 -site | --site | --sit)
1086 ac_prev=site ;;
1087 -site=* | --site=* | --sit=*)
bec39cab 1088 site=$ac_optarg ;;
434c4c77 1089
d6e9fb05
JK
1090 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1091 ac_prev=srcdir ;;
1092 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1093 srcdir=$ac_optarg ;;
d6e9fb05
JK
1094
1095 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1096 | --syscon | --sysco | --sysc | --sys | --sy)
1097 ac_prev=sysconfdir ;;
1098 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1099 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1100 sysconfdir=$ac_optarg ;;
d6e9fb05
JK
1101
1102 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1103 ac_prev=target_alias ;;
d6e9fb05 1104 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1105 target_alias=$ac_optarg ;;
d6e9fb05
JK
1106
1107 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1108 verbose=yes ;;
1109
bec39cab
AC
1110 -version | --version | --versio | --versi | --vers | -V)
1111 ac_init_version=: ;;
d6e9fb05
JK
1112
1113 -with-* | --with-*)
81ecdfbb 1114 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
d6e9fb05 1115 # Reject names that are not valid shell variable names.
81ecdfbb 1116 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1117 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1118 ac_useropt_orig=$ac_useropt
1119 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1120 case $ac_user_opts in
1121 *"
1122"with_$ac_useropt"
1123"*) ;;
1124 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1125 ac_unrecognized_sep=', ';;
dae5f5cf 1126 esac
81ecdfbb 1127 eval with_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
1128
1129 -without-* | --without-*)
81ecdfbb 1130 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
d6e9fb05 1131 # Reject names that are not valid shell variable names.
81ecdfbb 1132 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1133 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1134 ac_useropt_orig=$ac_useropt
1135 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136 case $ac_user_opts in
1137 *"
1138"with_$ac_useropt"
1139"*) ;;
1140 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1141 ac_unrecognized_sep=', ';;
1142 esac
1143 eval with_$ac_useropt=no ;;
d6e9fb05
JK
1144
1145 --x)
1146 # Obsolete; use --with-x.
1147 with_x=yes ;;
1148
1149 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1150 | --x-incl | --x-inc | --x-in | --x-i)
1151 ac_prev=x_includes ;;
1152 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1153 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1154 x_includes=$ac_optarg ;;
d6e9fb05
JK
1155
1156 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1157 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1158 ac_prev=x_libraries ;;
1159 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1160 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1161 x_libraries=$ac_optarg ;;
d6e9fb05 1162
d0ac1c44
SM
1163 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1164Try \`$0 --help' for more information"
d6e9fb05
JK
1165 ;;
1166
bec39cab
AC
1167 *=*)
1168 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1169 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1170 case $ac_envvar in #(
1171 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1172 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1173 esac
1174 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1175 export $ac_envvar ;;
1176
d6e9fb05 1177 *)
bec39cab 1178 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1179 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1180 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1181 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1182 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
d6e9fb05
JK
1183 ;;
1184
1185 esac
1186done
1187
1188if test -n "$ac_prev"; then
bec39cab 1189 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1190 as_fn_error $? "missing argument to $ac_option"
d6e9fb05 1191fi
d6e9fb05 1192
81ecdfbb
RW
1193if test -n "$ac_unrecognized_opts"; then
1194 case $enable_option_checking in
1195 no) ;;
d0ac1c44 1196 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1197 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
dae5f5cf 1198 esac
81ecdfbb 1199fi
dae5f5cf 1200
81ecdfbb
RW
1201# Check all directory arguments for consistency.
1202for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1203 datadir sysconfdir sharedstatedir localstatedir includedir \
1204 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1205 libdir localedir mandir
dae5f5cf 1206do
81ecdfbb
RW
1207 eval ac_val=\$$ac_var
1208 # Remove trailing slashes.
1209 case $ac_val in
1210 */ )
1211 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1212 eval $ac_var=\$ac_val;;
1213 esac
1214 # Be sure to have absolute directory names.
dae5f5cf 1215 case $ac_val in
81ecdfbb
RW
1216 [\\/$]* | ?:[\\/]* ) continue;;
1217 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
d6e9fb05 1218 esac
d0ac1c44 1219 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
d6e9fb05
JK
1220done
1221
bec39cab
AC
1222# There might be people who depend on the old broken behavior: `$host'
1223# used to hold the argument of --host etc.
1224# FIXME: To remove some day.
1225build=$build_alias
1226host=$host_alias
1227target=$target_alias
1228
1229# FIXME: To remove some day.
1230if test "x$host_alias" != x; then
1231 if test "x$build_alias" = x; then
1232 cross_compiling=maybe
bec39cab
AC
1233 elif test "x$build_alias" != "x$host_alias"; then
1234 cross_compiling=yes
1235 fi
1236fi
d6e9fb05 1237
bec39cab
AC
1238ac_tool_prefix=
1239test -n "$host_alias" && ac_tool_prefix=$host_alias-
1240
1241test "$silent" = yes && exec 6>/dev/null
d6e9fb05 1242
d6e9fb05 1243
81ecdfbb
RW
1244ac_pwd=`pwd` && test -n "$ac_pwd" &&
1245ac_ls_di=`ls -di .` &&
1246ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1247 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1248test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1249 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1250
1251
d6e9fb05
JK
1252# Find the source files, if location was not specified.
1253if test -z "$srcdir"; then
1254 ac_srcdir_defaulted=yes
81ecdfbb
RW
1255 # Try the directory containing this script, then the parent directory.
1256 ac_confdir=`$as_dirname -- "$as_myself" ||
1257$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1258 X"$as_myself" : 'X\(//\)[^/]' \| \
1259 X"$as_myself" : 'X\(//\)$' \| \
1260 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1261$as_echo X"$as_myself" |
1262 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\/\)[^/].*/{
1267 s//\1/
1268 q
1269 }
1270 /^X\(\/\/\)$/{
1271 s//\1/
1272 q
1273 }
1274 /^X\(\/\).*/{
1275 s//\1/
1276 q
1277 }
1278 s/.*/./; q'`
d6e9fb05 1279 srcdir=$ac_confdir
81ecdfbb 1280 if test ! -r "$srcdir/$ac_unique_file"; then
d6e9fb05
JK
1281 srcdir=..
1282 fi
1283else
1284 ac_srcdir_defaulted=no
1285fi
81ecdfbb
RW
1286if test ! -r "$srcdir/$ac_unique_file"; then
1287 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1288 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1289fi
1290ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1291ac_abs_confdir=`(
d0ac1c44 1292 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1293 pwd)`
1294# When building in place, set srcdir=.
1295if test "$ac_abs_confdir" = "$ac_pwd"; then
1296 srcdir=.
1297fi
1298# Remove unnecessary trailing slashes from srcdir.
1299# Double slashes in file names in object file debugging info
1300# mess up M-x gdb in Emacs.
1301case $srcdir in
1302*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1303esac
1304for ac_var in $ac_precious_vars; do
1305 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_env_${ac_var}_value=\$${ac_var}
1307 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1308 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1309done
d6e9fb05 1310
bec39cab
AC
1311#
1312# Report the --help message.
1313#
1314if test "$ac_init_help" = "long"; then
1315 # Omit some internal or obsolete options to make the list less imposing.
1316 # This message is too long to be a string in the A/UX 3.1 sh.
1317 cat <<_ACEOF
1318\`configure' configures this package to adapt to many kinds of systems.
1319
1320Usage: $0 [OPTION]... [VAR=VALUE]...
1321
1322To assign environment variables (e.g., CC, CFLAGS...), specify them as
1323VAR=VALUE. See below for descriptions of some of the useful variables.
1324
1325Defaults for the options are specified in brackets.
1326
1327Configuration:
1328 -h, --help display this help and exit
1329 --help=short display options specific to this package
1330 --help=recursive display the short help of all the included packages
1331 -V, --version display version information and exit
d0ac1c44 1332 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1333 --cache-file=FILE cache test results in FILE [disabled]
1334 -C, --config-cache alias for \`--cache-file=config.cache'
1335 -n, --no-create do not create output files
1336 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1337
bec39cab
AC
1338Installation directories:
1339 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1340 [$ac_default_prefix]
bec39cab 1341 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1342 [PREFIX]
bec39cab
AC
1343
1344By default, \`make install' will install all the files in
1345\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1346an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1347for instance \`--prefix=\$HOME'.
1348
1349For better control, use the options below.
1350
1351Fine tuning of the installation directories:
81ecdfbb
RW
1352 --bindir=DIR user executables [EPREFIX/bin]
1353 --sbindir=DIR system admin executables [EPREFIX/sbin]
1354 --libexecdir=DIR program executables [EPREFIX/libexec]
1355 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1356 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1357 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1358 --libdir=DIR object code libraries [EPREFIX/lib]
1359 --includedir=DIR C header files [PREFIX/include]
1360 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1361 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1362 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1363 --infodir=DIR info documentation [DATAROOTDIR/info]
1364 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1365 --mandir=DIR man documentation [DATAROOTDIR/man]
1366 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1367 --htmldir=DIR html documentation [DOCDIR]
1368 --dvidir=DIR dvi documentation [DOCDIR]
1369 --pdfdir=DIR pdf documentation [DOCDIR]
1370 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1371_ACEOF
1372
1373 cat <<\_ACEOF
1374
dcdb98d2
DJ
1375Program names:
1376 --program-prefix=PREFIX prepend PREFIX to installed program names
1377 --program-suffix=SUFFIX append SUFFIX to installed program names
1378 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1379
bec39cab
AC
1380System types:
1381 --build=BUILD configure for building on BUILD [guessed]
1382 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1383 --target=TARGET configure for building compilers for TARGET [HOST]
1384_ACEOF
1385fi
1386
1387if test -n "$ac_init_help"; then
1388
1389 cat <<\_ACEOF
1390
d4596a3d
PA
1391Optional Features:
1392 --disable-option-checking ignore unrecognized --enable/--with options
1393 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1394 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1395 --enable-maintainer-mode
1396 enable make rules and dependencies not useful (and
1397 sometimes confusing) to the casual installer
589bc927 1398 --disable-largefile omit support for large files
db6878ac 1399 --disable-rpath do not hardcode runtime library paths
8ecfd7bd
SDJ
1400 --enable-unit-tests Enable the inclusion of unit tests when compiling
1401 GDB
d4596a3d 1402 --enable-werror treat compile warnings as errors
8f13a3ce
MF
1403 --enable-build-warnings enable build-time compiler warnings if gcc is used
1404 --enable-gdb-build-warnings
1405 enable GDB specific build-time compiler warnings if
1406 gcc is used
c2a66c29
NS
1407 --enable-inprocess-agent
1408 inprocess agent
d4596a3d 1409
c16158bc
JM
1410Optional Packages:
1411 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1412 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
05ea2a05
TT
1413 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1414 --with-gnu-ld assume the C compiler uses GNU ld default=no
1415 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1416 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1417 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
0fb4aa4b
PA
1418 --with-ust=PATH Specify prefix directory for the installed UST package
1419 Equivalent to --with-ust-include=PATH/include
1420 plus --with-ust-lib=PATH/lib
1421 --with-ust-include=PATH Specify directory for installed UST include files
1422 --with-ust-lib=PATH Specify the directory for the installed UST library
c16158bc
JM
1423 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1424 --with-bugurl=URL Direct users to URL to report a bug
96f15937
PP
1425 --with-libthread-db=PATH
1426 use given libthread_db directly
c16158bc 1427
bec39cab
AC
1428Some influential environment variables:
1429 CC C compiler command
1430 CFLAGS C compiler flags
1431 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1432 nonstandard directory <lib dir>
81ecdfbb 1433 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1434 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1435 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1436 CXX C++ compiler command
1437 CXXFLAGS C++ compiler flags
bec39cab
AC
1438 CPP C preprocessor
1439
1440Use these variables to override the choices made by `configure' or to help
1441it to find libraries and programs with nonstandard names/locations.
1442
81ecdfbb 1443Report bugs to the package provider.
bec39cab 1444_ACEOF
81ecdfbb 1445ac_status=$?
bec39cab
AC
1446fi
1447
1448if test "$ac_init_help" = "recursive"; then
1449 # If there are subdirs, report their specific --help.
bec39cab 1450 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1451 test -d "$ac_dir" ||
1452 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1453 continue
bec39cab
AC
1454 ac_builddir=.
1455
81ecdfbb
RW
1456case "$ac_dir" in
1457.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1458*)
1459 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1460 # A ".." for each directory in $ac_dir_suffix.
1461 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1462 case $ac_top_builddir_sub in
1463 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1464 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1465 esac ;;
1466esac
1467ac_abs_top_builddir=$ac_pwd
1468ac_abs_builddir=$ac_pwd$ac_dir_suffix
1469# for backward compatibility:
1470ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1471
1472case $srcdir in
81ecdfbb 1473 .) # We are building in place.
bec39cab 1474 ac_srcdir=.
81ecdfbb
RW
1475 ac_top_srcdir=$ac_top_builddir_sub
1476 ac_abs_top_srcdir=$ac_pwd ;;
1477 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1478 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1479 ac_top_srcdir=$srcdir
1480 ac_abs_top_srcdir=$srcdir ;;
1481 *) # Relative name.
1482 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1483 ac_top_srcdir=$ac_top_build_prefix$srcdir
1484 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
dae5f5cf 1485esac
81ecdfbb
RW
1486ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1487
1488 cd "$ac_dir" || { ac_status=$?; continue; }
1489 # Check for guested configure.
1490 if test -f "$ac_srcdir/configure.gnu"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1493 elif test -f "$ac_srcdir/configure"; then
1494 echo &&
1495 $SHELL "$ac_srcdir/configure" --help=recursive
434c4c77 1496 else
81ecdfbb
RW
1497 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1498 fi || ac_status=$?
1499 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1500 done
1501fi
1502
81ecdfbb 1503test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1504if $ac_init_version; then
1505 cat <<\_ACEOF
81ecdfbb 1506configure
d0ac1c44 1507generated by GNU Autoconf 2.69
bec39cab 1508
d0ac1c44 1509Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1510This configure script is free software; the Free Software Foundation
1511gives unlimited permission to copy, distribute and modify it.
1512_ACEOF
81ecdfbb 1513 exit
bec39cab 1514fi
bec39cab 1515
81ecdfbb
RW
1516## ------------------------ ##
1517## Autoconf initialization. ##
1518## ------------------------ ##
bec39cab 1519
81ecdfbb
RW
1520# ac_fn_c_try_compile LINENO
1521# --------------------------
1522# Try to compile conftest.$ac_ext, and return whether this succeeded.
1523ac_fn_c_try_compile ()
bec39cab 1524{
81ecdfbb
RW
1525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1526 rm -f conftest.$ac_objext
1527 if { { ac_try="$ac_compile"
1528case "(($ac_try" in
1529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1530 *) ac_try_echo=$ac_try;;
1531esac
1532eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1533$as_echo "$ac_try_echo"; } >&5
1534 (eval "$ac_compile") 2>conftest.err
1535 ac_status=$?
1536 if test -s conftest.err; then
1537 grep -v '^ *+' conftest.err >conftest.er1
1538 cat conftest.er1 >&5
1539 mv -f conftest.er1 conftest.err
1540 fi
1541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1542 test $ac_status = 0; } && {
1543 test -z "$ac_c_werror_flag" ||
1544 test ! -s conftest.err
1545 } && test -s conftest.$ac_objext; then :
1546 ac_retval=0
1547else
1548 $as_echo "$as_me: failed program was:" >&5
1549sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1550
81ecdfbb
RW
1551 ac_retval=1
1552fi
d0ac1c44
SM
1553 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1554 as_fn_set_status $ac_retval
bec39cab 1555
81ecdfbb 1556} # ac_fn_c_try_compile
bec39cab 1557
3bc3d82a
PA
1558# ac_fn_cxx_try_compile LINENO
1559# ----------------------------
1560# Try to compile conftest.$ac_ext, and return whether this succeeded.
1561ac_fn_cxx_try_compile ()
1562{
1563 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1564 rm -f conftest.$ac_objext
1565 if { { ac_try="$ac_compile"
1566case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569esac
1570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571$as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_compile") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1580 test $ac_status = 0; } && {
1581 test -z "$ac_cxx_werror_flag" ||
1582 test ! -s conftest.err
1583 } && test -s conftest.$ac_objext; then :
1584 ac_retval=0
1585else
1586 $as_echo "$as_me: failed program was:" >&5
1587sed 's/^/| /' conftest.$ac_ext >&5
1588
1589 ac_retval=1
1590fi
d0ac1c44
SM
1591 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1592 as_fn_set_status $ac_retval
3bc3d82a
PA
1593
1594} # ac_fn_cxx_try_compile
1595
81ecdfbb
RW
1596# ac_fn_c_try_cpp LINENO
1597# ----------------------
1598# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1599ac_fn_c_try_cpp ()
1600{
1601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1602 if { { ac_try="$ac_cpp conftest.$ac_ext"
1603case "(($ac_try" in
1604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605 *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1610 ac_status=$?
1611 if test -s conftest.err; then
1612 grep -v '^ *+' conftest.err >conftest.er1
1613 cat conftest.er1 >&5
1614 mv -f conftest.er1 conftest.err
1615 fi
1616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1617 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1618 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1619 test ! -s conftest.err
1620 }; then :
1621 ac_retval=0
1622else
1623 $as_echo "$as_me: failed program was:" >&5
1624sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1625
81ecdfbb
RW
1626 ac_retval=1
1627fi
d0ac1c44
SM
1628 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1629 as_fn_set_status $ac_retval
bec39cab 1630
81ecdfbb
RW
1631} # ac_fn_c_try_cpp
1632
1633# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1634# -------------------------------------------------------
1635# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1636# the include files in INCLUDES and setting the cache variable VAR
1637# accordingly.
1638ac_fn_c_check_header_mongrel ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1641 if eval \${$3+:} false; then :
81ecdfbb
RW
1642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1643$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1644if eval \${$3+:} false; then :
81ecdfbb
RW
1645 $as_echo_n "(cached) " >&6
1646fi
1647eval ac_res=\$$3
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1649$as_echo "$ac_res" >&6; }
1650else
1651 # Is the header compilable?
1652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1653$as_echo_n "checking $2 usability... " >&6; }
1654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1655/* end confdefs.h. */
1656$4
1657#include <$2>
1658_ACEOF
1659if ac_fn_c_try_compile "$LINENO"; then :
1660 ac_header_compiler=yes
1661else
1662 ac_header_compiler=no
1663fi
1664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1666$as_echo "$ac_header_compiler" >&6; }
1667
1668# Is the header present?
1669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1670$as_echo_n "checking $2 presence... " >&6; }
1671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1672/* end confdefs.h. */
1673#include <$2>
1674_ACEOF
1675if ac_fn_c_try_cpp "$LINENO"; then :
1676 ac_header_preproc=yes
1677else
1678 ac_header_preproc=no
1679fi
d0ac1c44 1680rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1682$as_echo "$ac_header_preproc" >&6; }
1683
1684# So? What about this header?
1685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1686 yes:no: )
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1688$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1690$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1691 ;;
1692 no:yes:* )
1693 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1694$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1696$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1698$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1700$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1702$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1703 ;;
1704esac
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1707if eval \${$3+:} false; then :
81ecdfbb
RW
1708 $as_echo_n "(cached) " >&6
1709else
1710 eval "$3=\$ac_header_compiler"
1711fi
1712eval ac_res=\$$3
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1714$as_echo "$ac_res" >&6; }
1715fi
d0ac1c44 1716 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1717
1718} # ac_fn_c_check_header_mongrel
1719
1720# ac_fn_c_try_run LINENO
1721# ----------------------
1722# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1723# that executables *can* be run.
1724ac_fn_c_try_run ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1727 if { { ac_try="$ac_link"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_link") 2>&5
1735 ac_status=$?
1736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1738 { { case "(($ac_try" in
1739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740 *) ac_try_echo=$ac_try;;
1741esac
1742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743$as_echo "$ac_try_echo"; } >&5
1744 (eval "$ac_try") 2>&5
1745 ac_status=$?
1746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747 test $ac_status = 0; }; }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: program exited with status $ac_status" >&5
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=$ac_status
1755fi
1756 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1758 as_fn_set_status $ac_retval
81ecdfbb
RW
1759
1760} # ac_fn_c_try_run
1761
1762# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1763# -------------------------------------------------------
1764# Tests whether HEADER exists and can be compiled using the include files in
1765# INCLUDES, setting the cache variable VAR accordingly.
1766ac_fn_c_check_header_compile ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1770$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1771if eval \${$3+:} false; then :
81ecdfbb
RW
1772 $as_echo_n "(cached) " >&6
1773else
1774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775/* end confdefs.h. */
1776$4
1777#include <$2>
1778_ACEOF
1779if ac_fn_c_try_compile "$LINENO"; then :
1780 eval "$3=yes"
1781else
1782 eval "$3=no"
1783fi
1784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1785fi
1786eval ac_res=\$$3
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1788$as_echo "$ac_res" >&6; }
d0ac1c44 1789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1790
1791} # ac_fn_c_check_header_compile
1792
eb0edac8
GB
1793# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1794# -------------------------------------------
1795# Tests whether TYPE exists after having included INCLUDES, setting cache
1796# variable VAR accordingly.
1797ac_fn_c_check_type ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1801$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1802if eval \${$3+:} false; then :
eb0edac8
GB
1803 $as_echo_n "(cached) " >&6
1804else
1805 eval "$3=no"
1806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809int
1810main ()
1811{
1812if (sizeof ($2))
1813 return 0;
1814 ;
1815 return 0;
1816}
1817_ACEOF
1818if ac_fn_c_try_compile "$LINENO"; then :
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822int
1823main ()
1824{
1825if (sizeof (($2)))
1826 return 0;
1827 ;
1828 return 0;
1829}
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832
1833else
1834 eval "$3=yes"
1835fi
1836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1837fi
1838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1839fi
1840eval ac_res=\$$3
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1842$as_echo "$ac_res" >&6; }
d0ac1c44 1843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
eb0edac8
GB
1844
1845} # ac_fn_c_check_type
1846
404f2902
FCE
1847# ac_fn_c_try_link LINENO
1848# -----------------------
1849# Try to link conftest.$ac_ext, and return whether this succeeded.
1850ac_fn_c_try_link ()
1851{
1852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853 rm -f conftest.$ac_objext conftest$ac_exeext
1854 if { { ac_try="$ac_link"
1855case "(($ac_try" in
1856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857 *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860$as_echo "$ac_try_echo"; } >&5
1861 (eval "$ac_link") 2>conftest.err
1862 ac_status=$?
1863 if test -s conftest.err; then
1864 grep -v '^ *+' conftest.err >conftest.er1
1865 cat conftest.er1 >&5
1866 mv -f conftest.er1 conftest.err
1867 fi
1868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869 test $ac_status = 0; } && {
1870 test -z "$ac_c_werror_flag" ||
1871 test ! -s conftest.err
1872 } && test -s conftest$ac_exeext && {
1873 test "$cross_compiling" = yes ||
1874 test -x conftest$ac_exeext
1875 }; then :
1876 ac_retval=0
1877else
1878 $as_echo "$as_me: failed program was:" >&5
1879sed 's/^/| /' conftest.$ac_ext >&5
1880
1881 ac_retval=1
1882fi
1883 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1884 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1885 # interfere with the next link command; also delete a directory that is
1886 # left behind by Apple's compiler. We do this before executing the actions.
1887 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1888 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1889 as_fn_set_status $ac_retval
1890
1891} # ac_fn_c_try_link
1892
81ecdfbb
RW
1893# ac_fn_c_check_func LINENO FUNC VAR
1894# ----------------------------------
1895# Tests whether FUNC exists, setting the cache variable VAR accordingly
1896ac_fn_c_check_func ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1901if eval \${$3+:} false; then :
81ecdfbb
RW
1902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1907 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1908#define $2 innocuous_$2
1909
1910/* System header to define __stub macros and hopefully few prototypes,
1911 which can conflict with char $2 (); below.
1912 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1913 <limits.h> exists even on freestanding compilers. */
1914
1915#ifdef __STDC__
1916# include <limits.h>
1917#else
1918# include <assert.h>
1919#endif
1920
1921#undef $2
1922
1923/* Override any GCC internal prototype to avoid an error.
1924 Use char because int might match the return type of a GCC
1925 builtin and then its argument prototype would still apply. */
1926#ifdef __cplusplus
1927extern "C"
1928#endif
1929char $2 ();
1930/* The GNU C library defines this for functions which it implements
1931 to always fail with ENOSYS. Some functions are actually named
1932 something starting with __ and the normal name is an alias. */
1933#if defined __stub_$2 || defined __stub___$2
1934choke me
1935#endif
1936
1937int
1938main ()
1939{
1940return $2 ();
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_link "$LINENO"; then :
1946 eval "$3=yes"
1947else
1948 eval "$3=no"
1949fi
1950rm -f core conftest.err conftest.$ac_objext \
1951 conftest$ac_exeext conftest.$ac_ext
1952fi
1953eval ac_res=\$$3
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1955$as_echo "$ac_res" >&6; }
d0ac1c44 1956 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1957
1958} # ac_fn_c_check_func
1959
d0ac1c44
SM
1960# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1961# ---------------------------------------------
1962# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1963# accordingly.
81ecdfbb
RW
1964ac_fn_c_check_decl ()
1965{
1966 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0fb4aa4b
PA
1967 as_decl_name=`echo $2|sed 's/ *(.*//'`
1968 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1970$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 1971if eval \${$3+:} false; then :
81ecdfbb
RW
1972 $as_echo_n "(cached) " >&6
1973else
1974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1975/* end confdefs.h. */
1976$4
1977int
1978main ()
1979{
0fb4aa4b
PA
1980#ifndef $as_decl_name
1981#ifdef __cplusplus
1982 (void) $as_decl_use;
1983#else
1984 (void) $as_decl_name;
1985#endif
81ecdfbb
RW
1986#endif
1987
1988 ;
1989 return 0;
1990}
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 eval "$3=yes"
1994else
1995 eval "$3=no"
1996fi
1997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
d0ac1c44 2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
2003
2004} # ac_fn_c_check_decl
2005
05ea2a05
TT
2006# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2007# ----------------------------------------------------
2008# Tries to find if the field MEMBER exists in type AGGR, after including
2009# INCLUDES, setting cache variable VAR accordingly.
2010ac_fn_c_check_member ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2014$as_echo_n "checking for $2.$3... " >&6; }
2015if eval \${$4+:} false; then :
2016 $as_echo_n "(cached) " >&6
2017else
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$5
2021int
2022main ()
2023{
2024static $2 ac_aggr;
2025if (ac_aggr.$3)
2026return 0;
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032 eval "$4=yes"
2033else
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$5
2037int
2038main ()
2039{
2040static $2 ac_aggr;
2041if (sizeof ac_aggr.$3)
2042return 0;
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 eval "$4=yes"
2049else
2050 eval "$4=no"
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
2056eval ac_res=\$$4
2057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2058$as_echo "$ac_res" >&6; }
2059 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2060
2061} # ac_fn_c_check_member
2062
21987b9c
TT
2063# ac_fn_cxx_try_link LINENO
2064# -------------------------
2065# Try to link conftest.$ac_ext, and return whether this succeeded.
2066ac_fn_cxx_try_link ()
2067{
2068 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069 rm -f conftest.$ac_objext conftest$ac_exeext
2070 if { { ac_try="$ac_link"
2071case "(($ac_try" in
2072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2073 *) ac_try_echo=$ac_try;;
2074esac
2075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2076$as_echo "$ac_try_echo"; } >&5
2077 (eval "$ac_link") 2>conftest.err
2078 ac_status=$?
2079 if test -s conftest.err; then
2080 grep -v '^ *+' conftest.err >conftest.er1
2081 cat conftest.er1 >&5
2082 mv -f conftest.er1 conftest.err
2083 fi
2084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2085 test $ac_status = 0; } && {
2086 test -z "$ac_cxx_werror_flag" ||
2087 test ! -s conftest.err
2088 } && test -s conftest$ac_exeext && {
2089 test "$cross_compiling" = yes ||
2090 test -x conftest$ac_exeext
2091 }; then :
2092 ac_retval=0
2093else
2094 $as_echo "$as_me: failed program was:" >&5
2095sed 's/^/| /' conftest.$ac_ext >&5
2096
2097 ac_retval=1
2098fi
2099 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2100 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2101 # interfere with the next link command; also delete a directory that is
2102 # left behind by Apple's compiler. We do this before executing the actions.
2103 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2104 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2105 as_fn_set_status $ac_retval
2106
2107} # ac_fn_cxx_try_link
2108
2109# ac_fn_cxx_check_func LINENO FUNC VAR
2110# ------------------------------------
2111# Tests whether FUNC exists, setting the cache variable VAR accordingly
2112ac_fn_cxx_check_func ()
2113{
2114 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2116$as_echo_n "checking for $2... " >&6; }
2117if eval \${$3+:} false; then :
2118 $as_echo_n "(cached) " >&6
2119else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2123 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2124#define $2 innocuous_$2
2125
2126/* System header to define __stub macros and hopefully few prototypes,
2127 which can conflict with char $2 (); below.
2128 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2129 <limits.h> exists even on freestanding compilers. */
2130
2131#ifdef __STDC__
2132# include <limits.h>
2133#else
2134# include <assert.h>
2135#endif
2136
2137#undef $2
2138
2139/* Override any GCC internal prototype to avoid an error.
2140 Use char because int might match the return type of a GCC
2141 builtin and then its argument prototype would still apply. */
2142#ifdef __cplusplus
2143extern "C"
2144#endif
2145char $2 ();
2146/* The GNU C library defines this for functions which it implements
2147 to always fail with ENOSYS. Some functions are actually named
2148 something starting with __ and the normal name is an alias. */
2149#if defined __stub_$2 || defined __stub___$2
2150choke me
2151#endif
2152
2153int
2154main ()
2155{
2156return $2 ();
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_cxx_try_link "$LINENO"; then :
2162 eval "$3=yes"
2163else
2164 eval "$3=no"
2165fi
2166rm -f core conftest.err conftest.$ac_objext \
2167 conftest$ac_exeext conftest.$ac_ext
2168fi
2169eval ac_res=\$$3
2170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2171$as_echo "$ac_res" >&6; }
2172 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2173
2174} # ac_fn_cxx_check_func
2175
07697489
PA
2176# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2177# --------------------------------------------
2178# Tries to find the compile-time value of EXPR in a program that includes
2179# INCLUDES, setting VAR accordingly. Returns whether the value could be
2180# computed
2181ac_fn_c_compute_int ()
2182{
2183 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184 if test "$cross_compiling" = yes; then
2185 # Depending upon the size, compute the lo and hi bounds.
2186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188$4
2189int
2190main ()
2191{
2192static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2193test_array [0] = 0;
2194return test_array [0];
07697489
PA
2195
2196 ;
2197 return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_compile "$LINENO"; then :
2201 ac_lo=0 ac_mid=0
2202 while :; do
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$4
2206int
2207main ()
2208{
2209static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2210test_array [0] = 0;
2211return test_array [0];
07697489
PA
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_compile "$LINENO"; then :
2218 ac_hi=$ac_mid; break
2219else
2220 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2221 if test $ac_lo -le $ac_mid; then
2222 ac_lo= ac_hi=
2223 break
2224 fi
2225 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2226fi
2227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228 done
2229else
2230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231/* end confdefs.h. */
2232$4
2233int
2234main ()
2235{
2236static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2237test_array [0] = 0;
2238return test_array [0];
07697489
PA
2239
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245 ac_hi=-1 ac_mid=-1
2246 while :; do
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250int
2251main ()
2252{
2253static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2254test_array [0] = 0;
2255return test_array [0];
07697489
PA
2256
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_compile "$LINENO"; then :
2262 ac_lo=$ac_mid; break
2263else
2264 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2265 if test $ac_mid -le $ac_hi; then
2266 ac_lo= ac_hi=
2267 break
2268 fi
2269 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272 done
2273else
2274 ac_lo= ac_hi=
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279# Binary search between lo and hi bounds.
2280while test "x$ac_lo" != "x$ac_hi"; do
2281 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h. */
2284$4
2285int
2286main ()
2287{
2288static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2289test_array [0] = 0;
2290return test_array [0];
07697489
PA
2291
2292 ;
2293 return 0;
2294}
2295_ACEOF
2296if ac_fn_c_try_compile "$LINENO"; then :
2297 ac_hi=$ac_mid
2298else
2299 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2300fi
2301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302done
2303case $ac_lo in #((
2304?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2305'') ac_retval=1 ;;
2306esac
2307 else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311static long int longval () { return $2; }
2312static unsigned long int ulongval () { return $2; }
2313#include <stdio.h>
2314#include <stdlib.h>
2315int
2316main ()
2317{
2318
2319 FILE *f = fopen ("conftest.val", "w");
2320 if (! f)
2321 return 1;
2322 if (($2) < 0)
2323 {
2324 long int i = longval ();
2325 if (i != ($2))
2326 return 1;
2327 fprintf (f, "%ld", i);
2328 }
2329 else
2330 {
2331 unsigned long int i = ulongval ();
2332 if (i != ($2))
2333 return 1;
2334 fprintf (f, "%lu", i);
2335 }
2336 /* Do not output a trailing newline, as this causes \r\n confusion
2337 on some platforms. */
2338 return ferror (f) || fclose (f) != 0;
2339
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_run "$LINENO"; then :
2345 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2346else
2347 ac_retval=1
2348fi
2349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2350 conftest.$ac_objext conftest.beam conftest.$ac_ext
2351rm -f conftest.val
2352
2353 fi
d0ac1c44
SM
2354 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2355 as_fn_set_status $ac_retval
07697489
PA
2356
2357} # ac_fn_c_compute_int
81ecdfbb
RW
2358cat >config.log <<_ACEOF
2359This file contains any messages produced by compilers while
2360running configure, to aid debugging if configure makes a mistake.
2361
2362It was created by $as_me, which was
d0ac1c44 2363generated by GNU Autoconf 2.69. Invocation command line was
81ecdfbb
RW
2364
2365 $ $0 $@
2366
2367_ACEOF
2368exec 5>>config.log
2369{
2370cat <<_ASUNAME
2371## --------- ##
2372## Platform. ##
2373## --------- ##
2374
2375hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2376uname -m = `(uname -m) 2>/dev/null || echo unknown`
2377uname -r = `(uname -r) 2>/dev/null || echo unknown`
2378uname -s = `(uname -s) 2>/dev/null || echo unknown`
2379uname -v = `(uname -v) 2>/dev/null || echo unknown`
2380
2381/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2382/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2383
2384/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2385/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2386/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2387/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2388/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2389/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2390/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2391
2392_ASUNAME
2393
2394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2395for as_dir in $PATH
2396do
2397 IFS=$as_save_IFS
2398 test -z "$as_dir" && as_dir=.
2399 $as_echo "PATH: $as_dir"
2400 done
2401IFS=$as_save_IFS
2402
2403} >&5
2404
2405cat >&5 <<_ACEOF
2406
2407
2408## ----------- ##
2409## Core tests. ##
2410## ----------- ##
bec39cab
AC
2411
2412_ACEOF
2413
2414
2415# Keep a trace of the command line.
2416# Strip out --no-create and --no-recursion so they do not pile up.
2417# Strip out --silent because we don't want to record it for future runs.
2418# Also quote any args containing shell meta-characters.
2419# Make two passes to allow for proper duplicate-argument suppression.
2420ac_configure_args=
2421ac_configure_args0=
2422ac_configure_args1=
bec39cab
AC
2423ac_must_keep_next=false
2424for ac_pass in 1 2
2425do
2426 for ac_arg
2427 do
2428 case $ac_arg in
2429 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2430 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2431 | -silent | --silent | --silen | --sile | --sil)
2432 continue ;;
81ecdfbb
RW
2433 *\'*)
2434 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2435 esac
2436 case $ac_pass in
81ecdfbb 2437 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
bec39cab 2438 2)
81ecdfbb 2439 as_fn_append ac_configure_args1 " '$ac_arg'"
bec39cab
AC
2440 if test $ac_must_keep_next = true; then
2441 ac_must_keep_next=false # Got value, back to normal.
2442 else
2443 case $ac_arg in
2444 *=* | --config-cache | -C | -disable-* | --disable-* \
2445 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2446 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2447 | -with-* | --with-* | -without-* | --without-* | --x)
2448 case "$ac_configure_args0 " in
2449 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2450 esac
2451 ;;
2452 -* ) ac_must_keep_next=true ;;
2453 esac
2454 fi
81ecdfbb 2455 as_fn_append ac_configure_args " '$ac_arg'"
bec39cab
AC
2456 ;;
2457 esac
2458 done
2459done
81ecdfbb
RW
2460{ ac_configure_args0=; unset ac_configure_args0;}
2461{ ac_configure_args1=; unset ac_configure_args1;}
bec39cab
AC
2462
2463# When interrupted or exit'd, cleanup temporary files, and complete
2464# config.log. We remove comments because anyway the quotes in there
2465# would cause problems or look ugly.
81ecdfbb
RW
2466# WARNING: Use '\'' to represent an apostrophe within the trap.
2467# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
bec39cab
AC
2468trap 'exit_status=$?
2469 # Save into config.log some information that might help in debugging.
2470 {
2471 echo
2472
d0ac1c44 2473 $as_echo "## ---------------- ##
bec39cab 2474## Cache variables. ##
d0ac1c44 2475## ---------------- ##"
bec39cab
AC
2476 echo
2477 # The following way of writing the cache mishandles newlines in values,
81ecdfbb
RW
2478(
2479 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2480 eval ac_val=\$$ac_var
2481 case $ac_val in #(
2482 *${as_nl}*)
2483 case $ac_var in #(
2484 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2485$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2486 esac
2487 case $ac_var in #(
2488 _ | IFS | as_nl) ;; #(
2489 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2490 *) { eval $ac_var=; unset $ac_var;} ;;
2491 esac ;;
2492 esac
2493 done
bec39cab 2494 (set) 2>&1 |
81ecdfbb
RW
2495 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2496 *${as_nl}ac_space=\ *)
bec39cab 2497 sed -n \
81ecdfbb
RW
2498 "s/'\''/'\''\\\\'\'''\''/g;
2499 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2500 ;; #(
bec39cab 2501 *)
81ecdfbb 2502 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 2503 ;;
81ecdfbb
RW
2504 esac |
2505 sort
2506)
bec39cab
AC
2507 echo
2508
d0ac1c44 2509 $as_echo "## ----------------- ##
bec39cab 2510## Output variables. ##
d0ac1c44 2511## ----------------- ##"
bec39cab
AC
2512 echo
2513 for ac_var in $ac_subst_vars
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
2522
2523 if test -n "$ac_subst_files"; then
d0ac1c44 2524 $as_echo "## ------------------- ##
81ecdfbb 2525## File substitutions. ##
d0ac1c44 2526## ------------------- ##"
bec39cab
AC
2527 echo
2528 for ac_var in $ac_subst_files
2529 do
81ecdfbb
RW
2530 eval ac_val=\$$ac_var
2531 case $ac_val in
2532 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2533 esac
2534 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2535 done | sort
2536 echo
434c4c77 2537 fi
bec39cab
AC
2538
2539 if test -s confdefs.h; then
d0ac1c44 2540 $as_echo "## ----------- ##
bec39cab 2541## confdefs.h. ##
d0ac1c44 2542## ----------- ##"
bec39cab 2543 echo
81ecdfbb 2544 cat confdefs.h
bec39cab
AC
2545 echo
2546 fi
2547 test "$ac_signal" != 0 &&
81ecdfbb
RW
2548 $as_echo "$as_me: caught signal $ac_signal"
2549 $as_echo "$as_me: exit $exit_status"
bec39cab 2550 } >&5
81ecdfbb
RW
2551 rm -f core *.core core.conftest.* &&
2552 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 2553 exit $exit_status
81ecdfbb 2554' 0
bec39cab 2555for ac_signal in 1 2 13 15; do
81ecdfbb 2556 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
bec39cab
AC
2557done
2558ac_signal=0
2559
2560# confdefs.h avoids OS command line length limits that DEFS can exceed.
81ecdfbb
RW
2561rm -f -r conftest* confdefs.h
2562
2563$as_echo "/* confdefs.h */" > confdefs.h
bec39cab
AC
2564
2565# Predefined preprocessor variables.
2566
2567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_NAME "$PACKAGE_NAME"
2569_ACEOF
2570
bec39cab
AC
2571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2573_ACEOF
2574
bec39cab
AC
2575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_VERSION "$PACKAGE_VERSION"
2577_ACEOF
2578
bec39cab
AC
2579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_STRING "$PACKAGE_STRING"
2581_ACEOF
2582
bec39cab
AC
2583cat >>confdefs.h <<_ACEOF
2584#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2585_ACEOF
2586
81ecdfbb
RW
2587cat >>confdefs.h <<_ACEOF
2588#define PACKAGE_URL "$PACKAGE_URL"
2589_ACEOF
2590
bec39cab
AC
2591
2592# Let the site file select an alternate cache file if it wants to.
81ecdfbb
RW
2593# Prefer an explicitly selected file to automatically selected ones.
2594ac_site_file1=NONE
2595ac_site_file2=NONE
2596if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2597 # We do not want a PATH search for config.site.
2598 case $CONFIG_SITE in #((
2599 -*) ac_site_file1=./$CONFIG_SITE;;
2600 */*) ac_site_file1=$CONFIG_SITE;;
2601 *) ac_site_file1=./$CONFIG_SITE;;
2602 esac
81ecdfbb
RW
2603elif test "x$prefix" != xNONE; then
2604 ac_site_file1=$prefix/share/config.site
2605 ac_site_file2=$prefix/etc/config.site
2606else
2607 ac_site_file1=$ac_default_prefix/share/config.site
2608 ac_site_file2=$ac_default_prefix/etc/config.site
d6e9fb05 2609fi
81ecdfbb
RW
2610for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2611do
2612 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2613 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2615$as_echo "$as_me: loading site script $ac_site_file" >&6;}
bec39cab 2616 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2617 . "$ac_site_file" \
2618 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2620as_fn_error $? "failed to load site script $ac_site_file
2621See \`config.log' for more details" "$LINENO" 5; }
d6e9fb05
JK
2622 fi
2623done
2624
2625if test -r "$cache_file"; then
d0ac1c44
SM
2626 # Some versions of bash will fail to source /dev/null (special files
2627 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2628 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2630$as_echo "$as_me: loading cache $cache_file" >&6;}
bec39cab 2631 case $cache_file in
81ecdfbb
RW
2632 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2633 *) . "./$cache_file";;
bec39cab
AC
2634 esac
2635 fi
d6e9fb05 2636else
81ecdfbb
RW
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2638$as_echo "$as_me: creating cache $cache_file" >&6;}
bec39cab 2639 >$cache_file
d6e9fb05
JK
2640fi
2641
05ea2a05
TT
2642as_fn_append ac_header_list " stdlib.h"
2643as_fn_append ac_header_list " unistd.h"
2644as_fn_append ac_header_list " sys/param.h"
bec39cab
AC
2645# Check that the precious variables saved in the cache have kept the same
2646# value.
2647ac_cache_corrupted=false
81ecdfbb 2648for ac_var in $ac_precious_vars; do
bec39cab
AC
2649 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2650 eval ac_new_set=\$ac_env_${ac_var}_set
81ecdfbb
RW
2651 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2652 eval ac_new_val=\$ac_env_${ac_var}_value
bec39cab
AC
2653 case $ac_old_set,$ac_new_set in
2654 set,)
81ecdfbb
RW
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2656$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
bec39cab
AC
2657 ac_cache_corrupted=: ;;
2658 ,set)
81ecdfbb
RW
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2660$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
bec39cab
AC
2661 ac_cache_corrupted=: ;;
2662 ,);;
2663 *)
2664 if test "x$ac_old_val" != "x$ac_new_val"; then
81ecdfbb
RW
2665 # differences in whitespace do not lead to failure.
2666 ac_old_val_w=`echo x $ac_old_val`
2667 ac_new_val_w=`echo x $ac_new_val`
2668 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2670$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2671 ac_cache_corrupted=:
2672 else
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2674$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2675 eval $ac_var=\$ac_old_val
2676 fi
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2678$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2680$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
2681 fi;;
2682 esac
2683 # Pass precious variables to config.status.
2684 if test "$ac_new_set" = set; then
2685 case $ac_new_val in
81ecdfbb 2686 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2687 *) ac_arg=$ac_var=$ac_new_val ;;
2688 esac
2689 case " $ac_configure_args " in
2690 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
81ecdfbb 2691 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
bec39cab 2692 esac
d6e9fb05 2693 fi
bec39cab
AC
2694done
2695if $ac_cache_corrupted; then
81ecdfbb
RW
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2699$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2700 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
d6e9fb05 2701fi
81ecdfbb
RW
2702## -------------------- ##
2703## Main body of script. ##
2704## -------------------- ##
d6e9fb05 2705
dae5f5cf
DJ
2706ac_ext=c
2707ac_cpp='$CPP $CPPFLAGS'
2708ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2709ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2710ac_compiler_gnu=$ac_cv_c_compiler_gnu
2711
d6e9fb05 2712
84563040 2713
bec39cab
AC
2714
2715
7e8c7130 2716
7e3941ac 2717
81ecdfbb 2718ac_config_headers="$ac_config_headers config.h:config.in"
bec39cab
AC
2719
2720
e28b3332 2721
c9a1864a
YQ
2722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2723$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2724 # Check whether --enable-maintainer-mode was given.
2725if test "${enable_maintainer_mode+set}" = set; then :
2726 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2727else
2728 USE_MAINTAINER_MODE=no
2729fi
2730
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2732$as_echo "$USE_MAINTAINER_MODE" >&6; }
2733 if test $USE_MAINTAINER_MODE = yes; then
2734 MAINTAINER_MODE_TRUE=
2735 MAINTAINER_MODE_FALSE='#'
2736else
2737 MAINTAINER_MODE_TRUE='#'
2738 MAINTAINER_MODE_FALSE=
2739fi
2740
2741 MAINT=$MAINTAINER_MODE_TRUE
2742
2743
2744
bec39cab
AC
2745ac_ext=c
2746ac_cpp='$CPP $CPPFLAGS'
2747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2749ac_compiler_gnu=$ac_cv_c_compiler_gnu
2750if test -n "$ac_tool_prefix"; then
2751 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2752set dummy ${ac_tool_prefix}gcc; ac_word=$2
81ecdfbb
RW
2753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2754$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2755if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2756 $as_echo_n "(cached) " >&6
84563040
DJ
2757else
2758 if test -n "$CC"; then
2759 ac_cv_prog_CC="$CC" # Let the user override the test.
2760else
bec39cab
AC
2761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2762for as_dir in $PATH
2763do
2764 IFS=$as_save_IFS
2765 test -z "$as_dir" && as_dir=.
81ecdfbb 2766 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2768 ac_cv_prog_CC="${ac_tool_prefix}gcc"
81ecdfbb 2769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2770 break 2
2771 fi
2772done
81ecdfbb
RW
2773 done
2774IFS=$as_save_IFS
bec39cab 2775
84563040
DJ
2776fi
2777fi
bec39cab 2778CC=$ac_cv_prog_CC
84563040 2779if test -n "$CC"; then
81ecdfbb
RW
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2781$as_echo "$CC" >&6; }
84563040 2782else
81ecdfbb
RW
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2784$as_echo "no" >&6; }
84563040
DJ
2785fi
2786
81ecdfbb 2787
bec39cab
AC
2788fi
2789if test -z "$ac_cv_prog_CC"; then
2790 ac_ct_CC=$CC
2791 # Extract the first word of "gcc", so it can be a program name with args.
2792set dummy gcc; ac_word=$2
81ecdfbb
RW
2793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2794$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2795if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2796 $as_echo_n "(cached) " >&6
84563040 2797else
bec39cab
AC
2798 if test -n "$ac_ct_CC"; then
2799 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
84563040 2800else
bec39cab
AC
2801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2802for as_dir in $PATH
2803do
2804 IFS=$as_save_IFS
2805 test -z "$as_dir" && as_dir=.
81ecdfbb 2806 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2808 ac_cv_prog_ac_ct_CC="gcc"
81ecdfbb 2809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2810 break 2
2811 fi
2812done
81ecdfbb
RW
2813 done
2814IFS=$as_save_IFS
bec39cab
AC
2815
2816fi
2817fi
2818ac_ct_CC=$ac_cv_prog_ac_ct_CC
2819if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2821$as_echo "$ac_ct_CC" >&6; }
bec39cab 2822else
81ecdfbb
RW
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2824$as_echo "no" >&6; }
bec39cab
AC
2825fi
2826
81ecdfbb
RW
2827 if test "x$ac_ct_CC" = x; then
2828 CC=""
2829 else
2830 case $cross_compiling:$ac_tool_warned in
2831yes:)
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2834ac_tool_warned=yes ;;
2835esac
2836 CC=$ac_ct_CC
2837 fi
bec39cab
AC
2838else
2839 CC="$ac_cv_prog_CC"
2840fi
2841
2842if test -z "$CC"; then
81ecdfbb
RW
2843 if test -n "$ac_tool_prefix"; then
2844 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 2845set dummy ${ac_tool_prefix}cc; ac_word=$2
81ecdfbb
RW
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2847$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2848if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2849 $as_echo_n "(cached) " >&6
bec39cab
AC
2850else
2851 if test -n "$CC"; then
2852 ac_cv_prog_CC="$CC" # Let the user override the test.
2853else
2854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2855for as_dir in $PATH
2856do
2857 IFS=$as_save_IFS
2858 test -z "$as_dir" && as_dir=.
81ecdfbb 2859 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2861 ac_cv_prog_CC="${ac_tool_prefix}cc"
81ecdfbb 2862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2863 break 2
2864 fi
2865done
81ecdfbb
RW
2866 done
2867IFS=$as_save_IFS
bec39cab
AC
2868
2869fi
2870fi
2871CC=$ac_cv_prog_CC
2872if test -n "$CC"; then
81ecdfbb
RW
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2874$as_echo "$CC" >&6; }
bec39cab 2875else
81ecdfbb
RW
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2877$as_echo "no" >&6; }
bec39cab
AC
2878fi
2879
81ecdfbb
RW
2880
2881 fi
dae5f5cf 2882fi
81ecdfbb 2883if test -z "$CC"; then
dae5f5cf
DJ
2884 # Extract the first word of "cc", so it can be a program name with args.
2885set dummy cc; ac_word=$2
81ecdfbb
RW
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2887$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2888if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2889 $as_echo_n "(cached) " >&6
dae5f5cf 2890else
81ecdfbb
RW
2891 if test -n "$CC"; then
2892 ac_cv_prog_CC="$CC" # Let the user override the test.
dae5f5cf 2893else
81ecdfbb 2894 ac_prog_rejected=no
dae5f5cf
DJ
2895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896for as_dir in $PATH
2897do
2898 IFS=$as_save_IFS
2899 test -z "$as_dir" && as_dir=.
81ecdfbb 2900 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2902 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2903 ac_prog_rejected=yes
2904 continue
2905 fi
2906 ac_cv_prog_CC="cc"
2907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
dae5f5cf 2908 break 2
b80864fb 2909 fi
dae5f5cf 2910done
81ecdfbb
RW
2911 done
2912IFS=$as_save_IFS
bec39cab 2913
84563040
DJ
2914if test $ac_prog_rejected = yes; then
2915 # We found a bogon in the path, so make sure we never use it.
2916 set dummy $ac_cv_prog_CC
2917 shift
bec39cab 2918 if test $# != 0; then
84563040
DJ
2919 # We chose a different compiler from the bogus one.
2920 # However, it has the same basename, so the bogon will be chosen
2921 # first if we set CC to just the basename; use the full file name.
2922 shift
bec39cab 2923 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
84563040
DJ
2924 fi
2925fi
2926fi
2927fi
bec39cab 2928CC=$ac_cv_prog_CC
84563040 2929if test -n "$CC"; then
81ecdfbb
RW
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2931$as_echo "$CC" >&6; }
84563040 2932else
81ecdfbb
RW
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2934$as_echo "no" >&6; }
84563040
DJ
2935fi
2936
81ecdfbb 2937
bec39cab
AC
2938fi
2939if test -z "$CC"; then
2940 if test -n "$ac_tool_prefix"; then
81ecdfbb 2941 for ac_prog in cl.exe
bec39cab
AC
2942 do
2943 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2946$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2947if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2948 $as_echo_n "(cached) " >&6
84563040
DJ
2949else
2950 if test -n "$CC"; then
2951 ac_cv_prog_CC="$CC" # Let the user override the test.
2952else
bec39cab
AC
2953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2954for as_dir in $PATH
2955do
2956 IFS=$as_save_IFS
2957 test -z "$as_dir" && as_dir=.
81ecdfbb 2958 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2960 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2962 break 2
2963 fi
2964done
81ecdfbb
RW
2965 done
2966IFS=$as_save_IFS
bec39cab 2967
84563040
DJ
2968fi
2969fi
bec39cab 2970CC=$ac_cv_prog_CC
84563040 2971if test -n "$CC"; then
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2973$as_echo "$CC" >&6; }
84563040 2974else
81ecdfbb
RW
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976$as_echo "no" >&6; }
84563040 2977fi
bec39cab 2978
81ecdfbb 2979
bec39cab
AC
2980 test -n "$CC" && break
2981 done
2982fi
2983if test -z "$CC"; then
2984 ac_ct_CC=$CC
81ecdfbb 2985 for ac_prog in cl.exe
bec39cab
AC
2986do
2987 # Extract the first word of "$ac_prog", so it can be a program name with args.
2988set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2991if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2992 $as_echo_n "(cached) " >&6
bec39cab
AC
2993else
2994 if test -n "$ac_ct_CC"; then
2995 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2996else
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998for as_dir in $PATH
2999do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
81ecdfbb 3002 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3004 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3006 break 2
84563040 3007 fi
bec39cab 3008done
81ecdfbb
RW
3009 done
3010IFS=$as_save_IFS
bec39cab
AC
3011
3012fi
3013fi
3014ac_ct_CC=$ac_cv_prog_ac_ct_CC
3015if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3017$as_echo "$ac_ct_CC" >&6; }
bec39cab 3018else
81ecdfbb
RW
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020$as_echo "no" >&6; }
84563040
DJ
3021fi
3022
81ecdfbb 3023
bec39cab
AC
3024 test -n "$ac_ct_CC" && break
3025done
84563040 3026
81ecdfbb
RW
3027 if test "x$ac_ct_CC" = x; then
3028 CC=""
3029 else
3030 case $cross_compiling:$ac_tool_warned in
3031yes:)
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3034ac_tool_warned=yes ;;
3035esac
3036 CC=$ac_ct_CC
3037 fi
bec39cab
AC
3038fi
3039
3040fi
3041
3042
81ecdfbb
RW
3043test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3045as_fn_error $? "no acceptable C compiler found in \$PATH
3046See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3047
3048# Provide some information about the compiler.
81ecdfbb
RW
3049$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3050set X $ac_compile
3051ac_compiler=$2
3052for ac_option in --version -v -V -qversion; do
3053 { { ac_try="$ac_compiler $ac_option >&5"
3054case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057esac
3058eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3059$as_echo "$ac_try_echo"; } >&5
3060 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3061 ac_status=$?
81ecdfbb
RW
3062 if test -s conftest.err; then
3063 sed '10a\
3064... rest of stderr output deleted ...
3065 10q' conftest.err >conftest.er1
3066 cat conftest.er1 >&5
81ecdfbb 3067 fi
d0ac1c44 3068 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3070 test $ac_status = 0; }
3071done
bec39cab 3072
81ecdfbb 3073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3074/* end confdefs.h. */
3075
3076int
3077main ()
3078{
3079
3080 ;
3081 return 0;
3082}
3083_ACEOF
3084ac_clean_files_save=$ac_clean_files
d0ac1c44 3085ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3086# Try to create an executable without -o first, disregard a.out.
3087# It will help us diagnose broken compilers, and finding out an intuition
3088# of exeext.
d0ac1c44
SM
3089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3090$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3091ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3092
3093# The possible output files:
3094ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3095
3096ac_rmfiles=
3097for ac_file in $ac_files
3098do
3099 case $ac_file in
3100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3101 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3102 esac
3103done
3104rm -f $ac_rmfiles
3105
3106if { { ac_try="$ac_link_default"
3107case "(($ac_try" in
3108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109 *) ac_try_echo=$ac_try;;
3110esac
3111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3112$as_echo "$ac_try_echo"; } >&5
3113 (eval "$ac_link_default") 2>&5
bec39cab 3114 ac_status=$?
81ecdfbb
RW
3115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3116 test $ac_status = 0; }; then :
3117 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3118# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3119# in a Makefile. We should not override ac_cv_exeext if it was cached,
3120# so that the user can short-circuit this test for compilers unknown to
3121# Autoconf.
3122for ac_file in $ac_files ''
bec39cab
AC
3123do
3124 test -f "$ac_file" || continue
3125 case $ac_file in
81ecdfbb 3126 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
bec39cab
AC
3127 ;;
3128 [ab].out )
3129 # We found the default executable, but exeext='' is most
3130 # certainly right.
3131 break;;
3132 *.* )
81ecdfbb
RW
3133 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3134 then :; else
3135 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3136 fi
3137 # We set ac_cv_exeext here because the later test for it is not
3138 # safe: cross compilers may not add the suffix if given an `-o'
3139 # argument, so we may need to know it at that point already.
3140 # Even if this section looks crufty: it has the advantage of
3141 # actually working.
bec39cab
AC
3142 break;;
3143 * )
3144 break;;
3145 esac
3146done
81ecdfbb
RW
3147test "$ac_cv_exeext" = no && ac_cv_exeext=
3148
bec39cab 3149else
81ecdfbb
RW
3150 ac_file=''
3151fi
81ecdfbb 3152if test -z "$ac_file"; then :
d0ac1c44
SM
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3154$as_echo "no" >&6; }
3155$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
81ecdfbb
RW
3158{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3160as_fn_error 77 "C compiler cannot create executables
3161See \`config.log' for more details" "$LINENO" 5; }
3162else
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3164$as_echo "yes" >&6; }
bec39cab 3165fi
d0ac1c44
SM
3166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3167$as_echo_n "checking for C compiler default output file name... " >&6; }
3168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3169$as_echo "$ac_file" >&6; }
bec39cab 3170ac_exeext=$ac_cv_exeext
bec39cab 3171
d0ac1c44 3172rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
bec39cab 3173ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3175$as_echo_n "checking for suffix of executables... " >&6; }
3176if { { ac_try="$ac_link"
3177case "(($ac_try" in
3178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3179 *) ac_try_echo=$ac_try;;
3180esac
3181eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3182$as_echo "$ac_try_echo"; } >&5
3183 (eval "$ac_link") 2>&5
bec39cab 3184 ac_status=$?
81ecdfbb
RW
3185 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3186 test $ac_status = 0; }; then :
bec39cab
AC
3187 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3188# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3189# work properly (i.e., refer to `conftest.exe'), while it won't with
3190# `rm'.
3191for ac_file in conftest.exe conftest conftest.*; do
3192 test -f "$ac_file" || continue
3193 case $ac_file in
81ecdfbb 3194 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
bec39cab 3195 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
bec39cab
AC
3196 break;;
3197 * ) break;;
3198 esac
3199done
84563040 3200else
81ecdfbb
RW
3201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3203as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3204See \`config.log' for more details" "$LINENO" 5; }
84563040 3205fi
d0ac1c44 3206rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3208$as_echo "$ac_cv_exeext" >&6; }
bec39cab
AC
3209
3210rm -f conftest.$ac_ext
3211EXEEXT=$ac_cv_exeext
3212ac_exeext=$EXEEXT
d0ac1c44
SM
3213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3214/* end confdefs.h. */
3215#include <stdio.h>
3216int
3217main ()
3218{
3219FILE *f = fopen ("conftest.out", "w");
3220 return ferror (f) || fclose (f) != 0;
3221
3222 ;
3223 return 0;
3224}
3225_ACEOF
3226ac_clean_files="$ac_clean_files conftest.out"
3227# Check that the compiler produces executables we can run. If not, either
3228# the compiler is broken, or we cross compile.
3229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3230$as_echo_n "checking whether we are cross compiling... " >&6; }
3231if test "$cross_compiling" != yes; then
3232 { { ac_try="$ac_link"
3233case "(($ac_try" in
3234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3235 *) ac_try_echo=$ac_try;;
3236esac
3237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3238$as_echo "$ac_try_echo"; } >&5
3239 (eval "$ac_link") 2>&5
3240 ac_status=$?
3241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3242 test $ac_status = 0; }
3243 if { ac_try='./conftest$ac_cv_exeext'
3244 { { case "(($ac_try" in
3245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3246 *) ac_try_echo=$ac_try;;
3247esac
3248eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3249$as_echo "$ac_try_echo"; } >&5
3250 (eval "$ac_try") 2>&5
3251 ac_status=$?
3252 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3253 test $ac_status = 0; }; }; then
3254 cross_compiling=no
3255 else
3256 if test "$cross_compiling" = maybe; then
3257 cross_compiling=yes
3258 else
3259 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3261as_fn_error $? "cannot run C compiled programs.
3262If you meant to cross compile, use \`--host'.
3263See \`config.log' for more details" "$LINENO" 5; }
3264 fi
3265 fi
3266fi
3267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3268$as_echo "$cross_compiling" >&6; }
3269
3270rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3271ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3273$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3274if ${ac_cv_objext+:} false; then :
81ecdfbb 3275 $as_echo_n "(cached) " >&6
bec39cab 3276else
81ecdfbb 3277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3278/* end confdefs.h. */
3279
3280int
3281main ()
3282{
3283
3284 ;
3285 return 0;
3286}
3287_ACEOF
3288rm -f conftest.o conftest.obj
81ecdfbb
RW
3289if { { ac_try="$ac_compile"
3290case "(($ac_try" in
3291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3292 *) ac_try_echo=$ac_try;;
3293esac
3294eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3295$as_echo "$ac_try_echo"; } >&5
3296 (eval "$ac_compile") 2>&5
bec39cab 3297 ac_status=$?
81ecdfbb
RW
3298 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3299 test $ac_status = 0; }; then :
3300 for ac_file in conftest.o conftest.obj conftest.*; do
3301 test -f "$ac_file" || continue;
bec39cab 3302 case $ac_file in
81ecdfbb 3303 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3304 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3305 break;;
3306 esac
3307done
3308else
81ecdfbb 3309 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3310sed 's/^/| /' conftest.$ac_ext >&5
3311
81ecdfbb
RW
3312{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3314as_fn_error $? "cannot compute suffix of object files: cannot compile
3315See \`config.log' for more details" "$LINENO" 5; }
84563040 3316fi
bec39cab
AC
3317rm -f conftest.$ac_cv_objext conftest.$ac_ext
3318fi
81ecdfbb
RW
3319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3320$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3321OBJEXT=$ac_cv_objext
3322ac_objext=$OBJEXT
81ecdfbb
RW
3323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3324$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3325if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3326 $as_echo_n "(cached) " >&6
bec39cab 3327else
81ecdfbb 3328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3329/* end confdefs.h. */
3330
3331int
3332main ()
3333{
3334#ifndef __GNUC__
3335 choke me
3336#endif
84563040 3337
bec39cab
AC
3338 ;
3339 return 0;
3340}
3341_ACEOF
81ecdfbb 3342if ac_fn_c_try_compile "$LINENO"; then :
bec39cab 3343 ac_compiler_gnu=yes
84563040 3344else
81ecdfbb 3345 ac_compiler_gnu=no
84563040 3346fi
81ecdfbb 3347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3348ac_cv_c_compiler_gnu=$ac_compiler_gnu
84563040 3349
bec39cab 3350fi
81ecdfbb
RW
3351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3352$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3353if test $ac_compiler_gnu = yes; then
3354 GCC=yes
3355else
3356 GCC=
3357fi
bec39cab
AC
3358ac_test_CFLAGS=${CFLAGS+set}
3359ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3361$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3362if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb
RW
3363 $as_echo_n "(cached) " >&6
3364else
3365 ac_save_c_werror_flag=$ac_c_werror_flag
3366 ac_c_werror_flag=yes
3367 ac_cv_prog_cc_g=no
3368 CFLAGS="-g"
3369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3370/* end confdefs.h. */
3371
3372int
3373main ()
3374{
3375
3376 ;
3377 return 0;
3378}
3379_ACEOF
81ecdfbb 3380if ac_fn_c_try_compile "$LINENO"; then :
84563040
DJ
3381 ac_cv_prog_cc_g=yes
3382else
81ecdfbb
RW
3383 CFLAGS=""
3384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3385/* end confdefs.h. */
3386
3387int
3388main ()
3389{
3390
3391 ;
3392 return 0;
3393}
3394_ACEOF
3395if ac_fn_c_try_compile "$LINENO"; then :
3396
3397else
3398 ac_c_werror_flag=$ac_save_c_werror_flag
3399 CFLAGS="-g"
3400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401/* end confdefs.h. */
3402
3403int
3404main ()
3405{
84563040 3406
81ecdfbb
RW
3407 ;
3408 return 0;
3409}
3410_ACEOF
3411if ac_fn_c_try_compile "$LINENO"; then :
3412 ac_cv_prog_cc_g=yes
3413fi
3414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 3415fi
81ecdfbb 3416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3417fi
81ecdfbb
RW
3418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3419 ac_c_werror_flag=$ac_save_c_werror_flag
3420fi
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3422$as_echo "$ac_cv_prog_cc_g" >&6; }
84563040 3423if test "$ac_test_CFLAGS" = set; then
bec39cab 3424 CFLAGS=$ac_save_CFLAGS
84563040
DJ
3425elif test $ac_cv_prog_cc_g = yes; then
3426 if test "$GCC" = yes; then
3427 CFLAGS="-g -O2"
3428 else
3429 CFLAGS="-g"
3430 fi
3431else
3432 if test "$GCC" = yes; then
3433 CFLAGS="-O2"
3434 else
3435 CFLAGS=
3436 fi
3437fi
81ecdfbb
RW
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3439$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3440if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3441 $as_echo_n "(cached) " >&6
bec39cab 3442else
81ecdfbb 3443 ac_cv_prog_cc_c89=no
bec39cab 3444ac_save_CC=$CC
81ecdfbb 3445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3446/* end confdefs.h. */
3447#include <stdarg.h>
3448#include <stdio.h>
d0ac1c44 3449struct stat;
bec39cab
AC
3450/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3451struct buf { int x; };
3452FILE * (*rcsopen) (struct buf *, struct stat *, int);
3453static char *e (p, i)
3454 char **p;
3455 int i;
3456{
3457 return p[i];
3458}
3459static char *f (char * (*g) (char **, int), char **p, ...)
3460{
3461 char *s;
3462 va_list v;
3463 va_start (v,p);
3464 s = g (p, va_arg (v,int));
3465 va_end (v);
3466 return s;
3467}
3468
3469/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3470 function prototypes and stuff, but not '\xHH' hex character constants.
3471 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3472 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3473 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3474 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3475 that's true only with -std. */
bec39cab
AC
3476int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3477
81ecdfbb
RW
3478/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3479 inside strings and character constants. */
3480#define FOO(x) 'x'
3481int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3482
bec39cab
AC
3483int test (int i, double x);
3484struct s1 {int (*f) (int a);};
3485struct s2 {int (*f) (double a);};
3486int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3487int argc;
3488char **argv;
3489int
3490main ()
3491{
3492return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3493 ;
3494 return 0;
3495}
3496_ACEOF
81ecdfbb
RW
3497for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3498 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3499do
3500 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3501 if ac_fn_c_try_compile "$LINENO"; then :
3502 ac_cv_prog_cc_c89=$ac_arg
bec39cab 3503fi
81ecdfbb
RW
3504rm -f core conftest.err conftest.$ac_objext
3505 test "x$ac_cv_prog_cc_c89" != "xno" && break
bec39cab 3506done
81ecdfbb 3507rm -f conftest.$ac_ext
bec39cab
AC
3508CC=$ac_save_CC
3509
3510fi
81ecdfbb
RW
3511# AC_CACHE_VAL
3512case "x$ac_cv_prog_cc_c89" in
3513 x)
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3515$as_echo "none needed" >&6; } ;;
3516 xno)
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3518$as_echo "unsupported" >&6; } ;;
bec39cab 3519 *)
81ecdfbb
RW
3520 CC="$CC $ac_cv_prog_cc_c89"
3521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3522$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bec39cab 3523esac
81ecdfbb 3524if test "x$ac_cv_prog_cc_c89" != xno; then :
bec39cab 3525
dae5f5cf
DJ
3526fi
3527
dae5f5cf 3528ac_ext=c
bec39cab
AC
3529ac_cpp='$CPP $CPPFLAGS'
3530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3532ac_compiler_gnu=$ac_cv_c_compiler_gnu
84563040 3533
3bc3d82a
PA
3534ac_ext=cpp
3535ac_cpp='$CXXCPP $CPPFLAGS'
3536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3539if test -z "$CXX"; then
3540 if test -n "$CCC"; then
3541 CXX=$CCC
3542 else
3543 if test -n "$ac_tool_prefix"; then
3544 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3545 do
3546 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3547set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3549$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3550if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3551 $as_echo_n "(cached) " >&6
3552else
3553 if test -n "$CXX"; then
3554 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3555else
3556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3557for as_dir in $PATH
3558do
3559 IFS=$as_save_IFS
3560 test -z "$as_dir" && as_dir=.
3561 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3563 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3565 break 2
3566 fi
3567done
3568 done
3569IFS=$as_save_IFS
3570
3571fi
3572fi
3573CXX=$ac_cv_prog_CXX
3574if test -n "$CXX"; then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3576$as_echo "$CXX" >&6; }
3577else
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3579$as_echo "no" >&6; }
3580fi
3581
3582
3583 test -n "$CXX" && break
3584 done
3585fi
3586if test -z "$CXX"; then
3587 ac_ct_CXX=$CXX
3588 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3589do
3590 # Extract the first word of "$ac_prog", so it can be a program name with args.
3591set dummy $ac_prog; ac_word=$2
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3593$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3594if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3595 $as_echo_n "(cached) " >&6
3596else
3597 if test -n "$ac_ct_CXX"; then
3598 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3599else
3600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601for as_dir in $PATH
3602do
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
3605 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3607 ac_cv_prog_ac_ct_CXX="$ac_prog"
3608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3609 break 2
3610 fi
3611done
3612 done
3613IFS=$as_save_IFS
3614
3615fi
3616fi
3617ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3618if test -n "$ac_ct_CXX"; then
3619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3620$as_echo "$ac_ct_CXX" >&6; }
3621else
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3623$as_echo "no" >&6; }
3624fi
3625
3626
3627 test -n "$ac_ct_CXX" && break
3628done
3629
3630 if test "x$ac_ct_CXX" = x; then
3631 CXX="g++"
3632 else
3633 case $cross_compiling:$ac_tool_warned in
3634yes:)
3635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3637ac_tool_warned=yes ;;
3638esac
3639 CXX=$ac_ct_CXX
3640 fi
3641fi
3642
3643 fi
3644fi
3645# Provide some information about the compiler.
3646$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3647set X $ac_compile
3648ac_compiler=$2
3649for ac_option in --version -v -V -qversion; do
3650 { { ac_try="$ac_compiler $ac_option >&5"
3651case "(($ac_try" in
3652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3653 *) ac_try_echo=$ac_try;;
3654esac
3655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3656$as_echo "$ac_try_echo"; } >&5
3657 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3658 ac_status=$?
3659 if test -s conftest.err; then
3660 sed '10a\
3661... rest of stderr output deleted ...
3662 10q' conftest.err >conftest.er1
3663 cat conftest.er1 >&5
3bc3d82a 3664 fi
d0ac1c44 3665 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }
3668done
3669
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3671$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3672if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3673 $as_echo_n "(cached) " >&6
3674else
3675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3676/* end confdefs.h. */
3677
3678int
3679main ()
3680{
3681#ifndef __GNUC__
3682 choke me
3683#endif
3684
3685 ;
3686 return 0;
3687}
3688_ACEOF
3689if ac_fn_cxx_try_compile "$LINENO"; then :
3690 ac_compiler_gnu=yes
3691else
3692 ac_compiler_gnu=no
3693fi
3694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3695ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3696
3697fi
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3699$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3700if test $ac_compiler_gnu = yes; then
3701 GXX=yes
3702else
3703 GXX=
3704fi
3705ac_test_CXXFLAGS=${CXXFLAGS+set}
3706ac_save_CXXFLAGS=$CXXFLAGS
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3708$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3709if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3710 $as_echo_n "(cached) " >&6
3711else
3712 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3713 ac_cxx_werror_flag=yes
3714 ac_cv_prog_cxx_g=no
3715 CXXFLAGS="-g"
3716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3717/* end confdefs.h. */
3718
3719int
3720main ()
3721{
3722
3723 ;
3724 return 0;
3725}
3726_ACEOF
3727if ac_fn_cxx_try_compile "$LINENO"; then :
3728 ac_cv_prog_cxx_g=yes
3729else
3730 CXXFLAGS=""
3731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3732/* end confdefs.h. */
3733
3734int
3735main ()
3736{
3737
3738 ;
3739 return 0;
3740}
3741_ACEOF
3742if ac_fn_cxx_try_compile "$LINENO"; then :
3743
3744else
3745 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3746 CXXFLAGS="-g"
3747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3748/* end confdefs.h. */
3749
3750int
3751main ()
3752{
3753
3754 ;
3755 return 0;
3756}
3757_ACEOF
3758if ac_fn_cxx_try_compile "$LINENO"; then :
3759 ac_cv_prog_cxx_g=yes
3760fi
3761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3762fi
3763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3764fi
3765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3766 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3767fi
3768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3769$as_echo "$ac_cv_prog_cxx_g" >&6; }
3770if test "$ac_test_CXXFLAGS" = set; then
3771 CXXFLAGS=$ac_save_CXXFLAGS
3772elif test $ac_cv_prog_cxx_g = yes; then
3773 if test "$GXX" = yes; then
3774 CXXFLAGS="-g -O2"
3775 else
3776 CXXFLAGS="-g"
3777 fi
3778else
3779 if test "$GXX" = yes; then
3780 CXXFLAGS="-O2"
3781 else
3782 CXXFLAGS=
3783 fi
3784fi
3785ac_ext=c
3786ac_cpp='$CPP $CPPFLAGS'
3787ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3788ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3789ac_compiler_gnu=$ac_cv_c_compiler_gnu
3790
c9a1864a
YQ
3791
3792ac_ext=c
3793ac_cpp='$CPP $CPPFLAGS'
3794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3796ac_compiler_gnu=$ac_cv_c_compiler_gnu
3797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3798$as_echo_n "checking how to run the C preprocessor... " >&6; }
3799# On Suns, sometimes $CPP names a directory.
3800if test -n "$CPP" && test -d "$CPP"; then
3801 CPP=
3802fi
3803if test -z "$CPP"; then
d0ac1c44 3804 if ${ac_cv_prog_CPP+:} false; then :
c9a1864a
YQ
3805 $as_echo_n "(cached) " >&6
3806else
3807 # Double quotes because CPP needs to be expanded
3808 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3809 do
3810 ac_preproc_ok=false
3811for ac_c_preproc_warn_flag in '' yes
3812do
3813 # Use a header file that comes with gcc, so configuring glibc
3814 # with a fresh cross-compiler works.
3815 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3816 # <limits.h> exists even on freestanding compilers.
3817 # On the NeXT, cc -E runs the code through the compiler's parser,
3818 # not just through cpp. "Syntax error" is here to catch this case.
3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3820/* end confdefs.h. */
3821#ifdef __STDC__
3822# include <limits.h>
3823#else
3824# include <assert.h>
3825#endif
3826 Syntax error
3827_ACEOF
3828if ac_fn_c_try_cpp "$LINENO"; then :
3829
3830else
3831 # Broken: fails on valid input.
3832continue
3833fi
d0ac1c44 3834rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3835
3836 # OK, works on sane cases. Now check whether nonexistent headers
3837 # can be detected and how.
3838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3839/* end confdefs.h. */
3840#include <ac_nonexistent.h>
3841_ACEOF
3842if ac_fn_c_try_cpp "$LINENO"; then :
3843 # Broken: success on invalid input.
3844continue
3845else
3846 # Passes both tests.
3847ac_preproc_ok=:
3848break
3849fi
d0ac1c44 3850rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3851
3852done
3853# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3854rm -f conftest.i conftest.err conftest.$ac_ext
c9a1864a
YQ
3855if $ac_preproc_ok; then :
3856 break
3857fi
3858
3859 done
3860 ac_cv_prog_CPP=$CPP
3861
3862fi
3863 CPP=$ac_cv_prog_CPP
3864else
3865 ac_cv_prog_CPP=$CPP
3866fi
3867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3868$as_echo "$CPP" >&6; }
3869ac_preproc_ok=false
3870for ac_c_preproc_warn_flag in '' yes
3871do
3872 # Use a header file that comes with gcc, so configuring glibc
3873 # with a fresh cross-compiler works.
3874 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3875 # <limits.h> exists even on freestanding compilers.
3876 # On the NeXT, cc -E runs the code through the compiler's parser,
3877 # not just through cpp. "Syntax error" is here to catch this case.
3878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3879/* end confdefs.h. */
3880#ifdef __STDC__
3881# include <limits.h>
3882#else
3883# include <assert.h>
3884#endif
3885 Syntax error
3886_ACEOF
3887if ac_fn_c_try_cpp "$LINENO"; then :
3888
3889else
3890 # Broken: fails on valid input.
3891continue
3892fi
d0ac1c44 3893rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3894
3895 # OK, works on sane cases. Now check whether nonexistent headers
3896 # can be detected and how.
81ecdfbb 3897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3898/* end confdefs.h. */
3899#include <ac_nonexistent.h>
3900_ACEOF
81ecdfbb 3901if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3902 # Broken: success on invalid input.
3903continue
3904else
bec39cab
AC
3905 # Passes both tests.
3906ac_preproc_ok=:
3907break
3908fi
d0ac1c44 3909rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab
AC
3910
3911done
3912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3913rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
3914if $ac_preproc_ok; then :
3915
3916else
3917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3919as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3920See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3921fi
3922
81ecdfbb
RW
3923ac_ext=c
3924ac_cpp='$CPP $CPPFLAGS'
3925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3927ac_compiler_gnu=$ac_cv_c_compiler_gnu
bec39cab 3928
81ecdfbb
RW
3929
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3931$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 3932if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 3933 $as_echo_n "(cached) " >&6
bec39cab 3934else
81ecdfbb
RW
3935 if test -z "$GREP"; then
3936 ac_path_GREP_found=false
3937 # Loop through the user's path and test for each of PROGNAME-LIST
3938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3939for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
bec39cab 3940do
81ecdfbb
RW
3941 IFS=$as_save_IFS
3942 test -z "$as_dir" && as_dir=.
3943 for ac_prog in grep ggrep; do
3944 for ac_exec_ext in '' $ac_executable_extensions; do
3945 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3946 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
3947# Check for GNU ac_path_GREP and select it if it is found.
3948 # Check for GNU $ac_path_GREP
3949case `"$ac_path_GREP" --version 2>&1` in
3950*GNU*)
3951 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3952*)
3953 ac_count=0
3954 $as_echo_n 0123456789 >"conftest.in"
3955 while :
3956 do
3957 cat "conftest.in" "conftest.in" >"conftest.tmp"
3958 mv "conftest.tmp" "conftest.in"
3959 cp "conftest.in" "conftest.nl"
3960 $as_echo 'GREP' >> "conftest.nl"
3961 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3962 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3963 as_fn_arith $ac_count + 1 && ac_count=$as_val
3964 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3965 # Best one so far, save it but keep looking for a better one
3966 ac_cv_path_GREP="$ac_path_GREP"
3967 ac_path_GREP_max=$ac_count
3968 fi
3969 # 10*(2^10) chars as input seems more than enough
3970 test $ac_count -gt 10 && break
3971 done
3972 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3973esac
3974
3975 $ac_path_GREP_found && break 3
3976 done
3977 done
3978 done
3979IFS=$as_save_IFS
3980 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 3981 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
bec39cab
AC
3982 fi
3983else
81ecdfbb 3984 ac_cv_path_GREP=$GREP
bec39cab 3985fi
bec39cab 3986
84563040 3987fi
81ecdfbb
RW
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3989$as_echo "$ac_cv_path_GREP" >&6; }
3990 GREP="$ac_cv_path_GREP"
bec39cab 3991
bec39cab 3992
81ecdfbb
RW
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3994$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 3995if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb
RW
3996 $as_echo_n "(cached) " >&6
3997else
3998 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3999 then ac_cv_path_EGREP="$GREP -E"
4000 else
4001 if test -z "$EGREP"; then
4002 ac_path_EGREP_found=false
4003 # Loop through the user's path and test for each of PROGNAME-LIST
4004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4005for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4006do
4007 IFS=$as_save_IFS
4008 test -z "$as_dir" && as_dir=.
4009 for ac_prog in egrep; do
4010 for ac_exec_ext in '' $ac_executable_extensions; do
4011 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4012 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4013# Check for GNU ac_path_EGREP and select it if it is found.
4014 # Check for GNU $ac_path_EGREP
4015case `"$ac_path_EGREP" --version 2>&1` in
4016*GNU*)
4017 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4018*)
4019 ac_count=0
4020 $as_echo_n 0123456789 >"conftest.in"
4021 while :
4022 do
4023 cat "conftest.in" "conftest.in" >"conftest.tmp"
4024 mv "conftest.tmp" "conftest.in"
4025 cp "conftest.in" "conftest.nl"
4026 $as_echo 'EGREP' >> "conftest.nl"
4027 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4028 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4029 as_fn_arith $ac_count + 1 && ac_count=$as_val
4030 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4031 # Best one so far, save it but keep looking for a better one
4032 ac_cv_path_EGREP="$ac_path_EGREP"
4033 ac_path_EGREP_max=$ac_count
4034 fi
4035 # 10*(2^10) chars as input seems more than enough
4036 test $ac_count -gt 10 && break
4037 done
4038 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4039esac
bec39cab 4040
81ecdfbb
RW
4041 $ac_path_EGREP_found && break 3
4042 done
4043 done
4044 done
4045IFS=$as_save_IFS
4046 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4047 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4048 fi
bec39cab 4049else
81ecdfbb 4050 ac_cv_path_EGREP=$EGREP
84563040 4051fi
bec39cab 4052
81ecdfbb 4053 fi
b80864fb 4054fi
81ecdfbb
RW
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4056$as_echo "$ac_cv_path_EGREP" >&6; }
4057 EGREP="$ac_cv_path_EGREP"
b80864fb
DJ
4058
4059
c971b7fa
PA
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4061$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4062if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4063 $as_echo_n "(cached) " >&6
4064else
4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4066/* end confdefs.h. */
4067#include <stdlib.h>
4068#include <stdarg.h>
4069#include <string.h>
4070#include <float.h>
bec39cab 4071
c971b7fa
PA
4072int
4073main ()
4074{
bec39cab 4075
c971b7fa
PA
4076 ;
4077 return 0;
4078}
4079_ACEOF
4080if ac_fn_c_try_compile "$LINENO"; then :
4081 ac_cv_header_stdc=yes
84563040 4082else
c971b7fa
PA
4083 ac_cv_header_stdc=no
4084fi
4085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 4086
c971b7fa
PA
4087if test $ac_cv_header_stdc = yes; then
4088 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4090/* end confdefs.h. */
c971b7fa 4091#include <string.h>
bec39cab
AC
4092
4093_ACEOF
84563040 4094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
c971b7fa
PA
4095 $EGREP "memchr" >/dev/null 2>&1; then :
4096
84563040 4097else
c971b7fa 4098 ac_cv_header_stdc=no
84563040
DJ
4099fi
4100rm -f conftest*
4101
770d76d7 4102fi
81ecdfbb 4103
c971b7fa
PA
4104if test $ac_cv_header_stdc = yes; then
4105 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4107/* end confdefs.h. */
4108#include <stdlib.h>
4109
4110_ACEOF
4111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4112 $EGREP "free" >/dev/null 2>&1; then :
4113
770d76d7 4114else
c971b7fa 4115 ac_cv_header_stdc=no
bec39cab 4116fi
c971b7fa 4117rm -f conftest*
bec39cab
AC
4118
4119fi
c971b7fa
PA
4120
4121if test $ac_cv_header_stdc = yes; then
4122 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4123 if test "$cross_compiling" = yes; then :
4124 :
770d76d7 4125else
c971b7fa
PA
4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4127/* end confdefs.h. */
4128#include <ctype.h>
4129#include <stdlib.h>
4130#if ((' ' & 0x0FF) == 0x020)
4131# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4132# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4133#else
4134# define ISLOWER(c) \
4135 (('a' <= (c) && (c) <= 'i') \
4136 || ('j' <= (c) && (c) <= 'r') \
4137 || ('s' <= (c) && (c) <= 'z'))
4138# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4139#endif
4140
4141#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4142int
4143main ()
4144{
4145 int i;
4146 for (i = 0; i < 256; i++)
4147 if (XOR (islower (i), ISLOWER (i))
4148 || toupper (i) != TOUPPER (i))
4149 return 2;
4150 return 0;
4151}
4152_ACEOF
4153if ac_fn_c_try_run "$LINENO"; then :
4154
770d76d7 4155else
c971b7fa
PA
4156 ac_cv_header_stdc=no
4157fi
4158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4159 conftest.$ac_objext conftest.beam conftest.$ac_ext
4160fi
bec39cab 4161
770d76d7
PA
4162fi
4163fi
c971b7fa
PA
4164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4165$as_echo "$ac_cv_header_stdc" >&6; }
4166if test $ac_cv_header_stdc = yes; then
4167
4168$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4169
770d76d7 4170fi
bec39cab 4171
c971b7fa
PA
4172# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4173for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4174 inttypes.h stdint.h unistd.h
4175do :
4176 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4177ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4178"
d0ac1c44 4179if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4180 cat >>confdefs.h <<_ACEOF
4181#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4182_ACEOF
4183
81ecdfbb 4184fi
bec39cab 4185
c971b7fa 4186done
bec39cab
AC
4187
4188
4189
c971b7fa 4190 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4191if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa 4192 MINIX=yes
770d76d7 4193else
c971b7fa 4194 MINIX=
770d76d7 4195fi
bec39cab
AC
4196
4197
c971b7fa
PA
4198 if test "$MINIX" = yes; then
4199
4200$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4201
4202
4203$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4204
4205
4206$as_echo "#define _MINIX 1" >>confdefs.h
4207
770d76d7 4208 fi
bec39cab 4209
c971b7fa
PA
4210
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4212$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4213if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa 4214 $as_echo_n "(cached) " >&6
770d76d7 4215else
c971b7fa
PA
4216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4217/* end confdefs.h. */
bec39cab 4218
d0ac1c44
SM
4219# define __EXTENSIONS__ 1
4220 $ac_includes_default
c971b7fa
PA
4221int
4222main ()
4223{
4224
4225 ;
4226 return 0;
4227}
4228_ACEOF
4229if ac_fn_c_try_compile "$LINENO"; then :
4230 ac_cv_safe_to_define___extensions__=yes
770d76d7 4231else
c971b7fa
PA
4232 ac_cv_safe_to_define___extensions__=no
4233fi
4234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
770d76d7 4235fi
c971b7fa
PA
4236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4237$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4238 test $ac_cv_safe_to_define___extensions__ = yes &&
4239 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4240
4241 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4242
4243 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4244
4245 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4246
4247 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4248
bec39cab 4249
589bc927
TT
4250# Check whether --enable-largefile was given.
4251if test "${enable_largefile+set}" = set; then :
4252 enableval=$enable_largefile;
4253fi
4254
4255if test "$enable_largefile" != no; then
4256
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4258$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4259if ${ac_cv_sys_largefile_CC+:} false; then :
589bc927
TT
4260 $as_echo_n "(cached) " >&6
4261else
4262 ac_cv_sys_largefile_CC=no
4263 if test "$GCC" != yes; then
4264 ac_save_CC=$CC
4265 while :; do
4266 # IRIX 6.2 and later do not support large files by default,
4267 # so use the C compiler's -n32 option if that helps.
4268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4269/* end confdefs.h. */
4270#include <sys/types.h>
4271 /* Check that off_t can represent 2**63 - 1 correctly.
4272 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4273 since some C++ compilers masquerading as C compilers
4274 incorrectly reject 9223372036854775807. */
4275#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4276 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4277 && LARGE_OFF_T % 2147483647 == 1)
4278 ? 1 : -1];
4279int
4280main ()
4281{
4282
4283 ;
4284 return 0;
4285}
4286_ACEOF
4287 if ac_fn_c_try_compile "$LINENO"; then :
4288 break
4289fi
4290rm -f core conftest.err conftest.$ac_objext
4291 CC="$CC -n32"
4292 if ac_fn_c_try_compile "$LINENO"; then :
4293 ac_cv_sys_largefile_CC=' -n32'; break
4294fi
4295rm -f core conftest.err conftest.$ac_objext
4296 break
4297 done
4298 CC=$ac_save_CC
4299 rm -f conftest.$ac_ext
4300 fi
4301fi
4302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4303$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4304 if test "$ac_cv_sys_largefile_CC" != no; then
4305 CC=$CC$ac_cv_sys_largefile_CC
4306 fi
4307
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4309$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4310if ${ac_cv_sys_file_offset_bits+:} false; then :
589bc927
TT
4311 $as_echo_n "(cached) " >&6
4312else
4313 while :; do
4314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4315/* end confdefs.h. */
4316#include <sys/types.h>
4317 /* Check that off_t can represent 2**63 - 1 correctly.
4318 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4319 since some C++ compilers masquerading as C compilers
4320 incorrectly reject 9223372036854775807. */
4321#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4322 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4323 && LARGE_OFF_T % 2147483647 == 1)
4324 ? 1 : -1];
4325int
4326main ()
4327{
4328
4329 ;
4330 return 0;
4331}
4332_ACEOF
4333if ac_fn_c_try_compile "$LINENO"; then :
4334 ac_cv_sys_file_offset_bits=no; break
4335fi
4336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4338/* end confdefs.h. */
4339#define _FILE_OFFSET_BITS 64
4340#include <sys/types.h>
4341 /* Check that off_t can represent 2**63 - 1 correctly.
4342 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4343 since some C++ compilers masquerading as C compilers
4344 incorrectly reject 9223372036854775807. */
4345#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4346 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4347 && LARGE_OFF_T % 2147483647 == 1)
4348 ? 1 : -1];
4349int
4350main ()
4351{
4352
4353 ;
4354 return 0;
4355}
4356_ACEOF
4357if ac_fn_c_try_compile "$LINENO"; then :
4358 ac_cv_sys_file_offset_bits=64; break
4359fi
4360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4361 ac_cv_sys_file_offset_bits=unknown
4362 break
4363done
4364fi
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4366$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4367case $ac_cv_sys_file_offset_bits in #(
4368 no | unknown) ;;
4369 *)
4370cat >>confdefs.h <<_ACEOF
4371#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4372_ACEOF
4373;;
4374esac
4375rm -rf conftest*
4376 if test $ac_cv_sys_file_offset_bits = unknown; then
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4378$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4379if ${ac_cv_sys_large_files+:} false; then :
589bc927
TT
4380 $as_echo_n "(cached) " >&6
4381else
4382 while :; do
4383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4384/* end confdefs.h. */
4385#include <sys/types.h>
4386 /* Check that off_t can represent 2**63 - 1 correctly.
4387 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4388 since some C++ compilers masquerading as C compilers
4389 incorrectly reject 9223372036854775807. */
4390#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4391 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4392 && LARGE_OFF_T % 2147483647 == 1)
4393 ? 1 : -1];
4394int
4395main ()
4396{
4397
4398 ;
4399 return 0;
4400}
4401_ACEOF
4402if ac_fn_c_try_compile "$LINENO"; then :
4403 ac_cv_sys_large_files=no; break
4404fi
4405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#define _LARGE_FILES 1
4409#include <sys/types.h>
4410 /* Check that off_t can represent 2**63 - 1 correctly.
4411 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4412 since some C++ compilers masquerading as C compilers
4413 incorrectly reject 9223372036854775807. */
4414#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4415 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4416 && LARGE_OFF_T % 2147483647 == 1)
4417 ? 1 : -1];
4418int
4419main ()
4420{
4421
4422 ;
4423 return 0;
4424}
4425_ACEOF
4426if ac_fn_c_try_compile "$LINENO"; then :
4427 ac_cv_sys_large_files=1; break
4428fi
4429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4430 ac_cv_sys_large_files=unknown
4431 break
4432done
4433fi
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4435$as_echo "$ac_cv_sys_large_files" >&6; }
4436case $ac_cv_sys_large_files in #(
4437 no | unknown) ;;
4438 *)
4439cat >>confdefs.h <<_ACEOF
4440#define _LARGE_FILES $ac_cv_sys_large_files
4441_ACEOF
4442;;
4443esac
4444rm -rf conftest*
4445 fi
d0ac1c44
SM
4446
4447
589bc927
TT
4448fi
4449
770d76d7
PA
4450ac_aux_dir=
4451for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4452 if test -f "$ac_dir/install-sh"; then
4453 ac_aux_dir=$ac_dir
4454 ac_install_sh="$ac_aux_dir/install-sh -c"
4455 break
4456 elif test -f "$ac_dir/install.sh"; then
4457 ac_aux_dir=$ac_dir
4458 ac_install_sh="$ac_aux_dir/install.sh -c"
4459 break
4460 elif test -f "$ac_dir/shtool"; then
4461 ac_aux_dir=$ac_dir
4462 ac_install_sh="$ac_aux_dir/shtool install -c"
4463 break
4464 fi
770d76d7
PA
4465done
4466if test -z "$ac_aux_dir"; then
d0ac1c44 4467 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
770d76d7
PA
4468fi
4469
4470# These three variables are undocumented and unsupported,
4471# and are intended to be withdrawn in a future Autoconf release.
4472# They can cause serious problems if a builder's source tree is in a directory
4473# whose full name contains unusual characters.
4474ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4475ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4476ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
c9a1864a 4477
bec39cab 4478
bdaed379
HD
4479# Expand $ac_aux_dir to an absolute path.
4480am_aux_dir=`cd "$ac_aux_dir" && pwd`
4481
4482if test x"${install_sh+set}" != xset; then
4483 case $am_aux_dir in
4484 *\ * | *\ *)
4485 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4486 *)
4487 install_sh="\${SHELL} $am_aux_dir/install-sh"
4488 esac
4489fi
4490
4491# Installed binaries are usually stripped using 'strip' when the user
4492# run "make install-strip". However 'strip' might not be the right
4493# tool to use in cross-compilation environments, therefore Automake
4494# will honor the 'STRIP' environment variable to overrule this program.
4495if test "$cross_compiling" != no; then
4496 if test -n "$ac_tool_prefix"; then
4497 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4498set dummy ${ac_tool_prefix}strip; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_prog_STRIP+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 if test -n "$STRIP"; then
4505 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4506else
4507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH
4509do
4510 IFS=$as_save_IFS
4511 test -z "$as_dir" && as_dir=.
4512 for ac_exec_ext in '' $ac_executable_extensions; do
4513 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4514 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4516 break 2
4517 fi
4518done
4519 done
4520IFS=$as_save_IFS
4521
4522fi
4523fi
4524STRIP=$ac_cv_prog_STRIP
4525if test -n "$STRIP"; then
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4527$as_echo "$STRIP" >&6; }
4528else
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4530$as_echo "no" >&6; }
4531fi
4532
4533
4534fi
4535if test -z "$ac_cv_prog_STRIP"; then
4536 ac_ct_STRIP=$STRIP
4537 # Extract the first word of "strip", so it can be a program name with args.
4538set dummy strip; ac_word=$2
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
4541if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4542 $as_echo_n "(cached) " >&6
4543else
4544 if test -n "$ac_ct_STRIP"; then
4545 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4546else
4547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550 IFS=$as_save_IFS
4551 test -z "$as_dir" && as_dir=.
4552 for ac_exec_ext in '' $ac_executable_extensions; do
4553 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4554 ac_cv_prog_ac_ct_STRIP="strip"
4555 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556 break 2
4557 fi
4558done
4559 done
4560IFS=$as_save_IFS
4561
4562fi
4563fi
4564ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4565if test -n "$ac_ct_STRIP"; then
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4567$as_echo "$ac_ct_STRIP" >&6; }
4568else
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4570$as_echo "no" >&6; }
4571fi
4572
4573 if test "x$ac_ct_STRIP" = x; then
4574 STRIP=":"
4575 else
4576 case $cross_compiling:$ac_tool_warned in
4577yes:)
4578{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4579$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4580ac_tool_warned=yes ;;
4581esac
4582 STRIP=$ac_ct_STRIP
4583 fi
4584else
4585 STRIP="$ac_cv_prog_STRIP"
4586fi
4587
4588fi
4589INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4590
4591
91e1a0ed 4592# Set build, build_cpu, build_vendor and build_os.
770d76d7
PA
4593# Make sure we can run config.sub.
4594$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4595 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7
PA
4596
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4598$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4599if ${ac_cv_build+:} false; then :
81ecdfbb
RW
4600 $as_echo_n "(cached) " >&6
4601else
770d76d7
PA
4602 ac_build_alias=$build_alias
4603test "x$ac_build_alias" = x &&
4604 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4605test "x$ac_build_alias" = x &&
d0ac1c44 4606 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
770d76d7 4607ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4608 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
770d76d7
PA
4609
4610fi
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4612$as_echo "$ac_cv_build" >&6; }
4613case $ac_cv_build in
4614*-*-*) ;;
d0ac1c44 4615*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7
PA
4616esac
4617build=$ac_cv_build
4618ac_save_IFS=$IFS; IFS='-'
4619set x $ac_cv_build
4620shift
4621build_cpu=$1
4622build_vendor=$2
4623shift; shift
4624# Remember, the first character of IFS is used to create $*,
4625# except with old shells:
4626build_os=$*
4627IFS=$ac_save_IFS
4628case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4629
4630
91e1a0ed
SM
4631
4632# Set host, host_cpu, host_vendor, and host_os.
770d76d7
PA
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4634$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4635if ${ac_cv_host+:} false; then :
770d76d7
PA
4636 $as_echo_n "(cached) " >&6
4637else
4638 if test "x$host_alias" = x; then
4639 ac_cv_host=$ac_cv_build
4640else
4641 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4642 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
770d76d7
PA
4643fi
4644
4645fi
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4647$as_echo "$ac_cv_host" >&6; }
4648case $ac_cv_host in
4649*-*-*) ;;
d0ac1c44 4650*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
770d76d7
PA
4651esac
4652host=$ac_cv_host
4653ac_save_IFS=$IFS; IFS='-'
4654set x $ac_cv_host
4655shift
4656host_cpu=$1
4657host_vendor=$2
4658shift; shift
4659# Remember, the first character of IFS is used to create $*,
4660# except with old shells:
4661host_os=$*
4662IFS=$ac_save_IFS
4663case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4664
4665
91e1a0ed
SM
4666
4667# Set target, target_cpu, target_vendor, and target_os.
c971b7fa
PA
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4669$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4670if ${ac_cv_target+:} false; then :
770d76d7
PA
4671 $as_echo_n "(cached) " >&6
4672else
c971b7fa
PA
4673 if test "x$target_alias" = x; then
4674 ac_cv_target=$ac_cv_host
770d76d7 4675else
c971b7fa 4676 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4677 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
770d76d7 4678fi
770d76d7
PA
4679
4680fi
c971b7fa
PA
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4682$as_echo "$ac_cv_target" >&6; }
4683case $ac_cv_target in
4684*-*-*) ;;
d0ac1c44 4685*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
4686esac
4687target=$ac_cv_target
4688ac_save_IFS=$IFS; IFS='-'
4689set x $ac_cv_target
4690shift
4691target_cpu=$1
4692target_vendor=$2
4693shift; shift
4694# Remember, the first character of IFS is used to create $*,
4695# except with old shells:
4696target_os=$*
4697IFS=$ac_save_IFS
4698case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
770d76d7 4699
770d76d7 4700
c971b7fa
PA
4701# The aliases save the names the user supplied, while $host etc.
4702# will get canonicalized.
4703test -n "$target_alias" &&
4704 test "$program_prefix$program_suffix$program_transform_name" = \
4705 NONENONEs,x,x, &&
4706 program_prefix=${target_alias}-
770d76d7 4707
c971b7fa
PA
4708# Find a good install program. We prefer a C program (faster),
4709# so one script is as good as another. But avoid the broken or
4710# incompatible versions:
4711# SysV /etc/install, /usr/sbin/install
4712# SunOS /usr/etc/install
4713# IRIX /sbin/install
4714# AIX /bin/install
4715# AmigaOS /C/install, which installs bootblocks on floppy discs
4716# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4717# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4718# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4719# OS/2's system install, which has a completely different semantic
4720# ./install, which can be erroneously created by make from ./install.sh.
4721# Reject install programs that cannot install multiple files.
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4723$as_echo_n "checking for a BSD-compatible install... " >&6; }
4724if test -z "$INSTALL"; then
d0ac1c44 4725if ${ac_cv_path_install+:} false; then :
c971b7fa 4726 $as_echo_n "(cached) " >&6
81ecdfbb
RW
4727else
4728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in $PATH
fd462a61 4730do
81ecdfbb
RW
4731 IFS=$as_save_IFS
4732 test -z "$as_dir" && as_dir=.
4733 # Account for people who put trailing slashes in PATH elements.
4734case $as_dir/ in #((
4735 ./ | .// | /[cC]/* | \
4736 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4737 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4738 /usr/ucb/* ) ;;
4739 *)
4740 # OSF1 and SCO ODT 3.0 have their own names for install.
4741 # Don't use installbsd from OSF since it installs stuff as root
4742 # by default.
4743 for ac_prog in ginstall scoinst install; do
4744 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4745 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
81ecdfbb
RW
4746 if test $ac_prog = install &&
4747 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4748 # AIX install. It has an incompatible calling convention.
4749 :
4750 elif test $ac_prog = install &&
4751 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4752 # program-specific install script used by HP pwplus--don't use.
4753 :
4754 else
4755 rm -rf conftest.one conftest.two conftest.dir
4756 echo one > conftest.one
4757 echo two > conftest.two
4758 mkdir conftest.dir
4759 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4760 test -s conftest.one && test -s conftest.two &&
4761 test -s conftest.dir/conftest.one &&
4762 test -s conftest.dir/conftest.two
4763 then
4764 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4765 break 3
4766 fi
4767 fi
4768 fi
4769 done
4770 done
4771 ;;
4772esac
fd462a61 4773
81ecdfbb
RW
4774 done
4775IFS=$as_save_IFS
fd462a61 4776
81ecdfbb 4777rm -rf conftest.one conftest.two conftest.dir
fd462a61 4778
fd462a61 4779fi
81ecdfbb
RW
4780 if test "${ac_cv_path_install+set}" = set; then
4781 INSTALL=$ac_cv_path_install
4782 else
4783 # As a last resort, use the slow shell script. Don't cache a
4784 # value for INSTALL within a source directory, because that will
4785 # break other packages using the cache if that directory is
4786 # removed, or if the value is a relative name.
4787 INSTALL=$ac_install_sh
4788 fi
fd462a61 4789fi
81ecdfbb
RW
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4791$as_echo "$INSTALL" >&6; }
fd462a61 4792
81ecdfbb
RW
4793# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4794# It thinks the first close brace ends the variable substitution.
4795test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
fd462a61 4796
81ecdfbb 4797test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
fd462a61 4798
81ecdfbb 4799test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
e28b3332 4800
e1d2394b
MS
4801if test -n "$ac_tool_prefix"; then
4802 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4803set dummy ${ac_tool_prefix}ar; ac_word=$2
4804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4806if ${ac_cv_prog_AR+:} false; then :
e1d2394b
MS
4807 $as_echo_n "(cached) " >&6
4808else
4809 if test -n "$AR"; then
4810 ac_cv_prog_AR="$AR" # Let the user override the test.
4811else
4812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813for as_dir in $PATH
4814do
4815 IFS=$as_save_IFS
4816 test -z "$as_dir" && as_dir=.
4817 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4818 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4819 ac_cv_prog_AR="${ac_tool_prefix}ar"
4820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821 break 2
4822 fi
4823done
4824 done
4825IFS=$as_save_IFS
4826
4827fi
4828fi
4829AR=$ac_cv_prog_AR
4830if test -n "$AR"; then
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4832$as_echo "$AR" >&6; }
4833else
4834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835$as_echo "no" >&6; }
4836fi
4837
4838
4839fi
4840if test -z "$ac_cv_prog_AR"; then
4841 ac_ct_AR=$AR
4842 # Extract the first word of "ar", so it can be a program name with args.
4843set dummy ar; ac_word=$2
4844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4845$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4846if ${ac_cv_prog_ac_ct_AR+:} false; then :
e1d2394b
MS
4847 $as_echo_n "(cached) " >&6
4848else
4849 if test -n "$ac_ct_AR"; then
4850 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4851else
4852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853for as_dir in $PATH
4854do
4855 IFS=$as_save_IFS
4856 test -z "$as_dir" && as_dir=.
4857 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4859 ac_cv_prog_ac_ct_AR="ar"
4860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4861 break 2
4862 fi
4863done
4864 done
4865IFS=$as_save_IFS
4866
4867fi
4868fi
4869ac_ct_AR=$ac_cv_prog_ac_ct_AR
4870if test -n "$ac_ct_AR"; then
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4872$as_echo "$ac_ct_AR" >&6; }
4873else
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
4876fi
4877
4878 if test "x$ac_ct_AR" = x; then
4879 AR=""
4880 else
4881 case $cross_compiling:$ac_tool_warned in
4882yes:)
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4885ac_tool_warned=yes ;;
4886esac
4887 AR=$ac_ct_AR
4888 fi
4889else
4890 AR="$ac_cv_prog_AR"
4891fi
4892
c971b7fa
PA
4893if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4898if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb
RW
4899 $as_echo_n "(cached) " >&6
4900else
c971b7fa
PA
4901 if test -n "$RANLIB"; then
4902 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
e28b3332 4903else
c971b7fa
PA
4904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907 IFS=$as_save_IFS
4908 test -z "$as_dir" && as_dir=.
4909 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4911 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913 break 2
4914 fi
4915done
4916 done
4917IFS=$as_save_IFS
4918
4919fi
4920fi
4921RANLIB=$ac_cv_prog_RANLIB
4922if test -n "$RANLIB"; then
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4924$as_echo "$RANLIB" >&6; }
4925else
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
4930
4931fi
4932if test -z "$ac_cv_prog_RANLIB"; then
4933 ac_ct_RANLIB=$RANLIB
4934 # Extract the first word of "ranlib", so it can be a program name with args.
4935set dummy ranlib; ac_word=$2
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4938if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
4939 $as_echo_n "(cached) " >&6
4940else
4941 if test -n "$ac_ct_RANLIB"; then
4942 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4943else
4944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947 IFS=$as_save_IFS
4948 test -z "$as_dir" && as_dir=.
4949 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4950 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4951 ac_cv_prog_ac_ct_RANLIB="ranlib"
4952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4953 break 2
4954 fi
4955done
4956 done
4957IFS=$as_save_IFS
4958
4959fi
4960fi
4961ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4962if test -n "$ac_ct_RANLIB"; then
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4964$as_echo "$ac_ct_RANLIB" >&6; }
4965else
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
4970 if test "x$ac_ct_RANLIB" = x; then
4971 RANLIB=":"
4972 else
4973 case $cross_compiling:$ac_tool_warned in
4974yes:)
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4976$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4977ac_tool_warned=yes ;;
4978esac
4979 RANLIB=$ac_ct_RANLIB
4980 fi
4981else
4982 RANLIB="$ac_cv_prog_RANLIB"
4983fi
4984
4985
4986test "$program_prefix" != NONE &&
4987 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4988# Use a double $ so make ignores it.
4989test "$program_suffix" != NONE &&
4990 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4991# Double any \ or $.
4992# By default was `s,x,x', remove it if useless.
4993ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4994program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4995
4996
0bcda685
PA
4997# We require a C++11 compiler. Check if one is available, and if
4998# necessary, set CXX_DIALECT to some -std=xxx switch.
4999
458412c3 5000 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5001 ac_ext=cpp
5002ac_cpp='$CXXCPP $CPPFLAGS'
5003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5006 CXX_DIALECT=""
5007 ac_success=no
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5009$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5010if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5011 $as_echo_n "(cached) " >&6
5012else
5013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5014/* end confdefs.h. */
5015
5016
5017// If the compiler admits that it is not ready for C++11, why torture it?
5018// Hopefully, this will speed up the test.
5019
5020#ifndef __cplusplus
5021
5022#error "This is not a C++ compiler"
5023
5024#elif __cplusplus < 201103L
5025
5026#error "This is not a C++11 compiler"
5027
5028#else
5029
5030namespace cxx11
5031{
5032
5033 namespace test_static_assert
5034 {
5035
5036 template <typename T>
5037 struct check
5038 {
5039 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5040 };
5041
5042 }
5043
5044 namespace test_final_override
5045 {
5046
5047 struct Base
5048 {
5049 virtual void f() {}
5050 };
5051
5052 struct Derived : public Base
5053 {
5054 virtual void f() override {}
5055 };
5056
5057 }
5058
5059 namespace test_double_right_angle_brackets
5060 {
5061
5062 template < typename T >
5063 struct check {};
5064
5065 typedef check<void> single_type;
5066 typedef check<check<void>> double_type;
5067 typedef check<check<check<void>>> triple_type;
5068 typedef check<check<check<check<void>>>> quadruple_type;
5069
5070 }
5071
5072 namespace test_decltype
5073 {
5074
5075 int
5076 f()
5077 {
5078 int a = 1;
5079 decltype(a) b = 2;
5080 return a + b;
5081 }
5082
5083 }
5084
5085 namespace test_type_deduction
5086 {
5087
5088 template < typename T1, typename T2 >
5089 struct is_same
5090 {
5091 static const bool value = false;
5092 };
5093
5094 template < typename T >
5095 struct is_same<T, T>
5096 {
5097 static const bool value = true;
5098 };
5099
5100 template < typename T1, typename T2 >
5101 auto
5102 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5103 {
5104 return a1 + a2;
5105 }
5106
5107 int
5108 test(const int c, volatile int v)
5109 {
5110 static_assert(is_same<int, decltype(0)>::value == true, "");
5111 static_assert(is_same<int, decltype(c)>::value == false, "");
5112 static_assert(is_same<int, decltype(v)>::value == false, "");
5113 auto ac = c;
5114 auto av = v;
5115 auto sumi = ac + av + 'x';
5116 auto sumf = ac + av + 1.0;
5117 static_assert(is_same<int, decltype(ac)>::value == true, "");
5118 static_assert(is_same<int, decltype(av)>::value == true, "");
5119 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5120 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5121 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5122 return (sumf > 0.0) ? sumi : add(c, v);
5123 }
5124
5125 }
5126
5127 namespace test_noexcept
5128 {
5129
5130 int f() { return 0; }
5131 int g() noexcept { return 0; }
5132
5133 static_assert(noexcept(f()) == false, "");
5134 static_assert(noexcept(g()) == true, "");
5135
5136 }
5137
5138 namespace test_constexpr
5139 {
5140
5141 template < typename CharT >
5142 unsigned long constexpr
5143 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5144 {
5145 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5146 }
5147
5148 template < typename CharT >
5149 unsigned long constexpr
5150 strlen_c(const CharT *const s) noexcept
5151 {
5152 return strlen_c_r(s, 0UL);
5153 }
5154
5155 static_assert(strlen_c("") == 0UL, "");
5156 static_assert(strlen_c("1") == 1UL, "");
5157 static_assert(strlen_c("example") == 7UL, "");
5158 static_assert(strlen_c("another\0example") == 7UL, "");
5159
5160 }
5161
5162 namespace test_rvalue_references
5163 {
5164
5165 template < int N >
5166 struct answer
5167 {
5168 static constexpr int value = N;
5169 };
5170
5171 answer<1> f(int&) { return answer<1>(); }
5172 answer<2> f(const int&) { return answer<2>(); }
5173 answer<3> f(int&&) { return answer<3>(); }
5174
5175 void
5176 test()
5177 {
5178 int i = 0;
5179 const int c = 0;
5180 static_assert(decltype(f(i))::value == 1, "");
5181 static_assert(decltype(f(c))::value == 2, "");
5182 static_assert(decltype(f(0))::value == 3, "");
5183 }
5184
5185 }
5186
5187 namespace test_uniform_initialization
5188 {
5189
5190 struct test
5191 {
5192 static const int zero {};
5193 static const int one {1};
5194 };
5195
5196 static_assert(test::zero == 0, "");
5197 static_assert(test::one == 1, "");
5198
5199 }
5200
5201 namespace test_lambdas
5202 {
5203
5204 void
5205 test1()
5206 {
5207 auto lambda1 = [](){};
5208 auto lambda2 = lambda1;
5209 lambda1();
5210 lambda2();
5211 }
5212
5213 int
5214 test2()
5215 {
5216 auto a = [](int i, int j){ return i + j; }(1, 2);
5217 auto b = []() -> int { return '0'; }();
5218 auto c = [=](){ return a + b; }();
5219 auto d = [&](){ return c; }();
5220 auto e = [a, &b](int x) mutable {
5221 const auto identity = [](int y){ return y; };
5222 for (auto i = 0; i < a; ++i)
5223 a += b--;
5224 return x + identity(a + b);
5225 }(0);
5226 return a + b + c + d + e;
5227 }
5228
5229 int
5230 test3()
5231 {
5232 const auto nullary = [](){ return 0; };
5233 const auto unary = [](int x){ return x; };
5234 using nullary_t = decltype(nullary);
5235 using unary_t = decltype(unary);
5236 const auto higher1st = [](nullary_t f){ return f(); };
5237 const auto higher2nd = [unary](nullary_t f1){
5238 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5239 };
5240 return higher1st(nullary) + higher2nd(nullary)(unary);
5241 }
5242
5243 }
5244
5245 namespace test_variadic_templates
5246 {
5247
5248 template <int...>
5249 struct sum;
5250
5251 template <int N0, int... N1toN>
5252 struct sum<N0, N1toN...>
5253 {
5254 static constexpr auto value = N0 + sum<N1toN...>::value;
5255 };
5256
5257 template <>
5258 struct sum<>
5259 {
5260 static constexpr auto value = 0;
5261 };
5262
5263 static_assert(sum<>::value == 0, "");
5264 static_assert(sum<1>::value == 1, "");
5265 static_assert(sum<23>::value == 23, "");
5266 static_assert(sum<1, 2>::value == 3, "");
5267 static_assert(sum<5, 5, 11>::value == 21, "");
5268 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5269
5270 }
5271
5272 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5273 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5274 // because of this.
5275 namespace test_template_alias_sfinae
5276 {
5277
5278 struct foo {};
5279
5280 template<typename T>
5281 using member = typename T::member_type;
5282
5283 template<typename T>
5284 void func(...) {}
5285
5286 template<typename T>
5287 void func(member<T>*) {}
5288
5289 void test();
5290
5291 void test() { func<foo>(0); }
5292
5293 }
5294
5295} // namespace cxx11
5296
5297#endif // __cplusplus >= 201103L
5298
5299
5300
5301_ACEOF
5302if ac_fn_cxx_try_compile "$LINENO"; then :
5303 ax_cv_cxx_compile_cxx11=yes
5304else
5305 ax_cv_cxx_compile_cxx11=no
5306fi
5307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5308fi
5309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5310$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5311 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5312 ac_success=yes
5313 fi
5314
5315 if test x$ac_success = xno; then
458412c3
TT
5316 for alternative in ${ax_cxx_compile_alternatives}; do
5317 switch="-std=gnu++${alternative}"
0bcda685
PA
5318 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5320$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5321if eval \${$cachevar+:} false; then :
0bcda685
PA
5322 $as_echo_n "(cached) " >&6
5323else
5324 ac_save_CXX="$CXX"
5325 CXX="$CXX $switch"
5326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327/* end confdefs.h. */
5328
5329
5330// If the compiler admits that it is not ready for C++11, why torture it?
5331// Hopefully, this will speed up the test.
5332
5333#ifndef __cplusplus
5334
5335#error "This is not a C++ compiler"
5336
5337#elif __cplusplus < 201103L
5338
5339#error "This is not a C++11 compiler"
5340
5341#else
5342
5343namespace cxx11
5344{
5345
5346 namespace test_static_assert
5347 {
5348
5349 template <typename T>
5350 struct check
5351 {
5352 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5353 };
5354
5355 }
5356
5357 namespace test_final_override
5358 {
5359
5360 struct Base
5361 {
5362 virtual void f() {}
5363 };
5364
5365 struct Derived : public Base
5366 {
5367 virtual void f() override {}
5368 };
5369
5370 }
5371
5372 namespace test_double_right_angle_brackets
5373 {
5374
5375 template < typename T >
5376 struct check {};
5377
5378 typedef check<void> single_type;
5379 typedef check<check<void>> double_type;
5380 typedef check<check<check<void>>> triple_type;
5381 typedef check<check<check<check<void>>>> quadruple_type;
5382
5383 }
5384
5385 namespace test_decltype
5386 {
5387
5388 int
5389 f()
5390 {
5391 int a = 1;
5392 decltype(a) b = 2;
5393 return a + b;
5394 }
5395
5396 }
5397
5398 namespace test_type_deduction
5399 {
5400
5401 template < typename T1, typename T2 >
5402 struct is_same
5403 {
5404 static const bool value = false;
5405 };
5406
5407 template < typename T >
5408 struct is_same<T, T>
5409 {
5410 static const bool value = true;
5411 };
5412
5413 template < typename T1, typename T2 >
5414 auto
5415 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5416 {
5417 return a1 + a2;
5418 }
5419
5420 int
5421 test(const int c, volatile int v)
5422 {
5423 static_assert(is_same<int, decltype(0)>::value == true, "");
5424 static_assert(is_same<int, decltype(c)>::value == false, "");
5425 static_assert(is_same<int, decltype(v)>::value == false, "");
5426 auto ac = c;
5427 auto av = v;
5428 auto sumi = ac + av + 'x';
5429 auto sumf = ac + av + 1.0;
5430 static_assert(is_same<int, decltype(ac)>::value == true, "");
5431 static_assert(is_same<int, decltype(av)>::value == true, "");
5432 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5433 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5434 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5435 return (sumf > 0.0) ? sumi : add(c, v);
5436 }
5437
5438 }
5439
5440 namespace test_noexcept
5441 {
5442
5443 int f() { return 0; }
5444 int g() noexcept { return 0; }
5445
5446 static_assert(noexcept(f()) == false, "");
5447 static_assert(noexcept(g()) == true, "");
5448
5449 }
5450
5451 namespace test_constexpr
5452 {
5453
5454 template < typename CharT >
5455 unsigned long constexpr
5456 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5457 {
5458 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5459 }
5460
5461 template < typename CharT >
5462 unsigned long constexpr
5463 strlen_c(const CharT *const s) noexcept
5464 {
5465 return strlen_c_r(s, 0UL);
5466 }
5467
5468 static_assert(strlen_c("") == 0UL, "");
5469 static_assert(strlen_c("1") == 1UL, "");
5470 static_assert(strlen_c("example") == 7UL, "");
5471 static_assert(strlen_c("another\0example") == 7UL, "");
5472
5473 }
5474
5475 namespace test_rvalue_references
5476 {
5477
5478 template < int N >
5479 struct answer
5480 {
5481 static constexpr int value = N;
5482 };
5483
5484 answer<1> f(int&) { return answer<1>(); }
5485 answer<2> f(const int&) { return answer<2>(); }
5486 answer<3> f(int&&) { return answer<3>(); }
5487
5488 void
5489 test()
5490 {
5491 int i = 0;
5492 const int c = 0;
5493 static_assert(decltype(f(i))::value == 1, "");
5494 static_assert(decltype(f(c))::value == 2, "");
5495 static_assert(decltype(f(0))::value == 3, "");
5496 }
5497
5498 }
5499
5500 namespace test_uniform_initialization
5501 {
5502
5503 struct test
5504 {
5505 static const int zero {};
5506 static const int one {1};
5507 };
5508
5509 static_assert(test::zero == 0, "");
5510 static_assert(test::one == 1, "");
5511
5512 }
5513
5514 namespace test_lambdas
5515 {
5516
5517 void
5518 test1()
5519 {
5520 auto lambda1 = [](){};
5521 auto lambda2 = lambda1;
5522 lambda1();
5523 lambda2();
5524 }
5525
5526 int
5527 test2()
5528 {
5529 auto a = [](int i, int j){ return i + j; }(1, 2);
5530 auto b = []() -> int { return '0'; }();
5531 auto c = [=](){ return a + b; }();
5532 auto d = [&](){ return c; }();
5533 auto e = [a, &b](int x) mutable {
5534 const auto identity = [](int y){ return y; };
5535 for (auto i = 0; i < a; ++i)
5536 a += b--;
5537 return x + identity(a + b);
5538 }(0);
5539 return a + b + c + d + e;
5540 }
5541
5542 int
5543 test3()
5544 {
5545 const auto nullary = [](){ return 0; };
5546 const auto unary = [](int x){ return x; };
5547 using nullary_t = decltype(nullary);
5548 using unary_t = decltype(unary);
5549 const auto higher1st = [](nullary_t f){ return f(); };
5550 const auto higher2nd = [unary](nullary_t f1){
5551 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5552 };
5553 return higher1st(nullary) + higher2nd(nullary)(unary);
5554 }
5555
5556 }
5557
5558 namespace test_variadic_templates
5559 {
5560
5561 template <int...>
5562 struct sum;
5563
5564 template <int N0, int... N1toN>
5565 struct sum<N0, N1toN...>
5566 {
5567 static constexpr auto value = N0 + sum<N1toN...>::value;
5568 };
5569
5570 template <>
5571 struct sum<>
5572 {
5573 static constexpr auto value = 0;
5574 };
5575
5576 static_assert(sum<>::value == 0, "");
5577 static_assert(sum<1>::value == 1, "");
5578 static_assert(sum<23>::value == 23, "");
5579 static_assert(sum<1, 2>::value == 3, "");
5580 static_assert(sum<5, 5, 11>::value == 21, "");
5581 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5582
5583 }
5584
5585 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5586 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5587 // because of this.
5588 namespace test_template_alias_sfinae
5589 {
5590
5591 struct foo {};
5592
5593 template<typename T>
5594 using member = typename T::member_type;
5595
5596 template<typename T>
5597 void func(...) {}
5598
5599 template<typename T>
5600 void func(member<T>*) {}
5601
5602 void test();
5603
5604 void test() { func<foo>(0); }
5605
5606 }
5607
5608} // namespace cxx11
5609
5610#endif // __cplusplus >= 201103L
5611
5612
5613
5614_ACEOF
5615if ac_fn_cxx_try_compile "$LINENO"; then :
5616 eval $cachevar=yes
5617else
5618 eval $cachevar=no
5619fi
5620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5621 CXX="$ac_save_CXX"
5622fi
5623eval ac_res=\$$cachevar
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5625$as_echo "$ac_res" >&6; }
5626 if eval test x\$$cachevar = xyes; then
5627 CXX_DIALECT="$switch"
9b4d030e
TV
5628 CXX="$CXX $switch"
5629 if test -n "$CXXCPP" ; then
5630 CXXCPP="$CXXCPP $switch"
5631 fi
0bcda685
PA
5632 ac_success=yes
5633 break
5634 fi
5635 done
5636 fi
5637
5638 if test x$ac_success = xno; then
458412c3
TT
5639 for alternative in ${ax_cxx_compile_alternatives}; do
5640 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5641 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5643$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5644if eval \${$cachevar+:} false; then :
0bcda685
PA
5645 $as_echo_n "(cached) " >&6
5646else
5647 ac_save_CXX="$CXX"
458412c3
TT
5648 CXX="$CXX $switch"
5649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5650/* end confdefs.h. */
5651
5652
5653// If the compiler admits that it is not ready for C++11, why torture it?
5654// Hopefully, this will speed up the test.
5655
5656#ifndef __cplusplus
5657
5658#error "This is not a C++ compiler"
5659
5660#elif __cplusplus < 201103L
5661
5662#error "This is not a C++11 compiler"
5663
5664#else
5665
5666namespace cxx11
5667{
5668
5669 namespace test_static_assert
5670 {
5671
5672 template <typename T>
5673 struct check
5674 {
5675 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5676 };
5677
5678 }
5679
5680 namespace test_final_override
5681 {
5682
5683 struct Base
5684 {
5685 virtual void f() {}
5686 };
5687
5688 struct Derived : public Base
5689 {
5690 virtual void f() override {}
5691 };
5692
5693 }
5694
5695 namespace test_double_right_angle_brackets
5696 {
5697
5698 template < typename T >
5699 struct check {};
5700
5701 typedef check<void> single_type;
5702 typedef check<check<void>> double_type;
5703 typedef check<check<check<void>>> triple_type;
5704 typedef check<check<check<check<void>>>> quadruple_type;
5705
5706 }
5707
5708 namespace test_decltype
5709 {
5710
5711 int
5712 f()
5713 {
5714 int a = 1;
5715 decltype(a) b = 2;
5716 return a + b;
5717 }
5718
5719 }
5720
5721 namespace test_type_deduction
5722 {
5723
5724 template < typename T1, typename T2 >
5725 struct is_same
5726 {
5727 static const bool value = false;
5728 };
5729
5730 template < typename T >
5731 struct is_same<T, T>
5732 {
5733 static const bool value = true;
5734 };
5735
5736 template < typename T1, typename T2 >
5737 auto
5738 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5739 {
5740 return a1 + a2;
5741 }
5742
5743 int
5744 test(const int c, volatile int v)
5745 {
5746 static_assert(is_same<int, decltype(0)>::value == true, "");
5747 static_assert(is_same<int, decltype(c)>::value == false, "");
5748 static_assert(is_same<int, decltype(v)>::value == false, "");
5749 auto ac = c;
5750 auto av = v;
5751 auto sumi = ac + av + 'x';
5752 auto sumf = ac + av + 1.0;
5753 static_assert(is_same<int, decltype(ac)>::value == true, "");
5754 static_assert(is_same<int, decltype(av)>::value == true, "");
5755 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5756 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5757 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5758 return (sumf > 0.0) ? sumi : add(c, v);
5759 }
5760
5761 }
5762
5763 namespace test_noexcept
5764 {
5765
5766 int f() { return 0; }
5767 int g() noexcept { return 0; }
5768
5769 static_assert(noexcept(f()) == false, "");
5770 static_assert(noexcept(g()) == true, "");
5771
5772 }
5773
5774 namespace test_constexpr
5775 {
5776
5777 template < typename CharT >
5778 unsigned long constexpr
5779 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5780 {
5781 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5782 }
5783
5784 template < typename CharT >
5785 unsigned long constexpr
5786 strlen_c(const CharT *const s) noexcept
5787 {
5788 return strlen_c_r(s, 0UL);
5789 }
5790
5791 static_assert(strlen_c("") == 0UL, "");
5792 static_assert(strlen_c("1") == 1UL, "");
5793 static_assert(strlen_c("example") == 7UL, "");
5794 static_assert(strlen_c("another\0example") == 7UL, "");
5795
5796 }
5797
5798 namespace test_rvalue_references
5799 {
5800
5801 template < int N >
5802 struct answer
5803 {
5804 static constexpr int value = N;
5805 };
5806
5807 answer<1> f(int&) { return answer<1>(); }
5808 answer<2> f(const int&) { return answer<2>(); }
5809 answer<3> f(int&&) { return answer<3>(); }
5810
5811 void
5812 test()
5813 {
5814 int i = 0;
5815 const int c = 0;
5816 static_assert(decltype(f(i))::value == 1, "");
5817 static_assert(decltype(f(c))::value == 2, "");
5818 static_assert(decltype(f(0))::value == 3, "");
5819 }
5820
5821 }
5822
5823 namespace test_uniform_initialization
5824 {
5825
5826 struct test
5827 {
5828 static const int zero {};
5829 static const int one {1};
5830 };
5831
5832 static_assert(test::zero == 0, "");
5833 static_assert(test::one == 1, "");
5834
5835 }
5836
5837 namespace test_lambdas
5838 {
5839
5840 void
5841 test1()
5842 {
5843 auto lambda1 = [](){};
5844 auto lambda2 = lambda1;
5845 lambda1();
5846 lambda2();
5847 }
5848
5849 int
5850 test2()
5851 {
5852 auto a = [](int i, int j){ return i + j; }(1, 2);
5853 auto b = []() -> int { return '0'; }();
5854 auto c = [=](){ return a + b; }();
5855 auto d = [&](){ return c; }();
5856 auto e = [a, &b](int x) mutable {
5857 const auto identity = [](int y){ return y; };
5858 for (auto i = 0; i < a; ++i)
5859 a += b--;
5860 return x + identity(a + b);
5861 }(0);
5862 return a + b + c + d + e;
5863 }
5864
5865 int
5866 test3()
5867 {
5868 const auto nullary = [](){ return 0; };
5869 const auto unary = [](int x){ return x; };
5870 using nullary_t = decltype(nullary);
5871 using unary_t = decltype(unary);
5872 const auto higher1st = [](nullary_t f){ return f(); };
5873 const auto higher2nd = [unary](nullary_t f1){
5874 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5875 };
5876 return higher1st(nullary) + higher2nd(nullary)(unary);
5877 }
5878
5879 }
5880
5881 namespace test_variadic_templates
5882 {
5883
5884 template <int...>
5885 struct sum;
5886
5887 template <int N0, int... N1toN>
5888 struct sum<N0, N1toN...>
5889 {
5890 static constexpr auto value = N0 + sum<N1toN...>::value;
5891 };
5892
5893 template <>
5894 struct sum<>
5895 {
5896 static constexpr auto value = 0;
5897 };
5898
5899 static_assert(sum<>::value == 0, "");
5900 static_assert(sum<1>::value == 1, "");
5901 static_assert(sum<23>::value == 23, "");
5902 static_assert(sum<1, 2>::value == 3, "");
5903 static_assert(sum<5, 5, 11>::value == 21, "");
5904 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5905
5906 }
5907
5908 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5909 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5910 // because of this.
5911 namespace test_template_alias_sfinae
5912 {
5913
5914 struct foo {};
5915
5916 template<typename T>
5917 using member = typename T::member_type;
5918
5919 template<typename T>
5920 void func(...) {}
5921
5922 template<typename T>
5923 void func(member<T>*) {}
5924
5925 void test();
5926
5927 void test() { func<foo>(0); }
5928
5929 }
5930
5931} // namespace cxx11
5932
5933#endif // __cplusplus >= 201103L
5934
5935
5936
5937_ACEOF
5938if ac_fn_cxx_try_compile "$LINENO"; then :
5939 eval $cachevar=yes
5940else
5941 eval $cachevar=no
5942fi
5943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
458412c3 5944 CXX="$ac_save_CXX"
0bcda685
PA
5945fi
5946eval ac_res=\$$cachevar
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5948$as_echo "$ac_res" >&6; }
458412c3
TT
5949 if eval test x\$$cachevar = xyes; then
5950 CXX_DIALECT="$switch"
9b4d030e
TV
5951 CXX="$CXX $switch"
5952 if test -n "$CXXCPP" ; then
5953 CXXCPP="$CXXCPP $switch"
5954 fi
458412c3
TT
5955 ac_success=yes
5956 break
5957 fi
5958 done
5959 if test x$ac_success = xyes; then
0bcda685
PA
5960 break
5961 fi
5962 done
5963 fi
5964 ac_ext=c
5965ac_cpp='$CPP $CPPFLAGS'
5966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5968ac_compiler_gnu=$ac_cv_c_compiler_gnu
5969
5970 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5971 if test x$ac_success = xno; then
d0ac1c44 5972 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
5973 fi
5974 fi
5975 if test x$ac_success = xno; then
5976 HAVE_CXX11=0
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5978$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5979 else
5980 HAVE_CXX11=1
5981
5982$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5983
5984 fi
5985
5986
5987
5988
c971b7fa
PA
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5990$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 5991if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
5992 $as_echo_n "(cached) " >&6
5993else
5994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995/* end confdefs.h. */
5996#include <stdlib.h>
5997#include <stdarg.h>
5998#include <string.h>
5999#include <float.h>
6000
6001int
6002main ()
6003{
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009if ac_fn_c_try_compile "$LINENO"; then :
6010 ac_cv_header_stdc=yes
6011else
6012 ac_cv_header_stdc=no
6013fi
6014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6015
6016if test $ac_cv_header_stdc = yes; then
6017 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019/* end confdefs.h. */
6020#include <string.h>
6021
6022_ACEOF
6023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
6024 $EGREP "memchr" >/dev/null 2>&1; then :
6025
68070c10 6026else
81ecdfbb
RW
6027 ac_cv_header_stdc=no
6028fi
6029rm -f conftest*
68070c10
PA
6030
6031fi
68070c10 6032
81ecdfbb
RW
6033if test $ac_cv_header_stdc = yes; then
6034 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6036/* end confdefs.h. */
6037#include <stdlib.h>
68070c10 6038
68070c10 6039_ACEOF
81ecdfbb
RW
6040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6041 $EGREP "free" >/dev/null 2>&1; then :
68070c10
PA
6042
6043else
81ecdfbb 6044 ac_cv_header_stdc=no
68070c10 6045fi
81ecdfbb
RW
6046rm -f conftest*
6047
68070c10
PA
6048fi
6049
81ecdfbb
RW
6050if test $ac_cv_header_stdc = yes; then
6051 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6052 if test "$cross_compiling" = yes; then :
6053 :
43d5792c 6054else
81ecdfbb 6055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6056/* end confdefs.h. */
81ecdfbb
RW
6057#include <ctype.h>
6058#include <stdlib.h>
6059#if ((' ' & 0x0FF) == 0x020)
6060# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6061# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6062#else
6063# define ISLOWER(c) \
6064 (('a' <= (c) && (c) <= 'i') \
6065 || ('j' <= (c) && (c) <= 'r') \
6066 || ('s' <= (c) && (c) <= 'z'))
6067# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6068#endif
6069
6070#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bec39cab
AC
6071int
6072main ()
6073{
81ecdfbb
RW
6074 int i;
6075 for (i = 0; i < 256; i++)
6076 if (XOR (islower (i), ISLOWER (i))
6077 || toupper (i) != TOUPPER (i))
6078 return 2;
bec39cab
AC
6079 return 0;
6080}
6081_ACEOF
81ecdfbb 6082if ac_fn_c_try_run "$LINENO"; then :
bec39cab 6083
81ecdfbb
RW
6084else
6085 ac_cv_header_stdc=no
43d5792c 6086fi
81ecdfbb
RW
6087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6088 conftest.$ac_objext conftest.beam conftest.$ac_ext
43d5792c 6089fi
e122f1f5 6090
68070c10 6091fi
81ecdfbb
RW
6092fi
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6094$as_echo "$ac_cv_header_stdc" >&6; }
6095if test $ac_cv_header_stdc = yes; then
68070c10 6096
81ecdfbb 6097$as_echo "#define STDC_HEADERS 1" >>confdefs.h
68070c10 6098
68070c10 6099fi
68070c10 6100
68070c10 6101
db6878ac
SM
6102ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6103if test "x$ac_cv_type_size_t" = xyes; then :
8ecfd7bd 6104
db6878ac 6105else
4d696a5c 6106
db6878ac
SM
6107cat >>confdefs.h <<_ACEOF
6108#define size_t unsigned int
6109_ACEOF
4d696a5c 6110
8ecfd7bd
SDJ
6111fi
6112
6113
6d580b63 6114
8ecfd7bd 6115
db6878ac
SM
6116 for ac_header in $ac_header_list
6117do :
6118 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6119ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6120"
6121if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6122 cat >>confdefs.h <<_ACEOF
6123#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6124_ACEOF
8ecfd7bd 6125
6d580b63
YQ
6126fi
6127
db6878ac 6128done
8ecfd7bd 6129
bd885420 6130
bd885420
YQ
6131
6132
6133
6134
6135
db6878ac
SM
6136ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6137if test "x$ac_cv_type_pid_t" = xyes; then :
bd885420 6138
61c125b9 6139else
60d6cfc9 6140
db6878ac
SM
6141cat >>confdefs.h <<_ACEOF
6142#define pid_t int
6143_ACEOF
60d6cfc9 6144
db6878ac 6145fi
61c125b9 6146
db6878ac
SM
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6148$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6149if ${ac_cv_path_SED+:} false; then :
61c125b9
TT
6150 $as_echo_n "(cached) " >&6
6151else
db6878ac
SM
6152 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6153 for ac_i in 1 2 3 4 5 6 7; do
6154 ac_script="$ac_script$as_nl$ac_script"
6155 done
6156 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6157 { ac_script=; unset ac_script;}
6158 if test -z "$SED"; then
6159 ac_path_SED_found=false
6160 # Loop through the user's path and test for each of PROGNAME-LIST
6161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH
6163do
6164 IFS=$as_save_IFS
6165 test -z "$as_dir" && as_dir=.
6166 for ac_prog in sed gsed; do
6167 for ac_exec_ext in '' $ac_executable_extensions; do
6168 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6169 as_fn_executable_p "$ac_path_SED" || continue
6170# Check for GNU ac_path_SED and select it if it is found.
6171 # Check for GNU $ac_path_SED
6172case `"$ac_path_SED" --version 2>&1` in
6173*GNU*)
6174 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6175*)
6176 ac_count=0
6177 $as_echo_n 0123456789 >"conftest.in"
6178 while :
6179 do
6180 cat "conftest.in" "conftest.in" >"conftest.tmp"
6181 mv "conftest.tmp" "conftest.in"
6182 cp "conftest.in" "conftest.nl"
6183 $as_echo '' >> "conftest.nl"
6184 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186 as_fn_arith $ac_count + 1 && ac_count=$as_val
6187 if test $ac_count -gt ${ac_path_SED_max-0}; then
6188 # Best one so far, save it but keep looking for a better one
6189 ac_cv_path_SED="$ac_path_SED"
6190 ac_path_SED_max=$ac_count
61c125b9 6191 fi
db6878ac
SM
6192 # 10*(2^10) chars as input seems more than enough
6193 test $ac_count -gt 10 && break
61c125b9 6194 done
db6878ac
SM
6195 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196esac
61c125b9 6197
db6878ac
SM
6198 $ac_path_SED_found && break 3
6199 done
6200 done
6201 done
6202IFS=$as_save_IFS
6203 if test -z "$ac_cv_path_SED"; then
6204 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6205 fi
61c125b9 6206else
db6878ac 6207 ac_cv_path_SED=$SED
61c125b9
TT
6208fi
6209
6210fi
db6878ac
SM
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6212$as_echo "$ac_cv_path_SED" >&6; }
6213 SED="$ac_cv_path_SED"
6214 rm -f conftest.sed
61c125b9 6215
d0ac1c44 6216
db6878ac
SM
6217 if test "X$prefix" = "XNONE"; then
6218 acl_final_prefix="$ac_default_prefix"
6219 else
6220 acl_final_prefix="$prefix"
6221 fi
6222 if test "X$exec_prefix" = "XNONE"; then
6223 acl_final_exec_prefix='${prefix}'
6224 else
6225 acl_final_exec_prefix="$exec_prefix"
6226 fi
6227 acl_save_prefix="$prefix"
6228 prefix="$acl_final_prefix"
6229 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6230 prefix="$acl_save_prefix"
05ea2a05
TT
6231
6232
6233# Check whether --with-gnu-ld was given.
6234if test "${with_gnu_ld+set}" = set; then :
6235 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6236else
6237 with_gnu_ld=no
6238fi
6239
6240# Prepare PATH_SEPARATOR.
6241# The user is always right.
6242if test "${PATH_SEPARATOR+set}" != set; then
6243 echo "#! /bin/sh" >conf$$.sh
6244 echo "exit 0" >>conf$$.sh
6245 chmod +x conf$$.sh
6246 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6247 PATH_SEPARATOR=';'
6248 else
6249 PATH_SEPARATOR=:
6250 fi
6251 rm -f conf$$.sh
6252fi
6253ac_prog=ld
6254if test "$GCC" = yes; then
6255 # Check if gcc -print-prog-name=ld gives a path.
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6257$as_echo_n "checking for ld used by GCC... " >&6; }
6258 case $host in
6259 *-*-mingw*)
6260 # gcc leaves a trailing carriage return which upsets mingw
6261 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6262 *)
6263 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6264 esac
6265 case $ac_prog in
6266 # Accept absolute paths.
6267 [\\/]* | [A-Za-z]:[\\/]*)
6268 re_direlt='/[^/][^/]*/\.\./'
6269 # Canonicalize the path of ld
6270 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6271 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6272 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6273 done
6274 test -z "$LD" && LD="$ac_prog"
6275 ;;
6276 "")
6277 # If it fails, then pretend we aren't using GCC.
6278 ac_prog=ld
6279 ;;
6280 *)
6281 # If it is relative, then search for the first ld in PATH.
6282 with_gnu_ld=unknown
6283 ;;
6284 esac
6285elif test "$with_gnu_ld" = yes; then
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6287$as_echo_n "checking for GNU ld... " >&6; }
6288else
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6290$as_echo_n "checking for non-GNU ld... " >&6; }
6291fi
6292if ${acl_cv_path_LD+:} false; then :
6293 $as_echo_n "(cached) " >&6
6294else
6295 if test -z "$LD"; then
6296 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6297 for ac_dir in $PATH; do
6298 test -z "$ac_dir" && ac_dir=.
6299 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6300 acl_cv_path_LD="$ac_dir/$ac_prog"
6301 # Check to see if the program is GNU ld. I'd rather use --version,
6302 # but apparently some GNU ld's only accept -v.
6303 # Break only if it was the GNU/non-GNU ld that we prefer.
6304 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6305 test "$with_gnu_ld" != no && break
6306 else
6307 test "$with_gnu_ld" != yes && break
6308 fi
6309 fi
6310 done
6311 IFS="$ac_save_ifs"
6312else
6313 acl_cv_path_LD="$LD" # Let the user override the test with a path.
6314fi
6315fi
6316
6317LD="$acl_cv_path_LD"
6318if test -n "$LD"; then
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6320$as_echo "$LD" >&6; }
6321else
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
6324fi
6325test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6327$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6328if ${acl_cv_prog_gnu_ld+:} false; then :
6329 $as_echo_n "(cached) " >&6
6330else
6331 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6332if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6333 acl_cv_prog_gnu_ld=yes
6334else
6335 acl_cv_prog_gnu_ld=no
6336fi
6337fi
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
6339$as_echo "$acl_cv_prog_gnu_ld" >&6; }
6340with_gnu_ld=$acl_cv_prog_gnu_ld
6341
6342
6343
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
6345$as_echo_n "checking for shared library run path origin... " >&6; }
6346if ${acl_cv_rpath+:} false; then :
6347 $as_echo_n "(cached) " >&6
6348else
6349
6350 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6351 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6352 . ./conftest.sh
6353 rm -f ./conftest.sh
6354 acl_cv_rpath=done
6355
6356fi
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
6358$as_echo "$acl_cv_rpath" >&6; }
6359 wl="$acl_cv_wl"
6360 libext="$acl_cv_libext"
6361 shlibext="$acl_cv_shlibext"
6362 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6363 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6364 hardcode_direct="$acl_cv_hardcode_direct"
6365 hardcode_minus_L="$acl_cv_hardcode_minus_L"
6366 # Check whether --enable-rpath was given.
6367if test "${enable_rpath+set}" = set; then :
6368 enableval=$enable_rpath; :
6369else
6370 enable_rpath=yes
6371fi
6372
6373
6374
db6878ac
SM
6375 # Set the 'development' global.
6376 . $srcdir/../bfd/development.sh
6377
3266f10b
TT
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6379$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 6380if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
6381 $as_echo_n "(cached) " >&6
6382else
6383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6384/* end confdefs.h. */
6385#include <stdlib.h>
6386#include <stdarg.h>
6387#include <string.h>
6388#include <float.h>
6389
6390int
6391main ()
6392{
6393
6394 ;
6395 return 0;
6396}
6397_ACEOF
6398if ac_fn_c_try_compile "$LINENO"; then :
6399 ac_cv_header_stdc=yes
6400else
6401 ac_cv_header_stdc=no
6402fi
6403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6404
6405if test $ac_cv_header_stdc = yes; then
6406 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408/* end confdefs.h. */
6409#include <string.h>
6410
6411_ACEOF
6412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6413 $EGREP "memchr" >/dev/null 2>&1; then :
6414
6415else
6416 ac_cv_header_stdc=no
6417fi
6418rm -f conftest*
6419
6420fi
6421
6422if test $ac_cv_header_stdc = yes; then
6423 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6425/* end confdefs.h. */
6426#include <stdlib.h>
6427
6428_ACEOF
6429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6430 $EGREP "free" >/dev/null 2>&1; then :
6431
6432else
6433 ac_cv_header_stdc=no
6434fi
6435rm -f conftest*
6436
6437fi
6438
6439if test $ac_cv_header_stdc = yes; then
6440 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6441 if test "$cross_compiling" = yes; then :
6442 :
6443else
6444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6445/* end confdefs.h. */
6446#include <ctype.h>
6447#include <stdlib.h>
6448#if ((' ' & 0x0FF) == 0x020)
6449# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6450# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6451#else
6452# define ISLOWER(c) \
6453 (('a' <= (c) && (c) <= 'i') \
6454 || ('j' <= (c) && (c) <= 'r') \
6455 || ('s' <= (c) && (c) <= 'z'))
6456# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6457#endif
6458
6459#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6460int
6461main ()
6462{
6463 int i;
6464 for (i = 0; i < 256; i++)
6465 if (XOR (islower (i), ISLOWER (i))
6466 || toupper (i) != TOUPPER (i))
6467 return 2;
6468 return 0;
6469}
6470_ACEOF
6471if ac_fn_c_try_run "$LINENO"; then :
6472
6473else
6474 ac_cv_header_stdc=no
6475fi
6476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6477 conftest.$ac_objext conftest.beam conftest.$ac_ext
6478fi
6479
6480fi
6481fi
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6483$as_echo "$ac_cv_header_stdc" >&6; }
6484if test $ac_cv_header_stdc = yes; then
6485
6486$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6487
3266f10b
TT
6488fi
6489
6490 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6491# for constant arguments. Useless!
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6493$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 6494if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
6495 $as_echo_n "(cached) " >&6
6496else
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498/* end confdefs.h. */
6499#include <alloca.h>
6500int
6501main ()
6502{
6503char *p = (char *) alloca (2 * sizeof (int));
6504 if (p) return 0;
6505 ;
6506 return 0;
6507}
6508_ACEOF
6509if ac_fn_c_try_link "$LINENO"; then :
6510 ac_cv_working_alloca_h=yes
6511else
6512 ac_cv_working_alloca_h=no
6513fi
6514rm -f core conftest.err conftest.$ac_objext \
6515 conftest$ac_exeext conftest.$ac_ext
6516fi
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6518$as_echo "$ac_cv_working_alloca_h" >&6; }
6519if test $ac_cv_working_alloca_h = yes; then
6520
6521$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6522
6523fi
6524
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6526$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 6527if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
6528 $as_echo_n "(cached) " >&6
6529else
6530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6531/* end confdefs.h. */
6532#ifdef __GNUC__
6533# define alloca __builtin_alloca
6534#else
6535# ifdef _MSC_VER
6536# include <malloc.h>
6537# define alloca _alloca
6538# else
6539# ifdef HAVE_ALLOCA_H
6540# include <alloca.h>
6541# else
6542# ifdef _AIX
6543 #pragma alloca
6544# else
6545# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 6546void *alloca (size_t);
3266f10b
TT
6547# endif
6548# endif
6549# endif
6550# endif
6551#endif
6552
6553int
6554main ()
6555{
6556char *p = (char *) alloca (1);
6557 if (p) return 0;
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562if ac_fn_c_try_link "$LINENO"; then :
6563 ac_cv_func_alloca_works=yes
6564else
6565 ac_cv_func_alloca_works=no
6566fi
6567rm -f core conftest.err conftest.$ac_objext \
6568 conftest$ac_exeext conftest.$ac_ext
6569fi
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6571$as_echo "$ac_cv_func_alloca_works" >&6; }
6572
6573if test $ac_cv_func_alloca_works = yes; then
6574
6575$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6576
6577else
6578 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6579# that cause trouble. Some versions do not even contain alloca or
6580# contain a buggy version. If you still want to use their alloca,
6581# use ar to extract alloca.o from them instead of compiling alloca.c.
6582
6583ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6584
6585$as_echo "#define C_ALLOCA 1" >>confdefs.h
6586
6587
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6589$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 6590if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
6591 $as_echo_n "(cached) " >&6
6592else
6593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6594/* end confdefs.h. */
6595#if defined CRAY && ! defined CRAY2
6596webecray
6597#else
6598wenotbecray
6599#endif
6600
6601_ACEOF
6602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6603 $EGREP "webecray" >/dev/null 2>&1; then :
6604 ac_cv_os_cray=yes
6605else
6606 ac_cv_os_cray=no
6607fi
6608rm -f conftest*
6609
6610fi
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6612$as_echo "$ac_cv_os_cray" >&6; }
6613if test $ac_cv_os_cray = yes; then
6614 for ac_func in _getb67 GETB67 getb67; do
6615 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6616ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6617if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
6618
6619cat >>confdefs.h <<_ACEOF
6620#define CRAY_STACKSEG_END $ac_func
6621_ACEOF
6622
6623 break
6624fi
6625
6626 done
6627fi
6628
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6630$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 6631if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
6632 $as_echo_n "(cached) " >&6
6633else
6634 if test "$cross_compiling" = yes; then :
6635 ac_cv_c_stack_direction=0
6636else
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638/* end confdefs.h. */
6639$ac_includes_default
6640int
d0ac1c44 6641find_stack_direction (int *addr, int depth)
3266f10b 6642{
d0ac1c44
SM
6643 int dir, dummy = 0;
6644 if (! addr)
6645 addr = &dummy;
6646 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6647 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6648 return dir + dummy;
3266f10b
TT
6649}
6650
6651int
d0ac1c44 6652main (int argc, char **argv)
3266f10b 6653{
d0ac1c44 6654 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
6655}
6656_ACEOF
6657if ac_fn_c_try_run "$LINENO"; then :
6658 ac_cv_c_stack_direction=1
6659else
6660 ac_cv_c_stack_direction=-1
6661fi
6662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6663 conftest.$ac_objext conftest.beam conftest.$ac_ext
6664fi
6665
6666fi
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6668$as_echo "$ac_cv_c_stack_direction" >&6; }
6669cat >>confdefs.h <<_ACEOF
6670#define STACK_DIRECTION $ac_cv_c_stack_direction
6671_ACEOF
6672
6673
6674fi
6675
6676
b2ceabe8
TT
6677 WIN32APILIBS=
6678 case ${host} in
6679 *mingw32*)
6680
6681$as_echo "#define USE_WIN32API 1" >>confdefs.h
6682
6683 WIN32APILIBS="-lws2_32"
6684 ;;
6685 esac
6686
3266f10b
TT
6687
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
6689$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 6690if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
6691 $as_echo_n "(cached) " >&6
6692else
6693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6694/* end confdefs.h. */
6695#include <langinfo.h>
6696int
6697main ()
6698{
6699char* cs = nl_langinfo(CODESET);
6700 ;
6701 return 0;
6702}
6703_ACEOF
6704if ac_fn_c_try_link "$LINENO"; then :
6705 am_cv_langinfo_codeset=yes
6706else
6707 am_cv_langinfo_codeset=no
6708fi
6709rm -f core conftest.err conftest.$ac_objext \
6710 conftest$ac_exeext conftest.$ac_ext
6711
6712fi
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
6714$as_echo "$am_cv_langinfo_codeset" >&6; }
6715 if test $am_cv_langinfo_codeset = yes; then
6716
6717$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6718
6719 fi
6720
6721
c8693053 6722 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h
3266f10b
TT
6723do :
6724 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6725ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 6726if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
6727 cat >>confdefs.h <<_ACEOF
6728#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6729_ACEOF
6730
6731fi
6732
6733done
6734
6735
05ea2a05
TT
6736
6737for ac_func in getpagesize
3266f10b 6738do :
05ea2a05
TT
6739 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
6740if test "x$ac_cv_func_getpagesize" = xyes; then :
3266f10b 6741 cat >>confdefs.h <<_ACEOF
05ea2a05 6742#define HAVE_GETPAGESIZE 1
3266f10b
TT
6743_ACEOF
6744
6745fi
6746done
6747
05ea2a05
TT
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
6749$as_echo_n "checking for working mmap... " >&6; }
6750if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
6751 $as_echo_n "(cached) " >&6
3266f10b 6752else
05ea2a05
TT
6753 if test "$cross_compiling" = yes; then :
6754 ac_cv_func_mmap_fixed_mapped=no
6755else
6756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6757/* end confdefs.h. */
6758$ac_includes_default
6759/* malloc might have been renamed as rpl_malloc. */
6760#undef malloc
6761
6762/* Thanks to Mike Haertel and Jim Avera for this test.
6763 Here is a matrix of mmap possibilities:
6764 mmap private not fixed
6765 mmap private fixed at somewhere currently unmapped
6766 mmap private fixed at somewhere already mapped
6767 mmap shared not fixed
6768 mmap shared fixed at somewhere currently unmapped
6769 mmap shared fixed at somewhere already mapped
6770 For private mappings, we should verify that changes cannot be read()
6771 back from the file, nor mmap's back from the file at a different
6772 address. (There have been systems where private was not correctly
6773 implemented like the infamous i386 svr4.0, and systems where the
6774 VM page cache was not coherent with the file system buffer cache
6775 like early versions of FreeBSD and possibly contemporary NetBSD.)
6776 For shared mappings, we should conversely verify that changes get
6777 propagated back to all the places they're supposed to be.
6778
6779 Grep wants private fixed already mapped.
6780 The main things grep needs to know about mmap are:
6781 * does it exist and is it safe to write into the mmap'd area
6782 * how to use it (BSD variants) */
6783
6784#include <fcntl.h>
6785#include <sys/mman.h>
6786
6787#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
6788char *malloc ();
6789#endif
3266f10b 6790
05ea2a05
TT
6791/* This mess was copied from the GNU getpagesize.h. */
6792#ifndef HAVE_GETPAGESIZE
6793# ifdef _SC_PAGESIZE
6794# define getpagesize() sysconf(_SC_PAGESIZE)
6795# else /* no _SC_PAGESIZE */
6796# ifdef HAVE_SYS_PARAM_H
6797# include <sys/param.h>
6798# ifdef EXEC_PAGESIZE
6799# define getpagesize() EXEC_PAGESIZE
6800# else /* no EXEC_PAGESIZE */
6801# ifdef NBPG
6802# define getpagesize() NBPG * CLSIZE
6803# ifndef CLSIZE
6804# define CLSIZE 1
6805# endif /* no CLSIZE */
6806# else /* no NBPG */
6807# ifdef NBPC
6808# define getpagesize() NBPC
6809# else /* no NBPC */
6810# ifdef PAGESIZE
6811# define getpagesize() PAGESIZE
6812# endif /* PAGESIZE */
6813# endif /* no NBPC */
6814# endif /* no NBPG */
6815# endif /* no EXEC_PAGESIZE */
6816# else /* no HAVE_SYS_PARAM_H */
6817# define getpagesize() 8192 /* punt totally */
6818# endif /* no HAVE_SYS_PARAM_H */
6819# endif /* no _SC_PAGESIZE */
6820
6821#endif /* no HAVE_GETPAGESIZE */
3266f10b 6822
05ea2a05
TT
6823int
6824main ()
6825{
6826 char *data, *data2, *data3;
6827 const char *cdata2;
6828 int i, pagesize;
6829 int fd, fd2;
3266f10b 6830
05ea2a05 6831 pagesize = getpagesize ();
5e030278 6832
05ea2a05
TT
6833 /* First, make a file with some known garbage in it. */
6834 data = (char *) malloc (pagesize);
6835 if (!data)
6836 return 1;
6837 for (i = 0; i < pagesize; ++i)
6838 *(data + i) = rand ();
6839 umask (0);
6840 fd = creat ("conftest.mmap", 0600);
6841 if (fd < 0)
6842 return 2;
6843 if (write (fd, data, pagesize) != pagesize)
6844 return 3;
6845 close (fd);
6846
6847 /* Next, check that the tail of a page is zero-filled. File must have
6848 non-zero length, otherwise we risk SIGBUS for entire page. */
6849 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
6850 if (fd2 < 0)
6851 return 4;
6852 cdata2 = "";
6853 if (write (fd2, cdata2, 1) != 1)
6854 return 5;
6855 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
6856 if (data2 == MAP_FAILED)
6857 return 6;
6858 for (i = 0; i < pagesize; ++i)
6859 if (*(data2 + i))
6860 return 7;
6861 close (fd2);
6862 if (munmap (data2, pagesize))
6863 return 8;
6864
6865 /* Next, try to mmap the file at a fixed address which already has
6866 something else allocated at it. If we can, also make sure that
6867 we see the same garbage. */
6868 fd = open ("conftest.mmap", O_RDWR);
6869 if (fd < 0)
6870 return 9;
6871 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
6872 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6873 return 10;
6874 for (i = 0; i < pagesize; ++i)
6875 if (*(data + i) != *(data2 + i))
6876 return 11;
6877
6878 /* Finally, make sure that changes to the mapped area do not
6879 percolate back to the file as seen by read(). (This is a bug on
6880 some variants of i386 svr4.0.) */
6881 for (i = 0; i < pagesize; ++i)
6882 *(data2 + i) = *(data2 + i) + 1;
6883 data3 = (char *) malloc (pagesize);
6884 if (!data3)
6885 return 12;
6886 if (read (fd, data3, pagesize) != pagesize)
6887 return 13;
6888 for (i = 0; i < pagesize; ++i)
6889 if (*(data + i) != *(data3 + i))
6890 return 14;
6891 close (fd);
6892 return 0;
6893}
6894_ACEOF
6895if ac_fn_c_try_run "$LINENO"; then :
6896 ac_cv_func_mmap_fixed_mapped=yes
6897else
6898 ac_cv_func_mmap_fixed_mapped=no
6899fi
6900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6901 conftest.$ac_objext conftest.beam conftest.$ac_ext
6902fi
5e030278 6903
05ea2a05
TT
6904fi
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
6906$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
6907if test $ac_cv_func_mmap_fixed_mapped = yes; then
5e030278 6908
05ea2a05 6909$as_echo "#define HAVE_MMAP 1" >>confdefs.h
5e030278 6910
05ea2a05
TT
6911fi
6912rm -f conftest.mmap conftest.txt
5e030278 6913
05ea2a05
TT
6914 for ac_header in vfork.h
6915do :
6916 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
6917if test "x$ac_cv_header_vfork_h" = xyes; then :
6918 cat >>confdefs.h <<_ACEOF
6919#define HAVE_VFORK_H 1
6920_ACEOF
5e030278 6921
05ea2a05 6922fi
5e030278 6923
05ea2a05 6924done
5e030278 6925
05ea2a05
TT
6926for ac_func in fork vfork
6927do :
6928 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6929ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6930if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6931 cat >>confdefs.h <<_ACEOF
6932#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6933_ACEOF
6934
6935fi
6936done
6937
6938if test "x$ac_cv_func_fork" = xyes; then
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6940$as_echo_n "checking for working fork... " >&6; }
6941if ${ac_cv_func_fork_works+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 if test "$cross_compiling" = yes; then :
6945 ac_cv_func_fork_works=cross
6946else
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948/* end confdefs.h. */
6949$ac_includes_default
6950int
6951main ()
6952{
6953
6954 /* By Ruediger Kuhlmann. */
6955 return fork () < 0;
6956
6957 ;
6958 return 0;
6959}
6960_ACEOF
6961if ac_fn_c_try_run "$LINENO"; then :
6962 ac_cv_func_fork_works=yes
6963else
6964 ac_cv_func_fork_works=no
6965fi
6966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6967 conftest.$ac_objext conftest.beam conftest.$ac_ext
6968fi
6969
6970fi
6971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6972$as_echo "$ac_cv_func_fork_works" >&6; }
6973
6974else
6975 ac_cv_func_fork_works=$ac_cv_func_fork
6976fi
6977if test "x$ac_cv_func_fork_works" = xcross; then
6978 case $host in
6979 *-*-amigaos* | *-*-msdosdjgpp*)
6980 # Override, as these systems have only a dummy fork() stub
6981 ac_cv_func_fork_works=no
6982 ;;
6983 *)
6984 ac_cv_func_fork_works=yes
6985 ;;
6986 esac
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6988$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6989fi
6990ac_cv_func_vfork_works=$ac_cv_func_vfork
6991if test "x$ac_cv_func_vfork" = xyes; then
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6993$as_echo_n "checking for working vfork... " >&6; }
6994if ${ac_cv_func_vfork_works+:} false; then :
6995 $as_echo_n "(cached) " >&6
6996else
6997 if test "$cross_compiling" = yes; then :
6998 ac_cv_func_vfork_works=cross
6999else
7000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7001/* end confdefs.h. */
7002/* Thanks to Paul Eggert for this test. */
7003$ac_includes_default
7004#include <sys/wait.h>
7005#ifdef HAVE_VFORK_H
7006# include <vfork.h>
7007#endif
7008/* On some sparc systems, changes by the child to local and incoming
7009 argument registers are propagated back to the parent. The compiler
7010 is told about this with #include <vfork.h>, but some compilers
7011 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7012 static variable whose address is put into a register that is
7013 clobbered by the vfork. */
7014static void
7015#ifdef __cplusplus
7016sparc_address_test (int arg)
7017# else
7018sparc_address_test (arg) int arg;
7019#endif
7020{
7021 static pid_t child;
7022 if (!child) {
7023 child = vfork ();
7024 if (child < 0) {
7025 perror ("vfork");
7026 _exit(2);
7027 }
7028 if (!child) {
7029 arg = getpid();
7030 write(-1, "", 0);
7031 _exit (arg);
7032 }
7033 }
7034}
7035
7036int
7037main ()
7038{
7039 pid_t parent = getpid ();
7040 pid_t child;
7041
7042 sparc_address_test (0);
7043
7044 child = vfork ();
7045
7046 if (child == 0) {
7047 /* Here is another test for sparc vfork register problems. This
7048 test uses lots of local variables, at least as many local
7049 variables as main has allocated so far including compiler
7050 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7051 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7052 reuse the register of parent for one of the local variables,
7053 since it will think that parent can't possibly be used any more
7054 in this routine. Assigning to the local variable will thus
7055 munge parent in the parent process. */
7056 pid_t
7057 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7058 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7059 /* Convince the compiler that p..p7 are live; otherwise, it might
7060 use the same hardware register for all 8 local variables. */
7061 if (p != p1 || p != p2 || p != p3 || p != p4
7062 || p != p5 || p != p6 || p != p7)
7063 _exit(1);
7064
7065 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7066 from child file descriptors. If the child closes a descriptor
7067 before it execs or exits, this munges the parent's descriptor
7068 as well. Test for this by closing stdout in the child. */
7069 _exit(close(fileno(stdout)) != 0);
7070 } else {
7071 int status;
7072 struct stat st;
7073
7074 while (wait(&status) != child)
7075 ;
7076 return (
7077 /* Was there some problem with vforking? */
7078 child < 0
7079
7080 /* Did the child fail? (This shouldn't happen.) */
7081 || status
7082
7083 /* Did the vfork/compiler bug occur? */
7084 || parent != getpid()
7085
7086 /* Did the file descriptor bug occur? */
7087 || fstat(fileno(stdout), &st) != 0
7088 );
7089 }
7090}
7091_ACEOF
7092if ac_fn_c_try_run "$LINENO"; then :
7093 ac_cv_func_vfork_works=yes
7094else
7095 ac_cv_func_vfork_works=no
7096fi
7097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7098 conftest.$ac_objext conftest.beam conftest.$ac_ext
7099fi
7100
7101fi
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
7103$as_echo "$ac_cv_func_vfork_works" >&6; }
7104
7105fi;
7106if test "x$ac_cv_func_fork_works" = xcross; then
7107 ac_cv_func_vfork_works=$ac_cv_func_vfork
7108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7109$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
7110fi
7111
7112if test "x$ac_cv_func_vfork_works" = xyes; then
7113
7114$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
7115
7116else
7117
7118$as_echo "#define vfork fork" >>confdefs.h
7119
7120fi
7121if test "x$ac_cv_func_fork_works" = xyes; then
7122
7123$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
7124
7125fi
7126
8ae8e197 7127 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05 7128 ptrace64 sbrk setns sigaltstack sigprocmask \
507af45f 7129 setpgid setpgrp getrusage getauxval sigtimedwait
05ea2a05
TT
7130do :
7131 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7132ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7133if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7134 cat >>confdefs.h <<_ACEOF
7135#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7136_ACEOF
7137
7138fi
7139done
7140
7141
df9ebc47
TT
7142 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
7143 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
7144 # only in linux/personality.h.
7145 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
7146"
7147if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
7148 ac_have_decl=1
7149else
7150 ac_have_decl=0
7151fi
7152
7153cat >>confdefs.h <<_ACEOF
7154#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
7155_ACEOF
7156
7157
05ea2a05
TT
7158 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
7159if test "x$ac_cv_have_decl_strstr" = xyes; then :
7160 ac_have_decl=1
7161else
7162 ac_have_decl=0
7163fi
7164
7165cat >>confdefs.h <<_ACEOF
7166#define HAVE_DECL_STRSTR $ac_have_decl
7167_ACEOF
7168
7169
7170 # ----------------------- #
7171 # Checks for structures. #
7172 # ----------------------- #
7173
7174 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
7175if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7176
7177cat >>confdefs.h <<_ACEOF
7178#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7179_ACEOF
7180
7181
7182fi
7183ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
7184if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7185
7186cat >>confdefs.h <<_ACEOF
7187#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7188_ACEOF
7189
7190
7191fi
7192
7193
92a048fd
SM
7194 # On FreeBSD we need libutil for the kinfo_get* functions. On
7195 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7196 # Figure out which one to use.
05ea2a05
TT
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7198$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7199if ${ac_cv_search_kinfo_getfile+:} false; then :
7200 $as_echo_n "(cached) " >&6
7201else
7202 ac_func_search_save_LIBS=$LIBS
7203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204/* end confdefs.h. */
7205
7206/* Override any GCC internal prototype to avoid an error.
7207 Use char because int might match the return type of a GCC
7208 builtin and then its argument prototype would still apply. */
7209#ifdef __cplusplus
7210extern "C"
7211#endif
7212char kinfo_getfile ();
7213int
7214main ()
7215{
7216return kinfo_getfile ();
7217 ;
7218 return 0;
7219}
7220_ACEOF
7221for ac_lib in '' util util-freebsd; do
7222 if test -z "$ac_lib"; then
7223 ac_res="none required"
7224 else
7225 ac_res=-l$ac_lib
7226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7227 fi
7228 if ac_fn_c_try_link "$LINENO"; then :
7229 ac_cv_search_kinfo_getfile=$ac_res
7230fi
7231rm -f core conftest.err conftest.$ac_objext \
7232 conftest$ac_exeext
7233 if ${ac_cv_search_kinfo_getfile+:} false; then :
7234 break
7235fi
7236done
7237if ${ac_cv_search_kinfo_getfile+:} false; then :
7238
7239else
7240 ac_cv_search_kinfo_getfile=no
7241fi
7242rm conftest.$ac_ext
7243LIBS=$ac_func_search_save_LIBS
7244fi
7245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7246$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7247ac_res=$ac_cv_search_kinfo_getfile
7248if test "$ac_res" != no; then :
7249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7250
92a048fd
SM
7251fi
7252
7253
7254 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
7255 for ac_func in kinfo_getfile
7256do :
7257 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
7258if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
7259 cat >>confdefs.h <<_ACEOF
7260#define HAVE_KINFO_GETFILE 1
7261_ACEOF
05ea2a05
TT
7262
7263fi
92a048fd 7264done
05ea2a05
TT
7265
7266
7267 # Check for std::thread. This does not work on some platforms, like
7268 # mingw and DJGPP.
7269 ac_ext=cpp
7270ac_cpp='$CXXCPP $CPPFLAGS'
7271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7274
7275
7276
7277
7278
7279ac_ext=c
7280ac_cpp='$CPP $CPPFLAGS'
7281ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7282ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7283ac_compiler_gnu=$ac_cv_c_compiler_gnu
7284
7285ax_pthread_ok=no
7286
7287# We used to check for pthread.h first, but this fails if pthread.h
7288# requires special compiler flags (e.g. on Tru64 or Sequent).
7289# It gets checked for in the link test anyway.
7290
7291# First of all, check if the user has set any of the PTHREAD_LIBS,
5e030278
TT
7292# etcetera environment variables, and if threads linking works using
7293# them:
7294if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
7295 ax_pthread_save_CC="$CC"
7296 ax_pthread_save_CFLAGS="$CFLAGS"
7297 ax_pthread_save_LIBS="$LIBS"
05ea2a05
TT
7298 if test "x$PTHREAD_CC" != "x"; then :
7299 CC="$PTHREAD_CC"
7300fi
7301 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7302 LIBS="$PTHREAD_LIBS $LIBS"
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7304$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7306/* end confdefs.h. */
7307
7308/* Override any GCC internal prototype to avoid an error.
7309 Use char because int might match the return type of a GCC
7310 builtin and then its argument prototype would still apply. */
7311#ifdef __cplusplus
7312extern "C"
7313#endif
7314char pthread_join ();
7315int
7316main ()
7317{
7318return pthread_join ();
7319 ;
7320 return 0;
7321}
7322_ACEOF
7323if ac_fn_c_try_link "$LINENO"; then :
7324 ax_pthread_ok=yes
7325fi
7326rm -f core conftest.err conftest.$ac_objext \
7327 conftest$ac_exeext conftest.$ac_ext
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7329$as_echo "$ax_pthread_ok" >&6; }
7330 if test "x$ax_pthread_ok" = "xno"; then
7331 PTHREAD_LIBS=""
7332 PTHREAD_CFLAGS=""
7333 fi
7334 CC="$ax_pthread_save_CC"
7335 CFLAGS="$ax_pthread_save_CFLAGS"
7336 LIBS="$ax_pthread_save_LIBS"
7337fi
7338
7339# We must check for the threads library under a number of different
7340# names; the ordering is very important because some systems
7341# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7342# libraries is broken (non-POSIX).
7343
7344# Create a list of thread flags to try. Items starting with a "-" are
7345# C compiler flags, and other items are library names, except for "none"
7346# which indicates that we try without any flags at all, and "pthread-config"
7347# which is a program returning the flags for the Pth emulation library.
7348
7349ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
7350
7351# The ordering *is* (sometimes) important. Some notes on the
7352# individual items follow:
7353
7354# pthreads: AIX (must check this before -lpthread)
7355# none: in case threads are in libc; should be tried before -Kthread and
7356# other compiler flags to prevent continual compiler warnings
7357# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7358# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7359# (Note: HP C rejects this with "bad form for `-t' option")
7360# -pthreads: Solaris/gcc (Note: HP C also rejects)
7361# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7362# doesn't hurt to check since this sometimes defines pthreads and
7363# -D_REENTRANT too), HP C (must be checked before -lpthread, which
7364# is present but should not be used directly; and before -mthreads,
7365# because the compiler interprets this as "-mt" + "-hreads")
7366# -mthreads: Mingw32/gcc, Lynx/gcc
7367# pthread: Linux, etcetera
7368# --thread-safe: KAI C++
7369# pthread-config: use pthread-config program (for GNU Pth library)
7370
7371case $host_os in
7372
7373 freebsd*)
7374
7375 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7376 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7377
7378 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
7379 ;;
7380
7381 hpux*)
7382
7383 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7384 # multi-threading and also sets -lpthread."
7385
7386 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7387 ;;
7388
7389 openedition*)
7390
7391 # IBM z/OS requires a feature-test macro to be defined in order to
7392 # enable POSIX threads at all, so give the user a hint if this is
7393 # not set. (We don't define these ourselves, as they can affect
7394 # other portions of the system API in unpredictable ways.)
7395
7396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7397/* end confdefs.h. */
7398
7399# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7400 AX_PTHREAD_ZOS_MISSING
7401# endif
7402
7403_ACEOF
7404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7405 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7407$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7408fi
7409rm -f conftest*
7410
7411 ;;
7412
7413 solaris*)
7414
7415 # On Solaris (at least, for some versions), libc contains stubbed
7416 # (non-functional) versions of the pthreads routines, so link-based
7417 # tests will erroneously succeed. (N.B.: The stubs are missing
7418 # pthread_cleanup_push, or rather a function called by this macro,
7419 # so we could check for that, but who knows whether they'll stub
7420 # that too in a future libc.) So we'll check first for the
7421 # standard Solaris way of linking pthreads (-mt -lpthread).
7422
7423 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
7424 ;;
7425esac
7426
7427# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
7428
7429if test "x$GCC" = "xyes"; then :
7430 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
7431fi
7432
7433# The presence of a feature test macro requesting re-entrant function
7434# definitions is, on some systems, a strong hint that pthreads support is
7435# correctly enabled
7436
7437case $host_os in
7438 darwin* | hpux* | linux* | osf* | solaris*)
7439 ax_pthread_check_macro="_REENTRANT"
7440 ;;
7441
7442 aix*)
7443 ax_pthread_check_macro="_THREAD_SAFE"
7444 ;;
7445
7446 *)
7447 ax_pthread_check_macro="--"
7448 ;;
7449esac
7450if test "x$ax_pthread_check_macro" = "x--"; then :
7451 ax_pthread_check_cond=0
7452else
7453 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
7454fi
7455
7456# Are we compiling with Clang?
7457
7458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
7459$as_echo_n "checking whether $CC is Clang... " >&6; }
7460if ${ax_cv_PTHREAD_CLANG+:} false; then :
7461 $as_echo_n "(cached) " >&6
7462else
7463 ax_cv_PTHREAD_CLANG=no
7464 # Note that Autoconf sets GCC=yes for Clang as well as GCC
7465 if test "x$GCC" = "xyes"; then
7466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7467/* end confdefs.h. */
7468/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
7469# if defined(__clang__) && defined(__llvm__)
7470 AX_PTHREAD_CC_IS_CLANG
7471# endif
7472
7473_ACEOF
7474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7475 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
7476 ax_cv_PTHREAD_CLANG=yes
7477fi
7478rm -f conftest*
7479
7480 fi
7481
7482fi
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
7484$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
7485ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
7486
7487ax_pthread_clang_warning=no
7488
7489# Clang needs special handling, because older versions handle the -pthread
7490# option in a rather... idiosyncratic way
7491
7492if test "x$ax_pthread_clang" = "xyes"; then
7493
7494 # Clang takes -pthread; it has never supported any other flag
7495
7496 # (Note 1: This will need to be revisited if a system that Clang
7497 # supports has POSIX threads in a separate library. This tends not
7498 # to be the way of modern systems, but it's conceivable.)
7499
7500 # (Note 2: On some systems, notably Darwin, -pthread is not needed
7501 # to get POSIX threads support; the API is always present and
7502 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
7503 # -pthread does define _REENTRANT, and while the Darwin headers
7504 # ignore this macro, third-party headers might not.)
7505
7506 PTHREAD_CFLAGS="-pthread"
7507 PTHREAD_LIBS=
7508
7509 ax_pthread_ok=yes
7510
7511 # However, older versions of Clang make a point of warning the user
7512 # that, in an invocation where only linking and no compilation is
7513 # taking place, the -pthread option has no effect ("argument unused
7514 # during compilation"). They expect -pthread to be passed in only
7515 # when source code is being compiled.
7516 #
7517 # Problem is, this is at odds with the way Automake and most other
7518 # C build frameworks function, which is that the same flags used in
7519 # compilation (CFLAGS) are also used in linking. Many systems
7520 # supported by AX_PTHREAD require exactly this for POSIX threads
7521 # support, and in fact it is often not straightforward to specify a
7522 # flag that is used only in the compilation phase and not in
7523 # linking. Such a scenario is extremely rare in practice.
7524 #
7525 # Even though use of the -pthread flag in linking would only print
7526 # a warning, this can be a nuisance for well-run software projects
7527 # that build with -Werror. So if the active version of Clang has
7528 # this misfeature, we search for an option to squash it.
7529
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
7531$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
7532if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
7533 $as_echo_n "(cached) " >&6
7534else
7535 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
7536 # Create an alternate version of $ac_link that compiles and
7537 # links in two steps (.c -> .o, .o -> exe) instead of one
7538 # (.c -> exe), because the warning occurs only in the second
7539 # step
7540 ax_pthread_save_ac_link="$ac_link"
7541 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
7542 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
7543 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
7544 ax_pthread_save_CFLAGS="$CFLAGS"
7545 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
7546 if test "x$ax_pthread_try" = "xunknown"; then :
7547 break
7548fi
7549 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
7550 ac_link="$ax_pthread_save_ac_link"
7551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7552/* end confdefs.h. */
7553int main(void){return 0;}
7554_ACEOF
7555if ac_fn_c_try_link "$LINENO"; then :
7556 ac_link="$ax_pthread_2step_ac_link"
7557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7558/* end confdefs.h. */
7559int main(void){return 0;}
7560_ACEOF
7561if ac_fn_c_try_link "$LINENO"; then :
7562 break
7563fi
7564rm -f core conftest.err conftest.$ac_objext \
7565 conftest$ac_exeext conftest.$ac_ext
7566
7567fi
7568rm -f core conftest.err conftest.$ac_objext \
7569 conftest$ac_exeext conftest.$ac_ext
7570 done
7571 ac_link="$ax_pthread_save_ac_link"
7572 CFLAGS="$ax_pthread_save_CFLAGS"
7573 if test "x$ax_pthread_try" = "x"; then :
7574 ax_pthread_try=no
7575fi
7576 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
7577
7578fi
7579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
7580$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
7581
7582 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
7583 no | unknown) ;;
7584 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
7585 esac
7586
7587fi # $ax_pthread_clang = yes
7588
7589if test "x$ax_pthread_ok" = "xno"; then
7590for ax_pthread_try_flag in $ax_pthread_flags; do
7591
7592 case $ax_pthread_try_flag in
7593 none)
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7595$as_echo_n "checking whether pthreads work without any flags... " >&6; }
7596 ;;
7597
7598 -mt,pthread)
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7600$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7601 PTHREAD_CFLAGS="-mt"
7602 PTHREAD_LIBS="-lpthread"
7603 ;;
7604
7605 -*)
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
7607$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
7608 PTHREAD_CFLAGS="$ax_pthread_try_flag"
7609 ;;
7610
7611 pthread-config)
7612 # Extract the first word of "pthread-config", so it can be a program name with args.
7613set dummy pthread-config; ac_word=$2
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7615$as_echo_n "checking for $ac_word... " >&6; }
7616if ${ac_cv_prog_ax_pthread_config+:} false; then :
7617 $as_echo_n "(cached) " >&6
7618else
7619 if test -n "$ax_pthread_config"; then
7620 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
7621else
7622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625 IFS=$as_save_IFS
7626 test -z "$as_dir" && as_dir=.
7627 for ac_exec_ext in '' $ac_executable_extensions; do
7628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629 ac_cv_prog_ax_pthread_config="yes"
7630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631 break 2
7632 fi
7633done
7634 done
7635IFS=$as_save_IFS
7636
7637 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
7638fi
7639fi
7640ax_pthread_config=$ac_cv_prog_ax_pthread_config
7641if test -n "$ax_pthread_config"; then
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
7643$as_echo "$ax_pthread_config" >&6; }
7644else
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650 if test "x$ax_pthread_config" = "xno"; then :
7651 continue
7652fi
7653 PTHREAD_CFLAGS="`pthread-config --cflags`"
7654 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
7655 ;;
7656
7657 *)
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
7659$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
7660 PTHREAD_LIBS="-l$ax_pthread_try_flag"
7661 ;;
7662 esac
7663
7664 ax_pthread_save_CFLAGS="$CFLAGS"
7665 ax_pthread_save_LIBS="$LIBS"
7666 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7667 LIBS="$PTHREAD_LIBS $LIBS"
7668
7669 # Check for various functions. We must include pthread.h,
7670 # since some functions may be macros. (On the Sequent, we
7671 # need a special flag -Kthread to make this header compile.)
7672 # We check for pthread_join because it is in -lpthread on IRIX
7673 # while pthread_create is in libc. We check for pthread_attr_init
7674 # due to DEC craziness with -lpthreads. We check for
7675 # pthread_cleanup_push because it is one of the few pthread
7676 # functions on Solaris that doesn't have a non-functional libc stub.
7677 # We try pthread_create on general principles.
7678
7679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7680/* end confdefs.h. */
7681#include <pthread.h>
7682# if $ax_pthread_check_cond
7683# error "$ax_pthread_check_macro must be defined"
7684# endif
7685 static void routine(void *a) { a = 0; }
7686 static void *start_routine(void *a) { return a; }
7687int
7688main ()
7689{
7690pthread_t th; pthread_attr_t attr;
7691 pthread_create(&th, 0, start_routine, 0);
7692 pthread_join(th, 0);
7693 pthread_attr_init(&attr);
7694 pthread_cleanup_push(routine, 0);
7695 pthread_cleanup_pop(0) /* ; */
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700if ac_fn_c_try_link "$LINENO"; then :
7701 ax_pthread_ok=yes
7702fi
7703rm -f core conftest.err conftest.$ac_objext \
7704 conftest$ac_exeext conftest.$ac_ext
7705
7706 CFLAGS="$ax_pthread_save_CFLAGS"
7707 LIBS="$ax_pthread_save_LIBS"
7708
7709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7710$as_echo "$ax_pthread_ok" >&6; }
7711 if test "x$ax_pthread_ok" = "xyes"; then :
7712 break
7713fi
7714
7715 PTHREAD_LIBS=""
7716 PTHREAD_CFLAGS=""
7717done
7718fi
7719
7720# Various other checks:
7721if test "x$ax_pthread_ok" = "xyes"; then
7722 ax_pthread_save_CFLAGS="$CFLAGS"
7723 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
7724 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7725 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
7726
7727 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
7729$as_echo_n "checking for joinable pthread attribute... " >&6; }
7730if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
7731 $as_echo_n "(cached) " >&6
7732else
7733 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
7734 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
7735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7736/* end confdefs.h. */
7737#include <pthread.h>
7738int
7739main ()
7740{
7741int attr = $ax_pthread_attr; return attr /* ; */
7742 ;
7743 return 0;
7744}
7745_ACEOF
7746if ac_fn_c_try_link "$LINENO"; then :
7747 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
7748fi
7749rm -f core conftest.err conftest.$ac_objext \
7750 conftest$ac_exeext conftest.$ac_ext
7751 done
7752
7753fi
7754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
7755$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
7756 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
7757 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
7758 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
7759
7760cat >>confdefs.h <<_ACEOF
7761#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
7762_ACEOF
7763
7764 ax_pthread_joinable_attr_defined=yes
7765
7766fi
7767
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
7769$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
7770if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
7771 $as_echo_n "(cached) " >&6
7772else
7773 ax_cv_PTHREAD_SPECIAL_FLAGS=no
7774 case $host_os in
7775 solaris*)
7776 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
7777 ;;
7778 esac
7779
7780fi
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
7782$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
7783 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
7784 test "x$ax_pthread_special_flags_added" != "xyes"; then :
7785 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
7786 ax_pthread_special_flags_added=yes
7787fi
7788
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
7790$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
7791if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
7792 $as_echo_n "(cached) " >&6
7793else
7794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7795/* end confdefs.h. */
7796#include <pthread.h>
7797int
7798main ()
7799{
7800int i = PTHREAD_PRIO_INHERIT;
7801 ;
7802 return 0;
7803}
7804_ACEOF
7805if ac_fn_c_try_link "$LINENO"; then :
7806 ax_cv_PTHREAD_PRIO_INHERIT=yes
7807else
7808 ax_cv_PTHREAD_PRIO_INHERIT=no
7809fi
7810rm -f core conftest.err conftest.$ac_objext \
7811 conftest$ac_exeext conftest.$ac_ext
7812
7813fi
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
7815$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
7816 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
7817 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
7818
7819$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
7820
7821 ax_pthread_prio_inherit_defined=yes
7822
7823fi
7824
7825 CFLAGS="$ax_pthread_save_CFLAGS"
7826 LIBS="$ax_pthread_save_LIBS"
7827
7828 # More AIX lossage: compile with *_r variant
7829 if test "x$GCC" != "xyes"; then
7830 case $host_os in
7831 aix*)
7832 case "x/$CC" in #(
7833 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
7834 #handle absolute path differently from PATH based program lookup
7835 case "x$CC" in #(
7836 x/*) :
7837 if as_fn_executable_p ${CC}_r; then :
7838 PTHREAD_CC="${CC}_r"
7839fi ;; #(
7840 *) :
7841 for ac_prog in ${CC}_r
7842do
7843 # Extract the first word of "$ac_prog", so it can be a program name with args.
7844set dummy $ac_prog; ac_word=$2
7845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7846$as_echo_n "checking for $ac_word... " >&6; }
7847if ${ac_cv_prog_PTHREAD_CC+:} false; then :
7848 $as_echo_n "(cached) " >&6
7849else
7850 if test -n "$PTHREAD_CC"; then
7851 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
7852else
7853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854for as_dir in $PATH
7855do
7856 IFS=$as_save_IFS
7857 test -z "$as_dir" && as_dir=.
7858 for ac_exec_ext in '' $ac_executable_extensions; do
7859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860 ac_cv_prog_PTHREAD_CC="$ac_prog"
7861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862 break 2
7863 fi
7864done
7865 done
7866IFS=$as_save_IFS
7867
7868fi
7869fi
7870PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
7871if test -n "$PTHREAD_CC"; then
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
7873$as_echo "$PTHREAD_CC" >&6; }
7874else
7875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876$as_echo "no" >&6; }
7877fi
7878
7879
7880 test -n "$PTHREAD_CC" && break
7881done
7882test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7883 ;;
7884esac ;; #(
7885 *) :
7886 ;;
7887esac
7888 ;;
7889 esac
7890 fi
7891fi
7892
7893test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
7894
7895
7896
7897
7898
7899# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
7900if test "x$ax_pthread_ok" = "xyes"; then
7901 threads=yes
7902 :
7903else
7904 ax_pthread_ok=no
7905 threads=no
7906fi
7907ac_ext=cpp
7908ac_cpp='$CXXCPP $CPPFLAGS'
7909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7912
7913
7914 if test "$threads" = "yes"; then
7915 save_LIBS="$LIBS"
7916 LIBS="$PTHREAD_LIBS $LIBS"
7917 save_CXXFLAGS="$CXXFLAGS"
7918 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
7920$as_echo_n "checking for std::thread... " >&6; }
7921if ${gdb_cv_cxx_std_thread+:} false; then :
7922 $as_echo_n "(cached) " >&6
7923else
7924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7925/* end confdefs.h. */
7926#include <thread>
7927 void callback() { }
7928int
7929main ()
7930{
7931std::thread t(callback);
7932 ;
7933 return 0;
7934}
7935_ACEOF
7936if ac_fn_cxx_try_compile "$LINENO"; then :
7937 gdb_cv_cxx_std_thread=yes
7938else
7939 gdb_cv_cxx_std_thread=no
7940fi
7941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7942fi
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
7944$as_echo "$gdb_cv_cxx_std_thread" >&6; }
7945
7946 # This check must be here, while LIBS includes any necessary
7947 # threading library.
7948 for ac_func in pthread_sigmask pthread_setname_np
7949do :
7950 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7951ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
7952if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7953 cat >>confdefs.h <<_ACEOF
7954#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7955_ACEOF
7956
7957fi
7958done
7959
7960
7961 LIBS="$save_LIBS"
7962 CXXFLAGS="$save_CXXFLAGS"
7963 fi
7964 if test "$gdb_cv_cxx_std_thread" = "yes"; then
7965
7966$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
7967
7968 fi
7969 ac_ext=c
7970ac_cpp='$CPP $CPPFLAGS'
7971ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7972ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7973ac_compiler_gnu=$ac_cv_c_compiler_gnu
7974
7975
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
7977$as_echo_n "checking for sigsetjmp... " >&6; }
7978if ${gdb_cv_func_sigsetjmp+:} false; then :
7979 $as_echo_n "(cached) " >&6
7980else
7981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 7982/* end confdefs.h. */
b9442ec1 7983#include <setjmp.h>
5e030278
TT
7984int
7985main ()
7986{
b9442ec1
SM
7987sigjmp_buf env;
7988 while (! sigsetjmp (env, 1))
7989 siglongjmp (env, 1);
7990
5e030278
TT
7991 ;
7992 return 0;
7993}
7994_ACEOF
05ea2a05
TT
7995if ac_fn_c_try_compile "$LINENO"; then :
7996 gdb_cv_func_sigsetjmp=yes
7997else
7998 gdb_cv_func_sigsetjmp=no
b9442ec1 7999
5e030278 8000fi
05ea2a05 8001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b9442ec1 8002
5e030278 8003fi
05ea2a05
TT
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
8005$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
8006 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 8007
05ea2a05 8008$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 8009
05ea2a05 8010 fi
5e030278 8011
5e030278 8012
05ea2a05
TT
8013# Check whether --with-intel_pt was given.
8014if test "${with_intel_pt+set}" = set; then :
8015 withval=$with_intel_pt;
8016else
8017 with_intel_pt=auto
8018fi
5e030278 8019
05ea2a05
TT
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
8021$as_echo_n "checking whether to use intel pt... " >&6; }
8022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
8023$as_echo "$with_intel_pt" >&6; }
5e030278 8024
05ea2a05
TT
8025 if test "${with_intel_pt}" = no; then
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
8027$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
8028 HAVE_LIBIPT=no
8029 else
8030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278
TT
8031/* end confdefs.h. */
8032
05ea2a05
TT
8033 #include <linux/perf_event.h>
8034 #ifndef PERF_ATTR_SIZE_VER5
8035 # error
8036 #endif
5e030278
TT
8037
8038_ACEOF
05ea2a05
TT
8039if ac_fn_c_try_cpp "$LINENO"; then :
8040 perf_event=yes
8041else
8042 perf_event=no
5e030278 8043fi
05ea2a05
TT
8044rm -f conftest.err conftest.i conftest.$ac_ext
8045 if test "$perf_event" != yes; then
8046 if test "$with_intel_pt" = yes; then
8047 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
8048 else
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
8050$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
8051 fi
8052 fi
5e030278 8053
5e030278 8054
5e030278 8055
5e030278 8056
5e030278 8057
5e030278 8058
5e030278 8059
5e030278 8060
5e030278 8061
05ea2a05 8062 use_additional=yes
5e030278 8063
05ea2a05
TT
8064 acl_save_prefix="$prefix"
8065 prefix="$acl_final_prefix"
8066 acl_save_exec_prefix="$exec_prefix"
8067 exec_prefix="$acl_final_exec_prefix"
5e030278 8068
05ea2a05
TT
8069 eval additional_includedir=\"$includedir\"
8070 eval additional_libdir=\"$libdir\"
5e030278 8071
05ea2a05
TT
8072 exec_prefix="$acl_save_exec_prefix"
8073 prefix="$acl_save_prefix"
5e030278 8074
5e030278 8075
05ea2a05
TT
8076# Check whether --with-libipt-prefix was given.
8077if test "${with_libipt_prefix+set}" = set; then :
8078 withval=$with_libipt_prefix;
8079 if test "X$withval" = "Xno"; then
8080 use_additional=no
8081 else
8082 if test "X$withval" = "X"; then
5e030278 8083
05ea2a05
TT
8084 acl_save_prefix="$prefix"
8085 prefix="$acl_final_prefix"
8086 acl_save_exec_prefix="$exec_prefix"
8087 exec_prefix="$acl_final_exec_prefix"
5e030278 8088
05ea2a05
TT
8089 eval additional_includedir=\"$includedir\"
8090 eval additional_libdir=\"$libdir\"
5e030278 8091
05ea2a05
TT
8092 exec_prefix="$acl_save_exec_prefix"
8093 prefix="$acl_save_prefix"
5e030278 8094
05ea2a05
TT
8095 else
8096 additional_includedir="$withval/include"
8097 additional_libdir="$withval/lib"
8098 fi
8099 fi
5e030278 8100
05ea2a05 8101fi
5e030278 8102
9f1528a1
AB
8103
8104# Check whether --with-libipt-type was given.
8105if test "${with_libipt_type+set}" = set; then :
8106 withval=$with_libipt_type; with_libipt_type=$withval
8107else
8108 with_libipt_type=auto
8109fi
8110
8111 lib_type=`eval echo \$with_libipt_type`
8112
05ea2a05
TT
8113 LIBIPT=
8114 LTLIBIPT=
8115 INCIPT=
8116 rpathdirs=
8117 ltrpathdirs=
8118 names_already_handled=
8119 names_next_round='ipt '
8120 while test -n "$names_next_round"; do
8121 names_this_round="$names_next_round"
8122 names_next_round=
8123 for name in $names_this_round; do
8124 already_handled=
8125 for n in $names_already_handled; do
8126 if test "$n" = "$name"; then
8127 already_handled=yes
8128 break
8129 fi
8130 done
8131 if test -z "$already_handled"; then
8132 names_already_handled="$names_already_handled $name"
8133 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8134 eval value=\"\$HAVE_LIB$uppername\"
8135 if test -n "$value"; then
8136 if test "$value" = yes; then
8137 eval value=\"\$LIB$uppername\"
8138 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
8139 eval value=\"\$LTLIB$uppername\"
8140 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
8141 else
8142 :
8143 fi
8144 else
8145 found_dir=
8146 found_la=
8147 found_so=
8148 found_a=
8149 if test $use_additional = yes; then
9f1528a1 8150 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
8151 found_dir="$additional_libdir"
8152 found_so="$additional_libdir/lib$name.$shlibext"
8153 if test -f "$additional_libdir/lib$name.la"; then
8154 found_la="$additional_libdir/lib$name.la"
8155 fi
9f1528a1 8156 elif test x$lib_type != xshared; then
05ea2a05
TT
8157 if test -f "$additional_libdir/lib$name.$libext"; then
8158 found_dir="$additional_libdir"
8159 found_a="$additional_libdir/lib$name.$libext"
8160 if test -f "$additional_libdir/lib$name.la"; then
8161 found_la="$additional_libdir/lib$name.la"
8162 fi
8163 fi
8164 fi
8165 fi
8166 if test "X$found_dir" = "X"; then
8167 for x in $LDFLAGS $LTLIBIPT; do
8168
8169 acl_save_prefix="$prefix"
8170 prefix="$acl_final_prefix"
8171 acl_save_exec_prefix="$exec_prefix"
8172 exec_prefix="$acl_final_exec_prefix"
8173 eval x=\"$x\"
8174 exec_prefix="$acl_save_exec_prefix"
8175 prefix="$acl_save_prefix"
8176
8177 case "$x" in
8178 -L*)
8179 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8180 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
8181 found_dir="$dir"
8182 found_so="$dir/lib$name.$shlibext"
8183 if test -f "$dir/lib$name.la"; then
8184 found_la="$dir/lib$name.la"
8185 fi
9f1528a1 8186 elif test x$lib_type != xshared; then
05ea2a05
TT
8187 if test -f "$dir/lib$name.$libext"; then
8188 found_dir="$dir"
8189 found_a="$dir/lib$name.$libext"
8190 if test -f "$dir/lib$name.la"; then
8191 found_la="$dir/lib$name.la"
8192 fi
8193 fi
8194 fi
8195 ;;
8196 esac
8197 if test "X$found_dir" != "X"; then
8198 break
8199 fi
8200 done
8201 fi
8202 if test "X$found_dir" != "X"; then
8203 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
8204 if test "X$found_so" != "X"; then
8205 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8206 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8207 else
8208 haveit=
8209 for x in $ltrpathdirs; do
8210 if test "X$x" = "X$found_dir"; then
8211 haveit=yes
8212 break
8213 fi
8214 done
8215 if test -z "$haveit"; then
8216 ltrpathdirs="$ltrpathdirs $found_dir"
8217 fi
8218 if test "$hardcode_direct" = yes; then
8219 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8220 else
8221 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8222 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8223 haveit=
8224 for x in $rpathdirs; do
8225 if test "X$x" = "X$found_dir"; then
8226 haveit=yes
8227 break
8228 fi
8229 done
8230 if test -z "$haveit"; then
8231 rpathdirs="$rpathdirs $found_dir"
8232 fi
8233 else
8234 haveit=
8235 for x in $LDFLAGS $LIBIPT; do
8236
8237 acl_save_prefix="$prefix"
8238 prefix="$acl_final_prefix"
8239 acl_save_exec_prefix="$exec_prefix"
8240 exec_prefix="$acl_final_exec_prefix"
8241 eval x=\"$x\"
8242 exec_prefix="$acl_save_exec_prefix"
8243 prefix="$acl_save_prefix"
8244
8245 if test "X$x" = "X-L$found_dir"; then
8246 haveit=yes
8247 break
8248 fi
8249 done
8250 if test -z "$haveit"; then
8251 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
8252 fi
8253 if test "$hardcode_minus_L" != no; then
8254 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
8255 else
8256 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8257 fi
8258 fi
8259 fi
8260 fi
8261 else
8262 if test "X$found_a" != "X"; then
8263 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
8264 else
8265 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
8266 fi
8267 fi
8268 additional_includedir=
8269 case "$found_dir" in
8270 */lib | */lib/)
8271 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8272 additional_includedir="$basedir/include"
8273 ;;
8274 esac
8275 if test "X$additional_includedir" != "X"; then
8276 if test "X$additional_includedir" != "X/usr/include"; then
8277 haveit=
8278 if test "X$additional_includedir" = "X/usr/local/include"; then
8279 if test -n "$GCC"; then
8280 case $host_os in
8281 linux*) haveit=yes;;
8282 esac
8283 fi
8284 fi
8285 if test -z "$haveit"; then
8286 for x in $CPPFLAGS $INCIPT; do
8287
8288 acl_save_prefix="$prefix"
8289 prefix="$acl_final_prefix"
8290 acl_save_exec_prefix="$exec_prefix"
8291 exec_prefix="$acl_final_exec_prefix"
8292 eval x=\"$x\"
8293 exec_prefix="$acl_save_exec_prefix"
8294 prefix="$acl_save_prefix"
8295
8296 if test "X$x" = "X-I$additional_includedir"; then
8297 haveit=yes
8298 break
8299 fi
8300 done
8301 if test -z "$haveit"; then
8302 if test -d "$additional_includedir"; then
8303 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
8304 fi
8305 fi
8306 fi
8307 fi
8308 fi
8309 if test -n "$found_la"; then
8310 save_libdir="$libdir"
8311 case "$found_la" in
8312 */* | *\\*) . "$found_la" ;;
8313 *) . "./$found_la" ;;
8314 esac
8315 libdir="$save_libdir"
8316 for dep in $dependency_libs; do
8317 case "$dep" in
8318 -L*)
8319 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8320 if test "X$additional_libdir" != "X/usr/lib"; then
8321 haveit=
8322 if test "X$additional_libdir" = "X/usr/local/lib"; then
8323 if test -n "$GCC"; then
8324 case $host_os in
8325 linux*) haveit=yes;;
8326 esac
8327 fi
8328 fi
8329 if test -z "$haveit"; then
8330 haveit=
8331 for x in $LDFLAGS $LIBIPT; do
8332
8333 acl_save_prefix="$prefix"
8334 prefix="$acl_final_prefix"
8335 acl_save_exec_prefix="$exec_prefix"
8336 exec_prefix="$acl_final_exec_prefix"
8337 eval x=\"$x\"
8338 exec_prefix="$acl_save_exec_prefix"
8339 prefix="$acl_save_prefix"
8340
8341 if test "X$x" = "X-L$additional_libdir"; then
8342 haveit=yes
8343 break
8344 fi
8345 done
8346 if test -z "$haveit"; then
8347 if test -d "$additional_libdir"; then
8348 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
8349 fi
8350 fi
8351 haveit=
8352 for x in $LDFLAGS $LTLIBIPT; do
8353
8354 acl_save_prefix="$prefix"
8355 prefix="$acl_final_prefix"
8356 acl_save_exec_prefix="$exec_prefix"
8357 exec_prefix="$acl_final_exec_prefix"
8358 eval x=\"$x\"
8359 exec_prefix="$acl_save_exec_prefix"
8360 prefix="$acl_save_prefix"
8361
8362 if test "X$x" = "X-L$additional_libdir"; then
8363 haveit=yes
8364 break
8365 fi
8366 done
8367 if test -z "$haveit"; then
8368 if test -d "$additional_libdir"; then
8369 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
8370 fi
8371 fi
8372 fi
8373 fi
8374 ;;
8375 -R*)
8376 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8377 if test "$enable_rpath" != no; then
8378 haveit=
8379 for x in $rpathdirs; do
8380 if test "X$x" = "X$dir"; then
8381 haveit=yes
8382 break
8383 fi
8384 done
8385 if test -z "$haveit"; then
8386 rpathdirs="$rpathdirs $dir"
8387 fi
8388 haveit=
8389 for x in $ltrpathdirs; do
8390 if test "X$x" = "X$dir"; then
8391 haveit=yes
8392 break
8393 fi
8394 done
8395 if test -z "$haveit"; then
8396 ltrpathdirs="$ltrpathdirs $dir"
8397 fi
8398 fi
8399 ;;
8400 -l*)
8401 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8402 ;;
8403 *.la)
8404 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8405 ;;
8406 *)
8407 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
8408 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
8409 ;;
8410 esac
8411 done
8412 fi
8413 else
9f1528a1
AB
8414 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8415 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
8416 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
8417 else
8418 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
8419 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
8420 fi
05ea2a05
TT
8421 fi
8422 fi
8423 fi
8424 done
8425 done
8426 if test "X$rpathdirs" != "X"; then
8427 if test -n "$hardcode_libdir_separator"; then
8428 alldirs=
8429 for found_dir in $rpathdirs; do
8430 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8431 done
8432 acl_save_libdir="$libdir"
8433 libdir="$alldirs"
8434 eval flag=\"$hardcode_libdir_flag_spec\"
8435 libdir="$acl_save_libdir"
8436 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8437 else
8438 for found_dir in $rpathdirs; do
8439 acl_save_libdir="$libdir"
8440 libdir="$found_dir"
8441 eval flag=\"$hardcode_libdir_flag_spec\"
8442 libdir="$acl_save_libdir"
8443 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
8444 done
8445 fi
8446 fi
8447 if test "X$ltrpathdirs" != "X"; then
8448 for found_dir in $ltrpathdirs; do
8449 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
8450 done
8451 fi
5e030278 8452
5e030278 8453
05ea2a05 8454 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 8455
05ea2a05
TT
8456 for element in $INCIPT; do
8457 haveit=
8458 for x in $CPPFLAGS; do
5e030278 8459
05ea2a05
TT
8460 acl_save_prefix="$prefix"
8461 prefix="$acl_final_prefix"
8462 acl_save_exec_prefix="$exec_prefix"
8463 exec_prefix="$acl_final_exec_prefix"
8464 eval x=\"$x\"
8465 exec_prefix="$acl_save_exec_prefix"
8466 prefix="$acl_save_prefix"
8467
8468 if test "X$x" = "X$element"; then
8469 haveit=yes
8470 break
8471 fi
8472 done
8473 if test -z "$haveit"; then
8474 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8475 fi
8476 done
8477
8478
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
8480$as_echo_n "checking for libipt... " >&6; }
8481if ${ac_cv_libipt+:} false; then :
8482 $as_echo_n "(cached) " >&6
8483else
8484
8485 ac_save_LIBS="$LIBS"
8486 LIBS="$LIBS $LIBIPT"
8487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 8488/* end confdefs.h. */
05ea2a05
TT
8489#include "intel-pt.h"
8490int
8491main ()
8492{
8493pt_insn_alloc_decoder (0);
8494 ;
8495 return 0;
8496}
5e030278
TT
8497_ACEOF
8498if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
8499 ac_cv_libipt=yes
8500else
8501 ac_cv_libipt=no
5e030278
TT
8502fi
8503rm -f core conftest.err conftest.$ac_objext \
8504 conftest$ac_exeext conftest.$ac_ext
05ea2a05 8505 LIBS="$ac_save_LIBS"
5e030278
TT
8506
8507fi
05ea2a05
TT
8508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
8509$as_echo "$ac_cv_libipt" >&6; }
8510 if test "$ac_cv_libipt" = yes; then
8511 HAVE_LIBIPT=yes
5e030278 8512
05ea2a05 8513$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
5e030278 8514
05ea2a05
TT
8515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
8516$as_echo_n "checking how to link with libipt... " >&6; }
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
8518$as_echo "$LIBIPT" >&6; }
8519 else
8520 HAVE_LIBIPT=no
8521 CPPFLAGS="$ac_save_CPPFLAGS"
8522 LIBIPT=
8523 LTLIBIPT=
8524 fi
5e030278 8525
5e030278 8526
5e030278 8527
5e030278 8528
5e030278 8529
5e030278 8530
05ea2a05
TT
8531 if test "$HAVE_LIBIPT" != yes; then
8532 if test "$with_intel_pt" = yes; then
8533 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
8534 else
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
8536$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
8537 fi
8538 else
8539 save_LIBS=$LIBS
8540 LIBS="$LIBS $LIBIPT"
8541 for ac_func in pt_insn_event
8542do :
8543 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
8544if test "x$ac_cv_func_pt_insn_event" = xyes; then :
8545 cat >>confdefs.h <<_ACEOF
8546#define HAVE_PT_INSN_EVENT 1
8547_ACEOF
5e030278 8548
5e030278 8549fi
05ea2a05
TT
8550done
8551
8552 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
8553"
8554if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
8555
8556cat >>confdefs.h <<_ACEOF
8557#define HAVE_STRUCT_PT_INSN_ENABLED 1
8558_ACEOF
5e030278
TT
8559
8560
5e030278 8561fi
05ea2a05
TT
8562ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
8563"
8564if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
5e030278 8565
05ea2a05
TT
8566cat >>confdefs.h <<_ACEOF
8567#define HAVE_STRUCT_PT_INSN_RESYNCED 1
8568_ACEOF
5e030278 8569
5e030278 8570
05ea2a05 8571fi
5e030278 8572
05ea2a05
TT
8573 LIBS=$save_LIBS
8574 fi
8575 fi
8576
c8693053
RO
8577
8578$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
8579
8580 for ac_header in sys/procfs.h
8581do :
8582 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
8583if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
8584 cat >>confdefs.h <<_ACEOF
8585#define HAVE_SYS_PROCFS_H 1
8586_ACEOF
8587
8588fi
8589
8590done
8591
05ea2a05 8592 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
8593
8594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
8595$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
8596 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
8597 $as_echo_n "(cached) " >&6
8598else
8599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 8600/* end confdefs.h. */
05ea2a05
TT
8601
8602#define _SYSCALL32
05ea2a05 8603#include <sys/procfs.h>
5e030278
TT
8604int
8605main ()
8606{
05ea2a05 8607gregset_t avar
5e030278
TT
8608 ;
8609 return 0;
8610}
8611_ACEOF
05ea2a05
TT
8612if ac_fn_c_try_compile "$LINENO"; then :
8613 bfd_cv_have_sys_procfs_type_gregset_t=yes
8614else
8615 bfd_cv_have_sys_procfs_type_gregset_t=no
5e030278 8616
5e030278 8617fi
05ea2a05 8618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
8619fi
8620
05ea2a05 8621 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5e030278 8622
05ea2a05
TT
8623$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
8624
8625 fi
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
8627$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
8628
c8693053
RO
8629
8630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
8631$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
8632 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
5e030278
TT
8633 $as_echo_n "(cached) " >&6
8634else
05ea2a05 8635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 8636/* end confdefs.h. */
05ea2a05
TT
8637
8638#define _SYSCALL32
05ea2a05 8639#include <sys/procfs.h>
5e030278
TT
8640int
8641main ()
8642{
05ea2a05 8643fpregset_t avar
5e030278
TT
8644 ;
8645 return 0;
8646}
8647_ACEOF
05ea2a05 8648if ac_fn_c_try_compile "$LINENO"; then :
db6878ac
SM
8649 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8650else
8651 bfd_cv_have_sys_procfs_type_fpregset_t=no
8652
8653fi
8654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8655fi
8656
8657 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8658
8659$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
8660
8661 fi
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
8663$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
8664
c8693053
RO
8665
8666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
db6878ac
SM
8667$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
8668 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
8669 $as_echo_n "(cached) " >&6
8670else
8671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8672/* end confdefs.h. */
8673
8674#define _SYSCALL32
db6878ac
SM
8675#include <sys/procfs.h>
8676int
8677main ()
8678{
8679prgregset_t avar
8680 ;
8681 return 0;
8682}
8683_ACEOF
8684if ac_fn_c_try_compile "$LINENO"; then :
8685 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8686else
8687 bfd_cv_have_sys_procfs_type_prgregset_t=no
8688
8689fi
8690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8691fi
8692
8693 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8694
8695$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
8696
8697 fi
8698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
8699$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
8700
c8693053
RO
8701
8702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
db6878ac
SM
8703$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
8704 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
8705 $as_echo_n "(cached) " >&6
8706else
8707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8708/* end confdefs.h. */
8709
8710#define _SYSCALL32
db6878ac
SM
8711#include <sys/procfs.h>
8712int
8713main ()
8714{
8715prfpregset_t avar
8716 ;
8717 return 0;
8718}
8719_ACEOF
8720if ac_fn_c_try_compile "$LINENO"; then :
8721 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8722else
8723 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8724
8725fi
8726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8727fi
8728
8729 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8730
8731$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
8732
8733 fi
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
8735$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
8736
c8693053
RO
8737
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
db6878ac
SM
8739$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
8740 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
8741 $as_echo_n "(cached) " >&6
8742else
8743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744/* end confdefs.h. */
8745
8746#define _SYSCALL32
db6878ac
SM
8747#include <sys/procfs.h>
8748int
8749main ()
8750{
8751prgregset32_t avar
8752 ;
8753 return 0;
8754}
8755_ACEOF
8756if ac_fn_c_try_compile "$LINENO"; then :
8757 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8758else
8759 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8760
8761fi
8762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8763fi
8764
8765 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8766
8767$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
8768
8769 fi
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
8771$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
8772
c8693053
RO
8773
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
db6878ac
SM
8775$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
8776 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
8777 $as_echo_n "(cached) " >&6
8778else
8779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8780/* end confdefs.h. */
8781
8782#define _SYSCALL32
db6878ac
SM
8783#include <sys/procfs.h>
8784int
8785main ()
8786{
8787lwpid_t avar
8788 ;
8789 return 0;
8790}
8791_ACEOF
8792if ac_fn_c_try_compile "$LINENO"; then :
8793 bfd_cv_have_sys_procfs_type_lwpid_t=yes
05ea2a05 8794else
db6878ac 8795 bfd_cv_have_sys_procfs_type_lwpid_t=no
5e030278
TT
8796
8797fi
05ea2a05
TT
8798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799fi
5e030278 8800
db6878ac 8801 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5e030278 8802
db6878ac 8803$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
5e030278 8804
05ea2a05 8805 fi
db6878ac
SM
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
8807$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
5e030278 8808
c8693053
RO
8809
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
db6878ac
SM
8811$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
8812 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
5e030278
TT
8813 $as_echo_n "(cached) " >&6
8814else
05ea2a05
TT
8815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
5e030278 8817
05ea2a05 8818#define _SYSCALL32
05ea2a05
TT
8819#include <sys/procfs.h>
8820int
8821main ()
8822{
db6878ac 8823psaddr_t avar
05ea2a05
TT
8824 ;
8825 return 0;
8826}
8827_ACEOF
8828if ac_fn_c_try_compile "$LINENO"; then :
db6878ac 8829 bfd_cv_have_sys_procfs_type_psaddr_t=yes
05ea2a05 8830else
db6878ac 8831 bfd_cv_have_sys_procfs_type_psaddr_t=no
05ea2a05
TT
8832
8833fi
8834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
8835fi
8836
db6878ac 8837 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
05ea2a05 8838
db6878ac 8839$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
05ea2a05
TT
8840
8841 fi
db6878ac
SM
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
8843$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
05ea2a05 8844
c8693053
RO
8845
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
db6878ac
SM
8847$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
8848 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
5e030278
TT
8849 $as_echo_n "(cached) " >&6
8850else
8851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852/* end confdefs.h. */
05ea2a05
TT
8853
8854#define _SYSCALL32
05ea2a05 8855#include <sys/procfs.h>
5e030278
TT
8856int
8857main ()
8858{
db6878ac 8859elf_fpregset_t avar
5e030278
TT
8860 ;
8861 return 0;
8862}
8863_ACEOF
05ea2a05 8864if ac_fn_c_try_compile "$LINENO"; then :
db6878ac 8865 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
5e030278 8866else
db6878ac 8867 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
5e030278
TT
8868
8869fi
05ea2a05
TT
8870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8871fi
5e030278 8872
db6878ac 8873 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
5e030278 8874
db6878ac 8875$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
5e030278 8876
05ea2a05 8877 fi
db6878ac
SM
8878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
8879$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
5e030278 8880
db6878ac
SM
8881 fi
8882
4635ff97
TT
8883# This is set by GDB_AC_COMMON.
8884
db6878ac
SM
8885
8886
8887# Check whether we will enable the inclusion of unit tests when
8888# compiling GDB.
8889#
8890# The default value of this option changes depending whether we're on
8891# development mode (in which case it's "true") or not (in which case
8892# it's "false"). The $development variable is set by the GDB_AC_COMMON
8893# macro, which must therefore be used before GDB_AC_SELFTEST.
8894
8895if test "x$development" != xtrue && test "x$development" != xfalse; then :
8896 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
8897fi
8898
8899# Check whether --enable-unit-tests was given.
8900if test "${enable_unit_tests+set}" = set; then :
8901 enableval=$enable_unit_tests; case "${enableval}" in
8902 yes) enable_unittests=true ;;
8903 no) enable_unittests=false ;;
8904 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
8905esac
8906else
8907 enable_unittests=$development
8908fi
8909
8910
8911if $enable_unittests; then
8912
8913$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
8914
8915
db6878ac
SM
8916fi
8917
8918
8919 case ${build_alias} in
8920 "") build_noncanonical=${build} ;;
8921 *) build_noncanonical=${build_alias} ;;
8922esac
8923
8924 case ${host_alias} in
8925 "") host_noncanonical=${build_noncanonical} ;;
8926 *) host_noncanonical=${host_alias} ;;
8927esac
8928
8929 case ${target_alias} in
8930 "") target_noncanonical=${host_noncanonical} ;;
8931 *) target_noncanonical=${target_alias} ;;
8932esac
8933
8934
8935
8936
8937
8938
8939# Dependency checking.
8940rm -rf .tst 2>/dev/null
8941mkdir .tst 2>/dev/null
8942if test -d .tst; then
8943 am__leading_dot=.
8944else
8945 am__leading_dot=_
8946fi
8947rmdir .tst 2>/dev/null
8948
8949DEPDIR="${am__leading_dot}deps"
8950
8951ac_config_commands="$ac_config_commands depdir"
8952
8953
8954
9a665d62
TT
8955# If we haven't got the data from the intl directory,
8956# assume NLS is disabled.
8957USE_NLS=no
8958LIBINTL=
8959LIBINTL_DEP=
8960INCINTL=
8961XGETTEXT=
8962GMSGFMT=
8963POSUB=
8964
8965if test -f ../intl/config.intl; then
8966 . ../intl/config.intl
8967fi
8968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
8969$as_echo_n "checking whether NLS is requested... " >&6; }
8970if test x"$USE_NLS" != xyes; then
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973else
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8975$as_echo "yes" >&6; }
8976
8977$as_echo "#define ENABLE_NLS 1" >>confdefs.h
8978
8979
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
8981$as_echo_n "checking for catalogs to be installed... " >&6; }
8982 # Look for .po and .gmo files in the source directory.
8983 CATALOGS=
8984 XLINGUAS=
8985 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
8986 # If there aren't any .gmo files the shell will give us the
8987 # literal string "../path/to/srcdir/po/*.gmo" which has to be
8988 # weeded out.
8989 case "$cat" in *\**)
8990 continue;;
8991 esac
8992 # The quadruple backslash is collapsed to a double backslash
8993 # by the backticks, then collapsed again by the double quotes,
8994 # leaving us with one backslash in the sed expression (right
8995 # before the dot that mustn't act as a wildcard).
8996 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
8997 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
8998 # The user is allowed to set LINGUAS to a list of languages to
8999 # install catalogs for. If it's empty that means "all of them."
9000 if test "x$LINGUAS" = x; then
9001 CATALOGS="$CATALOGS $cat"
9002 XLINGUAS="$XLINGUAS $lang"
9003 else
9004 case "$LINGUAS" in *$lang*)
9005 CATALOGS="$CATALOGS $cat"
9006 XLINGUAS="$XLINGUAS $lang"
9007 ;;
9008 esac
9009 fi
9010 done
9011 LINGUAS="$XLINGUAS"
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
9013$as_echo "$LINGUAS" >&6; }
9014
9015
9016 DATADIRNAME=share
9017
9018 INSTOBJEXT=.mo
9019
9020 GENCAT=gencat
9021
9022 CATOBJEXT=.gmo
9023
9024fi
9025
db6878ac
SM
9026# Create sub-directories for objects and dependencies.
9027CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
9028
9029
9030ac_config_commands="$ac_config_commands gdbdepdir"
9031
9032
9033depcc="$CC" am_compiler_list=
9034
9035am_depcomp=$ac_aux_dir/depcomp
9036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
9037$as_echo_n "checking dependency style of $depcc... " >&6; }
9038if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5e030278
TT
9039 $as_echo_n "(cached) " >&6
9040else
db6878ac
SM
9041 if test -f "$am_depcomp"; then
9042 # We make a subdir and do the tests there. Otherwise we can end up
9043 # making bogus files that we don't know about and never remove. For
9044 # instance it was reported that on HP-UX the gcc test will end up
9045 # making a dummy file named `D' -- because `-MD' means `put the output
9046 # in D'.
9047 mkdir conftest.dir
9048 # Copy depcomp to subdir because otherwise we won't find it if we're
9049 # using a relative directory.
9050 cp "$am_depcomp" conftest.dir
9051 cd conftest.dir
9052 # We will build objects and dependencies in a subdirectory because
9053 # it helps to detect inapplicable dependency modes. For instance
9054 # both Tru64's cc and ICC support -MD to output dependencies as a
9055 # side effect of compilation, but ICC will put the dependencies in
9056 # the current directory while Tru64 will put them in the object
9057 # directory.
9058 mkdir sub
05ea2a05 9059
db6878ac
SM
9060 am_cv_CC_dependencies_compiler_type=none
9061 if test "$am_compiler_list" = ""; then
9062 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9063 fi
9064 for depmode in $am_compiler_list; do
9065 if test $depmode = none; then break; fi
9066
9067 $as_echo "$as_me:$LINENO: trying $depmode" >&5
9068 # Setup a source with many dependencies, because some compilers
9069 # like to wrap large dependency lists on column 80 (with \), and
9070 # we should not choose a depcomp mode which is confused by this.
9071 #
9072 # We need to recreate these files for each test, as the compiler may
9073 # overwrite some of them when testing with obscure command lines.
9074 # This happens at least with the AIX C compiler.
9075 : > sub/conftest.c
9076 for i in 1 2 3 4 5 6; do
9077 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9078 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9079 # Solaris 8's {/usr,}/bin/sh.
9080 touch sub/conftst$i.h
9081 done
9082 echo "include sub/conftest.Po" > confmf
9083
9084 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9085 # mode. It turns out that the SunPro C++ compiler does not properly
9086 # handle `-M -o', and we need to detect this.
9087 depcmd="depmode=$depmode \
9088 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9089 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9090 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
9091 echo "| $depcmd" | sed -e 's/ */ /g' >&5
9092 if env $depcmd > conftest.err 2>&1 &&
9093 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
9094 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
9095 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
9096 # icc doesn't choke on unknown options, it will just issue warnings
9097 # or remarks (even with -Werror). So we grep stderr for any message
9098 # that says an option was ignored or not supported.
9099 # When given -MP, icc 7.0 and 7.1 complain thusly:
9100 # icc: Command line warning: ignoring option '-M'; no argument required
9101 # The diagnosis changed in icc 8.0:
9102 # icc: Command line remark: option '-MP' not supported
9103 if (grep 'ignoring option' conftest.err ||
9104 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9105 am_cv_CC_dependencies_compiler_type=$depmode
9106 $as_echo "$as_me:$LINENO: success" >&5
9107 break
9108 fi
9109 fi
9110 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
9111 sed -e 's/^/| /' < conftest.err >&5
9112 done
9113
9114 cd ..
9115 rm -rf conftest.dir
9116else
9117 am_cv_CC_dependencies_compiler_type=none
9118fi
9119
9120fi
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
9122$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
9123if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
9124then as_fn_error $? "no usable dependency style found" "$LINENO" 5
9125else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
9126
9127fi
9128
9129
05a6b8c2 9130for 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 ws2tcpip.h
db6878ac
SM
9131do :
9132 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9133ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9134if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9135 cat >>confdefs.h <<_ACEOF
9136#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9137_ACEOF
9138
9139fi
9140
9141done
9142
9143for ac_header in vfork.h
9144do :
9145 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9146if test "x$ac_cv_header_vfork_h" = xyes; then :
9147 cat >>confdefs.h <<_ACEOF
9148#define HAVE_VFORK_H 1
05ea2a05 9149_ACEOF
5e030278 9150
5e030278
TT
9151fi
9152
db6878ac 9153done
5e030278 9154
db6878ac
SM
9155for ac_func in fork vfork
9156do :
9157 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9158ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9159if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9160 cat >>confdefs.h <<_ACEOF
9161#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9162_ACEOF
5e030278 9163
db6878ac
SM
9164fi
9165done
5e030278 9166
db6878ac
SM
9167if test "x$ac_cv_func_fork" = xyes; then
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9169$as_echo_n "checking for working fork... " >&6; }
9170if ${ac_cv_func_fork_works+:} false; then :
05ea2a05 9171 $as_echo_n "(cached) " >&6
db6878ac
SM
9172else
9173 if test "$cross_compiling" = yes; then :
9174 ac_cv_func_fork_works=cross
05ea2a05
TT
9175else
9176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9177/* end confdefs.h. */
db6878ac 9178$ac_includes_default
05ea2a05
TT
9179int
9180main ()
9181{
db6878ac
SM
9182
9183 /* By Ruediger Kuhlmann. */
9184 return fork () < 0;
9185
05ea2a05
TT
9186 ;
9187 return 0;
9188}
9189_ACEOF
db6878ac
SM
9190if ac_fn_c_try_run "$LINENO"; then :
9191 ac_cv_func_fork_works=yes
05ea2a05 9192else
db6878ac 9193 ac_cv_func_fork_works=no
05ea2a05 9194fi
db6878ac
SM
9195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9196 conftest.$ac_objext conftest.beam conftest.$ac_ext
05ea2a05 9197fi
5e030278 9198
db6878ac
SM
9199fi
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9201$as_echo "$ac_cv_func_fork_works" >&6; }
5e030278 9202
db6878ac
SM
9203else
9204 ac_cv_func_fork_works=$ac_cv_func_fork
9205fi
9206if test "x$ac_cv_func_fork_works" = xcross; then
9207 case $host in
9208 *-*-amigaos* | *-*-msdosdjgpp*)
9209 # Override, as these systems have only a dummy fork() stub
9210 ac_cv_func_fork_works=no
9211 ;;
9212 *)
9213 ac_cv_func_fork_works=yes
9214 ;;
9215 esac
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9217$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
9218fi
9219ac_cv_func_vfork_works=$ac_cv_func_vfork
9220if test "x$ac_cv_func_vfork" = xyes; then
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9222$as_echo_n "checking for working vfork... " >&6; }
9223if ${ac_cv_func_vfork_works+:} false; then :
5e030278 9224 $as_echo_n "(cached) " >&6
db6878ac
SM
9225else
9226 if test "$cross_compiling" = yes; then :
9227 ac_cv_func_vfork_works=cross
5e030278
TT
9228else
9229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9230/* end confdefs.h. */
db6878ac
SM
9231/* Thanks to Paul Eggert for this test. */
9232$ac_includes_default
9233#include <sys/wait.h>
9234#ifdef HAVE_VFORK_H
9235# include <vfork.h>
9236#endif
9237/* On some sparc systems, changes by the child to local and incoming
9238 argument registers are propagated back to the parent. The compiler
9239 is told about this with #include <vfork.h>, but some compilers
9240 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9241 static variable whose address is put into a register that is
9242 clobbered by the vfork. */
9243static void
9244#ifdef __cplusplus
9245sparc_address_test (int arg)
9246# else
9247sparc_address_test (arg) int arg;
9248#endif
9249{
9250 static pid_t child;
9251 if (!child) {
9252 child = vfork ();
9253 if (child < 0) {
9254 perror ("vfork");
9255 _exit(2);
9256 }
9257 if (!child) {
9258 arg = getpid();
9259 write(-1, "", 0);
9260 _exit (arg);
9261 }
9262 }
9263}
05ea2a05 9264
5e030278
TT
9265int
9266main ()
9267{
db6878ac
SM
9268 pid_t parent = getpid ();
9269 pid_t child;
9270
9271 sparc_address_test (0);
9272
9273 child = vfork ();
9274
9275 if (child == 0) {
9276 /* Here is another test for sparc vfork register problems. This
9277 test uses lots of local variables, at least as many local
9278 variables as main has allocated so far including compiler
9279 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9280 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9281 reuse the register of parent for one of the local variables,
9282 since it will think that parent can't possibly be used any more
9283 in this routine. Assigning to the local variable will thus
9284 munge parent in the parent process. */
9285 pid_t
9286 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9287 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9288 /* Convince the compiler that p..p7 are live; otherwise, it might
9289 use the same hardware register for all 8 local variables. */
9290 if (p != p1 || p != p2 || p != p3 || p != p4
9291 || p != p5 || p != p6 || p != p7)
9292 _exit(1);
9293
9294 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9295 from child file descriptors. If the child closes a descriptor
9296 before it execs or exits, this munges the parent's descriptor
9297 as well. Test for this by closing stdout in the child. */
9298 _exit(close(fileno(stdout)) != 0);
9299 } else {
9300 int status;
9301 struct stat st;
9302
9303 while (wait(&status) != child)
9304 ;
9305 return (
9306 /* Was there some problem with vforking? */
9307 child < 0
9308
9309 /* Did the child fail? (This shouldn't happen.) */
9310 || status
9311
9312 /* Did the vfork/compiler bug occur? */
9313 || parent != getpid()
9314
9315 /* Did the file descriptor bug occur? */
9316 || fstat(fileno(stdout), &st) != 0
9317 );
9318 }
5e030278
TT
9319}
9320_ACEOF
db6878ac
SM
9321if ac_fn_c_try_run "$LINENO"; then :
9322 ac_cv_func_vfork_works=yes
5e030278 9323else
db6878ac 9324 ac_cv_func_vfork_works=no
5e030278 9325fi
db6878ac
SM
9326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9327 conftest.$ac_objext conftest.beam conftest.$ac_ext
5e030278 9328fi
5e030278 9329
db6878ac
SM
9330fi
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9332$as_echo "$ac_cv_func_vfork_works" >&6; }
5e030278 9333
db6878ac
SM
9334fi;
9335if test "x$ac_cv_func_fork_works" = xcross; then
9336 ac_cv_func_vfork_works=$ac_cv_func_vfork
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9338$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9339fi
5e030278 9340
db6878ac 9341if test "x$ac_cv_func_vfork_works" = xyes; then
5e030278 9342
db6878ac 9343$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
e9bcb658 9344
e9bcb658 9345else
db6878ac
SM
9346
9347$as_echo "#define vfork fork" >>confdefs.h
05ea2a05 9348
e9bcb658 9349fi
db6878ac 9350if test "x$ac_cv_func_fork_works" = xyes; then
e9bcb658 9351
db6878ac 9352$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
05ea2a05 9353
db6878ac 9354fi
05ea2a05 9355
db6878ac
SM
9356for ac_func in pread pwrite pread64
9357do :
9358 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9359ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9360if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9361 cat >>confdefs.h <<_ACEOF
9362#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9363_ACEOF
e9bcb658 9364
db6878ac
SM
9365fi
9366done
e9bcb658 9367
3266f10b 9368
eb7aa561
PA
9369# Check the return and argument types of ptrace.
9370
9371
9372for ac_header in sys/ptrace.h ptrace.h
9373do :
9374 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9375ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 9376if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb7aa561
PA
9377 cat >>confdefs.h <<_ACEOF
9378#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9379_ACEOF
9380
9381fi
9382
9383done
9384
9385
9386gdb_ptrace_headers='
9387#include <sys/types.h>
9388#if HAVE_SYS_PTRACE_H
9389# include <sys/ptrace.h>
9390#endif
9391#if HAVE_UNISTD_H
9392# include <unistd.h>
9393#endif
9394'
eb7aa561
PA
9395
9396# Check return type. Varargs (used on GNU/Linux) conflict with the
9397# empty argument list, so check for that explicitly.
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
9399$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 9400if ${gdb_cv_func_ptrace_ret+:} false; then :
eb7aa561
PA
9401 $as_echo_n "(cached) " >&6
9402else
9403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9404/* end confdefs.h. */
5164c117 9405 $gdb_ptrace_headers
eb7aa561
PA
9406int
9407main ()
9408{
9409extern long ptrace (enum __ptrace_request, ...);
5164c117 9410
eb7aa561
PA
9411 ;
9412 return 0;
9413}
9414_ACEOF
9b30624b 9415if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9416 gdb_cv_func_ptrace_ret='long'
9417else
9418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9419/* end confdefs.h. */
9420$gdb_ptrace_headers
9421int
9422main ()
9423{
9424extern int ptrace ();
5164c117 9425
eb7aa561
PA
9426 ;
9427 return 0;
9428}
9429_ACEOF
9b30624b 9430if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
9431 gdb_cv_func_ptrace_ret='int'
9432else
9433 gdb_cv_func_ptrace_ret='long'
b6fb30ed 9434
eb7aa561
PA
9435fi
9436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 9437
eb7aa561
PA
9438fi
9439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 9440
eb7aa561
PA
9441fi
9442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
9443$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
9444
b6fb30ed 9445
eb7aa561
PA
9446cat >>confdefs.h <<_ACEOF
9447#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
9448_ACEOF
9449
b6fb30ed 9450
eb7aa561
PA
9451# Check argument types.
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
9453$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 9454if ${gdb_cv_func_ptrace_args+:} false; then :
eb7aa561
PA
9455 $as_echo_n "(cached) " >&6
9456else
eb7aa561
PA
9457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9458/* end confdefs.h. */
9459$gdb_ptrace_headers
9460int
9461main ()
9462{
9463extern long ptrace (enum __ptrace_request, ...);
5164c117 9464
eb7aa561
PA
9465 ;
9466 return 0;
9467}
9468_ACEOF
9b30624b 9469if ac_fn_c_try_compile "$LINENO"; then :
54019719 9470 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
eb7aa561 9471else
b6fb30ed
SM
9472 for gdb_arg1 in 'int' 'long'; do
9473 for gdb_arg2 in 'pid_t' 'int' 'long'; do
9474 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
9475 for gdb_arg4 in 'int' 'long' 'void *'; do
9476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
eb7aa561
PA
9477/* end confdefs.h. */
9478$gdb_ptrace_headers
9479int
9480main ()
9481{
b6fb30ed 9482extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5164c117 9483
eb7aa561
PA
9484 ;
9485 return 0;
9486}
9487_ACEOF
9b30624b 9488if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561 9489 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
b6fb30ed
SM
9490 break 4;
9491
eb7aa561
PA
9492fi
9493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
9494
9495 for gdb_arg5 in 'int *' 'int' 'long'; do
9496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
eb7aa561
PA
9497/* end confdefs.h. */
9498$gdb_ptrace_headers
9499int
9500main ()
9501{
b6fb30ed 9502extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5164c117 9503
eb7aa561
PA
9504 ;
9505 return 0;
9506}
9507_ACEOF
9b30624b 9508if ac_fn_c_try_compile "$LINENO"; then :
b6fb30ed
SM
9509 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
9510 break 5;
eb7aa561 9511
eb7aa561
PA
9512fi
9513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
9514 done
9515 done
9516 done
9517 done
9518 done
9519 # Provide a safe default value.
9520 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
eb7aa561
PA
9521
9522fi
9523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 9524
eb7aa561
PA
9525fi
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
9527$as_echo "$gdb_cv_func_ptrace_args" >&6; }
b6fb30ed 9528
eb7aa561
PA
9529ac_save_IFS=$IFS; IFS=','
9530set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
9531IFS=$ac_save_IFS
9532shift
9533
54019719
PA
9534cat >>confdefs.h <<_ACEOF
9535#define PTRACE_TYPE_ARG1 $1
9536_ACEOF
9537
9538
eb7aa561
PA
9539cat >>confdefs.h <<_ACEOF
9540#define PTRACE_TYPE_ARG3 $3
9541_ACEOF
9542
9543
9544cat >>confdefs.h <<_ACEOF
9545#define PTRACE_TYPE_ARG4 $4
9546_ACEOF
9547
9548if test -n "$5"; then
9549
9550cat >>confdefs.h <<_ACEOF
9551#define PTRACE_TYPE_ARG5 $5
9552_ACEOF
9553
9554fi
9555
9556
0fb4aa4b
PA
9557# Check for UST
9558ustlibs=""
9559ustinc=""
9560
9561
9562# Check whether --with-ust was given.
9563if test "${with_ust+set}" = set; then :
9564 withval=$with_ust;
9565fi
9566
9567
9568# Check whether --with-ust_include was given.
9569if test "${with_ust_include+set}" = set; then :
9570 withval=$with_ust_include;
9571fi
9572
9573
9574# Check whether --with-ust_lib was given.
9575if test "${with_ust_lib+set}" = set; then :
9576 withval=$with_ust_lib;
9577fi
9578
9579
9580case $with_ust in
9581 no)
9582 ustlibs=
9583 ustinc=
9584 ;;
9585 "" | yes)
9586 ustlibs=" -lust "
9587 ustinc=""
9588 ;;
9589 *)
9590 ustlibs="-L$with_ust/lib -lust"
9591 ustinc="-I$with_ust/include "
9592 ;;
9593esac
9594if test "x$with_ust_include" != x; then
9595 ustinc="-I$with_ust_include "
9596fi
9597if test "x$with_ust_lib" != x; then
9598 ustlibs="-L$with_ust_lib -lust"
9599fi
9600
9601if test "x$with_ust" != "xno"; then
9602 saved_CFLAGS="$CFLAGS"
9603 CFLAGS="$CFLAGS $ustinc"
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
9605$as_echo_n "checking for ust... " >&6; }
9606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9607/* end confdefs.h. */
9608
9609#define CONFIG_UST_GDB_INTEGRATION
9610#include <ust/ust.h>
9611
9612int
9613main ()
9614{
9615
7e8c7130 9616
0fb4aa4b
PA
9617 ;
9618 return 0;
9619}
9620_ACEOF
9621if ac_fn_c_try_compile "$LINENO"; then :
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9623$as_echo "yes" >&6; };
7e8c7130 9624
0fb4aa4b
PA
9625$as_echo "#define HAVE_UST 1" >>confdefs.h
9626
9627else
9628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7e8c7130
SM
9629$as_echo "no" >&6; }
9630 ustlibs= ; ustinc=
9631
0fb4aa4b
PA
9632fi
9633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9634 CFLAGS="$saved_CFLAGS"
9635fi
9636
9637# Flags needed for UST
9638
9639
9640
8f13a3ce 9641
d4596a3d
PA
9642# Check whether --enable-werror was given.
9643if test "${enable_werror+set}" = set; then :
9644 enableval=$enable_werror; case "${enableval}" in
9645 yes | y) ERROR_ON_WARNING="yes" ;;
9646 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 9647 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
d4596a3d
PA
9648 esac
9649fi
9650
9651
9a084706 9652# Enable -Werror by default when using gcc. Turn it off for releases.
8f13a3ce 9653if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
d4596a3d
PA
9654 ERROR_ON_WARNING=yes
9655fi
9656
9657WERROR_CFLAGS=""
9658if test "${ERROR_ON_WARNING}" = yes ; then
9659 WERROR_CFLAGS="-Werror"
9660fi
9661
cf6de44d 9662# The options we'll try to enable.
aac331e4 9663build_warnings="-Wall -Wpointer-arith \
a0de763e 9664-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
8f13a3ce 9665-Wno-switch -Wno-char-subscripts \
cf6de44d 9666-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 9667-Wno-sign-compare -Wno-error=maybe-uninitialized \
458412c3 9668-Wno-mismatched-tags \
632e107b 9669-Wno-error=deprecated-register \
85e26832 9670-Wsuggest-override \
1a34f210 9671-Wimplicit-fallthrough=3 \
96643e35 9672-Wduplicated-cond \
33a6bc35
TT
9673-Wshadow=local \
9674-Wdeprecated-copy \
9675-Wdeprecated-copy-dtor \
bb564c58 9676-Wredundant-move \
8ddd8e0e 9677-Wmissing-declarations \
a0761e34 9678-Wmissing-prototypes \
898e7f60
SM
9679-Wstrict-null-sentinel \
9680"
8f13a3ce 9681
8f13a3ce 9682case "${host}" in
5bfda255
YQ
9683 *-*-mingw32*)
9684 # Enable -Wno-format by default when using gcc on mingw since many
9685 # GCC versions complain about %I64.
9686 build_warnings="$build_warnings -Wno-format" ;;
9687 *-*-solaris*)
9688 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
9689 # doesn't understand.
9690 build_warnings="$build_warnings -Wno-unknown-pragmas"
9691 # Solaris 11 <unistd.h> marks vfork deprecated.
9692 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
9693 *)
9694 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
9695 # but there's a special case for this below.
9696 build_warnings="$build_warnings -Wformat-nonliteral" ;;
8f13a3ce
MF
9697esac
9698
9699# Check whether --enable-build-warnings was given.
9700if test "${enable_build_warnings+set}" = set; then :
9701 enableval=$enable_build_warnings; case "${enableval}" in
9702 yes) ;;
9703 no) build_warnings="-w";;
9704 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9705 build_warnings="${build_warnings} ${t}";;
9706 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9707 build_warnings="${t} ${build_warnings}";;
9708 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9709esac
9710if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9711 echo "Setting compiler warning flags = $build_warnings" 6>&1
9712fi
9713fi
9714# Check whether --enable-gdb-build-warnings was given.
9715if test "${enable_gdb_build_warnings+set}" = set; then :
9716 enableval=$enable_gdb_build_warnings; case "${enableval}" in
9717 yes) ;;
9718 no) build_warnings="-w";;
9719 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9720 build_warnings="${build_warnings} ${t}";;
9721 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9722 build_warnings="${t} ${build_warnings}";;
9723 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9724esac
9725if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9726 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9727fi
3bc3d82a
PA
9728fi
9729
9730# The set of warnings supported by a C++ compiler is not the same as
9731# of the C compiler.
cf6de44d 9732ac_ext=cpp
3bc3d82a
PA
9733ac_cpp='$CXXCPP $CPPFLAGS'
9734ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9735ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9736ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9737
3bc3d82a 9738
d4596a3d 9739WARN_CFLAGS=""
8f13a3ce 9740if test "x${build_warnings}" != x -a "x$GCC" = xyes
d4596a3d
PA
9741then
9742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
9743$as_echo_n "checking compiler warning flags... " >&6; }
9744 # Separate out the -Werror flag as some files just cannot be
9745 # compiled with it enabled.
9746 for w in ${build_warnings}; do
7544db95
PA
9747 # GCC does not complain about -Wno-unknown-warning. Invert
9748 # and test -Wunknown-warning instead.
9749 case $w in
9750 -Wno-*)
9751 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
9752 -Wformat-nonliteral)
9753 # gcc requires -Wformat before -Wformat-nonliteral
9754 # will work, so stick them together.
9755 w="-Wformat $w"
9756 wtest="$w"
9757 ;;
7544db95
PA
9758 *)
9759 wtest=$w ;;
9760 esac
9761
d4596a3d
PA
9762 case $w in
9763 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
9764 *)
9765 # Check whether GCC accepts it.
d4596a3d 9766 saved_CFLAGS="$CFLAGS"
3e019bdc 9767 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 9768 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 9769 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
9770 if test "x$w" = "x-Wunused-variable"; then
9771 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
9772 # fixed in GCC 4.9. This test is derived from the gdb
9773 # source code that triggered this bug in GCC.
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775/* end confdefs.h. */
9776struct scoped_restore_base {};
864ca435
SM
9777 struct scoped_restore_tmpl : public scoped_restore_base {
9778 ~scoped_restore_tmpl() {}
9779 };
a0de763e
TT
9780int
9781main ()
9782{
9783const scoped_restore_base &b = scoped_restore_tmpl();
864ca435 9784
a0de763e
TT
9785 ;
9786 return 0;
9787}
9788_ACEOF
9789if ac_fn_cxx_try_compile "$LINENO"; then :
9790 WARN_CFLAGS="${WARN_CFLAGS} $w"
9791fi
9792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9793 else
9794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d4596a3d
PA
9795/* end confdefs.h. */
9796
9797int
9798main ()
9799{
9800
9801 ;
9802 return 0;
9803}
9804_ACEOF
3bc3d82a 9805if ac_fn_cxx_try_compile "$LINENO"; then :
d4596a3d
PA
9806 WARN_CFLAGS="${WARN_CFLAGS} $w"
9807fi
9808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 9809 fi
d4596a3d 9810 CFLAGS="$saved_CFLAGS"
3bc3d82a 9811 CXXFLAGS="$saved_CXXFLAGS"
d4596a3d
PA
9812 esac
9813 done
9814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
9815$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
9816fi
9817
9818
9819
cf6de44d 9820ac_ext=c
3bc3d82a
PA
9821ac_cpp='$CPP $CPPFLAGS'
9822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9824ac_compiler_gnu=$ac_cv_c_compiler_gnu
9825
3bc3d82a 9826
8f13a3ce 9827
10e86dd7
DE
9828old_LIBS="$LIBS"
9829LIBS="$LIBS -ldl"
9830for ac_func in dladdr
9831do :
9832 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
d0ac1c44 9833if test "x$ac_cv_func_dladdr" = xyes; then :
10e86dd7
DE
9834 cat >>confdefs.h <<_ACEOF
9835#define HAVE_DLADDR 1
9836_ACEOF
9837
9838fi
9839done
9840
9841LIBS="$old_LIBS"
9842
07697489
PA
9843
9844 # Check for presence and size of long long.
9845 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 9846if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
9847
9848cat >>confdefs.h <<_ACEOF
9849#define HAVE_LONG_LONG 1
9850_ACEOF
9851
9852# The cast to long int works around a bug in the HP C Compiler
9853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9855# This bug is HP SR number 8606223364.
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9857$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 9858if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
9859 $as_echo_n "(cached) " >&6
9860else
9861 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
9862
9863else
9864 if test "$ac_cv_type_long_long" = yes; then
9865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9867as_fn_error 77 "cannot compute sizeof (long long)
9868See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
9869 else
9870 ac_cv_sizeof_long_long=0
9871 fi
9872fi
9873
9874fi
9875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9876$as_echo "$ac_cv_sizeof_long_long" >&6; }
9877
9878
9879
9880cat >>confdefs.h <<_ACEOF
9881#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9882_ACEOF
9883
9884
9885fi
9886
9887
d0ac1c44
SM
9888 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
9889ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
9890if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
9891 ac_have_decl=1
9892else
9893 ac_have_decl=0
9894fi
9895
9896cat >>confdefs.h <<_ACEOF
9897#define HAVE_DECL_BASENAME $ac_have_decl
9898_ACEOF
9899ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 9900if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
9901 ac_have_decl=1
9902else
9903 ac_have_decl=0
9904fi
9905
9906cat >>confdefs.h <<_ACEOF
9907#define HAVE_DECL_FFS $ac_have_decl
9908_ACEOF
9909ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 9910if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
9911 ac_have_decl=1
9912else
9913 ac_have_decl=0
9914fi
9915
9916cat >>confdefs.h <<_ACEOF
9917#define HAVE_DECL_ASPRINTF $ac_have_decl
9918_ACEOF
9919ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 9920if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
9921 ac_have_decl=1
9922else
9923 ac_have_decl=0
9924fi
9925
9926cat >>confdefs.h <<_ACEOF
9927#define HAVE_DECL_VASPRINTF $ac_have_decl
9928_ACEOF
9929ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 9930if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
9931 ac_have_decl=1
9932else
9933 ac_have_decl=0
9934fi
9935
9936cat >>confdefs.h <<_ACEOF
9937#define HAVE_DECL_SNPRINTF $ac_have_decl
9938_ACEOF
9939ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 9940if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
9941 ac_have_decl=1
9942else
9943 ac_have_decl=0
9944fi
9945
9946cat >>confdefs.h <<_ACEOF
9947#define HAVE_DECL_VSNPRINTF $ac_have_decl
9948_ACEOF
9949
9950 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 9951if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
9952 ac_have_decl=1
9953else
9954 ac_have_decl=0
9955fi
9956
9957cat >>confdefs.h <<_ACEOF
9958#define HAVE_DECL_STRTOL $ac_have_decl
9959_ACEOF
9960ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 9961if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
9962 ac_have_decl=1
9963else
9964 ac_have_decl=0
9965fi
9966
9967cat >>confdefs.h <<_ACEOF
9968#define HAVE_DECL_STRTOUL $ac_have_decl
9969_ACEOF
9970ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 9971if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
9972 ac_have_decl=1
9973else
9974 ac_have_decl=0
9975fi
9976
9977cat >>confdefs.h <<_ACEOF
9978#define HAVE_DECL_STRTOLL $ac_have_decl
9979_ACEOF
9980ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 9981if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
9982 ac_have_decl=1
9983else
9984 ac_have_decl=0
9985fi
9986
9987cat >>confdefs.h <<_ACEOF
9988#define HAVE_DECL_STRTOULL $ac_have_decl
9989_ACEOF
9990
9991 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 9992if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
9993 ac_have_decl=1
9994else
9995 ac_have_decl=0
9996fi
9997
9998cat >>confdefs.h <<_ACEOF
9999#define HAVE_DECL_STRVERSCMP $ac_have_decl
10000_ACEOF
10001
10002
10003
81ecdfbb 10004ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
d0ac1c44 10005if test "x$ac_cv_have_decl_perror" = xyes; then :
81ecdfbb
RW
10006 ac_have_decl=1
10007else
10008 ac_have_decl=0
f450004a 10009fi
81ecdfbb
RW
10010
10011cat >>confdefs.h <<_ACEOF
10012#define HAVE_DECL_PERROR $ac_have_decl
10013_ACEOF
bb0116a4 10014ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 10015if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
bb0116a4
JB
10016 ac_have_decl=1
10017else
10018 ac_have_decl=0
10019fi
10020
10021cat >>confdefs.h <<_ACEOF
10022#define HAVE_DECL_VASPRINTF $ac_have_decl
10023_ACEOF
10024ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 10025if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
bb0116a4
JB
10026 ac_have_decl=1
10027else
10028 ac_have_decl=0
10029fi
10030
10031cat >>confdefs.h <<_ACEOF
10032#define HAVE_DECL_VSNPRINTF $ac_have_decl
10033_ACEOF
81ecdfbb
RW
10034
10035
10036ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
10037#if HAVE_SYS_SOCKET_H
10038# include <sys/socket.h>
10039#elif HAVE_WS2TCPIP_H
10040# include <ws2tcpip.h>
10041#endif
81ecdfbb
RW
10042
10043"
d0ac1c44 10044if test "x$ac_cv_type_socklen_t" = xyes; then :
f450004a 10045
ccbd4912 10046cat >>confdefs.h <<_ACEOF
f450004a
DJ
10047#define HAVE_SOCKLEN_T 1
10048_ACEOF
10049
f450004a 10050
ccbd4912 10051fi
f450004a 10052
fb1e4ffc 10053
64da5dd5
JB
10054case "${target}" in
10055 *-android*)
10056 # Starting with NDK version 9, <elf.h> actually includes definitions
10057 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
10058 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
10059 # leading to conflicts with the defintions from <linux/elf.h>.
10060 # This makes it impossible for us to include both <elf.h> and
10061 # <linux/elf.h>, which means that, in practice, we do not have
10062 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
10063 # Therefore, do not try to auto-detect availability, as it would
10064 # get it wrong on this platform.
10065 ;;
10066 *)
10067 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
8365dcf5
TJB
10068
10069"
d0ac1c44 10070if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
8365dcf5
TJB
10071
10072cat >>confdefs.h <<_ACEOF
10073#define HAVE_ELF32_AUXV_T 1
10074_ACEOF
10075
10076
10077fi
10078ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
10079
10080"
d0ac1c44 10081if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
8365dcf5
TJB
10082
10083cat >>confdefs.h <<_ACEOF
10084#define HAVE_ELF64_AUXV_T 1
10085_ACEOF
10086
10087
10088fi
10089
64da5dd5 10090esac
8365dcf5 10091
c16158bc
JM
10092
10093
81ecdfbb
RW
10094# Check whether --with-pkgversion was given.
10095if test "${with_pkgversion+set}" = set; then :
10096 withval=$with_pkgversion; case "$withval" in
d0ac1c44 10097 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
10098 no) PKGVERSION= ;;
10099 *) PKGVERSION="($withval) " ;;
10100 esac
10101else
10102 PKGVERSION="(GDB) "
10103
81ecdfbb
RW
10104fi
10105
c16158bc
JM
10106
10107
10108
10109
81ecdfbb
RW
10110# Check whether --with-bugurl was given.
10111if test "${with_bugurl+set}" = set; then :
10112 withval=$with_bugurl; case "$withval" in
d0ac1c44 10113 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
10114 no) BUGURL=
10115 ;;
10116 *) BUGURL="$withval"
10117 ;;
10118 esac
10119else
10120 BUGURL="http://www.gnu.org/software/gdb/bugs/"
10121
81ecdfbb
RW
10122fi
10123
c16158bc
JM
10124 case ${BUGURL} in
10125 "")
10126 REPORT_BUGS_TO=
10127 REPORT_BUGS_TEXI=
10128 ;;
10129 *)
10130 REPORT_BUGS_TO="<$BUGURL>"
10131 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
10132 ;;
10133 esac;
10134
10135
10136
10137
10138cat >>confdefs.h <<_ACEOF
10139#define PKGVERSION "$PKGVERSION"
10140_ACEOF
10141
10142
10143cat >>confdefs.h <<_ACEOF
10144#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
10145_ACEOF
10146
10147
8838b45e
NS
10148# Check for various supplementary target information (beyond the
10149# triplet) which might affect the choices in configure.srv.
10150case "${target}" in
10151 i[34567]86-*-linux*)
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
10153$as_echo_n "checking if building for x86-64... " >&6; }
d0ac1c44 10154if ${gdb_cv_i386_is_x86_64+:} false; then :
8838b45e
NS
10155 $as_echo_n "(cached) " >&6
10156else
10157 save_CPPFLAGS="$CPPFLAGS"
10158 CPPFLAGS="$CPPFLAGS $CFLAGS"
10159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10160/* end confdefs.h. */
10161
10162#if __x86_64__
10163got it
10164#endif
10165
10166_ACEOF
10167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10168 $EGREP "got it" >/dev/null 2>&1; then :
10169 gdb_cv_i386_is_x86_64=yes
10170else
10171 gdb_cv_i386_is_x86_64=no
10172fi
10173rm -f conftest*
10174
10175 CPPFLAGS="$save_CPPFLAGS"
10176fi
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
10178$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
10179 ;;
201506da
PA
10180
10181 x86_64-*-linux*)
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
10183$as_echo_n "checking if building for x32... " >&6; }
d0ac1c44 10184if ${gdb_cv_x86_is_x32+:} false; then :
201506da
PA
10185 $as_echo_n "(cached) " >&6
10186else
10187 save_CPPFLAGS="$CPPFLAGS"
10188 CPPFLAGS="$CPPFLAGS $CFLAGS"
10189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190/* end confdefs.h. */
10191
10192#if __x86_64__ && __ILP32__
10193got it
10194#endif
10195
10196_ACEOF
10197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10198 $EGREP "got it" >/dev/null 2>&1; then :
10199 gdb_cv_x86_is_x32=yes
10200else
10201 gdb_cv_x86_is_x32=no
10202fi
10203rm -f conftest*
10204
10205 CPPFLAGS="$save_CPPFLAGS"
10206fi
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
10208$as_echo "$gdb_cv_x86_is_x32" >&6; }
10209 ;;
10210
9ac544ce
MK
10211 m68k-*-*)
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
10213$as_echo_n "checking if building for Coldfire... " >&6; }
d0ac1c44 10214if ${gdb_cv_m68k_is_coldfire+:} false; then :
9ac544ce
MK
10215 $as_echo_n "(cached) " >&6
10216else
10217 save_CPPFLAGS="$CPPFLAGS"
10218 CPPFLAGS="$CPPFLAGS $CFLAGS"
10219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220/* end confdefs.h. */
10221
10222#ifdef __mcoldfire__
10223got it
10224#endif
10225
10226_ACEOF
10227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10228 $EGREP "got it" >/dev/null 2>&1; then :
10229 gdb_cv_m68k_is_coldfire=yes
10230else
10231 gdb_cv_m68k_is_coldfire=no
10232fi
10233rm -f conftest*
10234
10235 CPPFLAGS="$save_CPPFLAGS"
10236fi
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
10238$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
10239 ;;
8838b45e
NS
10240esac
10241
7ea81414 10242. ${srcdir}/configure.srv
d6e9fb05 10243
68070c10
PA
10244if test "${srv_mingwce}" = "yes"; then
10245 LIBS="$LIBS -lws2"
10246elif test "${srv_mingw}" = "yes"; then
b2ceabe8
TT
10247 # WIN32APILIBS is set by GDB_AC_COMMON.
10248 LIBS="$LIBS $WIN32APILIBS"
68070c10
PA
10249fi
10250
58caa3dc 10251if test "${srv_linux_usrregs}" = "yes"; then
f450004a 10252
81ecdfbb 10253$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
58caa3dc
DJ
10254
10255fi
10256
10257if test "${srv_linux_regsets}" = "yes"; then
e9d25b98 10258
81ecdfbb 10259$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
e9d25b98
DJ
10260
10261
81ecdfbb
RW
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10263$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 10264 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 10265 $as_echo_n "(cached) " >&6
bec39cab 10266else
81ecdfbb 10267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10268/* end confdefs.h. */
58caa3dc 10269#include <sys/ptrace.h>
bec39cab
AC
10270int
10271main ()
10272{
58caa3dc 10273PTRACE_GETREGS;
bec39cab
AC
10274 ;
10275 return 0;
10276}
10277_ACEOF
81ecdfbb 10278if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
10279 gdbsrv_cv_have_ptrace_getregs=yes
10280else
81ecdfbb 10281 gdbsrv_cv_have_ptrace_getregs=no
7e8c7130 10282
58caa3dc 10283fi
81ecdfbb 10284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7e8c7130 10285
58caa3dc
DJ
10286fi
10287
81ecdfbb
RW
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
10289$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
58caa3dc 10290 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
f450004a 10291
81ecdfbb 10292$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
58caa3dc
DJ
10293
10294 fi
10295
81ecdfbb
RW
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10297$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 10298 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 10299 $as_echo_n "(cached) " >&6
58caa3dc 10300else
81ecdfbb 10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10302/* end confdefs.h. */
58caa3dc 10303#include <sys/ptrace.h>
bec39cab
AC
10304int
10305main ()
10306{
58caa3dc 10307PTRACE_GETFPXREGS;
bec39cab
AC
10308 ;
10309 return 0;
10310}
10311_ACEOF
81ecdfbb 10312if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
10313 gdbsrv_cv_have_ptrace_getfpxregs=yes
10314else
81ecdfbb 10315 gdbsrv_cv_have_ptrace_getfpxregs=no
7e8c7130 10316
58caa3dc 10317fi
81ecdfbb 10318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7e8c7130 10319
58caa3dc
DJ
10320fi
10321
81ecdfbb
RW
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
10323$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
58caa3dc 10324 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
f450004a 10325
81ecdfbb 10326$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
58caa3dc
DJ
10327
10328 fi
10329fi
10330
9accd112
MM
10331if test "${srv_linux_btrace}" = "yes"; then
10332
10333$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
10334
10335fi
10336
18f5fd81
TJB
10337if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
10339$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
19dd0ae5 10340 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
18f5fd81
TJB
10341 $as_echo_n "(cached) " >&6
10342else
10343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h. */
18f5fd81
TJB
10345#include <thread_db.h>
10346int
10347main ()
10348{
10349lwpid_t avar
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354if ac_fn_c_try_compile "$LINENO"; then :
10355 gdbserver_cv_have_thread_db_type_lwpid_t=yes
10356else
10357 gdbserver_cv_have_thread_db_type_lwpid_t=no
10358
10359fi
10360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19dd0ae5 10361
18f5fd81
TJB
10362fi
10363
19dd0ae5 10364 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
18f5fd81
TJB
10365
10366$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
10367
19dd0ae5
SM
10368 fi
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
18f5fd81
TJB
10370$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
10371
10372fi
10373
10374if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
10376$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
19dd0ae5 10377 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
18f5fd81
TJB
10378 $as_echo_n "(cached) " >&6
10379else
10380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381/* end confdefs.h. */
18f5fd81
TJB
10382#include <thread_db.h>
10383int
10384main ()
10385{
10386psaddr_t avar
10387 ;
10388 return 0;
10389}
10390_ACEOF
10391if ac_fn_c_try_compile "$LINENO"; then :
10392 gdbserver_cv_have_thread_db_type_psaddr_t=yes
10393else
10394 gdbserver_cv_have_thread_db_type_psaddr_t=no
10395
10396fi
10397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19dd0ae5 10398
18f5fd81
TJB
10399fi
10400
19dd0ae5 10401 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
18f5fd81
TJB
10402
10403$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
10404
19dd0ae5
SM
10405 fi
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
18f5fd81
TJB
10407$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
10408
10409fi
10410
193f13e6
MK
10411old_LIBS="$LIBS"
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10413$as_echo_n "checking for dlopen in -ldl... " >&6; }
d0ac1c44 10414if ${ac_cv_lib_dl_dlopen+:} false; then :
193f13e6
MK
10415 $as_echo_n "(cached) " >&6
10416else
10417 ac_check_lib_save_LIBS=$LIBS
10418LIBS="-ldl $LIBS"
10419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10420/* end confdefs.h. */
10421
10422/* Override any GCC internal prototype to avoid an error.
10423 Use char because int might match the return type of a GCC
10424 builtin and then its argument prototype would still apply. */
10425#ifdef __cplusplus
10426extern "C"
10427#endif
10428char dlopen ();
10429int
10430main ()
10431{
10432return dlopen ();
10433 ;
10434 return 0;
10435}
10436_ACEOF
10437if ac_fn_c_try_link "$LINENO"; then :
10438 ac_cv_lib_dl_dlopen=yes
10439else
10440 ac_cv_lib_dl_dlopen=no
10441fi
10442rm -f core conftest.err conftest.$ac_objext \
10443 conftest$ac_exeext conftest.$ac_ext
10444LIBS=$ac_check_lib_save_LIBS
10445fi
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10447$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
d0ac1c44 10448if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
193f13e6
MK
10449 cat >>confdefs.h <<_ACEOF
10450#define HAVE_LIBDL 1
10451_ACEOF
10452
10453 LIBS="-ldl $LIBS"
10454
10455fi
10456
10457LIBS="$old_LIBS"
10458
0d62e5e8
DJ
10459srv_thread_depfiles=
10460srv_libs=
0d62e5e8
DJ
10461
10462if test "$srv_linux_thread_db" = "yes"; then
193f13e6
MK
10463 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
10464 srv_libs="-ldl"
f6528abd
JK
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
10466$as_echo_n "checking for the dynamic export flag... " >&6; }
193f13e6 10467 old_LDFLAGS="$LDFLAGS"
f6528abd
JK
10468 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
10469 # supported there.
10470 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
10471 LDFLAGS="$LDFLAGS $RDYNAMIC"
193f13e6 10472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
10473/* end confdefs.h. */
10474
10475int
10476main ()
10477{
10478
10479 ;
10480 return 0;
10481}
10482_ACEOF
81ecdfbb 10483if ac_fn_c_try_link "$LINENO"; then :
f6528abd 10484 found="-Wl,--dynamic-list"
7e8c7130 10485 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6de3c42 10486else
f6528abd 10487 RDYNAMIC="-rdynamic"
7e8c7130
SM
10488 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
10489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
10490/* end confdefs.h. */
10491
10492int
10493main ()
10494{
10495
10496 ;
10497 return 0;
10498}
10499_ACEOF
10500if ac_fn_c_try_link "$LINENO"; then :
10501 found="-rdynamic"
10502else
10503 found="no"
7e8c7130
SM
10504 RDYNAMIC=""
10505
770d76d7
PA
10506fi
10507rm -f core conftest.err conftest.$ac_objext \
10508 conftest$ac_exeext conftest.$ac_ext
7e8c7130 10509
770d76d7
PA
10510fi
10511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
10513
10514 LDFLAGS="$old_LDFLAGS"
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
10516$as_echo "$found" >&6; }
10517 else
10518 srv_libs="-lthread_db"
10519 fi
55a8c076 10520
770d76d7 10521 srv_thread_depfiles="thread-db.o proc-service.o"
7d4e5717
PA
10522
10523$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
10524
770d76d7
PA
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
10526$as_echo_n "checking for TD_VERSION... " >&6; }
d0ac1c44 10527if ${gdbsrv_cv_have_td_version+:} false; then :
770d76d7
PA
10528 $as_echo_n "(cached) " >&6
10529else
10530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10531/* end confdefs.h. */
10532#include <thread_db.h>
55a8c076
YQ
10533int
10534main ()
10535{
770d76d7 10536TD_VERSION;
c9a1864a
YQ
10537 ;
10538 return 0;
10539}
10540_ACEOF
55a8c076 10541if ac_fn_c_try_compile "$LINENO"; then :
770d76d7 10542 gdbsrv_cv_have_td_version=yes
c9a1864a 10543else
770d76d7 10544 gdbsrv_cv_have_td_version=no
7e8c7130 10545
770d76d7
PA
10546fi
10547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7e8c7130 10548
770d76d7
PA
10549fi
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
10551$as_echo "$gdbsrv_cv_have_td_version" >&6; }
0ad6b8ee 10552 if test "$gdbsrv_cv_have_td_version" = yes; then
c9a1864a 10553
770d76d7 10554$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
55a8c076 10555
770d76d7
PA
10556 fi
10557fi
c9a1864a
YQ
10558
10559
770d76d7
PA
10560# Check whether --with-libthread-db was given.
10561if test "${with_libthread_db+set}" = set; then :
10562 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
10563 srv_libs="$srv_libthread_db_path"
c9a1864a 10564
770d76d7 10565fi
c9a1864a
YQ
10566
10567
770d76d7 10568if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
c9a1864a 10569
770d76d7 10570$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
c9a1864a 10571
55a8c076 10572fi
c9a1864a 10573
770d76d7
PA
10574if test "$srv_xmlfiles" != ""; then
10575 srv_xmlbuiltin="xml-builtin.o"
c9a1864a 10576
770d76d7 10577$as_echo "#define USE_XML 1" >>confdefs.h
c9a1864a 10578
c9a1864a 10579
770d76d7
PA
10580 tmp_xmlfiles=$srv_xmlfiles
10581 srv_xmlfiles=""
10582 for f in $tmp_xmlfiles; do
10583 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
10584 done
c9a1864a
YQ
10585fi
10586
0256da25 10587GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
770d76d7 10588GDBSERVER_LIBS="$srv_libs"
c9a1864a 10589
770d76d7
PA
10590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
10591$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
d0ac1c44 10592if ${gdbsrv_cv_have_sync_builtins+:} false; then :
770d76d7
PA
10593 $as_echo_n "(cached) " >&6
10594else
7e8c7130 10595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
770d76d7 10596/* end confdefs.h. */
c9a1864a 10597
770d76d7
PA
10598int
10599main ()
10600{
7e8c7130
SM
10601int foo, bar;
10602 bar = __sync_val_compare_and_swap(&foo, 0, 1);
10603
770d76d7
PA
10604 ;
10605 return 0;
10606}
10607_ACEOF
10608if ac_fn_c_try_link "$LINENO"; then :
10609 gdbsrv_cv_have_sync_builtins=yes
10610else
c971b7fa 10611 gdbsrv_cv_have_sync_builtins=no
7e8c7130 10612
c9a1864a 10613fi
c971b7fa
PA
10614rm -f core conftest.err conftest.$ac_objext \
10615 conftest$ac_exeext conftest.$ac_ext
7e8c7130 10616
c9a1864a 10617fi
c971b7fa
PA
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
10619$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
0ad6b8ee 10620if test "$gdbsrv_cv_have_sync_builtins" = yes; then
c971b7fa
PA
10621
10622$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
10623
c9a1864a
YQ
10624fi
10625
c971b7fa
PA
10626saved_cflags="$CFLAGS"
10627CFLAGS="$CFLAGS -fvisibility=hidden"
10628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10629/* end confdefs.h. */
c9a1864a 10630
c971b7fa
PA
10631int
10632main ()
10633{
c9a1864a 10634
c971b7fa
PA
10635 ;
10636 return 0;
10637}
c9a1864a 10638_ACEOF
c971b7fa
PA
10639if ac_fn_c_try_compile "$LINENO"; then :
10640 gdbsrv_cv_have_visibility_hidden=yes
10641else
10642 gdbsrv_cv_have_visibility_hidden=no
c9a1864a 10643fi
c971b7fa
PA
10644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10645CFLAGS="$saved_cflags"
10646
c971b7fa
PA
10647IPA_DEPFILES=""
10648extra_libraries=""
c2a66c29 10649
c971b7fa
PA
10650# check whether to enable the inprocess agent
10651if test "$ipa_obj" != "" \
10652 -a "$gdbsrv_cv_have_sync_builtins" = yes \
10653 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
10654 have_ipa=true
10655else
10656 have_ipa=false
10657fi
fa593d66 10658
c971b7fa
PA
10659# Check whether --enable-inprocess-agent was given.
10660if test "${enable_inprocess_agent+set}" = set; then :
10661 enableval=$enable_inprocess_agent; case "$enableval" in
10662 yes) want_ipa=true ;;
10663 no) want_ipa=false ;;
d0ac1c44 10664 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
c971b7fa
PA
10665esac
10666else
10667 want_ipa=$have_ipa
10668fi
c2a66c29 10669
c9a1864a 10670
c971b7fa
PA
10671if $want_ipa ; then
10672 if $have_ipa ; then
10673 IPA_DEPFILES="$ipa_obj"
10674 extra_libraries="$extra_libraries libinproctrace.so"
10675 else
d0ac1c44 10676 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
c971b7fa
PA
10677 fi
10678fi
c9a1864a 10679
c9a1864a 10680
c2a66c29
NS
10681
10682
fa593d66
PA
10683
10684
10685
0d62e5e8 10686
1a627e7e 10687GNULIB=../gnulib/import
d6e9fb05 10688
c9a1864a
YQ
10689GNULIB_STDINT_H=
10690if test x"$STDINT_H" != x; then
c971b7fa 10691 GNULIB_STDINT_H=$GNULIB/$STDINT_H
c9a1864a 10692fi
d6e9fb05 10693
fb1e4ffc 10694
c971b7fa 10695ac_config_files="$ac_config_files Makefile"
81ecdfbb 10696
81ecdfbb 10697
bec39cab 10698cat >confcache <<\_ACEOF
d6e9fb05
JK
10699# This file is a shell script that caches the results of configure
10700# tests run on this system so they can be shared between configure
bec39cab
AC
10701# scripts and configure runs, see configure's option --config-cache.
10702# It is not useful on other systems. If it contains results you don't
10703# want to keep, you may remove or edit it.
d6e9fb05 10704#
bec39cab
AC
10705# config.status only pays attention to the cache file if you give it
10706# the --recheck option to rerun configure.
d6e9fb05 10707#
bec39cab
AC
10708# `ac_cv_env_foo' variables (set or unset) will be overridden when
10709# loading this file, other *unset* `ac_cv_foo' will be assigned the
10710# following values.
10711
10712_ACEOF
10713
d6e9fb05
JK
10714# The following way of writing the cache mishandles newlines in values,
10715# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 10716# So, we kill variables containing newlines.
d6e9fb05
JK
10717# Ultrix sh set writes to stderr and can't be redirected directly,
10718# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
10719(
10720 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10721 eval ac_val=\$$ac_var
10722 case $ac_val in #(
10723 *${as_nl}*)
10724 case $ac_var in #(
10725 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10726$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10727 esac
10728 case $ac_var in #(
10729 _ | IFS | as_nl) ;; #(
10730 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10731 *) { eval $ac_var=; unset $ac_var;} ;;
10732 esac ;;
10733 esac
10734 done
10735
bec39cab 10736 (set) 2>&1 |
81ecdfbb
RW
10737 case $as_nl`(ac_space=' '; set) 2>&1` in #(
10738 *${as_nl}ac_space=\ *)
10739 # `set' does not quote correctly, so add quotes: double-quote
10740 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
10741 sed -n \
10742 "s/'/'\\\\''/g;
10743 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 10744 ;; #(
bec39cab
AC
10745 *)
10746 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 10747 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 10748 ;;
81ecdfbb
RW
10749 esac |
10750 sort
10751) |
bec39cab 10752 sed '
81ecdfbb 10753 /^ac_cv_env_/b end
bec39cab 10754 t clear
81ecdfbb 10755 :clear
bec39cab
AC
10756 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10757 t end
81ecdfbb
RW
10758 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10759 :end' >>confcache
10760if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10761 if test -w "$cache_file"; then
d0ac1c44 10762 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10764$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
10765 if test ! -f "$cache_file" || test -h "$cache_file"; then
10766 cat confcache >"$cache_file"
10767 else
10768 case $cache_file in #(
10769 */* | ?:*)
10770 mv -f confcache "$cache_file"$$ &&
10771 mv -f "$cache_file"$$ "$cache_file" ;; #(
10772 *)
10773 mv -f confcache "$cache_file" ;;
10774 esac
10775 fi
10776 fi
d6e9fb05 10777 else
81ecdfbb
RW
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10779$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
d6e9fb05
JK
10780 fi
10781fi
10782rm -f confcache
10783
d6e9fb05
JK
10784test "x$prefix" = xNONE && prefix=$ac_default_prefix
10785# Let make expand exec_prefix.
10786test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10787
84563040 10788DEFS=-DHAVE_CONFIG_H
d6e9fb05 10789
bec39cab
AC
10790ac_libobjs=
10791ac_ltlibobjs=
d0ac1c44 10792U=
bec39cab
AC
10793for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10794 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
10795 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10796 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10797 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10798 # will be set to the directory where LIBOBJS objects are built.
10799 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10800 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
10801done
10802LIBOBJS=$ac_libobjs
d6e9fb05 10803
bec39cab
AC
10804LTLIBOBJS=$ac_ltlibobjs
10805
10806
c9a1864a 10807if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 10808 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c9a1864a
YQ
10809Usually this means the macro was only invoked conditionally." "$LINENO" 5
10810fi
bec39cab 10811
d0ac1c44 10812: "${CONFIG_STATUS=./config.status}"
81ecdfbb 10813ac_write_fail=0
bec39cab
AC
10814ac_clean_files_save=$ac_clean_files
10815ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10817$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10818as_write_fail=0
10819cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
10820#! $SHELL
10821# Generated by $as_me.
d6e9fb05 10822# Run this file to recreate the current configuration.
d6e9fb05 10823# Compiler output produced by configure, useful for debugging
bec39cab
AC
10824# configure, is in config.log if it exists.
10825
10826debug=false
10827ac_cs_recheck=false
10828ac_cs_silent=false
bec39cab 10829
81ecdfbb
RW
10830SHELL=\${CONFIG_SHELL-$SHELL}
10831export SHELL
10832_ASEOF
10833cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10834## -------------------- ##
10835## M4sh Initialization. ##
10836## -------------------- ##
10837
10838# Be more Bourne compatible
10839DUALCASE=1; export DUALCASE # for MKS sh
10840if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
10841 emulate sh
10842 NULLCMD=:
81ecdfbb 10843 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
10844 # is contrary to our usage. Disable this feature.
10845 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
10846 setopt NO_GLOB_SUBST
10847else
10848 case `(set -o) 2>/dev/null` in #(
10849 *posix*) :
10850 set -o posix ;; #(
10851 *) :
10852 ;;
10853esac
bec39cab 10854fi
d6e9fb05 10855
81ecdfbb
RW
10856
10857as_nl='
10858'
10859export as_nl
10860# Printing a long string crashes Solaris 7 /usr/bin/printf.
10861as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10862as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10863as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10864# Prefer a ksh shell builtin over an external printf program on Solaris,
10865# but without wasting forks for bash or zsh.
10866if test -z "$BASH_VERSION$ZSH_VERSION" \
10867 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10868 as_echo='print -r --'
10869 as_echo_n='print -rn --'
10870elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
10871 as_echo='printf %s\n'
10872 as_echo_n='printf %s'
bec39cab 10873else
81ecdfbb
RW
10874 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
10875 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
10876 as_echo_n='/usr/ucb/echo -n'
10877 else
10878 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
10879 as_echo_n_body='eval
10880 arg=$1;
10881 case $arg in #(
10882 *"$as_nl"*)
10883 expr "X$arg" : "X\\(.*\\)$as_nl";
10884 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
10885 esac;
10886 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
10887 '
10888 export as_echo_n_body
10889 as_echo_n='sh -c $as_echo_n_body as_echo'
10890 fi
10891 export as_echo_body
10892 as_echo='sh -c $as_echo_body as_echo'
10893fi
10894
10895# The user is always right.
10896if test "${PATH_SEPARATOR+set}" != set; then
10897 PATH_SEPARATOR=:
10898 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10899 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10900 PATH_SEPARATOR=';'
10901 }
bec39cab
AC
10902fi
10903
10904
81ecdfbb
RW
10905# IFS
10906# We need space, tab and new line, in precisely that order. Quoting is
10907# there to prevent editors from complaining about space-tab.
10908# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10909# splitting by setting IFS to empty value.)
10910IFS=" "" $as_nl"
10911
10912# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 10913as_myself=
81ecdfbb
RW
10914case $0 in #((
10915 *[\\/]* ) as_myself=$0 ;;
10916 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10917for as_dir in $PATH
10918do
10919 IFS=$as_save_IFS
10920 test -z "$as_dir" && as_dir=.
10921 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10922 done
10923IFS=$as_save_IFS
10924
10925 ;;
10926esac
10927# We did not find ourselves, most probably we were run as `sh COMMAND'
10928# in which case we are not to be found in the path.
10929if test "x$as_myself" = x; then
10930 as_myself=$0
10931fi
10932if test ! -f "$as_myself"; then
10933 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10934 exit 1
10935fi
10936
10937# Unset variables that we do not need and which cause bugs (e.g. in
10938# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
10939# suppresses any "Segmentation fault" message there. '((' could
10940# trigger a bug in pdksh 5.2.14.
10941for as_var in BASH_ENV ENV MAIL MAILPATH
10942do eval test x\${$as_var+set} = xset \
10943 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
10944done
bec39cab
AC
10945PS1='$ '
10946PS2='> '
10947PS4='+ '
10948
10949# NLS nuisances.
81ecdfbb
RW
10950LC_ALL=C
10951export LC_ALL
10952LANGUAGE=C
10953export LANGUAGE
10954
10955# CDPATH.
10956(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10957
10958
d0ac1c44
SM
10959# as_fn_error STATUS ERROR [LINENO LOG_FD]
10960# ----------------------------------------
81ecdfbb
RW
10961# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
10962# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 10963# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
10964as_fn_error ()
10965{
d0ac1c44
SM
10966 as_status=$1; test $as_status -eq 0 && as_status=1
10967 if test "$4"; then
10968 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
10969 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
bec39cab 10970 fi
d0ac1c44 10971 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
10972 as_fn_exit $as_status
10973} # as_fn_error
10974
10975
10976# as_fn_set_status STATUS
10977# -----------------------
10978# Set $? to STATUS, without forking.
10979as_fn_set_status ()
10980{
10981 return $1
10982} # as_fn_set_status
10983
10984# as_fn_exit STATUS
10985# -----------------
10986# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
10987as_fn_exit ()
10988{
10989 set +e
10990 as_fn_set_status $1
10991 exit $1
10992} # as_fn_exit
10993
10994# as_fn_unset VAR
10995# ---------------
10996# Portably unset VAR.
10997as_fn_unset ()
10998{
10999 { eval $1=; unset $1;}
11000}
11001as_unset=as_fn_unset
11002# as_fn_append VAR VALUE
11003# ----------------------
11004# Append the text in VALUE to the end of the definition contained in VAR. Take
11005# advantage of any shell optimizations that allow amortized linear growth over
11006# repeated appends, instead of the typical quadratic growth present in naive
11007# implementations.
11008if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11009 eval 'as_fn_append ()
11010 {
11011 eval $1+=\$2
11012 }'
11013else
11014 as_fn_append ()
11015 {
11016 eval $1=\$$1\$2
11017 }
11018fi # as_fn_append
11019
11020# as_fn_arith ARG...
11021# ------------------
11022# Perform arithmetic evaluation on the ARGs, and store the result in the
11023# global $as_val. Take advantage of shells that can avoid forks. The arguments
11024# must be portable across $(()) and expr.
11025if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11026 eval 'as_fn_arith ()
11027 {
11028 as_val=$(( $* ))
11029 }'
11030else
11031 as_fn_arith ()
11032 {
11033 as_val=`expr "$@" || test $? -eq 1`
11034 }
11035fi # as_fn_arith
11036
d6e9fb05 11037
81ecdfbb
RW
11038if expr a : '\(a\)' >/dev/null 2>&1 &&
11039 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
11040 as_expr=expr
11041else
11042 as_expr=false
11043fi
d6e9fb05 11044
81ecdfbb 11045if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
11046 as_basename=basename
11047else
11048 as_basename=false
11049fi
d6e9fb05 11050
81ecdfbb
RW
11051if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11052 as_dirname=dirname
11053else
11054 as_dirname=false
11055fi
d6e9fb05 11056
81ecdfbb 11057as_me=`$as_basename -- "$0" ||
bec39cab
AC
11058$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11059 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
11060 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11061$as_echo X/"$0" |
11062 sed '/^.*\/\([^/][^/]*\)\/*$/{
11063 s//\1/
11064 q
11065 }
11066 /^X\/\(\/\/\)$/{
11067 s//\1/
11068 q
11069 }
11070 /^X\/\(\/\).*/{
11071 s//\1/
11072 q
11073 }
11074 s/.*/./; q'`
bec39cab 11075
dae5f5cf
DJ
11076# Avoid depending upon Character Ranges.
11077as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11078as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11079as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11080as_cr_digits='0123456789'
11081as_cr_alnum=$as_cr_Letters$as_cr_digits
11082
81ecdfbb
RW
11083ECHO_C= ECHO_N= ECHO_T=
11084case `echo -n x` in #(((((
11085-n*)
11086 case `echo 'xy\c'` in
11087 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11088 xy) ECHO_C='\c';;
11089 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11090 ECHO_T=' ';;
11091 esac;;
11092*)
11093 ECHO_N='-n';;
bec39cab
AC
11094esac
11095
81ecdfbb
RW
11096rm -f conf$$ conf$$.exe conf$$.file
11097if test -d conf$$.dir; then
11098 rm -f conf$$.dir/conf$$.file
bec39cab 11099else
81ecdfbb
RW
11100 rm -f conf$$.dir
11101 mkdir conf$$.dir 2>/dev/null
bec39cab 11102fi
81ecdfbb
RW
11103if (echo >conf$$.file) 2>/dev/null; then
11104 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 11105 as_ln_s='ln -s'
81ecdfbb
RW
11106 # ... but there are two gotchas:
11107 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11108 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 11109 # In both cases, we have to default to `cp -pR'.
81ecdfbb 11110 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 11111 as_ln_s='cp -pR'
81ecdfbb
RW
11112 elif ln conf$$.file conf$$ 2>/dev/null; then
11113 as_ln_s=ln
11114 else
d0ac1c44 11115 as_ln_s='cp -pR'
dae5f5cf 11116 fi
bec39cab 11117else
d0ac1c44 11118 as_ln_s='cp -pR'
bec39cab 11119fi
81ecdfbb
RW
11120rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11121rmdir conf$$.dir 2>/dev/null
11122
11123
11124# as_fn_mkdir_p
11125# -------------
11126# Create "$as_dir" as a directory, including parents if necessary.
11127as_fn_mkdir_p ()
11128{
11129
11130 case $as_dir in #(
11131 -*) as_dir=./$as_dir;;
11132 esac
11133 test -d "$as_dir" || eval $as_mkdir_p || {
11134 as_dirs=
11135 while :; do
11136 case $as_dir in #(
11137 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11138 *) as_qdir=$as_dir;;
11139 esac
11140 as_dirs="'$as_qdir' $as_dirs"
11141 as_dir=`$as_dirname -- "$as_dir" ||
11142$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11143 X"$as_dir" : 'X\(//\)[^/]' \| \
11144 X"$as_dir" : 'X\(//\)$' \| \
11145 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11146$as_echo X"$as_dir" |
11147 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11148 s//\1/
11149 q
11150 }
11151 /^X\(\/\/\)[^/].*/{
11152 s//\1/
11153 q
11154 }
11155 /^X\(\/\/\)$/{
11156 s//\1/
11157 q
11158 }
11159 /^X\(\/\).*/{
11160 s//\1/
11161 q
11162 }
11163 s/.*/./; q'`
11164 test -d "$as_dir" && break
11165 done
11166 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 11167 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
bec39cab 11168
81ecdfbb
RW
11169
11170} # as_fn_mkdir_p
bec39cab 11171if mkdir -p . 2>/dev/null; then
81ecdfbb 11172 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
11173else
11174 test -d ./-p && rmdir ./-p
11175 as_mkdir_p=false
11176fi
11177
d0ac1c44
SM
11178
11179# as_fn_executable_p FILE
11180# -----------------------
11181# Test if FILE is an executable regular file.
11182as_fn_executable_p ()
11183{
11184 test -f "$1" && test -x "$1"
11185} # as_fn_executable_p
11186as_test_x='test -x'
11187as_executable_p=as_fn_executable_p
bec39cab
AC
11188
11189# Sed expression to map a string onto a valid CPP name.
11190as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11191
11192# Sed expression to map a string onto a valid variable name.
11193as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11194
11195
bec39cab 11196exec 6>&1
81ecdfbb
RW
11197## ----------------------------------- ##
11198## Main body of $CONFIG_STATUS script. ##
11199## ----------------------------------- ##
11200_ASEOF
11201test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11202
11203cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11204# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 11205# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
11206# values after options handling.
11207ac_log="
bec39cab 11208This file was extended by $as_me, which was
d0ac1c44 11209generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
11210
11211 CONFIG_FILES = $CONFIG_FILES
11212 CONFIG_HEADERS = $CONFIG_HEADERS
11213 CONFIG_LINKS = $CONFIG_LINKS
11214 CONFIG_COMMANDS = $CONFIG_COMMANDS
11215 $ $0 $@
11216
81ecdfbb
RW
11217on `(hostname || uname -n) 2>/dev/null | sed 1q`
11218"
11219
bec39cab
AC
11220_ACEOF
11221
81ecdfbb
RW
11222case $ac_config_files in *"
11223"*) set x $ac_config_files; shift; ac_config_files=$*;;
11224esac
bec39cab 11225
81ecdfbb
RW
11226case $ac_config_headers in *"
11227"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11228esac
dae5f5cf 11229
dae5f5cf 11230
81ecdfbb
RW
11231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11232# Files that config.status was made for.
11233config_files="$ac_config_files"
11234config_headers="$ac_config_headers"
11235config_commands="$ac_config_commands"
bec39cab 11236
81ecdfbb 11237_ACEOF
dae5f5cf 11238
81ecdfbb 11239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 11240ac_cs_usage="\
81ecdfbb
RW
11241\`$as_me' instantiates files and other configuration actions
11242from templates according to the current configuration. Unless the files
11243and actions are specified as TAGs, all are instantiated by default.
bec39cab 11244
81ecdfbb 11245Usage: $0 [OPTION]... [TAG]...
bec39cab
AC
11246
11247 -h, --help print this help, then exit
81ecdfbb 11248 -V, --version print version number and configuration settings, then exit
d0ac1c44 11249 --config print configuration, then exit
81ecdfbb
RW
11250 -q, --quiet, --silent
11251 do not print progress messages
bec39cab
AC
11252 -d, --debug don't remove temporary files
11253 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
11254 --file=FILE[:TEMPLATE]
11255 instantiate the configuration file FILE
11256 --header=FILE[:TEMPLATE]
11257 instantiate the configuration header FILE
bec39cab
AC
11258
11259Configuration files:
11260$config_files
11261
11262Configuration headers:
11263$config_headers
11264
11265Configuration commands:
11266$config_commands
11267
81ecdfbb 11268Report bugs to the package provider."
dae5f5cf 11269
81ecdfbb
RW
11270_ACEOF
11271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 11272ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
11273ac_cs_version="\\
11274config.status
d0ac1c44
SM
11275configured by $0, generated by GNU Autoconf 2.69,
11276 with options \\"\$ac_cs_config\\"
bec39cab 11277
d0ac1c44 11278Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
11279This config.status script is free software; the Free Software Foundation
11280gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
11281
11282ac_pwd='$ac_pwd'
11283srcdir='$srcdir'
11284INSTALL='$INSTALL'
11285test -n "\$AWK" || AWK=awk
bec39cab
AC
11286_ACEOF
11287
81ecdfbb
RW
11288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11289# The default lists apply if the user does not specify any file.
bec39cab
AC
11290ac_need_defaults=:
11291while test $# != 0
11292do
11293 case $1 in
d0ac1c44 11294 --*=?*)
81ecdfbb
RW
11295 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11296 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab
AC
11297 ac_shift=:
11298 ;;
d0ac1c44
SM
11299 --*=)
11300 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11301 ac_optarg=
11302 ac_shift=:
11303 ;;
81ecdfbb 11304 *)
bec39cab
AC
11305 ac_option=$1
11306 ac_optarg=$2
11307 ac_shift=shift
11308 ;;
bec39cab
AC
11309 esac
11310
11311 case $ac_option in
11312 # Handling of the options.
bec39cab
AC
11313 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11314 ac_cs_recheck=: ;;
81ecdfbb
RW
11315 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11316 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
11317 --config | --confi | --conf | --con | --co | --c )
11318 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 11319 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
11320 debug=: ;;
11321 --file | --fil | --fi | --f )
11322 $ac_shift
81ecdfbb
RW
11323 case $ac_optarg in
11324 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 11325 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
11326 esac
11327 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
11328 ac_need_defaults=false;;
11329 --header | --heade | --head | --hea )
11330 $ac_shift
81ecdfbb
RW
11331 case $ac_optarg in
11332 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11333 esac
11334 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 11335 ac_need_defaults=false;;
81ecdfbb
RW
11336 --he | --h)
11337 # Conflict between --help and --header
d0ac1c44 11338 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
11339Try \`$0 --help' for more information.";;
11340 --help | --hel | -h )
11341 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
11342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11343 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11344 ac_cs_silent=: ;;
11345
11346 # This is an error.
d0ac1c44 11347 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 11348Try \`$0 --help' for more information." ;;
bec39cab 11349
81ecdfbb
RW
11350 *) as_fn_append ac_config_targets " $1"
11351 ac_need_defaults=false ;;
bec39cab
AC
11352
11353 esac
11354 shift
d6e9fb05 11355done
bec39cab
AC
11356
11357ac_configure_extra_args=
11358
11359if $ac_cs_silent; then
11360 exec 6>/dev/null
11361 ac_configure_extra_args="$ac_configure_extra_args --silent"
d6e9fb05 11362fi
d6e9fb05 11363
bec39cab 11364_ACEOF
81ecdfbb 11365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 11366if \$ac_cs_recheck; then
d0ac1c44 11367 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
11368 shift
11369 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11370 CONFIG_SHELL='$SHELL'
11371 export CONFIG_SHELL
11372 exec "\$@"
bec39cab 11373fi
d6e9fb05 11374
bec39cab 11375_ACEOF
81ecdfbb
RW
11376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11377exec 5>>config.log
11378{
11379 echo
11380 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11381## Running $as_me. ##
11382_ASBOX
11383 $as_echo "$ac_log"
11384} >&5
bec39cab 11385
81ecdfbb
RW
11386_ACEOF
11387cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61c125b9
TT
11388#
11389# INIT-COMMANDS
11390#
11391ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
60d6cfc9 11392ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
61c125b9 11393
81ecdfbb 11394_ACEOF
bec39cab 11395
81ecdfbb 11396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80864fb 11397
81ecdfbb 11398# Handling of arguments.
bec39cab
AC
11399for ac_config_target in $ac_config_targets
11400do
81ecdfbb
RW
11401 case $ac_config_target in
11402 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
61c125b9 11403 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
60d6cfc9 11404 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
81ecdfbb 11405 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
81ecdfbb 11406
d0ac1c44 11407 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
d6e9fb05 11408 esac
bec39cab
AC
11409done
11410
81ecdfbb 11411
bec39cab
AC
11412# If the user did not use the arguments to specify the items to instantiate,
11413# then the envvar interface is used. Set only those that are not.
11414# We use the long form for the default assignment because of an extremely
11415# bizarre bug on SunOS 4.1.3.
11416if $ac_need_defaults; then
11417 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11418 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11419 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11420fi
d6e9fb05 11421
bec39cab 11422# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 11423# simply because there is no reason against having it here, and in addition,
bec39cab 11424# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
11425# Hook for its removal unless debugging.
11426# Note that there is a small window in which the directory will not be cleaned:
11427# after its creation but before its name has been assigned to `$tmp'.
bec39cab
AC
11428$debug ||
11429{
d0ac1c44 11430 tmp= ac_tmp=
81ecdfbb 11431 trap 'exit_status=$?
d0ac1c44
SM
11432 : "${ac_tmp:=$tmp}"
11433 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
11434' 0
11435 trap 'as_fn_exit 1' 1 2 13 15
bec39cab 11436}
bec39cab
AC
11437# Create a (secure) tmp directory for tmp files.
11438
11439{
81ecdfbb 11440 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 11441 test -d "$tmp"
bec39cab
AC
11442} ||
11443{
81ecdfbb
RW
11444 tmp=./conf$$-$RANDOM
11445 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
11446} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11447ac_tmp=$tmp
81ecdfbb
RW
11448
11449# Set up the scripts for CONFIG_FILES section.
11450# No need to generate them if there are no CONFIG_FILES.
11451# This happens for instance with `./config.status config.h'.
11452if test -n "$CONFIG_FILES"; then
11453
11454
11455ac_cr=`echo X | tr X '\015'`
11456# On cygwin, bash can eat \r inside `` if the user requested igncr.
11457# But we know of no other shell where ac_cr would be empty at this
11458# point, so we can use a bashism as a fallback.
11459if test "x$ac_cr" = x; then
11460 eval ac_cr=\$\'\\r\'
11461fi
11462ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11463if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 11464 ac_cs_awk_cr='\\r'
81ecdfbb
RW
11465else
11466 ac_cs_awk_cr=$ac_cr
11467fi
11468
d0ac1c44 11469echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
11470_ACEOF
11471
11472
11473{
11474 echo "cat >conf$$subs.awk <<_ACEOF" &&
11475 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11476 echo "_ACEOF"
11477} >conf$$subs.sh ||
d0ac1c44
SM
11478 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11479ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
11480ac_delim='%!_!# '
11481for ac_last_try in false false false false false :; do
11482 . ./conf$$subs.sh ||
d0ac1c44 11483 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
11484
11485 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11486 if test $ac_delim_n = $ac_delim_num; then
11487 break
11488 elif $ac_last_try; then
d0ac1c44 11489 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
11490 else
11491 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11492 fi
11493done
11494rm -f conf$$subs.sh
11495
11496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 11497cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
11498_ACEOF
11499sed -n '
11500h
11501s/^/S["/; s/!.*/"]=/
11502p
11503g
11504s/^[^!]*!//
11505:repl
11506t repl
11507s/'"$ac_delim"'$//
11508t delim
11509:nl
11510h
d0ac1c44 11511s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
11512t more1
11513s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11514p
11515n
11516b repl
11517:more1
11518s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11519p
11520g
11521s/.\{148\}//
11522t nl
11523:delim
11524h
d0ac1c44 11525s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
11526t more2
11527s/["\\]/\\&/g; s/^/"/; s/$/"/
11528p
11529b
11530:more2
11531s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11532p
11533g
11534s/.\{148\}//
11535t delim
11536' <conf$$subs.awk | sed '
11537/^[^""]/{
11538 N
11539 s/\n//
11540}
11541' >>$CONFIG_STATUS || ac_write_fail=1
11542rm -f conf$$subs.awk
11543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11544_ACAWK
d0ac1c44 11545cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
11546 for (key in S) S_is_set[key] = 1
11547 FS = "\a"
11548
11549}
bec39cab 11550{
81ecdfbb
RW
11551 line = $ 0
11552 nfields = split(line, field, "@")
11553 substed = 0
11554 len = length(field[1])
11555 for (i = 2; i < nfields; i++) {
11556 key = field[i]
11557 keylen = length(key)
11558 if (S_is_set[key]) {
11559 value = S[key]
11560 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11561 len += length(value) + length(field[++i])
11562 substed = 1
11563 } else
11564 len += 1 + keylen
11565 }
11566
11567 print line
bec39cab
AC
11568}
11569
81ecdfbb
RW
11570_ACAWK
11571_ACEOF
11572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11573if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11574 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11575else
11576 cat
d0ac1c44
SM
11577fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11578 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
dae5f5cf
DJ
11579_ACEOF
11580
d0ac1c44
SM
11581# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11582# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
11583# trailing colons and then remove the whole line if VPATH becomes empty
11584# (actually we leave an empty line to preserve line numbers).
11585if test "x$srcdir" = x.; then
d0ac1c44
SM
11586 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11587h
11588s///
11589s/^/:/
11590s/[ ]*$/:/
11591s/:\$(srcdir):/:/g
11592s/:\${srcdir}:/:/g
11593s/:@srcdir@:/:/g
11594s/^:*//
81ecdfbb 11595s/:*$//
d0ac1c44
SM
11596x
11597s/\(=[ ]*\).*/\1/
11598G
11599s/\n//
81ecdfbb
RW
11600s/^[^=]*=[ ]*$//
11601}'
11602fi
bec39cab 11603
81ecdfbb
RW
11604cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11605fi # test -n "$CONFIG_FILES"
bec39cab 11606
81ecdfbb
RW
11607# Set up the scripts for CONFIG_HEADERS section.
11608# No need to generate them if there are no CONFIG_HEADERS.
11609# This happens for instance with `./config.status Makefile'.
11610if test -n "$CONFIG_HEADERS"; then
d0ac1c44 11611cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb 11612BEGIN {
b80864fb
DJ
11613_ACEOF
11614
81ecdfbb
RW
11615# Transform confdefs.h into an awk script `defines.awk', embedded as
11616# here-document in config.status, that substitutes the proper values into
11617# config.h.in to produce config.h.
11618
11619# Create a delimiter string that does not exist in confdefs.h, to ease
11620# handling of long lines.
11621ac_delim='%!_!# '
11622for ac_last_try in false false :; do
d0ac1c44
SM
11623 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11624 if test -z "$ac_tt"; then
81ecdfbb
RW
11625 break
11626 elif $ac_last_try; then
d0ac1c44 11627 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
11628 else
11629 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
d6e9fb05 11630 fi
81ecdfbb 11631done
d6e9fb05 11632
81ecdfbb
RW
11633# For the awk script, D is an array of macro values keyed by name,
11634# likewise P contains macro parameters if any. Preserve backslash
11635# newline sequences.
11636
11637ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11638sed -n '
11639s/.\{148\}/&'"$ac_delim"'/g
11640t rset
11641:rset
11642s/^[ ]*#[ ]*define[ ][ ]*/ /
11643t def
11644d
11645:def
11646s/\\$//
11647t bsnl
11648s/["\\]/\\&/g
11649s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11650D["\1"]=" \3"/p
11651s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11652d
11653:bsnl
11654s/["\\]/\\&/g
11655s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11656D["\1"]=" \3\\\\\\n"\\/p
11657t cont
11658s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11659t cont
11660d
11661:cont
11662n
11663s/.\{148\}/&'"$ac_delim"'/g
11664t clear
11665:clear
11666s/\\$//
11667t bsnlc
11668s/["\\]/\\&/g; s/^/"/; s/$/"/p
11669d
11670:bsnlc
11671s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11672b cont
11673' <confdefs.h | sed '
11674s/'"$ac_delim"'/"\\\
11675"/g' >>$CONFIG_STATUS || ac_write_fail=1
11676
11677cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11678 for (key in D) D_is_set[key] = 1
11679 FS = "\a"
11680}
11681/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11682 line = \$ 0
11683 split(line, arg, " ")
11684 if (arg[1] == "#") {
11685 defundef = arg[2]
11686 mac1 = arg[3]
11687 } else {
11688 defundef = substr(arg[1], 2)
11689 mac1 = arg[2]
11690 }
11691 split(mac1, mac2, "(") #)
11692 macro = mac2[1]
11693 prefix = substr(line, 1, index(line, defundef) - 1)
11694 if (D_is_set[macro]) {
11695 # Preserve the white space surrounding the "#".
11696 print prefix "define", macro P[macro] D[macro]
11697 next
11698 } else {
11699 # Replace #undef with comments. This is necessary, for example,
11700 # in the case of _POSIX_SOURCE, which is predefined and required
11701 # on some systems where configure will not decide to define it.
11702 if (defundef == "undef") {
11703 print "/*", prefix defundef, macro, "*/"
11704 next
11705 }
11706 }
11707}
11708{ print }
11709_ACAWK
bec39cab 11710_ACEOF
81ecdfbb 11711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 11712 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb
RW
11713fi # test -n "$CONFIG_HEADERS"
11714
11715
11716eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
11717shift
11718for ac_tag
11719do
11720 case $ac_tag in
11721 :[FHLC]) ac_mode=$ac_tag; continue;;
11722 esac
11723 case $ac_mode$ac_tag in
11724 :[FHL]*:*);;
d0ac1c44 11725 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
11726 :[FH]-) ac_tag=-:-;;
11727 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11728 esac
11729 ac_save_IFS=$IFS
11730 IFS=:
11731 set x $ac_tag
11732 IFS=$ac_save_IFS
11733 shift
11734 ac_file=$1
11735 shift
11736
11737 case $ac_mode in
11738 :L) ac_source=$1;;
11739 :[FH])
11740 ac_file_inputs=
11741 for ac_f
11742 do
11743 case $ac_f in
d0ac1c44 11744 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
11745 *) # Look for the file first in the build tree, then in the source tree
11746 # (if the path is not absolute). The absolute path cannot be DOS-style,
11747 # because $ac_f cannot contain `:'.
11748 test -f "$ac_f" ||
11749 case $ac_f in
11750 [\\/$]*) false;;
11751 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11752 esac ||
d0ac1c44 11753 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
11754 esac
11755 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11756 as_fn_append ac_file_inputs " '$ac_f'"
11757 done
11758
11759 # Let's still pretend it is `configure' which instantiates (i.e., don't
11760 # use $as_me), people would be surprised to read:
11761 # /* config.h. Generated by config.status. */
11762 configure_input='Generated from '`
11763 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11764 `' by configure.'
11765 if test x"$ac_file" != x-; then
11766 configure_input="$ac_file. $configure_input"
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11768$as_echo "$as_me: creating $ac_file" >&6;}
11769 fi
11770 # Neutralize special characters interpreted by sed in replacement strings.
11771 case $configure_input in #(
11772 *\&* | *\|* | *\\* )
11773 ac_sed_conf_input=`$as_echo "$configure_input" |
11774 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11775 *) ac_sed_conf_input=$configure_input;;
11776 esac
11777
11778 case $ac_tag in
d0ac1c44
SM
11779 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11780 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
11781 esac
11782 ;;
d6e9fb05
JK
11783 esac
11784
81ecdfbb 11785 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
11786$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11787 X"$ac_file" : 'X\(//\)[^/]' \| \
11788 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
11789 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11790$as_echo X"$ac_file" |
11791 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11792 s//\1/
11793 q
11794 }
11795 /^X\(\/\/\)[^/].*/{
11796 s//\1/
11797 q
11798 }
11799 /^X\(\/\/\)$/{
11800 s//\1/
11801 q
11802 }
11803 /^X\(\/\).*/{
11804 s//\1/
11805 q
11806 }
11807 s/.*/./; q'`
11808 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
11809 ac_builddir=.
11810
81ecdfbb
RW
11811case "$ac_dir" in
11812.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11813*)
11814 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11815 # A ".." for each directory in $ac_dir_suffix.
11816 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11817 case $ac_top_builddir_sub in
11818 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11819 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11820 esac ;;
11821esac
11822ac_abs_top_builddir=$ac_pwd
11823ac_abs_builddir=$ac_pwd$ac_dir_suffix
11824# for backward compatibility:
11825ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
11826
11827case $srcdir in
81ecdfbb 11828 .) # We are building in place.
bec39cab 11829 ac_srcdir=.
81ecdfbb
RW
11830 ac_top_srcdir=$ac_top_builddir_sub
11831 ac_abs_top_srcdir=$ac_pwd ;;
11832 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 11833 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
11834 ac_top_srcdir=$srcdir
11835 ac_abs_top_srcdir=$srcdir ;;
11836 *) # Relative name.
11837 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11838 ac_top_srcdir=$ac_top_build_prefix$srcdir
11839 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 11840esac
81ecdfbb 11841ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 11842
bec39cab 11843
81ecdfbb
RW
11844 case $ac_mode in
11845 :F)
11846 #
11847 # CONFIG_FILE
11848 #
d6e9fb05 11849
bec39cab
AC
11850 case $INSTALL in
11851 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 11852 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
d6e9fb05 11853 esac
81ecdfbb 11854_ACEOF
3db0444b 11855
81ecdfbb
RW
11856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11857# If the template does not know about datarootdir, expand it.
11858# FIXME: This hack should be removed a few years after 2.60.
11859ac_datarootdir_hack=; ac_datarootdir_seen=
11860ac_sed_dataroot='
11861/datarootdir/ {
11862 p
11863 q
11864}
11865/@datadir@/p
11866/@docdir@/p
11867/@infodir@/p
11868/@localedir@/p
11869/@mandir@/p'
11870case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
11871*datarootdir*) ac_datarootdir_seen=yes;;
11872*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11874$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11875_ACEOF
11876cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11877 ac_datarootdir_hack='
11878 s&@datadir@&$datadir&g
11879 s&@docdir@&$docdir&g
11880 s&@infodir@&$infodir&g
11881 s&@localedir@&$localedir&g
11882 s&@mandir@&$mandir&g
11883 s&\\\${datarootdir}&$datarootdir&g' ;;
11884esac
bec39cab 11885_ACEOF
81ecdfbb
RW
11886
11887# Neutralize VPATH when `$srcdir' = `.'.
11888# Shell code in configure.ac might set extrasub.
11889# FIXME: do we really want to maintain this feature?
11890cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11891ac_sed_extra="$ac_vpsub
bec39cab
AC
11892$extrasub
11893_ACEOF
81ecdfbb 11894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
11895:t
11896/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
11897s|@configure_input@|$ac_sed_conf_input|;t t
11898s&@top_builddir@&$ac_top_builddir_sub&;t t
11899s&@top_build_prefix@&$ac_top_build_prefix&;t t
11900s&@srcdir@&$ac_srcdir&;t t
11901s&@abs_srcdir@&$ac_abs_srcdir&;t t
11902s&@top_srcdir@&$ac_top_srcdir&;t t
11903s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11904s&@builddir@&$ac_builddir&;t t
11905s&@abs_builddir@&$ac_abs_builddir&;t t
11906s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11907s&@INSTALL@&$ac_INSTALL&;t t
11908$ac_datarootdir_hack
11909"
d0ac1c44
SM
11910eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11911 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
11912
11913test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
11914 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11915 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
11916 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 11917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 11918which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 11919$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 11920which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 11921
d0ac1c44 11922 rm -f "$ac_tmp/stdin"
bec39cab 11923 case $ac_file in
d0ac1c44
SM
11924 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11925 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 11926 esac \
d0ac1c44 11927 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
11928 ;;
11929 :H)
11930 #
11931 # CONFIG_HEADER
11932 #
bec39cab 11933 if test x"$ac_file" != x-; then
81ecdfbb
RW
11934 {
11935 $as_echo "/* $configure_input */" \
d0ac1c44
SM
11936 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
11937 } >"$ac_tmp/config.h" \
11938 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11939 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
11941$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 11942 else
81ecdfbb 11943 rm -f "$ac_file"
d0ac1c44
SM
11944 mv "$ac_tmp/config.h" "$ac_file" \
11945 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
84563040 11946 fi
bec39cab 11947 else
81ecdfbb 11948 $as_echo "/* $configure_input */" \
d0ac1c44
SM
11949 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
11950 || as_fn_error $? "could not create -" "$LINENO" 5
d6e9fb05 11951 fi
81ecdfbb 11952 ;;
dae5f5cf 11953
81ecdfbb
RW
11954 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
11955$as_echo "$as_me: executing $ac_file commands" >&6;}
11956 ;;
11957 esac
dae5f5cf
DJ
11958
11959
81ecdfbb 11960 case $ac_file$ac_mode in
c5adaa19 11961 "config.h":H) echo > stamp-h ;;
61c125b9 11962 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
60d6cfc9
YQ
11963 "gdbdepdir":C)
11964 for subdir in ${CONFIG_SRC_SUBDIR}
11965 do
11966 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
11967 done ;;
81ecdfbb 11968
bec39cab 11969 esac
81ecdfbb 11970done # for ac_tag
d6e9fb05 11971
bec39cab 11972
81ecdfbb 11973as_fn_exit 0
bec39cab 11974_ACEOF
bec39cab
AC
11975ac_clean_files=$ac_clean_files_save
11976
81ecdfbb 11977test $ac_write_fail = 0 ||
d0ac1c44 11978 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 11979
bec39cab
AC
11980
11981# configure is writing to config.log, and then calls config.status.
11982# config.status does its own redirection, appending to config.log.
11983# Unfortunately, on DOS this fails, as config.log is still kept open
11984# by configure, so config.status won't be able to write to it; its
11985# output is simply discarded. So we exec the FD to /dev/null,
11986# effectively closing config.log, so it can be properly (re)opened and
11987# appended to by config.status. When coming back to configure, we
11988# need to make the FD available again.
11989if test "$no_create" != yes; then
11990 ac_cs_success=:
11991 ac_config_status_args=
11992 test "$silent" = yes &&
11993 ac_config_status_args="$ac_config_status_args --quiet"
11994 exec 5>/dev/null
11995 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11996 exec 5>>config.log
11997 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11998 # would make configure fail if this is the last instruction.
d0ac1c44 11999 $ac_cs_success || as_fn_exit 1
81ecdfbb
RW
12000fi
12001if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12003$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
bec39cab 12004fi
d6e9fb05 12005
This page took 2.917161 seconds and 4 git commands to generate.