]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/configure
gdbsupport: constify some return values in print-utils.{h,cc}
[thirdparty/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=
9e11e746 623gt_needs=
c971b7fa 624ac_subst_vars='LTLIBOBJS
698b3e08 625LIBOBJS
da48217f 626MAYBE_LIBICONV
c9a1864a 627GNULIB_STDINT_H
fa593d66
PA
628extra_libraries
629IPA_DEPFILES
81ecdfbb
RW
630srv_xmlfiles
631srv_xmlbuiltin
81ecdfbb
RW
632GDBSERVER_LIBS
633GDBSERVER_DEPFILES
634RDYNAMIC
635REPORT_BUGS_TEXI
636REPORT_BUGS_TO
637PKGVERSION
d4596a3d
PA
638WERROR_CFLAGS
639WARN_CFLAGS
0fb4aa4b
PA
640ustinc
641ustlibs
db6878ac
SM
642CCDEPMODE
643CONFIG_SRC_SUBDIR
9a665d62
TT
644CATOBJEXT
645GENCAT
646INSTOBJEXT
647DATADIRNAME
648CATALOGS
9a665d62
TT
649INCINTL
650LIBINTL_DEP
9e11e746
SJ
651POSUB
652LTLIBINTL
9a665d62 653LIBINTL
9e11e746
SJ
654INTLLIBS
655LTLIBICONV
656LIBICONV
657INTL_MACOSX_LIBS
658MSGMERGE
659XGETTEXT
660GMSGFMT
661MSGFMT
9a665d62 662USE_NLS
9e11e746
SJ
663MKINSTALLDIRS
664SET_MAKE
db6878ac
SM
665DEPDIR
666am__leading_dot
667host_noncanonical
668target_noncanonical
4635ff97 669WIN32APILIBS
8b35ed1f
SM
670LTLIBXXHASH
671LIBXXHASH
672HAVE_LIBXXHASH
05ea2a05
TT
673LTLIBIPT
674LIBIPT
675HAVE_LIBIPT
5e030278
TT
676PTHREAD_CFLAGS
677PTHREAD_LIBS
678PTHREAD_CC
679ax_pthread_config
680SED
9c232dda 681ALLOCA
0bcda685 682CXX_DIALECT
f74dc267 683HAVE_CXX17
c971b7fa 684RANLIB
e1d2394b 685AR
81ecdfbb
RW
686INSTALL_DATA
687INSTALL_SCRIPT
688INSTALL_PROGRAM
689target_os
690target_vendor
691target_cpu
692target
693host_os
694host_vendor
695host_cpu
696host
697build_os
698build_vendor
699build_cpu
700build
bdaed379
HD
701INSTALL_STRIP_PROGRAM
702STRIP
703install_sh
770d76d7
PA
704EGREP
705GREP
706CPP
3bc3d82a
PA
707ac_ct_CXX
708CXXFLAGS
709CXX
81ecdfbb
RW
710OBJEXT
711EXEEXT
712ac_ct_CC
713CPPFLAGS
714LDFLAGS
715CFLAGS
716CC
c9a1864a
YQ
717MAINT
718MAINTAINER_MODE_FALSE
719MAINTAINER_MODE_TRUE
81ecdfbb
RW
720target_alias
721host_alias
722build_alias
723LIBS
724ECHO_T
725ECHO_N
726ECHO_C
727DEFS
728mandir
729localedir
730libdir
731psdir
732pdfdir
733dvidir
734htmldir
735infodir
736docdir
737oldincludedir
738includedir
739localstatedir
740sharedstatedir
741sysconfdir
742datadir
743datarootdir
744libexecdir
745sbindir
746bindir
747program_transform_name
748prefix
749exec_prefix
750PACKAGE_URL
751PACKAGE_BUGREPORT
752PACKAGE_STRING
753PACKAGE_VERSION
754PACKAGE_TARNAME
755PACKAGE_NAME
756PATH_SEPARATOR
757SHELL'
bec39cab 758ac_subst_files=''
81ecdfbb
RW
759ac_user_opts='
760enable_option_checking
c9a1864a 761enable_maintainer_mode
589bc927 762enable_largefile
261b0748 763enable_threading
05ea2a05
TT
764with_intel_pt
765with_gnu_ld
766enable_rpath
767with_libipt_prefix
9f1528a1 768with_libipt_type
8b35ed1f
SM
769with_xxhash
770with_libxxhash_prefix
771with_libxxhash_type
db6878ac 772enable_unit_tests
9e11e746
SJ
773enable_nls
774with_libiconv_prefix
775with_libiconv_type
776with_libintl_prefix
777with_libintl_type
0fb4aa4b
PA
778with_ust
779with_ust_include
780with_ust_lib
d4596a3d 781enable_werror
8f13a3ce
MF
782enable_build_warnings
783enable_gdb_build_warnings
81ecdfbb
RW
784with_pkgversion
785with_bugurl
96f15937 786with_libthread_db
c2a66c29 787enable_inprocess_agent
81ecdfbb
RW
788'
789 ac_precious_vars='build_alias
790host_alias
791target_alias
792CC
793CFLAGS
794LDFLAGS
795LIBS
796CPPFLAGS
3bc3d82a
PA
797CXX
798CXXFLAGS
799CCC
81ecdfbb
RW
800CPP'
801
d6e9fb05
JK
802
803# Initialize some variables set by options.
bec39cab
AC
804ac_init_help=
805ac_init_version=false
81ecdfbb
RW
806ac_unrecognized_opts=
807ac_unrecognized_sep=
d6e9fb05
JK
808# The variables have the same names as the options, with
809# dashes changed to underlines.
bec39cab 810cache_file=/dev/null
d6e9fb05 811exec_prefix=NONE
d6e9fb05 812no_create=
d6e9fb05
JK
813no_recursion=
814prefix=NONE
815program_prefix=NONE
816program_suffix=NONE
817program_transform_name=s,x,x,
818silent=
819site=
820srcdir=
d6e9fb05
JK
821verbose=
822x_includes=NONE
823x_libraries=NONE
bec39cab
AC
824
825# Installation directory options.
826# These are left unexpanded so users can "make install exec_prefix=/foo"
827# and all the variables that are supposed to be based on exec_prefix
828# by default will actually change.
829# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 830# (The list follows the same order as the GNU Coding Standards.)
d6e9fb05
JK
831bindir='${exec_prefix}/bin'
832sbindir='${exec_prefix}/sbin'
833libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
834datarootdir='${prefix}/share'
835datadir='${datarootdir}'
d6e9fb05
JK
836sysconfdir='${prefix}/etc'
837sharedstatedir='${prefix}/com'
838localstatedir='${prefix}/var'
d6e9fb05
JK
839includedir='${prefix}/include'
840oldincludedir='/usr/include'
81ecdfbb
RW
841docdir='${datarootdir}/doc/${PACKAGE}'
842infodir='${datarootdir}/info'
843htmldir='${docdir}'
844dvidir='${docdir}'
845pdfdir='${docdir}'
846psdir='${docdir}'
847libdir='${exec_prefix}/lib'
848localedir='${datarootdir}/locale'
849mandir='${datarootdir}/man'
d6e9fb05 850
d6e9fb05 851ac_prev=
81ecdfbb 852ac_dashdash=
d6e9fb05
JK
853for ac_option
854do
d6e9fb05
JK
855 # If the previous option needs an argument, assign it.
856 if test -n "$ac_prev"; then
81ecdfbb 857 eval $ac_prev=\$ac_option
d6e9fb05
JK
858 ac_prev=
859 continue
860 fi
861
81ecdfbb 862 case $ac_option in
d0ac1c44
SM
863 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
864 *=) ac_optarg= ;;
865 *) ac_optarg=yes ;;
81ecdfbb 866 esac
d6e9fb05
JK
867
868 # Accept the important Cygnus configure options, so we can diagnose typos.
869
81ecdfbb
RW
870 case $ac_dashdash$ac_option in
871 --)
872 ac_dashdash=yes ;;
d6e9fb05
JK
873
874 -bindir | --bindir | --bindi | --bind | --bin | --bi)
875 ac_prev=bindir ;;
876 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 877 bindir=$ac_optarg ;;
d6e9fb05
JK
878
879 -build | --build | --buil | --bui | --bu)
bec39cab 880 ac_prev=build_alias ;;
d6e9fb05 881 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 882 build_alias=$ac_optarg ;;
d6e9fb05
JK
883
884 -cache-file | --cache-file | --cache-fil | --cache-fi \
885 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
886 ac_prev=cache_file ;;
887 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
888 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
889 cache_file=$ac_optarg ;;
890
891 --config-cache | -C)
892 cache_file=config.cache ;;
d6e9fb05 893
81ecdfbb 894 -datadir | --datadir | --datadi | --datad)
d6e9fb05 895 ac_prev=datadir ;;
81ecdfbb 896 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 897 datadir=$ac_optarg ;;
d6e9fb05 898
81ecdfbb
RW
899 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
900 | --dataroo | --dataro | --datar)
901 ac_prev=datarootdir ;;
902 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
903 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
904 datarootdir=$ac_optarg ;;
905
d6e9fb05 906 -disable-* | --disable-*)
81ecdfbb 907 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
d6e9fb05 908 # Reject names that are not valid shell variable names.
81ecdfbb 909 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 910 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
911 ac_useropt_orig=$ac_useropt
912 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
913 case $ac_user_opts in
914 *"
915"enable_$ac_useropt"
916"*) ;;
917 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
918 ac_unrecognized_sep=', ';;
919 esac
920 eval enable_$ac_useropt=no ;;
921
922 -docdir | --docdir | --docdi | --doc | --do)
923 ac_prev=docdir ;;
924 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
925 docdir=$ac_optarg ;;
926
927 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
928 ac_prev=dvidir ;;
929 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
930 dvidir=$ac_optarg ;;
d6e9fb05
JK
931
932 -enable-* | --enable-*)
81ecdfbb 933 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
d6e9fb05 934 # Reject names that are not valid shell variable names.
81ecdfbb 935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 936 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941"enable_$ac_useropt"
942"*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
dae5f5cf 945 esac
81ecdfbb 946 eval enable_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
947
948 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
949 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
950 | --exec | --exe | --ex)
951 ac_prev=exec_prefix ;;
952 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
953 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
954 | --exec=* | --exe=* | --ex=*)
bec39cab 955 exec_prefix=$ac_optarg ;;
d6e9fb05
JK
956
957 -gas | --gas | --ga | --g)
958 # Obsolete; use --with-gas.
959 with_gas=yes ;;
960
bec39cab
AC
961 -help | --help | --hel | --he | -h)
962 ac_init_help=long ;;
963 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
964 ac_init_help=recursive ;;
965 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
966 ac_init_help=short ;;
d6e9fb05
JK
967
968 -host | --host | --hos | --ho)
bec39cab 969 ac_prev=host_alias ;;
d6e9fb05 970 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 971 host_alias=$ac_optarg ;;
d6e9fb05 972
81ecdfbb
RW
973 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
974 ac_prev=htmldir ;;
975 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
976 | --ht=*)
977 htmldir=$ac_optarg ;;
978
d6e9fb05
JK
979 -includedir | --includedir | --includedi | --included | --include \
980 | --includ | --inclu | --incl | --inc)
981 ac_prev=includedir ;;
982 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
983 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 984 includedir=$ac_optarg ;;
d6e9fb05
JK
985
986 -infodir | --infodir | --infodi | --infod | --info | --inf)
987 ac_prev=infodir ;;
988 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 989 infodir=$ac_optarg ;;
d6e9fb05
JK
990
991 -libdir | --libdir | --libdi | --libd)
992 ac_prev=libdir ;;
993 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 994 libdir=$ac_optarg ;;
d6e9fb05
JK
995
996 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
997 | --libexe | --libex | --libe)
998 ac_prev=libexecdir ;;
999 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1000 | --libexe=* | --libex=* | --libe=*)
bec39cab 1001 libexecdir=$ac_optarg ;;
d6e9fb05 1002
81ecdfbb
RW
1003 -localedir | --localedir | --localedi | --localed | --locale)
1004 ac_prev=localedir ;;
1005 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1006 localedir=$ac_optarg ;;
1007
d6e9fb05 1008 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1009 | --localstate | --localstat | --localsta | --localst | --locals)
d6e9fb05
JK
1010 ac_prev=localstatedir ;;
1011 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1012 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1013 localstatedir=$ac_optarg ;;
d6e9fb05
JK
1014
1015 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1016 ac_prev=mandir ;;
1017 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1018 mandir=$ac_optarg ;;
d6e9fb05
JK
1019
1020 -nfp | --nfp | --nf)
1021 # Obsolete; use --without-fp.
1022 with_fp=no ;;
1023
1024 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1025 | --no-cr | --no-c | -n)
d6e9fb05
JK
1026 no_create=yes ;;
1027
1028 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1029 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1030 no_recursion=yes ;;
1031
1032 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1033 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1034 | --oldin | --oldi | --old | --ol | --o)
1035 ac_prev=oldincludedir ;;
1036 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1037 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1038 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1039 oldincludedir=$ac_optarg ;;
d6e9fb05
JK
1040
1041 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1042 ac_prev=prefix ;;
1043 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1044 prefix=$ac_optarg ;;
d6e9fb05
JK
1045
1046 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1047 | --program-pre | --program-pr | --program-p)
1048 ac_prev=program_prefix ;;
1049 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1050 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1051 program_prefix=$ac_optarg ;;
d6e9fb05
JK
1052
1053 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1054 | --program-suf | --program-su | --program-s)
1055 ac_prev=program_suffix ;;
1056 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1057 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1058 program_suffix=$ac_optarg ;;
d6e9fb05
JK
1059
1060 -program-transform-name | --program-transform-name \
1061 | --program-transform-nam | --program-transform-na \
1062 | --program-transform-n | --program-transform- \
1063 | --program-transform | --program-transfor \
1064 | --program-transfo | --program-transf \
1065 | --program-trans | --program-tran \
1066 | --progr-tra | --program-tr | --program-t)
1067 ac_prev=program_transform_name ;;
1068 -program-transform-name=* | --program-transform-name=* \
1069 | --program-transform-nam=* | --program-transform-na=* \
1070 | --program-transform-n=* | --program-transform-=* \
1071 | --program-transform=* | --program-transfor=* \
1072 | --program-transfo=* | --program-transf=* \
1073 | --program-trans=* | --program-tran=* \
1074 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1075 program_transform_name=$ac_optarg ;;
d6e9fb05 1076
81ecdfbb
RW
1077 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1078 ac_prev=pdfdir ;;
1079 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1080 pdfdir=$ac_optarg ;;
1081
1082 -psdir | --psdir | --psdi | --psd | --ps)
1083 ac_prev=psdir ;;
1084 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1085 psdir=$ac_optarg ;;
1086
d6e9fb05
JK
1087 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1088 | -silent | --silent | --silen | --sile | --sil)
1089 silent=yes ;;
1090
1091 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1092 ac_prev=sbindir ;;
1093 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1094 | --sbi=* | --sb=*)
bec39cab 1095 sbindir=$ac_optarg ;;
d6e9fb05
JK
1096
1097 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1098 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1099 | --sharedst | --shareds | --shared | --share | --shar \
1100 | --sha | --sh)
1101 ac_prev=sharedstatedir ;;
1102 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1103 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1104 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1105 | --sha=* | --sh=*)
bec39cab 1106 sharedstatedir=$ac_optarg ;;
d6e9fb05
JK
1107
1108 -site | --site | --sit)
1109 ac_prev=site ;;
1110 -site=* | --site=* | --sit=*)
bec39cab 1111 site=$ac_optarg ;;
434c4c77 1112
d6e9fb05
JK
1113 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1114 ac_prev=srcdir ;;
1115 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1116 srcdir=$ac_optarg ;;
d6e9fb05
JK
1117
1118 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1119 | --syscon | --sysco | --sysc | --sys | --sy)
1120 ac_prev=sysconfdir ;;
1121 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1122 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1123 sysconfdir=$ac_optarg ;;
d6e9fb05
JK
1124
1125 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1126 ac_prev=target_alias ;;
d6e9fb05 1127 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1128 target_alias=$ac_optarg ;;
d6e9fb05
JK
1129
1130 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1131 verbose=yes ;;
1132
bec39cab
AC
1133 -version | --version | --versio | --versi | --vers | -V)
1134 ac_init_version=: ;;
d6e9fb05
JK
1135
1136 -with-* | --with-*)
81ecdfbb 1137 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
d6e9fb05 1138 # Reject names that are not valid shell variable names.
81ecdfbb 1139 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1140 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145"with_$ac_useropt"
1146"*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
dae5f5cf 1149 esac
81ecdfbb 1150 eval with_$ac_useropt=\$ac_optarg ;;
d6e9fb05
JK
1151
1152 -without-* | --without-*)
81ecdfbb 1153 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
d6e9fb05 1154 # Reject names that are not valid shell variable names.
81ecdfbb 1155 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1156 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1157 ac_useropt_orig=$ac_useropt
1158 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1159 case $ac_user_opts in
1160 *"
1161"with_$ac_useropt"
1162"*) ;;
1163 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1164 ac_unrecognized_sep=', ';;
1165 esac
1166 eval with_$ac_useropt=no ;;
d6e9fb05
JK
1167
1168 --x)
1169 # Obsolete; use --with-x.
1170 with_x=yes ;;
1171
1172 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1173 | --x-incl | --x-inc | --x-in | --x-i)
1174 ac_prev=x_includes ;;
1175 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1176 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1177 x_includes=$ac_optarg ;;
d6e9fb05
JK
1178
1179 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1180 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1181 ac_prev=x_libraries ;;
1182 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1183 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1184 x_libraries=$ac_optarg ;;
d6e9fb05 1185
d0ac1c44
SM
1186 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1187Try \`$0 --help' for more information"
d6e9fb05
JK
1188 ;;
1189
bec39cab
AC
1190 *=*)
1191 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1192 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1193 case $ac_envvar in #(
1194 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1195 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1196 esac
1197 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1198 export $ac_envvar ;;
1199
d6e9fb05 1200 *)
bec39cab 1201 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1202 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1203 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1204 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1205 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
d6e9fb05
JK
1206 ;;
1207
1208 esac
1209done
1210
1211if test -n "$ac_prev"; then
bec39cab 1212 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1213 as_fn_error $? "missing argument to $ac_option"
d6e9fb05 1214fi
d6e9fb05 1215
81ecdfbb
RW
1216if test -n "$ac_unrecognized_opts"; then
1217 case $enable_option_checking in
1218 no) ;;
d0ac1c44 1219 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1220 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
dae5f5cf 1221 esac
81ecdfbb 1222fi
dae5f5cf 1223
81ecdfbb
RW
1224# Check all directory arguments for consistency.
1225for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1226 datadir sysconfdir sharedstatedir localstatedir includedir \
1227 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1228 libdir localedir mandir
dae5f5cf 1229do
81ecdfbb
RW
1230 eval ac_val=\$$ac_var
1231 # Remove trailing slashes.
1232 case $ac_val in
1233 */ )
1234 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1235 eval $ac_var=\$ac_val;;
1236 esac
1237 # Be sure to have absolute directory names.
dae5f5cf 1238 case $ac_val in
81ecdfbb
RW
1239 [\\/$]* | ?:[\\/]* ) continue;;
1240 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
d6e9fb05 1241 esac
d0ac1c44 1242 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
d6e9fb05
JK
1243done
1244
bec39cab
AC
1245# There might be people who depend on the old broken behavior: `$host'
1246# used to hold the argument of --host etc.
1247# FIXME: To remove some day.
1248build=$build_alias
1249host=$host_alias
1250target=$target_alias
1251
1252# FIXME: To remove some day.
1253if test "x$host_alias" != x; then
1254 if test "x$build_alias" = x; then
1255 cross_compiling=maybe
bec39cab
AC
1256 elif test "x$build_alias" != "x$host_alias"; then
1257 cross_compiling=yes
1258 fi
1259fi
d6e9fb05 1260
bec39cab
AC
1261ac_tool_prefix=
1262test -n "$host_alias" && ac_tool_prefix=$host_alias-
1263
1264test "$silent" = yes && exec 6>/dev/null
d6e9fb05 1265
d6e9fb05 1266
81ecdfbb
RW
1267ac_pwd=`pwd` && test -n "$ac_pwd" &&
1268ac_ls_di=`ls -di .` &&
1269ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1270 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1271test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1272 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1273
1274
d6e9fb05
JK
1275# Find the source files, if location was not specified.
1276if test -z "$srcdir"; then
1277 ac_srcdir_defaulted=yes
81ecdfbb
RW
1278 # Try the directory containing this script, then the parent directory.
1279 ac_confdir=`$as_dirname -- "$as_myself" ||
1280$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1281 X"$as_myself" : 'X\(//\)[^/]' \| \
1282 X"$as_myself" : 'X\(//\)$' \| \
1283 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1284$as_echo X"$as_myself" |
1285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\/\)[^/].*/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\/\)$/{
1294 s//\1/
1295 q
1296 }
1297 /^X\(\/\).*/{
1298 s//\1/
1299 q
1300 }
1301 s/.*/./; q'`
d6e9fb05 1302 srcdir=$ac_confdir
81ecdfbb 1303 if test ! -r "$srcdir/$ac_unique_file"; then
d6e9fb05
JK
1304 srcdir=..
1305 fi
1306else
1307 ac_srcdir_defaulted=no
1308fi
81ecdfbb
RW
1309if test ! -r "$srcdir/$ac_unique_file"; then
1310 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1311 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1312fi
1313ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1314ac_abs_confdir=`(
d0ac1c44 1315 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1316 pwd)`
1317# When building in place, set srcdir=.
1318if test "$ac_abs_confdir" = "$ac_pwd"; then
1319 srcdir=.
1320fi
1321# Remove unnecessary trailing slashes from srcdir.
1322# Double slashes in file names in object file debugging info
1323# mess up M-x gdb in Emacs.
1324case $srcdir in
1325*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1326esac
1327for ac_var in $ac_precious_vars; do
1328 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1329 eval ac_env_${ac_var}_value=\$${ac_var}
1330 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1332done
d6e9fb05 1333
bec39cab
AC
1334#
1335# Report the --help message.
1336#
1337if test "$ac_init_help" = "long"; then
1338 # Omit some internal or obsolete options to make the list less imposing.
1339 # This message is too long to be a string in the A/UX 3.1 sh.
1340 cat <<_ACEOF
1341\`configure' configures this package to adapt to many kinds of systems.
1342
1343Usage: $0 [OPTION]... [VAR=VALUE]...
1344
1345To assign environment variables (e.g., CC, CFLAGS...), specify them as
1346VAR=VALUE. See below for descriptions of some of the useful variables.
1347
1348Defaults for the options are specified in brackets.
1349
1350Configuration:
1351 -h, --help display this help and exit
1352 --help=short display options specific to this package
1353 --help=recursive display the short help of all the included packages
1354 -V, --version display version information and exit
d0ac1c44 1355 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1356 --cache-file=FILE cache test results in FILE [disabled]
1357 -C, --config-cache alias for \`--cache-file=config.cache'
1358 -n, --no-create do not create output files
1359 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1360
bec39cab
AC
1361Installation directories:
1362 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1363 [$ac_default_prefix]
bec39cab 1364 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1365 [PREFIX]
bec39cab
AC
1366
1367By default, \`make install' will install all the files in
1368\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1369an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1370for instance \`--prefix=\$HOME'.
1371
1372For better control, use the options below.
1373
1374Fine tuning of the installation directories:
81ecdfbb
RW
1375 --bindir=DIR user executables [EPREFIX/bin]
1376 --sbindir=DIR system admin executables [EPREFIX/sbin]
1377 --libexecdir=DIR program executables [EPREFIX/libexec]
1378 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1379 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1380 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1381 --libdir=DIR object code libraries [EPREFIX/lib]
1382 --includedir=DIR C header files [PREFIX/include]
1383 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1384 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1385 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1386 --infodir=DIR info documentation [DATAROOTDIR/info]
1387 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1388 --mandir=DIR man documentation [DATAROOTDIR/man]
1389 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1390 --htmldir=DIR html documentation [DOCDIR]
1391 --dvidir=DIR dvi documentation [DOCDIR]
1392 --pdfdir=DIR pdf documentation [DOCDIR]
1393 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1394_ACEOF
1395
1396 cat <<\_ACEOF
1397
dcdb98d2
DJ
1398Program names:
1399 --program-prefix=PREFIX prepend PREFIX to installed program names
1400 --program-suffix=SUFFIX append SUFFIX to installed program names
1401 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1402
bec39cab
AC
1403System types:
1404 --build=BUILD configure for building on BUILD [guessed]
1405 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1406 --target=TARGET configure for building compilers for TARGET [HOST]
1407_ACEOF
1408fi
1409
1410if test -n "$ac_init_help"; then
1411
1412 cat <<\_ACEOF
1413
d4596a3d
PA
1414Optional Features:
1415 --disable-option-checking ignore unrecognized --enable/--with options
1416 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1417 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1418 --enable-maintainer-mode
1419 enable make rules and dependencies not useful (and
1420 sometimes confusing) to the casual installer
589bc927 1421 --disable-largefile omit support for large files
261b0748
LM
1422 --enable-threading include support for parallel processing of data
1423 (yes/no)
db6878ac 1424 --disable-rpath do not hardcode runtime library paths
8ecfd7bd
SDJ
1425 --enable-unit-tests Enable the inclusion of unit tests when compiling
1426 GDB
9e11e746 1427 --disable-nls do not use Native Language Support
d4596a3d 1428 --enable-werror treat compile warnings as errors
8f13a3ce
MF
1429 --enable-build-warnings enable build-time compiler warnings if gcc is used
1430 --enable-gdb-build-warnings
1431 enable GDB specific build-time compiler warnings if
1432 gcc is used
c2a66c29
NS
1433 --enable-inprocess-agent
1434 inprocess agent
d4596a3d 1435
c16158bc
JM
1436Optional Packages:
1437 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1438 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
05ea2a05
TT
1439 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1440 --with-gnu-ld assume the C compiler uses GNU ld default=no
1441 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1442 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1443 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
8b35ed1f
SM
1444 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1445 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1446 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1447 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
9e11e746
SJ
1448 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1449 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1450 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1451 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1452 --without-libintl-prefix don't search for libintl in includedir and libdir
1453 --with-libintl-type=TYPE type of library to search for (auto/static/shared)
0fb4aa4b
PA
1454 --with-ust=PATH Specify prefix directory for the installed UST package
1455 Equivalent to --with-ust-include=PATH/include
1456 plus --with-ust-lib=PATH/lib
1457 --with-ust-include=PATH Specify directory for installed UST include files
1458 --with-ust-lib=PATH Specify the directory for the installed UST library
c16158bc
JM
1459 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1460 --with-bugurl=URL Direct users to URL to report a bug
96f15937
PP
1461 --with-libthread-db=PATH
1462 use given libthread_db directly
c16158bc 1463
bec39cab
AC
1464Some influential environment variables:
1465 CC C compiler command
1466 CFLAGS C compiler flags
1467 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1468 nonstandard directory <lib dir>
81ecdfbb 1469 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1470 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1471 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1472 CXX C++ compiler command
1473 CXXFLAGS C++ compiler flags
bec39cab
AC
1474 CPP C preprocessor
1475
1476Use these variables to override the choices made by `configure' or to help
1477it to find libraries and programs with nonstandard names/locations.
1478
81ecdfbb 1479Report bugs to the package provider.
bec39cab 1480_ACEOF
81ecdfbb 1481ac_status=$?
bec39cab
AC
1482fi
1483
1484if test "$ac_init_help" = "recursive"; then
1485 # If there are subdirs, report their specific --help.
bec39cab 1486 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1487 test -d "$ac_dir" ||
1488 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1489 continue
bec39cab
AC
1490 ac_builddir=.
1491
81ecdfbb
RW
1492case "$ac_dir" in
1493.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1494*)
1495 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1496 # A ".." for each directory in $ac_dir_suffix.
1497 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1498 case $ac_top_builddir_sub in
1499 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1501 esac ;;
1502esac
1503ac_abs_top_builddir=$ac_pwd
1504ac_abs_builddir=$ac_pwd$ac_dir_suffix
1505# for backward compatibility:
1506ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1507
1508case $srcdir in
81ecdfbb 1509 .) # We are building in place.
bec39cab 1510 ac_srcdir=.
81ecdfbb
RW
1511 ac_top_srcdir=$ac_top_builddir_sub
1512 ac_abs_top_srcdir=$ac_pwd ;;
1513 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1514 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1515 ac_top_srcdir=$srcdir
1516 ac_abs_top_srcdir=$srcdir ;;
1517 *) # Relative name.
1518 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1519 ac_top_srcdir=$ac_top_build_prefix$srcdir
1520 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
dae5f5cf 1521esac
81ecdfbb
RW
1522ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1523
1524 cd "$ac_dir" || { ac_status=$?; continue; }
1525 # Check for guested configure.
1526 if test -f "$ac_srcdir/configure.gnu"; then
1527 echo &&
1528 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1529 elif test -f "$ac_srcdir/configure"; then
1530 echo &&
1531 $SHELL "$ac_srcdir/configure" --help=recursive
434c4c77 1532 else
81ecdfbb
RW
1533 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1534 fi || ac_status=$?
1535 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1536 done
1537fi
1538
81ecdfbb 1539test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1540if $ac_init_version; then
1541 cat <<\_ACEOF
81ecdfbb 1542configure
d0ac1c44 1543generated by GNU Autoconf 2.69
bec39cab 1544
d0ac1c44 1545Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1546This configure script is free software; the Free Software Foundation
1547gives unlimited permission to copy, distribute and modify it.
1548_ACEOF
81ecdfbb 1549 exit
bec39cab 1550fi
bec39cab 1551
81ecdfbb
RW
1552## ------------------------ ##
1553## Autoconf initialization. ##
1554## ------------------------ ##
bec39cab 1555
81ecdfbb
RW
1556# ac_fn_c_try_compile LINENO
1557# --------------------------
1558# Try to compile conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_compile ()
bec39cab 1560{
81ecdfbb
RW
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 rm -f conftest.$ac_objext
1563 if { { ac_try="$ac_compile"
1564case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567esac
1568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569$as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_compile") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } && {
1579 test -z "$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 } && test -s conftest.$ac_objext; then :
1582 ac_retval=0
1583else
1584 $as_echo "$as_me: failed program was:" >&5
1585sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1586
81ecdfbb
RW
1587 ac_retval=1
1588fi
d0ac1c44
SM
1589 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1590 as_fn_set_status $ac_retval
bec39cab 1591
81ecdfbb 1592} # ac_fn_c_try_compile
bec39cab 1593
3bc3d82a
PA
1594# ac_fn_cxx_try_compile LINENO
1595# ----------------------------
1596# Try to compile conftest.$ac_ext, and return whether this succeeded.
1597ac_fn_cxx_try_compile ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 rm -f conftest.$ac_objext
1601 if { { ac_try="$ac_compile"
1602case "(($ac_try" in
1603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1604 *) ac_try_echo=$ac_try;;
1605esac
1606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1607$as_echo "$ac_try_echo"; } >&5
1608 (eval "$ac_compile") 2>conftest.err
1609 ac_status=$?
1610 if test -s conftest.err; then
1611 grep -v '^ *+' conftest.err >conftest.er1
1612 cat conftest.er1 >&5
1613 mv -f conftest.er1 conftest.err
1614 fi
1615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1616 test $ac_status = 0; } && {
1617 test -z "$ac_cxx_werror_flag" ||
1618 test ! -s conftest.err
1619 } && test -s conftest.$ac_objext; then :
1620 ac_retval=0
1621else
1622 $as_echo "$as_me: failed program was:" >&5
1623sed 's/^/| /' conftest.$ac_ext >&5
1624
1625 ac_retval=1
1626fi
d0ac1c44
SM
1627 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1628 as_fn_set_status $ac_retval
3bc3d82a
PA
1629
1630} # ac_fn_cxx_try_compile
1631
81ecdfbb
RW
1632# ac_fn_c_try_cpp LINENO
1633# ----------------------
1634# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1635ac_fn_c_try_cpp ()
1636{
1637 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1638 if { { ac_try="$ac_cpp conftest.$ac_ext"
1639case "(($ac_try" in
1640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1641 *) ac_try_echo=$ac_try;;
1642esac
1643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1644$as_echo "$ac_try_echo"; } >&5
1645 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1646 ac_status=$?
1647 if test -s conftest.err; then
1648 grep -v '^ *+' conftest.err >conftest.er1
1649 cat conftest.er1 >&5
1650 mv -f conftest.er1 conftest.err
1651 fi
1652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1653 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1654 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1655 test ! -s conftest.err
1656 }; then :
1657 ac_retval=0
1658else
1659 $as_echo "$as_me: failed program was:" >&5
1660sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1661
81ecdfbb
RW
1662 ac_retval=1
1663fi
d0ac1c44
SM
1664 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1665 as_fn_set_status $ac_retval
bec39cab 1666
81ecdfbb
RW
1667} # ac_fn_c_try_cpp
1668
1669# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1670# -------------------------------------------------------
1671# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1672# the include files in INCLUDES and setting the cache variable VAR
1673# accordingly.
1674ac_fn_c_check_header_mongrel ()
1675{
1676 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1677 if eval \${$3+:} false; then :
81ecdfbb
RW
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1679$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1680if eval \${$3+:} false; then :
81ecdfbb
RW
1681 $as_echo_n "(cached) " >&6
1682fi
1683eval ac_res=\$$3
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1685$as_echo "$ac_res" >&6; }
1686else
1687 # Is the header compilable?
1688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1689$as_echo_n "checking $2 usability... " >&6; }
1690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1691/* end confdefs.h. */
1692$4
1693#include <$2>
1694_ACEOF
1695if ac_fn_c_try_compile "$LINENO"; then :
1696 ac_header_compiler=yes
1697else
1698 ac_header_compiler=no
1699fi
1700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1702$as_echo "$ac_header_compiler" >&6; }
1703
1704# Is the header present?
1705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1706$as_echo_n "checking $2 presence... " >&6; }
1707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1708/* end confdefs.h. */
1709#include <$2>
1710_ACEOF
1711if ac_fn_c_try_cpp "$LINENO"; then :
1712 ac_header_preproc=yes
1713else
1714 ac_header_preproc=no
1715fi
d0ac1c44 1716rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1718$as_echo "$ac_header_preproc" >&6; }
1719
1720# So? What about this header?
1721case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1722 yes:no: )
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1724$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1727 ;;
1728 no:yes:* )
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1730$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1732$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1734$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1736$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1738$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1739 ;;
1740esac
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1742$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1743if eval \${$3+:} false; then :
81ecdfbb
RW
1744 $as_echo_n "(cached) " >&6
1745else
1746 eval "$3=\$ac_header_compiler"
1747fi
1748eval ac_res=\$$3
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1750$as_echo "$ac_res" >&6; }
1751fi
d0ac1c44 1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1753
1754} # ac_fn_c_check_header_mongrel
1755
1756# ac_fn_c_try_run LINENO
1757# ----------------------
1758# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1759# that executables *can* be run.
1760ac_fn_c_try_run ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 if { { ac_try="$ac_link"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_link") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1774 { { case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_try") 2>&5
1781 ac_status=$?
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; }; }; then :
1784 ac_retval=0
1785else
1786 $as_echo "$as_me: program exited with status $ac_status" >&5
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=$ac_status
1791fi
1792 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1793 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1794 as_fn_set_status $ac_retval
81ecdfbb
RW
1795
1796} # ac_fn_c_try_run
1797
1798# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1799# -------------------------------------------------------
1800# Tests whether HEADER exists and can be compiled using the include files in
1801# INCLUDES, setting the cache variable VAR accordingly.
1802ac_fn_c_check_header_compile ()
1803{
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1807if eval \${$3+:} false; then :
81ecdfbb
RW
1808 $as_echo_n "(cached) " >&6
1809else
1810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811/* end confdefs.h. */
1812$4
1813#include <$2>
1814_ACEOF
1815if ac_fn_c_try_compile "$LINENO"; then :
1816 eval "$3=yes"
1817else
1818 eval "$3=no"
1819fi
1820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1821fi
1822eval ac_res=\$$3
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824$as_echo "$ac_res" >&6; }
d0ac1c44 1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1826
1827} # ac_fn_c_check_header_compile
1828
eb0edac8
GB
1829# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1830# -------------------------------------------
1831# Tests whether TYPE exists after having included INCLUDES, setting cache
1832# variable VAR accordingly.
1833ac_fn_c_check_type ()
1834{
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1838if eval \${$3+:} false; then :
eb0edac8
GB
1839 $as_echo_n "(cached) " >&6
1840else
1841 eval "$3=no"
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845int
1846main ()
1847{
1848if (sizeof ($2))
1849 return 0;
1850 ;
1851 return 0;
1852}
1853_ACEOF
1854if ac_fn_c_try_compile "$LINENO"; then :
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858int
1859main ()
1860{
1861if (sizeof (($2)))
1862 return 0;
1863 ;
1864 return 0;
1865}
1866_ACEOF
1867if ac_fn_c_try_compile "$LINENO"; then :
1868
1869else
1870 eval "$3=yes"
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873fi
1874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
d0ac1c44 1879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
eb0edac8
GB
1880
1881} # ac_fn_c_check_type
1882
404f2902
FCE
1883# ac_fn_c_try_link LINENO
1884# -----------------------
1885# Try to link conftest.$ac_ext, and return whether this succeeded.
1886ac_fn_c_try_link ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 rm -f conftest.$ac_objext conftest$ac_exeext
1890 if { { ac_try="$ac_link"
1891case "(($ac_try" in
1892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893 *) ac_try_echo=$ac_try;;
1894esac
1895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896$as_echo "$ac_try_echo"; } >&5
1897 (eval "$ac_link") 2>conftest.err
1898 ac_status=$?
1899 if test -s conftest.err; then
1900 grep -v '^ *+' conftest.err >conftest.er1
1901 cat conftest.er1 >&5
1902 mv -f conftest.er1 conftest.err
1903 fi
1904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905 test $ac_status = 0; } && {
1906 test -z "$ac_c_werror_flag" ||
1907 test ! -s conftest.err
1908 } && test -s conftest$ac_exeext && {
1909 test "$cross_compiling" = yes ||
1910 test -x conftest$ac_exeext
1911 }; then :
1912 ac_retval=0
1913else
1914 $as_echo "$as_me: failed program was:" >&5
1915sed 's/^/| /' conftest.$ac_ext >&5
1916
1917 ac_retval=1
1918fi
1919 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1920 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1921 # interfere with the next link command; also delete a directory that is
1922 # left behind by Apple's compiler. We do this before executing the actions.
1923 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925 as_fn_set_status $ac_retval
1926
1927} # ac_fn_c_try_link
1928
81ecdfbb
RW
1929# ac_fn_c_check_func LINENO FUNC VAR
1930# ----------------------------------
1931# Tests whether FUNC exists, setting the cache variable VAR accordingly
1932ac_fn_c_check_func ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1937if eval \${$3+:} false; then :
81ecdfbb
RW
1938 $as_echo_n "(cached) " >&6
1939else
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h. */
1942/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1943 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1944#define $2 innocuous_$2
1945
1946/* System header to define __stub macros and hopefully few prototypes,
1947 which can conflict with char $2 (); below.
1948 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1949 <limits.h> exists even on freestanding compilers. */
1950
1951#ifdef __STDC__
1952# include <limits.h>
1953#else
1954# include <assert.h>
1955#endif
1956
1957#undef $2
1958
1959/* Override any GCC internal prototype to avoid an error.
1960 Use char because int might match the return type of a GCC
1961 builtin and then its argument prototype would still apply. */
1962#ifdef __cplusplus
1963extern "C"
1964#endif
1965char $2 ();
1966/* The GNU C library defines this for functions which it implements
1967 to always fail with ENOSYS. Some functions are actually named
1968 something starting with __ and the normal name is an alias. */
1969#if defined __stub_$2 || defined __stub___$2
1970choke me
1971#endif
1972
1973int
1974main ()
1975{
1976return $2 ();
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_link "$LINENO"; then :
1982 eval "$3=yes"
1983else
1984 eval "$3=no"
1985fi
1986rm -f core conftest.err conftest.$ac_objext \
1987 conftest$ac_exeext conftest.$ac_ext
1988fi
1989eval ac_res=\$$3
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
d0ac1c44 1992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
1993
1994} # ac_fn_c_check_func
1995
d0ac1c44
SM
1996# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1997# ---------------------------------------------
1998# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1999# accordingly.
81ecdfbb
RW
2000ac_fn_c_check_decl ()
2001{
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0fb4aa4b
PA
2003 as_decl_name=`echo $2|sed 's/ *(.*//'`
2004 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2006$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2007if eval \${$3+:} false; then :
81ecdfbb
RW
2008 $as_echo_n "(cached) " >&6
2009else
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
0fb4aa4b
PA
2016#ifndef $as_decl_name
2017#ifdef __cplusplus
2018 (void) $as_decl_use;
2019#else
2020 (void) $as_decl_name;
2021#endif
81ecdfbb
RW
2022#endif
2023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 eval "$3=yes"
2030else
2031 eval "$3=no"
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034fi
2035eval ac_res=\$$3
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2037$as_echo "$ac_res" >&6; }
d0ac1c44 2038 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
81ecdfbb
RW
2039
2040} # ac_fn_c_check_decl
2041
05ea2a05
TT
2042# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2043# ----------------------------------------------------
2044# Tries to find if the field MEMBER exists in type AGGR, after including
2045# INCLUDES, setting cache variable VAR accordingly.
2046ac_fn_c_check_member ()
2047{
2048 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2050$as_echo_n "checking for $2.$3... " >&6; }
2051if eval \${$4+:} false; then :
2052 $as_echo_n "(cached) " >&6
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$5
2057int
2058main ()
2059{
2060static $2 ac_aggr;
2061if (ac_aggr.$3)
2062return 0;
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 eval "$4=yes"
2069else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$5
2073int
2074main ()
2075{
2076static $2 ac_aggr;
2077if (sizeof ac_aggr.$3)
2078return 0;
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 eval "$4=yes"
2085else
2086 eval "$4=no"
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092eval ac_res=\$$4
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2094$as_echo "$ac_res" >&6; }
2095 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096
2097} # ac_fn_c_check_member
2098
21987b9c
TT
2099# ac_fn_cxx_try_link LINENO
2100# -------------------------
2101# Try to link conftest.$ac_ext, and return whether this succeeded.
2102ac_fn_cxx_try_link ()
2103{
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 rm -f conftest.$ac_objext conftest$ac_exeext
2106 if { { ac_try="$ac_link"
2107case "(($ac_try" in
2108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2109 *) ac_try_echo=$ac_try;;
2110esac
2111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2112$as_echo "$ac_try_echo"; } >&5
2113 (eval "$ac_link") 2>conftest.err
2114 ac_status=$?
2115 if test -s conftest.err; then
2116 grep -v '^ *+' conftest.err >conftest.er1
2117 cat conftest.er1 >&5
2118 mv -f conftest.er1 conftest.err
2119 fi
2120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2121 test $ac_status = 0; } && {
2122 test -z "$ac_cxx_werror_flag" ||
2123 test ! -s conftest.err
2124 } && test -s conftest$ac_exeext && {
2125 test "$cross_compiling" = yes ||
2126 test -x conftest$ac_exeext
2127 }; then :
2128 ac_retval=0
2129else
2130 $as_echo "$as_me: failed program was:" >&5
2131sed 's/^/| /' conftest.$ac_ext >&5
2132
2133 ac_retval=1
2134fi
2135 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2136 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2137 # interfere with the next link command; also delete a directory that is
2138 # left behind by Apple's compiler. We do this before executing the actions.
2139 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2140 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141 as_fn_set_status $ac_retval
2142
2143} # ac_fn_cxx_try_link
2144
2145# ac_fn_cxx_check_func LINENO FUNC VAR
2146# ------------------------------------
2147# Tests whether FUNC exists, setting the cache variable VAR accordingly
2148ac_fn_cxx_check_func ()
2149{
2150 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2152$as_echo_n "checking for $2... " >&6; }
2153if eval \${$3+:} false; then :
2154 $as_echo_n "(cached) " >&6
2155else
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2159 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2160#define $2 innocuous_$2
2161
2162/* System header to define __stub macros and hopefully few prototypes,
2163 which can conflict with char $2 (); below.
2164 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2165 <limits.h> exists even on freestanding compilers. */
2166
2167#ifdef __STDC__
2168# include <limits.h>
2169#else
2170# include <assert.h>
2171#endif
2172
2173#undef $2
2174
2175/* Override any GCC internal prototype to avoid an error.
2176 Use char because int might match the return type of a GCC
2177 builtin and then its argument prototype would still apply. */
2178#ifdef __cplusplus
2179extern "C"
2180#endif
2181char $2 ();
2182/* The GNU C library defines this for functions which it implements
2183 to always fail with ENOSYS. Some functions are actually named
2184 something starting with __ and the normal name is an alias. */
2185#if defined __stub_$2 || defined __stub___$2
2186choke me
2187#endif
2188
2189int
2190main ()
2191{
2192return $2 ();
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_cxx_try_link "$LINENO"; then :
2198 eval "$3=yes"
2199else
2200 eval "$3=no"
2201fi
2202rm -f core conftest.err conftest.$ac_objext \
2203 conftest$ac_exeext conftest.$ac_ext
2204fi
2205eval ac_res=\$$3
2206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2207$as_echo "$ac_res" >&6; }
2208 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2209
2210} # ac_fn_cxx_check_func
2211
07697489
PA
2212# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2213# --------------------------------------------
2214# Tries to find the compile-time value of EXPR in a program that includes
2215# INCLUDES, setting VAR accordingly. Returns whether the value could be
2216# computed
2217ac_fn_c_compute_int ()
2218{
2219 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220 if test "$cross_compiling" = yes; then
2221 # Depending upon the size, compute the lo and hi bounds.
2222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h. */
2224$4
2225int
2226main ()
2227{
2228static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2229test_array [0] = 0;
2230return test_array [0];
07697489
PA
2231
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_compile "$LINENO"; then :
2237 ac_lo=0 ac_mid=0
2238 while :; do
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242int
2243main ()
2244{
2245static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2246test_array [0] = 0;
2247return test_array [0];
07697489
PA
2248
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253if ac_fn_c_try_compile "$LINENO"; then :
2254 ac_hi=$ac_mid; break
2255else
2256 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2257 if test $ac_lo -le $ac_mid; then
2258 ac_lo= ac_hi=
2259 break
2260 fi
2261 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264 done
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$4
2269int
2270main ()
2271{
2272static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2273test_array [0] = 0;
2274return test_array [0];
07697489
PA
2275
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 ac_hi=-1 ac_mid=-1
2282 while :; do
2283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h. */
2285$4
2286int
2287main ()
2288{
2289static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2290test_array [0] = 0;
2291return test_array [0];
07697489
PA
2292
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 ac_lo=$ac_mid; break
2299else
2300 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2301 if test $ac_mid -le $ac_hi; then
2302 ac_lo= ac_hi=
2303 break
2304 fi
2305 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308 done
2309else
2310 ac_lo= ac_hi=
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315# Binary search between lo and hi bounds.
2316while test "x$ac_lo" != "x$ac_hi"; do
2317 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
2324static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2325test_array [0] = 0;
2326return test_array [0];
07697489
PA
2327
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 ac_hi=$ac_mid
2334else
2335 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338done
2339case $ac_lo in #((
2340?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2341'') ac_retval=1 ;;
2342esac
2343 else
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345/* end confdefs.h. */
2346$4
2347static long int longval () { return $2; }
2348static unsigned long int ulongval () { return $2; }
2349#include <stdio.h>
2350#include <stdlib.h>
2351int
2352main ()
2353{
2354
2355 FILE *f = fopen ("conftest.val", "w");
2356 if (! f)
2357 return 1;
2358 if (($2) < 0)
2359 {
2360 long int i = longval ();
2361 if (i != ($2))
2362 return 1;
2363 fprintf (f, "%ld", i);
2364 }
2365 else
2366 {
2367 unsigned long int i = ulongval ();
2368 if (i != ($2))
2369 return 1;
2370 fprintf (f, "%lu", i);
2371 }
2372 /* Do not output a trailing newline, as this causes \r\n confusion
2373 on some platforms. */
2374 return ferror (f) || fclose (f) != 0;
2375
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380if ac_fn_c_try_run "$LINENO"; then :
2381 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2382else
2383 ac_retval=1
2384fi
2385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2386 conftest.$ac_objext conftest.beam conftest.$ac_ext
2387rm -f conftest.val
2388
2389 fi
d0ac1c44
SM
2390 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2391 as_fn_set_status $ac_retval
07697489
PA
2392
2393} # ac_fn_c_compute_int
81ecdfbb
RW
2394cat >config.log <<_ACEOF
2395This file contains any messages produced by compilers while
2396running configure, to aid debugging if configure makes a mistake.
2397
2398It was created by $as_me, which was
d0ac1c44 2399generated by GNU Autoconf 2.69. Invocation command line was
81ecdfbb
RW
2400
2401 $ $0 $@
2402
2403_ACEOF
2404exec 5>>config.log
2405{
2406cat <<_ASUNAME
2407## --------- ##
2408## Platform. ##
2409## --------- ##
2410
2411hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2412uname -m = `(uname -m) 2>/dev/null || echo unknown`
2413uname -r = `(uname -r) 2>/dev/null || echo unknown`
2414uname -s = `(uname -s) 2>/dev/null || echo unknown`
2415uname -v = `(uname -v) 2>/dev/null || echo unknown`
2416
2417/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2418/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2419
2420/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2421/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2422/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2423/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2424/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2425/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2426/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2427
2428_ASUNAME
2429
2430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 $as_echo "PATH: $as_dir"
2436 done
2437IFS=$as_save_IFS
2438
2439} >&5
2440
2441cat >&5 <<_ACEOF
2442
2443
2444## ----------- ##
2445## Core tests. ##
2446## ----------- ##
bec39cab
AC
2447
2448_ACEOF
2449
2450
2451# Keep a trace of the command line.
2452# Strip out --no-create and --no-recursion so they do not pile up.
2453# Strip out --silent because we don't want to record it for future runs.
2454# Also quote any args containing shell meta-characters.
2455# Make two passes to allow for proper duplicate-argument suppression.
2456ac_configure_args=
2457ac_configure_args0=
2458ac_configure_args1=
bec39cab
AC
2459ac_must_keep_next=false
2460for ac_pass in 1 2
2461do
2462 for ac_arg
2463 do
2464 case $ac_arg in
2465 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2466 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2467 | -silent | --silent | --silen | --sile | --sil)
2468 continue ;;
81ecdfbb
RW
2469 *\'*)
2470 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2471 esac
2472 case $ac_pass in
81ecdfbb 2473 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
bec39cab 2474 2)
81ecdfbb 2475 as_fn_append ac_configure_args1 " '$ac_arg'"
bec39cab
AC
2476 if test $ac_must_keep_next = true; then
2477 ac_must_keep_next=false # Got value, back to normal.
2478 else
2479 case $ac_arg in
2480 *=* | --config-cache | -C | -disable-* | --disable-* \
2481 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2482 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2483 | -with-* | --with-* | -without-* | --without-* | --x)
2484 case "$ac_configure_args0 " in
2485 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2486 esac
2487 ;;
2488 -* ) ac_must_keep_next=true ;;
2489 esac
2490 fi
81ecdfbb 2491 as_fn_append ac_configure_args " '$ac_arg'"
bec39cab
AC
2492 ;;
2493 esac
2494 done
2495done
81ecdfbb
RW
2496{ ac_configure_args0=; unset ac_configure_args0;}
2497{ ac_configure_args1=; unset ac_configure_args1;}
bec39cab
AC
2498
2499# When interrupted or exit'd, cleanup temporary files, and complete
2500# config.log. We remove comments because anyway the quotes in there
2501# would cause problems or look ugly.
81ecdfbb
RW
2502# WARNING: Use '\'' to represent an apostrophe within the trap.
2503# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
bec39cab
AC
2504trap 'exit_status=$?
2505 # Save into config.log some information that might help in debugging.
2506 {
2507 echo
2508
d0ac1c44 2509 $as_echo "## ---------------- ##
bec39cab 2510## Cache variables. ##
d0ac1c44 2511## ---------------- ##"
bec39cab
AC
2512 echo
2513 # The following way of writing the cache mishandles newlines in values,
81ecdfbb
RW
2514(
2515 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2516 eval ac_val=\$$ac_var
2517 case $ac_val in #(
2518 *${as_nl}*)
2519 case $ac_var in #(
2520 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2521$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2522 esac
2523 case $ac_var in #(
2524 _ | IFS | as_nl) ;; #(
2525 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2526 *) { eval $ac_var=; unset $ac_var;} ;;
2527 esac ;;
2528 esac
2529 done
bec39cab 2530 (set) 2>&1 |
81ecdfbb
RW
2531 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2532 *${as_nl}ac_space=\ *)
bec39cab 2533 sed -n \
81ecdfbb
RW
2534 "s/'\''/'\''\\\\'\'''\''/g;
2535 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2536 ;; #(
bec39cab 2537 *)
81ecdfbb 2538 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 2539 ;;
81ecdfbb
RW
2540 esac |
2541 sort
2542)
bec39cab
AC
2543 echo
2544
d0ac1c44 2545 $as_echo "## ----------------- ##
bec39cab 2546## Output variables. ##
d0ac1c44 2547## ----------------- ##"
bec39cab
AC
2548 echo
2549 for ac_var in $ac_subst_vars
2550 do
81ecdfbb
RW
2551 eval ac_val=\$$ac_var
2552 case $ac_val in
2553 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2554 esac
2555 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2556 done | sort
2557 echo
2558
2559 if test -n "$ac_subst_files"; then
d0ac1c44 2560 $as_echo "## ------------------- ##
81ecdfbb 2561## File substitutions. ##
d0ac1c44 2562## ------------------- ##"
bec39cab
AC
2563 echo
2564 for ac_var in $ac_subst_files
2565 do
81ecdfbb
RW
2566 eval ac_val=\$$ac_var
2567 case $ac_val in
2568 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2569 esac
2570 $as_echo "$ac_var='\''$ac_val'\''"
bec39cab
AC
2571 done | sort
2572 echo
434c4c77 2573 fi
bec39cab
AC
2574
2575 if test -s confdefs.h; then
d0ac1c44 2576 $as_echo "## ----------- ##
bec39cab 2577## confdefs.h. ##
d0ac1c44 2578## ----------- ##"
bec39cab 2579 echo
81ecdfbb 2580 cat confdefs.h
bec39cab
AC
2581 echo
2582 fi
2583 test "$ac_signal" != 0 &&
81ecdfbb
RW
2584 $as_echo "$as_me: caught signal $ac_signal"
2585 $as_echo "$as_me: exit $exit_status"
bec39cab 2586 } >&5
81ecdfbb
RW
2587 rm -f core *.core core.conftest.* &&
2588 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 2589 exit $exit_status
81ecdfbb 2590' 0
bec39cab 2591for ac_signal in 1 2 13 15; do
81ecdfbb 2592 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
bec39cab
AC
2593done
2594ac_signal=0
2595
2596# confdefs.h avoids OS command line length limits that DEFS can exceed.
81ecdfbb
RW
2597rm -f -r conftest* confdefs.h
2598
2599$as_echo "/* confdefs.h */" > confdefs.h
bec39cab
AC
2600
2601# Predefined preprocessor variables.
2602
2603cat >>confdefs.h <<_ACEOF
2604#define PACKAGE_NAME "$PACKAGE_NAME"
2605_ACEOF
2606
bec39cab
AC
2607cat >>confdefs.h <<_ACEOF
2608#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2609_ACEOF
2610
bec39cab
AC
2611cat >>confdefs.h <<_ACEOF
2612#define PACKAGE_VERSION "$PACKAGE_VERSION"
2613_ACEOF
2614
bec39cab
AC
2615cat >>confdefs.h <<_ACEOF
2616#define PACKAGE_STRING "$PACKAGE_STRING"
2617_ACEOF
2618
bec39cab
AC
2619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2621_ACEOF
2622
81ecdfbb
RW
2623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_URL "$PACKAGE_URL"
2625_ACEOF
2626
bec39cab
AC
2627
2628# Let the site file select an alternate cache file if it wants to.
81ecdfbb
RW
2629# Prefer an explicitly selected file to automatically selected ones.
2630ac_site_file1=NONE
2631ac_site_file2=NONE
2632if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2633 # We do not want a PATH search for config.site.
2634 case $CONFIG_SITE in #((
2635 -*) ac_site_file1=./$CONFIG_SITE;;
2636 */*) ac_site_file1=$CONFIG_SITE;;
2637 *) ac_site_file1=./$CONFIG_SITE;;
2638 esac
81ecdfbb
RW
2639elif test "x$prefix" != xNONE; then
2640 ac_site_file1=$prefix/share/config.site
2641 ac_site_file2=$prefix/etc/config.site
2642else
2643 ac_site_file1=$ac_default_prefix/share/config.site
2644 ac_site_file2=$ac_default_prefix/etc/config.site
d6e9fb05 2645fi
81ecdfbb
RW
2646for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2647do
2648 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2649 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2651$as_echo "$as_me: loading site script $ac_site_file" >&6;}
bec39cab 2652 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2653 . "$ac_site_file" \
2654 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2656as_fn_error $? "failed to load site script $ac_site_file
2657See \`config.log' for more details" "$LINENO" 5; }
d6e9fb05
JK
2658 fi
2659done
2660
2661if test -r "$cache_file"; then
d0ac1c44
SM
2662 # Some versions of bash will fail to source /dev/null (special files
2663 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2664 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2666$as_echo "$as_me: loading cache $cache_file" >&6;}
bec39cab 2667 case $cache_file in
81ecdfbb
RW
2668 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2669 *) . "./$cache_file";;
bec39cab
AC
2670 esac
2671 fi
d6e9fb05 2672else
81ecdfbb
RW
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2674$as_echo "$as_me: creating cache $cache_file" >&6;}
bec39cab 2675 >$cache_file
d6e9fb05
JK
2676fi
2677
05ea2a05
TT
2678as_fn_append ac_header_list " stdlib.h"
2679as_fn_append ac_header_list " unistd.h"
2680as_fn_append ac_header_list " sys/param.h"
9e11e746 2681gt_needs="$gt_needs "
bec39cab
AC
2682# Check that the precious variables saved in the cache have kept the same
2683# value.
2684ac_cache_corrupted=false
81ecdfbb 2685for ac_var in $ac_precious_vars; do
bec39cab
AC
2686 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2687 eval ac_new_set=\$ac_env_${ac_var}_set
81ecdfbb
RW
2688 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2689 eval ac_new_val=\$ac_env_${ac_var}_value
bec39cab
AC
2690 case $ac_old_set,$ac_new_set in
2691 set,)
81ecdfbb
RW
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2693$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
bec39cab
AC
2694 ac_cache_corrupted=: ;;
2695 ,set)
81ecdfbb
RW
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2697$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
bec39cab
AC
2698 ac_cache_corrupted=: ;;
2699 ,);;
2700 *)
2701 if test "x$ac_old_val" != "x$ac_new_val"; then
81ecdfbb
RW
2702 # differences in whitespace do not lead to failure.
2703 ac_old_val_w=`echo x $ac_old_val`
2704 ac_new_val_w=`echo x $ac_new_val`
2705 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2707$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2708 ac_cache_corrupted=:
2709 else
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2711$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2712 eval $ac_var=\$ac_old_val
2713 fi
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2715$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2717$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
2718 fi;;
2719 esac
2720 # Pass precious variables to config.status.
2721 if test "$ac_new_set" = set; then
2722 case $ac_new_val in
81ecdfbb 2723 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
2724 *) ac_arg=$ac_var=$ac_new_val ;;
2725 esac
2726 case " $ac_configure_args " in
2727 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
81ecdfbb 2728 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
bec39cab 2729 esac
d6e9fb05 2730 fi
bec39cab
AC
2731done
2732if $ac_cache_corrupted; then
81ecdfbb
RW
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2736$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2737 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
d6e9fb05 2738fi
81ecdfbb
RW
2739## -------------------- ##
2740## Main body of script. ##
2741## -------------------- ##
d6e9fb05 2742
dae5f5cf
DJ
2743ac_ext=c
2744ac_cpp='$CPP $CPPFLAGS'
2745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2747ac_compiler_gnu=$ac_cv_c_compiler_gnu
2748
d6e9fb05 2749
84563040 2750
bec39cab
AC
2751
2752
7e8c7130 2753
7e3941ac 2754
81ecdfbb 2755ac_config_headers="$ac_config_headers config.h:config.in"
bec39cab
AC
2756
2757
e28b3332 2758
c9a1864a
YQ
2759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2760$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2761 # Check whether --enable-maintainer-mode was given.
2762if test "${enable_maintainer_mode+set}" = set; then :
2763 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2764else
2765 USE_MAINTAINER_MODE=no
2766fi
2767
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2769$as_echo "$USE_MAINTAINER_MODE" >&6; }
2770 if test $USE_MAINTAINER_MODE = yes; then
2771 MAINTAINER_MODE_TRUE=
2772 MAINTAINER_MODE_FALSE='#'
2773else
2774 MAINTAINER_MODE_TRUE='#'
2775 MAINTAINER_MODE_FALSE=
2776fi
2777
2778 MAINT=$MAINTAINER_MODE_TRUE
2779
2780
2781
bec39cab
AC
2782ac_ext=c
2783ac_cpp='$CPP $CPPFLAGS'
2784ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2785ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2786ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787if test -n "$ac_tool_prefix"; then
2788 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2789set dummy ${ac_tool_prefix}gcc; ac_word=$2
81ecdfbb
RW
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2792if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2793 $as_echo_n "(cached) " >&6
84563040
DJ
2794else
2795 if test -n "$CC"; then
2796 ac_cv_prog_CC="$CC" # Let the user override the test.
2797else
bec39cab
AC
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
2800do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
81ecdfbb 2803 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2805 ac_cv_prog_CC="${ac_tool_prefix}gcc"
81ecdfbb 2806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2807 break 2
2808 fi
2809done
81ecdfbb
RW
2810 done
2811IFS=$as_save_IFS
bec39cab 2812
84563040
DJ
2813fi
2814fi
bec39cab 2815CC=$ac_cv_prog_CC
84563040 2816if test -n "$CC"; then
81ecdfbb
RW
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2818$as_echo "$CC" >&6; }
84563040 2819else
81ecdfbb
RW
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821$as_echo "no" >&6; }
84563040
DJ
2822fi
2823
81ecdfbb 2824
bec39cab
AC
2825fi
2826if test -z "$ac_cv_prog_CC"; then
2827 ac_ct_CC=$CC
2828 # Extract the first word of "gcc", so it can be a program name with args.
2829set dummy gcc; ac_word=$2
81ecdfbb
RW
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2831$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2832if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2833 $as_echo_n "(cached) " >&6
84563040 2834else
bec39cab
AC
2835 if test -n "$ac_ct_CC"; then
2836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
84563040 2837else
bec39cab
AC
2838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2839for as_dir in $PATH
2840do
2841 IFS=$as_save_IFS
2842 test -z "$as_dir" && as_dir=.
81ecdfbb 2843 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2845 ac_cv_prog_ac_ct_CC="gcc"
81ecdfbb 2846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2847 break 2
2848 fi
2849done
81ecdfbb
RW
2850 done
2851IFS=$as_save_IFS
bec39cab
AC
2852
2853fi
2854fi
2855ac_ct_CC=$ac_cv_prog_ac_ct_CC
2856if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2858$as_echo "$ac_ct_CC" >&6; }
bec39cab 2859else
81ecdfbb
RW
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2861$as_echo "no" >&6; }
bec39cab
AC
2862fi
2863
81ecdfbb
RW
2864 if test "x$ac_ct_CC" = x; then
2865 CC=""
2866 else
2867 case $cross_compiling:$ac_tool_warned in
2868yes:)
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2871ac_tool_warned=yes ;;
2872esac
2873 CC=$ac_ct_CC
2874 fi
bec39cab
AC
2875else
2876 CC="$ac_cv_prog_CC"
2877fi
2878
2879if test -z "$CC"; then
81ecdfbb
RW
2880 if test -n "$ac_tool_prefix"; then
2881 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 2882set dummy ${ac_tool_prefix}cc; ac_word=$2
81ecdfbb
RW
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2885if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2886 $as_echo_n "(cached) " >&6
bec39cab
AC
2887else
2888 if test -n "$CC"; then
2889 ac_cv_prog_CC="$CC" # Let the user override the test.
2890else
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
81ecdfbb 2896 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2898 ac_cv_prog_CC="${ac_tool_prefix}cc"
81ecdfbb 2899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2900 break 2
2901 fi
2902done
81ecdfbb
RW
2903 done
2904IFS=$as_save_IFS
bec39cab
AC
2905
2906fi
2907fi
2908CC=$ac_cv_prog_CC
2909if test -n "$CC"; then
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911$as_echo "$CC" >&6; }
bec39cab 2912else
81ecdfbb
RW
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
bec39cab
AC
2915fi
2916
81ecdfbb
RW
2917
2918 fi
dae5f5cf 2919fi
81ecdfbb 2920if test -z "$CC"; then
dae5f5cf
DJ
2921 # Extract the first word of "cc", so it can be a program name with args.
2922set dummy cc; ac_word=$2
81ecdfbb
RW
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2925if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2926 $as_echo_n "(cached) " >&6
dae5f5cf 2927else
81ecdfbb
RW
2928 if test -n "$CC"; then
2929 ac_cv_prog_CC="$CC" # Let the user override the test.
dae5f5cf 2930else
81ecdfbb 2931 ac_prog_rejected=no
dae5f5cf
DJ
2932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933for as_dir in $PATH
2934do
2935 IFS=$as_save_IFS
2936 test -z "$as_dir" && as_dir=.
81ecdfbb 2937 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2939 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2940 ac_prog_rejected=yes
2941 continue
2942 fi
2943 ac_cv_prog_CC="cc"
2944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
dae5f5cf 2945 break 2
b80864fb 2946 fi
dae5f5cf 2947done
81ecdfbb
RW
2948 done
2949IFS=$as_save_IFS
bec39cab 2950
84563040
DJ
2951if test $ac_prog_rejected = yes; then
2952 # We found a bogon in the path, so make sure we never use it.
2953 set dummy $ac_cv_prog_CC
2954 shift
bec39cab 2955 if test $# != 0; then
84563040
DJ
2956 # We chose a different compiler from the bogus one.
2957 # However, it has the same basename, so the bogon will be chosen
2958 # first if we set CC to just the basename; use the full file name.
2959 shift
bec39cab 2960 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
84563040
DJ
2961 fi
2962fi
2963fi
2964fi
bec39cab 2965CC=$ac_cv_prog_CC
84563040 2966if test -n "$CC"; then
81ecdfbb
RW
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2968$as_echo "$CC" >&6; }
84563040 2969else
81ecdfbb
RW
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2971$as_echo "no" >&6; }
84563040
DJ
2972fi
2973
81ecdfbb 2974
bec39cab
AC
2975fi
2976if test -z "$CC"; then
2977 if test -n "$ac_tool_prefix"; then
81ecdfbb 2978 for ac_prog in cl.exe
bec39cab
AC
2979 do
2980 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2981set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2983$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2984if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2985 $as_echo_n "(cached) " >&6
84563040
DJ
2986else
2987 if test -n "$CC"; then
2988 ac_cv_prog_CC="$CC" # Let the user override the test.
2989else
bec39cab
AC
2990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991for as_dir in $PATH
2992do
2993 IFS=$as_save_IFS
2994 test -z "$as_dir" && as_dir=.
81ecdfbb 2995 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 2997 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2999 break 2
3000 fi
3001done
81ecdfbb
RW
3002 done
3003IFS=$as_save_IFS
bec39cab 3004
84563040
DJ
3005fi
3006fi
bec39cab 3007CC=$ac_cv_prog_CC
84563040 3008if test -n "$CC"; then
81ecdfbb
RW
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3010$as_echo "$CC" >&6; }
84563040 3011else
81ecdfbb
RW
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3013$as_echo "no" >&6; }
84563040 3014fi
bec39cab 3015
81ecdfbb 3016
bec39cab
AC
3017 test -n "$CC" && break
3018 done
3019fi
3020if test -z "$CC"; then
3021 ac_ct_CC=$CC
81ecdfbb 3022 for ac_prog in cl.exe
bec39cab
AC
3023do
3024 # Extract the first word of "$ac_prog", so it can be a program name with args.
3025set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3027$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3028if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3029 $as_echo_n "(cached) " >&6
bec39cab
AC
3030else
3031 if test -n "$ac_ct_CC"; then
3032 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3033else
3034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3035for as_dir in $PATH
3036do
3037 IFS=$as_save_IFS
3038 test -z "$as_dir" && as_dir=.
81ecdfbb 3039 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3041 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3043 break 2
84563040 3044 fi
bec39cab 3045done
81ecdfbb
RW
3046 done
3047IFS=$as_save_IFS
bec39cab
AC
3048
3049fi
3050fi
3051ac_ct_CC=$ac_cv_prog_ac_ct_CC
3052if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3054$as_echo "$ac_ct_CC" >&6; }
bec39cab 3055else
81ecdfbb
RW
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3057$as_echo "no" >&6; }
84563040
DJ
3058fi
3059
81ecdfbb 3060
bec39cab
AC
3061 test -n "$ac_ct_CC" && break
3062done
84563040 3063
81ecdfbb
RW
3064 if test "x$ac_ct_CC" = x; then
3065 CC=""
3066 else
3067 case $cross_compiling:$ac_tool_warned in
3068yes:)
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3071ac_tool_warned=yes ;;
3072esac
3073 CC=$ac_ct_CC
3074 fi
bec39cab
AC
3075fi
3076
3077fi
3078
3079
81ecdfbb
RW
3080test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3082as_fn_error $? "no acceptable C compiler found in \$PATH
3083See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3084
3085# Provide some information about the compiler.
81ecdfbb
RW
3086$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3087set X $ac_compile
3088ac_compiler=$2
3089for ac_option in --version -v -V -qversion; do
3090 { { ac_try="$ac_compiler $ac_option >&5"
3091case "(($ac_try" in
3092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3093 *) ac_try_echo=$ac_try;;
3094esac
3095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3096$as_echo "$ac_try_echo"; } >&5
3097 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3098 ac_status=$?
81ecdfbb
RW
3099 if test -s conftest.err; then
3100 sed '10a\
3101... rest of stderr output deleted ...
3102 10q' conftest.err >conftest.er1
3103 cat conftest.er1 >&5
81ecdfbb 3104 fi
d0ac1c44 3105 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3107 test $ac_status = 0; }
3108done
bec39cab 3109
81ecdfbb 3110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3111/* end confdefs.h. */
3112
3113int
3114main ()
3115{
3116
3117 ;
3118 return 0;
3119}
3120_ACEOF
3121ac_clean_files_save=$ac_clean_files
d0ac1c44 3122ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3123# Try to create an executable without -o first, disregard a.out.
3124# It will help us diagnose broken compilers, and finding out an intuition
3125# of exeext.
d0ac1c44
SM
3126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3127$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3128ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3129
3130# The possible output files:
3131ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3132
3133ac_rmfiles=
3134for ac_file in $ac_files
3135do
3136 case $ac_file in
3137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3138 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3139 esac
3140done
3141rm -f $ac_rmfiles
3142
3143if { { ac_try="$ac_link_default"
3144case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
3148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3149$as_echo "$ac_try_echo"; } >&5
3150 (eval "$ac_link_default") 2>&5
bec39cab 3151 ac_status=$?
81ecdfbb
RW
3152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3153 test $ac_status = 0; }; then :
3154 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3155# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3156# in a Makefile. We should not override ac_cv_exeext if it was cached,
3157# so that the user can short-circuit this test for compilers unknown to
3158# Autoconf.
3159for ac_file in $ac_files ''
bec39cab
AC
3160do
3161 test -f "$ac_file" || continue
3162 case $ac_file in
81ecdfbb 3163 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
bec39cab
AC
3164 ;;
3165 [ab].out )
3166 # We found the default executable, but exeext='' is most
3167 # certainly right.
3168 break;;
3169 *.* )
81ecdfbb
RW
3170 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3171 then :; else
3172 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3173 fi
3174 # We set ac_cv_exeext here because the later test for it is not
3175 # safe: cross compilers may not add the suffix if given an `-o'
3176 # argument, so we may need to know it at that point already.
3177 # Even if this section looks crufty: it has the advantage of
3178 # actually working.
bec39cab
AC
3179 break;;
3180 * )
3181 break;;
3182 esac
3183done
81ecdfbb
RW
3184test "$ac_cv_exeext" = no && ac_cv_exeext=
3185
bec39cab 3186else
81ecdfbb
RW
3187 ac_file=''
3188fi
81ecdfbb 3189if test -z "$ac_file"; then :
d0ac1c44
SM
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3191$as_echo "no" >&6; }
3192$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3193sed 's/^/| /' conftest.$ac_ext >&5
3194
81ecdfbb
RW
3195{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3197as_fn_error 77 "C compiler cannot create executables
3198See \`config.log' for more details" "$LINENO" 5; }
3199else
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3201$as_echo "yes" >&6; }
bec39cab 3202fi
d0ac1c44
SM
3203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3204$as_echo_n "checking for C compiler default output file name... " >&6; }
3205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3206$as_echo "$ac_file" >&6; }
bec39cab 3207ac_exeext=$ac_cv_exeext
bec39cab 3208
d0ac1c44 3209rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
bec39cab 3210ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3212$as_echo_n "checking for suffix of executables... " >&6; }
3213if { { ac_try="$ac_link"
3214case "(($ac_try" in
3215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216 *) ac_try_echo=$ac_try;;
3217esac
3218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3219$as_echo "$ac_try_echo"; } >&5
3220 (eval "$ac_link") 2>&5
bec39cab 3221 ac_status=$?
81ecdfbb
RW
3222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3223 test $ac_status = 0; }; then :
bec39cab
AC
3224 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3225# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3226# work properly (i.e., refer to `conftest.exe'), while it won't with
3227# `rm'.
3228for ac_file in conftest.exe conftest conftest.*; do
3229 test -f "$ac_file" || continue
3230 case $ac_file in
81ecdfbb 3231 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
bec39cab 3232 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
bec39cab
AC
3233 break;;
3234 * ) break;;
3235 esac
3236done
84563040 3237else
81ecdfbb
RW
3238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3240as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3241See \`config.log' for more details" "$LINENO" 5; }
84563040 3242fi
d0ac1c44 3243rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3245$as_echo "$ac_cv_exeext" >&6; }
bec39cab
AC
3246
3247rm -f conftest.$ac_ext
3248EXEEXT=$ac_cv_exeext
3249ac_exeext=$EXEEXT
d0ac1c44
SM
3250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3251/* end confdefs.h. */
3252#include <stdio.h>
3253int
3254main ()
3255{
3256FILE *f = fopen ("conftest.out", "w");
3257 return ferror (f) || fclose (f) != 0;
3258
3259 ;
3260 return 0;
3261}
3262_ACEOF
3263ac_clean_files="$ac_clean_files conftest.out"
3264# Check that the compiler produces executables we can run. If not, either
3265# the compiler is broken, or we cross compile.
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3267$as_echo_n "checking whether we are cross compiling... " >&6; }
3268if test "$cross_compiling" != yes; then
3269 { { ac_try="$ac_link"
3270case "(($ac_try" in
3271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3272 *) ac_try_echo=$ac_try;;
3273esac
3274eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3275$as_echo "$ac_try_echo"; } >&5
3276 (eval "$ac_link") 2>&5
3277 ac_status=$?
3278 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3279 test $ac_status = 0; }
3280 if { ac_try='./conftest$ac_cv_exeext'
3281 { { case "(($ac_try" in
3282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3283 *) ac_try_echo=$ac_try;;
3284esac
3285eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3286$as_echo "$ac_try_echo"; } >&5
3287 (eval "$ac_try") 2>&5
3288 ac_status=$?
3289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3290 test $ac_status = 0; }; }; then
3291 cross_compiling=no
3292 else
3293 if test "$cross_compiling" = maybe; then
3294 cross_compiling=yes
3295 else
3296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3298as_fn_error $? "cannot run C compiled programs.
3299If you meant to cross compile, use \`--host'.
3300See \`config.log' for more details" "$LINENO" 5; }
3301 fi
3302 fi
3303fi
3304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3305$as_echo "$cross_compiling" >&6; }
3306
3307rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3308ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3310$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3311if ${ac_cv_objext+:} false; then :
81ecdfbb 3312 $as_echo_n "(cached) " >&6
bec39cab 3313else
81ecdfbb 3314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3315/* end confdefs.h. */
3316
3317int
3318main ()
3319{
3320
3321 ;
3322 return 0;
3323}
3324_ACEOF
3325rm -f conftest.o conftest.obj
81ecdfbb
RW
3326if { { ac_try="$ac_compile"
3327case "(($ac_try" in
3328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3329 *) ac_try_echo=$ac_try;;
3330esac
3331eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3332$as_echo "$ac_try_echo"; } >&5
3333 (eval "$ac_compile") 2>&5
bec39cab 3334 ac_status=$?
81ecdfbb
RW
3335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3336 test $ac_status = 0; }; then :
3337 for ac_file in conftest.o conftest.obj conftest.*; do
3338 test -f "$ac_file" || continue;
bec39cab 3339 case $ac_file in
81ecdfbb 3340 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3341 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3342 break;;
3343 esac
3344done
3345else
81ecdfbb 3346 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3347sed 's/^/| /' conftest.$ac_ext >&5
3348
81ecdfbb
RW
3349{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3351as_fn_error $? "cannot compute suffix of object files: cannot compile
3352See \`config.log' for more details" "$LINENO" 5; }
84563040 3353fi
bec39cab
AC
3354rm -f conftest.$ac_cv_objext conftest.$ac_ext
3355fi
81ecdfbb
RW
3356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3357$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3358OBJEXT=$ac_cv_objext
3359ac_objext=$OBJEXT
81ecdfbb
RW
3360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3361$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3362if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3363 $as_echo_n "(cached) " >&6
bec39cab 3364else
81ecdfbb 3365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3366/* end confdefs.h. */
3367
3368int
3369main ()
3370{
3371#ifndef __GNUC__
3372 choke me
3373#endif
84563040 3374
bec39cab
AC
3375 ;
3376 return 0;
3377}
3378_ACEOF
81ecdfbb 3379if ac_fn_c_try_compile "$LINENO"; then :
bec39cab 3380 ac_compiler_gnu=yes
84563040 3381else
81ecdfbb 3382 ac_compiler_gnu=no
84563040 3383fi
81ecdfbb 3384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3385ac_cv_c_compiler_gnu=$ac_compiler_gnu
84563040 3386
bec39cab 3387fi
81ecdfbb
RW
3388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3389$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3390if test $ac_compiler_gnu = yes; then
3391 GCC=yes
3392else
3393 GCC=
3394fi
bec39cab
AC
3395ac_test_CFLAGS=${CFLAGS+set}
3396ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3398$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3399if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb
RW
3400 $as_echo_n "(cached) " >&6
3401else
3402 ac_save_c_werror_flag=$ac_c_werror_flag
3403 ac_c_werror_flag=yes
3404 ac_cv_prog_cc_g=no
3405 CFLAGS="-g"
3406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3407/* end confdefs.h. */
3408
3409int
3410main ()
3411{
3412
3413 ;
3414 return 0;
3415}
3416_ACEOF
81ecdfbb 3417if ac_fn_c_try_compile "$LINENO"; then :
84563040
DJ
3418 ac_cv_prog_cc_g=yes
3419else
81ecdfbb
RW
3420 CFLAGS=""
3421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3422/* end confdefs.h. */
3423
3424int
3425main ()
3426{
3427
3428 ;
3429 return 0;
3430}
3431_ACEOF
3432if ac_fn_c_try_compile "$LINENO"; then :
3433
3434else
3435 ac_c_werror_flag=$ac_save_c_werror_flag
3436 CFLAGS="-g"
3437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3438/* end confdefs.h. */
3439
3440int
3441main ()
3442{
84563040 3443
81ecdfbb
RW
3444 ;
3445 return 0;
3446}
3447_ACEOF
3448if ac_fn_c_try_compile "$LINENO"; then :
3449 ac_cv_prog_cc_g=yes
3450fi
3451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 3452fi
81ecdfbb 3453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 3454fi
81ecdfbb
RW
3455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3456 ac_c_werror_flag=$ac_save_c_werror_flag
3457fi
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3459$as_echo "$ac_cv_prog_cc_g" >&6; }
84563040 3460if test "$ac_test_CFLAGS" = set; then
bec39cab 3461 CFLAGS=$ac_save_CFLAGS
84563040
DJ
3462elif test $ac_cv_prog_cc_g = yes; then
3463 if test "$GCC" = yes; then
3464 CFLAGS="-g -O2"
3465 else
3466 CFLAGS="-g"
3467 fi
3468else
3469 if test "$GCC" = yes; then
3470 CFLAGS="-O2"
3471 else
3472 CFLAGS=
3473 fi
3474fi
81ecdfbb
RW
3475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3476$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3477if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3478 $as_echo_n "(cached) " >&6
bec39cab 3479else
81ecdfbb 3480 ac_cv_prog_cc_c89=no
bec39cab 3481ac_save_CC=$CC
81ecdfbb 3482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3483/* end confdefs.h. */
3484#include <stdarg.h>
3485#include <stdio.h>
d0ac1c44 3486struct stat;
bec39cab
AC
3487/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3488struct buf { int x; };
3489FILE * (*rcsopen) (struct buf *, struct stat *, int);
3490static char *e (p, i)
3491 char **p;
3492 int i;
3493{
3494 return p[i];
3495}
3496static char *f (char * (*g) (char **, int), char **p, ...)
3497{
3498 char *s;
3499 va_list v;
3500 va_start (v,p);
3501 s = g (p, va_arg (v,int));
3502 va_end (v);
3503 return s;
3504}
3505
3506/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3507 function prototypes and stuff, but not '\xHH' hex character constants.
3508 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3509 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3510 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3511 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3512 that's true only with -std. */
bec39cab
AC
3513int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3514
81ecdfbb
RW
3515/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3516 inside strings and character constants. */
3517#define FOO(x) 'x'
3518int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3519
bec39cab
AC
3520int test (int i, double x);
3521struct s1 {int (*f) (int a);};
3522struct s2 {int (*f) (double a);};
3523int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3524int argc;
3525char **argv;
3526int
3527main ()
3528{
3529return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3530 ;
3531 return 0;
3532}
3533_ACEOF
81ecdfbb
RW
3534for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3535 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3536do
3537 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3538 if ac_fn_c_try_compile "$LINENO"; then :
3539 ac_cv_prog_cc_c89=$ac_arg
bec39cab 3540fi
81ecdfbb
RW
3541rm -f core conftest.err conftest.$ac_objext
3542 test "x$ac_cv_prog_cc_c89" != "xno" && break
bec39cab 3543done
81ecdfbb 3544rm -f conftest.$ac_ext
bec39cab
AC
3545CC=$ac_save_CC
3546
3547fi
81ecdfbb
RW
3548# AC_CACHE_VAL
3549case "x$ac_cv_prog_cc_c89" in
3550 x)
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3552$as_echo "none needed" >&6; } ;;
3553 xno)
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3555$as_echo "unsupported" >&6; } ;;
bec39cab 3556 *)
81ecdfbb
RW
3557 CC="$CC $ac_cv_prog_cc_c89"
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3559$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
bec39cab 3560esac
81ecdfbb 3561if test "x$ac_cv_prog_cc_c89" != xno; then :
bec39cab 3562
dae5f5cf
DJ
3563fi
3564
dae5f5cf 3565ac_ext=c
bec39cab
AC
3566ac_cpp='$CPP $CPPFLAGS'
3567ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3568ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3569ac_compiler_gnu=$ac_cv_c_compiler_gnu
84563040 3570
3bc3d82a
PA
3571ac_ext=cpp
3572ac_cpp='$CXXCPP $CPPFLAGS'
3573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3576if test -z "$CXX"; then
3577 if test -n "$CCC"; then
3578 CXX=$CCC
3579 else
3580 if test -n "$ac_tool_prefix"; then
3581 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3582 do
3583 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3586$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3587if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3588 $as_echo_n "(cached) " >&6
3589else
3590 if test -n "$CXX"; then
3591 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3592else
3593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3594for as_dir in $PATH
3595do
3596 IFS=$as_save_IFS
3597 test -z "$as_dir" && as_dir=.
3598 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3600 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3602 break 2
3603 fi
3604done
3605 done
3606IFS=$as_save_IFS
3607
3608fi
3609fi
3610CXX=$ac_cv_prog_CXX
3611if test -n "$CXX"; then
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3613$as_echo "$CXX" >&6; }
3614else
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3616$as_echo "no" >&6; }
3617fi
3618
3619
3620 test -n "$CXX" && break
3621 done
3622fi
3623if test -z "$CXX"; then
3624 ac_ct_CXX=$CXX
3625 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3626do
3627 # Extract the first word of "$ac_prog", so it can be a program name with args.
3628set dummy $ac_prog; ac_word=$2
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3631if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3632 $as_echo_n "(cached) " >&6
3633else
3634 if test -n "$ac_ct_CXX"; then
3635 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3636else
3637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3644 ac_cv_prog_ac_ct_CXX="$ac_prog"
3645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3646 break 2
3647 fi
3648done
3649 done
3650IFS=$as_save_IFS
3651
3652fi
3653fi
3654ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3655if test -n "$ac_ct_CXX"; then
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3657$as_echo "$ac_ct_CXX" >&6; }
3658else
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
3661fi
3662
3663
3664 test -n "$ac_ct_CXX" && break
3665done
3666
3667 if test "x$ac_ct_CXX" = x; then
3668 CXX="g++"
3669 else
3670 case $cross_compiling:$ac_tool_warned in
3671yes:)
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3674ac_tool_warned=yes ;;
3675esac
3676 CXX=$ac_ct_CXX
3677 fi
3678fi
3679
3680 fi
3681fi
3682# Provide some information about the compiler.
3683$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3684set X $ac_compile
3685ac_compiler=$2
3686for ac_option in --version -v -V -qversion; do
3687 { { ac_try="$ac_compiler $ac_option >&5"
3688case "(($ac_try" in
3689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3690 *) ac_try_echo=$ac_try;;
3691esac
3692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3693$as_echo "$ac_try_echo"; } >&5
3694 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3695 ac_status=$?
3696 if test -s conftest.err; then
3697 sed '10a\
3698... rest of stderr output deleted ...
3699 10q' conftest.err >conftest.er1
3700 cat conftest.er1 >&5
3bc3d82a 3701 fi
d0ac1c44 3702 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3704 test $ac_status = 0; }
3705done
3706
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3708$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3709if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3710 $as_echo_n "(cached) " >&6
3711else
3712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3713/* end confdefs.h. */
3714
3715int
3716main ()
3717{
3718#ifndef __GNUC__
3719 choke me
3720#endif
3721
3722 ;
3723 return 0;
3724}
3725_ACEOF
3726if ac_fn_cxx_try_compile "$LINENO"; then :
3727 ac_compiler_gnu=yes
3728else
3729 ac_compiler_gnu=no
3730fi
3731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3732ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3733
3734fi
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3736$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3737if test $ac_compiler_gnu = yes; then
3738 GXX=yes
3739else
3740 GXX=
3741fi
3742ac_test_CXXFLAGS=${CXXFLAGS+set}
3743ac_save_CXXFLAGS=$CXXFLAGS
3744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3745$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3746if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3747 $as_echo_n "(cached) " >&6
3748else
3749 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3750 ac_cxx_werror_flag=yes
3751 ac_cv_prog_cxx_g=no
3752 CXXFLAGS="-g"
3753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3754/* end confdefs.h. */
3755
3756int
3757main ()
3758{
3759
3760 ;
3761 return 0;
3762}
3763_ACEOF
3764if ac_fn_cxx_try_compile "$LINENO"; then :
3765 ac_cv_prog_cxx_g=yes
3766else
3767 CXXFLAGS=""
3768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3769/* end confdefs.h. */
3770
3771int
3772main ()
3773{
3774
3775 ;
3776 return 0;
3777}
3778_ACEOF
3779if ac_fn_cxx_try_compile "$LINENO"; then :
3780
3781else
3782 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3783 CXXFLAGS="-g"
3784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3785/* end confdefs.h. */
3786
3787int
3788main ()
3789{
3790
3791 ;
3792 return 0;
3793}
3794_ACEOF
3795if ac_fn_cxx_try_compile "$LINENO"; then :
3796 ac_cv_prog_cxx_g=yes
3797fi
3798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3799fi
3800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3801fi
3802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3803 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3804fi
3805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3806$as_echo "$ac_cv_prog_cxx_g" >&6; }
3807if test "$ac_test_CXXFLAGS" = set; then
3808 CXXFLAGS=$ac_save_CXXFLAGS
3809elif test $ac_cv_prog_cxx_g = yes; then
3810 if test "$GXX" = yes; then
3811 CXXFLAGS="-g -O2"
3812 else
3813 CXXFLAGS="-g"
3814 fi
3815else
3816 if test "$GXX" = yes; then
3817 CXXFLAGS="-O2"
3818 else
3819 CXXFLAGS=
3820 fi
3821fi
3822ac_ext=c
3823ac_cpp='$CPP $CPPFLAGS'
3824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3826ac_compiler_gnu=$ac_cv_c_compiler_gnu
3827
c9a1864a
YQ
3828
3829ac_ext=c
3830ac_cpp='$CPP $CPPFLAGS'
3831ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3832ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3833ac_compiler_gnu=$ac_cv_c_compiler_gnu
3834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3835$as_echo_n "checking how to run the C preprocessor... " >&6; }
3836# On Suns, sometimes $CPP names a directory.
3837if test -n "$CPP" && test -d "$CPP"; then
3838 CPP=
3839fi
3840if test -z "$CPP"; then
d0ac1c44 3841 if ${ac_cv_prog_CPP+:} false; then :
c9a1864a
YQ
3842 $as_echo_n "(cached) " >&6
3843else
3844 # Double quotes because CPP needs to be expanded
3845 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3846 do
3847 ac_preproc_ok=false
3848for ac_c_preproc_warn_flag in '' yes
3849do
3850 # Use a header file that comes with gcc, so configuring glibc
3851 # with a fresh cross-compiler works.
3852 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3853 # <limits.h> exists even on freestanding compilers.
3854 # On the NeXT, cc -E runs the code through the compiler's parser,
3855 # not just through cpp. "Syntax error" is here to catch this case.
3856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3857/* end confdefs.h. */
3858#ifdef __STDC__
3859# include <limits.h>
3860#else
3861# include <assert.h>
3862#endif
3863 Syntax error
3864_ACEOF
3865if ac_fn_c_try_cpp "$LINENO"; then :
3866
3867else
3868 # Broken: fails on valid input.
3869continue
3870fi
d0ac1c44 3871rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3872
3873 # OK, works on sane cases. Now check whether nonexistent headers
3874 # can be detected and how.
3875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3876/* end confdefs.h. */
3877#include <ac_nonexistent.h>
3878_ACEOF
3879if ac_fn_c_try_cpp "$LINENO"; then :
3880 # Broken: success on invalid input.
3881continue
3882else
3883 # Passes both tests.
3884ac_preproc_ok=:
3885break
3886fi
d0ac1c44 3887rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3888
3889done
3890# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3891rm -f conftest.i conftest.err conftest.$ac_ext
c9a1864a
YQ
3892if $ac_preproc_ok; then :
3893 break
3894fi
3895
3896 done
3897 ac_cv_prog_CPP=$CPP
3898
3899fi
3900 CPP=$ac_cv_prog_CPP
3901else
3902 ac_cv_prog_CPP=$CPP
3903fi
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3905$as_echo "$CPP" >&6; }
3906ac_preproc_ok=false
3907for ac_c_preproc_warn_flag in '' yes
3908do
3909 # Use a header file that comes with gcc, so configuring glibc
3910 # with a fresh cross-compiler works.
3911 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3912 # <limits.h> exists even on freestanding compilers.
3913 # On the NeXT, cc -E runs the code through the compiler's parser,
3914 # not just through cpp. "Syntax error" is here to catch this case.
3915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3916/* end confdefs.h. */
3917#ifdef __STDC__
3918# include <limits.h>
3919#else
3920# include <assert.h>
3921#endif
3922 Syntax error
3923_ACEOF
3924if ac_fn_c_try_cpp "$LINENO"; then :
3925
3926else
3927 # Broken: fails on valid input.
3928continue
3929fi
d0ac1c44 3930rm -f conftest.err conftest.i conftest.$ac_ext
c9a1864a
YQ
3931
3932 # OK, works on sane cases. Now check whether nonexistent headers
3933 # can be detected and how.
81ecdfbb 3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3935/* end confdefs.h. */
3936#include <ac_nonexistent.h>
3937_ACEOF
81ecdfbb 3938if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3939 # Broken: success on invalid input.
3940continue
3941else
bec39cab
AC
3942 # Passes both tests.
3943ac_preproc_ok=:
3944break
3945fi
d0ac1c44 3946rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab
AC
3947
3948done
3949# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3950rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
3951if $ac_preproc_ok; then :
3952
3953else
3954 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3956as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3957See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3958fi
3959
81ecdfbb
RW
3960ac_ext=c
3961ac_cpp='$CPP $CPPFLAGS'
3962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3964ac_compiler_gnu=$ac_cv_c_compiler_gnu
bec39cab 3965
81ecdfbb
RW
3966
3967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3968$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 3969if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 3970 $as_echo_n "(cached) " >&6
bec39cab 3971else
81ecdfbb
RW
3972 if test -z "$GREP"; then
3973 ac_path_GREP_found=false
3974 # Loop through the user's path and test for each of PROGNAME-LIST
3975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3976for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
bec39cab 3977do
81ecdfbb
RW
3978 IFS=$as_save_IFS
3979 test -z "$as_dir" && as_dir=.
3980 for ac_prog in grep ggrep; do
3981 for ac_exec_ext in '' $ac_executable_extensions; do
3982 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 3983 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
3984# Check for GNU ac_path_GREP and select it if it is found.
3985 # Check for GNU $ac_path_GREP
3986case `"$ac_path_GREP" --version 2>&1` in
3987*GNU*)
3988 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3989*)
3990 ac_count=0
3991 $as_echo_n 0123456789 >"conftest.in"
3992 while :
3993 do
3994 cat "conftest.in" "conftest.in" >"conftest.tmp"
3995 mv "conftest.tmp" "conftest.in"
3996 cp "conftest.in" "conftest.nl"
3997 $as_echo 'GREP' >> "conftest.nl"
3998 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3999 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4000 as_fn_arith $ac_count + 1 && ac_count=$as_val
4001 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4002 # Best one so far, save it but keep looking for a better one
4003 ac_cv_path_GREP="$ac_path_GREP"
4004 ac_path_GREP_max=$ac_count
4005 fi
4006 # 10*(2^10) chars as input seems more than enough
4007 test $ac_count -gt 10 && break
4008 done
4009 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4010esac
4011
4012 $ac_path_GREP_found && break 3
4013 done
4014 done
4015 done
4016IFS=$as_save_IFS
4017 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4018 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
bec39cab
AC
4019 fi
4020else
81ecdfbb 4021 ac_cv_path_GREP=$GREP
bec39cab 4022fi
bec39cab 4023
84563040 4024fi
81ecdfbb
RW
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4026$as_echo "$ac_cv_path_GREP" >&6; }
4027 GREP="$ac_cv_path_GREP"
bec39cab 4028
bec39cab 4029
81ecdfbb
RW
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4031$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4032if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb
RW
4033 $as_echo_n "(cached) " >&6
4034else
4035 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4036 then ac_cv_path_EGREP="$GREP -E"
4037 else
4038 if test -z "$EGREP"; then
4039 ac_path_EGREP_found=false
4040 # Loop through the user's path and test for each of PROGNAME-LIST
4041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4042for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4043do
4044 IFS=$as_save_IFS
4045 test -z "$as_dir" && as_dir=.
4046 for ac_prog in egrep; do
4047 for ac_exec_ext in '' $ac_executable_extensions; do
4048 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4049 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4050# Check for GNU ac_path_EGREP and select it if it is found.
4051 # Check for GNU $ac_path_EGREP
4052case `"$ac_path_EGREP" --version 2>&1` in
4053*GNU*)
4054 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4055*)
4056 ac_count=0
4057 $as_echo_n 0123456789 >"conftest.in"
4058 while :
4059 do
4060 cat "conftest.in" "conftest.in" >"conftest.tmp"
4061 mv "conftest.tmp" "conftest.in"
4062 cp "conftest.in" "conftest.nl"
4063 $as_echo 'EGREP' >> "conftest.nl"
4064 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4065 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4066 as_fn_arith $ac_count + 1 && ac_count=$as_val
4067 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4068 # Best one so far, save it but keep looking for a better one
4069 ac_cv_path_EGREP="$ac_path_EGREP"
4070 ac_path_EGREP_max=$ac_count
4071 fi
4072 # 10*(2^10) chars as input seems more than enough
4073 test $ac_count -gt 10 && break
4074 done
4075 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4076esac
bec39cab 4077
81ecdfbb
RW
4078 $ac_path_EGREP_found && break 3
4079 done
4080 done
4081 done
4082IFS=$as_save_IFS
4083 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4084 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4085 fi
bec39cab 4086else
81ecdfbb 4087 ac_cv_path_EGREP=$EGREP
84563040 4088fi
bec39cab 4089
81ecdfbb 4090 fi
b80864fb 4091fi
81ecdfbb
RW
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4093$as_echo "$ac_cv_path_EGREP" >&6; }
4094 EGREP="$ac_cv_path_EGREP"
b80864fb
DJ
4095
4096
c971b7fa
PA
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4098$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4099if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4100 $as_echo_n "(cached) " >&6
4101else
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4103/* end confdefs.h. */
4104#include <stdlib.h>
4105#include <stdarg.h>
4106#include <string.h>
4107#include <float.h>
bec39cab 4108
c971b7fa
PA
4109int
4110main ()
4111{
bec39cab 4112
c971b7fa
PA
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117if ac_fn_c_try_compile "$LINENO"; then :
4118 ac_cv_header_stdc=yes
84563040 4119else
c971b7fa
PA
4120 ac_cv_header_stdc=no
4121fi
4122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84563040 4123
c971b7fa
PA
4124if test $ac_cv_header_stdc = yes; then
4125 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4127/* end confdefs.h. */
c971b7fa 4128#include <string.h>
bec39cab
AC
4129
4130_ACEOF
84563040 4131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
c971b7fa
PA
4132 $EGREP "memchr" >/dev/null 2>&1; then :
4133
84563040 4134else
c971b7fa 4135 ac_cv_header_stdc=no
84563040
DJ
4136fi
4137rm -f conftest*
4138
770d76d7 4139fi
81ecdfbb 4140
c971b7fa
PA
4141if test $ac_cv_header_stdc = yes; then
4142 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144/* end confdefs.h. */
4145#include <stdlib.h>
4146
4147_ACEOF
4148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4149 $EGREP "free" >/dev/null 2>&1; then :
4150
770d76d7 4151else
c971b7fa 4152 ac_cv_header_stdc=no
bec39cab 4153fi
c971b7fa 4154rm -f conftest*
bec39cab
AC
4155
4156fi
c971b7fa
PA
4157
4158if test $ac_cv_header_stdc = yes; then
4159 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4160 if test "$cross_compiling" = yes; then :
4161 :
770d76d7 4162else
c971b7fa
PA
4163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164/* end confdefs.h. */
4165#include <ctype.h>
4166#include <stdlib.h>
4167#if ((' ' & 0x0FF) == 0x020)
4168# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4169# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4170#else
4171# define ISLOWER(c) \
4172 (('a' <= (c) && (c) <= 'i') \
4173 || ('j' <= (c) && (c) <= 'r') \
4174 || ('s' <= (c) && (c) <= 'z'))
4175# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4176#endif
4177
4178#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4179int
4180main ()
4181{
4182 int i;
4183 for (i = 0; i < 256; i++)
4184 if (XOR (islower (i), ISLOWER (i))
4185 || toupper (i) != TOUPPER (i))
4186 return 2;
4187 return 0;
4188}
4189_ACEOF
4190if ac_fn_c_try_run "$LINENO"; then :
4191
770d76d7 4192else
c971b7fa
PA
4193 ac_cv_header_stdc=no
4194fi
4195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4196 conftest.$ac_objext conftest.beam conftest.$ac_ext
4197fi
bec39cab 4198
770d76d7
PA
4199fi
4200fi
c971b7fa
PA
4201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4202$as_echo "$ac_cv_header_stdc" >&6; }
4203if test $ac_cv_header_stdc = yes; then
4204
4205$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4206
770d76d7 4207fi
bec39cab 4208
c971b7fa
PA
4209# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4210for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4211 inttypes.h stdint.h unistd.h
4212do :
4213 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4214ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4215"
d0ac1c44 4216if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4217 cat >>confdefs.h <<_ACEOF
4218#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4219_ACEOF
4220
81ecdfbb 4221fi
bec39cab 4222
c971b7fa 4223done
bec39cab
AC
4224
4225
4226
c971b7fa 4227 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4228if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa 4229 MINIX=yes
770d76d7 4230else
c971b7fa 4231 MINIX=
770d76d7 4232fi
bec39cab
AC
4233
4234
c971b7fa
PA
4235 if test "$MINIX" = yes; then
4236
4237$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4238
4239
4240$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4241
4242
4243$as_echo "#define _MINIX 1" >>confdefs.h
4244
770d76d7 4245 fi
bec39cab 4246
c971b7fa
PA
4247
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4249$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4250if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa 4251 $as_echo_n "(cached) " >&6
770d76d7 4252else
c971b7fa
PA
4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254/* end confdefs.h. */
bec39cab 4255
d0ac1c44
SM
4256# define __EXTENSIONS__ 1
4257 $ac_includes_default
c971b7fa
PA
4258int
4259main ()
4260{
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
4266if ac_fn_c_try_compile "$LINENO"; then :
4267 ac_cv_safe_to_define___extensions__=yes
770d76d7 4268else
c971b7fa
PA
4269 ac_cv_safe_to_define___extensions__=no
4270fi
4271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
770d76d7 4272fi
c971b7fa
PA
4273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4274$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4275 test $ac_cv_safe_to_define___extensions__ = yes &&
4276 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4277
4278 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4279
4280 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4281
4282 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4283
4284 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4285
bec39cab 4286
589bc927
TT
4287# Check whether --enable-largefile was given.
4288if test "${enable_largefile+set}" = set; then :
4289 enableval=$enable_largefile;
4290fi
4291
4292if test "$enable_largefile" != no; then
4293
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4295$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4296if ${ac_cv_sys_largefile_CC+:} false; then :
589bc927
TT
4297 $as_echo_n "(cached) " >&6
4298else
4299 ac_cv_sys_largefile_CC=no
4300 if test "$GCC" != yes; then
4301 ac_save_CC=$CC
4302 while :; do
4303 # IRIX 6.2 and later do not support large files by default,
4304 # so use the C compiler's -n32 option if that helps.
4305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4306/* end confdefs.h. */
4307#include <sys/types.h>
4308 /* Check that off_t can represent 2**63 - 1 correctly.
4309 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4310 since some C++ compilers masquerading as C compilers
4311 incorrectly reject 9223372036854775807. */
4312#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4313 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4314 && LARGE_OFF_T % 2147483647 == 1)
4315 ? 1 : -1];
4316int
4317main ()
4318{
4319
4320 ;
4321 return 0;
4322}
4323_ACEOF
4324 if ac_fn_c_try_compile "$LINENO"; then :
4325 break
4326fi
4327rm -f core conftest.err conftest.$ac_objext
4328 CC="$CC -n32"
4329 if ac_fn_c_try_compile "$LINENO"; then :
4330 ac_cv_sys_largefile_CC=' -n32'; break
4331fi
4332rm -f core conftest.err conftest.$ac_objext
4333 break
4334 done
4335 CC=$ac_save_CC
4336 rm -f conftest.$ac_ext
4337 fi
4338fi
4339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4340$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4341 if test "$ac_cv_sys_largefile_CC" != no; then
4342 CC=$CC$ac_cv_sys_largefile_CC
4343 fi
4344
4345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4346$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4347if ${ac_cv_sys_file_offset_bits+:} false; then :
589bc927
TT
4348 $as_echo_n "(cached) " >&6
4349else
4350 while :; do
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352/* end confdefs.h. */
4353#include <sys/types.h>
4354 /* Check that off_t can represent 2**63 - 1 correctly.
4355 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4356 since some C++ compilers masquerading as C compilers
4357 incorrectly reject 9223372036854775807. */
4358#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4359 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4360 && LARGE_OFF_T % 2147483647 == 1)
4361 ? 1 : -1];
4362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
4369_ACEOF
4370if ac_fn_c_try_compile "$LINENO"; then :
4371 ac_cv_sys_file_offset_bits=no; break
4372fi
4373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4375/* end confdefs.h. */
4376#define _FILE_OFFSET_BITS 64
4377#include <sys/types.h>
4378 /* Check that off_t can represent 2**63 - 1 correctly.
4379 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4380 since some C++ compilers masquerading as C compilers
4381 incorrectly reject 9223372036854775807. */
4382#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4383 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4384 && LARGE_OFF_T % 2147483647 == 1)
4385 ? 1 : -1];
4386int
4387main ()
4388{
4389
4390 ;
4391 return 0;
4392}
4393_ACEOF
4394if ac_fn_c_try_compile "$LINENO"; then :
4395 ac_cv_sys_file_offset_bits=64; break
4396fi
4397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4398 ac_cv_sys_file_offset_bits=unknown
4399 break
4400done
4401fi
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4403$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4404case $ac_cv_sys_file_offset_bits in #(
4405 no | unknown) ;;
4406 *)
4407cat >>confdefs.h <<_ACEOF
4408#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4409_ACEOF
4410;;
4411esac
4412rm -rf conftest*
4413 if test $ac_cv_sys_file_offset_bits = unknown; then
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4415$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4416if ${ac_cv_sys_large_files+:} false; then :
589bc927
TT
4417 $as_echo_n "(cached) " >&6
4418else
4419 while :; do
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421/* end confdefs.h. */
4422#include <sys/types.h>
4423 /* Check that off_t can represent 2**63 - 1 correctly.
4424 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4425 since some C++ compilers masquerading as C compilers
4426 incorrectly reject 9223372036854775807. */
4427#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4428 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4429 && LARGE_OFF_T % 2147483647 == 1)
4430 ? 1 : -1];
4431int
4432main ()
4433{
4434
4435 ;
4436 return 0;
4437}
4438_ACEOF
4439if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_sys_large_files=no; break
4441fi
4442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4444/* end confdefs.h. */
4445#define _LARGE_FILES 1
4446#include <sys/types.h>
4447 /* Check that off_t can represent 2**63 - 1 correctly.
4448 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4449 since some C++ compilers masquerading as C compilers
4450 incorrectly reject 9223372036854775807. */
4451#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4452 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4453 && LARGE_OFF_T % 2147483647 == 1)
4454 ? 1 : -1];
4455int
4456main ()
4457{
4458
4459 ;
4460 return 0;
4461}
4462_ACEOF
4463if ac_fn_c_try_compile "$LINENO"; then :
4464 ac_cv_sys_large_files=1; break
4465fi
4466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467 ac_cv_sys_large_files=unknown
4468 break
4469done
4470fi
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4472$as_echo "$ac_cv_sys_large_files" >&6; }
4473case $ac_cv_sys_large_files in #(
4474 no | unknown) ;;
4475 *)
4476cat >>confdefs.h <<_ACEOF
4477#define _LARGE_FILES $ac_cv_sys_large_files
4478_ACEOF
4479;;
4480esac
4481rm -rf conftest*
4482 fi
d0ac1c44
SM
4483
4484
589bc927
TT
4485fi
4486
770d76d7
PA
4487ac_aux_dir=
4488for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4489 if test -f "$ac_dir/install-sh"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/install-sh -c"
4492 break
4493 elif test -f "$ac_dir/install.sh"; then
4494 ac_aux_dir=$ac_dir
4495 ac_install_sh="$ac_aux_dir/install.sh -c"
4496 break
4497 elif test -f "$ac_dir/shtool"; then
4498 ac_aux_dir=$ac_dir
4499 ac_install_sh="$ac_aux_dir/shtool install -c"
4500 break
4501 fi
770d76d7
PA
4502done
4503if test -z "$ac_aux_dir"; then
d0ac1c44 4504 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
770d76d7
PA
4505fi
4506
4507# These three variables are undocumented and unsupported,
4508# and are intended to be withdrawn in a future Autoconf release.
4509# They can cause serious problems if a builder's source tree is in a directory
4510# whose full name contains unusual characters.
4511ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4512ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4513ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
c9a1864a 4514
bec39cab 4515
bdaed379
HD
4516# Expand $ac_aux_dir to an absolute path.
4517am_aux_dir=`cd "$ac_aux_dir" && pwd`
4518
4519if test x"${install_sh+set}" != xset; then
4520 case $am_aux_dir in
4521 *\ * | *\ *)
4522 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4523 *)
4524 install_sh="\${SHELL} $am_aux_dir/install-sh"
4525 esac
4526fi
4527
4528# Installed binaries are usually stripped using 'strip' when the user
4529# run "make install-strip". However 'strip' might not be the right
4530# tool to use in cross-compilation environments, therefore Automake
4531# will honor the 'STRIP' environment variable to overrule this program.
4532if test "$cross_compiling" != no; then
4533 if test -n "$ac_tool_prefix"; then
4534 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4535set dummy ${ac_tool_prefix}strip; ac_word=$2
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4537$as_echo_n "checking for $ac_word... " >&6; }
4538if ${ac_cv_prog_STRIP+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 if test -n "$STRIP"; then
4542 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4543else
4544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545for as_dir in $PATH
4546do
4547 IFS=$as_save_IFS
4548 test -z "$as_dir" && as_dir=.
4549 for ac_exec_ext in '' $ac_executable_extensions; do
4550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4551 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4553 break 2
4554 fi
4555done
4556 done
4557IFS=$as_save_IFS
4558
4559fi
4560fi
4561STRIP=$ac_cv_prog_STRIP
4562if test -n "$STRIP"; then
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4564$as_echo "$STRIP" >&6; }
4565else
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4567$as_echo "no" >&6; }
4568fi
4569
4570
4571fi
4572if test -z "$ac_cv_prog_STRIP"; then
4573 ac_ct_STRIP=$STRIP
4574 # Extract the first word of "strip", so it can be a program name with args.
4575set dummy strip; ac_word=$2
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
4578if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 if test -n "$ac_ct_STRIP"; then
4582 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4583else
4584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585for as_dir in $PATH
4586do
4587 IFS=$as_save_IFS
4588 test -z "$as_dir" && as_dir=.
4589 for ac_exec_ext in '' $ac_executable_extensions; do
4590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4591 ac_cv_prog_ac_ct_STRIP="strip"
4592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4593 break 2
4594 fi
4595done
4596 done
4597IFS=$as_save_IFS
4598
4599fi
4600fi
4601ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4602if test -n "$ac_ct_STRIP"; then
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4604$as_echo "$ac_ct_STRIP" >&6; }
4605else
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4607$as_echo "no" >&6; }
4608fi
4609
4610 if test "x$ac_ct_STRIP" = x; then
4611 STRIP=":"
4612 else
4613 case $cross_compiling:$ac_tool_warned in
4614yes:)
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4617ac_tool_warned=yes ;;
4618esac
4619 STRIP=$ac_ct_STRIP
4620 fi
4621else
4622 STRIP="$ac_cv_prog_STRIP"
4623fi
4624
4625fi
4626INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4627
4628
91e1a0ed 4629# Set build, build_cpu, build_vendor and build_os.
770d76d7
PA
4630# Make sure we can run config.sub.
4631$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4632 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7
PA
4633
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4635$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4636if ${ac_cv_build+:} false; then :
81ecdfbb
RW
4637 $as_echo_n "(cached) " >&6
4638else
770d76d7
PA
4639 ac_build_alias=$build_alias
4640test "x$ac_build_alias" = x &&
4641 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4642test "x$ac_build_alias" = x &&
d0ac1c44 4643 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
770d76d7 4644ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4645 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
770d76d7
PA
4646
4647fi
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4649$as_echo "$ac_cv_build" >&6; }
4650case $ac_cv_build in
4651*-*-*) ;;
d0ac1c44 4652*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7
PA
4653esac
4654build=$ac_cv_build
4655ac_save_IFS=$IFS; IFS='-'
4656set x $ac_cv_build
4657shift
4658build_cpu=$1
4659build_vendor=$2
4660shift; shift
4661# Remember, the first character of IFS is used to create $*,
4662# except with old shells:
4663build_os=$*
4664IFS=$ac_save_IFS
4665case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4666
4667
91e1a0ed
SM
4668
4669# Set host, host_cpu, host_vendor, and host_os.
770d76d7
PA
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4671$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4672if ${ac_cv_host+:} false; then :
770d76d7
PA
4673 $as_echo_n "(cached) " >&6
4674else
4675 if test "x$host_alias" = x; then
4676 ac_cv_host=$ac_cv_build
4677else
4678 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4679 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
770d76d7
PA
4680fi
4681
4682fi
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4684$as_echo "$ac_cv_host" >&6; }
4685case $ac_cv_host in
4686*-*-*) ;;
d0ac1c44 4687*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
770d76d7
PA
4688esac
4689host=$ac_cv_host
4690ac_save_IFS=$IFS; IFS='-'
4691set x $ac_cv_host
4692shift
4693host_cpu=$1
4694host_vendor=$2
4695shift; shift
4696# Remember, the first character of IFS is used to create $*,
4697# except with old shells:
4698host_os=$*
4699IFS=$ac_save_IFS
4700case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4701
4702
91e1a0ed
SM
4703
4704# Set target, target_cpu, target_vendor, and target_os.
c971b7fa
PA
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4706$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4707if ${ac_cv_target+:} false; then :
770d76d7
PA
4708 $as_echo_n "(cached) " >&6
4709else
c971b7fa
PA
4710 if test "x$target_alias" = x; then
4711 ac_cv_target=$ac_cv_host
770d76d7 4712else
c971b7fa 4713 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4714 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
770d76d7 4715fi
770d76d7
PA
4716
4717fi
c971b7fa
PA
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4719$as_echo "$ac_cv_target" >&6; }
4720case $ac_cv_target in
4721*-*-*) ;;
d0ac1c44 4722*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
4723esac
4724target=$ac_cv_target
4725ac_save_IFS=$IFS; IFS='-'
4726set x $ac_cv_target
4727shift
4728target_cpu=$1
4729target_vendor=$2
4730shift; shift
4731# Remember, the first character of IFS is used to create $*,
4732# except with old shells:
4733target_os=$*
4734IFS=$ac_save_IFS
4735case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
770d76d7 4736
770d76d7 4737
c971b7fa
PA
4738# The aliases save the names the user supplied, while $host etc.
4739# will get canonicalized.
4740test -n "$target_alias" &&
4741 test "$program_prefix$program_suffix$program_transform_name" = \
4742 NONENONEs,x,x, &&
4743 program_prefix=${target_alias}-
770d76d7 4744
c971b7fa
PA
4745# Find a good install program. We prefer a C program (faster),
4746# so one script is as good as another. But avoid the broken or
4747# incompatible versions:
4748# SysV /etc/install, /usr/sbin/install
4749# SunOS /usr/etc/install
4750# IRIX /sbin/install
4751# AIX /bin/install
4752# AmigaOS /C/install, which installs bootblocks on floppy discs
4753# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4754# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4755# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4756# OS/2's system install, which has a completely different semantic
4757# ./install, which can be erroneously created by make from ./install.sh.
4758# Reject install programs that cannot install multiple files.
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4760$as_echo_n "checking for a BSD-compatible install... " >&6; }
4761if test -z "$INSTALL"; then
d0ac1c44 4762if ${ac_cv_path_install+:} false; then :
c971b7fa 4763 $as_echo_n "(cached) " >&6
81ecdfbb
RW
4764else
4765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766for as_dir in $PATH
fd462a61 4767do
81ecdfbb
RW
4768 IFS=$as_save_IFS
4769 test -z "$as_dir" && as_dir=.
4770 # Account for people who put trailing slashes in PATH elements.
4771case $as_dir/ in #((
4772 ./ | .// | /[cC]/* | \
4773 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4774 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4775 /usr/ucb/* ) ;;
4776 *)
4777 # OSF1 and SCO ODT 3.0 have their own names for install.
4778 # Don't use installbsd from OSF since it installs stuff as root
4779 # by default.
4780 for ac_prog in ginstall scoinst install; do
4781 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4782 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
81ecdfbb
RW
4783 if test $ac_prog = install &&
4784 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4785 # AIX install. It has an incompatible calling convention.
4786 :
4787 elif test $ac_prog = install &&
4788 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4789 # program-specific install script used by HP pwplus--don't use.
4790 :
4791 else
4792 rm -rf conftest.one conftest.two conftest.dir
4793 echo one > conftest.one
4794 echo two > conftest.two
4795 mkdir conftest.dir
4796 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4797 test -s conftest.one && test -s conftest.two &&
4798 test -s conftest.dir/conftest.one &&
4799 test -s conftest.dir/conftest.two
4800 then
4801 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4802 break 3
4803 fi
4804 fi
4805 fi
4806 done
4807 done
4808 ;;
4809esac
fd462a61 4810
81ecdfbb
RW
4811 done
4812IFS=$as_save_IFS
fd462a61 4813
81ecdfbb 4814rm -rf conftest.one conftest.two conftest.dir
fd462a61 4815
fd462a61 4816fi
81ecdfbb
RW
4817 if test "${ac_cv_path_install+set}" = set; then
4818 INSTALL=$ac_cv_path_install
4819 else
4820 # As a last resort, use the slow shell script. Don't cache a
4821 # value for INSTALL within a source directory, because that will
4822 # break other packages using the cache if that directory is
4823 # removed, or if the value is a relative name.
4824 INSTALL=$ac_install_sh
4825 fi
fd462a61 4826fi
81ecdfbb
RW
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4828$as_echo "$INSTALL" >&6; }
fd462a61 4829
81ecdfbb
RW
4830# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4831# It thinks the first close brace ends the variable substitution.
4832test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
fd462a61 4833
81ecdfbb 4834test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
fd462a61 4835
81ecdfbb 4836test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
e28b3332 4837
e1d2394b
MS
4838if test -n "$ac_tool_prefix"; then
4839 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4840set dummy ${ac_tool_prefix}ar; ac_word=$2
4841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4843if ${ac_cv_prog_AR+:} false; then :
e1d2394b
MS
4844 $as_echo_n "(cached) " >&6
4845else
4846 if test -n "$AR"; then
4847 ac_cv_prog_AR="$AR" # Let the user override the test.
4848else
4849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in $PATH
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4856 ac_cv_prog_AR="${ac_tool_prefix}ar"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860done
4861 done
4862IFS=$as_save_IFS
4863
4864fi
4865fi
4866AR=$ac_cv_prog_AR
4867if test -n "$AR"; then
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4869$as_echo "$AR" >&6; }
4870else
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
4873fi
4874
4875
4876fi
4877if test -z "$ac_cv_prog_AR"; then
4878 ac_ct_AR=$AR
4879 # Extract the first word of "ar", so it can be a program name with args.
4880set dummy ar; ac_word=$2
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4882$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4883if ${ac_cv_prog_ac_ct_AR+:} false; then :
e1d2394b
MS
4884 $as_echo_n "(cached) " >&6
4885else
4886 if test -n "$ac_ct_AR"; then
4887 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4888else
4889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890for as_dir in $PATH
4891do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
4894 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e1d2394b
MS
4896 ac_cv_prog_ac_ct_AR="ar"
4897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898 break 2
4899 fi
4900done
4901 done
4902IFS=$as_save_IFS
4903
4904fi
4905fi
4906ac_ct_AR=$ac_cv_prog_ac_ct_AR
4907if test -n "$ac_ct_AR"; then
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4909$as_echo "$ac_ct_AR" >&6; }
4910else
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912$as_echo "no" >&6; }
4913fi
4914
4915 if test "x$ac_ct_AR" = x; then
4916 AR=""
4917 else
4918 case $cross_compiling:$ac_tool_warned in
4919yes:)
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4922ac_tool_warned=yes ;;
4923esac
4924 AR=$ac_ct_AR
4925 fi
4926else
4927 AR="$ac_cv_prog_AR"
4928fi
4929
c971b7fa
PA
4930if test -n "$ac_tool_prefix"; then
4931 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4932set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4935if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb
RW
4936 $as_echo_n "(cached) " >&6
4937else
c971b7fa
PA
4938 if test -n "$RANLIB"; then
4939 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
e28b3332 4940else
c971b7fa
PA
4941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942for as_dir in $PATH
4943do
4944 IFS=$as_save_IFS
4945 test -z "$as_dir" && as_dir=.
4946 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4948 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950 break 2
4951 fi
4952done
4953 done
4954IFS=$as_save_IFS
4955
4956fi
4957fi
4958RANLIB=$ac_cv_prog_RANLIB
4959if test -n "$RANLIB"; then
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4961$as_echo "$RANLIB" >&6; }
4962else
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968fi
4969if test -z "$ac_cv_prog_RANLIB"; then
4970 ac_ct_RANLIB=$RANLIB
4971 # Extract the first word of "ranlib", so it can be a program name with args.
4972set dummy ranlib; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4975if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
4976 $as_echo_n "(cached) " >&6
4977else
4978 if test -n "$ac_ct_RANLIB"; then
4979 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4980else
4981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
4986 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
4988 ac_cv_prog_ac_ct_RANLIB="ranlib"
4989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990 break 2
4991 fi
4992done
4993 done
4994IFS=$as_save_IFS
4995
4996fi
4997fi
4998ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4999if test -n "$ac_ct_RANLIB"; then
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5001$as_echo "$ac_ct_RANLIB" >&6; }
5002else
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004$as_echo "no" >&6; }
5005fi
5006
5007 if test "x$ac_ct_RANLIB" = x; then
5008 RANLIB=":"
5009 else
5010 case $cross_compiling:$ac_tool_warned in
5011yes:)
5012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5014ac_tool_warned=yes ;;
5015esac
5016 RANLIB=$ac_ct_RANLIB
5017 fi
5018else
5019 RANLIB="$ac_cv_prog_RANLIB"
5020fi
5021
5022
5023test "$program_prefix" != NONE &&
5024 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5025# Use a double $ so make ignores it.
5026test "$program_suffix" != NONE &&
5027 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5028# Double any \ or $.
5029# By default was `s,x,x', remove it if useless.
5030ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5031program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5032
5033
f74dc267 5034# We require a C++17 compiler. Check if one is available, and if
0bcda685
PA
5035# necessary, set CXX_DIALECT to some -std=xxx switch.
5036
f74dc267 5037 ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true
0bcda685
PA
5038 ac_ext=cpp
5039ac_cpp='$CXXCPP $CPPFLAGS'
5040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5041ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5043 CXX_DIALECT=""
5044 ac_success=no
eb4de404 5045
f74dc267
LS
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features by default" >&5
5047$as_echo_n "checking whether $CXX supports C++17 features by default... " >&6; }
5048if ${ax_cv_cxx_compile_cxx17+:} false; then :
0bcda685
PA
5049 $as_echo_n "(cached) " >&6
5050else
5051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052/* end confdefs.h. */
5053
5054
5055// If the compiler admits that it is not ready for C++11, why torture it?
5056// Hopefully, this will speed up the test.
5057
5058#ifndef __cplusplus
5059
5060#error "This is not a C++ compiler"
5061
eb4de404
LS
5062// MSVC always sets __cplusplus to 199711L in older versions; newer versions
5063// only set it correctly if /Zc:__cplusplus is specified as well as a
5064// /std:c++NN switch:
5065// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5066#elif __cplusplus < 201103L && !defined _MSC_VER
0bcda685
PA
5067
5068#error "This is not a C++11 compiler"
5069
5070#else
5071
5072namespace cxx11
5073{
5074
5075 namespace test_static_assert
5076 {
5077
5078 template <typename T>
5079 struct check
5080 {
5081 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5082 };
5083
5084 }
5085
5086 namespace test_final_override
5087 {
5088
5089 struct Base
5090 {
eb4de404 5091 virtual ~Base() {}
0bcda685
PA
5092 virtual void f() {}
5093 };
5094
5095 struct Derived : public Base
5096 {
eb4de404 5097 virtual ~Derived() override {}
0bcda685
PA
5098 virtual void f() override {}
5099 };
5100
5101 }
5102
5103 namespace test_double_right_angle_brackets
5104 {
5105
5106 template < typename T >
5107 struct check {};
5108
5109 typedef check<void> single_type;
5110 typedef check<check<void>> double_type;
5111 typedef check<check<check<void>>> triple_type;
5112 typedef check<check<check<check<void>>>> quadruple_type;
5113
5114 }
5115
5116 namespace test_decltype
5117 {
5118
5119 int
5120 f()
5121 {
5122 int a = 1;
5123 decltype(a) b = 2;
5124 return a + b;
5125 }
5126
5127 }
5128
5129 namespace test_type_deduction
5130 {
5131
5132 template < typename T1, typename T2 >
5133 struct is_same
5134 {
5135 static const bool value = false;
5136 };
5137
5138 template < typename T >
5139 struct is_same<T, T>
5140 {
5141 static const bool value = true;
5142 };
5143
5144 template < typename T1, typename T2 >
5145 auto
5146 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5147 {
5148 return a1 + a2;
5149 }
5150
5151 int
5152 test(const int c, volatile int v)
5153 {
5154 static_assert(is_same<int, decltype(0)>::value == true, "");
5155 static_assert(is_same<int, decltype(c)>::value == false, "");
5156 static_assert(is_same<int, decltype(v)>::value == false, "");
5157 auto ac = c;
5158 auto av = v;
5159 auto sumi = ac + av + 'x';
5160 auto sumf = ac + av + 1.0;
5161 static_assert(is_same<int, decltype(ac)>::value == true, "");
5162 static_assert(is_same<int, decltype(av)>::value == true, "");
5163 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5164 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5165 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5166 return (sumf > 0.0) ? sumi : add(c, v);
5167 }
5168
5169 }
5170
5171 namespace test_noexcept
5172 {
5173
5174 int f() { return 0; }
5175 int g() noexcept { return 0; }
5176
5177 static_assert(noexcept(f()) == false, "");
5178 static_assert(noexcept(g()) == true, "");
5179
5180 }
5181
5182 namespace test_constexpr
5183 {
5184
5185 template < typename CharT >
5186 unsigned long constexpr
5187 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5188 {
5189 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5190 }
5191
5192 template < typename CharT >
5193 unsigned long constexpr
5194 strlen_c(const CharT *const s) noexcept
5195 {
5196 return strlen_c_r(s, 0UL);
5197 }
5198
5199 static_assert(strlen_c("") == 0UL, "");
5200 static_assert(strlen_c("1") == 1UL, "");
5201 static_assert(strlen_c("example") == 7UL, "");
5202 static_assert(strlen_c("another\0example") == 7UL, "");
5203
5204 }
5205
5206 namespace test_rvalue_references
5207 {
5208
5209 template < int N >
5210 struct answer
5211 {
5212 static constexpr int value = N;
5213 };
5214
5215 answer<1> f(int&) { return answer<1>(); }
5216 answer<2> f(const int&) { return answer<2>(); }
5217 answer<3> f(int&&) { return answer<3>(); }
5218
5219 void
5220 test()
5221 {
5222 int i = 0;
5223 const int c = 0;
5224 static_assert(decltype(f(i))::value == 1, "");
5225 static_assert(decltype(f(c))::value == 2, "");
5226 static_assert(decltype(f(0))::value == 3, "");
5227 }
5228
5229 }
5230
5231 namespace test_uniform_initialization
5232 {
5233
5234 struct test
5235 {
5236 static const int zero {};
5237 static const int one {1};
5238 };
5239
5240 static_assert(test::zero == 0, "");
5241 static_assert(test::one == 1, "");
5242
5243 }
5244
5245 namespace test_lambdas
5246 {
5247
5248 void
5249 test1()
5250 {
5251 auto lambda1 = [](){};
5252 auto lambda2 = lambda1;
5253 lambda1();
5254 lambda2();
5255 }
5256
5257 int
5258 test2()
5259 {
5260 auto a = [](int i, int j){ return i + j; }(1, 2);
5261 auto b = []() -> int { return '0'; }();
5262 auto c = [=](){ return a + b; }();
5263 auto d = [&](){ return c; }();
5264 auto e = [a, &b](int x) mutable {
5265 const auto identity = [](int y){ return y; };
5266 for (auto i = 0; i < a; ++i)
5267 a += b--;
5268 return x + identity(a + b);
5269 }(0);
5270 return a + b + c + d + e;
5271 }
5272
5273 int
5274 test3()
5275 {
5276 const auto nullary = [](){ return 0; };
5277 const auto unary = [](int x){ return x; };
5278 using nullary_t = decltype(nullary);
5279 using unary_t = decltype(unary);
5280 const auto higher1st = [](nullary_t f){ return f(); };
5281 const auto higher2nd = [unary](nullary_t f1){
5282 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5283 };
5284 return higher1st(nullary) + higher2nd(nullary)(unary);
5285 }
5286
5287 }
5288
5289 namespace test_variadic_templates
5290 {
5291
5292 template <int...>
5293 struct sum;
5294
5295 template <int N0, int... N1toN>
5296 struct sum<N0, N1toN...>
5297 {
5298 static constexpr auto value = N0 + sum<N1toN...>::value;
5299 };
5300
5301 template <>
5302 struct sum<>
5303 {
5304 static constexpr auto value = 0;
5305 };
5306
5307 static_assert(sum<>::value == 0, "");
5308 static_assert(sum<1>::value == 1, "");
5309 static_assert(sum<23>::value == 23, "");
5310 static_assert(sum<1, 2>::value == 3, "");
5311 static_assert(sum<5, 5, 11>::value == 21, "");
5312 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5313
5314 }
5315
5316 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5317 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5318 // because of this.
5319 namespace test_template_alias_sfinae
5320 {
5321
5322 struct foo {};
5323
5324 template<typename T>
5325 using member = typename T::member_type;
5326
5327 template<typename T>
5328 void func(...) {}
5329
5330 template<typename T>
5331 void func(member<T>*) {}
5332
5333 void test();
5334
5335 void test() { func<foo>(0); }
5336
5337 }
5338
5339} // namespace cxx11
5340
5341#endif // __cplusplus >= 201103L
5342
5343
5344
f74dc267
LS
5345
5346// If the compiler admits that it is not ready for C++14, why torture it?
5347// Hopefully, this will speed up the test.
5348
5349#ifndef __cplusplus
5350
5351#error "This is not a C++ compiler"
5352
5353#elif __cplusplus < 201402L && !defined _MSC_VER
5354
5355#error "This is not a C++14 compiler"
5356
5357#else
5358
5359namespace cxx14
5360{
5361
5362 namespace test_polymorphic_lambdas
5363 {
5364
5365 int
5366 test()
5367 {
5368 const auto lambda = [](auto&&... args){
5369 const auto istiny = [](auto x){
5370 return (sizeof(x) == 1UL) ? 1 : 0;
5371 };
5372 const int aretiny[] = { istiny(args)... };
5373 return aretiny[0];
5374 };
5375 return lambda(1, 1L, 1.0f, '1');
5376 }
5377
5378 }
5379
5380 namespace test_binary_literals
5381 {
5382
5383 constexpr auto ivii = 0b0000000000101010;
5384 static_assert(ivii == 42, "wrong value");
5385
5386 }
5387
5388 namespace test_generalized_constexpr
5389 {
5390
5391 template < typename CharT >
5392 constexpr unsigned long
5393 strlen_c(const CharT *const s) noexcept
5394 {
5395 auto length = 0UL;
5396 for (auto p = s; *p; ++p)
5397 ++length;
5398 return length;
5399 }
5400
5401 static_assert(strlen_c("") == 0UL, "");
5402 static_assert(strlen_c("x") == 1UL, "");
5403 static_assert(strlen_c("test") == 4UL, "");
5404 static_assert(strlen_c("another\0test") == 7UL, "");
5405
5406 }
5407
5408 namespace test_lambda_init_capture
5409 {
5410
5411 int
5412 test()
5413 {
5414 auto x = 0;
5415 const auto lambda1 = [a = x](int b){ return a + b; };
5416 const auto lambda2 = [a = lambda1(x)](){ return a; };
5417 return lambda2();
5418 }
5419
5420 }
5421
5422 namespace test_digit_separators
5423 {
5424
5425 constexpr auto ten_million = 100'000'000;
5426 static_assert(ten_million == 100000000, "");
5427
5428 }
5429
5430 namespace test_return_type_deduction
5431 {
5432
5433 auto f(int& x) { return x; }
5434 decltype(auto) g(int& x) { return x; }
5435
5436 template < typename T1, typename T2 >
5437 struct is_same
5438 {
5439 static constexpr auto value = false;
5440 };
5441
5442 template < typename T >
5443 struct is_same<T, T>
5444 {
5445 static constexpr auto value = true;
5446 };
5447
5448 int
5449 test()
5450 {
5451 auto x = 0;
5452 static_assert(is_same<int, decltype(f(x))>::value, "");
5453 static_assert(is_same<int&, decltype(g(x))>::value, "");
5454 return x;
5455 }
5456
5457 }
5458
5459} // namespace cxx14
5460
5461#endif // __cplusplus >= 201402L
5462
5463
5464
5465
5466// If the compiler admits that it is not ready for C++17, why torture it?
5467// Hopefully, this will speed up the test.
5468
5469#ifndef __cplusplus
5470
5471#error "This is not a C++ compiler"
5472
5473#elif __cplusplus < 201703L && !defined _MSC_VER
5474
5475#error "This is not a C++17 compiler"
5476
5477#else
5478
5479#include <initializer_list>
5480#include <utility>
5481#include <type_traits>
5482
5483namespace cxx17
5484{
5485
5486 namespace test_constexpr_lambdas
5487 {
5488
5489 constexpr int foo = [](){return 42;}();
5490
5491 }
5492
5493 namespace test::nested_namespace::definitions
5494 {
5495
5496 }
5497
5498 namespace test_fold_expression
5499 {
5500
5501 template<typename... Args>
5502 int multiply(Args... args)
5503 {
5504 return (args * ... * 1);
5505 }
5506
5507 template<typename... Args>
5508 bool all(Args... args)
5509 {
5510 return (args && ...);
5511 }
5512
5513 }
5514
5515 namespace test_extended_static_assert
5516 {
5517
5518 static_assert (true);
5519
5520 }
5521
5522 namespace test_auto_brace_init_list
5523 {
5524
5525 auto foo = {5};
5526 auto bar {5};
5527
5528 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
5529 static_assert(std::is_same<int, decltype(bar)>::value);
5530 }
5531
5532 namespace test_typename_in_template_template_parameter
5533 {
5534
5535 template<template<typename> typename X> struct D;
5536
5537 }
5538
5539 namespace test_fallthrough_nodiscard_maybe_unused_attributes
5540 {
5541
5542 int f1()
5543 {
5544 return 42;
5545 }
5546
5547 [[nodiscard]] int f2()
5548 {
5549 [[maybe_unused]] auto unused = f1();
5550
5551 switch (f1())
5552 {
5553 case 17:
5554 f1();
5555 [[fallthrough]];
5556 case 42:
5557 f1();
5558 }
5559 return f1();
5560 }
5561
5562 }
5563
5564 namespace test_extended_aggregate_initialization
5565 {
5566
5567 struct base1
5568 {
5569 int b1, b2 = 42;
5570 };
5571
5572 struct base2
5573 {
5574 base2() {
5575 b3 = 42;
5576 }
5577 int b3;
5578 };
5579
5580 struct derived : base1, base2
5581 {
5582 int d;
5583 };
5584
5585 derived d1 {{1, 2}, {}, 4}; // full initialization
5586 derived d2 {{}, {}, 4}; // value-initialized bases
5587
5588 }
5589
5590 namespace test_general_range_based_for_loop
5591 {
5592
5593 struct iter
5594 {
5595 int i;
5596
5597 int& operator* ()
5598 {
5599 return i;
5600 }
5601
5602 const int& operator* () const
5603 {
5604 return i;
5605 }
5606
5607 iter& operator++()
5608 {
5609 ++i;
5610 return *this;
5611 }
5612 };
5613
5614 struct sentinel
5615 {
5616 int i;
5617 };
5618
5619 bool operator== (const iter& i, const sentinel& s)
5620 {
5621 return i.i == s.i;
5622 }
5623
5624 bool operator!= (const iter& i, const sentinel& s)
5625 {
5626 return !(i == s);
5627 }
5628
5629 struct range
5630 {
5631 iter begin() const
5632 {
5633 return {0};
5634 }
5635
5636 sentinel end() const
5637 {
5638 return {5};
5639 }
5640 };
5641
5642 void f()
5643 {
5644 range r {};
5645
5646 for (auto i : r)
5647 {
5648 [[maybe_unused]] auto v = i;
5649 }
5650 }
5651
5652 }
5653
5654 namespace test_lambda_capture_asterisk_this_by_value
5655 {
5656
5657 struct t
5658 {
5659 int i;
5660 int foo()
5661 {
5662 return [*this]()
5663 {
5664 return i;
5665 }();
5666 }
5667 };
5668
5669 }
5670
5671 namespace test_enum_class_construction
5672 {
5673
5674 enum class byte : unsigned char
5675 {};
5676
5677 byte foo {42};
5678
5679 }
5680
5681 namespace test_constexpr_if
5682 {
5683
5684 template <bool cond>
5685 int f ()
5686 {
5687 if constexpr(cond)
5688 {
5689 return 13;
5690 }
5691 else
5692 {
5693 return 42;
5694 }
5695 }
5696
5697 }
5698
5699 namespace test_selection_statement_with_initializer
5700 {
5701
5702 int f()
5703 {
5704 return 13;
5705 }
5706
5707 int f2()
5708 {
5709 if (auto i = f(); i > 0)
5710 {
5711 return 3;
5712 }
5713
5714 switch (auto i = f(); i + 4)
5715 {
5716 case 17:
5717 return 2;
5718
5719 default:
5720 return 1;
5721 }
5722 }
5723
5724 }
5725
5726 namespace test_template_argument_deduction_for_class_templates
5727 {
5728
5729 template <typename T1, typename T2>
5730 struct pair
5731 {
5732 pair (T1 p1, T2 p2)
5733 : m1 {p1},
5734 m2 {p2}
5735 {}
5736
5737 T1 m1;
5738 T2 m2;
5739 };
5740
5741 void f()
5742 {
5743 [[maybe_unused]] auto p = pair{13, 42u};
5744 }
5745
5746 }
5747
5748 namespace test_non_type_auto_template_parameters
5749 {
5750
5751 template <auto n>
5752 struct B
5753 {};
5754
5755 B<5> b1;
5756 B<'a'> b2;
5757
5758 }
5759
5760 namespace test_structured_bindings
5761 {
5762
5763 int arr[2] = { 1, 2 };
5764 std::pair<int, int> pr = { 1, 2 };
5765
5766 auto f1() -> int(&)[2]
5767 {
5768 return arr;
5769 }
5770
5771 auto f2() -> std::pair<int, int>&
5772 {
5773 return pr;
5774 }
5775
5776 struct S
5777 {
5778 int x1 : 2;
5779 volatile double y1;
5780 };
5781
5782 S f3()
5783 {
5784 return {};
5785 }
5786
5787 auto [ x1, y1 ] = f1();
5788 auto& [ xr1, yr1 ] = f1();
5789 auto [ x2, y2 ] = f2();
5790 auto& [ xr2, yr2 ] = f2();
5791 const auto [ x3, y3 ] = f3();
5792
5793 }
5794
5795 namespace test_exception_spec_type_system
5796 {
5797
5798 struct Good {};
5799 struct Bad {};
5800
5801 void g1() noexcept;
5802 void g2();
5803
5804 template<typename T>
5805 Bad
5806 f(T*, T*);
5807
5808 template<typename T1, typename T2>
5809 Good
5810 f(T1*, T2*);
5811
5812 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
5813
5814 }
5815
5816 namespace test_inline_variables
5817 {
5818
5819 template<class T> void f(T)
5820 {}
5821
5822 template<class T> inline T g(T)
5823 {
5824 return T{};
5825 }
5826
5827 template<> inline void f<>(int)
5828 {}
5829
5830 template<> int g<>(int)
5831 {
5832 return 5;
5833 }
5834
5835 }
5836
5837} // namespace cxx17
5838
5839#endif // __cplusplus < 201703L && !defined _MSC_VER
5840
5841
5842
5843_ACEOF
5844if ac_fn_cxx_try_compile "$LINENO"; then :
5845 ax_cv_cxx_compile_cxx17=yes
5846else
5847 ax_cv_cxx_compile_cxx17=no
5848fi
5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5850fi
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx17" >&5
5852$as_echo "$ax_cv_cxx_compile_cxx17" >&6; }
5853 if test x$ax_cv_cxx_compile_cxx17 = xyes; then
5854 ac_success=yes
5855 fi
5856
5857 if test x$ac_success = xno; then
5858 for alternative in ${ax_cxx_compile_alternatives}; do
5859 switch="-std=gnu++${alternative}"
5860 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
5862$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
5863if eval \${$cachevar+:} false; then :
5864 $as_echo_n "(cached) " >&6
5865else
5866 ac_save_CXX="$CXX"
5867 CXX="$CXX $switch"
5868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5869/* end confdefs.h. */
5870
5871
5872// If the compiler admits that it is not ready for C++11, why torture it?
5873// Hopefully, this will speed up the test.
5874
5875#ifndef __cplusplus
5876
5877#error "This is not a C++ compiler"
5878
5879// MSVC always sets __cplusplus to 199711L in older versions; newer versions
5880// only set it correctly if /Zc:__cplusplus is specified as well as a
5881// /std:c++NN switch:
5882// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5883#elif __cplusplus < 201103L && !defined _MSC_VER
5884
5885#error "This is not a C++11 compiler"
5886
5887#else
5888
5889namespace cxx11
5890{
5891
5892 namespace test_static_assert
5893 {
5894
5895 template <typename T>
5896 struct check
5897 {
5898 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5899 };
5900
5901 }
5902
5903 namespace test_final_override
5904 {
5905
5906 struct Base
5907 {
5908 virtual ~Base() {}
5909 virtual void f() {}
5910 };
5911
5912 struct Derived : public Base
5913 {
5914 virtual ~Derived() override {}
5915 virtual void f() override {}
5916 };
5917
5918 }
5919
5920 namespace test_double_right_angle_brackets
5921 {
5922
5923 template < typename T >
5924 struct check {};
5925
5926 typedef check<void> single_type;
5927 typedef check<check<void>> double_type;
5928 typedef check<check<check<void>>> triple_type;
5929 typedef check<check<check<check<void>>>> quadruple_type;
5930
5931 }
5932
5933 namespace test_decltype
5934 {
5935
5936 int
5937 f()
5938 {
5939 int a = 1;
5940 decltype(a) b = 2;
5941 return a + b;
5942 }
5943
5944 }
5945
5946 namespace test_type_deduction
5947 {
5948
5949 template < typename T1, typename T2 >
5950 struct is_same
5951 {
5952 static const bool value = false;
5953 };
5954
5955 template < typename T >
5956 struct is_same<T, T>
5957 {
5958 static const bool value = true;
5959 };
5960
5961 template < typename T1, typename T2 >
5962 auto
5963 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5964 {
5965 return a1 + a2;
5966 }
5967
5968 int
5969 test(const int c, volatile int v)
5970 {
5971 static_assert(is_same<int, decltype(0)>::value == true, "");
5972 static_assert(is_same<int, decltype(c)>::value == false, "");
5973 static_assert(is_same<int, decltype(v)>::value == false, "");
5974 auto ac = c;
5975 auto av = v;
5976 auto sumi = ac + av + 'x';
5977 auto sumf = ac + av + 1.0;
5978 static_assert(is_same<int, decltype(ac)>::value == true, "");
5979 static_assert(is_same<int, decltype(av)>::value == true, "");
5980 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5981 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5982 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5983 return (sumf > 0.0) ? sumi : add(c, v);
5984 }
5985
5986 }
5987
5988 namespace test_noexcept
5989 {
5990
5991 int f() { return 0; }
5992 int g() noexcept { return 0; }
5993
5994 static_assert(noexcept(f()) == false, "");
5995 static_assert(noexcept(g()) == true, "");
5996
5997 }
5998
5999 namespace test_constexpr
6000 {
6001
6002 template < typename CharT >
6003 unsigned long constexpr
6004 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6005 {
6006 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6007 }
6008
6009 template < typename CharT >
6010 unsigned long constexpr
6011 strlen_c(const CharT *const s) noexcept
6012 {
6013 return strlen_c_r(s, 0UL);
6014 }
6015
6016 static_assert(strlen_c("") == 0UL, "");
6017 static_assert(strlen_c("1") == 1UL, "");
6018 static_assert(strlen_c("example") == 7UL, "");
6019 static_assert(strlen_c("another\0example") == 7UL, "");
6020
6021 }
6022
6023 namespace test_rvalue_references
6024 {
6025
6026 template < int N >
6027 struct answer
6028 {
6029 static constexpr int value = N;
6030 };
6031
6032 answer<1> f(int&) { return answer<1>(); }
6033 answer<2> f(const int&) { return answer<2>(); }
6034 answer<3> f(int&&) { return answer<3>(); }
6035
6036 void
6037 test()
6038 {
6039 int i = 0;
6040 const int c = 0;
6041 static_assert(decltype(f(i))::value == 1, "");
6042 static_assert(decltype(f(c))::value == 2, "");
6043 static_assert(decltype(f(0))::value == 3, "");
6044 }
6045
6046 }
6047
6048 namespace test_uniform_initialization
6049 {
6050
6051 struct test
6052 {
6053 static const int zero {};
6054 static const int one {1};
6055 };
6056
6057 static_assert(test::zero == 0, "");
6058 static_assert(test::one == 1, "");
6059
6060 }
6061
6062 namespace test_lambdas
6063 {
6064
6065 void
6066 test1()
6067 {
6068 auto lambda1 = [](){};
6069 auto lambda2 = lambda1;
6070 lambda1();
6071 lambda2();
6072 }
6073
6074 int
6075 test2()
6076 {
6077 auto a = [](int i, int j){ return i + j; }(1, 2);
6078 auto b = []() -> int { return '0'; }();
6079 auto c = [=](){ return a + b; }();
6080 auto d = [&](){ return c; }();
6081 auto e = [a, &b](int x) mutable {
6082 const auto identity = [](int y){ return y; };
6083 for (auto i = 0; i < a; ++i)
6084 a += b--;
6085 return x + identity(a + b);
6086 }(0);
6087 return a + b + c + d + e;
6088 }
6089
6090 int
6091 test3()
6092 {
6093 const auto nullary = [](){ return 0; };
6094 const auto unary = [](int x){ return x; };
6095 using nullary_t = decltype(nullary);
6096 using unary_t = decltype(unary);
6097 const auto higher1st = [](nullary_t f){ return f(); };
6098 const auto higher2nd = [unary](nullary_t f1){
6099 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6100 };
6101 return higher1st(nullary) + higher2nd(nullary)(unary);
6102 }
6103
6104 }
6105
6106 namespace test_variadic_templates
6107 {
6108
6109 template <int...>
6110 struct sum;
6111
6112 template <int N0, int... N1toN>
6113 struct sum<N0, N1toN...>
6114 {
6115 static constexpr auto value = N0 + sum<N1toN...>::value;
6116 };
6117
6118 template <>
6119 struct sum<>
6120 {
6121 static constexpr auto value = 0;
6122 };
6123
6124 static_assert(sum<>::value == 0, "");
6125 static_assert(sum<1>::value == 1, "");
6126 static_assert(sum<23>::value == 23, "");
6127 static_assert(sum<1, 2>::value == 3, "");
6128 static_assert(sum<5, 5, 11>::value == 21, "");
6129 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6130
6131 }
6132
6133 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6134 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6135 // because of this.
6136 namespace test_template_alias_sfinae
6137 {
6138
6139 struct foo {};
6140
6141 template<typename T>
6142 using member = typename T::member_type;
6143
6144 template<typename T>
6145 void func(...) {}
6146
6147 template<typename T>
6148 void func(member<T>*) {}
6149
6150 void test();
6151
6152 void test() { func<foo>(0); }
6153
6154 }
6155
6156} // namespace cxx11
6157
6158#endif // __cplusplus >= 201103L
6159
6160
6161
6162
6163// If the compiler admits that it is not ready for C++14, why torture it?
6164// Hopefully, this will speed up the test.
6165
6166#ifndef __cplusplus
6167
6168#error "This is not a C++ compiler"
6169
6170#elif __cplusplus < 201402L && !defined _MSC_VER
6171
6172#error "This is not a C++14 compiler"
6173
6174#else
6175
6176namespace cxx14
6177{
6178
6179 namespace test_polymorphic_lambdas
6180 {
6181
6182 int
6183 test()
6184 {
6185 const auto lambda = [](auto&&... args){
6186 const auto istiny = [](auto x){
6187 return (sizeof(x) == 1UL) ? 1 : 0;
6188 };
6189 const int aretiny[] = { istiny(args)... };
6190 return aretiny[0];
6191 };
6192 return lambda(1, 1L, 1.0f, '1');
6193 }
6194
6195 }
6196
6197 namespace test_binary_literals
6198 {
6199
6200 constexpr auto ivii = 0b0000000000101010;
6201 static_assert(ivii == 42, "wrong value");
6202
6203 }
6204
6205 namespace test_generalized_constexpr
6206 {
6207
6208 template < typename CharT >
6209 constexpr unsigned long
6210 strlen_c(const CharT *const s) noexcept
6211 {
6212 auto length = 0UL;
6213 for (auto p = s; *p; ++p)
6214 ++length;
6215 return length;
6216 }
6217
6218 static_assert(strlen_c("") == 0UL, "");
6219 static_assert(strlen_c("x") == 1UL, "");
6220 static_assert(strlen_c("test") == 4UL, "");
6221 static_assert(strlen_c("another\0test") == 7UL, "");
6222
6223 }
6224
6225 namespace test_lambda_init_capture
6226 {
6227
6228 int
6229 test()
6230 {
6231 auto x = 0;
6232 const auto lambda1 = [a = x](int b){ return a + b; };
6233 const auto lambda2 = [a = lambda1(x)](){ return a; };
6234 return lambda2();
6235 }
6236
6237 }
6238
6239 namespace test_digit_separators
6240 {
6241
6242 constexpr auto ten_million = 100'000'000;
6243 static_assert(ten_million == 100000000, "");
6244
6245 }
6246
6247 namespace test_return_type_deduction
6248 {
6249
6250 auto f(int& x) { return x; }
6251 decltype(auto) g(int& x) { return x; }
6252
6253 template < typename T1, typename T2 >
6254 struct is_same
6255 {
6256 static constexpr auto value = false;
6257 };
6258
6259 template < typename T >
6260 struct is_same<T, T>
6261 {
6262 static constexpr auto value = true;
6263 };
6264
6265 int
6266 test()
6267 {
6268 auto x = 0;
6269 static_assert(is_same<int, decltype(f(x))>::value, "");
6270 static_assert(is_same<int&, decltype(g(x))>::value, "");
6271 return x;
6272 }
6273
6274 }
6275
6276} // namespace cxx14
6277
6278#endif // __cplusplus >= 201402L
6279
6280
6281
6282
6283// If the compiler admits that it is not ready for C++17, why torture it?
6284// Hopefully, this will speed up the test.
6285
6286#ifndef __cplusplus
6287
6288#error "This is not a C++ compiler"
6289
6290#elif __cplusplus < 201703L && !defined _MSC_VER
6291
6292#error "This is not a C++17 compiler"
6293
6294#else
6295
6296#include <initializer_list>
6297#include <utility>
6298#include <type_traits>
6299
6300namespace cxx17
6301{
6302
6303 namespace test_constexpr_lambdas
6304 {
6305
6306 constexpr int foo = [](){return 42;}();
6307
6308 }
6309
6310 namespace test::nested_namespace::definitions
6311 {
6312
6313 }
6314
6315 namespace test_fold_expression
6316 {
6317
6318 template<typename... Args>
6319 int multiply(Args... args)
6320 {
6321 return (args * ... * 1);
6322 }
6323
6324 template<typename... Args>
6325 bool all(Args... args)
6326 {
6327 return (args && ...);
6328 }
6329
6330 }
6331
6332 namespace test_extended_static_assert
6333 {
6334
6335 static_assert (true);
6336
6337 }
6338
6339 namespace test_auto_brace_init_list
6340 {
6341
6342 auto foo = {5};
6343 auto bar {5};
6344
6345 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
6346 static_assert(std::is_same<int, decltype(bar)>::value);
6347 }
6348
6349 namespace test_typename_in_template_template_parameter
6350 {
6351
6352 template<template<typename> typename X> struct D;
6353
6354 }
6355
6356 namespace test_fallthrough_nodiscard_maybe_unused_attributes
6357 {
6358
6359 int f1()
6360 {
6361 return 42;
6362 }
6363
6364 [[nodiscard]] int f2()
6365 {
6366 [[maybe_unused]] auto unused = f1();
6367
6368 switch (f1())
6369 {
6370 case 17:
6371 f1();
6372 [[fallthrough]];
6373 case 42:
6374 f1();
6375 }
6376 return f1();
6377 }
6378
6379 }
6380
6381 namespace test_extended_aggregate_initialization
6382 {
6383
6384 struct base1
6385 {
6386 int b1, b2 = 42;
6387 };
6388
6389 struct base2
6390 {
6391 base2() {
6392 b3 = 42;
6393 }
6394 int b3;
6395 };
6396
6397 struct derived : base1, base2
6398 {
6399 int d;
6400 };
6401
6402 derived d1 {{1, 2}, {}, 4}; // full initialization
6403 derived d2 {{}, {}, 4}; // value-initialized bases
6404
6405 }
6406
6407 namespace test_general_range_based_for_loop
6408 {
6409
6410 struct iter
6411 {
6412 int i;
6413
6414 int& operator* ()
6415 {
6416 return i;
6417 }
6418
6419 const int& operator* () const
6420 {
6421 return i;
6422 }
6423
6424 iter& operator++()
6425 {
6426 ++i;
6427 return *this;
6428 }
6429 };
6430
6431 struct sentinel
6432 {
6433 int i;
6434 };
6435
6436 bool operator== (const iter& i, const sentinel& s)
6437 {
6438 return i.i == s.i;
6439 }
6440
6441 bool operator!= (const iter& i, const sentinel& s)
6442 {
6443 return !(i == s);
6444 }
6445
6446 struct range
6447 {
6448 iter begin() const
6449 {
6450 return {0};
6451 }
6452
6453 sentinel end() const
6454 {
6455 return {5};
6456 }
6457 };
6458
6459 void f()
6460 {
6461 range r {};
6462
6463 for (auto i : r)
6464 {
6465 [[maybe_unused]] auto v = i;
6466 }
6467 }
6468
6469 }
6470
6471 namespace test_lambda_capture_asterisk_this_by_value
6472 {
6473
6474 struct t
6475 {
6476 int i;
6477 int foo()
6478 {
6479 return [*this]()
6480 {
6481 return i;
6482 }();
6483 }
6484 };
6485
6486 }
6487
6488 namespace test_enum_class_construction
6489 {
6490
6491 enum class byte : unsigned char
6492 {};
6493
6494 byte foo {42};
6495
6496 }
6497
6498 namespace test_constexpr_if
6499 {
6500
6501 template <bool cond>
6502 int f ()
6503 {
6504 if constexpr(cond)
6505 {
6506 return 13;
6507 }
6508 else
6509 {
6510 return 42;
6511 }
6512 }
6513
6514 }
6515
6516 namespace test_selection_statement_with_initializer
6517 {
6518
6519 int f()
6520 {
6521 return 13;
6522 }
6523
6524 int f2()
6525 {
6526 if (auto i = f(); i > 0)
6527 {
6528 return 3;
6529 }
6530
6531 switch (auto i = f(); i + 4)
6532 {
6533 case 17:
6534 return 2;
6535
6536 default:
6537 return 1;
6538 }
6539 }
6540
6541 }
6542
6543 namespace test_template_argument_deduction_for_class_templates
6544 {
6545
6546 template <typename T1, typename T2>
6547 struct pair
6548 {
6549 pair (T1 p1, T2 p2)
6550 : m1 {p1},
6551 m2 {p2}
6552 {}
6553
6554 T1 m1;
6555 T2 m2;
6556 };
6557
6558 void f()
6559 {
6560 [[maybe_unused]] auto p = pair{13, 42u};
6561 }
6562
6563 }
6564
6565 namespace test_non_type_auto_template_parameters
6566 {
6567
6568 template <auto n>
6569 struct B
6570 {};
6571
6572 B<5> b1;
6573 B<'a'> b2;
6574
6575 }
6576
6577 namespace test_structured_bindings
6578 {
6579
6580 int arr[2] = { 1, 2 };
6581 std::pair<int, int> pr = { 1, 2 };
6582
6583 auto f1() -> int(&)[2]
6584 {
6585 return arr;
6586 }
6587
6588 auto f2() -> std::pair<int, int>&
6589 {
6590 return pr;
6591 }
6592
6593 struct S
6594 {
6595 int x1 : 2;
6596 volatile double y1;
6597 };
6598
6599 S f3()
6600 {
6601 return {};
6602 }
6603
6604 auto [ x1, y1 ] = f1();
6605 auto& [ xr1, yr1 ] = f1();
6606 auto [ x2, y2 ] = f2();
6607 auto& [ xr2, yr2 ] = f2();
6608 const auto [ x3, y3 ] = f3();
6609
6610 }
6611
6612 namespace test_exception_spec_type_system
6613 {
6614
6615 struct Good {};
6616 struct Bad {};
6617
6618 void g1() noexcept;
6619 void g2();
6620
6621 template<typename T>
6622 Bad
6623 f(T*, T*);
6624
6625 template<typename T1, typename T2>
6626 Good
6627 f(T1*, T2*);
6628
6629 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
6630
6631 }
6632
6633 namespace test_inline_variables
6634 {
6635
6636 template<class T> void f(T)
6637 {}
6638
6639 template<class T> inline T g(T)
6640 {
6641 return T{};
6642 }
6643
6644 template<> inline void f<>(int)
6645 {}
6646
6647 template<> int g<>(int)
6648 {
6649 return 5;
6650 }
6651
6652 }
6653
6654} // namespace cxx17
6655
6656#endif // __cplusplus < 201703L && !defined _MSC_VER
6657
6658
6659
0bcda685
PA
6660_ACEOF
6661if ac_fn_cxx_try_compile "$LINENO"; then :
f74dc267 6662 eval $cachevar=yes
0bcda685 6663else
f74dc267 6664 eval $cachevar=no
0bcda685
PA
6665fi
6666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f74dc267 6667 CXX="$ac_save_CXX"
0bcda685 6668fi
f74dc267
LS
6669eval ac_res=\$$cachevar
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6671$as_echo "$ac_res" >&6; }
6672 if eval test x\$$cachevar = xyes; then
6673 CXX_DIALECT="$switch"
6674 CXX="$CXX $switch"
6675 if test -n "$CXXCPP" ; then
6676 CXXCPP="$CXXCPP $switch"
6677 fi
6678 ac_success=yes
6679 break
6680 fi
6681 done
6682 fi
0bcda685
PA
6683
6684 if test x$ac_success = xno; then
f74dc267
LS
6685 for alternative in ${ax_cxx_compile_alternatives}; do
6686 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
6687 if test x"$switch" = xMSVC; then
6688 switch=-std:c++${alternative}
6689 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_${switch}_MSVC" | $as_tr_sh`
6690 else
6691 cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
6692 fi
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
6694$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
d0ac1c44 6695if eval \${$cachevar+:} false; then :
0bcda685
PA
6696 $as_echo_n "(cached) " >&6
6697else
6698 ac_save_CXX="$CXX"
f74dc267
LS
6699 CXX="$CXX $switch"
6700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
6701/* end confdefs.h. */
6702
6703
6704// If the compiler admits that it is not ready for C++11, why torture it?
6705// Hopefully, this will speed up the test.
6706
6707#ifndef __cplusplus
6708
6709#error "This is not a C++ compiler"
6710
eb4de404
LS
6711// MSVC always sets __cplusplus to 199711L in older versions; newer versions
6712// only set it correctly if /Zc:__cplusplus is specified as well as a
6713// /std:c++NN switch:
6714// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
6715#elif __cplusplus < 201103L && !defined _MSC_VER
0bcda685
PA
6716
6717#error "This is not a C++11 compiler"
6718
6719#else
6720
6721namespace cxx11
6722{
6723
6724 namespace test_static_assert
6725 {
6726
6727 template <typename T>
6728 struct check
6729 {
6730 static_assert(sizeof(int) <= sizeof(T), "not big enough");
6731 };
6732
6733 }
6734
6735 namespace test_final_override
6736 {
6737
6738 struct Base
6739 {
eb4de404 6740 virtual ~Base() {}
0bcda685
PA
6741 virtual void f() {}
6742 };
6743
6744 struct Derived : public Base
6745 {
eb4de404 6746 virtual ~Derived() override {}
0bcda685
PA
6747 virtual void f() override {}
6748 };
6749
6750 }
6751
6752 namespace test_double_right_angle_brackets
6753 {
6754
6755 template < typename T >
6756 struct check {};
6757
6758 typedef check<void> single_type;
6759 typedef check<check<void>> double_type;
6760 typedef check<check<check<void>>> triple_type;
6761 typedef check<check<check<check<void>>>> quadruple_type;
6762
6763 }
6764
6765 namespace test_decltype
6766 {
6767
6768 int
6769 f()
6770 {
6771 int a = 1;
6772 decltype(a) b = 2;
6773 return a + b;
6774 }
6775
6776 }
6777
6778 namespace test_type_deduction
6779 {
6780
6781 template < typename T1, typename T2 >
6782 struct is_same
6783 {
6784 static const bool value = false;
6785 };
6786
6787 template < typename T >
6788 struct is_same<T, T>
6789 {
6790 static const bool value = true;
6791 };
6792
6793 template < typename T1, typename T2 >
6794 auto
6795 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6796 {
6797 return a1 + a2;
6798 }
6799
6800 int
6801 test(const int c, volatile int v)
6802 {
6803 static_assert(is_same<int, decltype(0)>::value == true, "");
6804 static_assert(is_same<int, decltype(c)>::value == false, "");
6805 static_assert(is_same<int, decltype(v)>::value == false, "");
6806 auto ac = c;
6807 auto av = v;
6808 auto sumi = ac + av + 'x';
6809 auto sumf = ac + av + 1.0;
6810 static_assert(is_same<int, decltype(ac)>::value == true, "");
6811 static_assert(is_same<int, decltype(av)>::value == true, "");
6812 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6813 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6814 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6815 return (sumf > 0.0) ? sumi : add(c, v);
6816 }
6817
6818 }
6819
6820 namespace test_noexcept
6821 {
6822
6823 int f() { return 0; }
6824 int g() noexcept { return 0; }
6825
6826 static_assert(noexcept(f()) == false, "");
6827 static_assert(noexcept(g()) == true, "");
6828
6829 }
6830
6831 namespace test_constexpr
6832 {
6833
6834 template < typename CharT >
6835 unsigned long constexpr
6836 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6837 {
6838 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6839 }
6840
6841 template < typename CharT >
6842 unsigned long constexpr
6843 strlen_c(const CharT *const s) noexcept
6844 {
6845 return strlen_c_r(s, 0UL);
6846 }
6847
6848 static_assert(strlen_c("") == 0UL, "");
6849 static_assert(strlen_c("1") == 1UL, "");
6850 static_assert(strlen_c("example") == 7UL, "");
6851 static_assert(strlen_c("another\0example") == 7UL, "");
6852
6853 }
6854
6855 namespace test_rvalue_references
6856 {
6857
6858 template < int N >
6859 struct answer
6860 {
6861 static constexpr int value = N;
6862 };
6863
6864 answer<1> f(int&) { return answer<1>(); }
6865 answer<2> f(const int&) { return answer<2>(); }
6866 answer<3> f(int&&) { return answer<3>(); }
6867
6868 void
6869 test()
6870 {
6871 int i = 0;
6872 const int c = 0;
6873 static_assert(decltype(f(i))::value == 1, "");
6874 static_assert(decltype(f(c))::value == 2, "");
6875 static_assert(decltype(f(0))::value == 3, "");
6876 }
6877
6878 }
6879
6880 namespace test_uniform_initialization
6881 {
6882
6883 struct test
6884 {
6885 static const int zero {};
6886 static const int one {1};
6887 };
6888
6889 static_assert(test::zero == 0, "");
6890 static_assert(test::one == 1, "");
6891
6892 }
6893
6894 namespace test_lambdas
6895 {
6896
6897 void
6898 test1()
6899 {
6900 auto lambda1 = [](){};
6901 auto lambda2 = lambda1;
6902 lambda1();
6903 lambda2();
6904 }
6905
6906 int
6907 test2()
6908 {
6909 auto a = [](int i, int j){ return i + j; }(1, 2);
6910 auto b = []() -> int { return '0'; }();
6911 auto c = [=](){ return a + b; }();
6912 auto d = [&](){ return c; }();
6913 auto e = [a, &b](int x) mutable {
6914 const auto identity = [](int y){ return y; };
6915 for (auto i = 0; i < a; ++i)
6916 a += b--;
6917 return x + identity(a + b);
6918 }(0);
6919 return a + b + c + d + e;
6920 }
6921
6922 int
6923 test3()
6924 {
6925 const auto nullary = [](){ return 0; };
6926 const auto unary = [](int x){ return x; };
6927 using nullary_t = decltype(nullary);
6928 using unary_t = decltype(unary);
6929 const auto higher1st = [](nullary_t f){ return f(); };
6930 const auto higher2nd = [unary](nullary_t f1){
6931 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6932 };
6933 return higher1st(nullary) + higher2nd(nullary)(unary);
6934 }
6935
6936 }
6937
6938 namespace test_variadic_templates
6939 {
6940
6941 template <int...>
6942 struct sum;
6943
6944 template <int N0, int... N1toN>
6945 struct sum<N0, N1toN...>
6946 {
6947 static constexpr auto value = N0 + sum<N1toN...>::value;
6948 };
6949
6950 template <>
6951 struct sum<>
6952 {
6953 static constexpr auto value = 0;
6954 };
6955
6956 static_assert(sum<>::value == 0, "");
6957 static_assert(sum<1>::value == 1, "");
6958 static_assert(sum<23>::value == 23, "");
6959 static_assert(sum<1, 2>::value == 3, "");
6960 static_assert(sum<5, 5, 11>::value == 21, "");
6961 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6962
6963 }
6964
6965 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6966 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6967 // because of this.
6968 namespace test_template_alias_sfinae
6969 {
6970
6971 struct foo {};
6972
6973 template<typename T>
6974 using member = typename T::member_type;
6975
6976 template<typename T>
6977 void func(...) {}
6978
6979 template<typename T>
6980 void func(member<T>*) {}
6981
6982 void test();
6983
6984 void test() { func<foo>(0); }
6985
6986 }
6987
6988} // namespace cxx11
6989
6990#endif // __cplusplus >= 201103L
6991
6992
6993
0bcda685 6994
f74dc267
LS
6995// If the compiler admits that it is not ready for C++14, why torture it?
6996// Hopefully, this will speed up the test.
6997
6998#ifndef __cplusplus
6999
7000#error "This is not a C++ compiler"
7001
7002#elif __cplusplus < 201402L && !defined _MSC_VER
7003
7004#error "This is not a C++14 compiler"
7005
7006#else
7007
7008namespace cxx14
7009{
7010
7011 namespace test_polymorphic_lambdas
7012 {
7013
7014 int
7015 test()
7016 {
7017 const auto lambda = [](auto&&... args){
7018 const auto istiny = [](auto x){
7019 return (sizeof(x) == 1UL) ? 1 : 0;
7020 };
7021 const int aretiny[] = { istiny(args)... };
7022 return aretiny[0];
7023 };
7024 return lambda(1, 1L, 1.0f, '1');
7025 }
7026
7027 }
7028
7029 namespace test_binary_literals
7030 {
7031
7032 constexpr auto ivii = 0b0000000000101010;
7033 static_assert(ivii == 42, "wrong value");
7034
7035 }
7036
7037 namespace test_generalized_constexpr
7038 {
7039
7040 template < typename CharT >
7041 constexpr unsigned long
7042 strlen_c(const CharT *const s) noexcept
7043 {
7044 auto length = 0UL;
7045 for (auto p = s; *p; ++p)
7046 ++length;
7047 return length;
7048 }
7049
7050 static_assert(strlen_c("") == 0UL, "");
7051 static_assert(strlen_c("x") == 1UL, "");
7052 static_assert(strlen_c("test") == 4UL, "");
7053 static_assert(strlen_c("another\0test") == 7UL, "");
7054
7055 }
7056
7057 namespace test_lambda_init_capture
7058 {
7059
7060 int
7061 test()
7062 {
7063 auto x = 0;
7064 const auto lambda1 = [a = x](int b){ return a + b; };
7065 const auto lambda2 = [a = lambda1(x)](){ return a; };
7066 return lambda2();
7067 }
7068
7069 }
7070
7071 namespace test_digit_separators
7072 {
7073
7074 constexpr auto ten_million = 100'000'000;
7075 static_assert(ten_million == 100000000, "");
7076
7077 }
7078
7079 namespace test_return_type_deduction
7080 {
7081
7082 auto f(int& x) { return x; }
7083 decltype(auto) g(int& x) { return x; }
7084
7085 template < typename T1, typename T2 >
7086 struct is_same
7087 {
7088 static constexpr auto value = false;
7089 };
7090
7091 template < typename T >
7092 struct is_same<T, T>
7093 {
7094 static constexpr auto value = true;
7095 };
7096
7097 int
7098 test()
7099 {
7100 auto x = 0;
7101 static_assert(is_same<int, decltype(f(x))>::value, "");
7102 static_assert(is_same<int&, decltype(g(x))>::value, "");
7103 return x;
7104 }
7105
7106 }
0bcda685 7107
f74dc267 7108} // namespace cxx14
0bcda685 7109
f74dc267
LS
7110#endif // __cplusplus >= 201402L
7111
7112
7113
7114
7115// If the compiler admits that it is not ready for C++17, why torture it?
0bcda685
PA
7116// Hopefully, this will speed up the test.
7117
7118#ifndef __cplusplus
7119
7120#error "This is not a C++ compiler"
7121
f74dc267 7122#elif __cplusplus < 201703L && !defined _MSC_VER
0bcda685 7123
f74dc267 7124#error "This is not a C++17 compiler"
0bcda685
PA
7125
7126#else
7127
f74dc267
LS
7128#include <initializer_list>
7129#include <utility>
7130#include <type_traits>
7131
7132namespace cxx17
0bcda685
PA
7133{
7134
f74dc267 7135 namespace test_constexpr_lambdas
0bcda685
PA
7136 {
7137
f74dc267 7138 constexpr int foo = [](){return 42;}();
0bcda685
PA
7139
7140 }
7141
f74dc267 7142 namespace test::nested_namespace::definitions
0bcda685
PA
7143 {
7144
f74dc267
LS
7145 }
7146
7147 namespace test_fold_expression
7148 {
7149
7150 template<typename... Args>
7151 int multiply(Args... args)
0bcda685 7152 {
f74dc267
LS
7153 return (args * ... * 1);
7154 }
0bcda685 7155
f74dc267
LS
7156 template<typename... Args>
7157 bool all(Args... args)
0bcda685 7158 {
f74dc267
LS
7159 return (args && ...);
7160 }
0bcda685
PA
7161
7162 }
7163
f74dc267 7164 namespace test_extended_static_assert
0bcda685
PA
7165 {
7166
f74dc267 7167 static_assert (true);
0bcda685 7168
f74dc267
LS
7169 }
7170
7171 namespace test_auto_brace_init_list
7172 {
0bcda685 7173
f74dc267
LS
7174 auto foo = {5};
7175 auto bar {5};
7176
7177 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
7178 static_assert(std::is_same<int, decltype(bar)>::value);
0bcda685
PA
7179 }
7180
f74dc267 7181 namespace test_typename_in_template_template_parameter
0bcda685
PA
7182 {
7183
f74dc267
LS
7184 template<template<typename> typename X> struct D;
7185
7186 }
7187
7188 namespace test_fallthrough_nodiscard_maybe_unused_attributes
7189 {
7190
7191 int f1()
0bcda685 7192 {
f74dc267
LS
7193 return 42;
7194 }
7195
7196 [[nodiscard]] int f2()
7197 {
7198 [[maybe_unused]] auto unused = f1();
7199
7200 switch (f1())
7201 {
7202 case 17:
7203 f1();
7204 [[fallthrough]];
7205 case 42:
7206 f1();
7207 }
7208 return f1();
0bcda685
PA
7209 }
7210
7211 }
7212
f74dc267 7213 namespace test_extended_aggregate_initialization
0bcda685
PA
7214 {
7215
f74dc267 7216 struct base1
0bcda685 7217 {
f74dc267 7218 int b1, b2 = 42;
0bcda685
PA
7219 };
7220
f74dc267 7221 struct base2
0bcda685 7222 {
f74dc267
LS
7223 base2() {
7224 b3 = 42;
7225 }
7226 int b3;
0bcda685
PA
7227 };
7228
f74dc267 7229 struct derived : base1, base2
0bcda685 7230 {
f74dc267
LS
7231 int d;
7232 };
7233
7234 derived d1 {{1, 2}, {}, 4}; // full initialization
7235 derived d2 {{}, {}, 4}; // value-initialized bases
7236
7237 }
7238
7239 namespace test_general_range_based_for_loop
7240 {
7241
7242 struct iter
7243 {
7244 int i;
7245
7246 int& operator* ()
7247 {
7248 return i;
7249 }
7250
7251 const int& operator* () const
7252 {
7253 return i;
7254 }
7255
7256 iter& operator++()
7257 {
7258 ++i;
7259 return *this;
7260 }
7261 };
7262
7263 struct sentinel
7264 {
7265 int i;
7266 };
7267
7268 bool operator== (const iter& i, const sentinel& s)
7269 {
7270 return i.i == s.i;
0bcda685
PA
7271 }
7272
f74dc267 7273 bool operator!= (const iter& i, const sentinel& s)
0bcda685 7274 {
f74dc267
LS
7275 return !(i == s);
7276 }
7277
7278 struct range
7279 {
7280 iter begin() const
7281 {
7282 return {0};
7283 }
7284
7285 sentinel end() const
7286 {
7287 return {5};
7288 }
7289 };
7290
7291 void f()
7292 {
7293 range r {};
7294
7295 for (auto i : r)
7296 {
7297 [[maybe_unused]] auto v = i;
7298 }
0bcda685
PA
7299 }
7300
7301 }
7302
f74dc267 7303 namespace test_lambda_capture_asterisk_this_by_value
0bcda685
PA
7304 {
7305
f74dc267
LS
7306 struct t
7307 {
7308 int i;
7309 int foo()
7310 {
7311 return [*this]()
7312 {
7313 return i;
7314 }();
7315 }
7316 };
0bcda685 7317
f74dc267
LS
7318 }
7319
7320 namespace test_enum_class_construction
7321 {
7322
7323 enum class byte : unsigned char
7324 {};
7325
7326 byte foo {42};
0bcda685
PA
7327
7328 }
7329
f74dc267 7330 namespace test_constexpr_if
0bcda685
PA
7331 {
7332
f74dc267
LS
7333 template <bool cond>
7334 int f ()
0bcda685 7335 {
f74dc267
LS
7336 if constexpr(cond)
7337 {
7338 return 13;
7339 }
7340 else
7341 {
7342 return 42;
7343 }
0bcda685
PA
7344 }
7345
f74dc267
LS
7346 }
7347
7348 namespace test_selection_statement_with_initializer
7349 {
7350
7351 int f()
0bcda685 7352 {
f74dc267 7353 return 13;
0bcda685
PA
7354 }
7355
f74dc267
LS
7356 int f2()
7357 {
7358 if (auto i = f(); i > 0)
7359 {
7360 return 3;
7361 }
7362
7363 switch (auto i = f(); i + 4)
7364 {
7365 case 17:
7366 return 2;
7367
7368 default:
7369 return 1;
7370 }
7371 }
0bcda685
PA
7372
7373 }
7374
f74dc267 7375 namespace test_template_argument_deduction_for_class_templates
0bcda685
PA
7376 {
7377
f74dc267
LS
7378 template <typename T1, typename T2>
7379 struct pair
0bcda685 7380 {
f74dc267
LS
7381 pair (T1 p1, T2 p2)
7382 : m1 {p1},
7383 m2 {p2}
7384 {}
0bcda685 7385
f74dc267
LS
7386 T1 m1;
7387 T2 m2;
7388 };
0bcda685 7389
f74dc267 7390 void f()
0bcda685 7391 {
f74dc267 7392 [[maybe_unused]] auto p = pair{13, 42u};
0bcda685
PA
7393 }
7394
7395 }
7396
f74dc267 7397 namespace test_non_type_auto_template_parameters
0bcda685
PA
7398 {
7399
f74dc267
LS
7400 template <auto n>
7401 struct B
7402 {};
0bcda685 7403
f74dc267
LS
7404 B<5> b1;
7405 B<'a'> b2;
0bcda685
PA
7406
7407 }
7408
f74dc267 7409 namespace test_structured_bindings
0bcda685
PA
7410 {
7411
f74dc267
LS
7412 int arr[2] = { 1, 2 };
7413 std::pair<int, int> pr = { 1, 2 };
7414
7415 auto f1() -> int(&)[2]
0bcda685 7416 {
f74dc267 7417 return arr;
0bcda685
PA
7418 }
7419
f74dc267 7420 auto f2() -> std::pair<int, int>&
0bcda685 7421 {
f74dc267 7422 return pr;
0bcda685
PA
7423 }
7424
f74dc267 7425 struct S
0bcda685 7426 {
f74dc267
LS
7427 int x1 : 2;
7428 volatile double y1;
7429 };
7430
7431 S f3()
7432 {
7433 return {};
0bcda685
PA
7434 }
7435
f74dc267
LS
7436 auto [ x1, y1 ] = f1();
7437 auto& [ xr1, yr1 ] = f1();
7438 auto [ x2, y2 ] = f2();
7439 auto& [ xr2, yr2 ] = f2();
7440 const auto [ x3, y3 ] = f3();
7441
0bcda685
PA
7442 }
7443
f74dc267 7444 namespace test_exception_spec_type_system
0bcda685
PA
7445 {
7446
f74dc267
LS
7447 struct Good {};
7448 struct Bad {};
0bcda685 7449
f74dc267
LS
7450 void g1() noexcept;
7451 void g2();
0bcda685 7452
f74dc267
LS
7453 template<typename T>
7454 Bad
7455 f(T*, T*);
0bcda685 7456
f74dc267
LS
7457 template<typename T1, typename T2>
7458 Good
7459 f(T1*, T2*);
7460
7461 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
0bcda685
PA
7462
7463 }
7464
f74dc267 7465 namespace test_inline_variables
0bcda685
PA
7466 {
7467
f74dc267
LS
7468 template<class T> void f(T)
7469 {}
0bcda685 7470
f74dc267
LS
7471 template<class T> inline T g(T)
7472 {
7473 return T{};
7474 }
0bcda685 7475
f74dc267
LS
7476 template<> inline void f<>(int)
7477 {}
0bcda685 7478
f74dc267
LS
7479 template<> int g<>(int)
7480 {
7481 return 5;
7482 }
0bcda685
PA
7483
7484 }
7485
f74dc267 7486} // namespace cxx17
0bcda685 7487
f74dc267 7488#endif // __cplusplus < 201703L && !defined _MSC_VER
0bcda685
PA
7489
7490
7491
7492_ACEOF
7493if ac_fn_cxx_try_compile "$LINENO"; then :
7494 eval $cachevar=yes
7495else
7496 eval $cachevar=no
7497fi
7498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
458412c3 7499 CXX="$ac_save_CXX"
0bcda685
PA
7500fi
7501eval ac_res=\$$cachevar
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7503$as_echo "$ac_res" >&6; }
458412c3
TT
7504 if eval test x\$$cachevar = xyes; then
7505 CXX_DIALECT="$switch"
77252bf2
TV
7506 CXX="$CXX $switch"
7507 if test -n "$CXXCPP" ; then
7508 CXXCPP="$CXXCPP $switch"
7509 fi
458412c3
TT
7510 ac_success=yes
7511 break
7512 fi
7513 done
7514 if test x$ac_success = xyes; then
0bcda685
PA
7515 break
7516 fi
7517 done
7518 fi
7519 ac_ext=c
7520ac_cpp='$CPP $CPPFLAGS'
7521ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7522ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7523ac_compiler_gnu=$ac_cv_c_compiler_gnu
7524
f74dc267 7525 if test x$ax_cxx_compile_cxx17_required = xtrue; then
0bcda685 7526 if test x$ac_success = xno; then
f74dc267 7527 as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
0bcda685
PA
7528 fi
7529 fi
7530 if test x$ac_success = xno; then
f74dc267
LS
7531 HAVE_CXX17=0
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
7533$as_echo "$as_me: No compiler with C++17 support was found" >&6;}
0bcda685 7534 else
f74dc267 7535 HAVE_CXX17=1
0bcda685 7536
f74dc267 7537$as_echo "#define HAVE_CXX17 1" >>confdefs.h
0bcda685
PA
7538
7539 fi
7540
7541
7542
7543
c971b7fa
PA
7544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7545$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 7546if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
7547 $as_echo_n "(cached) " >&6
7548else
7549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7550/* end confdefs.h. */
7551#include <stdlib.h>
7552#include <stdarg.h>
7553#include <string.h>
7554#include <float.h>
7555
7556int
7557main ()
7558{
7559
7560 ;
7561 return 0;
7562}
7563_ACEOF
7564if ac_fn_c_try_compile "$LINENO"; then :
7565 ac_cv_header_stdc=yes
7566else
7567 ac_cv_header_stdc=no
7568fi
7569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7570
7571if test $ac_cv_header_stdc = yes; then
7572 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7574/* end confdefs.h. */
7575#include <string.h>
7576
7577_ACEOF
7578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
7579 $EGREP "memchr" >/dev/null 2>&1; then :
7580
68070c10 7581else
81ecdfbb
RW
7582 ac_cv_header_stdc=no
7583fi
7584rm -f conftest*
68070c10
PA
7585
7586fi
68070c10 7587
81ecdfbb
RW
7588if test $ac_cv_header_stdc = yes; then
7589 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7591/* end confdefs.h. */
7592#include <stdlib.h>
68070c10 7593
68070c10 7594_ACEOF
81ecdfbb
RW
7595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7596 $EGREP "free" >/dev/null 2>&1; then :
68070c10
PA
7597
7598else
81ecdfbb 7599 ac_cv_header_stdc=no
68070c10 7600fi
81ecdfbb
RW
7601rm -f conftest*
7602
68070c10
PA
7603fi
7604
81ecdfbb
RW
7605if test $ac_cv_header_stdc = yes; then
7606 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7607 if test "$cross_compiling" = yes; then :
7608 :
43d5792c 7609else
81ecdfbb 7610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7611/* end confdefs.h. */
81ecdfbb
RW
7612#include <ctype.h>
7613#include <stdlib.h>
7614#if ((' ' & 0x0FF) == 0x020)
7615# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7616# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7617#else
7618# define ISLOWER(c) \
7619 (('a' <= (c) && (c) <= 'i') \
7620 || ('j' <= (c) && (c) <= 'r') \
7621 || ('s' <= (c) && (c) <= 'z'))
7622# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7623#endif
7624
7625#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
bec39cab
AC
7626int
7627main ()
7628{
81ecdfbb
RW
7629 int i;
7630 for (i = 0; i < 256; i++)
7631 if (XOR (islower (i), ISLOWER (i))
7632 || toupper (i) != TOUPPER (i))
7633 return 2;
bec39cab
AC
7634 return 0;
7635}
7636_ACEOF
81ecdfbb 7637if ac_fn_c_try_run "$LINENO"; then :
bec39cab 7638
81ecdfbb
RW
7639else
7640 ac_cv_header_stdc=no
43d5792c 7641fi
81ecdfbb
RW
7642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7643 conftest.$ac_objext conftest.beam conftest.$ac_ext
43d5792c 7644fi
e122f1f5 7645
68070c10 7646fi
81ecdfbb
RW
7647fi
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7649$as_echo "$ac_cv_header_stdc" >&6; }
7650if test $ac_cv_header_stdc = yes; then
68070c10 7651
81ecdfbb 7652$as_echo "#define STDC_HEADERS 1" >>confdefs.h
68070c10 7653
68070c10 7654fi
68070c10 7655
68070c10 7656
db6878ac
SM
7657ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7658if test "x$ac_cv_type_size_t" = xyes; then :
8ecfd7bd 7659
db6878ac 7660else
4d696a5c 7661
db6878ac
SM
7662cat >>confdefs.h <<_ACEOF
7663#define size_t unsigned int
7664_ACEOF
4d696a5c 7665
8ecfd7bd
SDJ
7666fi
7667
7668
6d580b63 7669
8ecfd7bd 7670
db6878ac
SM
7671 for ac_header in $ac_header_list
7672do :
7673 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7674ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7675"
7676if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7677 cat >>confdefs.h <<_ACEOF
7678#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7679_ACEOF
8ecfd7bd 7680
6d580b63
YQ
7681fi
7682
db6878ac 7683done
8ecfd7bd 7684
bd885420 7685
bd885420
YQ
7686
7687
7688
7689
7690
db6878ac
SM
7691ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7692if test "x$ac_cv_type_pid_t" = xyes; then :
bd885420 7693
61c125b9 7694else
60d6cfc9 7695
db6878ac
SM
7696cat >>confdefs.h <<_ACEOF
7697#define pid_t int
7698_ACEOF
60d6cfc9 7699
db6878ac 7700fi
61c125b9 7701
db6878ac
SM
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7703$as_echo_n "checking for a sed that does not truncate output... " >&6; }
7704if ${ac_cv_path_SED+:} false; then :
61c125b9
TT
7705 $as_echo_n "(cached) " >&6
7706else
db6878ac
SM
7707 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7708 for ac_i in 1 2 3 4 5 6 7; do
7709 ac_script="$ac_script$as_nl$ac_script"
7710 done
7711 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7712 { ac_script=; unset ac_script;}
7713 if test -z "$SED"; then
7714 ac_path_SED_found=false
7715 # Loop through the user's path and test for each of PROGNAME-LIST
7716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7717for as_dir in $PATH
7718do
7719 IFS=$as_save_IFS
7720 test -z "$as_dir" && as_dir=.
7721 for ac_prog in sed gsed; do
7722 for ac_exec_ext in '' $ac_executable_extensions; do
7723 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7724 as_fn_executable_p "$ac_path_SED" || continue
7725# Check for GNU ac_path_SED and select it if it is found.
7726 # Check for GNU $ac_path_SED
7727case `"$ac_path_SED" --version 2>&1` in
7728*GNU*)
7729 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7730*)
7731 ac_count=0
7732 $as_echo_n 0123456789 >"conftest.in"
7733 while :
7734 do
7735 cat "conftest.in" "conftest.in" >"conftest.tmp"
7736 mv "conftest.tmp" "conftest.in"
7737 cp "conftest.in" "conftest.nl"
7738 $as_echo '' >> "conftest.nl"
7739 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7740 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7741 as_fn_arith $ac_count + 1 && ac_count=$as_val
7742 if test $ac_count -gt ${ac_path_SED_max-0}; then
7743 # Best one so far, save it but keep looking for a better one
7744 ac_cv_path_SED="$ac_path_SED"
7745 ac_path_SED_max=$ac_count
61c125b9 7746 fi
db6878ac
SM
7747 # 10*(2^10) chars as input seems more than enough
7748 test $ac_count -gt 10 && break
61c125b9 7749 done
db6878ac
SM
7750 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7751esac
61c125b9 7752
db6878ac
SM
7753 $ac_path_SED_found && break 3
7754 done
7755 done
7756 done
7757IFS=$as_save_IFS
7758 if test -z "$ac_cv_path_SED"; then
7759 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7760 fi
61c125b9 7761else
db6878ac 7762 ac_cv_path_SED=$SED
61c125b9
TT
7763fi
7764
7765fi
db6878ac
SM
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7767$as_echo "$ac_cv_path_SED" >&6; }
7768 SED="$ac_cv_path_SED"
7769 rm -f conftest.sed
61c125b9 7770
d0ac1c44 7771
db6878ac
SM
7772 if test "X$prefix" = "XNONE"; then
7773 acl_final_prefix="$ac_default_prefix"
7774 else
7775 acl_final_prefix="$prefix"
7776 fi
7777 if test "X$exec_prefix" = "XNONE"; then
7778 acl_final_exec_prefix='${prefix}'
7779 else
7780 acl_final_exec_prefix="$exec_prefix"
7781 fi
7782 acl_save_prefix="$prefix"
7783 prefix="$acl_final_prefix"
7784 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7785 prefix="$acl_save_prefix"
05ea2a05
TT
7786
7787
7788# Check whether --with-gnu-ld was given.
7789if test "${with_gnu_ld+set}" = set; then :
7790 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7791else
7792 with_gnu_ld=no
7793fi
7794
7795# Prepare PATH_SEPARATOR.
7796# The user is always right.
7797if test "${PATH_SEPARATOR+set}" != set; then
7798 echo "#! /bin/sh" >conf$$.sh
7799 echo "exit 0" >>conf$$.sh
7800 chmod +x conf$$.sh
7801 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7802 PATH_SEPARATOR=';'
7803 else
7804 PATH_SEPARATOR=:
7805 fi
7806 rm -f conf$$.sh
7807fi
7808ac_prog=ld
7809if test "$GCC" = yes; then
7810 # Check if gcc -print-prog-name=ld gives a path.
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7812$as_echo_n "checking for ld used by GCC... " >&6; }
7813 case $host in
7814 *-*-mingw*)
7815 # gcc leaves a trailing carriage return which upsets mingw
7816 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7817 *)
7818 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7819 esac
7820 case $ac_prog in
7821 # Accept absolute paths.
7822 [\\/]* | [A-Za-z]:[\\/]*)
7823 re_direlt='/[^/][^/]*/\.\./'
7824 # Canonicalize the path of ld
7825 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7826 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7827 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7828 done
7829 test -z "$LD" && LD="$ac_prog"
7830 ;;
7831 "")
7832 # If it fails, then pretend we aren't using GCC.
7833 ac_prog=ld
7834 ;;
7835 *)
7836 # If it is relative, then search for the first ld in PATH.
7837 with_gnu_ld=unknown
7838 ;;
7839 esac
7840elif test "$with_gnu_ld" = yes; then
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7842$as_echo_n "checking for GNU ld... " >&6; }
7843else
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7845$as_echo_n "checking for non-GNU ld... " >&6; }
7846fi
7847if ${acl_cv_path_LD+:} false; then :
7848 $as_echo_n "(cached) " >&6
7849else
7850 if test -z "$LD"; then
7851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7852 for ac_dir in $PATH; do
7853 test -z "$ac_dir" && ac_dir=.
7854 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7855 acl_cv_path_LD="$ac_dir/$ac_prog"
7856 # Check to see if the program is GNU ld. I'd rather use --version,
7857 # but apparently some GNU ld's only accept -v.
7858 # Break only if it was the GNU/non-GNU ld that we prefer.
93362ef5 7859 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
05ea2a05
TT
7860 test "$with_gnu_ld" != no && break
7861 else
7862 test "$with_gnu_ld" != yes && break
7863 fi
7864 fi
7865 done
7866 IFS="$ac_save_ifs"
7867else
7868 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7869fi
7870fi
7871
7872LD="$acl_cv_path_LD"
7873if test -n "$LD"; then
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7875$as_echo "$LD" >&6; }
7876else
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7878$as_echo "no" >&6; }
7879fi
7880test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7882$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7883if ${acl_cv_prog_gnu_ld+:} false; then :
7884 $as_echo_n "(cached) " >&6
7885else
7886 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
93362ef5 7887if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
05ea2a05
TT
7888 acl_cv_prog_gnu_ld=yes
7889else
7890 acl_cv_prog_gnu_ld=no
7891fi
7892fi
7893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7894$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7895with_gnu_ld=$acl_cv_prog_gnu_ld
7896
7897
7898
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7900$as_echo_n "checking for shared library run path origin... " >&6; }
7901if ${acl_cv_rpath+:} false; then :
7902 $as_echo_n "(cached) " >&6
7903else
7904
7905 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7906 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7907 . ./conftest.sh
7908 rm -f ./conftest.sh
7909 acl_cv_rpath=done
7910
7911fi
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7913$as_echo "$acl_cv_rpath" >&6; }
7914 wl="$acl_cv_wl"
7915 libext="$acl_cv_libext"
7916 shlibext="$acl_cv_shlibext"
7917 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7918 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7919 hardcode_direct="$acl_cv_hardcode_direct"
7920 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7921 # Check whether --enable-rpath was given.
7922if test "${enable_rpath+set}" = set; then :
7923 enableval=$enable_rpath; :
7924else
7925 enable_rpath=yes
7926fi
7927
7928
7929
db6878ac
SM
7930 # Set the 'development' global.
7931 . $srcdir/../bfd/development.sh
7932
3266f10b
TT
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7934$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 7935if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
7936 $as_echo_n "(cached) " >&6
7937else
7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939/* end confdefs.h. */
7940#include <stdlib.h>
7941#include <stdarg.h>
7942#include <string.h>
7943#include <float.h>
7944
7945int
7946main ()
7947{
7948
7949 ;
7950 return 0;
7951}
7952_ACEOF
7953if ac_fn_c_try_compile "$LINENO"; then :
7954 ac_cv_header_stdc=yes
7955else
7956 ac_cv_header_stdc=no
7957fi
7958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7959
7960if test $ac_cv_header_stdc = yes; then
7961 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7963/* end confdefs.h. */
7964#include <string.h>
7965
7966_ACEOF
7967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7968 $EGREP "memchr" >/dev/null 2>&1; then :
7969
7970else
7971 ac_cv_header_stdc=no
7972fi
7973rm -f conftest*
7974
7975fi
7976
7977if test $ac_cv_header_stdc = yes; then
7978 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7980/* end confdefs.h. */
7981#include <stdlib.h>
7982
7983_ACEOF
7984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7985 $EGREP "free" >/dev/null 2>&1; then :
7986
7987else
7988 ac_cv_header_stdc=no
7989fi
7990rm -f conftest*
7991
7992fi
7993
7994if test $ac_cv_header_stdc = yes; then
7995 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7996 if test "$cross_compiling" = yes; then :
7997 :
7998else
7999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8000/* end confdefs.h. */
8001#include <ctype.h>
8002#include <stdlib.h>
8003#if ((' ' & 0x0FF) == 0x020)
8004# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8005# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8006#else
8007# define ISLOWER(c) \
8008 (('a' <= (c) && (c) <= 'i') \
8009 || ('j' <= (c) && (c) <= 'r') \
8010 || ('s' <= (c) && (c) <= 'z'))
8011# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8012#endif
8013
8014#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8015int
8016main ()
8017{
8018 int i;
8019 for (i = 0; i < 256; i++)
8020 if (XOR (islower (i), ISLOWER (i))
8021 || toupper (i) != TOUPPER (i))
8022 return 2;
8023 return 0;
8024}
8025_ACEOF
8026if ac_fn_c_try_run "$LINENO"; then :
8027
8028else
8029 ac_cv_header_stdc=no
8030fi
8031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8032 conftest.$ac_objext conftest.beam conftest.$ac_ext
8033fi
8034
8035fi
8036fi
8037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8038$as_echo "$ac_cv_header_stdc" >&6; }
8039if test $ac_cv_header_stdc = yes; then
8040
8041$as_echo "#define STDC_HEADERS 1" >>confdefs.h
8042
3266f10b
TT
8043fi
8044
8045 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8046# for constant arguments. Useless!
8047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8048$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 8049if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
8050 $as_echo_n "(cached) " >&6
8051else
8052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8053/* end confdefs.h. */
8054#include <alloca.h>
8055int
8056main ()
8057{
8058char *p = (char *) alloca (2 * sizeof (int));
8059 if (p) return 0;
8060 ;
8061 return 0;
8062}
8063_ACEOF
8064if ac_fn_c_try_link "$LINENO"; then :
8065 ac_cv_working_alloca_h=yes
8066else
8067 ac_cv_working_alloca_h=no
8068fi
8069rm -f core conftest.err conftest.$ac_objext \
8070 conftest$ac_exeext conftest.$ac_ext
8071fi
8072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8073$as_echo "$ac_cv_working_alloca_h" >&6; }
8074if test $ac_cv_working_alloca_h = yes; then
8075
8076$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8077
8078fi
8079
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8081$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 8082if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
8083 $as_echo_n "(cached) " >&6
8084else
8085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8086/* end confdefs.h. */
8087#ifdef __GNUC__
8088# define alloca __builtin_alloca
8089#else
8090# ifdef _MSC_VER
8091# include <malloc.h>
8092# define alloca _alloca
8093# else
8094# ifdef HAVE_ALLOCA_H
8095# include <alloca.h>
8096# else
8097# ifdef _AIX
8098 #pragma alloca
8099# else
8100# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 8101void *alloca (size_t);
3266f10b
TT
8102# endif
8103# endif
8104# endif
8105# endif
8106#endif
8107
8108int
8109main ()
8110{
8111char *p = (char *) alloca (1);
8112 if (p) return 0;
8113 ;
8114 return 0;
8115}
8116_ACEOF
8117if ac_fn_c_try_link "$LINENO"; then :
8118 ac_cv_func_alloca_works=yes
8119else
8120 ac_cv_func_alloca_works=no
8121fi
8122rm -f core conftest.err conftest.$ac_objext \
8123 conftest$ac_exeext conftest.$ac_ext
8124fi
8125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8126$as_echo "$ac_cv_func_alloca_works" >&6; }
8127
8128if test $ac_cv_func_alloca_works = yes; then
8129
8130$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8131
8132else
8133 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8134# that cause trouble. Some versions do not even contain alloca or
8135# contain a buggy version. If you still want to use their alloca,
8136# use ar to extract alloca.o from them instead of compiling alloca.c.
8137
8138ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8139
8140$as_echo "#define C_ALLOCA 1" >>confdefs.h
8141
8142
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8144$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 8145if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
8146 $as_echo_n "(cached) " >&6
8147else
8148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8149/* end confdefs.h. */
8150#if defined CRAY && ! defined CRAY2
8151webecray
8152#else
8153wenotbecray
8154#endif
8155
8156_ACEOF
8157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8158 $EGREP "webecray" >/dev/null 2>&1; then :
8159 ac_cv_os_cray=yes
8160else
8161 ac_cv_os_cray=no
8162fi
8163rm -f conftest*
8164
8165fi
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8167$as_echo "$ac_cv_os_cray" >&6; }
8168if test $ac_cv_os_cray = yes; then
8169 for ac_func in _getb67 GETB67 getb67; do
8170 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8171ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 8172if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
8173
8174cat >>confdefs.h <<_ACEOF
8175#define CRAY_STACKSEG_END $ac_func
8176_ACEOF
8177
8178 break
8179fi
8180
8181 done
8182fi
8183
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8185$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 8186if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
8187 $as_echo_n "(cached) " >&6
8188else
8189 if test "$cross_compiling" = yes; then :
8190 ac_cv_c_stack_direction=0
8191else
8192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8193/* end confdefs.h. */
8194$ac_includes_default
8195int
d0ac1c44 8196find_stack_direction (int *addr, int depth)
3266f10b 8197{
d0ac1c44
SM
8198 int dir, dummy = 0;
8199 if (! addr)
8200 addr = &dummy;
8201 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8202 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8203 return dir + dummy;
3266f10b
TT
8204}
8205
8206int
d0ac1c44 8207main (int argc, char **argv)
3266f10b 8208{
d0ac1c44 8209 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
8210}
8211_ACEOF
8212if ac_fn_c_try_run "$LINENO"; then :
8213 ac_cv_c_stack_direction=1
8214else
8215 ac_cv_c_stack_direction=-1
8216fi
8217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8218 conftest.$ac_objext conftest.beam conftest.$ac_ext
8219fi
8220
8221fi
8222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8223$as_echo "$ac_cv_c_stack_direction" >&6; }
8224cat >>confdefs.h <<_ACEOF
8225#define STACK_DIRECTION $ac_cv_c_stack_direction
8226_ACEOF
8227
8228
8229fi
8230
8231
b2ceabe8
TT
8232 WIN32APILIBS=
8233 case ${host} in
8234 *mingw32*)
8235
8236$as_echo "#define USE_WIN32API 1" >>confdefs.h
8237
8238 WIN32APILIBS="-lws2_32"
8239 ;;
8240 esac
8241
3266f10b
TT
8242
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8244$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 8245if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
8246 $as_echo_n "(cached) " >&6
8247else
8248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8249/* end confdefs.h. */
8250#include <langinfo.h>
8251int
8252main ()
8253{
8254char* cs = nl_langinfo(CODESET);
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259if ac_fn_c_try_link "$LINENO"; then :
8260 am_cv_langinfo_codeset=yes
8261else
8262 am_cv_langinfo_codeset=no
8263fi
8264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
8266
8267fi
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8269$as_echo "$am_cv_langinfo_codeset" >&6; }
8270 if test $am_cv_langinfo_codeset = yes; then
8271
8272$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8273
8274 fi
8275
8276
c8693053 8277 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
8278do :
8279 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8280ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 8281if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
8282 cat >>confdefs.h <<_ACEOF
8283#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8284_ACEOF
8285
8286fi
8287
8288done
8289
8290
05ea2a05
TT
8291
8292for ac_func in getpagesize
3266f10b 8293do :
05ea2a05
TT
8294 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
8295if test "x$ac_cv_func_getpagesize" = xyes; then :
3266f10b 8296 cat >>confdefs.h <<_ACEOF
05ea2a05 8297#define HAVE_GETPAGESIZE 1
3266f10b
TT
8298_ACEOF
8299
8300fi
8301done
8302
05ea2a05
TT
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
8304$as_echo_n "checking for working mmap... " >&6; }
8305if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
8306 $as_echo_n "(cached) " >&6
3266f10b 8307else
05ea2a05
TT
8308 if test "$cross_compiling" = yes; then :
8309 ac_cv_func_mmap_fixed_mapped=no
8310else
8311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8312/* end confdefs.h. */
8313$ac_includes_default
8314/* malloc might have been renamed as rpl_malloc. */
8315#undef malloc
8316
8317/* Thanks to Mike Haertel and Jim Avera for this test.
8318 Here is a matrix of mmap possibilities:
8319 mmap private not fixed
8320 mmap private fixed at somewhere currently unmapped
8321 mmap private fixed at somewhere already mapped
8322 mmap shared not fixed
8323 mmap shared fixed at somewhere currently unmapped
8324 mmap shared fixed at somewhere already mapped
8325 For private mappings, we should verify that changes cannot be read()
8326 back from the file, nor mmap's back from the file at a different
8327 address. (There have been systems where private was not correctly
8328 implemented like the infamous i386 svr4.0, and systems where the
8329 VM page cache was not coherent with the file system buffer cache
8330 like early versions of FreeBSD and possibly contemporary NetBSD.)
8331 For shared mappings, we should conversely verify that changes get
8332 propagated back to all the places they're supposed to be.
8333
8334 Grep wants private fixed already mapped.
8335 The main things grep needs to know about mmap are:
8336 * does it exist and is it safe to write into the mmap'd area
8337 * how to use it (BSD variants) */
8338
8339#include <fcntl.h>
8340#include <sys/mman.h>
8341
8342#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8343char *malloc ();
8344#endif
3266f10b 8345
05ea2a05
TT
8346/* This mess was copied from the GNU getpagesize.h. */
8347#ifndef HAVE_GETPAGESIZE
8348# ifdef _SC_PAGESIZE
8349# define getpagesize() sysconf(_SC_PAGESIZE)
8350# else /* no _SC_PAGESIZE */
8351# ifdef HAVE_SYS_PARAM_H
8352# include <sys/param.h>
8353# ifdef EXEC_PAGESIZE
8354# define getpagesize() EXEC_PAGESIZE
8355# else /* no EXEC_PAGESIZE */
8356# ifdef NBPG
8357# define getpagesize() NBPG * CLSIZE
8358# ifndef CLSIZE
8359# define CLSIZE 1
8360# endif /* no CLSIZE */
8361# else /* no NBPG */
8362# ifdef NBPC
8363# define getpagesize() NBPC
8364# else /* no NBPC */
8365# ifdef PAGESIZE
8366# define getpagesize() PAGESIZE
8367# endif /* PAGESIZE */
8368# endif /* no NBPC */
8369# endif /* no NBPG */
8370# endif /* no EXEC_PAGESIZE */
8371# else /* no HAVE_SYS_PARAM_H */
8372# define getpagesize() 8192 /* punt totally */
8373# endif /* no HAVE_SYS_PARAM_H */
8374# endif /* no _SC_PAGESIZE */
8375
8376#endif /* no HAVE_GETPAGESIZE */
3266f10b 8377
05ea2a05
TT
8378int
8379main ()
8380{
8381 char *data, *data2, *data3;
8382 const char *cdata2;
8383 int i, pagesize;
8384 int fd, fd2;
3266f10b 8385
05ea2a05 8386 pagesize = getpagesize ();
5e030278 8387
05ea2a05
TT
8388 /* First, make a file with some known garbage in it. */
8389 data = (char *) malloc (pagesize);
8390 if (!data)
8391 return 1;
8392 for (i = 0; i < pagesize; ++i)
8393 *(data + i) = rand ();
8394 umask (0);
8395 fd = creat ("conftest.mmap", 0600);
8396 if (fd < 0)
8397 return 2;
8398 if (write (fd, data, pagesize) != pagesize)
8399 return 3;
8400 close (fd);
8401
8402 /* Next, check that the tail of a page is zero-filled. File must have
8403 non-zero length, otherwise we risk SIGBUS for entire page. */
8404 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8405 if (fd2 < 0)
8406 return 4;
8407 cdata2 = "";
8408 if (write (fd2, cdata2, 1) != 1)
8409 return 5;
8410 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
8411 if (data2 == MAP_FAILED)
8412 return 6;
8413 for (i = 0; i < pagesize; ++i)
8414 if (*(data2 + i))
8415 return 7;
8416 close (fd2);
8417 if (munmap (data2, pagesize))
8418 return 8;
8419
8420 /* Next, try to mmap the file at a fixed address which already has
8421 something else allocated at it. If we can, also make sure that
8422 we see the same garbage. */
8423 fd = open ("conftest.mmap", O_RDWR);
8424 if (fd < 0)
8425 return 9;
8426 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8427 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8428 return 10;
8429 for (i = 0; i < pagesize; ++i)
8430 if (*(data + i) != *(data2 + i))
8431 return 11;
8432
8433 /* Finally, make sure that changes to the mapped area do not
8434 percolate back to the file as seen by read(). (This is a bug on
8435 some variants of i386 svr4.0.) */
8436 for (i = 0; i < pagesize; ++i)
8437 *(data2 + i) = *(data2 + i) + 1;
8438 data3 = (char *) malloc (pagesize);
8439 if (!data3)
8440 return 12;
8441 if (read (fd, data3, pagesize) != pagesize)
8442 return 13;
8443 for (i = 0; i < pagesize; ++i)
8444 if (*(data + i) != *(data3 + i))
8445 return 14;
8446 close (fd);
8447 return 0;
8448}
8449_ACEOF
8450if ac_fn_c_try_run "$LINENO"; then :
8451 ac_cv_func_mmap_fixed_mapped=yes
8452else
8453 ac_cv_func_mmap_fixed_mapped=no
8454fi
8455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8456 conftest.$ac_objext conftest.beam conftest.$ac_ext
8457fi
5e030278 8458
05ea2a05
TT
8459fi
8460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8461$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
8462if test $ac_cv_func_mmap_fixed_mapped = yes; then
5e030278 8463
05ea2a05 8464$as_echo "#define HAVE_MMAP 1" >>confdefs.h
5e030278 8465
05ea2a05
TT
8466fi
8467rm -f conftest.mmap conftest.txt
5e030278 8468
05ea2a05
TT
8469 for ac_header in vfork.h
8470do :
8471 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8472if test "x$ac_cv_header_vfork_h" = xyes; then :
8473 cat >>confdefs.h <<_ACEOF
8474#define HAVE_VFORK_H 1
8475_ACEOF
5e030278 8476
05ea2a05 8477fi
5e030278 8478
05ea2a05 8479done
5e030278 8480
05ea2a05
TT
8481for ac_func in fork vfork
8482do :
8483 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8484ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8485if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8486 cat >>confdefs.h <<_ACEOF
8487#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8488_ACEOF
8489
8490fi
8491done
8492
8493if test "x$ac_cv_func_fork" = xyes; then
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8495$as_echo_n "checking for working fork... " >&6; }
8496if ${ac_cv_func_fork_works+:} false; then :
8497 $as_echo_n "(cached) " >&6
8498else
8499 if test "$cross_compiling" = yes; then :
8500 ac_cv_func_fork_works=cross
8501else
8502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8503/* end confdefs.h. */
8504$ac_includes_default
8505int
8506main ()
8507{
8508
8509 /* By Ruediger Kuhlmann. */
8510 return fork () < 0;
8511
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516if ac_fn_c_try_run "$LINENO"; then :
8517 ac_cv_func_fork_works=yes
8518else
8519 ac_cv_func_fork_works=no
8520fi
8521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8522 conftest.$ac_objext conftest.beam conftest.$ac_ext
8523fi
8524
8525fi
8526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8527$as_echo "$ac_cv_func_fork_works" >&6; }
8528
8529else
8530 ac_cv_func_fork_works=$ac_cv_func_fork
8531fi
8532if test "x$ac_cv_func_fork_works" = xcross; then
8533 case $host in
8534 *-*-amigaos* | *-*-msdosdjgpp*)
8535 # Override, as these systems have only a dummy fork() stub
8536 ac_cv_func_fork_works=no
8537 ;;
8538 *)
8539 ac_cv_func_fork_works=yes
8540 ;;
8541 esac
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8543$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8544fi
8545ac_cv_func_vfork_works=$ac_cv_func_vfork
8546if test "x$ac_cv_func_vfork" = xyes; then
8547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8548$as_echo_n "checking for working vfork... " >&6; }
8549if ${ac_cv_func_vfork_works+:} false; then :
8550 $as_echo_n "(cached) " >&6
8551else
8552 if test "$cross_compiling" = yes; then :
8553 ac_cv_func_vfork_works=cross
8554else
8555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8556/* end confdefs.h. */
8557/* Thanks to Paul Eggert for this test. */
8558$ac_includes_default
8559#include <sys/wait.h>
8560#ifdef HAVE_VFORK_H
8561# include <vfork.h>
8562#endif
8563/* On some sparc systems, changes by the child to local and incoming
8564 argument registers are propagated back to the parent. The compiler
8565 is told about this with #include <vfork.h>, but some compilers
8566 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
8567 static variable whose address is put into a register that is
8568 clobbered by the vfork. */
8569static void
8570#ifdef __cplusplus
8571sparc_address_test (int arg)
8572# else
8573sparc_address_test (arg) int arg;
8574#endif
8575{
8576 static pid_t child;
8577 if (!child) {
8578 child = vfork ();
8579 if (child < 0) {
8580 perror ("vfork");
8581 _exit(2);
8582 }
8583 if (!child) {
8584 arg = getpid();
8585 write(-1, "", 0);
8586 _exit (arg);
8587 }
8588 }
8589}
8590
8591int
8592main ()
8593{
8594 pid_t parent = getpid ();
8595 pid_t child;
8596
8597 sparc_address_test (0);
8598
8599 child = vfork ();
8600
8601 if (child == 0) {
8602 /* Here is another test for sparc vfork register problems. This
8603 test uses lots of local variables, at least as many local
8604 variables as main has allocated so far including compiler
8605 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
8606 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
8607 reuse the register of parent for one of the local variables,
8608 since it will think that parent can't possibly be used any more
8609 in this routine. Assigning to the local variable will thus
8610 munge parent in the parent process. */
8611 pid_t
8612 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8613 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8614 /* Convince the compiler that p..p7 are live; otherwise, it might
8615 use the same hardware register for all 8 local variables. */
8616 if (p != p1 || p != p2 || p != p3 || p != p4
8617 || p != p5 || p != p6 || p != p7)
8618 _exit(1);
8619
8620 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8621 from child file descriptors. If the child closes a descriptor
8622 before it execs or exits, this munges the parent's descriptor
8623 as well. Test for this by closing stdout in the child. */
8624 _exit(close(fileno(stdout)) != 0);
8625 } else {
8626 int status;
8627 struct stat st;
8628
8629 while (wait(&status) != child)
8630 ;
8631 return (
8632 /* Was there some problem with vforking? */
8633 child < 0
8634
8635 /* Did the child fail? (This shouldn't happen.) */
8636 || status
8637
8638 /* Did the vfork/compiler bug occur? */
8639 || parent != getpid()
8640
8641 /* Did the file descriptor bug occur? */
8642 || fstat(fileno(stdout), &st) != 0
8643 );
8644 }
8645}
8646_ACEOF
8647if ac_fn_c_try_run "$LINENO"; then :
8648 ac_cv_func_vfork_works=yes
8649else
8650 ac_cv_func_vfork_works=no
8651fi
8652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8653 conftest.$ac_objext conftest.beam conftest.$ac_ext
8654fi
8655
8656fi
8657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8658$as_echo "$ac_cv_func_vfork_works" >&6; }
8659
8660fi;
8661if test "x$ac_cv_func_fork_works" = xcross; then
8662 ac_cv_func_vfork_works=$ac_cv_func_vfork
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8664$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8665fi
8666
8667if test "x$ac_cv_func_vfork_works" = xyes; then
8668
8669$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8670
8671else
8672
8673$as_echo "#define vfork fork" >>confdefs.h
8674
8675fi
8676if test "x$ac_cv_func_fork_works" = xyes; then
8677
8678$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8679
5772d798
TT
8680fi
8681
8682 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8684$as_echo_n "checking for library containing socketpair... " >&6; }
8685if ${ac_cv_search_socketpair+:} false; then :
8686 $as_echo_n "(cached) " >&6
8687else
8688 ac_func_search_save_LIBS=$LIBS
8689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690/* end confdefs.h. */
8691
8692/* Override any GCC internal prototype to avoid an error.
8693 Use char because int might match the return type of a GCC
8694 builtin and then its argument prototype would still apply. */
8695#ifdef __cplusplus
8696extern "C"
8697#endif
8698char socketpair ();
8699int
8700main ()
8701{
8702return socketpair ();
8703 ;
8704 return 0;
8705}
8706_ACEOF
8707for ac_lib in '' socket; do
8708 if test -z "$ac_lib"; then
8709 ac_res="none required"
8710 else
8711 ac_res=-l$ac_lib
8712 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8713 fi
8714 if ac_fn_c_try_link "$LINENO"; then :
8715 ac_cv_search_socketpair=$ac_res
8716fi
8717rm -f core conftest.err conftest.$ac_objext \
8718 conftest$ac_exeext
8719 if ${ac_cv_search_socketpair+:} false; then :
8720 break
8721fi
8722done
8723if ${ac_cv_search_socketpair+:} false; then :
8724
8725else
8726 ac_cv_search_socketpair=no
8727fi
8728rm conftest.$ac_ext
8729LIBS=$ac_func_search_save_LIBS
8730fi
8731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8732$as_echo "$ac_cv_search_socketpair" >&6; }
8733ac_res=$ac_cv_search_socketpair
8734if test "$ac_res" != no; then :
8735 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8736
05ea2a05
TT
8737fi
8738
8ae8e197 8739 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05 8740 ptrace64 sbrk setns sigaltstack sigprocmask \
f4931779 8741 setpgid setpgrp getrusage getauxval sigtimedwait
05ea2a05
TT
8742do :
8743 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8744ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8745if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8746 cat >>confdefs.h <<_ACEOF
8747#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8748_ACEOF
8749
8750fi
8751done
8752
8753
0b03c6f0
TT
8754 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
8755 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
8756 # only in linux/personality.h.
8757 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
8758"
8759if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
8760 ac_have_decl=1
8761else
8762 ac_have_decl=0
8763fi
8764
8765cat >>confdefs.h <<_ACEOF
8766#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
8767_ACEOF
8768
8769
05ea2a05
TT
8770 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8771if test "x$ac_cv_have_decl_strstr" = xyes; then :
8772 ac_have_decl=1
8773else
8774 ac_have_decl=0
8775fi
8776
8777cat >>confdefs.h <<_ACEOF
8778#define HAVE_DECL_STRSTR $ac_have_decl
8779_ACEOF
8780
8781
8782 # ----------------------- #
8783 # Checks for structures. #
8784 # ----------------------- #
8785
8786 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8787if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
8788
8789cat >>confdefs.h <<_ACEOF
8790#define HAVE_STRUCT_STAT_ST_BLOCKS 1
8791_ACEOF
8792
8793
8794fi
8795ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
8796if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
8797
8798cat >>confdefs.h <<_ACEOF
8799#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
8800_ACEOF
8801
8802
8803fi
8804
8805
92a048fd
SM
8806 # On FreeBSD we need libutil for the kinfo_get* functions. On
8807 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8808 # Figure out which one to use.
05ea2a05
TT
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8810$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8811if ${ac_cv_search_kinfo_getfile+:} false; then :
8812 $as_echo_n "(cached) " >&6
8813else
8814 ac_func_search_save_LIBS=$LIBS
8815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
8817
8818/* Override any GCC internal prototype to avoid an error.
8819 Use char because int might match the return type of a GCC
8820 builtin and then its argument prototype would still apply. */
8821#ifdef __cplusplus
8822extern "C"
8823#endif
8824char kinfo_getfile ();
8825int
8826main ()
8827{
8828return kinfo_getfile ();
8829 ;
8830 return 0;
8831}
8832_ACEOF
8833for ac_lib in '' util util-freebsd; do
8834 if test -z "$ac_lib"; then
8835 ac_res="none required"
8836 else
8837 ac_res=-l$ac_lib
8838 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8839 fi
8840 if ac_fn_c_try_link "$LINENO"; then :
8841 ac_cv_search_kinfo_getfile=$ac_res
8842fi
8843rm -f core conftest.err conftest.$ac_objext \
8844 conftest$ac_exeext
8845 if ${ac_cv_search_kinfo_getfile+:} false; then :
8846 break
8847fi
8848done
8849if ${ac_cv_search_kinfo_getfile+:} false; then :
8850
8851else
8852 ac_cv_search_kinfo_getfile=no
8853fi
8854rm conftest.$ac_ext
8855LIBS=$ac_func_search_save_LIBS
8856fi
8857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8858$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8859ac_res=$ac_cv_search_kinfo_getfile
8860if test "$ac_res" != no; then :
8861 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8862
92a048fd
SM
8863fi
8864
8865
8866 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
8867 for ac_func in kinfo_getfile
8868do :
8869 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
8870if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
8871 cat >>confdefs.h <<_ACEOF
8872#define HAVE_KINFO_GETFILE 1
8873_ACEOF
05ea2a05
TT
8874
8875fi
92a048fd 8876done
05ea2a05
TT
8877
8878
261b0748
LM
8879 # ----------------------- #
8880 # Check for threading. #
8881 # ----------------------- #
8882
8883 # Check whether --enable-threading was given.
8884if test "${enable_threading+set}" = set; then :
8885 enableval=$enable_threading; case "$enableval" in
8886 yes) want_threading=yes ;;
8887 no) want_threading=no ;;
8888 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
8889 esac
8890else
8891 want_threading=yes
8892fi
8893
8894
05ea2a05
TT
8895 # Check for std::thread. This does not work on some platforms, like
8896 # mingw and DJGPP.
8897 ac_ext=cpp
8898ac_cpp='$CXXCPP $CPPFLAGS'
8899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8902
8903
8904
8905
8906
8907ac_ext=c
8908ac_cpp='$CPP $CPPFLAGS'
8909ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8910ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8911ac_compiler_gnu=$ac_cv_c_compiler_gnu
8912
8913ax_pthread_ok=no
8914
8915# We used to check for pthread.h first, but this fails if pthread.h
8916# requires special compiler flags (e.g. on Tru64 or Sequent).
8917# It gets checked for in the link test anyway.
8918
8919# First of all, check if the user has set any of the PTHREAD_LIBS,
5e030278
TT
8920# etcetera environment variables, and if threads linking works using
8921# them:
8922if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
8923 ax_pthread_save_CC="$CC"
8924 ax_pthread_save_CFLAGS="$CFLAGS"
8925 ax_pthread_save_LIBS="$LIBS"
05ea2a05
TT
8926 if test "x$PTHREAD_CC" != "x"; then :
8927 CC="$PTHREAD_CC"
8928fi
8929 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8930 LIBS="$PTHREAD_LIBS $LIBS"
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8932$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8934/* end confdefs.h. */
8935
8936/* Override any GCC internal prototype to avoid an error.
8937 Use char because int might match the return type of a GCC
8938 builtin and then its argument prototype would still apply. */
8939#ifdef __cplusplus
8940extern "C"
8941#endif
8942char pthread_join ();
8943int
8944main ()
8945{
8946return pthread_join ();
8947 ;
8948 return 0;
8949}
8950_ACEOF
8951if ac_fn_c_try_link "$LINENO"; then :
8952 ax_pthread_ok=yes
8953fi
8954rm -f core conftest.err conftest.$ac_objext \
8955 conftest$ac_exeext conftest.$ac_ext
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8957$as_echo "$ax_pthread_ok" >&6; }
8958 if test "x$ax_pthread_ok" = "xno"; then
8959 PTHREAD_LIBS=""
8960 PTHREAD_CFLAGS=""
8961 fi
8962 CC="$ax_pthread_save_CC"
8963 CFLAGS="$ax_pthread_save_CFLAGS"
8964 LIBS="$ax_pthread_save_LIBS"
8965fi
8966
8967# We must check for the threads library under a number of different
8968# names; the ordering is very important because some systems
8969# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8970# libraries is broken (non-POSIX).
8971
8972# Create a list of thread flags to try. Items starting with a "-" are
8973# C compiler flags, and other items are library names, except for "none"
8974# which indicates that we try without any flags at all, and "pthread-config"
8975# which is a program returning the flags for the Pth emulation library.
8976
8977ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
8978
8979# The ordering *is* (sometimes) important. Some notes on the
8980# individual items follow:
8981
8982# pthreads: AIX (must check this before -lpthread)
8983# none: in case threads are in libc; should be tried before -Kthread and
8984# other compiler flags to prevent continual compiler warnings
8985# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8986# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8987# (Note: HP C rejects this with "bad form for `-t' option")
8988# -pthreads: Solaris/gcc (Note: HP C also rejects)
8989# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8990# doesn't hurt to check since this sometimes defines pthreads and
8991# -D_REENTRANT too), HP C (must be checked before -lpthread, which
8992# is present but should not be used directly; and before -mthreads,
8993# because the compiler interprets this as "-mt" + "-hreads")
8994# -mthreads: Mingw32/gcc, Lynx/gcc
8995# pthread: Linux, etcetera
8996# --thread-safe: KAI C++
8997# pthread-config: use pthread-config program (for GNU Pth library)
8998
8999case $host_os in
9000
9001 freebsd*)
9002
9003 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
9004 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
9005
9006 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
9007 ;;
9008
9009 hpux*)
9010
9011 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
9012 # multi-threading and also sets -lpthread."
9013
9014 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
9015 ;;
9016
9017 openedition*)
9018
9019 # IBM z/OS requires a feature-test macro to be defined in order to
9020 # enable POSIX threads at all, so give the user a hint if this is
9021 # not set. (We don't define these ourselves, as they can affect
9022 # other portions of the system API in unpredictable ways.)
9023
9024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9025/* end confdefs.h. */
9026
9027# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
9028 AX_PTHREAD_ZOS_MISSING
9029# endif
9030
9031_ACEOF
9032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9033 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
9035$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
9036fi
9037rm -f conftest*
9038
9039 ;;
9040
9041 solaris*)
9042
9043 # On Solaris (at least, for some versions), libc contains stubbed
9044 # (non-functional) versions of the pthreads routines, so link-based
9045 # tests will erroneously succeed. (N.B.: The stubs are missing
9046 # pthread_cleanup_push, or rather a function called by this macro,
9047 # so we could check for that, but who knows whether they'll stub
9048 # that too in a future libc.) So we'll check first for the
9049 # standard Solaris way of linking pthreads (-mt -lpthread).
9050
9051 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
9052 ;;
9053esac
9054
9055# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
9056
9057if test "x$GCC" = "xyes"; then :
9058 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
9059fi
9060
9061# The presence of a feature test macro requesting re-entrant function
9062# definitions is, on some systems, a strong hint that pthreads support is
9063# correctly enabled
9064
9065case $host_os in
9066 darwin* | hpux* | linux* | osf* | solaris*)
9067 ax_pthread_check_macro="_REENTRANT"
9068 ;;
9069
9070 aix*)
9071 ax_pthread_check_macro="_THREAD_SAFE"
9072 ;;
9073
9074 *)
9075 ax_pthread_check_macro="--"
9076 ;;
9077esac
9078if test "x$ax_pthread_check_macro" = "x--"; then :
9079 ax_pthread_check_cond=0
9080else
9081 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
9082fi
9083
9084# Are we compiling with Clang?
9085
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
9087$as_echo_n "checking whether $CC is Clang... " >&6; }
9088if ${ax_cv_PTHREAD_CLANG+:} false; then :
9089 $as_echo_n "(cached) " >&6
9090else
9091 ax_cv_PTHREAD_CLANG=no
9092 # Note that Autoconf sets GCC=yes for Clang as well as GCC
9093 if test "x$GCC" = "xyes"; then
9094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9095/* end confdefs.h. */
9096/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
9097# if defined(__clang__) && defined(__llvm__)
9098 AX_PTHREAD_CC_IS_CLANG
9099# endif
9100
9101_ACEOF
9102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9103 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
9104 ax_cv_PTHREAD_CLANG=yes
9105fi
9106rm -f conftest*
9107
9108 fi
9109
9110fi
9111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
9112$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
9113ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
9114
9115ax_pthread_clang_warning=no
9116
9117# Clang needs special handling, because older versions handle the -pthread
9118# option in a rather... idiosyncratic way
9119
9120if test "x$ax_pthread_clang" = "xyes"; then
9121
9122 # Clang takes -pthread; it has never supported any other flag
9123
9124 # (Note 1: This will need to be revisited if a system that Clang
9125 # supports has POSIX threads in a separate library. This tends not
9126 # to be the way of modern systems, but it's conceivable.)
9127
9128 # (Note 2: On some systems, notably Darwin, -pthread is not needed
9129 # to get POSIX threads support; the API is always present and
9130 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
9131 # -pthread does define _REENTRANT, and while the Darwin headers
9132 # ignore this macro, third-party headers might not.)
9133
9134 PTHREAD_CFLAGS="-pthread"
9135 PTHREAD_LIBS=
9136
9137 ax_pthread_ok=yes
9138
9139 # However, older versions of Clang make a point of warning the user
9140 # that, in an invocation where only linking and no compilation is
9141 # taking place, the -pthread option has no effect ("argument unused
9142 # during compilation"). They expect -pthread to be passed in only
9143 # when source code is being compiled.
9144 #
9145 # Problem is, this is at odds with the way Automake and most other
9146 # C build frameworks function, which is that the same flags used in
9147 # compilation (CFLAGS) are also used in linking. Many systems
9148 # supported by AX_PTHREAD require exactly this for POSIX threads
9149 # support, and in fact it is often not straightforward to specify a
9150 # flag that is used only in the compilation phase and not in
9151 # linking. Such a scenario is extremely rare in practice.
9152 #
9153 # Even though use of the -pthread flag in linking would only print
9154 # a warning, this can be a nuisance for well-run software projects
9155 # that build with -Werror. So if the active version of Clang has
9156 # this misfeature, we search for an option to squash it.
9157
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
9159$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
9160if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
9161 $as_echo_n "(cached) " >&6
9162else
9163 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
9164 # Create an alternate version of $ac_link that compiles and
9165 # links in two steps (.c -> .o, .o -> exe) instead of one
9166 # (.c -> exe), because the warning occurs only in the second
9167 # step
9168 ax_pthread_save_ac_link="$ac_link"
9169 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
9170 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
9171 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
9172 ax_pthread_save_CFLAGS="$CFLAGS"
9173 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
9174 if test "x$ax_pthread_try" = "xunknown"; then :
9175 break
9176fi
9177 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
9178 ac_link="$ax_pthread_save_ac_link"
9179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9180/* end confdefs.h. */
9181int main(void){return 0;}
9182_ACEOF
9183if ac_fn_c_try_link "$LINENO"; then :
9184 ac_link="$ax_pthread_2step_ac_link"
9185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186/* end confdefs.h. */
9187int main(void){return 0;}
9188_ACEOF
9189if ac_fn_c_try_link "$LINENO"; then :
9190 break
9191fi
9192rm -f core conftest.err conftest.$ac_objext \
9193 conftest$ac_exeext conftest.$ac_ext
9194
9195fi
9196rm -f core conftest.err conftest.$ac_objext \
9197 conftest$ac_exeext conftest.$ac_ext
9198 done
9199 ac_link="$ax_pthread_save_ac_link"
9200 CFLAGS="$ax_pthread_save_CFLAGS"
9201 if test "x$ax_pthread_try" = "x"; then :
9202 ax_pthread_try=no
9203fi
9204 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
9205
9206fi
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
9208$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
9209
9210 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
9211 no | unknown) ;;
9212 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
9213 esac
9214
9215fi # $ax_pthread_clang = yes
9216
9217if test "x$ax_pthread_ok" = "xno"; then
9218for ax_pthread_try_flag in $ax_pthread_flags; do
9219
9220 case $ax_pthread_try_flag in
9221 none)
9222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
9223$as_echo_n "checking whether pthreads work without any flags... " >&6; }
9224 ;;
9225
9226 -mt,pthread)
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
9228$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
9229 PTHREAD_CFLAGS="-mt"
9230 PTHREAD_LIBS="-lpthread"
9231 ;;
9232
9233 -*)
9234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
9235$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
9236 PTHREAD_CFLAGS="$ax_pthread_try_flag"
9237 ;;
9238
9239 pthread-config)
9240 # Extract the first word of "pthread-config", so it can be a program name with args.
9241set dummy pthread-config; ac_word=$2
9242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243$as_echo_n "checking for $ac_word... " >&6; }
9244if ${ac_cv_prog_ax_pthread_config+:} false; then :
9245 $as_echo_n "(cached) " >&6
9246else
9247 if test -n "$ax_pthread_config"; then
9248 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
9249else
9250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9251for as_dir in $PATH
9252do
9253 IFS=$as_save_IFS
9254 test -z "$as_dir" && as_dir=.
9255 for ac_exec_ext in '' $ac_executable_extensions; do
9256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9257 ac_cv_prog_ax_pthread_config="yes"
9258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9259 break 2
9260 fi
9261done
9262 done
9263IFS=$as_save_IFS
9264
9265 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
9266fi
9267fi
9268ax_pthread_config=$ac_cv_prog_ax_pthread_config
9269if test -n "$ax_pthread_config"; then
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
9271$as_echo "$ax_pthread_config" >&6; }
9272else
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
9275fi
9276
9277
9278 if test "x$ax_pthread_config" = "xno"; then :
9279 continue
9280fi
9281 PTHREAD_CFLAGS="`pthread-config --cflags`"
9282 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
9283 ;;
9284
9285 *)
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
9287$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
9288 PTHREAD_LIBS="-l$ax_pthread_try_flag"
9289 ;;
9290 esac
9291
9292 ax_pthread_save_CFLAGS="$CFLAGS"
9293 ax_pthread_save_LIBS="$LIBS"
9294 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9295 LIBS="$PTHREAD_LIBS $LIBS"
9296
9297 # Check for various functions. We must include pthread.h,
9298 # since some functions may be macros. (On the Sequent, we
9299 # need a special flag -Kthread to make this header compile.)
9300 # We check for pthread_join because it is in -lpthread on IRIX
9301 # while pthread_create is in libc. We check for pthread_attr_init
9302 # due to DEC craziness with -lpthreads. We check for
9303 # pthread_cleanup_push because it is one of the few pthread
9304 # functions on Solaris that doesn't have a non-functional libc stub.
9305 # We try pthread_create on general principles.
9306
9307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308/* end confdefs.h. */
9309#include <pthread.h>
9310# if $ax_pthread_check_cond
9311# error "$ax_pthread_check_macro must be defined"
9312# endif
9313 static void routine(void *a) { a = 0; }
9314 static void *start_routine(void *a) { return a; }
9315int
9316main ()
9317{
9318pthread_t th; pthread_attr_t attr;
9319 pthread_create(&th, 0, start_routine, 0);
9320 pthread_join(th, 0);
9321 pthread_attr_init(&attr);
9322 pthread_cleanup_push(routine, 0);
9323 pthread_cleanup_pop(0) /* ; */
9324 ;
9325 return 0;
9326}
9327_ACEOF
9328if ac_fn_c_try_link "$LINENO"; then :
9329 ax_pthread_ok=yes
9330fi
9331rm -f core conftest.err conftest.$ac_objext \
9332 conftest$ac_exeext conftest.$ac_ext
9333
9334 CFLAGS="$ax_pthread_save_CFLAGS"
9335 LIBS="$ax_pthread_save_LIBS"
9336
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9338$as_echo "$ax_pthread_ok" >&6; }
9339 if test "x$ax_pthread_ok" = "xyes"; then :
9340 break
9341fi
9342
9343 PTHREAD_LIBS=""
9344 PTHREAD_CFLAGS=""
9345done
9346fi
9347
9348# Various other checks:
9349if test "x$ax_pthread_ok" = "xyes"; then
9350 ax_pthread_save_CFLAGS="$CFLAGS"
9351 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
9352 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9353 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
9354
9355 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
9357$as_echo_n "checking for joinable pthread attribute... " >&6; }
9358if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
9359 $as_echo_n "(cached) " >&6
9360else
9361 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
9362 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
9363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9364/* end confdefs.h. */
9365#include <pthread.h>
9366int
9367main ()
9368{
9369int attr = $ax_pthread_attr; return attr /* ; */
9370 ;
9371 return 0;
9372}
9373_ACEOF
9374if ac_fn_c_try_link "$LINENO"; then :
9375 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
9376fi
9377rm -f core conftest.err conftest.$ac_objext \
9378 conftest$ac_exeext conftest.$ac_ext
9379 done
9380
9381fi
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
9383$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
9384 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
9385 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
9386 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
9387
9388cat >>confdefs.h <<_ACEOF
9389#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
9390_ACEOF
9391
9392 ax_pthread_joinable_attr_defined=yes
9393
9394fi
9395
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
9397$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
9398if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
9399 $as_echo_n "(cached) " >&6
9400else
9401 ax_cv_PTHREAD_SPECIAL_FLAGS=no
9402 case $host_os in
9403 solaris*)
9404 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
9405 ;;
9406 esac
9407
9408fi
9409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
9410$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
9411 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
9412 test "x$ax_pthread_special_flags_added" != "xyes"; then :
9413 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
9414 ax_pthread_special_flags_added=yes
9415fi
9416
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
9418$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
9419if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
9420 $as_echo_n "(cached) " >&6
9421else
9422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9423/* end confdefs.h. */
9424#include <pthread.h>
9425int
9426main ()
9427{
9428int i = PTHREAD_PRIO_INHERIT;
9429 ;
9430 return 0;
9431}
9432_ACEOF
9433if ac_fn_c_try_link "$LINENO"; then :
9434 ax_cv_PTHREAD_PRIO_INHERIT=yes
9435else
9436 ax_cv_PTHREAD_PRIO_INHERIT=no
9437fi
9438rm -f core conftest.err conftest.$ac_objext \
9439 conftest$ac_exeext conftest.$ac_ext
9440
9441fi
9442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
9443$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
9444 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
9445 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
9446
9447$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
9448
9449 ax_pthread_prio_inherit_defined=yes
9450
9451fi
9452
9453 CFLAGS="$ax_pthread_save_CFLAGS"
9454 LIBS="$ax_pthread_save_LIBS"
9455
9456 # More AIX lossage: compile with *_r variant
9457 if test "x$GCC" != "xyes"; then
9458 case $host_os in
9459 aix*)
9460 case "x/$CC" in #(
9461 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
9462 #handle absolute path differently from PATH based program lookup
9463 case "x$CC" in #(
9464 x/*) :
9465 if as_fn_executable_p ${CC}_r; then :
9466 PTHREAD_CC="${CC}_r"
9467fi ;; #(
9468 *) :
9469 for ac_prog in ${CC}_r
9470do
9471 # Extract the first word of "$ac_prog", so it can be a program name with args.
9472set dummy $ac_prog; ac_word=$2
9473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9474$as_echo_n "checking for $ac_word... " >&6; }
9475if ${ac_cv_prog_PTHREAD_CC+:} false; then :
9476 $as_echo_n "(cached) " >&6
9477else
9478 if test -n "$PTHREAD_CC"; then
9479 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
9480else
9481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9482for as_dir in $PATH
9483do
9484 IFS=$as_save_IFS
9485 test -z "$as_dir" && as_dir=.
9486 for ac_exec_ext in '' $ac_executable_extensions; do
9487 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9488 ac_cv_prog_PTHREAD_CC="$ac_prog"
9489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9490 break 2
9491 fi
9492done
9493 done
9494IFS=$as_save_IFS
9495
9496fi
9497fi
9498PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
9499if test -n "$PTHREAD_CC"; then
9500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
9501$as_echo "$PTHREAD_CC" >&6; }
9502else
9503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9504$as_echo "no" >&6; }
9505fi
9506
9507
9508 test -n "$PTHREAD_CC" && break
9509done
9510test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9511 ;;
9512esac ;; #(
9513 *) :
9514 ;;
9515esac
9516 ;;
9517 esac
9518 fi
9519fi
9520
9521test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
9522
9523
9524
9525
9526
9527# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
9528if test "x$ax_pthread_ok" = "xyes"; then
9529 threads=yes
9530 :
9531else
9532 ax_pthread_ok=no
9533 threads=no
9534fi
9535ac_ext=cpp
9536ac_cpp='$CXXCPP $CPPFLAGS'
9537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9540
9541
c560a5fb
TT
9542 save_LIBS="$LIBS"
9543 LIBS="$PTHREAD_LIBS $LIBS"
9544 save_CXXFLAGS="$CXXFLAGS"
9545 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
05ea2a05
TT
9547$as_echo_n "checking for std::thread... " >&6; }
9548if ${gdb_cv_cxx_std_thread+:} false; then :
9549 $as_echo_n "(cached) " >&6
9550else
9551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9552/* end confdefs.h. */
2124b2de
TT
9553 #if defined (__MINGW32__) || defined (__CYGWIN__)
9554 # ifdef _WIN32_WINNT
9555 # if _WIN32_WINNT < 0x0501
9556 # undef _WIN32_WINNT
9557 # define _WIN32_WINNT 0x0501
9558 # endif
9559 # else
9560 # define _WIN32_WINNT 0x0501
9561 # endif
9562 #endif /* __MINGW32__ || __CYGWIN__ */
9563 #include <thread>
c560a5fb 9564 void callback() { }
05ea2a05
TT
9565int
9566main ()
9567{
9568std::thread t(callback);
9569 ;
9570 return 0;
9571}
9572_ACEOF
9573if ac_fn_cxx_try_compile "$LINENO"; then :
9574 gdb_cv_cxx_std_thread=yes
9575else
9576 gdb_cv_cxx_std_thread=no
9577fi
9578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9579fi
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
9581$as_echo "$gdb_cv_cxx_std_thread" >&6; }
9582
c560a5fb 9583 if test "$threads" = "yes"; then
05ea2a05
TT
9584 # This check must be here, while LIBS includes any necessary
9585 # threading library.
9586 for ac_func in pthread_sigmask pthread_setname_np
9587do :
9588 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9589ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
9590if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9591 cat >>confdefs.h <<_ACEOF
9592#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9593_ACEOF
9594
9595fi
9596done
9597
05ea2a05 9598 fi
c560a5fb
TT
9599 LIBS="$save_LIBS"
9600 CXXFLAGS="$save_CXXFLAGS"
261b0748
LM
9601
9602 if test "$want_threading" = "yes"; then
9603 if test "$gdb_cv_cxx_std_thread" = "yes"; then
05ea2a05
TT
9604
9605$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
9606
261b0748 9607 fi
05ea2a05
TT
9608 fi
9609 ac_ext=c
9610ac_cpp='$CPP $CPPFLAGS'
9611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9613ac_compiler_gnu=$ac_cv_c_compiler_gnu
9614
9615
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
9617$as_echo_n "checking for sigsetjmp... " >&6; }
9618if ${gdb_cv_func_sigsetjmp+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620else
9621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 9622/* end confdefs.h. */
b9442ec1 9623#include <setjmp.h>
5e030278
TT
9624int
9625main ()
9626{
b9442ec1
SM
9627sigjmp_buf env;
9628 while (! sigsetjmp (env, 1))
9629 siglongjmp (env, 1);
9630
5e030278
TT
9631 ;
9632 return 0;
9633}
9634_ACEOF
05ea2a05
TT
9635if ac_fn_c_try_compile "$LINENO"; then :
9636 gdb_cv_func_sigsetjmp=yes
9637else
9638 gdb_cv_func_sigsetjmp=no
b9442ec1 9639
5e030278 9640fi
05ea2a05 9641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b9442ec1 9642
5e030278 9643fi
05ea2a05
TT
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
9645$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
9646 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 9647
05ea2a05 9648$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 9649
05ea2a05 9650 fi
5e030278 9651
5e030278 9652
05ea2a05
TT
9653# Check whether --with-intel_pt was given.
9654if test "${with_intel_pt+set}" = set; then :
9655 withval=$with_intel_pt;
9656else
9657 with_intel_pt=auto
9658fi
5e030278 9659
05ea2a05
TT
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
9661$as_echo_n "checking whether to use intel pt... " >&6; }
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
9663$as_echo "$with_intel_pt" >&6; }
5e030278 9664
05ea2a05
TT
9665 if test "${with_intel_pt}" = no; then
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
9667$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
9668 HAVE_LIBIPT=no
9669 else
9670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278
TT
9671/* end confdefs.h. */
9672
05ea2a05
TT
9673 #include <linux/perf_event.h>
9674 #ifndef PERF_ATTR_SIZE_VER5
9675 # error
9676 #endif
5e030278
TT
9677
9678_ACEOF
05ea2a05
TT
9679if ac_fn_c_try_cpp "$LINENO"; then :
9680 perf_event=yes
9681else
9682 perf_event=no
5e030278 9683fi
05ea2a05
TT
9684rm -f conftest.err conftest.i conftest.$ac_ext
9685 if test "$perf_event" != yes; then
9686 if test "$with_intel_pt" = yes; then
9687 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
9688 else
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
9690$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
9691 fi
9692 fi
5e030278 9693
5e030278 9694
5e030278 9695
5e030278 9696
5e030278 9697
5e030278 9698
5e030278 9699
5e030278 9700
5e030278 9701
05ea2a05 9702 use_additional=yes
5e030278 9703
05ea2a05
TT
9704 acl_save_prefix="$prefix"
9705 prefix="$acl_final_prefix"
9706 acl_save_exec_prefix="$exec_prefix"
9707 exec_prefix="$acl_final_exec_prefix"
5e030278 9708
05ea2a05
TT
9709 eval additional_includedir=\"$includedir\"
9710 eval additional_libdir=\"$libdir\"
5e030278 9711
05ea2a05
TT
9712 exec_prefix="$acl_save_exec_prefix"
9713 prefix="$acl_save_prefix"
5e030278 9714
5e030278 9715
05ea2a05
TT
9716# Check whether --with-libipt-prefix was given.
9717if test "${with_libipt_prefix+set}" = set; then :
9718 withval=$with_libipt_prefix;
9719 if test "X$withval" = "Xno"; then
9720 use_additional=no
9721 else
9722 if test "X$withval" = "X"; then
5e030278 9723
05ea2a05
TT
9724 acl_save_prefix="$prefix"
9725 prefix="$acl_final_prefix"
9726 acl_save_exec_prefix="$exec_prefix"
9727 exec_prefix="$acl_final_exec_prefix"
5e030278 9728
05ea2a05
TT
9729 eval additional_includedir=\"$includedir\"
9730 eval additional_libdir=\"$libdir\"
5e030278 9731
05ea2a05
TT
9732 exec_prefix="$acl_save_exec_prefix"
9733 prefix="$acl_save_prefix"
5e030278 9734
05ea2a05
TT
9735 else
9736 additional_includedir="$withval/include"
9737 additional_libdir="$withval/lib"
9738 fi
9739 fi
5e030278 9740
05ea2a05 9741fi
5e030278 9742
9f1528a1
AB
9743
9744# Check whether --with-libipt-type was given.
9745if test "${with_libipt_type+set}" = set; then :
9746 withval=$with_libipt_type; with_libipt_type=$withval
9747else
9748 with_libipt_type=auto
9749fi
9750
9751 lib_type=`eval echo \$with_libipt_type`
9752
05ea2a05
TT
9753 LIBIPT=
9754 LTLIBIPT=
9755 INCIPT=
9756 rpathdirs=
9757 ltrpathdirs=
9758 names_already_handled=
9759 names_next_round='ipt '
9760 while test -n "$names_next_round"; do
9761 names_this_round="$names_next_round"
9762 names_next_round=
9763 for name in $names_this_round; do
9764 already_handled=
9765 for n in $names_already_handled; do
9766 if test "$n" = "$name"; then
9767 already_handled=yes
9768 break
9769 fi
9770 done
9771 if test -z "$already_handled"; then
9772 names_already_handled="$names_already_handled $name"
9773 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9774 eval value=\"\$HAVE_LIB$uppername\"
9775 if test -n "$value"; then
9776 if test "$value" = yes; then
9777 eval value=\"\$LIB$uppername\"
9778 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
9779 eval value=\"\$LTLIB$uppername\"
9780 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
9781 else
9782 :
9783 fi
9784 else
9785 found_dir=
9786 found_la=
9787 found_so=
9788 found_a=
9789 if test $use_additional = yes; then
9f1528a1 9790 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
9791 found_dir="$additional_libdir"
9792 found_so="$additional_libdir/lib$name.$shlibext"
9793 if test -f "$additional_libdir/lib$name.la"; then
9794 found_la="$additional_libdir/lib$name.la"
9795 fi
9f1528a1 9796 elif test x$lib_type != xshared; then
05ea2a05
TT
9797 if test -f "$additional_libdir/lib$name.$libext"; then
9798 found_dir="$additional_libdir"
9799 found_a="$additional_libdir/lib$name.$libext"
9800 if test -f "$additional_libdir/lib$name.la"; then
9801 found_la="$additional_libdir/lib$name.la"
9802 fi
9803 fi
9804 fi
9805 fi
9806 if test "X$found_dir" = "X"; then
9807 for x in $LDFLAGS $LTLIBIPT; do
9808
9809 acl_save_prefix="$prefix"
9810 prefix="$acl_final_prefix"
9811 acl_save_exec_prefix="$exec_prefix"
9812 exec_prefix="$acl_final_exec_prefix"
9813 eval x=\"$x\"
9814 exec_prefix="$acl_save_exec_prefix"
9815 prefix="$acl_save_prefix"
9816
9817 case "$x" in
9818 -L*)
9819 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9820 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
9821 found_dir="$dir"
9822 found_so="$dir/lib$name.$shlibext"
9823 if test -f "$dir/lib$name.la"; then
9824 found_la="$dir/lib$name.la"
9825 fi
9f1528a1 9826 elif test x$lib_type != xshared; then
05ea2a05
TT
9827 if test -f "$dir/lib$name.$libext"; then
9828 found_dir="$dir"
9829 found_a="$dir/lib$name.$libext"
9830 if test -f "$dir/lib$name.la"; then
9831 found_la="$dir/lib$name.la"
9832 fi
9833 fi
9834 fi
9835 ;;
9836 esac
9837 if test "X$found_dir" != "X"; then
9838 break
9839 fi
9840 done
9841 fi
9842 if test "X$found_dir" != "X"; then
9843 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
9844 if test "X$found_so" != "X"; then
9845 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9846 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9847 else
9848 haveit=
9849 for x in $ltrpathdirs; do
9850 if test "X$x" = "X$found_dir"; then
9851 haveit=yes
9852 break
9853 fi
9854 done
9855 if test -z "$haveit"; then
9856 ltrpathdirs="$ltrpathdirs $found_dir"
9857 fi
9858 if test "$hardcode_direct" = yes; then
9859 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9860 else
9861 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9862 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9863 haveit=
9864 for x in $rpathdirs; do
9865 if test "X$x" = "X$found_dir"; then
9866 haveit=yes
9867 break
9868 fi
9869 done
9870 if test -z "$haveit"; then
9871 rpathdirs="$rpathdirs $found_dir"
9872 fi
9873 else
9874 haveit=
9875 for x in $LDFLAGS $LIBIPT; do
9876
9877 acl_save_prefix="$prefix"
9878 prefix="$acl_final_prefix"
9879 acl_save_exec_prefix="$exec_prefix"
9880 exec_prefix="$acl_final_exec_prefix"
9881 eval x=\"$x\"
9882 exec_prefix="$acl_save_exec_prefix"
9883 prefix="$acl_save_prefix"
9884
9885 if test "X$x" = "X-L$found_dir"; then
9886 haveit=yes
9887 break
9888 fi
9889 done
9890 if test -z "$haveit"; then
9891 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
9892 fi
9893 if test "$hardcode_minus_L" != no; then
9894 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
9895 else
9896 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
9897 fi
9898 fi
9899 fi
9900 fi
9901 else
9902 if test "X$found_a" != "X"; then
9903 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
9904 else
9905 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
9906 fi
9907 fi
9908 additional_includedir=
9909 case "$found_dir" in
9910 */lib | */lib/)
9911 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9912 additional_includedir="$basedir/include"
9913 ;;
9914 esac
9915 if test "X$additional_includedir" != "X"; then
9916 if test "X$additional_includedir" != "X/usr/include"; then
9917 haveit=
9918 if test "X$additional_includedir" = "X/usr/local/include"; then
9919 if test -n "$GCC"; then
9920 case $host_os in
9921 linux*) haveit=yes;;
9922 esac
9923 fi
9924 fi
9925 if test -z "$haveit"; then
9926 for x in $CPPFLAGS $INCIPT; do
9927
9928 acl_save_prefix="$prefix"
9929 prefix="$acl_final_prefix"
9930 acl_save_exec_prefix="$exec_prefix"
9931 exec_prefix="$acl_final_exec_prefix"
9932 eval x=\"$x\"
9933 exec_prefix="$acl_save_exec_prefix"
9934 prefix="$acl_save_prefix"
9935
9936 if test "X$x" = "X-I$additional_includedir"; then
9937 haveit=yes
9938 break
9939 fi
9940 done
9941 if test -z "$haveit"; then
9942 if test -d "$additional_includedir"; then
9943 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
9944 fi
9945 fi
9946 fi
9947 fi
9948 fi
9949 if test -n "$found_la"; then
9950 save_libdir="$libdir"
9951 case "$found_la" in
9952 */* | *\\*) . "$found_la" ;;
9953 *) . "./$found_la" ;;
9954 esac
9955 libdir="$save_libdir"
9956 for dep in $dependency_libs; do
9957 case "$dep" in
9958 -L*)
9959 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9960 if test "X$additional_libdir" != "X/usr/lib"; then
9961 haveit=
9962 if test "X$additional_libdir" = "X/usr/local/lib"; then
9963 if test -n "$GCC"; then
9964 case $host_os in
9965 linux*) haveit=yes;;
9966 esac
9967 fi
9968 fi
9969 if test -z "$haveit"; then
9970 haveit=
9971 for x in $LDFLAGS $LIBIPT; do
9972
9973 acl_save_prefix="$prefix"
9974 prefix="$acl_final_prefix"
9975 acl_save_exec_prefix="$exec_prefix"
9976 exec_prefix="$acl_final_exec_prefix"
9977 eval x=\"$x\"
9978 exec_prefix="$acl_save_exec_prefix"
9979 prefix="$acl_save_prefix"
9980
9981 if test "X$x" = "X-L$additional_libdir"; then
9982 haveit=yes
9983 break
9984 fi
9985 done
9986 if test -z "$haveit"; then
9987 if test -d "$additional_libdir"; then
9988 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
9989 fi
9990 fi
9991 haveit=
9992 for x in $LDFLAGS $LTLIBIPT; do
9993
9994 acl_save_prefix="$prefix"
9995 prefix="$acl_final_prefix"
9996 acl_save_exec_prefix="$exec_prefix"
9997 exec_prefix="$acl_final_exec_prefix"
9998 eval x=\"$x\"
9999 exec_prefix="$acl_save_exec_prefix"
10000 prefix="$acl_save_prefix"
10001
10002 if test "X$x" = "X-L$additional_libdir"; then
10003 haveit=yes
10004 break
10005 fi
10006 done
10007 if test -z "$haveit"; then
10008 if test -d "$additional_libdir"; then
10009 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10010 fi
10011 fi
10012 fi
10013 fi
10014 ;;
10015 -R*)
10016 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10017 if test "$enable_rpath" != no; then
10018 haveit=
10019 for x in $rpathdirs; do
10020 if test "X$x" = "X$dir"; then
10021 haveit=yes
10022 break
10023 fi
10024 done
10025 if test -z "$haveit"; then
10026 rpathdirs="$rpathdirs $dir"
10027 fi
10028 haveit=
10029 for x in $ltrpathdirs; do
10030 if test "X$x" = "X$dir"; then
10031 haveit=yes
10032 break
10033 fi
10034 done
10035 if test -z "$haveit"; then
10036 ltrpathdirs="$ltrpathdirs $dir"
10037 fi
10038 fi
10039 ;;
10040 -l*)
10041 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10042 ;;
10043 *.la)
10044 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10045 ;;
10046 *)
10047 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10048 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10049 ;;
10050 esac
10051 done
10052 fi
10053 else
9f1528a1
AB
10054 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10055 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10056 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10057 else
10058 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
10059 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
10060 fi
05ea2a05
TT
10061 fi
10062 fi
10063 fi
10064 done
10065 done
10066 if test "X$rpathdirs" != "X"; then
10067 if test -n "$hardcode_libdir_separator"; then
10068 alldirs=
10069 for found_dir in $rpathdirs; do
10070 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10071 done
10072 acl_save_libdir="$libdir"
10073 libdir="$alldirs"
10074 eval flag=\"$hardcode_libdir_flag_spec\"
10075 libdir="$acl_save_libdir"
10076 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10077 else
10078 for found_dir in $rpathdirs; do
10079 acl_save_libdir="$libdir"
10080 libdir="$found_dir"
10081 eval flag=\"$hardcode_libdir_flag_spec\"
10082 libdir="$acl_save_libdir"
10083 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10084 done
10085 fi
10086 fi
10087 if test "X$ltrpathdirs" != "X"; then
10088 for found_dir in $ltrpathdirs; do
10089 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10090 done
10091 fi
5e030278 10092
5e030278 10093
05ea2a05 10094 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 10095
05ea2a05
TT
10096 for element in $INCIPT; do
10097 haveit=
10098 for x in $CPPFLAGS; do
5e030278 10099
05ea2a05
TT
10100 acl_save_prefix="$prefix"
10101 prefix="$acl_final_prefix"
10102 acl_save_exec_prefix="$exec_prefix"
10103 exec_prefix="$acl_final_exec_prefix"
10104 eval x=\"$x\"
10105 exec_prefix="$acl_save_exec_prefix"
10106 prefix="$acl_save_prefix"
10107
10108 if test "X$x" = "X$element"; then
10109 haveit=yes
10110 break
10111 fi
10112 done
10113 if test -z "$haveit"; then
10114 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10115 fi
10116 done
10117
10118
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10120$as_echo_n "checking for libipt... " >&6; }
10121if ${ac_cv_libipt+:} false; then :
10122 $as_echo_n "(cached) " >&6
10123else
10124
10125 ac_save_LIBS="$LIBS"
10126 LIBS="$LIBS $LIBIPT"
10127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 10128/* end confdefs.h. */
05ea2a05
TT
10129#include "intel-pt.h"
10130int
10131main ()
10132{
10133pt_insn_alloc_decoder (0);
10134 ;
10135 return 0;
10136}
5e030278
TT
10137_ACEOF
10138if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
10139 ac_cv_libipt=yes
10140else
10141 ac_cv_libipt=no
5e030278
TT
10142fi
10143rm -f core conftest.err conftest.$ac_objext \
10144 conftest$ac_exeext conftest.$ac_ext
05ea2a05 10145 LIBS="$ac_save_LIBS"
5e030278
TT
10146
10147fi
05ea2a05
TT
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10149$as_echo "$ac_cv_libipt" >&6; }
10150 if test "$ac_cv_libipt" = yes; then
10151 HAVE_LIBIPT=yes
5e030278 10152
05ea2a05 10153$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
5e030278 10154
05ea2a05
TT
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10156$as_echo_n "checking how to link with libipt... " >&6; }
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10158$as_echo "$LIBIPT" >&6; }
10159 else
10160 HAVE_LIBIPT=no
10161 CPPFLAGS="$ac_save_CPPFLAGS"
10162 LIBIPT=
10163 LTLIBIPT=
10164 fi
5e030278 10165
5e030278 10166
5e030278 10167
5e030278 10168
5e030278 10169
5e030278 10170
05ea2a05
TT
10171 if test "$HAVE_LIBIPT" != yes; then
10172 if test "$with_intel_pt" = yes; then
10173 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
10174 else
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10176$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10177 fi
10178 else
10179 save_LIBS=$LIBS
10180 LIBS="$LIBS $LIBIPT"
10181 for ac_func in pt_insn_event
10182do :
10183 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
10184if test "x$ac_cv_func_pt_insn_event" = xyes; then :
10185 cat >>confdefs.h <<_ACEOF
10186#define HAVE_PT_INSN_EVENT 1
10187_ACEOF
5e030278 10188
5e030278 10189fi
05ea2a05
TT
10190done
10191
10192 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
10193"
10194if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
10195
10196cat >>confdefs.h <<_ACEOF
10197#define HAVE_STRUCT_PT_INSN_ENABLED 1
10198_ACEOF
5e030278
TT
10199
10200
5e030278 10201fi
05ea2a05
TT
10202ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
10203"
10204if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
5e030278 10205
05ea2a05
TT
10206cat >>confdefs.h <<_ACEOF
10207#define HAVE_STRUCT_PT_INSN_RESYNCED 1
10208_ACEOF
5e030278 10209
5e030278 10210
05ea2a05 10211fi
5e030278 10212
05ea2a05
TT
10213 LIBS=$save_LIBS
10214 fi
10215 fi
10216
6c130ba3
SM
10217 # Check if the compiler and runtime support printing long longs.
10218
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
10220$as_echo_n "checking for long long support in printf... " >&6; }
10221if ${gdb_cv_printf_has_long_long+:} false; then :
10222 $as_echo_n "(cached) " >&6
10223else
10224 if test "$cross_compiling" = yes; then :
10225 gdb_cv_printf_has_long_long=no
10226else
10227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10228/* end confdefs.h. */
10229$ac_includes_default
10230int
10231main ()
10232{
10233char buf[32];
10234 long long l = 0;
10235 l = (l << 16) + 0x0123;
10236 l = (l << 16) + 0x4567;
10237 l = (l << 16) + 0x89ab;
10238 l = (l << 16) + 0xcdef;
10239 sprintf (buf, "0x%016llx", l);
10240 return (strcmp ("0x0123456789abcdef", buf));
10241 ;
10242 return 0;
10243}
10244_ACEOF
10245if ac_fn_c_try_run "$LINENO"; then :
10246 gdb_cv_printf_has_long_long=yes
10247else
10248 gdb_cv_printf_has_long_long=no
10249fi
10250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10251 conftest.$ac_objext conftest.beam conftest.$ac_ext
10252fi
10253
10254fi
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
10256$as_echo "$gdb_cv_printf_has_long_long" >&6; }
10257 if test "$gdb_cv_printf_has_long_long" = yes; then
10258
10259$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
10260
10261 fi
10262
c8693053
RO
10263
10264$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
10265
10266 for ac_header in sys/procfs.h
10267do :
10268 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
10269if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
10270 cat >>confdefs.h <<_ACEOF
10271#define HAVE_SYS_PROCFS_H 1
10272_ACEOF
10273
10274fi
10275
10276done
10277
05ea2a05 10278 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
10279
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
10281$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10282 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
10283 $as_echo_n "(cached) " >&6
10284else
10285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 10286/* end confdefs.h. */
05ea2a05
TT
10287
10288#define _SYSCALL32
05ea2a05 10289#include <sys/procfs.h>
5e030278
TT
10290int
10291main ()
10292{
05ea2a05 10293gregset_t avar
5e030278
TT
10294 ;
10295 return 0;
10296}
10297_ACEOF
05ea2a05
TT
10298if ac_fn_c_try_compile "$LINENO"; then :
10299 bfd_cv_have_sys_procfs_type_gregset_t=yes
10300else
10301 bfd_cv_have_sys_procfs_type_gregset_t=no
5e030278 10302
5e030278 10303fi
05ea2a05 10304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
10305fi
10306
05ea2a05 10307 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5e030278 10308
05ea2a05
TT
10309$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
10310
10311 fi
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10313$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
10314
c8693053
RO
10315
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
10317$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10318 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
5e030278
TT
10319 $as_echo_n "(cached) " >&6
10320else
05ea2a05 10321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 10322/* end confdefs.h. */
05ea2a05
TT
10323
10324#define _SYSCALL32
05ea2a05 10325#include <sys/procfs.h>
5e030278
TT
10326int
10327main ()
10328{
05ea2a05 10329fpregset_t avar
5e030278
TT
10330 ;
10331 return 0;
10332}
10333_ACEOF
05ea2a05 10334if ac_fn_c_try_compile "$LINENO"; then :
db6878ac
SM
10335 bfd_cv_have_sys_procfs_type_fpregset_t=yes
10336else
10337 bfd_cv_have_sys_procfs_type_fpregset_t=no
10338
10339fi
10340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10341fi
10342
10343 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
10344
10345$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
10346
10347 fi
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10349$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
10350
c8693053
RO
10351
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
db6878ac
SM
10353$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10354 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
10355 $as_echo_n "(cached) " >&6
10356else
10357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10358/* end confdefs.h. */
10359
10360#define _SYSCALL32
db6878ac
SM
10361#include <sys/procfs.h>
10362int
10363main ()
10364{
10365prgregset_t avar
10366 ;
10367 return 0;
10368}
10369_ACEOF
10370if ac_fn_c_try_compile "$LINENO"; then :
10371 bfd_cv_have_sys_procfs_type_prgregset_t=yes
10372else
10373 bfd_cv_have_sys_procfs_type_prgregset_t=no
10374
10375fi
10376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10377fi
10378
10379 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
10380
10381$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
10382
10383 fi
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10385$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
10386
c8693053
RO
10387
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
db6878ac
SM
10389$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10390 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
10391 $as_echo_n "(cached) " >&6
10392else
10393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10394/* end confdefs.h. */
10395
10396#define _SYSCALL32
db6878ac
SM
10397#include <sys/procfs.h>
10398int
10399main ()
10400{
10401prfpregset_t avar
10402 ;
10403 return 0;
10404}
10405_ACEOF
10406if ac_fn_c_try_compile "$LINENO"; then :
10407 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
10408else
10409 bfd_cv_have_sys_procfs_type_prfpregset_t=no
10410
10411fi
10412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10413fi
10414
10415 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
10416
10417$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
10418
10419 fi
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10421$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
10422
c8693053
RO
10423
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
db6878ac
SM
10425$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10426 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
10427 $as_echo_n "(cached) " >&6
10428else
10429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10430/* end confdefs.h. */
10431
10432#define _SYSCALL32
db6878ac
SM
10433#include <sys/procfs.h>
10434int
10435main ()
10436{
10437prgregset32_t avar
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442if ac_fn_c_try_compile "$LINENO"; then :
10443 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
10444else
10445 bfd_cv_have_sys_procfs_type_prgregset32_t=no
10446
10447fi
10448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10449fi
10450
10451 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
10452
10453$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
10454
10455 fi
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10457$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
10458
c8693053
RO
10459
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
db6878ac
SM
10461$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10462 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
10463 $as_echo_n "(cached) " >&6
10464else
10465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10466/* end confdefs.h. */
10467
10468#define _SYSCALL32
db6878ac
SM
10469#include <sys/procfs.h>
10470int
10471main ()
10472{
10473lwpid_t avar
10474 ;
10475 return 0;
10476}
10477_ACEOF
10478if ac_fn_c_try_compile "$LINENO"; then :
10479 bfd_cv_have_sys_procfs_type_lwpid_t=yes
05ea2a05 10480else
db6878ac 10481 bfd_cv_have_sys_procfs_type_lwpid_t=no
5e030278
TT
10482
10483fi
05ea2a05
TT
10484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10485fi
5e030278 10486
db6878ac 10487 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5e030278 10488
db6878ac 10489$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
5e030278 10490
05ea2a05 10491 fi
db6878ac
SM
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
10493$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
5e030278 10494
c8693053
RO
10495
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
db6878ac
SM
10497$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
10498 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
5e030278
TT
10499 $as_echo_n "(cached) " >&6
10500else
05ea2a05
TT
10501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10502/* end confdefs.h. */
5e030278 10503
05ea2a05 10504#define _SYSCALL32
05ea2a05
TT
10505#include <sys/procfs.h>
10506int
10507main ()
10508{
db6878ac 10509psaddr_t avar
05ea2a05
TT
10510 ;
10511 return 0;
10512}
10513_ACEOF
10514if ac_fn_c_try_compile "$LINENO"; then :
db6878ac 10515 bfd_cv_have_sys_procfs_type_psaddr_t=yes
05ea2a05 10516else
db6878ac 10517 bfd_cv_have_sys_procfs_type_psaddr_t=no
05ea2a05
TT
10518
10519fi
10520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e030278
TT
10521fi
10522
db6878ac 10523 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
05ea2a05 10524
db6878ac 10525$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
05ea2a05
TT
10526
10527 fi
db6878ac
SM
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
10529$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
05ea2a05 10530
c8693053
RO
10531
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
db6878ac
SM
10533$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
10534 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
5e030278
TT
10535 $as_echo_n "(cached) " >&6
10536else
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10538/* end confdefs.h. */
05ea2a05
TT
10539
10540#define _SYSCALL32
05ea2a05 10541#include <sys/procfs.h>
5e030278
TT
10542int
10543main ()
10544{
db6878ac 10545elf_fpregset_t avar
5e030278
TT
10546 ;
10547 return 0;
10548}
10549_ACEOF
05ea2a05 10550if ac_fn_c_try_compile "$LINENO"; then :
db6878ac 10551 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
5e030278 10552else
db6878ac 10553 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
5e030278
TT
10554
10555fi
05ea2a05
TT
10556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10557fi
5e030278 10558
db6878ac 10559 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
5e030278 10560
db6878ac 10561$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
5e030278 10562
05ea2a05 10563 fi
db6878ac
SM
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
10565$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
5e030278 10566
db6878ac
SM
10567 fi
10568
8b35ed1f
SM
10569 # Check for xxhash
10570
10571# Check whether --with-xxhash was given.
10572if test "${with_xxhash+set}" = set; then :
10573 withval=$with_xxhash;
10574else
10575 with_xxhash=auto
10576fi
10577
10578
10579 if test "x$with_xxhash" != "xno"; then
10580
10581
10582
10583
10584
10585
10586
10587
10588 use_additional=yes
10589
10590 acl_save_prefix="$prefix"
10591 prefix="$acl_final_prefix"
10592 acl_save_exec_prefix="$exec_prefix"
10593 exec_prefix="$acl_final_exec_prefix"
10594
10595 eval additional_includedir=\"$includedir\"
10596 eval additional_libdir=\"$libdir\"
10597
10598 exec_prefix="$acl_save_exec_prefix"
10599 prefix="$acl_save_prefix"
10600
10601
10602# Check whether --with-libxxhash-prefix was given.
10603if test "${with_libxxhash_prefix+set}" = set; then :
10604 withval=$with_libxxhash_prefix;
10605 if test "X$withval" = "Xno"; then
10606 use_additional=no
10607 else
10608 if test "X$withval" = "X"; then
10609
10610 acl_save_prefix="$prefix"
10611 prefix="$acl_final_prefix"
10612 acl_save_exec_prefix="$exec_prefix"
10613 exec_prefix="$acl_final_exec_prefix"
10614
10615 eval additional_includedir=\"$includedir\"
10616 eval additional_libdir=\"$libdir\"
10617
10618 exec_prefix="$acl_save_exec_prefix"
10619 prefix="$acl_save_prefix"
10620
10621 else
10622 additional_includedir="$withval/include"
10623 additional_libdir="$withval/lib"
10624 fi
10625 fi
10626
10627fi
10628
10629
10630# Check whether --with-libxxhash-type was given.
10631if test "${with_libxxhash_type+set}" = set; then :
10632 withval=$with_libxxhash_type; with_libxxhash_type=$withval
10633else
10634 with_libxxhash_type=auto
10635fi
10636
10637 lib_type=`eval echo \$with_libxxhash_type`
10638
10639 LIBXXHASH=
10640 LTLIBXXHASH=
10641 INCXXHASH=
10642 rpathdirs=
10643 ltrpathdirs=
10644 names_already_handled=
10645 names_next_round='xxhash '
10646 while test -n "$names_next_round"; do
10647 names_this_round="$names_next_round"
10648 names_next_round=
10649 for name in $names_this_round; do
10650 already_handled=
10651 for n in $names_already_handled; do
10652 if test "$n" = "$name"; then
10653 already_handled=yes
10654 break
10655 fi
10656 done
10657 if test -z "$already_handled"; then
10658 names_already_handled="$names_already_handled $name"
10659 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10660 eval value=\"\$HAVE_LIB$uppername\"
10661 if test -n "$value"; then
10662 if test "$value" = yes; then
10663 eval value=\"\$LIB$uppername\"
10664 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
10665 eval value=\"\$LTLIB$uppername\"
10666 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
10667 else
10668 :
10669 fi
10670 else
10671 found_dir=
10672 found_la=
10673 found_so=
10674 found_a=
10675 if test $use_additional = yes; then
10676 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10677 found_dir="$additional_libdir"
10678 found_so="$additional_libdir/lib$name.$shlibext"
10679 if test -f "$additional_libdir/lib$name.la"; then
10680 found_la="$additional_libdir/lib$name.la"
10681 fi
10682 elif test x$lib_type != xshared; then
10683 if test -f "$additional_libdir/lib$name.$libext"; then
10684 found_dir="$additional_libdir"
10685 found_a="$additional_libdir/lib$name.$libext"
10686 if test -f "$additional_libdir/lib$name.la"; then
10687 found_la="$additional_libdir/lib$name.la"
10688 fi
10689 fi
10690 fi
10691 fi
10692 if test "X$found_dir" = "X"; then
10693 for x in $LDFLAGS $LTLIBXXHASH; do
10694
10695 acl_save_prefix="$prefix"
10696 prefix="$acl_final_prefix"
10697 acl_save_exec_prefix="$exec_prefix"
10698 exec_prefix="$acl_final_exec_prefix"
10699 eval x=\"$x\"
10700 exec_prefix="$acl_save_exec_prefix"
10701 prefix="$acl_save_prefix"
10702
10703 case "$x" in
10704 -L*)
10705 dir=`echo "X$x" | sed -e 's/^X-L//'`
10706 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10707 found_dir="$dir"
10708 found_so="$dir/lib$name.$shlibext"
10709 if test -f "$dir/lib$name.la"; then
10710 found_la="$dir/lib$name.la"
10711 fi
10712 elif test x$lib_type != xshared; then
10713 if test -f "$dir/lib$name.$libext"; then
10714 found_dir="$dir"
10715 found_a="$dir/lib$name.$libext"
10716 if test -f "$dir/lib$name.la"; then
10717 found_la="$dir/lib$name.la"
10718 fi
10719 fi
10720 fi
10721 ;;
10722 esac
10723 if test "X$found_dir" != "X"; then
10724 break
10725 fi
10726 done
10727 fi
10728 if test "X$found_dir" != "X"; then
10729 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
10730 if test "X$found_so" != "X"; then
10731 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10732 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10733 else
10734 haveit=
10735 for x in $ltrpathdirs; do
10736 if test "X$x" = "X$found_dir"; then
10737 haveit=yes
10738 break
10739 fi
10740 done
10741 if test -z "$haveit"; then
10742 ltrpathdirs="$ltrpathdirs $found_dir"
10743 fi
10744 if test "$hardcode_direct" = yes; then
10745 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10746 else
10747 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10748 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10749 haveit=
10750 for x in $rpathdirs; do
10751 if test "X$x" = "X$found_dir"; then
10752 haveit=yes
10753 break
10754 fi
10755 done
10756 if test -z "$haveit"; then
10757 rpathdirs="$rpathdirs $found_dir"
10758 fi
10759 else
10760 haveit=
10761 for x in $LDFLAGS $LIBXXHASH; do
10762
10763 acl_save_prefix="$prefix"
10764 prefix="$acl_final_prefix"
10765 acl_save_exec_prefix="$exec_prefix"
10766 exec_prefix="$acl_final_exec_prefix"
10767 eval x=\"$x\"
10768 exec_prefix="$acl_save_exec_prefix"
10769 prefix="$acl_save_prefix"
10770
10771 if test "X$x" = "X-L$found_dir"; then
10772 haveit=yes
10773 break
10774 fi
10775 done
10776 if test -z "$haveit"; then
10777 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
10778 fi
10779 if test "$hardcode_minus_L" != no; then
10780 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
10781 else
10782 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10783 fi
10784 fi
10785 fi
10786 fi
10787 else
10788 if test "X$found_a" != "X"; then
10789 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
10790 else
10791 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
10792 fi
10793 fi
10794 additional_includedir=
10795 case "$found_dir" in
10796 */lib | */lib/)
10797 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10798 additional_includedir="$basedir/include"
10799 ;;
10800 esac
10801 if test "X$additional_includedir" != "X"; then
10802 if test "X$additional_includedir" != "X/usr/include"; then
10803 haveit=
10804 if test "X$additional_includedir" = "X/usr/local/include"; then
10805 if test -n "$GCC"; then
10806 case $host_os in
10807 linux*) haveit=yes;;
10808 esac
10809 fi
10810 fi
10811 if test -z "$haveit"; then
10812 for x in $CPPFLAGS $INCXXHASH; do
10813
10814 acl_save_prefix="$prefix"
10815 prefix="$acl_final_prefix"
10816 acl_save_exec_prefix="$exec_prefix"
10817 exec_prefix="$acl_final_exec_prefix"
10818 eval x=\"$x\"
10819 exec_prefix="$acl_save_exec_prefix"
10820 prefix="$acl_save_prefix"
10821
10822 if test "X$x" = "X-I$additional_includedir"; then
10823 haveit=yes
10824 break
10825 fi
10826 done
10827 if test -z "$haveit"; then
10828 if test -d "$additional_includedir"; then
10829 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
10830 fi
10831 fi
10832 fi
10833 fi
10834 fi
10835 if test -n "$found_la"; then
10836 save_libdir="$libdir"
10837 case "$found_la" in
10838 */* | *\\*) . "$found_la" ;;
10839 *) . "./$found_la" ;;
10840 esac
10841 libdir="$save_libdir"
10842 for dep in $dependency_libs; do
10843 case "$dep" in
10844 -L*)
10845 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10846 if test "X$additional_libdir" != "X/usr/lib"; then
10847 haveit=
10848 if test "X$additional_libdir" = "X/usr/local/lib"; then
10849 if test -n "$GCC"; then
10850 case $host_os in
10851 linux*) haveit=yes;;
10852 esac
10853 fi
10854 fi
10855 if test -z "$haveit"; then
10856 haveit=
10857 for x in $LDFLAGS $LIBXXHASH; do
10858
10859 acl_save_prefix="$prefix"
10860 prefix="$acl_final_prefix"
10861 acl_save_exec_prefix="$exec_prefix"
10862 exec_prefix="$acl_final_exec_prefix"
10863 eval x=\"$x\"
10864 exec_prefix="$acl_save_exec_prefix"
10865 prefix="$acl_save_prefix"
10866
10867 if test "X$x" = "X-L$additional_libdir"; then
10868 haveit=yes
10869 break
10870 fi
10871 done
10872 if test -z "$haveit"; then
10873 if test -d "$additional_libdir"; then
10874 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
10875 fi
10876 fi
10877 haveit=
10878 for x in $LDFLAGS $LTLIBXXHASH; do
10879
10880 acl_save_prefix="$prefix"
10881 prefix="$acl_final_prefix"
10882 acl_save_exec_prefix="$exec_prefix"
10883 exec_prefix="$acl_final_exec_prefix"
10884 eval x=\"$x\"
10885 exec_prefix="$acl_save_exec_prefix"
10886 prefix="$acl_save_prefix"
10887
10888 if test "X$x" = "X-L$additional_libdir"; then
10889 haveit=yes
10890 break
10891 fi
10892 done
10893 if test -z "$haveit"; then
10894 if test -d "$additional_libdir"; then
10895 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
10896 fi
10897 fi
10898 fi
10899 fi
10900 ;;
10901 -R*)
10902 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10903 if test "$enable_rpath" != no; then
10904 haveit=
10905 for x in $rpathdirs; do
10906 if test "X$x" = "X$dir"; then
10907 haveit=yes
10908 break
10909 fi
10910 done
10911 if test -z "$haveit"; then
10912 rpathdirs="$rpathdirs $dir"
10913 fi
10914 haveit=
10915 for x in $ltrpathdirs; do
10916 if test "X$x" = "X$dir"; then
10917 haveit=yes
10918 break
10919 fi
10920 done
10921 if test -z "$haveit"; then
10922 ltrpathdirs="$ltrpathdirs $dir"
10923 fi
10924 fi
10925 ;;
10926 -l*)
10927 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10928 ;;
10929 *.la)
10930 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10931 ;;
10932 *)
10933 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
10934 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
10935 ;;
10936 esac
10937 done
10938 fi
10939 else
10940 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10941 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
10942 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
10943 else
10944 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
10945 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
10946 fi
10947 fi
10948 fi
10949 fi
10950 done
10951 done
10952 if test "X$rpathdirs" != "X"; then
10953 if test -n "$hardcode_libdir_separator"; then
10954 alldirs=
10955 for found_dir in $rpathdirs; do
10956 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10957 done
10958 acl_save_libdir="$libdir"
10959 libdir="$alldirs"
10960 eval flag=\"$hardcode_libdir_flag_spec\"
10961 libdir="$acl_save_libdir"
10962 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
10963 else
10964 for found_dir in $rpathdirs; do
10965 acl_save_libdir="$libdir"
10966 libdir="$found_dir"
10967 eval flag=\"$hardcode_libdir_flag_spec\"
10968 libdir="$acl_save_libdir"
10969 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
10970 done
10971 fi
10972 fi
10973 if test "X$ltrpathdirs" != "X"; then
10974 for found_dir in $ltrpathdirs; do
10975 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
10976 done
10977 fi
10978
10979
10980 ac_save_CPPFLAGS="$CPPFLAGS"
10981
10982 for element in $INCXXHASH; do
10983 haveit=
10984 for x in $CPPFLAGS; do
10985
10986 acl_save_prefix="$prefix"
10987 prefix="$acl_final_prefix"
10988 acl_save_exec_prefix="$exec_prefix"
10989 exec_prefix="$acl_final_exec_prefix"
10990 eval x=\"$x\"
10991 exec_prefix="$acl_save_exec_prefix"
10992 prefix="$acl_save_prefix"
10993
10994 if test "X$x" = "X$element"; then
10995 haveit=yes
10996 break
10997 fi
10998 done
10999 if test -z "$haveit"; then
11000 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11001 fi
11002 done
11003
11004
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
11006$as_echo_n "checking for libxxhash... " >&6; }
11007if ${ac_cv_libxxhash+:} false; then :
11008 $as_echo_n "(cached) " >&6
11009else
11010
11011 ac_save_LIBS="$LIBS"
11012 LIBS="$LIBS $LIBXXHASH"
11013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11014/* end confdefs.h. */
11015#include <xxhash.h>
11016int
11017main ()
11018{
11019XXH32("foo", 3, 0);
11020
11021 ;
11022 return 0;
11023}
11024_ACEOF
11025if ac_fn_c_try_link "$LINENO"; then :
11026 ac_cv_libxxhash=yes
11027else
11028 ac_cv_libxxhash=no
11029fi
11030rm -f core conftest.err conftest.$ac_objext \
11031 conftest$ac_exeext conftest.$ac_ext
11032 LIBS="$ac_save_LIBS"
11033
11034fi
11035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
11036$as_echo "$ac_cv_libxxhash" >&6; }
11037 if test "$ac_cv_libxxhash" = yes; then
11038 HAVE_LIBXXHASH=yes
11039
11040$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
11041
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
11043$as_echo_n "checking how to link with libxxhash... " >&6; }
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
11045$as_echo "$LIBXXHASH" >&6; }
11046 else
11047 HAVE_LIBXXHASH=no
11048 CPPFLAGS="$ac_save_CPPFLAGS"
11049 LIBXXHASH=
11050 LTLIBXXHASH=
11051 fi
11052
11053
11054
11055
11056
11057
11058 if test "$HAVE_LIBXXHASH" != yes; then
11059 if test "$with_xxhash" = yes; then
11060 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
11061 fi
11062 fi
11063 if test "x$with_xxhash" = "xauto"; then
11064 with_xxhash="$HAVE_LIBXXHASH"
11065 fi
11066 fi
11067
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
11069$as_echo_n "checking whether to use xxhash... " >&6; }
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
11071$as_echo "$with_xxhash" >&6; }
11072
4635ff97
TT
11073# This is set by GDB_AC_COMMON.
11074
db6878ac
SM
11075
11076
11077# Check whether we will enable the inclusion of unit tests when
11078# compiling GDB.
11079#
11080# The default value of this option changes depending whether we're on
11081# development mode (in which case it's "true") or not (in which case
11082# it's "false"). The $development variable is set by the GDB_AC_COMMON
11083# macro, which must therefore be used before GDB_AC_SELFTEST.
11084
11085if test "x$development" != xtrue && test "x$development" != xfalse; then :
11086 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
11087fi
11088
11089# Check whether --enable-unit-tests was given.
11090if test "${enable_unit_tests+set}" = set; then :
11091 enableval=$enable_unit_tests; case "${enableval}" in
11092 yes) enable_unittests=true ;;
11093 no) enable_unittests=false ;;
11094 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
11095esac
11096else
11097 enable_unittests=$development
11098fi
11099
11100
11101if $enable_unittests; then
11102
11103$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
11104
11105
db6878ac
SM
11106fi
11107
11108
11109 case ${build_alias} in
11110 "") build_noncanonical=${build} ;;
11111 *) build_noncanonical=${build_alias} ;;
11112esac
11113
11114 case ${host_alias} in
11115 "") host_noncanonical=${build_noncanonical} ;;
11116 *) host_noncanonical=${host_alias} ;;
11117esac
11118
11119 case ${target_alias} in
11120 "") target_noncanonical=${host_noncanonical} ;;
11121 *) target_noncanonical=${target_alias} ;;
11122esac
11123
11124
11125
11126
11127
11128
11129# Dependency checking.
11130rm -rf .tst 2>/dev/null
11131mkdir .tst 2>/dev/null
11132if test -d .tst; then
11133 am__leading_dot=.
11134else
11135 am__leading_dot=_
11136fi
11137rmdir .tst 2>/dev/null
11138
11139DEPDIR="${am__leading_dot}deps"
11140
11141ac_config_commands="$ac_config_commands depdir"
11142
11143
11144
9e11e746
SJ
11145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
11146$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
11147set x ${MAKE-make}
11148ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
11149if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
11150 $as_echo_n "(cached) " >&6
9a665d62 11151else
9e11e746
SJ
11152 cat >conftest.make <<\_ACEOF
11153SHELL = /bin/sh
11154all:
11155 @echo '@@@%%%=$(MAKE)=@@@%%%'
11156_ACEOF
11157# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
11158case `${MAKE-make} -f conftest.make 2>/dev/null` in
11159 *@@@%%%=?*=@@@%%%*)
11160 eval ac_cv_prog_make_${ac_make}_set=yes;;
11161 *)
11162 eval ac_cv_prog_make_${ac_make}_set=no;;
11163esac
11164rm -f conftest.make
11165fi
11166if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9a665d62
TT
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11168$as_echo "yes" >&6; }
9e11e746
SJ
11169 SET_MAKE=
11170else
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172$as_echo "no" >&6; }
11173 SET_MAKE="MAKE=${MAKE-make}"
11174fi
9a665d62
TT
11175
11176
9e11e746
SJ
11177 MKINSTALLDIRS=
11178 if test -n "$ac_aux_dir"; then
11179 case "$ac_aux_dir" in
11180 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
11181 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
9a665d62 11182 esac
9e11e746
SJ
11183 fi
11184 if test -z "$MKINSTALLDIRS"; then
11185 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
11186 fi
9a665d62 11187
9a665d62 11188
9a665d62 11189
9e11e746
SJ
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
11191$as_echo_n "checking whether NLS is requested... " >&6; }
11192 # Check whether --enable-nls was given.
11193if test "${enable_nls+set}" = set; then :
11194 enableval=$enable_nls; USE_NLS=$enableval
11195else
11196 USE_NLS=yes
9a665d62
TT
11197fi
11198
9e11e746
SJ
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
11200$as_echo "$USE_NLS" >&6; }
db6878ac
SM
11201
11202
db6878ac
SM
11203
11204
db6878ac 11205
05ea2a05 11206
9e11e746
SJ
11207# Prepare PATH_SEPARATOR.
11208# The user is always right.
11209if test "${PATH_SEPARATOR+set}" != set; then
11210 echo "#! /bin/sh" >conf$$.sh
11211 echo "exit 0" >>conf$$.sh
11212 chmod +x conf$$.sh
11213 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11214 PATH_SEPARATOR=';'
11215 else
11216 PATH_SEPARATOR=:
db6878ac 11217 fi
9e11e746
SJ
11218 rm -f conf$$.sh
11219fi
db6878ac 11220
9e11e746
SJ
11221# Find out how to test for executable files. Don't use a zero-byte file,
11222# as systems may use methods other than mode bits to determine executability.
11223cat >conf$$.file <<_ASEOF
11224#! /bin/sh
11225exit 0
11226_ASEOF
11227chmod +x conf$$.file
11228if test -x conf$$.file >/dev/null 2>&1; then
11229 ac_executable_p="test -x"
db6878ac 11230else
9e11e746 11231 ac_executable_p="test -f"
db6878ac 11232fi
9e11e746 11233rm -f conf$$.file
db6878ac 11234
9e11e746
SJ
11235# Extract the first word of "msgfmt", so it can be a program name with args.
11236set dummy msgfmt; ac_word=$2
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11238$as_echo_n "checking for $ac_word... " >&6; }
11239if ${ac_cv_path_MSGFMT+:} false; then :
11240 $as_echo_n "(cached) " >&6
11241else
11242 case "$MSGFMT" in
11243 [\\/]* | ?:[\\/]*)
11244 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
11245 ;;
11246 *)
11247 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11248 for ac_dir in $PATH; do
11249 IFS="$ac_save_IFS"
11250 test -z "$ac_dir" && ac_dir=.
11251 for ac_exec_ext in '' $ac_executable_extensions; do
11252 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11253 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
11254 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11255 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
11256 break 2
11257 fi
11258 fi
11259 done
11260 done
11261 IFS="$ac_save_IFS"
11262 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
11263 ;;
11264esac
db6878ac 11265fi
9e11e746
SJ
11266MSGFMT="$ac_cv_path_MSGFMT"
11267if test "$MSGFMT" != ":"; then
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
11269$as_echo "$MSGFMT" >&6; }
11270else
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
db6878ac
SM
11273fi
11274
9e11e746
SJ
11275 # Extract the first word of "gmsgfmt", so it can be a program name with args.
11276set dummy gmsgfmt; ac_word=$2
11277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11278$as_echo_n "checking for $ac_word... " >&6; }
11279if ${ac_cv_path_GMSGFMT+:} false; then :
11280 $as_echo_n "(cached) " >&6
11281else
11282 case $GMSGFMT in
11283 [\\/]* | ?:[\\/]*)
11284 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
11285 ;;
11286 *)
11287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11288for as_dir in $PATH
11289do
11290 IFS=$as_save_IFS
11291 test -z "$as_dir" && as_dir=.
11292 for ac_exec_ext in '' $ac_executable_extensions; do
11293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11294 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
11295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11296 break 2
11297 fi
11298done
11299 done
11300IFS=$as_save_IFS
db6878ac 11301
9e11e746
SJ
11302 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
11303 ;;
11304esac
11305fi
11306GMSGFMT=$ac_cv_path_GMSGFMT
11307if test -n "$GMSGFMT"; then
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
11309$as_echo "$GMSGFMT" >&6; }
11310else
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11312$as_echo "no" >&6; }
db6878ac
SM
11313fi
11314
5e030278 11315
5e030278
TT
11316
11317
9e11e746
SJ
11318# Prepare PATH_SEPARATOR.
11319# The user is always right.
11320if test "${PATH_SEPARATOR+set}" != set; then
11321 echo "#! /bin/sh" >conf$$.sh
11322 echo "exit 0" >>conf$$.sh
11323 chmod +x conf$$.sh
11324 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11325 PATH_SEPARATOR=';'
11326 else
11327 PATH_SEPARATOR=:
11328 fi
11329 rm -f conf$$.sh
11330fi
5e030278 11331
9e11e746
SJ
11332# Find out how to test for executable files. Don't use a zero-byte file,
11333# as systems may use methods other than mode bits to determine executability.
11334cat >conf$$.file <<_ASEOF
11335#! /bin/sh
11336exit 0
11337_ASEOF
11338chmod +x conf$$.file
11339if test -x conf$$.file >/dev/null 2>&1; then
11340 ac_executable_p="test -x"
11341else
11342 ac_executable_p="test -f"
db6878ac 11343fi
9e11e746 11344rm -f conf$$.file
5e030278 11345
9e11e746
SJ
11346# Extract the first word of "xgettext", so it can be a program name with args.
11347set dummy xgettext; ac_word=$2
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
11350if ${ac_cv_path_XGETTEXT+:} false; then :
11351 $as_echo_n "(cached) " >&6
11352else
11353 case "$XGETTEXT" in
11354 [\\/]* | ?:[\\/]*)
11355 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
11356 ;;
11357 *)
11358 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11359 for ac_dir in $PATH; do
11360 IFS="$ac_save_IFS"
11361 test -z "$ac_dir" && ac_dir=.
11362 for ac_exec_ext in '' $ac_executable_extensions; do
11363 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11364 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11365 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11366 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
11367 break 2
11368 fi
11369 fi
11370 done
11371 done
11372 IFS="$ac_save_IFS"
11373 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
11374 ;;
11375esac
11376fi
11377XGETTEXT="$ac_cv_path_XGETTEXT"
11378if test "$XGETTEXT" != ":"; then
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
11380$as_echo "$XGETTEXT" >&6; }
11381else
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
11384fi
11385
11386 rm -f messages.po
11387
11388
11389# Prepare PATH_SEPARATOR.
11390# The user is always right.
11391if test "${PATH_SEPARATOR+set}" != set; then
11392 echo "#! /bin/sh" >conf$$.sh
11393 echo "exit 0" >>conf$$.sh
11394 chmod +x conf$$.sh
11395 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11396 PATH_SEPARATOR=';'
11397 else
11398 PATH_SEPARATOR=:
11399 fi
11400 rm -f conf$$.sh
11401fi
11402
11403# Find out how to test for executable files. Don't use a zero-byte file,
11404# as systems may use methods other than mode bits to determine executability.
11405cat >conf$$.file <<_ASEOF
11406#! /bin/sh
11407exit 0
11408_ASEOF
11409chmod +x conf$$.file
11410if test -x conf$$.file >/dev/null 2>&1; then
11411 ac_executable_p="test -x"
11412else
11413 ac_executable_p="test -f"
11414fi
11415rm -f conf$$.file
11416
11417# Extract the first word of "msgmerge", so it can be a program name with args.
11418set dummy msgmerge; ac_word=$2
11419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11420$as_echo_n "checking for $ac_word... " >&6; }
11421if ${ac_cv_path_MSGMERGE+:} false; then :
11422 $as_echo_n "(cached) " >&6
11423else
11424 case "$MSGMERGE" in
11425 [\\/]* | ?:[\\/]*)
11426 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
11427 ;;
11428 *)
11429 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11430 for ac_dir in $PATH; do
11431 IFS="$ac_save_IFS"
11432 test -z "$ac_dir" && ac_dir=.
11433 for ac_exec_ext in '' $ac_executable_extensions; do
11434 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11435 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
11436 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
11437 break 2
11438 fi
11439 fi
11440 done
11441 done
11442 IFS="$ac_save_IFS"
11443 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
11444 ;;
11445esac
11446fi
11447MSGMERGE="$ac_cv_path_MSGMERGE"
11448if test "$MSGMERGE" != ":"; then
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
11450$as_echo "$MSGMERGE" >&6; }
11451else
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11453$as_echo "no" >&6; }
11454fi
11455
11456
11457 if test "$GMSGFMT" != ":"; then
11458 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
11459 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11460 : ;
11461 else
11462 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
11464$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
11465 GMSGFMT=":"
11466 fi
11467 fi
11468
11469 if test "$XGETTEXT" != ":"; then
11470 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
11471 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11472 : ;
11473 else
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
11475$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
11476 XGETTEXT=":"
11477 fi
11478 rm -f messages.po
11479 fi
11480
11481 ac_config_commands="$ac_config_commands default-1"
11482
11483
11484
11485
11486
11487
11488
11489
11490 use_additional=yes
11491
11492 acl_save_prefix="$prefix"
11493 prefix="$acl_final_prefix"
11494 acl_save_exec_prefix="$exec_prefix"
11495 exec_prefix="$acl_final_exec_prefix"
11496
11497 eval additional_includedir=\"$includedir\"
11498 eval additional_libdir=\"$libdir\"
11499
11500 exec_prefix="$acl_save_exec_prefix"
11501 prefix="$acl_save_prefix"
11502
11503
11504# Check whether --with-libiconv-prefix was given.
11505if test "${with_libiconv_prefix+set}" = set; then :
11506 withval=$with_libiconv_prefix;
11507 if test "X$withval" = "Xno"; then
11508 use_additional=no
11509 else
11510 if test "X$withval" = "X"; then
11511
11512 acl_save_prefix="$prefix"
11513 prefix="$acl_final_prefix"
11514 acl_save_exec_prefix="$exec_prefix"
11515 exec_prefix="$acl_final_exec_prefix"
11516
11517 eval additional_includedir=\"$includedir\"
11518 eval additional_libdir=\"$libdir\"
11519
11520 exec_prefix="$acl_save_exec_prefix"
11521 prefix="$acl_save_prefix"
11522
11523 else
11524 additional_includedir="$withval/include"
11525 additional_libdir="$withval/lib"
11526 fi
11527 fi
11528
11529fi
11530
11531
11532# Check whether --with-libiconv-type was given.
11533if test "${with_libiconv_type+set}" = set; then :
11534 withval=$with_libiconv_type; with_libiconv_type=$withval
11535else
11536 with_libiconv_type=auto
11537fi
11538
11539 lib_type=`eval echo \$with_libiconv_type`
11540
11541 LIBICONV=
11542 LTLIBICONV=
11543 INCICONV=
11544 rpathdirs=
11545 ltrpathdirs=
11546 names_already_handled=
11547 names_next_round='iconv '
11548 while test -n "$names_next_round"; do
11549 names_this_round="$names_next_round"
11550 names_next_round=
11551 for name in $names_this_round; do
11552 already_handled=
11553 for n in $names_already_handled; do
11554 if test "$n" = "$name"; then
11555 already_handled=yes
11556 break
11557 fi
11558 done
11559 if test -z "$already_handled"; then
11560 names_already_handled="$names_already_handled $name"
11561 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11562 eval value=\"\$HAVE_LIB$uppername\"
11563 if test -n "$value"; then
11564 if test "$value" = yes; then
11565 eval value=\"\$LIB$uppername\"
11566 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11567 eval value=\"\$LTLIB$uppername\"
11568 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11569 else
11570 :
11571 fi
11572 else
11573 found_dir=
11574 found_la=
11575 found_so=
11576 found_a=
11577 if test $use_additional = yes; then
11578 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11579 found_dir="$additional_libdir"
11580 found_so="$additional_libdir/lib$name.$shlibext"
11581 if test -f "$additional_libdir/lib$name.la"; then
11582 found_la="$additional_libdir/lib$name.la"
11583 fi
11584 elif test x$lib_type != xshared; then
11585 if test -f "$additional_libdir/lib$name.$libext"; then
11586 found_dir="$additional_libdir"
11587 found_a="$additional_libdir/lib$name.$libext"
11588 if test -f "$additional_libdir/lib$name.la"; then
11589 found_la="$additional_libdir/lib$name.la"
11590 fi
11591 fi
11592 fi
11593 fi
11594 if test "X$found_dir" = "X"; then
11595 for x in $LDFLAGS $LTLIBICONV; do
11596
11597 acl_save_prefix="$prefix"
11598 prefix="$acl_final_prefix"
11599 acl_save_exec_prefix="$exec_prefix"
11600 exec_prefix="$acl_final_exec_prefix"
11601 eval x=\"$x\"
11602 exec_prefix="$acl_save_exec_prefix"
11603 prefix="$acl_save_prefix"
11604
11605 case "$x" in
11606 -L*)
11607 dir=`echo "X$x" | sed -e 's/^X-L//'`
11608 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
11609 found_dir="$dir"
11610 found_so="$dir/lib$name.$shlibext"
11611 if test -f "$dir/lib$name.la"; then
11612 found_la="$dir/lib$name.la"
11613 fi
11614 elif test x$lib_type != xshared; then
11615 if test -f "$dir/lib$name.$libext"; then
11616 found_dir="$dir"
11617 found_a="$dir/lib$name.$libext"
11618 if test -f "$dir/lib$name.la"; then
11619 found_la="$dir/lib$name.la"
11620 fi
11621 fi
11622 fi
11623 ;;
11624 esac
11625 if test "X$found_dir" != "X"; then
11626 break
11627 fi
11628 done
11629 fi
11630 if test "X$found_dir" != "X"; then
11631 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11632 if test "X$found_so" != "X"; then
11633 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11634 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11635 else
11636 haveit=
11637 for x in $ltrpathdirs; do
11638 if test "X$x" = "X$found_dir"; then
11639 haveit=yes
11640 break
11641 fi
11642 done
11643 if test -z "$haveit"; then
11644 ltrpathdirs="$ltrpathdirs $found_dir"
11645 fi
11646 if test "$hardcode_direct" = yes; then
11647 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11648 else
11649 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11650 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11651 haveit=
11652 for x in $rpathdirs; do
11653 if test "X$x" = "X$found_dir"; then
11654 haveit=yes
11655 break
11656 fi
11657 done
11658 if test -z "$haveit"; then
11659 rpathdirs="$rpathdirs $found_dir"
11660 fi
11661 else
11662 haveit=
11663 for x in $LDFLAGS $LIBICONV; do
11664
11665 acl_save_prefix="$prefix"
11666 prefix="$acl_final_prefix"
11667 acl_save_exec_prefix="$exec_prefix"
11668 exec_prefix="$acl_final_exec_prefix"
11669 eval x=\"$x\"
11670 exec_prefix="$acl_save_exec_prefix"
11671 prefix="$acl_save_prefix"
11672
11673 if test "X$x" = "X-L$found_dir"; then
11674 haveit=yes
11675 break
11676 fi
11677 done
11678 if test -z "$haveit"; then
11679 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11680 fi
11681 if test "$hardcode_minus_L" != no; then
11682 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11683 else
11684 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11685 fi
11686 fi
11687 fi
11688 fi
11689 else
11690 if test "X$found_a" != "X"; then
11691 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11692 else
11693 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11694 fi
11695 fi
11696 additional_includedir=
11697 case "$found_dir" in
11698 */lib | */lib/)
11699 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11700 additional_includedir="$basedir/include"
11701 ;;
11702 esac
11703 if test "X$additional_includedir" != "X"; then
11704 if test "X$additional_includedir" != "X/usr/include"; then
11705 haveit=
11706 if test "X$additional_includedir" = "X/usr/local/include"; then
11707 if test -n "$GCC"; then
11708 case $host_os in
11709 linux*) haveit=yes;;
11710 esac
11711 fi
11712 fi
11713 if test -z "$haveit"; then
11714 for x in $CPPFLAGS $INCICONV; do
11715
11716 acl_save_prefix="$prefix"
11717 prefix="$acl_final_prefix"
11718 acl_save_exec_prefix="$exec_prefix"
11719 exec_prefix="$acl_final_exec_prefix"
11720 eval x=\"$x\"
11721 exec_prefix="$acl_save_exec_prefix"
11722 prefix="$acl_save_prefix"
11723
11724 if test "X$x" = "X-I$additional_includedir"; then
11725 haveit=yes
11726 break
11727 fi
11728 done
11729 if test -z "$haveit"; then
11730 if test -d "$additional_includedir"; then
11731 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11732 fi
11733 fi
11734 fi
11735 fi
11736 fi
11737 if test -n "$found_la"; then
11738 save_libdir="$libdir"
11739 case "$found_la" in
11740 */* | *\\*) . "$found_la" ;;
11741 *) . "./$found_la" ;;
11742 esac
11743 libdir="$save_libdir"
11744 for dep in $dependency_libs; do
11745 case "$dep" in
11746 -L*)
11747 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11748 if test "X$additional_libdir" != "X/usr/lib"; then
11749 haveit=
11750 if test "X$additional_libdir" = "X/usr/local/lib"; then
11751 if test -n "$GCC"; then
11752 case $host_os in
11753 linux*) haveit=yes;;
11754 esac
11755 fi
11756 fi
11757 if test -z "$haveit"; then
11758 haveit=
11759 for x in $LDFLAGS $LIBICONV; do
11760
11761 acl_save_prefix="$prefix"
11762 prefix="$acl_final_prefix"
11763 acl_save_exec_prefix="$exec_prefix"
11764 exec_prefix="$acl_final_exec_prefix"
11765 eval x=\"$x\"
11766 exec_prefix="$acl_save_exec_prefix"
11767 prefix="$acl_save_prefix"
11768
11769 if test "X$x" = "X-L$additional_libdir"; then
11770 haveit=yes
11771 break
11772 fi
11773 done
11774 if test -z "$haveit"; then
11775 if test -d "$additional_libdir"; then
11776 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11777 fi
11778 fi
11779 haveit=
11780 for x in $LDFLAGS $LTLIBICONV; do
11781
11782 acl_save_prefix="$prefix"
11783 prefix="$acl_final_prefix"
11784 acl_save_exec_prefix="$exec_prefix"
11785 exec_prefix="$acl_final_exec_prefix"
11786 eval x=\"$x\"
11787 exec_prefix="$acl_save_exec_prefix"
11788 prefix="$acl_save_prefix"
11789
11790 if test "X$x" = "X-L$additional_libdir"; then
11791 haveit=yes
11792 break
11793 fi
11794 done
11795 if test -z "$haveit"; then
11796 if test -d "$additional_libdir"; then
11797 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11798 fi
11799 fi
11800 fi
11801 fi
11802 ;;
11803 -R*)
11804 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11805 if test "$enable_rpath" != no; then
11806 haveit=
11807 for x in $rpathdirs; do
11808 if test "X$x" = "X$dir"; then
11809 haveit=yes
11810 break
11811 fi
11812 done
11813 if test -z "$haveit"; then
11814 rpathdirs="$rpathdirs $dir"
11815 fi
11816 haveit=
11817 for x in $ltrpathdirs; do
11818 if test "X$x" = "X$dir"; then
11819 haveit=yes
11820 break
11821 fi
11822 done
11823 if test -z "$haveit"; then
11824 ltrpathdirs="$ltrpathdirs $dir"
11825 fi
11826 fi
11827 ;;
11828 -l*)
11829 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11830 ;;
11831 *.la)
11832 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11833 ;;
11834 *)
11835 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11836 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11837 ;;
11838 esac
11839 done
11840 fi
11841 else
11842 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
11843 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11844 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11845 else
11846 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
11847 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
11848 fi
11849 fi
11850 fi
11851 fi
11852 done
11853 done
11854 if test "X$rpathdirs" != "X"; then
11855 if test -n "$hardcode_libdir_separator"; then
11856 alldirs=
11857 for found_dir in $rpathdirs; do
11858 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11859 done
11860 acl_save_libdir="$libdir"
11861 libdir="$alldirs"
11862 eval flag=\"$hardcode_libdir_flag_spec\"
11863 libdir="$acl_save_libdir"
11864 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11865 else
11866 for found_dir in $rpathdirs; do
11867 acl_save_libdir="$libdir"
11868 libdir="$found_dir"
11869 eval flag=\"$hardcode_libdir_flag_spec\"
11870 libdir="$acl_save_libdir"
11871 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11872 done
11873 fi
11874 fi
11875 if test "X$ltrpathdirs" != "X"; then
11876 for found_dir in $ltrpathdirs; do
11877 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11878 done
11879 fi
11880
11881
11882
11883
11884
11885if test -f ../gettext/uninstalled-config.sh; then
11886 relative_builddir='$(top_builddir)/../gettext'
11887 . ../gettext/uninstalled-config.sh
11888else
11889 # The sister gettext directory doesn't exist and won't collect information on
11890 # using gettext for us. Call a bundled AM_GNU_GETTEXT.
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11915$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
11916if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
11917 $as_echo_n "(cached) " >&6
11918else
11919 gt_save_LIBS="$LIBS"
11920 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922/* end confdefs.h. */
11923#include <CoreFoundation/CFPreferences.h>
11924int
11925main ()
11926{
11927CFPreferencesCopyAppValue(NULL, NULL)
11928 ;
11929 return 0;
11930}
11931_ACEOF
11932if ac_fn_c_try_link "$LINENO"; then :
11933 gt_cv_func_CFPreferencesCopyAppValue=yes
11934else
11935 gt_cv_func_CFPreferencesCopyAppValue=no
11936fi
11937rm -f core conftest.err conftest.$ac_objext \
11938 conftest$ac_exeext conftest.$ac_ext
11939 LIBS="$gt_save_LIBS"
11940fi
11941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11942$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11943 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11944
11945$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
11946
11947 fi
11948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
11949$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
11950if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
11951 $as_echo_n "(cached) " >&6
11952else
11953 gt_save_LIBS="$LIBS"
11954 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11956/* end confdefs.h. */
11957#include <CoreFoundation/CFLocale.h>
11958int
11959main ()
11960{
11961CFLocaleCopyPreferredLanguages();
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966if ac_fn_c_try_link "$LINENO"; then :
11967 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
11968else
11969 gt_cv_func_CFLocaleCopyPreferredLanguages=no
11970fi
11971rm -f core conftest.err conftest.$ac_objext \
11972 conftest$ac_exeext conftest.$ac_ext
11973 LIBS="$gt_save_LIBS"
11974fi
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
11976$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
11977 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
11978
11979$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
11980
11981 fi
11982 INTL_MACOSX_LIBS=
11983 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
11984 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
11985 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
11986 fi
11987
11988
11989
11990
11991
11992
11993 LIBINTL=
11994 LTLIBINTL=
11995 POSUB=
11996
11997 case " $gt_needs " in
11998 *" need-formatstring-macros "*) gt_api_version=3 ;;
11999 *" need-ngettext "*) gt_api_version=2 ;;
12000 *) gt_api_version=1 ;;
12001 esac
12002 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
12003 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
12004
12005 if test "$USE_NLS" = "yes"; then
12006 gt_use_preinstalled_gnugettext=no
12007
12008
12009 if test $gt_api_version -ge 3; then
12010 gt_revision_test_code='
12011#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12012#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
12013#endif
12014typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
12015'
12016 else
12017 gt_revision_test_code=
12018 fi
12019 if test $gt_api_version -ge 2; then
12020 gt_expression_test_code=' + * ngettext ("", "", 0)'
12021 else
12022 gt_expression_test_code=
12023 fi
12024
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
12026$as_echo_n "checking for GNU gettext in libc... " >&6; }
12027if eval \${$gt_func_gnugettext_libc+:} false; then :
12028 $as_echo_n "(cached) " >&6
12029else
12030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12031/* end confdefs.h. */
12032
12033#include <libintl.h>
12034#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12035extern int _nl_msg_cat_cntr;
12036extern int *_nl_domain_bindings;
12037#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
12038#else
12039#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12040#endif
12041$gt_revision_test_code
12042
12043int
12044main ()
12045{
12046
12047bindtextdomain ("", "");
12048return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12049
12050 ;
12051 return 0;
12052}
12053_ACEOF
12054if ac_fn_c_try_link "$LINENO"; then :
12055 eval "$gt_func_gnugettext_libc=yes"
12056else
12057 eval "$gt_func_gnugettext_libc=no"
12058fi
12059rm -f core conftest.err conftest.$ac_objext \
12060 conftest$ac_exeext conftest.$ac_ext
12061fi
12062eval ac_res=\$$gt_func_gnugettext_libc
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12064$as_echo "$ac_res" >&6; }
12065
12066 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
12067
12068
12069
12070
12071
12072 am_save_CPPFLAGS="$CPPFLAGS"
12073
12074 for element in $INCICONV; do
12075 haveit=
12076 for x in $CPPFLAGS; do
12077
12078 acl_save_prefix="$prefix"
12079 prefix="$acl_final_prefix"
12080 acl_save_exec_prefix="$exec_prefix"
12081 exec_prefix="$acl_final_exec_prefix"
12082 eval x=\"$x\"
12083 exec_prefix="$acl_save_exec_prefix"
12084 prefix="$acl_save_prefix"
12085
12086 if test "X$x" = "X$element"; then
12087 haveit=yes
12088 break
12089 fi
12090 done
12091 if test -z "$haveit"; then
12092 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12093 fi
12094 done
12095
12096
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12098$as_echo_n "checking for iconv... " >&6; }
12099if ${am_cv_func_iconv+:} false; then :
12100 $as_echo_n "(cached) " >&6
12101else
12102
12103 am_cv_func_iconv="no, consider installing GNU libiconv"
12104 am_cv_lib_iconv=no
12105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12106/* end confdefs.h. */
12107
12108#include <stdlib.h>
12109#include <iconv.h>
12110
12111int
12112main ()
12113{
12114iconv_t cd = iconv_open("","");
12115 iconv(cd,NULL,NULL,NULL,NULL);
12116 iconv_close(cd);
12117 ;
12118 return 0;
12119}
12120_ACEOF
12121if ac_fn_c_try_link "$LINENO"; then :
12122 am_cv_func_iconv=yes
12123fi
12124rm -f core conftest.err conftest.$ac_objext \
12125 conftest$ac_exeext conftest.$ac_ext
12126 if test "$am_cv_func_iconv" != yes; then
12127 am_save_LIBS="$LIBS"
12128 LIBS="$LIBS $LIBICONV"
12129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12130/* end confdefs.h. */
12131
12132#include <stdlib.h>
12133#include <iconv.h>
12134
12135int
12136main ()
12137{
12138iconv_t cd = iconv_open("","");
12139 iconv(cd,NULL,NULL,NULL,NULL);
12140 iconv_close(cd);
12141 ;
12142 return 0;
12143}
12144_ACEOF
12145if ac_fn_c_try_link "$LINENO"; then :
12146 am_cv_lib_iconv=yes
12147 am_cv_func_iconv=yes
12148fi
12149rm -f core conftest.err conftest.$ac_objext \
12150 conftest$ac_exeext conftest.$ac_ext
12151 LIBS="$am_save_LIBS"
12152 fi
12153
12154fi
12155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12156$as_echo "$am_cv_func_iconv" >&6; }
12157 if test "$am_cv_func_iconv" = yes; then
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12159$as_echo_n "checking for working iconv... " >&6; }
12160if ${am_cv_func_iconv_works+:} false; then :
12161 $as_echo_n "(cached) " >&6
12162else
12163
12164 am_save_LIBS="$LIBS"
12165 if test $am_cv_lib_iconv = yes; then
12166 LIBS="$LIBS $LIBICONV"
12167 fi
12168 am_cv_func_iconv_works=no
12169 for ac_iconv_const in '' 'const'; do
12170 if test "$cross_compiling" = yes; then :
12171 case "$host_os" in
12172 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12173 *) am_cv_func_iconv_works="guessing yes" ;;
12174 esac
12175else
12176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12177/* end confdefs.h. */
12178
12179#include <iconv.h>
12180#include <string.h>
12181
12182#ifndef ICONV_CONST
12183# define ICONV_CONST $ac_iconv_const
12184#endif
12185
12186int
12187main ()
12188{
12189int result = 0;
12190 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
12191 successful returns. This is even documented in
12192 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
12193 {
12194 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12195 if (cd_utf8_to_88591 != (iconv_t)(-1))
12196 {
12197 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12198 char buf[10];
12199 ICONV_CONST char *inptr = input;
12200 size_t inbytesleft = strlen (input);
12201 char *outptr = buf;
12202 size_t outbytesleft = sizeof (buf);
12203 size_t res = iconv (cd_utf8_to_88591,
12204 &inptr, &inbytesleft,
12205 &outptr, &outbytesleft);
12206 if (res == 0)
12207 result |= 1;
12208 iconv_close (cd_utf8_to_88591);
12209 }
12210 }
12211 /* Test against Solaris 10 bug: Failures are not distinguishable from
12212 successful returns. */
12213 {
12214 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12215 if (cd_ascii_to_88591 != (iconv_t)(-1))
12216 {
12217 static ICONV_CONST char input[] = "\263";
12218 char buf[10];
12219 ICONV_CONST char *inptr = input;
12220 size_t inbytesleft = strlen (input);
12221 char *outptr = buf;
12222 size_t outbytesleft = sizeof (buf);
12223 size_t res = iconv (cd_ascii_to_88591,
12224 &inptr, &inbytesleft,
12225 &outptr, &outbytesleft);
12226 if (res == 0)
12227 result |= 2;
12228 iconv_close (cd_ascii_to_88591);
12229 }
12230 }
12231 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
12232 {
12233 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12234 if (cd_88591_to_utf8 != (iconv_t)(-1))
12235 {
12236 static ICONV_CONST char input[] = "\304";
12237 static char buf[2] = { (char)0xDE, (char)0xAD };
12238 ICONV_CONST char *inptr = input;
12239 size_t inbytesleft = 1;
12240 char *outptr = buf;
12241 size_t outbytesleft = 1;
12242 size_t res = iconv (cd_88591_to_utf8,
12243 &inptr, &inbytesleft,
12244 &outptr, &outbytesleft);
12245 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12246 result |= 4;
12247 iconv_close (cd_88591_to_utf8);
12248 }
12249 }
12250#if 0 /* This bug could be worked around by the caller. */
12251 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
12252 {
12253 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12254 if (cd_88591_to_utf8 != (iconv_t)(-1))
12255 {
12256 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12257 char buf[50];
12258 ICONV_CONST char *inptr = input;
12259 size_t inbytesleft = strlen (input);
12260 char *outptr = buf;
12261 size_t outbytesleft = sizeof (buf);
12262 size_t res = iconv (cd_88591_to_utf8,
12263 &inptr, &inbytesleft,
12264 &outptr, &outbytesleft);
12265 if ((int)res > 0)
12266 result |= 8;
12267 iconv_close (cd_88591_to_utf8);
12268 }
12269 }
12270#endif
12271 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12272 provided. */
12273 {
12274 /* Try standardized names. */
12275 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12276 /* Try IRIX, OSF/1 names. */
12277 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12278 /* Try AIX names. */
12279 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12280 /* Try HP-UX names. */
12281 iconv_t cd4 = iconv_open ("utf8", "eucJP");
12282 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12283 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12284 result |= 16;
12285 if (cd1 != (iconv_t)(-1))
12286 iconv_close (cd1);
12287 if (cd2 != (iconv_t)(-1))
12288 iconv_close (cd2);
12289 if (cd3 != (iconv_t)(-1))
12290 iconv_close (cd3);
12291 if (cd4 != (iconv_t)(-1))
12292 iconv_close (cd4);
12293 }
12294 return result;
12295
12296 ;
12297 return 0;
12298}
12299_ACEOF
12300if ac_fn_c_try_run "$LINENO"; then :
12301 am_cv_func_iconv_works=yes
12302fi
12303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12304 conftest.$ac_objext conftest.beam conftest.$ac_ext
12305fi
12306
12307 test "$am_cv_func_iconv_works" = no || break
12308 done
12309 LIBS="$am_save_LIBS"
12310
12311fi
12312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12313$as_echo "$am_cv_func_iconv_works" >&6; }
12314 case "$am_cv_func_iconv_works" in
12315 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12316 *) am_func_iconv=yes ;;
12317 esac
12318 else
12319 am_func_iconv=no am_cv_lib_iconv=no
12320 fi
12321 if test "$am_func_iconv" = yes; then
12322
12323$as_echo "#define HAVE_ICONV 1" >>confdefs.h
12324
12325 fi
12326 if test "$am_cv_lib_iconv" = yes; then
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12328$as_echo_n "checking how to link with libiconv... " >&6; }
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12330$as_echo "$LIBICONV" >&6; }
12331 else
12332 CPPFLAGS="$am_save_CPPFLAGS"
12333 LIBICONV=
12334 LTLIBICONV=
12335 fi
12336
12337
12338
12339
12340
12341
12342 use_additional=yes
12343
12344 acl_save_prefix="$prefix"
12345 prefix="$acl_final_prefix"
12346 acl_save_exec_prefix="$exec_prefix"
12347 exec_prefix="$acl_final_exec_prefix"
12348
12349 eval additional_includedir=\"$includedir\"
12350 eval additional_libdir=\"$libdir\"
12351
12352 exec_prefix="$acl_save_exec_prefix"
12353 prefix="$acl_save_prefix"
12354
12355
12356# Check whether --with-libintl-prefix was given.
12357if test "${with_libintl_prefix+set}" = set; then :
12358 withval=$with_libintl_prefix;
12359 if test "X$withval" = "Xno"; then
12360 use_additional=no
12361 else
12362 if test "X$withval" = "X"; then
12363
12364 acl_save_prefix="$prefix"
12365 prefix="$acl_final_prefix"
12366 acl_save_exec_prefix="$exec_prefix"
12367 exec_prefix="$acl_final_exec_prefix"
12368
12369 eval additional_includedir=\"$includedir\"
12370 eval additional_libdir=\"$libdir\"
12371
12372 exec_prefix="$acl_save_exec_prefix"
12373 prefix="$acl_save_prefix"
12374
12375 else
12376 additional_includedir="$withval/include"
12377 additional_libdir="$withval/lib"
12378 fi
12379 fi
12380
12381fi
12382
12383
12384# Check whether --with-libintl-type was given.
12385if test "${with_libintl_type+set}" = set; then :
12386 withval=$with_libintl_type; with_libintl_type=$withval
12387else
12388 with_libintl_type=auto
12389fi
12390
12391 lib_type=`eval echo \$with_libintl_type`
12392
12393 LIBINTL=
12394 LTLIBINTL=
12395 INCINTL=
12396 rpathdirs=
12397 ltrpathdirs=
12398 names_already_handled=
12399 names_next_round='intl '
12400 while test -n "$names_next_round"; do
12401 names_this_round="$names_next_round"
12402 names_next_round=
12403 for name in $names_this_round; do
12404 already_handled=
12405 for n in $names_already_handled; do
12406 if test "$n" = "$name"; then
12407 already_handled=yes
12408 break
12409 fi
12410 done
12411 if test -z "$already_handled"; then
12412 names_already_handled="$names_already_handled $name"
12413 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12414 eval value=\"\$HAVE_LIB$uppername\"
12415 if test -n "$value"; then
12416 if test "$value" = yes; then
12417 eval value=\"\$LIB$uppername\"
12418 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12419 eval value=\"\$LTLIB$uppername\"
12420 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12421 else
12422 :
12423 fi
12424 else
12425 found_dir=
12426 found_la=
12427 found_so=
12428 found_a=
12429 if test $use_additional = yes; then
12430 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12431 found_dir="$additional_libdir"
12432 found_so="$additional_libdir/lib$name.$shlibext"
12433 if test -f "$additional_libdir/lib$name.la"; then
12434 found_la="$additional_libdir/lib$name.la"
12435 fi
12436 elif test x$lib_type != xshared; then
12437 if test -f "$additional_libdir/lib$name.$libext"; then
12438 found_dir="$additional_libdir"
12439 found_a="$additional_libdir/lib$name.$libext"
12440 if test -f "$additional_libdir/lib$name.la"; then
12441 found_la="$additional_libdir/lib$name.la"
12442 fi
12443 fi
12444 fi
12445 fi
12446 if test "X$found_dir" = "X"; then
12447 for x in $LDFLAGS $LTLIBINTL; do
12448
12449 acl_save_prefix="$prefix"
12450 prefix="$acl_final_prefix"
12451 acl_save_exec_prefix="$exec_prefix"
12452 exec_prefix="$acl_final_exec_prefix"
12453 eval x=\"$x\"
12454 exec_prefix="$acl_save_exec_prefix"
12455 prefix="$acl_save_prefix"
12456
12457 case "$x" in
12458 -L*)
12459 dir=`echo "X$x" | sed -e 's/^X-L//'`
12460 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
12461 found_dir="$dir"
12462 found_so="$dir/lib$name.$shlibext"
12463 if test -f "$dir/lib$name.la"; then
12464 found_la="$dir/lib$name.la"
12465 fi
12466 elif test x$lib_type != xshared; then
12467 if test -f "$dir/lib$name.$libext"; then
12468 found_dir="$dir"
12469 found_a="$dir/lib$name.$libext"
12470 if test -f "$dir/lib$name.la"; then
12471 found_la="$dir/lib$name.la"
12472 fi
12473 fi
12474 fi
12475 ;;
12476 esac
12477 if test "X$found_dir" != "X"; then
12478 break
12479 fi
12480 done
12481 fi
12482 if test "X$found_dir" != "X"; then
12483 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12484 if test "X$found_so" != "X"; then
12485 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12486 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12487 else
12488 haveit=
12489 for x in $ltrpathdirs; do
12490 if test "X$x" = "X$found_dir"; then
12491 haveit=yes
12492 break
12493 fi
12494 done
12495 if test -z "$haveit"; then
12496 ltrpathdirs="$ltrpathdirs $found_dir"
12497 fi
12498 if test "$hardcode_direct" = yes; then
12499 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12500 else
12501 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12502 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12503 haveit=
12504 for x in $rpathdirs; do
12505 if test "X$x" = "X$found_dir"; then
12506 haveit=yes
12507 break
12508 fi
12509 done
12510 if test -z "$haveit"; then
12511 rpathdirs="$rpathdirs $found_dir"
12512 fi
12513 else
12514 haveit=
12515 for x in $LDFLAGS $LIBINTL; do
12516
12517 acl_save_prefix="$prefix"
12518 prefix="$acl_final_prefix"
12519 acl_save_exec_prefix="$exec_prefix"
12520 exec_prefix="$acl_final_exec_prefix"
12521 eval x=\"$x\"
12522 exec_prefix="$acl_save_exec_prefix"
12523 prefix="$acl_save_prefix"
12524
12525 if test "X$x" = "X-L$found_dir"; then
12526 haveit=yes
12527 break
12528 fi
12529 done
12530 if test -z "$haveit"; then
12531 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12532 fi
12533 if test "$hardcode_minus_L" != no; then
12534 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12535 else
12536 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12537 fi
12538 fi
12539 fi
12540 fi
12541 else
12542 if test "X$found_a" != "X"; then
12543 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12544 else
12545 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12546 fi
12547 fi
12548 additional_includedir=
12549 case "$found_dir" in
12550 */lib | */lib/)
12551 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12552 additional_includedir="$basedir/include"
12553 ;;
12554 esac
12555 if test "X$additional_includedir" != "X"; then
12556 if test "X$additional_includedir" != "X/usr/include"; then
12557 haveit=
12558 if test "X$additional_includedir" = "X/usr/local/include"; then
12559 if test -n "$GCC"; then
12560 case $host_os in
12561 linux*) haveit=yes;;
12562 esac
12563 fi
12564 fi
12565 if test -z "$haveit"; then
12566 for x in $CPPFLAGS $INCINTL; do
12567
12568 acl_save_prefix="$prefix"
12569 prefix="$acl_final_prefix"
12570 acl_save_exec_prefix="$exec_prefix"
12571 exec_prefix="$acl_final_exec_prefix"
12572 eval x=\"$x\"
12573 exec_prefix="$acl_save_exec_prefix"
12574 prefix="$acl_save_prefix"
12575
12576 if test "X$x" = "X-I$additional_includedir"; then
12577 haveit=yes
12578 break
12579 fi
12580 done
12581 if test -z "$haveit"; then
12582 if test -d "$additional_includedir"; then
12583 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
12584 fi
12585 fi
12586 fi
12587 fi
12588 fi
12589 if test -n "$found_la"; then
12590 save_libdir="$libdir"
12591 case "$found_la" in
12592 */* | *\\*) . "$found_la" ;;
12593 *) . "./$found_la" ;;
12594 esac
12595 libdir="$save_libdir"
12596 for dep in $dependency_libs; do
12597 case "$dep" in
12598 -L*)
12599 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12600 if test "X$additional_libdir" != "X/usr/lib"; then
12601 haveit=
12602 if test "X$additional_libdir" = "X/usr/local/lib"; then
12603 if test -n "$GCC"; then
12604 case $host_os in
12605 linux*) haveit=yes;;
12606 esac
12607 fi
12608 fi
12609 if test -z "$haveit"; then
12610 haveit=
12611 for x in $LDFLAGS $LIBINTL; do
12612
12613 acl_save_prefix="$prefix"
12614 prefix="$acl_final_prefix"
12615 acl_save_exec_prefix="$exec_prefix"
12616 exec_prefix="$acl_final_exec_prefix"
12617 eval x=\"$x\"
12618 exec_prefix="$acl_save_exec_prefix"
12619 prefix="$acl_save_prefix"
12620
12621 if test "X$x" = "X-L$additional_libdir"; then
12622 haveit=yes
12623 break
12624 fi
12625 done
12626 if test -z "$haveit"; then
12627 if test -d "$additional_libdir"; then
12628 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
12629 fi
12630 fi
12631 haveit=
12632 for x in $LDFLAGS $LTLIBINTL; do
12633
12634 acl_save_prefix="$prefix"
12635 prefix="$acl_final_prefix"
12636 acl_save_exec_prefix="$exec_prefix"
12637 exec_prefix="$acl_final_exec_prefix"
12638 eval x=\"$x\"
12639 exec_prefix="$acl_save_exec_prefix"
12640 prefix="$acl_save_prefix"
12641
12642 if test "X$x" = "X-L$additional_libdir"; then
12643 haveit=yes
12644 break
12645 fi
12646 done
12647 if test -z "$haveit"; then
12648 if test -d "$additional_libdir"; then
12649 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
12650 fi
12651 fi
12652 fi
12653 fi
12654 ;;
12655 -R*)
12656 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12657 if test "$enable_rpath" != no; then
12658 haveit=
12659 for x in $rpathdirs; do
12660 if test "X$x" = "X$dir"; then
12661 haveit=yes
12662 break
12663 fi
12664 done
12665 if test -z "$haveit"; then
12666 rpathdirs="$rpathdirs $dir"
12667 fi
12668 haveit=
12669 for x in $ltrpathdirs; do
12670 if test "X$x" = "X$dir"; then
12671 haveit=yes
12672 break
12673 fi
12674 done
12675 if test -z "$haveit"; then
12676 ltrpathdirs="$ltrpathdirs $dir"
12677 fi
12678 fi
12679 ;;
12680 -l*)
12681 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12682 ;;
12683 *.la)
12684 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12685 ;;
12686 *)
12687 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
12688 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
12689 ;;
12690 esac
12691 done
12692 fi
12693 else
12694 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
12695 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12696 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
12697 else
12698 LIBINTL="${LIBINTL}${LIBINTL:+ }-l:lib$name.$libext"
12699 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l:lib$name.$libext"
12700 fi
12701 fi
12702 fi
12703 fi
12704 done
12705 done
12706 if test "X$rpathdirs" != "X"; then
12707 if test -n "$hardcode_libdir_separator"; then
12708 alldirs=
12709 for found_dir in $rpathdirs; do
12710 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
12711 done
12712 acl_save_libdir="$libdir"
12713 libdir="$alldirs"
12714 eval flag=\"$hardcode_libdir_flag_spec\"
12715 libdir="$acl_save_libdir"
12716 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12717 else
12718 for found_dir in $rpathdirs; do
12719 acl_save_libdir="$libdir"
12720 libdir="$found_dir"
12721 eval flag=\"$hardcode_libdir_flag_spec\"
12722 libdir="$acl_save_libdir"
12723 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12724 done
12725 fi
12726 fi
12727 if test "X$ltrpathdirs" != "X"; then
12728 for found_dir in $ltrpathdirs; do
12729 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12730 done
12731 fi
12732
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12734$as_echo_n "checking for GNU gettext in libintl... " >&6; }
12735if eval \${$gt_func_gnugettext_libintl+:} false; then :
12736 $as_echo_n "(cached) " >&6
12737else
12738 gt_save_CPPFLAGS="$CPPFLAGS"
12739 CPPFLAGS="$CPPFLAGS $INCINTL"
12740 gt_save_LIBS="$LIBS"
12741 LIBS="$LIBS $LIBINTL"
12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743/* end confdefs.h. */
12744
12745#include <libintl.h>
12746#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12747extern int _nl_msg_cat_cntr;
12748extern
12749#ifdef __cplusplus
12750"C"
12751#endif
12752const char *_nl_expand_alias (const char *);
12753#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12754#else
12755#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12756#endif
12757$gt_revision_test_code
12758
12759int
12760main ()
12761{
12762
12763bindtextdomain ("", "");
12764return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12765
12766 ;
12767 return 0;
12768}
12769_ACEOF
12770if ac_fn_c_try_link "$LINENO"; then :
12771 eval "$gt_func_gnugettext_libintl=yes"
12772else
12773 eval "$gt_func_gnugettext_libintl=no"
12774fi
12775rm -f core conftest.err conftest.$ac_objext \
12776 conftest$ac_exeext conftest.$ac_ext
12777 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
12778 LIBS="$LIBS $LIBICONV"
12779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12780/* end confdefs.h. */
12781
12782#include <libintl.h>
12783#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12784extern int _nl_msg_cat_cntr;
12785extern
12786#ifdef __cplusplus
12787"C"
12788#endif
12789const char *_nl_expand_alias (const char *);
12790#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12791#else
12792#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12793#endif
12794$gt_revision_test_code
12795
12796int
12797main ()
12798{
12799
12800bindtextdomain ("", "");
12801return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12802
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807if ac_fn_c_try_link "$LINENO"; then :
12808 LIBINTL="$LIBINTL $LIBICONV"
12809 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12810 eval "$gt_func_gnugettext_libintl=yes"
12811
12812fi
12813rm -f core conftest.err conftest.$ac_objext \
12814 conftest$ac_exeext conftest.$ac_ext
12815 fi
12816 CPPFLAGS="$gt_save_CPPFLAGS"
12817 LIBS="$gt_save_LIBS"
12818fi
12819eval ac_res=\$$gt_func_gnugettext_libintl
12820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12821$as_echo "$ac_res" >&6; }
12822 fi
12823
12824 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12825 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
12826 && test "$PACKAGE" != gettext-runtime \
12827 && test "$PACKAGE" != gettext-tools; }; then
12828 gt_use_preinstalled_gnugettext=yes
12829 else
12830 LIBINTL=
12831 LTLIBINTL=
12832 INCINTL=
12833 fi
12834
12835
12836
12837 if test -n "$INTL_MACOSX_LIBS"; then
12838 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12839 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12840 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12841 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12842 fi
12843 fi
12844
12845 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12846 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12847
12848$as_echo "#define ENABLE_NLS 1" >>confdefs.h
12849
12850 else
12851 USE_NLS=no
12852 fi
12853 fi
12854
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12856$as_echo_n "checking whether to use NLS... " >&6; }
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12858$as_echo "$USE_NLS" >&6; }
12859 if test "$USE_NLS" = "yes"; then
12860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12861$as_echo_n "checking where the gettext function comes from... " >&6; }
12862 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12863 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12864 gt_source="external libintl"
12865 else
12866 gt_source="libc"
12867 fi
12868 else
12869 gt_source="included intl directory"
12870 fi
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12872$as_echo "$gt_source" >&6; }
12873 fi
12874
12875 if test "$USE_NLS" = "yes"; then
12876
12877 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12878 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12880$as_echo_n "checking how to link with libintl... " >&6; }
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12882$as_echo "$LIBINTL" >&6; }
12883
12884 for element in $INCINTL; do
12885 haveit=
12886 for x in $CPPFLAGS; do
12887
12888 acl_save_prefix="$prefix"
12889 prefix="$acl_final_prefix"
12890 acl_save_exec_prefix="$exec_prefix"
12891 exec_prefix="$acl_final_exec_prefix"
12892 eval x=\"$x\"
12893 exec_prefix="$acl_save_exec_prefix"
12894 prefix="$acl_save_prefix"
12895
12896 if test "X$x" = "X$element"; then
12897 haveit=yes
12898 break
12899 fi
12900 done
12901 if test -z "$haveit"; then
12902 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12903 fi
12904 done
12905
12906 fi
12907
12908
12909$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
12910
12911
12912$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
12913
12914 fi
12915
12916 POSUB=po
12917 fi
12918
12919
12920
12921 INTLLIBS="$LIBINTL"
12922
12923
12924
12925
12926
12927
12928fi
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
12941$as_echo_n "checking whether NLS is requested... " >&6; }
12942if test x"$USE_NLS" != xyes; then
12943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12944$as_echo "no" >&6; }
12945else
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12947$as_echo "yes" >&6; }
12948
12949$as_echo "#define ENABLE_NLS 1" >>confdefs.h
12950
12951
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
12953$as_echo_n "checking for catalogs to be installed... " >&6; }
12954 # Look for .po and .gmo files in the source directory.
12955 CATALOGS=
12956 XLINGUAS=
12957 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12958 # If there aren't any .gmo files the shell will give us the
12959 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12960 # weeded out.
12961 case "$cat" in *\**)
12962 continue;;
12963 esac
12964 # The quadruple backslash is collapsed to a double backslash
12965 # by the backticks, then collapsed again by the double quotes,
12966 # leaving us with one backslash in the sed expression (right
12967 # before the dot that mustn't act as a wildcard).
12968 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12969 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12970 # The user is allowed to set LINGUAS to a list of languages to
12971 # install catalogs for. If it's empty that means "all of them."
12972 if test "x$LINGUAS" = x; then
12973 CATALOGS="$CATALOGS $cat"
12974 XLINGUAS="$XLINGUAS $lang"
12975 else
12976 case "$LINGUAS" in *$lang*)
12977 CATALOGS="$CATALOGS $cat"
12978 XLINGUAS="$XLINGUAS $lang"
12979 ;;
12980 esac
12981 fi
12982 done
12983 LINGUAS="$XLINGUAS"
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
12985$as_echo "$LINGUAS" >&6; }
12986
12987
12988 DATADIRNAME=share
12989
12990 INSTOBJEXT=.mo
12991
12992 GENCAT=gencat
12993
12994 CATOBJEXT=.gmo
12995
12996fi
12997
12998# Create sub-directories for objects and dependencies.
12999CONFIG_SRC_SUBDIR="arch gdbsupport nat target"
13000
13001
13002ac_config_commands="$ac_config_commands gdbdepdir"
13003
13004
13005depcc="$CC" am_compiler_list=
13006
13007am_depcomp=$ac_aux_dir/depcomp
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
13009$as_echo_n "checking dependency style of $depcc... " >&6; }
13010if ${am_cv_CC_dependencies_compiler_type+:} false; then :
13011 $as_echo_n "(cached) " >&6
13012else
13013 if test -f "$am_depcomp"; then
13014 # We make a subdir and do the tests there. Otherwise we can end up
13015 # making bogus files that we don't know about and never remove. For
13016 # instance it was reported that on HP-UX the gcc test will end up
13017 # making a dummy file named `D' -- because `-MD' means `put the output
13018 # in D'.
13019 mkdir conftest.dir
13020 # Copy depcomp to subdir because otherwise we won't find it if we're
13021 # using a relative directory.
13022 cp "$am_depcomp" conftest.dir
13023 cd conftest.dir
13024 # We will build objects and dependencies in a subdirectory because
13025 # it helps to detect inapplicable dependency modes. For instance
13026 # both Tru64's cc and ICC support -MD to output dependencies as a
13027 # side effect of compilation, but ICC will put the dependencies in
13028 # the current directory while Tru64 will put them in the object
13029 # directory.
13030 mkdir sub
13031
13032 am_cv_CC_dependencies_compiler_type=none
13033 if test "$am_compiler_list" = ""; then
13034 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13035 fi
13036 for depmode in $am_compiler_list; do
13037 if test $depmode = none; then break; fi
13038
13039 $as_echo "$as_me:$LINENO: trying $depmode" >&5
13040 # Setup a source with many dependencies, because some compilers
13041 # like to wrap large dependency lists on column 80 (with \), and
13042 # we should not choose a depcomp mode which is confused by this.
13043 #
13044 # We need to recreate these files for each test, as the compiler may
13045 # overwrite some of them when testing with obscure command lines.
13046 # This happens at least with the AIX C compiler.
13047 : > sub/conftest.c
13048 for i in 1 2 3 4 5 6; do
13049 echo '#include "conftst'$i'.h"' >> sub/conftest.c
13050 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13051 # Solaris 8's {/usr,}/bin/sh.
13052 touch sub/conftst$i.h
13053 done
13054 echo "include sub/conftest.Po" > confmf
13055
13056 # We check with `-c' and `-o' for the sake of the "dashmstdout"
13057 # mode. It turns out that the SunPro C++ compiler does not properly
13058 # handle `-M -o', and we need to detect this.
13059 depcmd="depmode=$depmode \
13060 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13061 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13062 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
13063 echo "| $depcmd" | sed -e 's/ */ /g' >&5
13064 if env $depcmd > conftest.err 2>&1 &&
13065 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
13066 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
13067 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
13068 # icc doesn't choke on unknown options, it will just issue warnings
13069 # or remarks (even with -Werror). So we grep stderr for any message
13070 # that says an option was ignored or not supported.
13071 # When given -MP, icc 7.0 and 7.1 complain thusly:
13072 # icc: Command line warning: ignoring option '-M'; no argument required
13073 # The diagnosis changed in icc 8.0:
13074 # icc: Command line remark: option '-MP' not supported
13075 if (grep 'ignoring option' conftest.err ||
13076 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13077 am_cv_CC_dependencies_compiler_type=$depmode
13078 $as_echo "$as_me:$LINENO: success" >&5
13079 break
13080 fi
13081 fi
13082 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
13083 sed -e 's/^/| /' < conftest.err >&5
13084 done
13085
13086 cd ..
13087 rm -rf conftest.dir
13088else
13089 am_cv_CC_dependencies_compiler_type=none
13090fi
13091
13092fi
13093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13094$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13095if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
13096then as_fn_error $? "no usable dependency style found" "$LINENO" 5
13097else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13098
13099fi
13100
13101
13102for 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
13103do :
13104 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13105ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13106if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13107 cat >>confdefs.h <<_ACEOF
13108#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13109_ACEOF
13110
13111fi
13112
13113done
13114
13115for ac_header in vfork.h
13116do :
13117 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13118if test "x$ac_cv_header_vfork_h" = xyes; then :
13119 cat >>confdefs.h <<_ACEOF
13120#define HAVE_VFORK_H 1
13121_ACEOF
13122
13123fi
13124
13125done
13126
13127for ac_func in fork vfork
13128do :
13129 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13130ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13131if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13132 cat >>confdefs.h <<_ACEOF
13133#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13134_ACEOF
13135
13136fi
13137done
13138
13139if test "x$ac_cv_func_fork" = xyes; then
db6878ac
SM
13140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13141$as_echo_n "checking for working fork... " >&6; }
13142if ${ac_cv_func_fork_works+:} false; then :
05ea2a05 13143 $as_echo_n "(cached) " >&6
db6878ac
SM
13144else
13145 if test "$cross_compiling" = yes; then :
13146 ac_cv_func_fork_works=cross
05ea2a05
TT
13147else
13148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13149/* end confdefs.h. */
db6878ac 13150$ac_includes_default
05ea2a05
TT
13151int
13152main ()
13153{
db6878ac
SM
13154
13155 /* By Ruediger Kuhlmann. */
13156 return fork () < 0;
13157
05ea2a05
TT
13158 ;
13159 return 0;
13160}
13161_ACEOF
db6878ac
SM
13162if ac_fn_c_try_run "$LINENO"; then :
13163 ac_cv_func_fork_works=yes
05ea2a05 13164else
db6878ac 13165 ac_cv_func_fork_works=no
05ea2a05 13166fi
db6878ac
SM
13167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13168 conftest.$ac_objext conftest.beam conftest.$ac_ext
05ea2a05 13169fi
5e030278 13170
db6878ac
SM
13171fi
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13173$as_echo "$ac_cv_func_fork_works" >&6; }
5e030278 13174
db6878ac
SM
13175else
13176 ac_cv_func_fork_works=$ac_cv_func_fork
13177fi
13178if test "x$ac_cv_func_fork_works" = xcross; then
13179 case $host in
13180 *-*-amigaos* | *-*-msdosdjgpp*)
13181 # Override, as these systems have only a dummy fork() stub
13182 ac_cv_func_fork_works=no
13183 ;;
13184 *)
13185 ac_cv_func_fork_works=yes
13186 ;;
13187 esac
13188 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13189$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13190fi
13191ac_cv_func_vfork_works=$ac_cv_func_vfork
13192if test "x$ac_cv_func_vfork" = xyes; then
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13194$as_echo_n "checking for working vfork... " >&6; }
13195if ${ac_cv_func_vfork_works+:} false; then :
5e030278 13196 $as_echo_n "(cached) " >&6
db6878ac
SM
13197else
13198 if test "$cross_compiling" = yes; then :
13199 ac_cv_func_vfork_works=cross
5e030278
TT
13200else
13201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13202/* end confdefs.h. */
db6878ac
SM
13203/* Thanks to Paul Eggert for this test. */
13204$ac_includes_default
13205#include <sys/wait.h>
13206#ifdef HAVE_VFORK_H
13207# include <vfork.h>
13208#endif
13209/* On some sparc systems, changes by the child to local and incoming
13210 argument registers are propagated back to the parent. The compiler
13211 is told about this with #include <vfork.h>, but some compilers
13212 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13213 static variable whose address is put into a register that is
13214 clobbered by the vfork. */
13215static void
13216#ifdef __cplusplus
13217sparc_address_test (int arg)
13218# else
13219sparc_address_test (arg) int arg;
13220#endif
13221{
13222 static pid_t child;
13223 if (!child) {
13224 child = vfork ();
13225 if (child < 0) {
13226 perror ("vfork");
13227 _exit(2);
13228 }
13229 if (!child) {
13230 arg = getpid();
13231 write(-1, "", 0);
13232 _exit (arg);
13233 }
13234 }
13235}
05ea2a05 13236
5e030278
TT
13237int
13238main ()
13239{
db6878ac
SM
13240 pid_t parent = getpid ();
13241 pid_t child;
13242
13243 sparc_address_test (0);
13244
13245 child = vfork ();
13246
13247 if (child == 0) {
13248 /* Here is another test for sparc vfork register problems. This
13249 test uses lots of local variables, at least as many local
13250 variables as main has allocated so far including compiler
13251 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13252 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13253 reuse the register of parent for one of the local variables,
13254 since it will think that parent can't possibly be used any more
13255 in this routine. Assigning to the local variable will thus
13256 munge parent in the parent process. */
13257 pid_t
13258 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13259 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13260 /* Convince the compiler that p..p7 are live; otherwise, it might
13261 use the same hardware register for all 8 local variables. */
13262 if (p != p1 || p != p2 || p != p3 || p != p4
13263 || p != p5 || p != p6 || p != p7)
13264 _exit(1);
13265
13266 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13267 from child file descriptors. If the child closes a descriptor
13268 before it execs or exits, this munges the parent's descriptor
13269 as well. Test for this by closing stdout in the child. */
13270 _exit(close(fileno(stdout)) != 0);
13271 } else {
13272 int status;
13273 struct stat st;
13274
13275 while (wait(&status) != child)
13276 ;
13277 return (
13278 /* Was there some problem with vforking? */
13279 child < 0
13280
13281 /* Did the child fail? (This shouldn't happen.) */
13282 || status
13283
13284 /* Did the vfork/compiler bug occur? */
13285 || parent != getpid()
13286
13287 /* Did the file descriptor bug occur? */
13288 || fstat(fileno(stdout), &st) != 0
13289 );
13290 }
5e030278
TT
13291}
13292_ACEOF
db6878ac
SM
13293if ac_fn_c_try_run "$LINENO"; then :
13294 ac_cv_func_vfork_works=yes
5e030278 13295else
db6878ac 13296 ac_cv_func_vfork_works=no
5e030278 13297fi
db6878ac
SM
13298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13299 conftest.$ac_objext conftest.beam conftest.$ac_ext
5e030278 13300fi
5e030278 13301
db6878ac
SM
13302fi
13303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13304$as_echo "$ac_cv_func_vfork_works" >&6; }
5e030278 13305
db6878ac
SM
13306fi;
13307if test "x$ac_cv_func_fork_works" = xcross; then
13308 ac_cv_func_vfork_works=$ac_cv_func_vfork
13309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13310$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13311fi
5e030278 13312
db6878ac 13313if test "x$ac_cv_func_vfork_works" = xyes; then
5e030278 13314
db6878ac 13315$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
e9bcb658 13316
e9bcb658 13317else
db6878ac
SM
13318
13319$as_echo "#define vfork fork" >>confdefs.h
05ea2a05 13320
e9bcb658 13321fi
db6878ac 13322if test "x$ac_cv_func_fork_works" = xyes; then
e9bcb658 13323
db6878ac 13324$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
05ea2a05 13325
db6878ac 13326fi
05ea2a05 13327
db6878ac
SM
13328for ac_func in pread pwrite pread64
13329do :
13330 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13331ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13332if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13333 cat >>confdefs.h <<_ACEOF
13334#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13335_ACEOF
e9bcb658 13336
db6878ac
SM
13337fi
13338done
e9bcb658 13339
3266f10b 13340
eb7aa561
PA
13341# Check the return and argument types of ptrace.
13342
13343
13344for ac_header in sys/ptrace.h ptrace.h
13345do :
13346 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13347ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13348if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb7aa561
PA
13349 cat >>confdefs.h <<_ACEOF
13350#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13351_ACEOF
13352
13353fi
13354
13355done
13356
13357
13358gdb_ptrace_headers='
13359#include <sys/types.h>
13360#if HAVE_SYS_PTRACE_H
13361# include <sys/ptrace.h>
13362#endif
13363#if HAVE_UNISTD_H
13364# include <unistd.h>
13365#endif
13366'
eb7aa561
PA
13367
13368# Check return type. Varargs (used on GNU/Linux) conflict with the
13369# empty argument list, so check for that explicitly.
13370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13371$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13372if ${gdb_cv_func_ptrace_ret+:} false; then :
eb7aa561
PA
13373 $as_echo_n "(cached) " >&6
13374else
13375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13376/* end confdefs.h. */
5164c117 13377 $gdb_ptrace_headers
eb7aa561
PA
13378int
13379main ()
13380{
13381extern long ptrace (enum __ptrace_request, ...);
5164c117 13382
eb7aa561
PA
13383 ;
13384 return 0;
13385}
13386_ACEOF
9b30624b 13387if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
13388 gdb_cv_func_ptrace_ret='long'
13389else
13390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13391/* end confdefs.h. */
13392$gdb_ptrace_headers
13393int
13394main ()
13395{
13396extern int ptrace ();
5164c117 13397
eb7aa561
PA
13398 ;
13399 return 0;
13400}
13401_ACEOF
9b30624b 13402if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561
PA
13403 gdb_cv_func_ptrace_ret='int'
13404else
13405 gdb_cv_func_ptrace_ret='long'
b6fb30ed 13406
eb7aa561
PA
13407fi
13408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 13409
eb7aa561
PA
13410fi
13411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 13412
eb7aa561
PA
13413fi
13414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13415$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13416
b6fb30ed 13417
eb7aa561
PA
13418cat >>confdefs.h <<_ACEOF
13419#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13420_ACEOF
13421
b6fb30ed 13422
eb7aa561
PA
13423# Check argument types.
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13425$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13426if ${gdb_cv_func_ptrace_args+:} false; then :
eb7aa561
PA
13427 $as_echo_n "(cached) " >&6
13428else
eb7aa561
PA
13429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13430/* end confdefs.h. */
13431$gdb_ptrace_headers
13432int
13433main ()
13434{
13435extern long ptrace (enum __ptrace_request, ...);
5164c117 13436
eb7aa561
PA
13437 ;
13438 return 0;
13439}
13440_ACEOF
9b30624b 13441if ac_fn_c_try_compile "$LINENO"; then :
54019719 13442 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
eb7aa561 13443else
b6fb30ed
SM
13444 for gdb_arg1 in 'int' 'long'; do
13445 for gdb_arg2 in 'pid_t' 'int' 'long'; do
13446 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13447 for gdb_arg4 in 'int' 'long' 'void *'; do
13448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
eb7aa561
PA
13449/* end confdefs.h. */
13450$gdb_ptrace_headers
13451int
13452main ()
13453{
b6fb30ed 13454extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5164c117 13455
eb7aa561
PA
13456 ;
13457 return 0;
13458}
13459_ACEOF
9b30624b 13460if ac_fn_c_try_compile "$LINENO"; then :
eb7aa561 13461 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
b6fb30ed
SM
13462 break 4;
13463
eb7aa561
PA
13464fi
13465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
13466
13467 for gdb_arg5 in 'int *' 'int' 'long'; do
13468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
eb7aa561
PA
13469/* end confdefs.h. */
13470$gdb_ptrace_headers
13471int
13472main ()
13473{
b6fb30ed 13474extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5164c117 13475
eb7aa561
PA
13476 ;
13477 return 0;
13478}
13479_ACEOF
9b30624b 13480if ac_fn_c_try_compile "$LINENO"; then :
b6fb30ed
SM
13481 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13482 break 5;
eb7aa561 13483
eb7aa561
PA
13484fi
13485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
13486 done
13487 done
13488 done
13489 done
13490 done
13491 # Provide a safe default value.
13492 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
eb7aa561
PA
13493
13494fi
13495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 13496
eb7aa561
PA
13497fi
13498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13499$as_echo "$gdb_cv_func_ptrace_args" >&6; }
b6fb30ed 13500
eb7aa561
PA
13501ac_save_IFS=$IFS; IFS=','
13502set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13503IFS=$ac_save_IFS
13504shift
13505
54019719
PA
13506cat >>confdefs.h <<_ACEOF
13507#define PTRACE_TYPE_ARG1 $1
13508_ACEOF
13509
13510
eb7aa561
PA
13511cat >>confdefs.h <<_ACEOF
13512#define PTRACE_TYPE_ARG3 $3
13513_ACEOF
13514
13515
13516cat >>confdefs.h <<_ACEOF
13517#define PTRACE_TYPE_ARG4 $4
13518_ACEOF
13519
13520if test -n "$5"; then
13521
13522cat >>confdefs.h <<_ACEOF
13523#define PTRACE_TYPE_ARG5 $5
13524_ACEOF
13525
13526fi
13527
13528
0fb4aa4b
PA
13529# Check for UST
13530ustlibs=""
13531ustinc=""
13532
13533
13534# Check whether --with-ust was given.
13535if test "${with_ust+set}" = set; then :
13536 withval=$with_ust;
13537fi
13538
13539
13540# Check whether --with-ust_include was given.
13541if test "${with_ust_include+set}" = set; then :
13542 withval=$with_ust_include;
13543fi
13544
13545
13546# Check whether --with-ust_lib was given.
13547if test "${with_ust_lib+set}" = set; then :
13548 withval=$with_ust_lib;
13549fi
13550
13551
13552case $with_ust in
13553 no)
13554 ustlibs=
13555 ustinc=
13556 ;;
13557 "" | yes)
13558 ustlibs=" -lust "
13559 ustinc=""
13560 ;;
13561 *)
13562 ustlibs="-L$with_ust/lib -lust"
13563 ustinc="-I$with_ust/include "
13564 ;;
13565esac
13566if test "x$with_ust_include" != x; then
13567 ustinc="-I$with_ust_include "
13568fi
13569if test "x$with_ust_lib" != x; then
13570 ustlibs="-L$with_ust_lib -lust"
13571fi
13572
13573if test "x$with_ust" != "xno"; then
13574 saved_CFLAGS="$CFLAGS"
13575 CFLAGS="$CFLAGS $ustinc"
13576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ust" >&5
13577$as_echo_n "checking for ust... " >&6; }
13578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13579/* end confdefs.h. */
13580
13581#define CONFIG_UST_GDB_INTEGRATION
13582#include <ust/ust.h>
13583
13584int
13585main ()
13586{
13587
7e8c7130 13588
0fb4aa4b
PA
13589 ;
13590 return 0;
13591}
13592_ACEOF
13593if ac_fn_c_try_compile "$LINENO"; then :
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13595$as_echo "yes" >&6; };
7e8c7130 13596
0fb4aa4b
PA
13597$as_echo "#define HAVE_UST 1" >>confdefs.h
13598
13599else
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7e8c7130
SM
13601$as_echo "no" >&6; }
13602 ustlibs= ; ustinc=
13603
0fb4aa4b
PA
13604fi
13605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13606 CFLAGS="$saved_CFLAGS"
13607fi
13608
13609# Flags needed for UST
13610
13611
13612
8f13a3ce 13613
4b74833d
AB
13614
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
13616$as_echo_n "checking the compiler type... " >&6; }
13617if ${gdb_cv_compiler_type+:} false; then :
13618 $as_echo_n "(cached) " >&6
13619else
13620 gdb_cv_compiler_type=unknown
13621 if test "$gdb_cv_compiler_type" = unknown; then
13622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13623/* end confdefs.h. */
13624
13625int
13626main ()
13627{
13628
13629 #if !defined __GNUC__ || defined __clang__
13630 #error not gcc
13631 #endif
13632
13633 ;
13634 return 0;
13635}
13636_ACEOF
13637if ac_fn_c_try_compile "$LINENO"; then :
13638 gdb_cv_compiler_type=gcc
13639fi
13640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641 fi
13642
13643 if test "$gdb_cv_compiler_type" = unknown; then
13644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645/* end confdefs.h. */
13646
13647int
13648main ()
13649{
13650
13651 #ifndef __clang__
13652 #error not clang
13653 #endif
13654
13655 ;
13656 return 0;
13657}
13658_ACEOF
13659if ac_fn_c_try_compile "$LINENO"; then :
13660 gdb_cv_compiler_type=clang
13661fi
13662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663 fi
13664
13665fi
13666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
13667$as_echo "$gdb_cv_compiler_type" >&6; }
13668
13669 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
13670
13671
d4596a3d
PA
13672# Check whether --enable-werror was given.
13673if test "${enable_werror+set}" = set; then :
13674 enableval=$enable_werror; case "${enableval}" in
13675 yes | y) ERROR_ON_WARNING="yes" ;;
13676 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 13677 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
d4596a3d
PA
13678 esac
13679fi
13680
13681
9a084706 13682# Enable -Werror by default when using gcc. Turn it off for releases.
8f13a3ce 13683if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
d4596a3d
PA
13684 ERROR_ON_WARNING=yes
13685fi
13686
13687WERROR_CFLAGS=""
13688if test "${ERROR_ON_WARNING}" = yes ; then
13689 WERROR_CFLAGS="-Werror"
13690fi
13691
cf6de44d 13692# The options we'll try to enable.
aac331e4 13693build_warnings="-Wall -Wpointer-arith \
a0de763e 13694-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
8f13a3ce 13695-Wno-switch -Wno-char-subscripts \
cf6de44d 13696-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 13697-Wno-sign-compare -Wno-error=maybe-uninitialized \
458412c3 13698-Wno-mismatched-tags \
632e107b 13699-Wno-error=deprecated-register \
85e26832 13700-Wsuggest-override \
d57f38ec 13701-Wimplicit-fallthrough=5 \
96643e35 13702-Wduplicated-cond \
33a6bc35
TT
13703-Wshadow=local \
13704-Wdeprecated-copy \
13705-Wdeprecated-copy-dtor \
bb564c58 13706-Wredundant-move \
8ddd8e0e 13707-Wmissing-declarations \
898e7f60 13708-Wstrict-null-sentinel \
cbb97c5b 13709-Wno-vla-cxx-extension \
898e7f60 13710"
8f13a3ce 13711
4b74833d
AB
13712# The -Wmissing-prototypes flag will be accepted by GCC, but results
13713# in a warning being printed about the flag not being valid for C++,
13714# this is something to do with using ccache, and argument ordering.
13715if test "$GDB_COMPILER_TYPE" != gcc; then
13716 build_warnings="$build_warnings -Wmissing-prototypes"
13717fi
13718
8f13a3ce 13719case "${host}" in
5bfda255
YQ
13720 *-*-mingw32*)
13721 # Enable -Wno-format by default when using gcc on mingw since many
13722 # GCC versions complain about %I64.
13723 build_warnings="$build_warnings -Wno-format" ;;
13724 *-*-solaris*)
13725 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
13726 # doesn't understand.
13727 build_warnings="$build_warnings -Wno-unknown-pragmas"
13728 # Solaris 11 <unistd.h> marks vfork deprecated.
13729 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
13730 *)
13731 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
13732 # but there's a special case for this below.
13733 build_warnings="$build_warnings -Wformat-nonliteral" ;;
8f13a3ce
MF
13734esac
13735
13736# Check whether --enable-build-warnings was given.
13737if test "${enable_build_warnings+set}" = set; then :
13738 enableval=$enable_build_warnings; case "${enableval}" in
13739 yes) ;;
13740 no) build_warnings="-w";;
13741 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13742 build_warnings="${build_warnings} ${t}";;
13743 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13744 build_warnings="${t} ${build_warnings}";;
13745 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13746esac
13747if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13748 echo "Setting compiler warning flags = $build_warnings" 6>&1
13749fi
13750fi
13751# Check whether --enable-gdb-build-warnings was given.
13752if test "${enable_gdb_build_warnings+set}" = set; then :
13753 enableval=$enable_gdb_build_warnings; case "${enableval}" in
13754 yes) ;;
13755 no) build_warnings="-w";;
13756 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13757 build_warnings="${build_warnings} ${t}";;
13758 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13759 build_warnings="${t} ${build_warnings}";;
13760 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13761esac
13762if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13763 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13764fi
3bc3d82a
PA
13765fi
13766
13767# The set of warnings supported by a C++ compiler is not the same as
13768# of the C compiler.
cf6de44d 13769ac_ext=cpp
3bc3d82a
PA
13770ac_cpp='$CXXCPP $CPPFLAGS'
13771ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13772ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13773ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13774
3bc3d82a 13775
d4596a3d 13776WARN_CFLAGS=""
8f13a3ce 13777if test "x${build_warnings}" != x -a "x$GCC" = xyes
d4596a3d
PA
13778then
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13780$as_echo_n "checking compiler warning flags... " >&6; }
13781 # Separate out the -Werror flag as some files just cannot be
13782 # compiled with it enabled.
13783 for w in ${build_warnings}; do
7544db95
PA
13784 # GCC does not complain about -Wno-unknown-warning. Invert
13785 # and test -Wunknown-warning instead.
13786 case $w in
13787 -Wno-*)
13788 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
13789 -Wformat-nonliteral)
13790 # gcc requires -Wformat before -Wformat-nonliteral
13791 # will work, so stick them together.
13792 w="-Wformat $w"
13793 wtest="$w"
13794 ;;
7544db95
PA
13795 *)
13796 wtest=$w ;;
13797 esac
13798
d4596a3d
PA
13799 case $w in
13800 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
13801 *)
13802 # Check whether GCC accepts it.
d4596a3d 13803 saved_CFLAGS="$CFLAGS"
3e019bdc 13804 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 13805 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 13806 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
13807 if test "x$w" = "x-Wunused-variable"; then
13808 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
13809 # fixed in GCC 4.9. This test is derived from the gdb
13810 # source code that triggered this bug in GCC.
13811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13812/* end confdefs.h. */
13813struct scoped_restore_base {};
864ca435
SM
13814 struct scoped_restore_tmpl : public scoped_restore_base {
13815 ~scoped_restore_tmpl() {}
13816 };
a0de763e
TT
13817int
13818main ()
13819{
13820const scoped_restore_base &b = scoped_restore_tmpl();
864ca435 13821
a0de763e
TT
13822 ;
13823 return 0;
13824}
13825_ACEOF
13826if ac_fn_cxx_try_compile "$LINENO"; then :
13827 WARN_CFLAGS="${WARN_CFLAGS} $w"
13828fi
13829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13830 else
13831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d4596a3d
PA
13832/* end confdefs.h. */
13833
13834int
13835main ()
13836{
13837
13838 ;
13839 return 0;
13840}
13841_ACEOF
3bc3d82a 13842if ac_fn_cxx_try_compile "$LINENO"; then :
d4596a3d
PA
13843 WARN_CFLAGS="${WARN_CFLAGS} $w"
13844fi
13845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 13846 fi
d4596a3d 13847 CFLAGS="$saved_CFLAGS"
3bc3d82a 13848 CXXFLAGS="$saved_CXXFLAGS"
d4596a3d
PA
13849 esac
13850 done
13851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13852$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
13853fi
13854
13855
13856
cf6de44d 13857ac_ext=c
3bc3d82a
PA
13858ac_cpp='$CPP $CPPFLAGS'
13859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13861ac_compiler_gnu=$ac_cv_c_compiler_gnu
13862
3bc3d82a 13863
8f13a3ce 13864
10e86dd7
DE
13865old_LIBS="$LIBS"
13866LIBS="$LIBS -ldl"
13867for ac_func in dladdr
13868do :
13869 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
d0ac1c44 13870if test "x$ac_cv_func_dladdr" = xyes; then :
10e86dd7
DE
13871 cat >>confdefs.h <<_ACEOF
13872#define HAVE_DLADDR 1
13873_ACEOF
13874
13875fi
13876done
13877
13878LIBS="$old_LIBS"
13879
07697489 13880ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 13881if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
13882 ac_have_decl=1
13883else
13884 ac_have_decl=0
13885fi
13886
13887cat >>confdefs.h <<_ACEOF
13888#define HAVE_DECL_FFS $ac_have_decl
13889_ACEOF
908ff469 13890
07697489 13891ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 13892if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
13893 ac_have_decl=1
13894else
13895 ac_have_decl=0
13896fi
13897
13898cat >>confdefs.h <<_ACEOF
13899#define HAVE_DECL_ASPRINTF $ac_have_decl
13900_ACEOF
908ff469 13901
07697489 13902ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 13903if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
13904 ac_have_decl=1
13905else
13906 ac_have_decl=0
13907fi
13908
13909cat >>confdefs.h <<_ACEOF
13910#define HAVE_DECL_VASPRINTF $ac_have_decl
13911_ACEOF
908ff469 13912
07697489 13913ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 13914if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
13915 ac_have_decl=1
13916else
13917 ac_have_decl=0
13918fi
13919
13920cat >>confdefs.h <<_ACEOF
13921#define HAVE_DECL_SNPRINTF $ac_have_decl
13922_ACEOF
908ff469 13923
07697489 13924ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 13925if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
13926 ac_have_decl=1
13927else
13928 ac_have_decl=0
13929fi
13930
13931cat >>confdefs.h <<_ACEOF
13932#define HAVE_DECL_VSNPRINTF $ac_have_decl
13933_ACEOF
13934
908ff469 13935ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 13936if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
13937 ac_have_decl=1
13938else
13939 ac_have_decl=0
13940fi
13941
13942cat >>confdefs.h <<_ACEOF
13943#define HAVE_DECL_STRTOL $ac_have_decl
13944_ACEOF
908ff469 13945
07697489 13946ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 13947if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
13948 ac_have_decl=1
13949else
13950 ac_have_decl=0
13951fi
13952
13953cat >>confdefs.h <<_ACEOF
13954#define HAVE_DECL_STRTOUL $ac_have_decl
13955_ACEOF
908ff469 13956
07697489 13957ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 13958if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
13959 ac_have_decl=1
13960else
13961 ac_have_decl=0
13962fi
13963
13964cat >>confdefs.h <<_ACEOF
13965#define HAVE_DECL_STRTOLL $ac_have_decl
13966_ACEOF
908ff469 13967
07697489 13968ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 13969if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
13970 ac_have_decl=1
13971else
13972 ac_have_decl=0
13973fi
13974
13975cat >>confdefs.h <<_ACEOF
13976#define HAVE_DECL_STRTOULL $ac_have_decl
13977_ACEOF
13978
908ff469 13979ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 13980if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
13981 ac_have_decl=1
13982else
13983 ac_have_decl=0
13984fi
13985
13986cat >>confdefs.h <<_ACEOF
13987#define HAVE_DECL_STRVERSCMP $ac_have_decl
13988_ACEOF
13989
761ed61e 13990 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
908ff469
MF
13991if test "x$ac_cv_type_long_long" = xyes; then :
13992
13993cat >>confdefs.h <<_ACEOF
13994#define HAVE_LONG_LONG 1
13995_ACEOF
13996
13997# The cast to long int works around a bug in the HP C Compiler
13998# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13999# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14000# This bug is HP SR number 8606223364.
14001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
14002$as_echo_n "checking size of long long... " >&6; }
14003if ${ac_cv_sizeof_long_long+:} false; then :
14004 $as_echo_n "(cached) " >&6
14005else
14006 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
14007
14008else
14009 if test "$ac_cv_type_long_long" = yes; then
14010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14012as_fn_error 77 "cannot compute sizeof (long long)
14013See \`config.log' for more details" "$LINENO" 5; }
14014 else
14015 ac_cv_sizeof_long_long=0
14016 fi
14017fi
14018
14019fi
14020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
14021$as_echo "$ac_cv_sizeof_long_long" >&6; }
14022
14023
14024
14025cat >>confdefs.h <<_ACEOF
14026#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
14027_ACEOF
14028
14029
14030fi
14031
14032
14033 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
14034ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
14035if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
14036 ac_have_decl=1
14037else
14038 ac_have_decl=0
14039fi
14040
14041cat >>confdefs.h <<_ACEOF
14042#define HAVE_DECL_BASENAME $ac_have_decl
14043_ACEOF
14044
14045
14046
14047
14048
07697489 14049
81ecdfbb 14050ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
d0ac1c44 14051if test "x$ac_cv_have_decl_perror" = xyes; then :
81ecdfbb
RW
14052 ac_have_decl=1
14053else
14054 ac_have_decl=0
f450004a 14055fi
81ecdfbb
RW
14056
14057cat >>confdefs.h <<_ACEOF
14058#define HAVE_DECL_PERROR $ac_have_decl
14059_ACEOF
bb0116a4 14060ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 14061if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
bb0116a4
JB
14062 ac_have_decl=1
14063else
14064 ac_have_decl=0
14065fi
14066
14067cat >>confdefs.h <<_ACEOF
14068#define HAVE_DECL_VASPRINTF $ac_have_decl
14069_ACEOF
14070ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 14071if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
bb0116a4
JB
14072 ac_have_decl=1
14073else
14074 ac_have_decl=0
14075fi
14076
14077cat >>confdefs.h <<_ACEOF
14078#define HAVE_DECL_VSNPRINTF $ac_have_decl
14079_ACEOF
81ecdfbb
RW
14080
14081
14082ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
14083#if HAVE_SYS_SOCKET_H
14084# include <sys/socket.h>
14085#elif HAVE_WS2TCPIP_H
14086# include <ws2tcpip.h>
14087#endif
81ecdfbb
RW
14088
14089"
d0ac1c44 14090if test "x$ac_cv_type_socklen_t" = xyes; then :
f450004a 14091
ccbd4912 14092cat >>confdefs.h <<_ACEOF
f450004a
DJ
14093#define HAVE_SOCKLEN_T 1
14094_ACEOF
14095
f450004a 14096
ccbd4912 14097fi
f450004a 14098
fb1e4ffc 14099
64da5dd5
JB
14100case "${target}" in
14101 *-android*)
14102 # Starting with NDK version 9, <elf.h> actually includes definitions
14103 # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes
14104 # <sys/exec_elf.h> which defines some of the ELF types incorrectly,
14105 # leading to conflicts with the defintions from <linux/elf.h>.
14106 # This makes it impossible for us to include both <elf.h> and
14107 # <linux/elf.h>, which means that, in practice, we do not have
14108 # access to Elf32_auxv_t and Elf64_auxv_t on this platform.
14109 # Therefore, do not try to auto-detect availability, as it would
14110 # get it wrong on this platform.
14111 ;;
14112 *)
14113 ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
8365dcf5
TJB
14114
14115"
d0ac1c44 14116if test "x$ac_cv_type_Elf32_auxv_t" = xyes; then :
8365dcf5
TJB
14117
14118cat >>confdefs.h <<_ACEOF
14119#define HAVE_ELF32_AUXV_T 1
14120_ACEOF
14121
14122
14123fi
14124ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
14125
14126"
d0ac1c44 14127if test "x$ac_cv_type_Elf64_auxv_t" = xyes; then :
8365dcf5
TJB
14128
14129cat >>confdefs.h <<_ACEOF
14130#define HAVE_ELF64_AUXV_T 1
14131_ACEOF
14132
14133
14134fi
14135
64da5dd5 14136esac
8365dcf5 14137
c16158bc
JM
14138
14139
81ecdfbb
RW
14140# Check whether --with-pkgversion was given.
14141if test "${with_pkgversion+set}" = set; then :
14142 withval=$with_pkgversion; case "$withval" in
d0ac1c44 14143 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
14144 no) PKGVERSION= ;;
14145 *) PKGVERSION="($withval) " ;;
14146 esac
14147else
14148 PKGVERSION="(GDB) "
14149
81ecdfbb
RW
14150fi
14151
c16158bc
JM
14152
14153
14154
14155
81ecdfbb
RW
14156# Check whether --with-bugurl was given.
14157if test "${with_bugurl+set}" = set; then :
14158 withval=$with_bugurl; case "$withval" in
d0ac1c44 14159 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
14160 no) BUGURL=
14161 ;;
14162 *) BUGURL="$withval"
14163 ;;
14164 esac
14165else
14166 BUGURL="http://www.gnu.org/software/gdb/bugs/"
14167
81ecdfbb
RW
14168fi
14169
c16158bc
JM
14170 case ${BUGURL} in
14171 "")
14172 REPORT_BUGS_TO=
14173 REPORT_BUGS_TEXI=
14174 ;;
14175 *)
14176 REPORT_BUGS_TO="<$BUGURL>"
14177 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
14178 ;;
14179 esac;
14180
14181
14182
14183
14184cat >>confdefs.h <<_ACEOF
14185#define PKGVERSION "$PKGVERSION"
14186_ACEOF
14187
14188
14189cat >>confdefs.h <<_ACEOF
14190#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
14191_ACEOF
14192
14193
8838b45e
NS
14194# Check for various supplementary target information (beyond the
14195# triplet) which might affect the choices in configure.srv.
14196case "${target}" in
14197 i[34567]86-*-linux*)
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
14199$as_echo_n "checking if building for x86-64... " >&6; }
d0ac1c44 14200if ${gdb_cv_i386_is_x86_64+:} false; then :
8838b45e
NS
14201 $as_echo_n "(cached) " >&6
14202else
14203 save_CPPFLAGS="$CPPFLAGS"
14204 CPPFLAGS="$CPPFLAGS $CFLAGS"
14205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206/* end confdefs.h. */
14207
14208#if __x86_64__
14209got it
14210#endif
14211
14212_ACEOF
14213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14214 $EGREP "got it" >/dev/null 2>&1; then :
14215 gdb_cv_i386_is_x86_64=yes
14216else
14217 gdb_cv_i386_is_x86_64=no
14218fi
14219rm -f conftest*
14220
14221 CPPFLAGS="$save_CPPFLAGS"
14222fi
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
14224$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
14225 ;;
201506da
PA
14226
14227 x86_64-*-linux*)
14228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x32" >&5
14229$as_echo_n "checking if building for x32... " >&6; }
d0ac1c44 14230if ${gdb_cv_x86_is_x32+:} false; then :
201506da
PA
14231 $as_echo_n "(cached) " >&6
14232else
14233 save_CPPFLAGS="$CPPFLAGS"
14234 CPPFLAGS="$CPPFLAGS $CFLAGS"
14235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236/* end confdefs.h. */
14237
14238#if __x86_64__ && __ILP32__
14239got it
14240#endif
14241
14242_ACEOF
14243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14244 $EGREP "got it" >/dev/null 2>&1; then :
14245 gdb_cv_x86_is_x32=yes
14246else
14247 gdb_cv_x86_is_x32=no
14248fi
14249rm -f conftest*
14250
14251 CPPFLAGS="$save_CPPFLAGS"
14252fi
14253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_x86_is_x32" >&5
14254$as_echo "$gdb_cv_x86_is_x32" >&6; }
14255 ;;
14256
9ac544ce
MK
14257 m68k-*-*)
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for Coldfire" >&5
14259$as_echo_n "checking if building for Coldfire... " >&6; }
d0ac1c44 14260if ${gdb_cv_m68k_is_coldfire+:} false; then :
9ac544ce
MK
14261 $as_echo_n "(cached) " >&6
14262else
14263 save_CPPFLAGS="$CPPFLAGS"
14264 CPPFLAGS="$CPPFLAGS $CFLAGS"
14265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14266/* end confdefs.h. */
14267
14268#ifdef __mcoldfire__
14269got it
14270#endif
14271
14272_ACEOF
14273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14274 $EGREP "got it" >/dev/null 2>&1; then :
14275 gdb_cv_m68k_is_coldfire=yes
14276else
14277 gdb_cv_m68k_is_coldfire=no
14278fi
14279rm -f conftest*
14280
14281 CPPFLAGS="$save_CPPFLAGS"
14282fi
14283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_m68k_is_coldfire" >&5
14284$as_echo "$gdb_cv_m68k_is_coldfire" >&6; }
14285 ;;
8838b45e
NS
14286esac
14287
7ea81414 14288. ${srcdir}/configure.srv
d6e9fb05 14289
68070c10
PA
14290if test "${srv_mingwce}" = "yes"; then
14291 LIBS="$LIBS -lws2"
14292elif test "${srv_mingw}" = "yes"; then
b2ceabe8
TT
14293 # WIN32APILIBS is set by GDB_AC_COMMON.
14294 LIBS="$LIBS $WIN32APILIBS"
68070c10
PA
14295fi
14296
58caa3dc 14297if test "${srv_linux_usrregs}" = "yes"; then
f450004a 14298
81ecdfbb 14299$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
58caa3dc
DJ
14300
14301fi
14302
14303if test "${srv_linux_regsets}" = "yes"; then
e9d25b98 14304
81ecdfbb 14305$as_echo "#define HAVE_LINUX_REGSETS 1" >>confdefs.h
e9d25b98
DJ
14306
14307
81ecdfbb
RW
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14309$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14310 if ${gdbsrv_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14311 $as_echo_n "(cached) " >&6
bec39cab 14312else
81ecdfbb 14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14314/* end confdefs.h. */
58caa3dc 14315#include <sys/ptrace.h>
bec39cab
AC
14316int
14317main ()
14318{
58caa3dc 14319PTRACE_GETREGS;
bec39cab
AC
14320 ;
14321 return 0;
14322}
14323_ACEOF
81ecdfbb 14324if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
14325 gdbsrv_cv_have_ptrace_getregs=yes
14326else
81ecdfbb 14327 gdbsrv_cv_have_ptrace_getregs=no
7e8c7130 14328
58caa3dc 14329fi
81ecdfbb 14330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7e8c7130 14331
58caa3dc
DJ
14332fi
14333
81ecdfbb
RW
14334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
14335$as_echo "$gdbsrv_cv_have_ptrace_getregs" >&6; }
58caa3dc 14336 if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
f450004a 14337
81ecdfbb 14338$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
58caa3dc
DJ
14339
14340 fi
14341
81ecdfbb
RW
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14343$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14344 if ${gdbsrv_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14345 $as_echo_n "(cached) " >&6
58caa3dc 14346else
81ecdfbb 14347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14348/* end confdefs.h. */
58caa3dc 14349#include <sys/ptrace.h>
bec39cab
AC
14350int
14351main ()
14352{
58caa3dc 14353PTRACE_GETFPXREGS;
bec39cab
AC
14354 ;
14355 return 0;
14356}
14357_ACEOF
81ecdfbb 14358if ac_fn_c_try_compile "$LINENO"; then :
58caa3dc
DJ
14359 gdbsrv_cv_have_ptrace_getfpxregs=yes
14360else
81ecdfbb 14361 gdbsrv_cv_have_ptrace_getfpxregs=no
7e8c7130 14362
58caa3dc 14363fi
81ecdfbb 14364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7e8c7130 14365
58caa3dc
DJ
14366fi
14367
81ecdfbb
RW
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
14369$as_echo "$gdbsrv_cv_have_ptrace_getfpxregs" >&6; }
58caa3dc 14370 if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
f450004a 14371
81ecdfbb 14372$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
58caa3dc
DJ
14373
14374 fi
14375fi
14376
9accd112
MM
14377if test "${srv_linux_btrace}" = "yes"; then
14378
14379$as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
14380
14381fi
14382
18f5fd81
TJB
14383if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
14384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
14385$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
19dd0ae5 14386 if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
18f5fd81
TJB
14387 $as_echo_n "(cached) " >&6
14388else
14389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14390/* end confdefs.h. */
18f5fd81
TJB
14391#include <thread_db.h>
14392int
14393main ()
14394{
14395lwpid_t avar
14396 ;
14397 return 0;
14398}
14399_ACEOF
14400if ac_fn_c_try_compile "$LINENO"; then :
14401 gdbserver_cv_have_thread_db_type_lwpid_t=yes
14402else
14403 gdbserver_cv_have_thread_db_type_lwpid_t=no
14404
14405fi
14406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19dd0ae5 14407
18f5fd81
TJB
14408fi
14409
19dd0ae5 14410 if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
18f5fd81
TJB
14411
14412$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14413
19dd0ae5
SM
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
18f5fd81
TJB
14416$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
14417
14418fi
14419
14420if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
14422$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
19dd0ae5 14423 if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
18f5fd81
TJB
14424 $as_echo_n "(cached) " >&6
14425else
14426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427/* end confdefs.h. */
18f5fd81
TJB
14428#include <thread_db.h>
14429int
14430main ()
14431{
14432psaddr_t avar
14433 ;
14434 return 0;
14435}
14436_ACEOF
14437if ac_fn_c_try_compile "$LINENO"; then :
14438 gdbserver_cv_have_thread_db_type_psaddr_t=yes
14439else
14440 gdbserver_cv_have_thread_db_type_psaddr_t=no
14441
14442fi
14443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19dd0ae5 14444
18f5fd81
TJB
14445fi
14446
19dd0ae5 14447 if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
18f5fd81
TJB
14448
14449$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14450
19dd0ae5
SM
14451 fi
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
18f5fd81
TJB
14453$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
14454
14455fi
14456
193f13e6
MK
14457old_LIBS="$LIBS"
14458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14459$as_echo_n "checking for dlopen in -ldl... " >&6; }
d0ac1c44 14460if ${ac_cv_lib_dl_dlopen+:} false; then :
193f13e6
MK
14461 $as_echo_n "(cached) " >&6
14462else
14463 ac_check_lib_save_LIBS=$LIBS
14464LIBS="-ldl $LIBS"
14465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14466/* end confdefs.h. */
14467
14468/* Override any GCC internal prototype to avoid an error.
14469 Use char because int might match the return type of a GCC
14470 builtin and then its argument prototype would still apply. */
14471#ifdef __cplusplus
14472extern "C"
14473#endif
14474char dlopen ();
14475int
14476main ()
14477{
14478return dlopen ();
14479 ;
14480 return 0;
14481}
14482_ACEOF
14483if ac_fn_c_try_link "$LINENO"; then :
14484 ac_cv_lib_dl_dlopen=yes
14485else
14486 ac_cv_lib_dl_dlopen=no
14487fi
14488rm -f core conftest.err conftest.$ac_objext \
14489 conftest$ac_exeext conftest.$ac_ext
14490LIBS=$ac_check_lib_save_LIBS
14491fi
14492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14493$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
d0ac1c44 14494if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
193f13e6
MK
14495 cat >>confdefs.h <<_ACEOF
14496#define HAVE_LIBDL 1
14497_ACEOF
14498
14499 LIBS="-ldl $LIBS"
14500
14501fi
14502
14503LIBS="$old_LIBS"
14504
0d62e5e8
DJ
14505srv_thread_depfiles=
14506srv_libs=
0d62e5e8
DJ
14507
14508if test "$srv_linux_thread_db" = "yes"; then
193f13e6
MK
14509 if test "$ac_cv_lib_dl_dlopen" = "yes"; then
14510 srv_libs="-ldl"
f6528abd
JK
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14512$as_echo_n "checking for the dynamic export flag... " >&6; }
193f13e6 14513 old_LDFLAGS="$LDFLAGS"
f6528abd
JK
14514 # Older GNU ld supports --export-dynamic but --dynamic-list may not be
14515 # supported there.
14516 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14517 LDFLAGS="$LDFLAGS $RDYNAMIC"
193f13e6 14518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14519/* end confdefs.h. */
14520
14521int
14522main ()
14523{
14524
14525 ;
14526 return 0;
14527}
14528_ACEOF
81ecdfbb 14529if ac_fn_c_try_link "$LINENO"; then :
f6528abd 14530 found="-Wl,--dynamic-list"
7e8c7130 14531 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6de3c42 14532else
f6528abd 14533 RDYNAMIC="-rdynamic"
7e8c7130
SM
14534 LDFLAGS="$old_LDFLAGS $RDYNAMIC"
14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14536/* end confdefs.h. */
14537
14538int
14539main ()
14540{
14541
14542 ;
14543 return 0;
14544}
14545_ACEOF
14546if ac_fn_c_try_link "$LINENO"; then :
14547 found="-rdynamic"
14548else
14549 found="no"
7e8c7130
SM
14550 RDYNAMIC=""
14551
770d76d7
PA
14552fi
14553rm -f core conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
7e8c7130 14555
770d76d7
PA
14556fi
14557rm -f core conftest.err conftest.$ac_objext \
14558 conftest$ac_exeext conftest.$ac_ext
14559
14560 LDFLAGS="$old_LDFLAGS"
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14562$as_echo "$found" >&6; }
14563 else
14564 srv_libs="-lthread_db"
14565 fi
55a8c076 14566
770d76d7 14567 srv_thread_depfiles="thread-db.o proc-service.o"
7d4e5717
PA
14568
14569$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
14570
770d76d7
PA
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
14572$as_echo_n "checking for TD_VERSION... " >&6; }
d0ac1c44 14573if ${gdbsrv_cv_have_td_version+:} false; then :
770d76d7
PA
14574 $as_echo_n "(cached) " >&6
14575else
14576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14577/* end confdefs.h. */
14578#include <thread_db.h>
55a8c076
YQ
14579int
14580main ()
14581{
770d76d7 14582TD_VERSION;
c9a1864a
YQ
14583 ;
14584 return 0;
14585}
14586_ACEOF
55a8c076 14587if ac_fn_c_try_compile "$LINENO"; then :
770d76d7 14588 gdbsrv_cv_have_td_version=yes
c9a1864a 14589else
770d76d7 14590 gdbsrv_cv_have_td_version=no
7e8c7130 14591
770d76d7
PA
14592fi
14593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7e8c7130 14594
770d76d7
PA
14595fi
14596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
14597$as_echo "$gdbsrv_cv_have_td_version" >&6; }
0ad6b8ee 14598 if test "$gdbsrv_cv_have_td_version" = yes; then
c9a1864a 14599
770d76d7 14600$as_echo "#define HAVE_TD_VERSION 1" >>confdefs.h
55a8c076 14601
770d76d7
PA
14602 fi
14603fi
c9a1864a
YQ
14604
14605
770d76d7
PA
14606# Check whether --with-libthread-db was given.
14607if test "${with_libthread_db+set}" = set; then :
14608 withval=$with_libthread_db; srv_libthread_db_path="${withval}"
14609 srv_libs="$srv_libthread_db_path"
c9a1864a 14610
770d76d7 14611fi
c9a1864a
YQ
14612
14613
770d76d7 14614if test "$srv_libs" != "" -a "$srv_libs" != "-ldl"; then
c9a1864a 14615
770d76d7 14616$as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1" >>confdefs.h
c9a1864a 14617
55a8c076 14618fi
c9a1864a 14619
770d76d7
PA
14620if test "$srv_xmlfiles" != ""; then
14621 srv_xmlbuiltin="xml-builtin.o"
c9a1864a 14622
770d76d7 14623$as_echo "#define USE_XML 1" >>confdefs.h
c9a1864a 14624
c9a1864a 14625
770d76d7
PA
14626 tmp_xmlfiles=$srv_xmlfiles
14627 srv_xmlfiles=""
14628 for f in $tmp_xmlfiles; do
14629 srv_xmlfiles="$srv_xmlfiles \$(XML_DIR)/$f"
14630 done
c9a1864a
YQ
14631fi
14632
0256da25 14633GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
770d76d7 14634GDBSERVER_LIBS="$srv_libs"
c9a1864a 14635
770d76d7
PA
14636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports __sync_*_compare_and_swap" >&5
14637$as_echo_n "checking whether the target supports __sync_*_compare_and_swap... " >&6; }
d0ac1c44 14638if ${gdbsrv_cv_have_sync_builtins+:} false; then :
770d76d7
PA
14639 $as_echo_n "(cached) " >&6
14640else
7e8c7130 14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
770d76d7 14642/* end confdefs.h. */
c9a1864a 14643
770d76d7
PA
14644int
14645main ()
14646{
7e8c7130
SM
14647int foo, bar;
14648 bar = __sync_val_compare_and_swap(&foo, 0, 1);
14649
770d76d7
PA
14650 ;
14651 return 0;
14652}
14653_ACEOF
14654if ac_fn_c_try_link "$LINENO"; then :
14655 gdbsrv_cv_have_sync_builtins=yes
14656else
c971b7fa 14657 gdbsrv_cv_have_sync_builtins=no
7e8c7130 14658
c9a1864a 14659fi
c971b7fa
PA
14660rm -f core conftest.err conftest.$ac_objext \
14661 conftest$ac_exeext conftest.$ac_ext
7e8c7130 14662
c9a1864a 14663fi
c971b7fa
PA
14664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
14665$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
0ad6b8ee 14666if test "$gdbsrv_cv_have_sync_builtins" = yes; then
c971b7fa
PA
14667
14668$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
14669
c9a1864a
YQ
14670fi
14671
c971b7fa
PA
14672saved_cflags="$CFLAGS"
14673CFLAGS="$CFLAGS -fvisibility=hidden"
14674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14675/* end confdefs.h. */
c9a1864a 14676
c971b7fa
PA
14677int
14678main ()
14679{
c9a1864a 14680
c971b7fa
PA
14681 ;
14682 return 0;
14683}
c9a1864a 14684_ACEOF
c971b7fa
PA
14685if ac_fn_c_try_compile "$LINENO"; then :
14686 gdbsrv_cv_have_visibility_hidden=yes
14687else
14688 gdbsrv_cv_have_visibility_hidden=no
c9a1864a 14689fi
c971b7fa
PA
14690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14691CFLAGS="$saved_cflags"
14692
c971b7fa
PA
14693IPA_DEPFILES=""
14694extra_libraries=""
c2a66c29 14695
c971b7fa
PA
14696# check whether to enable the inprocess agent
14697if test "$ipa_obj" != "" \
14698 -a "$gdbsrv_cv_have_sync_builtins" = yes \
14699 -a "$gdbsrv_cv_have_visibility_hidden" = yes; then
14700 have_ipa=true
14701else
14702 have_ipa=false
14703fi
fa593d66 14704
c971b7fa
PA
14705# Check whether --enable-inprocess-agent was given.
14706if test "${enable_inprocess_agent+set}" = set; then :
14707 enableval=$enable_inprocess_agent; case "$enableval" in
14708 yes) want_ipa=true ;;
14709 no) want_ipa=false ;;
d0ac1c44 14710 *) as_fn_error $? "bad value $enableval for inprocess-agent" "$LINENO" 5 ;;
c971b7fa
PA
14711esac
14712else
14713 want_ipa=$have_ipa
14714fi
c2a66c29 14715
c9a1864a 14716
c971b7fa
PA
14717if $want_ipa ; then
14718 if $have_ipa ; then
14719 IPA_DEPFILES="$ipa_obj"
14720 extra_libraries="$extra_libraries libinproctrace.so"
14721 else
d0ac1c44 14722 as_fn_error $? "inprocess agent not supported for this target" "$LINENO" 5
c971b7fa
PA
14723 fi
14724fi
c9a1864a 14725
c9a1864a 14726
c2a66c29
NS
14727
14728
fa593d66
PA
14729
14730
14731
0d62e5e8 14732
1a627e7e 14733GNULIB=../gnulib/import
d6e9fb05 14734
c9a1864a
YQ
14735GNULIB_STDINT_H=
14736if test x"$STDINT_H" != x; then
c971b7fa 14737 GNULIB_STDINT_H=$GNULIB/$STDINT_H
c9a1864a 14738fi
d6e9fb05 14739
fb1e4ffc 14740
da48217f
SM
14741# Check for libiconv. It is a requirement for Linux hosts, and others hosts
14742# don't use it at all. Define MAYBE_LIBICONV only if the host is Linux.
14743
14744
14745
14746
14747
14748 am_save_CPPFLAGS="$CPPFLAGS"
14749
14750 for element in $INCICONV; do
14751 haveit=
14752 for x in $CPPFLAGS; do
14753
14754 acl_save_prefix="$prefix"
14755 prefix="$acl_final_prefix"
14756 acl_save_exec_prefix="$exec_prefix"
14757 exec_prefix="$acl_final_exec_prefix"
14758 eval x=\"$x\"
14759 exec_prefix="$acl_save_exec_prefix"
14760 prefix="$acl_save_prefix"
14761
14762 if test "X$x" = "X$element"; then
14763 haveit=yes
14764 break
14765 fi
14766 done
14767 if test -z "$haveit"; then
14768 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14769 fi
14770 done
14771
14772
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14774$as_echo_n "checking for iconv... " >&6; }
14775if ${am_cv_func_iconv+:} false; then :
14776 $as_echo_n "(cached) " >&6
14777else
14778
14779 am_cv_func_iconv="no, consider installing GNU libiconv"
14780 am_cv_lib_iconv=no
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14782/* end confdefs.h. */
14783
14784#include <stdlib.h>
14785#include <iconv.h>
14786
14787int
14788main ()
14789{
14790iconv_t cd = iconv_open("","");
14791 iconv(cd,NULL,NULL,NULL,NULL);
14792 iconv_close(cd);
14793 ;
14794 return 0;
14795}
14796_ACEOF
14797if ac_fn_c_try_link "$LINENO"; then :
14798 am_cv_func_iconv=yes
14799fi
14800rm -f core conftest.err conftest.$ac_objext \
14801 conftest$ac_exeext conftest.$ac_ext
14802 if test "$am_cv_func_iconv" != yes; then
14803 am_save_LIBS="$LIBS"
14804 LIBS="$LIBS $LIBICONV"
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806/* end confdefs.h. */
14807
14808#include <stdlib.h>
14809#include <iconv.h>
14810
14811int
14812main ()
14813{
14814iconv_t cd = iconv_open("","");
14815 iconv(cd,NULL,NULL,NULL,NULL);
14816 iconv_close(cd);
14817 ;
14818 return 0;
14819}
14820_ACEOF
14821if ac_fn_c_try_link "$LINENO"; then :
14822 am_cv_lib_iconv=yes
14823 am_cv_func_iconv=yes
14824fi
14825rm -f core conftest.err conftest.$ac_objext \
14826 conftest$ac_exeext conftest.$ac_ext
14827 LIBS="$am_save_LIBS"
14828 fi
14829
14830fi
14831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14832$as_echo "$am_cv_func_iconv" >&6; }
14833 if test "$am_cv_func_iconv" = yes; then
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14835$as_echo_n "checking for working iconv... " >&6; }
14836if ${am_cv_func_iconv_works+:} false; then :
14837 $as_echo_n "(cached) " >&6
14838else
14839
14840 am_save_LIBS="$LIBS"
14841 if test $am_cv_lib_iconv = yes; then
14842 LIBS="$LIBS $LIBICONV"
14843 fi
14844 am_cv_func_iconv_works=no
14845 for ac_iconv_const in '' 'const'; do
14846 if test "$cross_compiling" = yes; then :
14847 case "$host_os" in
14848 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14849 *) am_cv_func_iconv_works="guessing yes" ;;
14850 esac
14851else
14852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14853/* end confdefs.h. */
14854
14855#include <iconv.h>
14856#include <string.h>
14857
14858#ifndef ICONV_CONST
14859# define ICONV_CONST $ac_iconv_const
14860#endif
14861
14862int
14863main ()
14864{
14865int result = 0;
14866 /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
14867 successful returns. This is even documented in
14868 <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
14869 {
14870 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14871 if (cd_utf8_to_88591 != (iconv_t)(-1))
14872 {
14873 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
14874 char buf[10];
14875 ICONV_CONST char *inptr = input;
14876 size_t inbytesleft = strlen (input);
14877 char *outptr = buf;
14878 size_t outbytesleft = sizeof (buf);
14879 size_t res = iconv (cd_utf8_to_88591,
14880 &inptr, &inbytesleft,
14881 &outptr, &outbytesleft);
14882 if (res == 0)
14883 result |= 1;
14884 iconv_close (cd_utf8_to_88591);
14885 }
14886 }
14887 /* Test against Solaris 10 bug: Failures are not distinguishable from
14888 successful returns. */
14889 {
14890 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14891 if (cd_ascii_to_88591 != (iconv_t)(-1))
14892 {
14893 static ICONV_CONST char input[] = "\263";
14894 char buf[10];
14895 ICONV_CONST char *inptr = input;
14896 size_t inbytesleft = strlen (input);
14897 char *outptr = buf;
14898 size_t outbytesleft = sizeof (buf);
14899 size_t res = iconv (cd_ascii_to_88591,
14900 &inptr, &inbytesleft,
14901 &outptr, &outbytesleft);
14902 if (res == 0)
14903 result |= 2;
14904 iconv_close (cd_ascii_to_88591);
14905 }
14906 }
14907 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14908 {
14909 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14910 if (cd_88591_to_utf8 != (iconv_t)(-1))
14911 {
14912 static ICONV_CONST char input[] = "\304";
14913 static char buf[2] = { (char)0xDE, (char)0xAD };
14914 ICONV_CONST char *inptr = input;
14915 size_t inbytesleft = 1;
14916 char *outptr = buf;
14917 size_t outbytesleft = 1;
14918 size_t res = iconv (cd_88591_to_utf8,
14919 &inptr, &inbytesleft,
14920 &outptr, &outbytesleft);
14921 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14922 result |= 4;
14923 iconv_close (cd_88591_to_utf8);
14924 }
14925 }
14926#if 0 /* This bug could be worked around by the caller. */
14927 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
14928 {
14929 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14930 if (cd_88591_to_utf8 != (iconv_t)(-1))
14931 {
14932 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14933 char buf[50];
14934 ICONV_CONST char *inptr = input;
14935 size_t inbytesleft = strlen (input);
14936 char *outptr = buf;
14937 size_t outbytesleft = sizeof (buf);
14938 size_t res = iconv (cd_88591_to_utf8,
14939 &inptr, &inbytesleft,
14940 &outptr, &outbytesleft);
14941 if ((int)res > 0)
14942 result |= 8;
14943 iconv_close (cd_88591_to_utf8);
14944 }
14945 }
14946#endif
14947 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14948 provided. */
14949 {
14950 /* Try standardized names. */
14951 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
14952 /* Try IRIX, OSF/1 names. */
14953 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
14954 /* Try AIX names. */
14955 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
14956 /* Try HP-UX names. */
14957 iconv_t cd4 = iconv_open ("utf8", "eucJP");
14958 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
14959 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
14960 result |= 16;
14961 if (cd1 != (iconv_t)(-1))
14962 iconv_close (cd1);
14963 if (cd2 != (iconv_t)(-1))
14964 iconv_close (cd2);
14965 if (cd3 != (iconv_t)(-1))
14966 iconv_close (cd3);
14967 if (cd4 != (iconv_t)(-1))
14968 iconv_close (cd4);
14969 }
14970 return result;
14971
14972 ;
14973 return 0;
14974}
14975_ACEOF
14976if ac_fn_c_try_run "$LINENO"; then :
14977 am_cv_func_iconv_works=yes
14978fi
14979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14980 conftest.$ac_objext conftest.beam conftest.$ac_ext
14981fi
14982
14983 test "$am_cv_func_iconv_works" = no || break
14984 done
14985 LIBS="$am_save_LIBS"
14986
14987fi
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14989$as_echo "$am_cv_func_iconv_works" >&6; }
14990 case "$am_cv_func_iconv_works" in
14991 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14992 *) am_func_iconv=yes ;;
14993 esac
14994 else
14995 am_func_iconv=no am_cv_lib_iconv=no
14996 fi
14997 if test "$am_func_iconv" = yes; then
14998
14999$as_echo "#define HAVE_ICONV 1" >>confdefs.h
15000
15001 fi
15002 if test "$am_cv_lib_iconv" = yes; then
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
15004$as_echo_n "checking how to link with libiconv... " >&6; }
15005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
15006$as_echo "$LIBICONV" >&6; }
15007 else
15008 CPPFLAGS="$am_save_CPPFLAGS"
15009 LIBICONV=
15010 LTLIBICONV=
15011 fi
15012
15013
15014
15015 if test "$am_cv_func_iconv" = yes; then
15016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
15017$as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
15018if ${gl_cv_iconv_nonconst+:} false; then :
15019 $as_echo_n "(cached) " >&6
15020else
15021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15022/* end confdefs.h. */
15023
15024#include <stdlib.h>
15025#include <iconv.h>
15026extern
15027#ifdef __cplusplus
15028"C"
15029#endif
15030size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
15031
15032int
15033main ()
15034{
15035
15036 ;
15037 return 0;
15038}
15039_ACEOF
15040if ac_fn_c_try_compile "$LINENO"; then :
15041 gl_cv_iconv_nonconst=yes
15042else
15043 gl_cv_iconv_nonconst=no
15044fi
15045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15046
15047fi
15048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
15049$as_echo "$gl_cv_iconv_nonconst" >&6; }
15050 else
15051 gl_cv_iconv_nonconst=yes
15052 fi
15053 if test $gl_cv_iconv_nonconst = yes; then
15054 iconv_arg1=""
15055 else
15056 iconv_arg1="const"
15057 fi
15058
15059cat >>confdefs.h <<_ACEOF
15060#define ICONV_CONST $iconv_arg1
15061_ACEOF
15062
15063
15064
15065 if test "$am_func_iconv" = yes; then
15066 if test -n "$LIBICONV"; then
15067 am_cv_func_iconv_summary='yes, in libiconv'
15068 else
15069 am_cv_func_iconv_summary='yes, in libc'
15070 fi
15071 else
15072 if test "$am_cv_func_iconv" = yes; then
15073 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
15074 else
15075 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
15076 fi
15077 fi
15078
15079MAYBE_LIBICONV=
15080case "$host" in
15081 *linux*)
15082 if test "$am_cv_func_iconv" != yes; then
15083 as_fn_error $? "could not find libiconv (required for host $host)" "$LINENO" 5
15084 fi
15085
15086 MAYBE_LIBICONV="$LIBICONV"
15087 ;;
15088esac
15089
15090
15091
c971b7fa 15092ac_config_files="$ac_config_files Makefile"
81ecdfbb 15093
81ecdfbb 15094
bec39cab 15095cat >confcache <<\_ACEOF
d6e9fb05
JK
15096# This file is a shell script that caches the results of configure
15097# tests run on this system so they can be shared between configure
bec39cab
AC
15098# scripts and configure runs, see configure's option --config-cache.
15099# It is not useful on other systems. If it contains results you don't
15100# want to keep, you may remove or edit it.
d6e9fb05 15101#
bec39cab
AC
15102# config.status only pays attention to the cache file if you give it
15103# the --recheck option to rerun configure.
d6e9fb05 15104#
bec39cab
AC
15105# `ac_cv_env_foo' variables (set or unset) will be overridden when
15106# loading this file, other *unset* `ac_cv_foo' will be assigned the
15107# following values.
15108
15109_ACEOF
15110
d6e9fb05
JK
15111# The following way of writing the cache mishandles newlines in values,
15112# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15113# So, we kill variables containing newlines.
d6e9fb05
JK
15114# Ultrix sh set writes to stderr and can't be redirected directly,
15115# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15116(
15117 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15118 eval ac_val=\$$ac_var
15119 case $ac_val in #(
15120 *${as_nl}*)
15121 case $ac_var in #(
15122 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15123$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15124 esac
15125 case $ac_var in #(
15126 _ | IFS | as_nl) ;; #(
15127 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15128 *) { eval $ac_var=; unset $ac_var;} ;;
15129 esac ;;
15130 esac
15131 done
15132
bec39cab 15133 (set) 2>&1 |
81ecdfbb
RW
15134 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15135 *${as_nl}ac_space=\ *)
15136 # `set' does not quote correctly, so add quotes: double-quote
15137 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15138 sed -n \
15139 "s/'/'\\\\''/g;
15140 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15141 ;; #(
bec39cab
AC
15142 *)
15143 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15144 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15145 ;;
81ecdfbb
RW
15146 esac |
15147 sort
15148) |
bec39cab 15149 sed '
81ecdfbb 15150 /^ac_cv_env_/b end
bec39cab 15151 t clear
81ecdfbb 15152 :clear
bec39cab
AC
15153 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15154 t end
81ecdfbb
RW
15155 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15156 :end' >>confcache
15157if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15158 if test -w "$cache_file"; then
d0ac1c44 15159 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
15160 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15161$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
15162 if test ! -f "$cache_file" || test -h "$cache_file"; then
15163 cat confcache >"$cache_file"
15164 else
15165 case $cache_file in #(
15166 */* | ?:*)
15167 mv -f confcache "$cache_file"$$ &&
15168 mv -f "$cache_file"$$ "$cache_file" ;; #(
15169 *)
15170 mv -f confcache "$cache_file" ;;
15171 esac
15172 fi
15173 fi
d6e9fb05 15174 else
81ecdfbb
RW
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15176$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
d6e9fb05
JK
15177 fi
15178fi
15179rm -f confcache
15180
d6e9fb05
JK
15181test "x$prefix" = xNONE && prefix=$ac_default_prefix
15182# Let make expand exec_prefix.
15183test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15184
84563040 15185DEFS=-DHAVE_CONFIG_H
d6e9fb05 15186
bec39cab
AC
15187ac_libobjs=
15188ac_ltlibobjs=
d0ac1c44 15189U=
bec39cab
AC
15190for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15191 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15192 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15193 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15194 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15195 # will be set to the directory where LIBOBJS objects are built.
15196 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15197 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15198done
15199LIBOBJS=$ac_libobjs
d6e9fb05 15200
bec39cab
AC
15201LTLIBOBJS=$ac_ltlibobjs
15202
15203
c9a1864a 15204if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 15205 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c9a1864a
YQ
15206Usually this means the macro was only invoked conditionally." "$LINENO" 5
15207fi
bec39cab 15208
d0ac1c44 15209: "${CONFIG_STATUS=./config.status}"
81ecdfbb 15210ac_write_fail=0
bec39cab
AC
15211ac_clean_files_save=$ac_clean_files
15212ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15213{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15214$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15215as_write_fail=0
15216cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15217#! $SHELL
15218# Generated by $as_me.
d6e9fb05 15219# Run this file to recreate the current configuration.
d6e9fb05 15220# Compiler output produced by configure, useful for debugging
bec39cab
AC
15221# configure, is in config.log if it exists.
15222
15223debug=false
15224ac_cs_recheck=false
15225ac_cs_silent=false
bec39cab 15226
81ecdfbb
RW
15227SHELL=\${CONFIG_SHELL-$SHELL}
15228export SHELL
15229_ASEOF
15230cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15231## -------------------- ##
15232## M4sh Initialization. ##
15233## -------------------- ##
15234
15235# Be more Bourne compatible
15236DUALCASE=1; export DUALCASE # for MKS sh
15237if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15238 emulate sh
15239 NULLCMD=:
81ecdfbb 15240 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15241 # is contrary to our usage. Disable this feature.
15242 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15243 setopt NO_GLOB_SUBST
15244else
15245 case `(set -o) 2>/dev/null` in #(
15246 *posix*) :
15247 set -o posix ;; #(
15248 *) :
15249 ;;
15250esac
bec39cab 15251fi
d6e9fb05 15252
81ecdfbb
RW
15253
15254as_nl='
15255'
15256export as_nl
15257# Printing a long string crashes Solaris 7 /usr/bin/printf.
15258as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15259as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15260as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15261# Prefer a ksh shell builtin over an external printf program on Solaris,
15262# but without wasting forks for bash or zsh.
15263if test -z "$BASH_VERSION$ZSH_VERSION" \
15264 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15265 as_echo='print -r --'
15266 as_echo_n='print -rn --'
15267elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15268 as_echo='printf %s\n'
15269 as_echo_n='printf %s'
bec39cab 15270else
81ecdfbb
RW
15271 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15272 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15273 as_echo_n='/usr/ucb/echo -n'
15274 else
15275 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15276 as_echo_n_body='eval
15277 arg=$1;
15278 case $arg in #(
15279 *"$as_nl"*)
15280 expr "X$arg" : "X\\(.*\\)$as_nl";
15281 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15282 esac;
15283 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15284 '
15285 export as_echo_n_body
15286 as_echo_n='sh -c $as_echo_n_body as_echo'
15287 fi
15288 export as_echo_body
15289 as_echo='sh -c $as_echo_body as_echo'
15290fi
15291
15292# The user is always right.
15293if test "${PATH_SEPARATOR+set}" != set; then
15294 PATH_SEPARATOR=:
15295 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15296 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15297 PATH_SEPARATOR=';'
15298 }
bec39cab
AC
15299fi
15300
15301
81ecdfbb
RW
15302# IFS
15303# We need space, tab and new line, in precisely that order. Quoting is
15304# there to prevent editors from complaining about space-tab.
15305# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15306# splitting by setting IFS to empty value.)
15307IFS=" "" $as_nl"
15308
15309# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 15310as_myself=
81ecdfbb
RW
15311case $0 in #((
15312 *[\\/]* ) as_myself=$0 ;;
15313 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15314for as_dir in $PATH
15315do
15316 IFS=$as_save_IFS
15317 test -z "$as_dir" && as_dir=.
15318 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15319 done
15320IFS=$as_save_IFS
15321
15322 ;;
15323esac
15324# We did not find ourselves, most probably we were run as `sh COMMAND'
15325# in which case we are not to be found in the path.
15326if test "x$as_myself" = x; then
15327 as_myself=$0
15328fi
15329if test ! -f "$as_myself"; then
15330 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15331 exit 1
15332fi
15333
15334# Unset variables that we do not need and which cause bugs (e.g. in
15335# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15336# suppresses any "Segmentation fault" message there. '((' could
15337# trigger a bug in pdksh 5.2.14.
15338for as_var in BASH_ENV ENV MAIL MAILPATH
15339do eval test x\${$as_var+set} = xset \
15340 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15341done
bec39cab
AC
15342PS1='$ '
15343PS2='> '
15344PS4='+ '
15345
15346# NLS nuisances.
81ecdfbb
RW
15347LC_ALL=C
15348export LC_ALL
15349LANGUAGE=C
15350export LANGUAGE
15351
15352# CDPATH.
15353(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15354
15355
d0ac1c44
SM
15356# as_fn_error STATUS ERROR [LINENO LOG_FD]
15357# ----------------------------------------
81ecdfbb
RW
15358# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15359# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 15360# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
15361as_fn_error ()
15362{
d0ac1c44
SM
15363 as_status=$1; test $as_status -eq 0 && as_status=1
15364 if test "$4"; then
15365 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15366 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
bec39cab 15367 fi
d0ac1c44 15368 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
15369 as_fn_exit $as_status
15370} # as_fn_error
15371
15372
15373# as_fn_set_status STATUS
15374# -----------------------
15375# Set $? to STATUS, without forking.
15376as_fn_set_status ()
15377{
15378 return $1
15379} # as_fn_set_status
15380
15381# as_fn_exit STATUS
15382# -----------------
15383# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15384as_fn_exit ()
15385{
15386 set +e
15387 as_fn_set_status $1
15388 exit $1
15389} # as_fn_exit
15390
15391# as_fn_unset VAR
15392# ---------------
15393# Portably unset VAR.
15394as_fn_unset ()
15395{
15396 { eval $1=; unset $1;}
15397}
15398as_unset=as_fn_unset
15399# as_fn_append VAR VALUE
15400# ----------------------
15401# Append the text in VALUE to the end of the definition contained in VAR. Take
15402# advantage of any shell optimizations that allow amortized linear growth over
15403# repeated appends, instead of the typical quadratic growth present in naive
15404# implementations.
15405if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15406 eval 'as_fn_append ()
15407 {
15408 eval $1+=\$2
15409 }'
15410else
15411 as_fn_append ()
15412 {
15413 eval $1=\$$1\$2
15414 }
15415fi # as_fn_append
15416
15417# as_fn_arith ARG...
15418# ------------------
15419# Perform arithmetic evaluation on the ARGs, and store the result in the
15420# global $as_val. Take advantage of shells that can avoid forks. The arguments
15421# must be portable across $(()) and expr.
15422if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15423 eval 'as_fn_arith ()
15424 {
15425 as_val=$(( $* ))
15426 }'
15427else
15428 as_fn_arith ()
15429 {
15430 as_val=`expr "$@" || test $? -eq 1`
15431 }
15432fi # as_fn_arith
15433
d6e9fb05 15434
81ecdfbb
RW
15435if expr a : '\(a\)' >/dev/null 2>&1 &&
15436 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15437 as_expr=expr
15438else
15439 as_expr=false
15440fi
d6e9fb05 15441
81ecdfbb 15442if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15443 as_basename=basename
15444else
15445 as_basename=false
15446fi
d6e9fb05 15447
81ecdfbb
RW
15448if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15449 as_dirname=dirname
15450else
15451 as_dirname=false
15452fi
d6e9fb05 15453
81ecdfbb 15454as_me=`$as_basename -- "$0" ||
bec39cab
AC
15455$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15456 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15457 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15458$as_echo X/"$0" |
15459 sed '/^.*\/\([^/][^/]*\)\/*$/{
15460 s//\1/
15461 q
15462 }
15463 /^X\/\(\/\/\)$/{
15464 s//\1/
15465 q
15466 }
15467 /^X\/\(\/\).*/{
15468 s//\1/
15469 q
15470 }
15471 s/.*/./; q'`
bec39cab 15472
dae5f5cf
DJ
15473# Avoid depending upon Character Ranges.
15474as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15475as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15476as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15477as_cr_digits='0123456789'
15478as_cr_alnum=$as_cr_Letters$as_cr_digits
15479
81ecdfbb
RW
15480ECHO_C= ECHO_N= ECHO_T=
15481case `echo -n x` in #(((((
15482-n*)
15483 case `echo 'xy\c'` in
15484 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15485 xy) ECHO_C='\c';;
15486 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15487 ECHO_T=' ';;
15488 esac;;
15489*)
15490 ECHO_N='-n';;
bec39cab
AC
15491esac
15492
81ecdfbb
RW
15493rm -f conf$$ conf$$.exe conf$$.file
15494if test -d conf$$.dir; then
15495 rm -f conf$$.dir/conf$$.file
bec39cab 15496else
81ecdfbb
RW
15497 rm -f conf$$.dir
15498 mkdir conf$$.dir 2>/dev/null
bec39cab 15499fi
81ecdfbb
RW
15500if (echo >conf$$.file) 2>/dev/null; then
15501 if ln -s conf$$.file conf$$ 2>/dev/null; then
dae5f5cf 15502 as_ln_s='ln -s'
81ecdfbb
RW
15503 # ... but there are two gotchas:
15504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 15506 # In both cases, we have to default to `cp -pR'.
81ecdfbb 15507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 15508 as_ln_s='cp -pR'
81ecdfbb
RW
15509 elif ln conf$$.file conf$$ 2>/dev/null; then
15510 as_ln_s=ln
15511 else
d0ac1c44 15512 as_ln_s='cp -pR'
dae5f5cf 15513 fi
bec39cab 15514else
d0ac1c44 15515 as_ln_s='cp -pR'
bec39cab 15516fi
81ecdfbb
RW
15517rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15518rmdir conf$$.dir 2>/dev/null
15519
15520
15521# as_fn_mkdir_p
15522# -------------
15523# Create "$as_dir" as a directory, including parents if necessary.
15524as_fn_mkdir_p ()
15525{
15526
15527 case $as_dir in #(
15528 -*) as_dir=./$as_dir;;
15529 esac
15530 test -d "$as_dir" || eval $as_mkdir_p || {
15531 as_dirs=
15532 while :; do
15533 case $as_dir in #(
15534 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15535 *) as_qdir=$as_dir;;
15536 esac
15537 as_dirs="'$as_qdir' $as_dirs"
15538 as_dir=`$as_dirname -- "$as_dir" ||
15539$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15540 X"$as_dir" : 'X\(//\)[^/]' \| \
15541 X"$as_dir" : 'X\(//\)$' \| \
15542 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15543$as_echo X"$as_dir" |
15544 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15545 s//\1/
15546 q
15547 }
15548 /^X\(\/\/\)[^/].*/{
15549 s//\1/
15550 q
15551 }
15552 /^X\(\/\/\)$/{
15553 s//\1/
15554 q
15555 }
15556 /^X\(\/\).*/{
15557 s//\1/
15558 q
15559 }
15560 s/.*/./; q'`
15561 test -d "$as_dir" && break
15562 done
15563 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 15564 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
bec39cab 15565
81ecdfbb
RW
15566
15567} # as_fn_mkdir_p
bec39cab 15568if mkdir -p . 2>/dev/null; then
81ecdfbb 15569 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15570else
15571 test -d ./-p && rmdir ./-p
15572 as_mkdir_p=false
15573fi
15574
d0ac1c44
SM
15575
15576# as_fn_executable_p FILE
15577# -----------------------
15578# Test if FILE is an executable regular file.
15579as_fn_executable_p ()
15580{
15581 test -f "$1" && test -x "$1"
15582} # as_fn_executable_p
15583as_test_x='test -x'
15584as_executable_p=as_fn_executable_p
bec39cab
AC
15585
15586# Sed expression to map a string onto a valid CPP name.
15587as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15588
15589# Sed expression to map a string onto a valid variable name.
15590as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15591
15592
bec39cab 15593exec 6>&1
81ecdfbb
RW
15594## ----------------------------------- ##
15595## Main body of $CONFIG_STATUS script. ##
15596## ----------------------------------- ##
15597_ASEOF
15598test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15599
15600cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15601# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15602# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15603# values after options handling.
15604ac_log="
bec39cab 15605This file was extended by $as_me, which was
d0ac1c44 15606generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
15607
15608 CONFIG_FILES = $CONFIG_FILES
15609 CONFIG_HEADERS = $CONFIG_HEADERS
15610 CONFIG_LINKS = $CONFIG_LINKS
15611 CONFIG_COMMANDS = $CONFIG_COMMANDS
15612 $ $0 $@
15613
81ecdfbb
RW
15614on `(hostname || uname -n) 2>/dev/null | sed 1q`
15615"
15616
bec39cab
AC
15617_ACEOF
15618
81ecdfbb
RW
15619case $ac_config_files in *"
15620"*) set x $ac_config_files; shift; ac_config_files=$*;;
15621esac
bec39cab 15622
81ecdfbb
RW
15623case $ac_config_headers in *"
15624"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15625esac
dae5f5cf 15626
dae5f5cf 15627
81ecdfbb
RW
15628cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15629# Files that config.status was made for.
15630config_files="$ac_config_files"
15631config_headers="$ac_config_headers"
15632config_commands="$ac_config_commands"
bec39cab 15633
81ecdfbb 15634_ACEOF
dae5f5cf 15635
81ecdfbb 15636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15637ac_cs_usage="\
81ecdfbb
RW
15638\`$as_me' instantiates files and other configuration actions
15639from templates according to the current configuration. Unless the files
15640and actions are specified as TAGs, all are instantiated by default.
bec39cab 15641
81ecdfbb 15642Usage: $0 [OPTION]... [TAG]...
bec39cab
AC
15643
15644 -h, --help print this help, then exit
81ecdfbb 15645 -V, --version print version number and configuration settings, then exit
d0ac1c44 15646 --config print configuration, then exit
81ecdfbb
RW
15647 -q, --quiet, --silent
15648 do not print progress messages
bec39cab
AC
15649 -d, --debug don't remove temporary files
15650 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15651 --file=FILE[:TEMPLATE]
15652 instantiate the configuration file FILE
15653 --header=FILE[:TEMPLATE]
15654 instantiate the configuration header FILE
bec39cab
AC
15655
15656Configuration files:
15657$config_files
15658
15659Configuration headers:
15660$config_headers
15661
15662Configuration commands:
15663$config_commands
15664
81ecdfbb 15665Report bugs to the package provider."
dae5f5cf 15666
81ecdfbb
RW
15667_ACEOF
15668cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 15669ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
15670ac_cs_version="\\
15671config.status
d0ac1c44
SM
15672configured by $0, generated by GNU Autoconf 2.69,
15673 with options \\"\$ac_cs_config\\"
bec39cab 15674
d0ac1c44 15675Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
15676This config.status script is free software; the Free Software Foundation
15677gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15678
15679ac_pwd='$ac_pwd'
15680srcdir='$srcdir'
15681INSTALL='$INSTALL'
15682test -n "\$AWK" || AWK=awk
bec39cab
AC
15683_ACEOF
15684
81ecdfbb
RW
15685cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15686# The default lists apply if the user does not specify any file.
bec39cab
AC
15687ac_need_defaults=:
15688while test $# != 0
15689do
15690 case $1 in
d0ac1c44 15691 --*=?*)
81ecdfbb
RW
15692 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15693 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab
AC
15694 ac_shift=:
15695 ;;
d0ac1c44
SM
15696 --*=)
15697 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15698 ac_optarg=
15699 ac_shift=:
15700 ;;
81ecdfbb 15701 *)
bec39cab
AC
15702 ac_option=$1
15703 ac_optarg=$2
15704 ac_shift=shift
15705 ;;
bec39cab
AC
15706 esac
15707
15708 case $ac_option in
15709 # Handling of the options.
bec39cab
AC
15710 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15711 ac_cs_recheck=: ;;
81ecdfbb
RW
15712 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15713 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
15714 --config | --confi | --conf | --con | --co | --c )
15715 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 15716 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15717 debug=: ;;
15718 --file | --fil | --fi | --f )
15719 $ac_shift
81ecdfbb
RW
15720 case $ac_optarg in
15721 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 15722 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
15723 esac
15724 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15725 ac_need_defaults=false;;
15726 --header | --heade | --head | --hea )
15727 $ac_shift
81ecdfbb
RW
15728 case $ac_optarg in
15729 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15730 esac
15731 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15732 ac_need_defaults=false;;
81ecdfbb
RW
15733 --he | --h)
15734 # Conflict between --help and --header
d0ac1c44 15735 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
15736Try \`$0 --help' for more information.";;
15737 --help | --hel | -h )
15738 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15739 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15740 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15741 ac_cs_silent=: ;;
15742
15743 # This is an error.
d0ac1c44 15744 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 15745Try \`$0 --help' for more information." ;;
bec39cab 15746
81ecdfbb
RW
15747 *) as_fn_append ac_config_targets " $1"
15748 ac_need_defaults=false ;;
bec39cab
AC
15749
15750 esac
15751 shift
d6e9fb05 15752done
bec39cab
AC
15753
15754ac_configure_extra_args=
15755
15756if $ac_cs_silent; then
15757 exec 6>/dev/null
15758 ac_configure_extra_args="$ac_configure_extra_args --silent"
d6e9fb05 15759fi
d6e9fb05 15760
bec39cab 15761_ACEOF
81ecdfbb 15762cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15763if \$ac_cs_recheck; then
d0ac1c44 15764 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
15765 shift
15766 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15767 CONFIG_SHELL='$SHELL'
15768 export CONFIG_SHELL
15769 exec "\$@"
bec39cab 15770fi
d6e9fb05 15771
bec39cab 15772_ACEOF
81ecdfbb
RW
15773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15774exec 5>>config.log
15775{
15776 echo
15777 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15778## Running $as_me. ##
15779_ASBOX
15780 $as_echo "$ac_log"
15781} >&5
bec39cab 15782
81ecdfbb
RW
15783_ACEOF
15784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61c125b9
TT
15785#
15786# INIT-COMMANDS
15787#
15788ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
9e11e746
SJ
15789# Capture the value of obsolete ALL_LINGUAS because we need it to compute
15790 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
15791 # from automake.
15792 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
15793 # Capture the value of LINGUAS because we need it to compute CATALOGS.
15794 LINGUAS="${LINGUAS-%UNSET%}"
15795
60d6cfc9 15796ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
61c125b9 15797
81ecdfbb 15798_ACEOF
bec39cab 15799
81ecdfbb 15800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80864fb 15801
81ecdfbb 15802# Handling of arguments.
bec39cab
AC
15803for ac_config_target in $ac_config_targets
15804do
81ecdfbb
RW
15805 case $ac_config_target in
15806 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
61c125b9 15807 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
9e11e746 15808 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
60d6cfc9 15809 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
81ecdfbb 15810 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
81ecdfbb 15811
d0ac1c44 15812 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
d6e9fb05 15813 esac
bec39cab
AC
15814done
15815
81ecdfbb 15816
bec39cab
AC
15817# If the user did not use the arguments to specify the items to instantiate,
15818# then the envvar interface is used. Set only those that are not.
15819# We use the long form for the default assignment because of an extremely
15820# bizarre bug on SunOS 4.1.3.
15821if $ac_need_defaults; then
15822 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15823 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15824 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15825fi
d6e9fb05 15826
bec39cab 15827# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15828# simply because there is no reason against having it here, and in addition,
bec39cab 15829# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15830# Hook for its removal unless debugging.
15831# Note that there is a small window in which the directory will not be cleaned:
15832# after its creation but before its name has been assigned to `$tmp'.
bec39cab
AC
15833$debug ||
15834{
d0ac1c44 15835 tmp= ac_tmp=
81ecdfbb 15836 trap 'exit_status=$?
d0ac1c44
SM
15837 : "${ac_tmp:=$tmp}"
15838 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
15839' 0
15840 trap 'as_fn_exit 1' 1 2 13 15
bec39cab 15841}
bec39cab
AC
15842# Create a (secure) tmp directory for tmp files.
15843
15844{
81ecdfbb 15845 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 15846 test -d "$tmp"
bec39cab
AC
15847} ||
15848{
81ecdfbb
RW
15849 tmp=./conf$$-$RANDOM
15850 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
15851} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15852ac_tmp=$tmp
81ecdfbb
RW
15853
15854# Set up the scripts for CONFIG_FILES section.
15855# No need to generate them if there are no CONFIG_FILES.
15856# This happens for instance with `./config.status config.h'.
15857if test -n "$CONFIG_FILES"; then
15858
15859
15860ac_cr=`echo X | tr X '\015'`
15861# On cygwin, bash can eat \r inside `` if the user requested igncr.
15862# But we know of no other shell where ac_cr would be empty at this
15863# point, so we can use a bashism as a fallback.
15864if test "x$ac_cr" = x; then
15865 eval ac_cr=\$\'\\r\'
15866fi
15867ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15868if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 15869 ac_cs_awk_cr='\\r'
81ecdfbb
RW
15870else
15871 ac_cs_awk_cr=$ac_cr
15872fi
15873
d0ac1c44 15874echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
15875_ACEOF
15876
15877
15878{
15879 echo "cat >conf$$subs.awk <<_ACEOF" &&
15880 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15881 echo "_ACEOF"
15882} >conf$$subs.sh ||
d0ac1c44
SM
15883 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15884ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
15885ac_delim='%!_!# '
15886for ac_last_try in false false false false false :; do
15887 . ./conf$$subs.sh ||
d0ac1c44 15888 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
15889
15890 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15891 if test $ac_delim_n = $ac_delim_num; then
15892 break
15893 elif $ac_last_try; then
d0ac1c44 15894 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
15895 else
15896 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15897 fi
15898done
15899rm -f conf$$subs.sh
15900
15901cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 15902cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
15903_ACEOF
15904sed -n '
15905h
15906s/^/S["/; s/!.*/"]=/
15907p
15908g
15909s/^[^!]*!//
15910:repl
15911t repl
15912s/'"$ac_delim"'$//
15913t delim
15914:nl
15915h
d0ac1c44 15916s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
15917t more1
15918s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15919p
15920n
15921b repl
15922:more1
15923s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15924p
15925g
15926s/.\{148\}//
15927t nl
15928:delim
15929h
d0ac1c44 15930s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
15931t more2
15932s/["\\]/\\&/g; s/^/"/; s/$/"/
15933p
15934b
15935:more2
15936s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15937p
15938g
15939s/.\{148\}//
15940t delim
15941' <conf$$subs.awk | sed '
15942/^[^""]/{
15943 N
15944 s/\n//
15945}
15946' >>$CONFIG_STATUS || ac_write_fail=1
15947rm -f conf$$subs.awk
15948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15949_ACAWK
d0ac1c44 15950cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
15951 for (key in S) S_is_set[key] = 1
15952 FS = "\a"
15953
15954}
bec39cab 15955{
81ecdfbb
RW
15956 line = $ 0
15957 nfields = split(line, field, "@")
15958 substed = 0
15959 len = length(field[1])
15960 for (i = 2; i < nfields; i++) {
15961 key = field[i]
15962 keylen = length(key)
15963 if (S_is_set[key]) {
15964 value = S[key]
15965 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15966 len += length(value) + length(field[++i])
15967 substed = 1
15968 } else
15969 len += 1 + keylen
15970 }
15971
15972 print line
bec39cab
AC
15973}
15974
81ecdfbb
RW
15975_ACAWK
15976_ACEOF
15977cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15978if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15979 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15980else
15981 cat
d0ac1c44
SM
15982fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15983 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
dae5f5cf
DJ
15984_ACEOF
15985
d0ac1c44
SM
15986# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15987# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
15988# trailing colons and then remove the whole line if VPATH becomes empty
15989# (actually we leave an empty line to preserve line numbers).
15990if test "x$srcdir" = x.; then
d0ac1c44
SM
15991 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15992h
15993s///
15994s/^/:/
15995s/[ ]*$/:/
15996s/:\$(srcdir):/:/g
15997s/:\${srcdir}:/:/g
15998s/:@srcdir@:/:/g
15999s/^:*//
81ecdfbb 16000s/:*$//
d0ac1c44
SM
16001x
16002s/\(=[ ]*\).*/\1/
16003G
16004s/\n//
81ecdfbb
RW
16005s/^[^=]*=[ ]*$//
16006}'
16007fi
bec39cab 16008
81ecdfbb
RW
16009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16010fi # test -n "$CONFIG_FILES"
bec39cab 16011
81ecdfbb
RW
16012# Set up the scripts for CONFIG_HEADERS section.
16013# No need to generate them if there are no CONFIG_HEADERS.
16014# This happens for instance with `./config.status Makefile'.
16015if test -n "$CONFIG_HEADERS"; then
d0ac1c44 16016cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb 16017BEGIN {
b80864fb
DJ
16018_ACEOF
16019
81ecdfbb
RW
16020# Transform confdefs.h into an awk script `defines.awk', embedded as
16021# here-document in config.status, that substitutes the proper values into
16022# config.h.in to produce config.h.
16023
16024# Create a delimiter string that does not exist in confdefs.h, to ease
16025# handling of long lines.
16026ac_delim='%!_!# '
16027for ac_last_try in false false :; do
d0ac1c44
SM
16028 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16029 if test -z "$ac_tt"; then
81ecdfbb
RW
16030 break
16031 elif $ac_last_try; then
d0ac1c44 16032 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
16033 else
16034 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
d6e9fb05 16035 fi
81ecdfbb 16036done
d6e9fb05 16037
81ecdfbb
RW
16038# For the awk script, D is an array of macro values keyed by name,
16039# likewise P contains macro parameters if any. Preserve backslash
16040# newline sequences.
16041
16042ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16043sed -n '
16044s/.\{148\}/&'"$ac_delim"'/g
16045t rset
16046:rset
16047s/^[ ]*#[ ]*define[ ][ ]*/ /
16048t def
16049d
16050:def
16051s/\\$//
16052t bsnl
16053s/["\\]/\\&/g
16054s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16055D["\1"]=" \3"/p
16056s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16057d
16058:bsnl
16059s/["\\]/\\&/g
16060s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16061D["\1"]=" \3\\\\\\n"\\/p
16062t cont
16063s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16064t cont
16065d
16066:cont
16067n
16068s/.\{148\}/&'"$ac_delim"'/g
16069t clear
16070:clear
16071s/\\$//
16072t bsnlc
16073s/["\\]/\\&/g; s/^/"/; s/$/"/p
16074d
16075:bsnlc
16076s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16077b cont
16078' <confdefs.h | sed '
16079s/'"$ac_delim"'/"\\\
16080"/g' >>$CONFIG_STATUS || ac_write_fail=1
16081
16082cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16083 for (key in D) D_is_set[key] = 1
16084 FS = "\a"
16085}
16086/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16087 line = \$ 0
16088 split(line, arg, " ")
16089 if (arg[1] == "#") {
16090 defundef = arg[2]
16091 mac1 = arg[3]
16092 } else {
16093 defundef = substr(arg[1], 2)
16094 mac1 = arg[2]
16095 }
16096 split(mac1, mac2, "(") #)
16097 macro = mac2[1]
16098 prefix = substr(line, 1, index(line, defundef) - 1)
16099 if (D_is_set[macro]) {
16100 # Preserve the white space surrounding the "#".
16101 print prefix "define", macro P[macro] D[macro]
16102 next
16103 } else {
16104 # Replace #undef with comments. This is necessary, for example,
16105 # in the case of _POSIX_SOURCE, which is predefined and required
16106 # on some systems where configure will not decide to define it.
16107 if (defundef == "undef") {
16108 print "/*", prefix defundef, macro, "*/"
16109 next
16110 }
16111 }
16112}
16113{ print }
16114_ACAWK
bec39cab 16115_ACEOF
81ecdfbb 16116cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 16117 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb
RW
16118fi # test -n "$CONFIG_HEADERS"
16119
16120
16121eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
16122shift
16123for ac_tag
16124do
16125 case $ac_tag in
16126 :[FHLC]) ac_mode=$ac_tag; continue;;
16127 esac
16128 case $ac_mode$ac_tag in
16129 :[FHL]*:*);;
d0ac1c44 16130 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
16131 :[FH]-) ac_tag=-:-;;
16132 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16133 esac
16134 ac_save_IFS=$IFS
16135 IFS=:
16136 set x $ac_tag
16137 IFS=$ac_save_IFS
16138 shift
16139 ac_file=$1
16140 shift
16141
16142 case $ac_mode in
16143 :L) ac_source=$1;;
16144 :[FH])
16145 ac_file_inputs=
16146 for ac_f
16147 do
16148 case $ac_f in
d0ac1c44 16149 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
16150 *) # Look for the file first in the build tree, then in the source tree
16151 # (if the path is not absolute). The absolute path cannot be DOS-style,
16152 # because $ac_f cannot contain `:'.
16153 test -f "$ac_f" ||
16154 case $ac_f in
16155 [\\/$]*) false;;
16156 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16157 esac ||
d0ac1c44 16158 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
16159 esac
16160 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16161 as_fn_append ac_file_inputs " '$ac_f'"
16162 done
16163
16164 # Let's still pretend it is `configure' which instantiates (i.e., don't
16165 # use $as_me), people would be surprised to read:
16166 # /* config.h. Generated by config.status. */
16167 configure_input='Generated from '`
16168 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16169 `' by configure.'
16170 if test x"$ac_file" != x-; then
16171 configure_input="$ac_file. $configure_input"
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16173$as_echo "$as_me: creating $ac_file" >&6;}
16174 fi
16175 # Neutralize special characters interpreted by sed in replacement strings.
16176 case $configure_input in #(
16177 *\&* | *\|* | *\\* )
16178 ac_sed_conf_input=`$as_echo "$configure_input" |
16179 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16180 *) ac_sed_conf_input=$configure_input;;
16181 esac
16182
16183 case $ac_tag in
d0ac1c44
SM
16184 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16185 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
16186 esac
16187 ;;
d6e9fb05
JK
16188 esac
16189
81ecdfbb 16190 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16191$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16192 X"$ac_file" : 'X\(//\)[^/]' \| \
16193 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16194 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16195$as_echo X"$ac_file" |
16196 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16197 s//\1/
16198 q
16199 }
16200 /^X\(\/\/\)[^/].*/{
16201 s//\1/
16202 q
16203 }
16204 /^X\(\/\/\)$/{
16205 s//\1/
16206 q
16207 }
16208 /^X\(\/\).*/{
16209 s//\1/
16210 q
16211 }
16212 s/.*/./; q'`
16213 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16214 ac_builddir=.
16215
81ecdfbb
RW
16216case "$ac_dir" in
16217.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16218*)
16219 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16220 # A ".." for each directory in $ac_dir_suffix.
16221 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16222 case $ac_top_builddir_sub in
16223 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16224 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16225 esac ;;
16226esac
16227ac_abs_top_builddir=$ac_pwd
16228ac_abs_builddir=$ac_pwd$ac_dir_suffix
16229# for backward compatibility:
16230ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16231
16232case $srcdir in
81ecdfbb 16233 .) # We are building in place.
bec39cab 16234 ac_srcdir=.
81ecdfbb
RW
16235 ac_top_srcdir=$ac_top_builddir_sub
16236 ac_abs_top_srcdir=$ac_pwd ;;
16237 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16238 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16239 ac_top_srcdir=$srcdir
16240 ac_abs_top_srcdir=$srcdir ;;
16241 *) # Relative name.
16242 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16243 ac_top_srcdir=$ac_top_build_prefix$srcdir
16244 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16245esac
81ecdfbb 16246ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16247
bec39cab 16248
81ecdfbb
RW
16249 case $ac_mode in
16250 :F)
16251 #
16252 # CONFIG_FILE
16253 #
d6e9fb05 16254
bec39cab
AC
16255 case $INSTALL in
16256 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16257 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
d6e9fb05 16258 esac
81ecdfbb 16259_ACEOF
3db0444b 16260
81ecdfbb
RW
16261cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16262# If the template does not know about datarootdir, expand it.
16263# FIXME: This hack should be removed a few years after 2.60.
16264ac_datarootdir_hack=; ac_datarootdir_seen=
16265ac_sed_dataroot='
16266/datarootdir/ {
16267 p
16268 q
16269}
16270/@datadir@/p
16271/@docdir@/p
16272/@infodir@/p
16273/@localedir@/p
16274/@mandir@/p'
16275case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16276*datarootdir*) ac_datarootdir_seen=yes;;
16277*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16279$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16280_ACEOF
16281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16282 ac_datarootdir_hack='
16283 s&@datadir@&$datadir&g
16284 s&@docdir@&$docdir&g
16285 s&@infodir@&$infodir&g
16286 s&@localedir@&$localedir&g
16287 s&@mandir@&$mandir&g
16288 s&\\\${datarootdir}&$datarootdir&g' ;;
16289esac
bec39cab 16290_ACEOF
81ecdfbb
RW
16291
16292# Neutralize VPATH when `$srcdir' = `.'.
16293# Shell code in configure.ac might set extrasub.
16294# FIXME: do we really want to maintain this feature?
16295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16296ac_sed_extra="$ac_vpsub
bec39cab
AC
16297$extrasub
16298_ACEOF
81ecdfbb 16299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16300:t
16301/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16302s|@configure_input@|$ac_sed_conf_input|;t t
16303s&@top_builddir@&$ac_top_builddir_sub&;t t
16304s&@top_build_prefix@&$ac_top_build_prefix&;t t
16305s&@srcdir@&$ac_srcdir&;t t
16306s&@abs_srcdir@&$ac_abs_srcdir&;t t
16307s&@top_srcdir@&$ac_top_srcdir&;t t
16308s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16309s&@builddir@&$ac_builddir&;t t
16310s&@abs_builddir@&$ac_abs_builddir&;t t
16311s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16312s&@INSTALL@&$ac_INSTALL&;t t
16313$ac_datarootdir_hack
16314"
d0ac1c44
SM
16315eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16316 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
16317
16318test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
16319 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16320 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16321 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 16322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 16323which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 16324$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 16325which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 16326
d0ac1c44 16327 rm -f "$ac_tmp/stdin"
bec39cab 16328 case $ac_file in
d0ac1c44
SM
16329 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16330 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 16331 esac \
d0ac1c44 16332 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
16333 ;;
16334 :H)
16335 #
16336 # CONFIG_HEADER
16337 #
bec39cab 16338 if test x"$ac_file" != x-; then
81ecdfbb
RW
16339 {
16340 $as_echo "/* $configure_input */" \
d0ac1c44
SM
16341 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16342 } >"$ac_tmp/config.h" \
16343 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16344 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16346$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16347 else
81ecdfbb 16348 rm -f "$ac_file"
d0ac1c44
SM
16349 mv "$ac_tmp/config.h" "$ac_file" \
16350 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
84563040 16351 fi
bec39cab 16352 else
81ecdfbb 16353 $as_echo "/* $configure_input */" \
d0ac1c44
SM
16354 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16355 || as_fn_error $? "could not create -" "$LINENO" 5
d6e9fb05 16356 fi
81ecdfbb 16357 ;;
dae5f5cf 16358
81ecdfbb
RW
16359 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16360$as_echo "$as_me: executing $ac_file commands" >&6;}
16361 ;;
16362 esac
dae5f5cf
DJ
16363
16364
81ecdfbb 16365 case $ac_file$ac_mode in
c5adaa19 16366 "config.h":H) echo > stamp-h ;;
61c125b9 16367 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
9e11e746
SJ
16368 "default-1":C)
16369 for ac_file in $CONFIG_FILES; do
16370 # Support "outfile[:infile[:infile...]]"
16371 case "$ac_file" in
16372 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16373 esac
16374 # PO directories have a Makefile.in generated from Makefile.in.in.
16375 case "$ac_file" in */Makefile.in)
16376 # Adjust a relative srcdir.
16377 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16378 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
16379 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16380 # In autoconf-2.13 it is called $ac_given_srcdir.
16381 # In autoconf-2.50 it is called $srcdir.
16382 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16383 case "$ac_given_srcdir" in
16384 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16385 /*) top_srcdir="$ac_given_srcdir" ;;
16386 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
16387 esac
16388 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16389 rm -f "$ac_dir/POTFILES"
16390 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16391 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
16392 POMAKEFILEDEPS="POTFILES.in"
16393 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
16394 # on $ac_dir but don't depend on user-specified configuration
16395 # parameters.
16396 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
16397 # The LINGUAS file contains the set of available languages.
16398 if test -n "$OBSOLETE_ALL_LINGUAS"; then
16399 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
16400 fi
16401 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
16402 # Hide the ALL_LINGUAS assigment from automake.
16403 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
16404 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
16405 else
16406 # The set of available languages was given in configure.ac.
16407 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
16408 fi
16409 case "$ac_given_srcdir" in
16410 .) srcdirpre= ;;
16411 *) srcdirpre='$(srcdir)/' ;;
16412 esac
16413 POFILES=
16414 GMOFILES=
16415 UPDATEPOFILES=
16416 DUMMYPOFILES=
16417 for lang in $ALL_LINGUAS; do
16418 POFILES="$POFILES $srcdirpre$lang.po"
16419 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
16420 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
16421 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
16422 done
16423 # CATALOGS depends on both $ac_dir and the user's LINGUAS
16424 # environment variable.
16425 INST_LINGUAS=
16426 if test -n "$ALL_LINGUAS"; then
16427 for presentlang in $ALL_LINGUAS; do
16428 useit=no
16429 if test "%UNSET%" != "$LINGUAS"; then
16430 desiredlanguages="$LINGUAS"
16431 else
16432 desiredlanguages="$ALL_LINGUAS"
16433 fi
16434 for desiredlang in $desiredlanguages; do
16435 # Use the presentlang catalog if desiredlang is
16436 # a. equal to presentlang, or
16437 # b. a variant of presentlang (because in this case,
16438 # presentlang can be used as a fallback for messages
16439 # which are not translated in the desiredlang catalog).
16440 case "$desiredlang" in
16441 "$presentlang"*) useit=yes;;
16442 esac
16443 done
16444 if test $useit = yes; then
16445 INST_LINGUAS="$INST_LINGUAS $presentlang"
16446 fi
16447 done
16448 fi
16449 CATALOGS=
16450 if test -n "$INST_LINGUAS"; then
16451 for lang in $INST_LINGUAS; do
16452 CATALOGS="$CATALOGS $lang.gmo"
16453 done
16454 fi
16455 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
16456 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
16457 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
16458 if test -f "$f"; then
16459 case "$f" in
16460 *.orig | *.bak | *~) ;;
16461 *) cat "$f" >> "$ac_dir/Makefile" ;;
16462 esac
16463 fi
16464 done
16465 fi
16466 ;;
16467 esac
16468 done ;;
60d6cfc9
YQ
16469 "gdbdepdir":C)
16470 for subdir in ${CONFIG_SRC_SUBDIR}
16471 do
16472 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
16473 done ;;
81ecdfbb 16474
bec39cab 16475 esac
81ecdfbb 16476done # for ac_tag
d6e9fb05 16477
bec39cab 16478
81ecdfbb 16479as_fn_exit 0
bec39cab 16480_ACEOF
bec39cab
AC
16481ac_clean_files=$ac_clean_files_save
16482
81ecdfbb 16483test $ac_write_fail = 0 ||
d0ac1c44 16484 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 16485
bec39cab
AC
16486
16487# configure is writing to config.log, and then calls config.status.
16488# config.status does its own redirection, appending to config.log.
16489# Unfortunately, on DOS this fails, as config.log is still kept open
16490# by configure, so config.status won't be able to write to it; its
16491# output is simply discarded. So we exec the FD to /dev/null,
16492# effectively closing config.log, so it can be properly (re)opened and
16493# appended to by config.status. When coming back to configure, we
16494# need to make the FD available again.
16495if test "$no_create" != yes; then
16496 ac_cs_success=:
16497 ac_config_status_args=
16498 test "$silent" = yes &&
16499 ac_config_status_args="$ac_config_status_args --quiet"
16500 exec 5>/dev/null
16501 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16502 exec 5>>config.log
16503 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16504 # would make configure fail if this is the last instruction.
d0ac1c44 16505 $ac_cs_success || as_fn_exit 1
81ecdfbb
RW
16506fi
16507if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16509$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
bec39cab 16510fi
d6e9fb05 16511