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