libctf: avoid nonportable __thread in CTF archive handling
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 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#
c906108c
SS
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'
50else
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
bec39cab 301
81ecdfbb
RW
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
418
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
b4e70030
JB
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
4e8d927d 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
b4e70030 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'
b4e70030 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
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
c906108c 559
bec39cab 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#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
1776e3e5
NA
634CTF_DEPS
635LIBCTF
636ENABLE_LIBCTF
393fd4c3
YQ
637LTLIBBABELTRACE
638LIBBABELTRACE
639HAVE_LIBBABELTRACE
21ea5acd
SDJ
640HAVE_NATIVE_GCORE_HOST
641NAT_GENERATED_FILES
642XM_CLIBS
643MH_CFLAGS
644LOADLIBES
645NAT_CDEPS
646NATDEPFILES
647NAT_FILE
81ecdfbb
RW
648target_subdir
649CONFIG_UNINSTALL
650CONFIG_INSTALL
651CONFIG_CLEAN
652CONFIG_ALL
653CONFIG_SRCS
654CONFIG_DEPS
655CONFIG_OBS
656PROFILE_CFLAGS
657ENABLE_CFLAGS
658SIM_OBS
659SIM
660XMKMF
661GDBTK_SRC_DIR
662GDBTK_CFLAGS
663GDBTKLIBS
664X_LIBS
665X_LDFLAGS
666X_CFLAGS
667TK_XINCLUDES
668TK_DEPS
669TK_LIBRARY
670TK_INCLUDE
671TK_STUB_LIB_SPEC
672TK_STUB_LIB_FLAG
673TK_STUB_LIB_FILE
674TK_LIB_SPEC
675TK_LIB_FLAG
676TK_LIB_FILE
677TK_SRC_DIR
678TK_BIN_DIR
679TK_VERSION
680TCL_DEPS
681TCL_LIBRARY
682TCL_INCLUDE
683TCL_STUB_LIB_SPEC
684TCL_STUB_LIB_FLAG
685TCL_STUB_LIB_FILE
686TCL_LIB_SPEC
687TCL_LIB_FLAG
688TCL_LIB_FILE
689TCL_SRC_DIR
690TCL_BIN_DIR
691TCL_PATCH_LEVEL
692TCL_VERSION
693WIN32LDAPP
b2ceabe8 694WIN32LIBS
81ecdfbb
RW
695GUI_CFLAGS_X
696LIBGUI
608e2dbb
TT
697LTLIBLZMA
698LIBLZMA
699HAVE_LIBLZMA
81ecdfbb
RW
700SER_HARDWIRE
701WERROR_CFLAGS
702WARN_CFLAGS
ed2a2229 703SYSTEM_GDBINIT_DIR
81ecdfbb 704SYSTEM_GDBINIT
81ecdfbb
RW
705TARGET_SYSTEM_ROOT
706CONFIG_LDFLAGS
f6528abd 707RDYNAMIC
05ea2a05
TT
708LTLIBIPT
709LIBIPT
710HAVE_LIBIPT
5e030278
TT
711PTHREAD_CFLAGS
712PTHREAD_LIBS
713PTHREAD_CC
714ax_pthread_config
715SED
81ecdfbb 716ALLOCA
62f29fda
TT
717SRCHIGH_CFLAGS
718SRCHIGH_LIBS
4df42755
DE
719HAVE_GUILE_FALSE
720HAVE_GUILE_TRUE
ed3ef339
DE
721GUILE_LIBS
722GUILE_CPPFLAGS
e76c5d17
DE
723GUILD_TARGET_FLAG
724GUILD
ed3ef339 725pkg_config_prog_path
4df42755
DE
726HAVE_PYTHON_FALSE
727HAVE_PYTHON_TRUE
ac534cba
JB
728PYTHON_LIBS
729PYTHON_CPPFLAGS
81ecdfbb 730PYTHON_CFLAGS
ec685c5e 731python_prog_path
2400729e
UW
732LTLIBMPFR
733LIBMPFR
734HAVE_LIBMPFR
81ecdfbb
RW
735LTLIBEXPAT
736LIBEXPAT
737HAVE_LIBEXPAT
b8e0a31c 738JIT_READER_DIR
f997c383 739TARGET_PTR
39037522 740READLINE_TEXI_INCFLAG
81ecdfbb
RW
741READLINE_CFLAGS
742READLINE_DEPS
743READLINE
016a3251
DD
744LTLIBICONV
745LIBICONV
711a72d3
L
746zlibinc
747zlibdir
81ecdfbb
RW
748MIG
749WINDRES
750DLLTOOL
c971b7fa 751AR
81ecdfbb
RW
752YFLAGS
753YACC
c971b7fa 754RANLIB
81ecdfbb 755LN_S
c971b7fa
PA
756INSTALL_DATA
757INSTALL_SCRIPT
758INSTALL_PROGRAM
759AWK
81ecdfbb
RW
760REPORT_BUGS_TEXI
761REPORT_BUGS_TO
762PKGVERSION
44cee4fd 763CODESIGN_CERT
0d79cdc4 764LIBDEBUGINFOD
b292c783 765HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
766TARGET_OBS
767subdirs
768GDB_DATADIR
769DEBUGDIR
5048e516
JK
770MAKEINFO_EXTRA_FLAGS
771MAKEINFOFLAGS
772MAKEINFO
81ecdfbb 773PACKAGE
81ecdfbb
RW
774CATOBJEXT
775GENCAT
776INSTOBJEXT
777DATADIRNAME
778CATALOGS
779POSUB
780GMSGFMT
781XGETTEXT
782INCINTL
783LIBINTL_DEP
784LIBINTL
785USE_NLS
81ecdfbb
RW
786CCDEPMODE
787DEPDIR
788am__leading_dot
0bcda685
PA
789CXX_DIALECT
790HAVE_CXX11
4869db5e
RM
791INSTALL_STRIP_PROGRAM
792STRIP
793install_sh
81ecdfbb
RW
794target_os
795target_vendor
796target_cpu
797target
798host_os
799host_vendor
800host_cpu
801host
802build_os
803build_vendor
804build_cpu
805build
c971b7fa
PA
806EGREP
807GREP
808CPP
3bc3d82a
PA
809ac_ct_CXX
810CXXFLAGS
811CXX
81ecdfbb
RW
812OBJEXT
813EXEEXT
814ac_ct_CC
815CPPFLAGS
816LDFLAGS
817CFLAGS
818CC
819MAINT
820MAINTAINER_MODE_FALSE
821MAINTAINER_MODE_TRUE
822target_alias
823host_alias
824build_alias
825LIBS
826ECHO_T
827ECHO_N
828ECHO_C
829DEFS
830mandir
831localedir
832libdir
833psdir
834pdfdir
835dvidir
836htmldir
837infodir
838docdir
839oldincludedir
840includedir
841localstatedir
842sharedstatedir
843sysconfdir
844datadir
845datarootdir
846libexecdir
847sbindir
848bindir
849program_transform_name
850prefix
851exec_prefix
852PACKAGE_URL
853PACKAGE_BUGREPORT
854PACKAGE_STRING
855PACKAGE_VERSION
856PACKAGE_TARNAME
857PACKAGE_NAME
858PATH_SEPARATOR
859SHELL'
2b351b19 860ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
861ac_user_opts='
862enable_option_checking
863enable_maintainer_mode
da2f07f1
JK
864enable_plugins
865enable_largefile
81ecdfbb
RW
866with_separate_debug_dir
867with_gdb_datadir
868with_relocated_sources
7349ff92 869with_auto_load_dir
bccbefd2 870with_auto_load_safe_path
81ecdfbb
RW
871enable_targets
872enable_64_bit_bfd
81ecdfbb
RW
873enable_gdbmi
874enable_tui
875enable_gdbtk
0d79cdc4 876with_debuginfod
05e7c244 877with_libunwind_ia64
81ecdfbb
RW
878with_curses
879enable_profiling
44cee4fd 880enable_codesign
81ecdfbb
RW
881with_pkgversion
882with_bugurl
711a72d3 883with_system_zlib
016a3251
DD
884with_gnu_ld
885enable_rpath
81ecdfbb 886with_libiconv_prefix
9f1528a1 887with_libiconv_type
478aac75 888with_iconv_bin
81ecdfbb 889with_system_readline
b8e0a31c 890with_jit_reader_dir
81ecdfbb 891with_expat
81ecdfbb 892with_libexpat_prefix
9f1528a1 893with_libexpat_type
2400729e
UW
894with_mpfr
895with_libmpfr_prefix
9f1528a1 896with_libmpfr_type
81ecdfbb 897with_python
d13c7322 898with_python_libdir
ed3ef339 899with_guile
189b8c2e 900enable_source_highlight
58bfce93
MM
901with_intel_pt
902with_libipt_prefix
9f1528a1 903with_libipt_type
81ecdfbb
RW
904with_included_regex
905with_sysroot
906with_system_gdbinit
ed2a2229 907with_system_gdbinit_dir
81ecdfbb
RW
908enable_werror
909enable_build_warnings
910enable_gdb_build_warnings
f35d5ade 911enable_ubsan
608e2dbb
TT
912with_lzma
913with_liblzma_prefix
9f1528a1 914with_liblzma_type
81ecdfbb
RW
915with_tcl
916with_tk
917with_x
918enable_sim
393fd4c3
YQ
919with_babeltrace
920with_libbabeltrace_prefix
9f1528a1 921with_libbabeltrace_type
ccb1ba62 922with_xxhash
1776e3e5 923enable_libctf
ccb1ba62 924with_libxxhash_prefix
9f1528a1 925with_libxxhash_type
8ecfd7bd 926enable_unit_tests
81ecdfbb
RW
927'
928 ac_precious_vars='build_alias
929host_alias
930target_alias
931CC
932CFLAGS
933LDFLAGS
934LIBS
935CPPFLAGS
3bc3d82a
PA
936CXX
937CXXFLAGS
938CCC
81ecdfbb 939CPP
f06e05e0
JK
940MAKEINFO
941MAKEINFOFLAGS
81ecdfbb
RW
942YACC
943YFLAGS
944XMKMF'
5ae98d25 945ac_subdirs_all='testsuite
919adfe8 946gdbtk'
c906108c
SS
947
948# Initialize some variables set by options.
bec39cab
AC
949ac_init_help=
950ac_init_version=false
81ecdfbb
RW
951ac_unrecognized_opts=
952ac_unrecognized_sep=
c906108c
SS
953# The variables have the same names as the options, with
954# dashes changed to underlines.
bec39cab 955cache_file=/dev/null
c906108c 956exec_prefix=NONE
c906108c 957no_create=
c906108c
SS
958no_recursion=
959prefix=NONE
960program_prefix=NONE
961program_suffix=NONE
962program_transform_name=s,x,x,
963silent=
964site=
965srcdir=
c906108c
SS
966verbose=
967x_includes=NONE
968x_libraries=NONE
bec39cab
AC
969
970# Installation directory options.
971# These are left unexpanded so users can "make install exec_prefix=/foo"
972# and all the variables that are supposed to be based on exec_prefix
973# by default will actually change.
974# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 975# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
976bindir='${exec_prefix}/bin'
977sbindir='${exec_prefix}/sbin'
978libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
979datarootdir='${prefix}/share'
980datadir='${datarootdir}'
c906108c
SS
981sysconfdir='${prefix}/etc'
982sharedstatedir='${prefix}/com'
983localstatedir='${prefix}/var'
c906108c
SS
984includedir='${prefix}/include'
985oldincludedir='/usr/include'
81ecdfbb
RW
986docdir='${datarootdir}/doc/${PACKAGE}'
987infodir='${datarootdir}/info'
988htmldir='${docdir}'
989dvidir='${docdir}'
990pdfdir='${docdir}'
991psdir='${docdir}'
992libdir='${exec_prefix}/lib'
993localedir='${datarootdir}/locale'
994mandir='${datarootdir}/man'
c906108c 995
c906108c 996ac_prev=
81ecdfbb 997ac_dashdash=
c906108c
SS
998for ac_option
999do
c906108c
SS
1000 # If the previous option needs an argument, assign it.
1001 if test -n "$ac_prev"; then
81ecdfbb 1002 eval $ac_prev=\$ac_option
c906108c
SS
1003 ac_prev=
1004 continue
1005 fi
1006
81ecdfbb 1007 case $ac_option in
d0ac1c44
SM
1008 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1009 *=) ac_optarg= ;;
1010 *) ac_optarg=yes ;;
81ecdfbb 1011 esac
c906108c
SS
1012
1013 # Accept the important Cygnus configure options, so we can diagnose typos.
1014
81ecdfbb
RW
1015 case $ac_dashdash$ac_option in
1016 --)
1017 ac_dashdash=yes ;;
c906108c
SS
1018
1019 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1020 ac_prev=bindir ;;
1021 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1022 bindir=$ac_optarg ;;
c906108c
SS
1023
1024 -build | --build | --buil | --bui | --bu)
bec39cab 1025 ac_prev=build_alias ;;
c906108c 1026 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1027 build_alias=$ac_optarg ;;
c906108c
SS
1028
1029 -cache-file | --cache-file | --cache-fil | --cache-fi \
1030 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1031 ac_prev=cache_file ;;
1032 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1033 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1034 cache_file=$ac_optarg ;;
1035
1036 --config-cache | -C)
1037 cache_file=config.cache ;;
c906108c 1038
81ecdfbb 1039 -datadir | --datadir | --datadi | --datad)
c906108c 1040 ac_prev=datadir ;;
81ecdfbb 1041 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1042 datadir=$ac_optarg ;;
c906108c 1043
81ecdfbb
RW
1044 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1045 | --dataroo | --dataro | --datar)
1046 ac_prev=datarootdir ;;
1047 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1048 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1049 datarootdir=$ac_optarg ;;
1050
c906108c 1051 -disable-* | --disable-*)
81ecdfbb 1052 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1053 # Reject names that are not valid shell variable names.
81ecdfbb 1054 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1055 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1056 ac_useropt_orig=$ac_useropt
1057 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1058 case $ac_user_opts in
1059 *"
1060"enable_$ac_useropt"
1061"*) ;;
1062 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1063 ac_unrecognized_sep=', ';;
1064 esac
1065 eval enable_$ac_useropt=no ;;
1066
1067 -docdir | --docdir | --docdi | --doc | --do)
1068 ac_prev=docdir ;;
1069 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1070 docdir=$ac_optarg ;;
1071
1072 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1073 ac_prev=dvidir ;;
1074 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1075 dvidir=$ac_optarg ;;
c906108c
SS
1076
1077 -enable-* | --enable-*)
81ecdfbb 1078 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1079 # Reject names that are not valid shell variable names.
81ecdfbb 1080 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1081 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1082 ac_useropt_orig=$ac_useropt
1083 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1084 case $ac_user_opts in
1085 *"
1086"enable_$ac_useropt"
1087"*) ;;
1088 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1089 ac_unrecognized_sep=', ';;
b4e70030 1090 esac
81ecdfbb 1091 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1092
1093 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1094 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1095 | --exec | --exe | --ex)
1096 ac_prev=exec_prefix ;;
1097 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1098 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1099 | --exec=* | --exe=* | --ex=*)
bec39cab 1100 exec_prefix=$ac_optarg ;;
c906108c
SS
1101
1102 -gas | --gas | --ga | --g)
1103 # Obsolete; use --with-gas.
1104 with_gas=yes ;;
1105
bec39cab
AC
1106 -help | --help | --hel | --he | -h)
1107 ac_init_help=long ;;
1108 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1109 ac_init_help=recursive ;;
1110 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1111 ac_init_help=short ;;
c906108c
SS
1112
1113 -host | --host | --hos | --ho)
bec39cab 1114 ac_prev=host_alias ;;
c906108c 1115 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1116 host_alias=$ac_optarg ;;
c906108c 1117
81ecdfbb
RW
1118 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1119 ac_prev=htmldir ;;
1120 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1121 | --ht=*)
1122 htmldir=$ac_optarg ;;
1123
c906108c
SS
1124 -includedir | --includedir | --includedi | --included | --include \
1125 | --includ | --inclu | --incl | --inc)
1126 ac_prev=includedir ;;
1127 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1128 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1129 includedir=$ac_optarg ;;
c906108c
SS
1130
1131 -infodir | --infodir | --infodi | --infod | --info | --inf)
1132 ac_prev=infodir ;;
1133 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1134 infodir=$ac_optarg ;;
c906108c
SS
1135
1136 -libdir | --libdir | --libdi | --libd)
1137 ac_prev=libdir ;;
1138 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1139 libdir=$ac_optarg ;;
c906108c
SS
1140
1141 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1142 | --libexe | --libex | --libe)
1143 ac_prev=libexecdir ;;
1144 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1145 | --libexe=* | --libex=* | --libe=*)
bec39cab 1146 libexecdir=$ac_optarg ;;
c906108c 1147
81ecdfbb
RW
1148 -localedir | --localedir | --localedi | --localed | --locale)
1149 ac_prev=localedir ;;
1150 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1151 localedir=$ac_optarg ;;
1152
c906108c 1153 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1154 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1155 ac_prev=localstatedir ;;
1156 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1157 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1158 localstatedir=$ac_optarg ;;
c906108c
SS
1159
1160 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1161 ac_prev=mandir ;;
1162 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1163 mandir=$ac_optarg ;;
c906108c
SS
1164
1165 -nfp | --nfp | --nf)
1166 # Obsolete; use --without-fp.
1167 with_fp=no ;;
1168
1169 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1170 | --no-cr | --no-c | -n)
c906108c
SS
1171 no_create=yes ;;
1172
1173 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1174 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1175 no_recursion=yes ;;
1176
1177 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1178 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1179 | --oldin | --oldi | --old | --ol | --o)
1180 ac_prev=oldincludedir ;;
1181 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1182 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1183 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1184 oldincludedir=$ac_optarg ;;
c906108c
SS
1185
1186 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1187 ac_prev=prefix ;;
1188 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1189 prefix=$ac_optarg ;;
c906108c
SS
1190
1191 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1192 | --program-pre | --program-pr | --program-p)
1193 ac_prev=program_prefix ;;
1194 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1195 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1196 program_prefix=$ac_optarg ;;
c906108c
SS
1197
1198 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1199 | --program-suf | --program-su | --program-s)
1200 ac_prev=program_suffix ;;
1201 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1202 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1203 program_suffix=$ac_optarg ;;
c906108c
SS
1204
1205 -program-transform-name | --program-transform-name \
1206 | --program-transform-nam | --program-transform-na \
1207 | --program-transform-n | --program-transform- \
1208 | --program-transform | --program-transfor \
1209 | --program-transfo | --program-transf \
1210 | --program-trans | --program-tran \
1211 | --progr-tra | --program-tr | --program-t)
1212 ac_prev=program_transform_name ;;
1213 -program-transform-name=* | --program-transform-name=* \
1214 | --program-transform-nam=* | --program-transform-na=* \
1215 | --program-transform-n=* | --program-transform-=* \
1216 | --program-transform=* | --program-transfor=* \
1217 | --program-transfo=* | --program-transf=* \
1218 | --program-trans=* | --program-tran=* \
1219 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1220 program_transform_name=$ac_optarg ;;
c906108c 1221
81ecdfbb
RW
1222 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1223 ac_prev=pdfdir ;;
1224 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1225 pdfdir=$ac_optarg ;;
1226
1227 -psdir | --psdir | --psdi | --psd | --ps)
1228 ac_prev=psdir ;;
1229 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1230 psdir=$ac_optarg ;;
1231
c906108c
SS
1232 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1233 | -silent | --silent | --silen | --sile | --sil)
1234 silent=yes ;;
1235
1236 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1237 ac_prev=sbindir ;;
1238 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1239 | --sbi=* | --sb=*)
bec39cab 1240 sbindir=$ac_optarg ;;
c906108c
SS
1241
1242 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1243 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1244 | --sharedst | --shareds | --shared | --share | --shar \
1245 | --sha | --sh)
1246 ac_prev=sharedstatedir ;;
1247 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1248 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1249 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1250 | --sha=* | --sh=*)
bec39cab 1251 sharedstatedir=$ac_optarg ;;
c906108c
SS
1252
1253 -site | --site | --sit)
1254 ac_prev=site ;;
1255 -site=* | --site=* | --sit=*)
bec39cab 1256 site=$ac_optarg ;;
3ace7edb 1257
c906108c
SS
1258 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1259 ac_prev=srcdir ;;
1260 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1261 srcdir=$ac_optarg ;;
c906108c
SS
1262
1263 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1264 | --syscon | --sysco | --sysc | --sys | --sy)
1265 ac_prev=sysconfdir ;;
1266 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1267 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1268 sysconfdir=$ac_optarg ;;
c906108c
SS
1269
1270 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1271 ac_prev=target_alias ;;
c906108c 1272 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1273 target_alias=$ac_optarg ;;
c906108c
SS
1274
1275 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1276 verbose=yes ;;
1277
bec39cab
AC
1278 -version | --version | --versio | --versi | --vers | -V)
1279 ac_init_version=: ;;
c906108c
SS
1280
1281 -with-* | --with-*)
81ecdfbb 1282 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1283 # Reject names that are not valid shell variable names.
81ecdfbb 1284 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1285 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1286 ac_useropt_orig=$ac_useropt
1287 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1288 case $ac_user_opts in
1289 *"
1290"with_$ac_useropt"
1291"*) ;;
1292 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1293 ac_unrecognized_sep=', ';;
b4e70030 1294 esac
81ecdfbb 1295 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1296
1297 -without-* | --without-*)
81ecdfbb 1298 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1299 # Reject names that are not valid shell variable names.
81ecdfbb 1300 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1301 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1302 ac_useropt_orig=$ac_useropt
1303 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1304 case $ac_user_opts in
1305 *"
1306"with_$ac_useropt"
1307"*) ;;
1308 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1309 ac_unrecognized_sep=', ';;
1310 esac
1311 eval with_$ac_useropt=no ;;
c906108c
SS
1312
1313 --x)
1314 # Obsolete; use --with-x.
1315 with_x=yes ;;
1316
1317 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1318 | --x-incl | --x-inc | --x-in | --x-i)
1319 ac_prev=x_includes ;;
1320 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1321 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1322 x_includes=$ac_optarg ;;
c906108c
SS
1323
1324 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1325 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1326 ac_prev=x_libraries ;;
1327 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1328 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1329 x_libraries=$ac_optarg ;;
c906108c 1330
d0ac1c44
SM
1331 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1332Try \`$0 --help' for more information"
c906108c
SS
1333 ;;
1334
bec39cab
AC
1335 *=*)
1336 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1337 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1338 case $ac_envvar in #(
1339 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1340 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1341 esac
1342 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1343 export $ac_envvar ;;
1344
c906108c 1345 *)
bec39cab 1346 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1347 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1348 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1349 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1350 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1351 ;;
1352
1353 esac
1354done
1355
1356if test -n "$ac_prev"; then
bec39cab 1357 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1358 as_fn_error $? "missing argument to $ac_option"
c906108c 1359fi
c906108c 1360
81ecdfbb
RW
1361if test -n "$ac_unrecognized_opts"; then
1362 case $enable_option_checking in
1363 no) ;;
d0ac1c44 1364 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1365 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1366 esac
81ecdfbb 1367fi
b4e70030 1368
81ecdfbb
RW
1369# Check all directory arguments for consistency.
1370for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1371 datadir sysconfdir sharedstatedir localstatedir includedir \
1372 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1373 libdir localedir mandir
b4e70030 1374do
81ecdfbb
RW
1375 eval ac_val=\$$ac_var
1376 # Remove trailing slashes.
1377 case $ac_val in
1378 */ )
1379 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1380 eval $ac_var=\$ac_val;;
1381 esac
1382 # Be sure to have absolute directory names.
b4e70030 1383 case $ac_val in
81ecdfbb
RW
1384 [\\/$]* | ?:[\\/]* ) continue;;
1385 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1386 esac
d0ac1c44 1387 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1388done
1389
bec39cab
AC
1390# There might be people who depend on the old broken behavior: `$host'
1391# used to hold the argument of --host etc.
1392# FIXME: To remove some day.
1393build=$build_alias
1394host=$host_alias
1395target=$target_alias
1396
1397# FIXME: To remove some day.
1398if test "x$host_alias" != x; then
1399 if test "x$build_alias" = x; then
1400 cross_compiling=maybe
bec39cab
AC
1401 elif test "x$build_alias" != "x$host_alias"; then
1402 cross_compiling=yes
1403 fi
1404fi
c906108c 1405
bec39cab
AC
1406ac_tool_prefix=
1407test -n "$host_alias" && ac_tool_prefix=$host_alias-
1408
1409test "$silent" = yes && exec 6>/dev/null
c906108c 1410
c906108c 1411
81ecdfbb
RW
1412ac_pwd=`pwd` && test -n "$ac_pwd" &&
1413ac_ls_di=`ls -di .` &&
1414ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1415 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1416test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1417 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1418
1419
c906108c
SS
1420# Find the source files, if location was not specified.
1421if test -z "$srcdir"; then
1422 ac_srcdir_defaulted=yes
81ecdfbb
RW
1423 # Try the directory containing this script, then the parent directory.
1424 ac_confdir=`$as_dirname -- "$as_myself" ||
1425$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1426 X"$as_myself" : 'X\(//\)[^/]' \| \
1427 X"$as_myself" : 'X\(//\)$' \| \
1428 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1429$as_echo X"$as_myself" |
1430 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1431 s//\1/
1432 q
1433 }
1434 /^X\(\/\/\)[^/].*/{
1435 s//\1/
1436 q
1437 }
1438 /^X\(\/\/\)$/{
1439 s//\1/
1440 q
1441 }
1442 /^X\(\/\).*/{
1443 s//\1/
1444 q
1445 }
1446 s/.*/./; q'`
c906108c 1447 srcdir=$ac_confdir
81ecdfbb 1448 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1449 srcdir=..
1450 fi
1451else
1452 ac_srcdir_defaulted=no
1453fi
81ecdfbb
RW
1454if test ! -r "$srcdir/$ac_unique_file"; then
1455 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1456 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1457fi
1458ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1459ac_abs_confdir=`(
d0ac1c44 1460 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1461 pwd)`
1462# When building in place, set srcdir=.
1463if test "$ac_abs_confdir" = "$ac_pwd"; then
1464 srcdir=.
1465fi
1466# Remove unnecessary trailing slashes from srcdir.
1467# Double slashes in file names in object file debugging info
1468# mess up M-x gdb in Emacs.
1469case $srcdir in
1470*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1471esac
1472for ac_var in $ac_precious_vars; do
1473 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1474 eval ac_env_${ac_var}_value=\$${ac_var}
1475 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1476 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1477done
c906108c 1478
bec39cab
AC
1479#
1480# Report the --help message.
1481#
1482if test "$ac_init_help" = "long"; then
1483 # Omit some internal or obsolete options to make the list less imposing.
1484 # This message is too long to be a string in the A/UX 3.1 sh.
1485 cat <<_ACEOF
1486\`configure' configures this package to adapt to many kinds of systems.
1487
1488Usage: $0 [OPTION]... [VAR=VALUE]...
1489
1490To assign environment variables (e.g., CC, CFLAGS...), specify them as
1491VAR=VALUE. See below for descriptions of some of the useful variables.
1492
1493Defaults for the options are specified in brackets.
1494
1495Configuration:
1496 -h, --help display this help and exit
1497 --help=short display options specific to this package
1498 --help=recursive display the short help of all the included packages
1499 -V, --version display version information and exit
d0ac1c44 1500 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1501 --cache-file=FILE cache test results in FILE [disabled]
1502 -C, --config-cache alias for \`--cache-file=config.cache'
1503 -n, --no-create do not create output files
1504 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1505
bec39cab
AC
1506Installation directories:
1507 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1508 [$ac_default_prefix]
bec39cab 1509 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1510 [PREFIX]
bec39cab
AC
1511
1512By default, \`make install' will install all the files in
1513\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1514an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1515for instance \`--prefix=\$HOME'.
1516
1517For better control, use the options below.
1518
1519Fine tuning of the installation directories:
81ecdfbb
RW
1520 --bindir=DIR user executables [EPREFIX/bin]
1521 --sbindir=DIR system admin executables [EPREFIX/sbin]
1522 --libexecdir=DIR program executables [EPREFIX/libexec]
1523 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1524 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1525 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1526 --libdir=DIR object code libraries [EPREFIX/lib]
1527 --includedir=DIR C header files [PREFIX/include]
1528 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1529 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1530 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1531 --infodir=DIR info documentation [DATAROOTDIR/info]
1532 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1533 --mandir=DIR man documentation [DATAROOTDIR/man]
1534 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1535 --htmldir=DIR html documentation [DOCDIR]
1536 --dvidir=DIR dvi documentation [DOCDIR]
1537 --pdfdir=DIR pdf documentation [DOCDIR]
1538 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1539_ACEOF
1540
1541 cat <<\_ACEOF
1542
9009e1ae
MR
1543Program names:
1544 --program-prefix=PREFIX prepend PREFIX to installed program names
1545 --program-suffix=SUFFIX append SUFFIX to installed program names
1546 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1547
bec39cab
AC
1548X features:
1549 --x-includes=DIR X include files are in DIR
1550 --x-libraries=DIR X library files are in DIR
1551
1552System types:
1553 --build=BUILD configure for building on BUILD [guessed]
1554 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1555 --target=TARGET configure for building compilers for TARGET [HOST]
1556_ACEOF
1557fi
1558
1559if test -n "$ac_init_help"; then
1560
1561 cat <<\_ACEOF
1562
1563Optional Features:
81ecdfbb 1564 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1565 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1566 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1567 --enable-maintainer-mode
1568 enable make rules and dependencies not useful (and
1569 sometimes confusing) to the casual installer
2974be62 1570 --enable-plugins Enable support for plugins
da2f07f1 1571 --disable-largefile omit support for large files
a1220294
TT
1572 --enable-targets=TARGETS
1573 alternative target configurations
c0993dbe 1574 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1575 --disable-gdbmi disable machine-interface (MI)
1576 --enable-tui enable full-screen terminal user interface (TUI)
1577 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1578 --enable-profiling enable profiling of GDB
44cee4fd 1579 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1580 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1581 --enable-source-highlight
1582 enable source-highlight for source listings
a1220294 1583 --enable-werror treat compile warnings as errors
32c1c914 1584 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1585 --enable-gdb-build-warnings
32c1c914 1586 enable GDB specific build-time compiler warnings if
a1220294 1587 gcc is used
f35d5ade 1588 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1589 --enable-sim link gdb with simulator
1776e3e5 1590 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1591 --enable-unit-tests Enable the inclusion of unit tests when compiling
1592 GDB
bec39cab
AC
1593
1594Optional Packages:
1595 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1596 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1597 --with-separate-debug-dir=PATH
32c1c914 1598 look for global separate debug info in this path
62e4f60c 1599 [LIBDIR/debug]
b14b1491
TT
1600 --with-gdb-datadir=PATH look for global separate data files in this path
1601 [DATADIR/gdb]
29b0e8a2 1602 --with-relocated-sources=PATH
32c1c914 1603 automatically relocate this path for source files
7349ff92 1604 --with-auto-load-dir=PATH
aff139ff 1605 directories from which to load auto-loaded scripts
1564a261 1606 [$debugdir:$datadir/auto-load]
bccbefd2 1607 --with-auto-load-safe-path=PATH
aff139ff 1608 directories safe to hold auto-loaded files
7349ff92 1609 [--with-auto-load-dir]
bccbefd2
JK
1610 --without-auto-load-safe-path
1611 do not restrict auto-loaded files locations
0d79cdc4
AM
1612 --with-debuginfod Enable debuginfo lookups with debuginfod
1613 (auto/yes/no)
05e7c244 1614 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1615 --with-curses use the curses library instead of the termcap
1616 library
c16158bc
JM
1617 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1618 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1619 --with-system-zlib use installed libz
016a3251
DD
1620 --with-gnu-ld assume the C compiler uses GNU ld default=no
1621 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1622 --without-libiconv-prefix don't search for libiconv in includedir and libdir
9f1528a1 1623 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
478aac75 1624 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1625 --with-system-readline use installed readline library
b8e0a31c
SD
1626 --with-jit-reader-dir=PATH
1627 directory to load the JIT readers from
5c39566f 1628 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1629 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1630 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1631 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
2400729e
UW
1632 --with-mpfr include MPFR support (auto/yes/no)
1633 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1634 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
9f1528a1 1635 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1636 --with-python[=PYTHON] include python support
1637 (auto/yes/no/<python-program>)
d13c7322
AB
1638 --with-python-libdir[=DIR]
1639 search for python's libraries in DIR
ed3ef339
DE
1640 --with-guile[=GUILE] include guile support
1641 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1642 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1643 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1644 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1645 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
a1220294
TT
1646 --without-included-regex
1647 don't use included regex; this is the default on
1648 systems with version 2 of the GNU C library (use
1649 with caution on other system)
81ecdfbb 1650 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1651 --with-system-gdbinit=PATH
32c1c914 1652 automatically load a system-wide gdbinit file
ed2a2229
CB
1653 --with-system-gdbinit-dir=PATH
1654 automatically load system-wide gdbinit files from
1655 this directory
608e2dbb
TT
1656 --with-lzma support lzma compression (auto/yes/no)
1657 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1658 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1659 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1660 --with-tcl directory containing tcl configuration (tclConfig.sh)
1661 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1662 --with-x use the X Window System
393fd4c3
YQ
1663 --with-babeltrace include babeltrace support (auto/yes/no)
1664 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1665 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1666 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
ccb1ba62
CB
1667 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1668 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1669 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
9f1528a1 1670 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1671
1672Some influential environment variables:
1673 CC C compiler command
1674 CFLAGS C compiler flags
1675 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1676 nonstandard directory <lib dir>
81ecdfbb 1677 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1678 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1679 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1680 CXX C++ compiler command
1681 CXXFLAGS C++ compiler flags
bec39cab 1682 CPP C preprocessor
f06e05e0
JK
1683 MAKEINFO Parent configure detects if it is of sufficient version.
1684 MAKEINFOFLAGS
1685 Parameters for MAKEINFO.
d0ac1c44
SM
1686 YACC The `Yet Another Compiler Compiler' implementation to use.
1687 Defaults to the first program found out of: `bison -y', `byacc',
1688 `yacc'.
81ecdfbb
RW
1689 YFLAGS The list of arguments that will be passed by default to $YACC.
1690 This script will default YFLAGS to the empty string to avoid a
1691 default value of `-d' given by some make applications.
1692 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1693
1694Use these variables to override the choices made by `configure' or to help
1695it to find libraries and programs with nonstandard names/locations.
1696
81ecdfbb 1697Report bugs to the package provider.
bec39cab 1698_ACEOF
81ecdfbb 1699ac_status=$?
bec39cab
AC
1700fi
1701
1702if test "$ac_init_help" = "recursive"; then
1703 # If there are subdirs, report their specific --help.
bec39cab 1704 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1705 test -d "$ac_dir" ||
1706 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1707 continue
bec39cab
AC
1708 ac_builddir=.
1709
81ecdfbb
RW
1710case "$ac_dir" in
1711.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1712*)
1713 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1714 # A ".." for each directory in $ac_dir_suffix.
1715 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1716 case $ac_top_builddir_sub in
1717 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1718 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1719 esac ;;
1720esac
1721ac_abs_top_builddir=$ac_pwd
1722ac_abs_builddir=$ac_pwd$ac_dir_suffix
1723# for backward compatibility:
1724ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1725
1726case $srcdir in
81ecdfbb 1727 .) # We are building in place.
bec39cab 1728 ac_srcdir=.
81ecdfbb
RW
1729 ac_top_srcdir=$ac_top_builddir_sub
1730 ac_abs_top_srcdir=$ac_pwd ;;
1731 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1732 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1733 ac_top_srcdir=$srcdir
1734 ac_abs_top_srcdir=$srcdir ;;
1735 *) # Relative name.
1736 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1737 ac_top_srcdir=$ac_top_build_prefix$srcdir
1738 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1739esac
81ecdfbb 1740ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1741
81ecdfbb
RW
1742 cd "$ac_dir" || { ac_status=$?; continue; }
1743 # Check for guested configure.
1744 if test -f "$ac_srcdir/configure.gnu"; then
1745 echo &&
1746 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1747 elif test -f "$ac_srcdir/configure"; then
1748 echo &&
1749 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1750 else
81ecdfbb
RW
1751 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1752 fi || ac_status=$?
1753 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1754 done
1755fi
1756
81ecdfbb 1757test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1758if $ac_init_version; then
1759 cat <<\_ACEOF
81ecdfbb 1760configure
d0ac1c44 1761generated by GNU Autoconf 2.69
bec39cab 1762
d0ac1c44 1763Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1764This configure script is free software; the Free Software Foundation
1765gives unlimited permission to copy, distribute and modify it.
1766_ACEOF
81ecdfbb 1767 exit
bec39cab 1768fi
bec39cab 1769
81ecdfbb
RW
1770## ------------------------ ##
1771## Autoconf initialization. ##
1772## ------------------------ ##
bec39cab 1773
81ecdfbb
RW
1774# ac_fn_c_try_compile LINENO
1775# --------------------------
1776# Try to compile conftest.$ac_ext, and return whether this succeeded.
1777ac_fn_c_try_compile ()
1778{
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext
1781 if { { ac_try="$ac_compile"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_compile") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1794 fi
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest.$ac_objext; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: failed program was:" >&5
1803sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1804
81ecdfbb
RW
1805 ac_retval=1
1806fi
d0ac1c44
SM
1807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1808 as_fn_set_status $ac_retval
81ecdfbb
RW
1809
1810} # ac_fn_c_try_compile
1811
3bc3d82a
PA
1812# ac_fn_cxx_try_compile LINENO
1813# ----------------------------
1814# Try to compile conftest.$ac_ext, and return whether this succeeded.
1815ac_fn_cxx_try_compile ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 rm -f conftest.$ac_objext
1819 if { { ac_try="$ac_compile"
1820case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823esac
1824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1825$as_echo "$ac_try_echo"; } >&5
1826 (eval "$ac_compile") 2>conftest.err
1827 ac_status=$?
1828 if test -s conftest.err; then
1829 grep -v '^ *+' conftest.err >conftest.er1
1830 cat conftest.er1 >&5
1831 mv -f conftest.er1 conftest.err
1832 fi
1833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1834 test $ac_status = 0; } && {
1835 test -z "$ac_cxx_werror_flag" ||
1836 test ! -s conftest.err
1837 } && test -s conftest.$ac_objext; then :
1838 ac_retval=0
1839else
1840 $as_echo "$as_me: failed program was:" >&5
1841sed 's/^/| /' conftest.$ac_ext >&5
1842
1843 ac_retval=1
1844fi
d0ac1c44
SM
1845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1846 as_fn_set_status $ac_retval
3bc3d82a
PA
1847
1848} # ac_fn_cxx_try_compile
1849
81ecdfbb
RW
1850# ac_fn_c_try_cpp LINENO
1851# ----------------------
1852# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1853ac_fn_c_try_cpp ()
bec39cab 1854{
81ecdfbb
RW
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_cpp conftest.$ac_ext"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1864 ac_status=$?
1865 if test -s conftest.err; then
1866 grep -v '^ *+' conftest.err >conftest.er1
1867 cat conftest.er1 >&5
1868 mv -f conftest.er1 conftest.err
1869 fi
1870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1871 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1872 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1873 test ! -s conftest.err
1874 }; then :
1875 ac_retval=0
1876else
1877 $as_echo "$as_me: failed program was:" >&5
1878sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1879
81ecdfbb
RW
1880 ac_retval=1
1881fi
d0ac1c44
SM
1882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883 as_fn_set_status $ac_retval
bec39cab 1884
81ecdfbb 1885} # ac_fn_c_try_cpp
bec39cab 1886
81ecdfbb
RW
1887# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1888# -------------------------------------------------------
1889# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1890# the include files in INCLUDES and setting the cache variable VAR
1891# accordingly.
1892ac_fn_c_check_header_mongrel ()
1893{
1894 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1895 if eval \${$3+:} false; then :
81ecdfbb
RW
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1897$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1898if eval \${$3+:} false; then :
81ecdfbb
RW
1899 $as_echo_n "(cached) " >&6
1900fi
1901eval ac_res=\$$3
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1903$as_echo "$ac_res" >&6; }
1904else
1905 # Is the header compilable?
1906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1907$as_echo_n "checking $2 usability... " >&6; }
1908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910$4
1911#include <$2>
1912_ACEOF
1913if ac_fn_c_try_compile "$LINENO"; then :
1914 ac_header_compiler=yes
1915else
1916 ac_header_compiler=no
1917fi
1918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1920$as_echo "$ac_header_compiler" >&6; }
bec39cab 1921
81ecdfbb
RW
1922# Is the header present?
1923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1924$as_echo_n "checking $2 presence... " >&6; }
1925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927#include <$2>
1928_ACEOF
1929if ac_fn_c_try_cpp "$LINENO"; then :
1930 ac_header_preproc=yes
1931else
1932 ac_header_preproc=no
1933fi
d0ac1c44 1934rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1936$as_echo "$ac_header_preproc" >&6; }
bec39cab 1937
81ecdfbb
RW
1938# So? What about this header?
1939case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1940 yes:no: )
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1942$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1944$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1945 ;;
1946 no:yes:* )
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1948$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1950$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1952$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1954$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1956$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1957 ;;
1958esac
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1960$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1961if eval \${$3+:} false; then :
81ecdfbb
RW
1962 $as_echo_n "(cached) " >&6
1963else
1964 eval "$3=\$ac_header_compiler"
1965fi
1966eval ac_res=\$$3
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968$as_echo "$ac_res" >&6; }
1969fi
d0ac1c44 1970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1971
81ecdfbb 1972} # ac_fn_c_check_header_mongrel
bec39cab 1973
81ecdfbb
RW
1974# ac_fn_c_try_run LINENO
1975# ----------------------
1976# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1977# that executables *can* be run.
1978ac_fn_c_try_run ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 if { { ac_try="$ac_link"
1982case "(($ac_try" in
1983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1984 *) ac_try_echo=$ac_try;;
1985esac
1986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1987$as_echo "$ac_try_echo"; } >&5
1988 (eval "$ac_link") 2>&5
1989 ac_status=$?
1990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1991 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1992 { { case "(($ac_try" in
1993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1994 *) ac_try_echo=$ac_try;;
1995esac
1996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1997$as_echo "$ac_try_echo"; } >&5
1998 (eval "$ac_try") 2>&5
1999 ac_status=$?
2000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2001 test $ac_status = 0; }; }; then :
2002 ac_retval=0
2003else
2004 $as_echo "$as_me: program exited with status $ac_status" >&5
2005 $as_echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2007
81ecdfbb
RW
2008 ac_retval=$ac_status
2009fi
2010 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012 as_fn_set_status $ac_retval
bec39cab 2013
81ecdfbb 2014} # ac_fn_c_try_run
bec39cab 2015
81ecdfbb
RW
2016# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2017# -------------------------------------------------------
2018# Tests whether HEADER exists and can be compiled using the include files in
2019# INCLUDES, setting the cache variable VAR accordingly.
2020ac_fn_c_check_header_compile ()
2021{
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2024$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2025if eval \${$3+:} false; then :
81ecdfbb
RW
2026 $as_echo_n "(cached) " >&6
2027else
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031#include <$2>
bec39cab 2032_ACEOF
81ecdfbb
RW
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 eval "$3=yes"
2035else
2036 eval "$3=no"
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039fi
2040eval ac_res=\$$3
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042$as_echo "$ac_res" >&6; }
d0ac1c44 2043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2044
81ecdfbb 2045} # ac_fn_c_check_header_compile
bec39cab 2046
2974be62
AM
2047# ac_fn_c_try_link LINENO
2048# -----------------------
2049# Try to link conftest.$ac_ext, and return whether this succeeded.
2050ac_fn_c_try_link ()
2051{
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 rm -f conftest.$ac_objext conftest$ac_exeext
2054 if { { ac_try="$ac_link"
2055case "(($ac_try" in
2056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2057 *) ac_try_echo=$ac_try;;
2058esac
2059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2060$as_echo "$ac_try_echo"; } >&5
2061 (eval "$ac_link") 2>conftest.err
2062 ac_status=$?
2063 if test -s conftest.err; then
2064 grep -v '^ *+' conftest.err >conftest.er1
2065 cat conftest.er1 >&5
2066 mv -f conftest.er1 conftest.err
2067 fi
2068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2069 test $ac_status = 0; } && {
2070 test -z "$ac_c_werror_flag" ||
2071 test ! -s conftest.err
2072 } && test -s conftest$ac_exeext && {
2073 test "$cross_compiling" = yes ||
d0ac1c44 2074 test -x conftest$ac_exeext
2974be62
AM
2075 }; then :
2076 ac_retval=0
2077else
2078 $as_echo "$as_me: failed program was:" >&5
2079sed 's/^/| /' conftest.$ac_ext >&5
2080
2081 ac_retval=1
2082fi
2083 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2084 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2085 # interfere with the next link command; also delete a directory that is
2086 # left behind by Apple's compiler. We do this before executing the actions.
2087 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2088 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2089 as_fn_set_status $ac_retval
2974be62
AM
2090
2091} # ac_fn_c_try_link
2092
81ecdfbb
RW
2093# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2094# --------------------------------------------
2095# Tries to find the compile-time value of EXPR in a program that includes
2096# INCLUDES, setting VAR accordingly. Returns whether the value could be
2097# computed
2098ac_fn_c_compute_int ()
2099{
2100 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2101 if test "$cross_compiling" = yes; then
2102 # Depending upon the size, compute the lo and hi bounds.
2103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2110test_array [0] = 0;
2111return test_array [0];
bec39cab 2112
81ecdfbb
RW
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_lo=0 ac_mid=0
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2127test_array [0] = 0;
2128return test_array [0];
bec39cab 2129
81ecdfbb
RW
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_hi=$ac_mid; break
2136else
2137 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2138 if test $ac_lo -le $ac_mid; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2143fi
81ecdfbb
RW
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
c906108c 2146else
81ecdfbb
RW
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2154test_array [0] = 0;
2155return test_array [0];
bec39cab 2156
81ecdfbb
RW
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=-1 ac_mid=-1
2163 while :; do
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167int
2168main ()
2169{
2170static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2171test_array [0] = 0;
2172return test_array [0];
bec39cab 2173
81ecdfbb
RW
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_compile "$LINENO"; then :
2179 ac_lo=$ac_mid; break
2180else
2181 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2182 if test $ac_mid -le $ac_hi; then
2183 ac_lo= ac_hi=
2184 break
2185 fi
2186 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2187fi
2188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189 done
2190else
2191 ac_lo= ac_hi=
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196# Binary search between lo and hi bounds.
2197while test "x$ac_lo" != "x$ac_hi"; do
2198 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h. */
2201$4
2202int
2203main ()
2204{
2205static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2206test_array [0] = 0;
2207return test_array [0];
bec39cab 2208
81ecdfbb
RW
2209 ;
2210 return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_compile "$LINENO"; then :
2214 ac_hi=$ac_mid
2215else
2216 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2217fi
2218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219done
2220case $ac_lo in #((
2221?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2222'') ac_retval=1 ;;
2223esac
2224 else
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226/* end confdefs.h. */
2227$4
2228static long int longval () { return $2; }
2229static unsigned long int ulongval () { return $2; }
2230#include <stdio.h>
2231#include <stdlib.h>
2232int
2233main ()
2234{
bec39cab 2235
81ecdfbb
RW
2236 FILE *f = fopen ("conftest.val", "w");
2237 if (! f)
2238 return 1;
2239 if (($2) < 0)
2240 {
2241 long int i = longval ();
2242 if (i != ($2))
2243 return 1;
2244 fprintf (f, "%ld", i);
2245 }
2246 else
2247 {
2248 unsigned long int i = ulongval ();
2249 if (i != ($2))
2250 return 1;
2251 fprintf (f, "%lu", i);
2252 }
2253 /* Do not output a trailing newline, as this causes \r\n confusion
2254 on some platforms. */
2255 return ferror (f) || fclose (f) != 0;
bec39cab 2256
81ecdfbb
RW
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_run "$LINENO"; then :
2262 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2263else
2264 ac_retval=1
2265fi
2266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2267 conftest.$ac_objext conftest.beam conftest.$ac_ext
2268rm -f conftest.val
bec39cab 2269
81ecdfbb 2270 fi
d0ac1c44
SM
2271 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2272 as_fn_set_status $ac_retval
bec39cab 2273
81ecdfbb 2274} # ac_fn_c_compute_int
bec39cab 2275
0d79cdc4
AM
2276# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2277# ---------------------------------------------
2278# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2279# accordingly.
2280ac_fn_c_check_decl ()
2281{
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 as_decl_name=`echo $2|sed 's/ *(.*//'`
2284 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2286$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2287if eval \${$3+:} false; then :
2288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$4
2293int
2294main ()
2295{
2296#ifndef $as_decl_name
2297#ifdef __cplusplus
2298 (void) $as_decl_use;
2299#else
2300 (void) $as_decl_name;
2301#endif
2302#endif
2303
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$3=yes"
2310else
2311 eval "$3=no"
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314fi
2315eval ac_res=\$$3
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2317$as_echo "$ac_res" >&6; }
2318 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2319
2320} # ac_fn_c_check_decl
2321
55a8c076
YQ
2322# ac_fn_c_check_func LINENO FUNC VAR
2323# ----------------------------------
2324# Tests whether FUNC exists, setting the cache variable VAR accordingly
2325ac_fn_c_check_func ()
81ecdfbb
RW
2326{
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2329$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2330if eval \${$3+:} false; then :
81ecdfbb
RW
2331 $as_echo_n "(cached) " >&6
2332else
81ecdfbb
RW
2333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334/* end confdefs.h. */
55a8c076
YQ
2335/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2336 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2337#define $2 innocuous_$2
2338
2339/* System header to define __stub macros and hopefully few prototypes,
2340 which can conflict with char $2 (); below.
2341 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2342 <limits.h> exists even on freestanding compilers. */
2343
2344#ifdef __STDC__
2345# include <limits.h>
2346#else
2347# include <assert.h>
2348#endif
2349
2350#undef $2
2351
2352/* Override any GCC internal prototype to avoid an error.
2353 Use char because int might match the return type of a GCC
2354 builtin and then its argument prototype would still apply. */
2355#ifdef __cplusplus
2356extern "C"
2357#endif
2358char $2 ();
2359/* The GNU C library defines this for functions which it implements
2360 to always fail with ENOSYS. Some functions are actually named
2361 something starting with __ and the normal name is an alias. */
2362#if defined __stub_$2 || defined __stub___$2
2363choke me
2364#endif
2365
2366int
2367main ()
2368{
2369return $2 ();
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_link "$LINENO"; then :
2375 eval "$3=yes"
2376else
2377 eval "$3=no"
2378fi
2379rm -f core conftest.err conftest.$ac_objext \
2380 conftest$ac_exeext conftest.$ac_ext
2381fi
2382eval ac_res=\$$3
2383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2384$as_echo "$ac_res" >&6; }
d0ac1c44 2385 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2386
2387} # ac_fn_c_check_func
2388
07697489
PA
2389# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2390# -------------------------------------------
2391# Tests whether TYPE exists after having included INCLUDES, setting cache
2392# variable VAR accordingly.
2393ac_fn_c_check_type ()
2394{
2395 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2397$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2398if eval \${$3+:} false; then :
07697489
PA
2399 $as_echo_n "(cached) " >&6
2400else
2401 eval "$3=no"
2402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403/* end confdefs.h. */
2404$4
2405int
2406main ()
2407{
2408if (sizeof ($2))
2409 return 0;
2410 ;
2411 return 0;
2412}
2413_ACEOF
2414if ac_fn_c_try_compile "$LINENO"; then :
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$4
2418int
2419main ()
2420{
2421if (sizeof (($2)))
2422 return 0;
2423 ;
2424 return 0;
2425}
2426_ACEOF
2427if ac_fn_c_try_compile "$LINENO"; then :
2428
2429else
2430 eval "$3=yes"
2431fi
2432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2433fi
2434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435fi
2436eval ac_res=\$$3
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438$as_echo "$ac_res" >&6; }
d0ac1c44 2439 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2440
2441} # ac_fn_c_check_type
2442
05ea2a05
TT
2443# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2444# ----------------------------------------------------
2445# Tries to find if the field MEMBER exists in type AGGR, after including
2446# INCLUDES, setting cache variable VAR accordingly.
2447ac_fn_c_check_member ()
2448{
2449 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2451$as_echo_n "checking for $2.$3... " >&6; }
2452if eval \${$4+:} false; then :
2453 $as_echo_n "(cached) " >&6
2454else
2455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2456/* end confdefs.h. */
2457$5
2458int
2459main ()
2460{
2461static $2 ac_aggr;
2462if (ac_aggr.$3)
2463return 0;
2464 ;
2465 return 0;
2466}
2467_ACEOF
2468if ac_fn_c_try_compile "$LINENO"; then :
2469 eval "$4=yes"
2470else
2471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2472/* end confdefs.h. */
2473$5
2474int
2475main ()
2476{
2477static $2 ac_aggr;
2478if (sizeof ac_aggr.$3)
2479return 0;
2480 ;
2481 return 0;
2482}
2483_ACEOF
2484if ac_fn_c_try_compile "$LINENO"; then :
2485 eval "$4=yes"
2486else
2487 eval "$4=no"
2488fi
2489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2490fi
2491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2492fi
2493eval ac_res=\$$4
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495$as_echo "$ac_res" >&6; }
2496 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497
2498} # ac_fn_c_check_member
2499
f35d5ade
TT
2500# ac_fn_cxx_try_link LINENO
2501# -------------------------
2502# Try to link conftest.$ac_ext, and return whether this succeeded.
2503ac_fn_cxx_try_link ()
2504{
2505 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506 rm -f conftest.$ac_objext conftest$ac_exeext
2507 if { { ac_try="$ac_link"
2508case "(($ac_try" in
2509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510 *) ac_try_echo=$ac_try;;
2511esac
2512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2513$as_echo "$ac_try_echo"; } >&5
2514 (eval "$ac_link") 2>conftest.err
2515 ac_status=$?
2516 if test -s conftest.err; then
2517 grep -v '^ *+' conftest.err >conftest.er1
2518 cat conftest.er1 >&5
2519 mv -f conftest.er1 conftest.err
2520 fi
2521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522 test $ac_status = 0; } && {
2523 test -z "$ac_cxx_werror_flag" ||
2524 test ! -s conftest.err
2525 } && test -s conftest$ac_exeext && {
2526 test "$cross_compiling" = yes ||
2527 test -x conftest$ac_exeext
2528 }; then :
2529 ac_retval=0
2530else
2531 $as_echo "$as_me: failed program was:" >&5
2532sed 's/^/| /' conftest.$ac_ext >&5
2533
2534 ac_retval=1
2535fi
2536 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2537 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2538 # interfere with the next link command; also delete a directory that is
2539 # left behind by Apple's compiler. We do this before executing the actions.
2540 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2541 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2542 as_fn_set_status $ac_retval
2543
2544} # ac_fn_cxx_try_link
21987b9c
TT
2545
2546# ac_fn_cxx_check_func LINENO FUNC VAR
2547# ------------------------------------
2548# Tests whether FUNC exists, setting the cache variable VAR accordingly
2549ac_fn_cxx_check_func ()
2550{
2551 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2553$as_echo_n "checking for $2... " >&6; }
2554if eval \${$3+:} false; then :
2555 $as_echo_n "(cached) " >&6
2556else
2557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* end confdefs.h. */
2559/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2560 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2561#define $2 innocuous_$2
2562
2563/* System header to define __stub macros and hopefully few prototypes,
2564 which can conflict with char $2 (); below.
2565 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2566 <limits.h> exists even on freestanding compilers. */
2567
2568#ifdef __STDC__
2569# include <limits.h>
2570#else
2571# include <assert.h>
2572#endif
2573
2574#undef $2
2575
2576/* Override any GCC internal prototype to avoid an error.
2577 Use char because int might match the return type of a GCC
2578 builtin and then its argument prototype would still apply. */
2579#ifdef __cplusplus
2580extern "C"
2581#endif
2582char $2 ();
2583/* The GNU C library defines this for functions which it implements
2584 to always fail with ENOSYS. Some functions are actually named
2585 something starting with __ and the normal name is an alias. */
2586#if defined __stub_$2 || defined __stub___$2
2587choke me
2588#endif
2589
2590int
2591main ()
2592{
2593return $2 ();
2594 ;
2595 return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_link "$LINENO"; then :
2599 eval "$3=yes"
2600else
2601 eval "$3=no"
2602fi
2603rm -f core conftest.err conftest.$ac_objext \
2604 conftest$ac_exeext conftest.$ac_ext
2605fi
2606eval ac_res=\$$3
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2608$as_echo "$ac_res" >&6; }
2609 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2610
2611} # ac_fn_cxx_check_func
81ecdfbb
RW
2612cat >config.log <<_ACEOF
2613This file contains any messages produced by compilers while
2614running configure, to aid debugging if configure makes a mistake.
d5af19ba 2615
81ecdfbb 2616It was created by $as_me, which was
d0ac1c44 2617generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2618
81ecdfbb 2619 $ $0 $@
413ccac7 2620
81ecdfbb
RW
2621_ACEOF
2622exec 5>>config.log
2623{
2624cat <<_ASUNAME
2625## --------- ##
2626## Platform. ##
2627## --------- ##
413ccac7 2628
81ecdfbb
RW
2629hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2630uname -m = `(uname -m) 2>/dev/null || echo unknown`
2631uname -r = `(uname -r) 2>/dev/null || echo unknown`
2632uname -s = `(uname -s) 2>/dev/null || echo unknown`
2633uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2634
81ecdfbb
RW
2635/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2636/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2637
81ecdfbb
RW
2638/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2639/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2640/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2641/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2642/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2643/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2644/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2645
81ecdfbb 2646_ASUNAME
bec39cab 2647
bec39cab
AC
2648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2649for as_dir in $PATH
2650do
2651 IFS=$as_save_IFS
2652 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2653 $as_echo "PATH: $as_dir"
2654 done
2655IFS=$as_save_IFS
bec39cab 2656
81ecdfbb 2657} >&5
bec39cab 2658
81ecdfbb 2659cat >&5 <<_ACEOF
bec39cab 2660
bec39cab 2661
81ecdfbb
RW
2662## ----------- ##
2663## Core tests. ##
2664## ----------- ##
2665
2666_ACEOF
2667
2668
2669# Keep a trace of the command line.
2670# Strip out --no-create and --no-recursion so they do not pile up.
2671# Strip out --silent because we don't want to record it for future runs.
2672# Also quote any args containing shell meta-characters.
2673# Make two passes to allow for proper duplicate-argument suppression.
2674ac_configure_args=
2675ac_configure_args0=
2676ac_configure_args1=
2677ac_must_keep_next=false
2678for ac_pass in 1 2
2679do
2680 for ac_arg
2681 do
2682 case $ac_arg in
2683 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2684 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2685 | -silent | --silent | --silen | --sile | --sil)
2686 continue ;;
2687 *\'*)
2688 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2689 esac
2690 case $ac_pass in
2691 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2692 2)
2693 as_fn_append ac_configure_args1 " '$ac_arg'"
2694 if test $ac_must_keep_next = true; then
2695 ac_must_keep_next=false # Got value, back to normal.
2696 else
2697 case $ac_arg in
2698 *=* | --config-cache | -C | -disable-* | --disable-* \
2699 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2700 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2701 | -with-* | --with-* | -without-* | --without-* | --x)
2702 case "$ac_configure_args0 " in
2703 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2704 esac
2705 ;;
2706 -* ) ac_must_keep_next=true ;;
2707 esac
2708 fi
2709 as_fn_append ac_configure_args " '$ac_arg'"
2710 ;;
2711 esac
2712 done
2713done
2714{ ac_configure_args0=; unset ac_configure_args0;}
2715{ ac_configure_args1=; unset ac_configure_args1;}
2716
2717# When interrupted or exit'd, cleanup temporary files, and complete
2718# config.log. We remove comments because anyway the quotes in there
2719# would cause problems or look ugly.
2720# WARNING: Use '\'' to represent an apostrophe within the trap.
2721# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2722trap 'exit_status=$?
2723 # Save into config.log some information that might help in debugging.
2724 {
2725 echo
2726
d0ac1c44 2727 $as_echo "## ---------------- ##
81ecdfbb 2728## Cache variables. ##
d0ac1c44 2729## ---------------- ##"
81ecdfbb
RW
2730 echo
2731 # The following way of writing the cache mishandles newlines in values,
2732(
2733 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2734 eval ac_val=\$$ac_var
2735 case $ac_val in #(
2736 *${as_nl}*)
2737 case $ac_var in #(
2738 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2739$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2740 esac
2741 case $ac_var in #(
2742 _ | IFS | as_nl) ;; #(
2743 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2744 *) { eval $ac_var=; unset $ac_var;} ;;
2745 esac ;;
2746 esac
2747 done
2748 (set) 2>&1 |
2749 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2750 *${as_nl}ac_space=\ *)
2751 sed -n \
2752 "s/'\''/'\''\\\\'\'''\''/g;
2753 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2754 ;; #(
2755 *)
2756 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2757 ;;
2758 esac |
2759 sort
2760)
2761 echo
2762
d0ac1c44 2763 $as_echo "## ----------------- ##
81ecdfbb 2764## Output variables. ##
d0ac1c44 2765## ----------------- ##"
81ecdfbb
RW
2766 echo
2767 for ac_var in $ac_subst_vars
2768 do
2769 eval ac_val=\$$ac_var
2770 case $ac_val in
2771 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2772 esac
2773 $as_echo "$ac_var='\''$ac_val'\''"
2774 done | sort
2775 echo
2776
2777 if test -n "$ac_subst_files"; then
d0ac1c44 2778 $as_echo "## ------------------- ##
81ecdfbb 2779## File substitutions. ##
d0ac1c44 2780## ------------------- ##"
81ecdfbb
RW
2781 echo
2782 for ac_var in $ac_subst_files
2783 do
2784 eval ac_val=\$$ac_var
2785 case $ac_val in
2786 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2787 esac
2788 $as_echo "$ac_var='\''$ac_val'\''"
2789 done | sort
2790 echo
2791 fi
2792
2793 if test -s confdefs.h; then
d0ac1c44 2794 $as_echo "## ----------- ##
81ecdfbb 2795## confdefs.h. ##
d0ac1c44 2796## ----------- ##"
81ecdfbb
RW
2797 echo
2798 cat confdefs.h
2799 echo
2800 fi
2801 test "$ac_signal" != 0 &&
2802 $as_echo "$as_me: caught signal $ac_signal"
2803 $as_echo "$as_me: exit $exit_status"
2804 } >&5
2805 rm -f core *.core core.conftest.* &&
2806 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2807 exit $exit_status
2808' 0
2809for ac_signal in 1 2 13 15; do
2810 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2811done
2812ac_signal=0
2813
2814# confdefs.h avoids OS command line length limits that DEFS can exceed.
2815rm -f -r conftest* confdefs.h
2816
2817$as_echo "/* confdefs.h */" > confdefs.h
2818
2819# Predefined preprocessor variables.
2820
2821cat >>confdefs.h <<_ACEOF
2822#define PACKAGE_NAME "$PACKAGE_NAME"
2823_ACEOF
2824
2825cat >>confdefs.h <<_ACEOF
2826#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2827_ACEOF
2828
2829cat >>confdefs.h <<_ACEOF
2830#define PACKAGE_VERSION "$PACKAGE_VERSION"
2831_ACEOF
2832
2833cat >>confdefs.h <<_ACEOF
2834#define PACKAGE_STRING "$PACKAGE_STRING"
2835_ACEOF
2836
2837cat >>confdefs.h <<_ACEOF
2838#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2839_ACEOF
2840
2841cat >>confdefs.h <<_ACEOF
2842#define PACKAGE_URL "$PACKAGE_URL"
2843_ACEOF
2844
2845
2846# Let the site file select an alternate cache file if it wants to.
2847# Prefer an explicitly selected file to automatically selected ones.
2848ac_site_file1=NONE
2849ac_site_file2=NONE
2850if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2851 # We do not want a PATH search for config.site.
2852 case $CONFIG_SITE in #((
2853 -*) ac_site_file1=./$CONFIG_SITE;;
2854 */*) ac_site_file1=$CONFIG_SITE;;
2855 *) ac_site_file1=./$CONFIG_SITE;;
2856 esac
81ecdfbb
RW
2857elif test "x$prefix" != xNONE; then
2858 ac_site_file1=$prefix/share/config.site
2859 ac_site_file2=$prefix/etc/config.site
2860else
2861 ac_site_file1=$ac_default_prefix/share/config.site
2862 ac_site_file2=$ac_default_prefix/etc/config.site
2863fi
2864for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2865do
2866 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2867 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2869$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2870 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2871 . "$ac_site_file" \
2872 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2874as_fn_error $? "failed to load site script $ac_site_file
2875See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2876 fi
2877done
2878
2879if test -r "$cache_file"; then
d0ac1c44
SM
2880 # Some versions of bash will fail to source /dev/null (special files
2881 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2882 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2884$as_echo "$as_me: loading cache $cache_file" >&6;}
2885 case $cache_file in
2886 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2887 *) . "./$cache_file";;
2888 esac
2889 fi
2890else
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2892$as_echo "$as_me: creating cache $cache_file" >&6;}
2893 >$cache_file
bec39cab
AC
2894fi
2895
d0ac1c44
SM
2896as_fn_append ac_header_list " stdlib.h"
2897as_fn_append ac_header_list " unistd.h"
2898as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2899# Check that the precious variables saved in the cache have kept the same
2900# value.
2901ac_cache_corrupted=false
2902for ac_var in $ac_precious_vars; do
2903 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2904 eval ac_new_set=\$ac_env_${ac_var}_set
2905 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2906 eval ac_new_val=\$ac_env_${ac_var}_value
2907 case $ac_old_set,$ac_new_set in
2908 set,)
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2910$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2911 ac_cache_corrupted=: ;;
2912 ,set)
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2914$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2915 ac_cache_corrupted=: ;;
2916 ,);;
2917 *)
2918 if test "x$ac_old_val" != "x$ac_new_val"; then
2919 # differences in whitespace do not lead to failure.
2920 ac_old_val_w=`echo x $ac_old_val`
2921 ac_new_val_w=`echo x $ac_new_val`
2922 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2924$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2925 ac_cache_corrupted=:
2926 else
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2928$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2929 eval $ac_var=\$ac_old_val
2930 fi
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2932$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2934$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2935 fi;;
2936 esac
2937 # Pass precious variables to config.status.
2938 if test "$ac_new_set" = set; then
2939 case $ac_new_val in
2940 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2941 *) ac_arg=$ac_var=$ac_new_val ;;
2942 esac
2943 case " $ac_configure_args " in
2944 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2945 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2946 esac
2947 fi
2948done
2949if $ac_cache_corrupted; then
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2953$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2954 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2955fi
2956## -------------------- ##
2957## Main body of script. ##
2958## -------------------- ##
2959
2960ac_ext=c
2961ac_cpp='$CPP $CPPFLAGS'
2962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2964ac_compiler_gnu=$ac_cv_c_compiler_gnu
2965
2966
2967
2968
2969
2970ac_config_headers="$ac_config_headers config.h:config.in"
2971
2972
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2974$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2975 # Check whether --enable-maintainer-mode was given.
2976if test "${enable_maintainer_mode+set}" = set; then :
2977 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2978else
2979 USE_MAINTAINER_MODE=no
2980fi
2981
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2983$as_echo "$USE_MAINTAINER_MODE" >&6; }
2984 if test $USE_MAINTAINER_MODE = yes; then
2985 MAINTAINER_MODE_TRUE=
2986 MAINTAINER_MODE_FALSE='#'
2987else
2988 MAINTAINER_MODE_TRUE='#'
2989 MAINTAINER_MODE_FALSE=
2990fi
2991
2992 MAINT=$MAINTAINER_MODE_TRUE
2993
2994
2995
2996ac_ext=c
2997ac_cpp='$CPP $CPPFLAGS'
2998ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2999ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3000ac_compiler_gnu=$ac_cv_c_compiler_gnu
3001if test -n "$ac_tool_prefix"; then
3002 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3003set dummy ${ac_tool_prefix}gcc; ac_word=$2
3004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3005$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3006if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3007 $as_echo_n "(cached) " >&6
c906108c
SS
3008else
3009 if test -n "$CC"; then
3010 ac_cv_prog_CC="$CC" # Let the user override the test.
3011else
bec39cab
AC
3012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3013for as_dir in $PATH
3014do
3015 IFS=$as_save_IFS
3016 test -z "$as_dir" && as_dir=.
81ecdfbb 3017 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3019 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3021 break 2
3022 fi
3023done
81ecdfbb
RW
3024 done
3025IFS=$as_save_IFS
bec39cab 3026
c906108c
SS
3027fi
3028fi
bec39cab 3029CC=$ac_cv_prog_CC
c906108c 3030if test -n "$CC"; then
81ecdfbb
RW
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3032$as_echo "$CC" >&6; }
c906108c 3033else
81ecdfbb
RW
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3035$as_echo "no" >&6; }
c906108c
SS
3036fi
3037
81ecdfbb 3038
b4e70030
JB
3039fi
3040if test -z "$ac_cv_prog_CC"; then
3041 ac_ct_CC=$CC
81ecdfbb
RW
3042 # Extract the first word of "gcc", so it can be a program name with args.
3043set dummy gcc; ac_word=$2
3044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3045$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3046if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3047 $as_echo_n "(cached) " >&6
b4e70030
JB
3048else
3049 if test -n "$ac_ct_CC"; then
3050 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3051else
3052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3053for as_dir in $PATH
3054do
3055 IFS=$as_save_IFS
3056 test -z "$as_dir" && as_dir=.
81ecdfbb 3057 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3059 ac_cv_prog_ac_ct_CC="gcc"
3060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3061 break 2
4e8d927d 3062 fi
b4e70030 3063done
81ecdfbb
RW
3064 done
3065IFS=$as_save_IFS
b4e70030
JB
3066
3067fi
3068fi
3069ac_ct_CC=$ac_cv_prog_ac_ct_CC
3070if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3072$as_echo "$ac_ct_CC" >&6; }
b4e70030 3073else
81ecdfbb
RW
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3075$as_echo "no" >&6; }
b4e70030
JB
3076fi
3077
81ecdfbb
RW
3078 if test "x$ac_ct_CC" = x; then
3079 CC=""
3080 else
3081 case $cross_compiling:$ac_tool_warned in
3082yes:)
3083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3085ac_tool_warned=yes ;;
3086esac
3087 CC=$ac_ct_CC
3088 fi
b4e70030
JB
3089else
3090 CC="$ac_cv_prog_CC"
3091fi
3092
c906108c 3093if test -z "$CC"; then
81ecdfbb
RW
3094 if test -n "$ac_tool_prefix"; then
3095 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3096set dummy ${ac_tool_prefix}cc; ac_word=$2
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3098$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3099if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3100 $as_echo_n "(cached) " >&6
c906108c
SS
3101else
3102 if test -n "$CC"; then
3103 ac_cv_prog_CC="$CC" # Let the user override the test.
3104else
bec39cab
AC
3105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3106for as_dir in $PATH
3107do
3108 IFS=$as_save_IFS
3109 test -z "$as_dir" && as_dir=.
81ecdfbb 3110 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3112 ac_cv_prog_CC="${ac_tool_prefix}cc"
3113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3114 break 2
3115 fi
3116done
81ecdfbb
RW
3117 done
3118IFS=$as_save_IFS
3119
3120fi
3121fi
3122CC=$ac_cv_prog_CC
3123if test -n "$CC"; then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3125$as_echo "$CC" >&6; }
3126else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
3129fi
3130
3131
3132 fi
3133fi
3134if test -z "$CC"; then
3135 # Extract the first word of "cc", so it can be a program name with args.
3136set dummy cc; ac_word=$2
3137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3138$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3139if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3140 $as_echo_n "(cached) " >&6
3141else
3142 if test -n "$CC"; then
3143 ac_cv_prog_CC="$CC" # Let the user override the test.
3144else
3145 ac_prog_rejected=no
3146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3147for as_dir in $PATH
3148do
3149 IFS=$as_save_IFS
3150 test -z "$as_dir" && as_dir=.
3151 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3153 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3154 ac_prog_rejected=yes
3155 continue
3156 fi
3157 ac_cv_prog_CC="cc"
3158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3159 break 2
3160 fi
3161done
3162 done
3163IFS=$as_save_IFS
bec39cab 3164
c906108c
SS
3165if test $ac_prog_rejected = yes; then
3166 # We found a bogon in the path, so make sure we never use it.
3167 set dummy $ac_cv_prog_CC
3168 shift
bec39cab 3169 if test $# != 0; then
c906108c
SS
3170 # We chose a different compiler from the bogus one.
3171 # However, it has the same basename, so the bogon will be chosen
3172 # first if we set CC to just the basename; use the full file name.
3173 shift
bec39cab 3174 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3175 fi
3176fi
3177fi
3178fi
bec39cab 3179CC=$ac_cv_prog_CC
c906108c 3180if test -n "$CC"; then
81ecdfbb
RW
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3182$as_echo "$CC" >&6; }
c906108c 3183else
81ecdfbb
RW
3184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185$as_echo "no" >&6; }
c906108c
SS
3186fi
3187
81ecdfbb 3188
bec39cab
AC
3189fi
3190if test -z "$CC"; then
3191 if test -n "$ac_tool_prefix"; then
81ecdfbb 3192 for ac_prog in cl.exe
bec39cab
AC
3193 do
3194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3198if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3199 $as_echo_n "(cached) " >&6
c906108c
SS
3200else
3201 if test -n "$CC"; then
3202 ac_cv_prog_CC="$CC" # Let the user override the test.
3203else
bec39cab
AC
3204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205for as_dir in $PATH
3206do
3207 IFS=$as_save_IFS
3208 test -z "$as_dir" && as_dir=.
81ecdfbb 3209 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3211 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3213 break 2
3214 fi
3215done
81ecdfbb
RW
3216 done
3217IFS=$as_save_IFS
bec39cab 3218
c906108c
SS
3219fi
3220fi
bec39cab 3221CC=$ac_cv_prog_CC
c906108c 3222if test -n "$CC"; then
81ecdfbb
RW
3223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3224$as_echo "$CC" >&6; }
c906108c 3225else
81ecdfbb
RW
3226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227$as_echo "no" >&6; }
c906108c 3228fi
bec39cab 3229
81ecdfbb 3230
bec39cab
AC
3231 test -n "$CC" && break
3232 done
3233fi
3234if test -z "$CC"; then
3235 ac_ct_CC=$CC
81ecdfbb 3236 for ac_prog in cl.exe
bec39cab
AC
3237do
3238 # Extract the first word of "$ac_prog", so it can be a program name with args.
3239set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3241$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3242if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3243 $as_echo_n "(cached) " >&6
bec39cab
AC
3244else
3245 if test -n "$ac_ct_CC"; then
3246 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3247else
3248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249for as_dir in $PATH
3250do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
81ecdfbb 3253 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3255 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3257 break 2
c906108c 3258 fi
bec39cab 3259done
81ecdfbb
RW
3260 done
3261IFS=$as_save_IFS
bec39cab
AC
3262
3263fi
3264fi
3265ac_ct_CC=$ac_cv_prog_ac_ct_CC
3266if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3268$as_echo "$ac_ct_CC" >&6; }
bec39cab 3269else
81ecdfbb
RW
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271$as_echo "no" >&6; }
c906108c
SS
3272fi
3273
81ecdfbb 3274
bec39cab
AC
3275 test -n "$ac_ct_CC" && break
3276done
c906108c 3277
81ecdfbb
RW
3278 if test "x$ac_ct_CC" = x; then
3279 CC=""
3280 else
3281 case $cross_compiling:$ac_tool_warned in
3282yes:)
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3285ac_tool_warned=yes ;;
3286esac
3287 CC=$ac_ct_CC
3288 fi
bec39cab
AC
3289fi
3290
3291fi
3292
3293
81ecdfbb
RW
3294test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3296as_fn_error $? "no acceptable C compiler found in \$PATH
3297See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3298
3299# Provide some information about the compiler.
81ecdfbb
RW
3300$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3301set X $ac_compile
3302ac_compiler=$2
3303for ac_option in --version -v -V -qversion; do
3304 { { ac_try="$ac_compiler $ac_option >&5"
3305case "(($ac_try" in
3306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3307 *) ac_try_echo=$ac_try;;
3308esac
3309eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3310$as_echo "$ac_try_echo"; } >&5
3311 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3312 ac_status=$?
81ecdfbb
RW
3313 if test -s conftest.err; then
3314 sed '10a\
3315... rest of stderr output deleted ...
3316 10q' conftest.err >conftest.er1
3317 cat conftest.er1 >&5
81ecdfbb 3318 fi
d0ac1c44 3319 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3320 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3321 test $ac_status = 0; }
3322done
bec39cab 3323
81ecdfbb 3324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3325/* end confdefs.h. */
3326
3327int
3328main ()
3329{
3330
3331 ;
3332 return 0;
3333}
3334_ACEOF
3335ac_clean_files_save=$ac_clean_files
d0ac1c44 3336ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3337# Try to create an executable without -o first, disregard a.out.
3338# It will help us diagnose broken compilers, and finding out an intuition
3339# of exeext.
d0ac1c44
SM
3340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3341$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3342ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3343
3344# The possible output files:
3345ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3346
3347ac_rmfiles=
3348for ac_file in $ac_files
3349do
3350 case $ac_file in
3351 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3352 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3353 esac
3354done
3355rm -f $ac_rmfiles
3356
3357if { { ac_try="$ac_link_default"
3358case "(($ac_try" in
3359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3360 *) ac_try_echo=$ac_try;;
3361esac
3362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3363$as_echo "$ac_try_echo"; } >&5
3364 (eval "$ac_link_default") 2>&5
3365 ac_status=$?
3366 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3367 test $ac_status = 0; }; then :
3368 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3369# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3370# in a Makefile. We should not override ac_cv_exeext if it was cached,
3371# so that the user can short-circuit this test for compilers unknown to
3372# Autoconf.
3373for ac_file in $ac_files ''
bec39cab
AC
3374do
3375 test -f "$ac_file" || continue
3376 case $ac_file in
81ecdfbb 3377 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3378 ;;
3379 [ab].out )
3380 # We found the default executable, but exeext='' is most
3381 # certainly right.
3382 break;;
3383 *.* )
81ecdfbb
RW
3384 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3385 then :; else
3386 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3387 fi
3388 # We set ac_cv_exeext here because the later test for it is not
3389 # safe: cross compilers may not add the suffix if given an `-o'
3390 # argument, so we may need to know it at that point already.
3391 # Even if this section looks crufty: it has the advantage of
3392 # actually working.
b4e70030
JB
3393 break;;
3394 * )
3395 break;;
bec39cab
AC
3396 esac
3397done
81ecdfbb
RW
3398test "$ac_cv_exeext" = no && ac_cv_exeext=
3399
bec39cab 3400else
81ecdfbb
RW
3401 ac_file=''
3402fi
81ecdfbb 3403if test -z "$ac_file"; then :
d0ac1c44
SM
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3405$as_echo "no" >&6; }
3406$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3407sed 's/^/| /' conftest.$ac_ext >&5
3408
81ecdfbb
RW
3409{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3411as_fn_error 77 "C compiler cannot create executables
3412See \`config.log' for more details" "$LINENO" 5; }
3413else
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3415$as_echo "yes" >&6; }
bec39cab 3416fi
d0ac1c44
SM
3417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3418$as_echo_n "checking for C compiler default output file name... " >&6; }
3419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3420$as_echo "$ac_file" >&6; }
b4e70030 3421ac_exeext=$ac_cv_exeext
b4e70030 3422
d0ac1c44 3423rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3424ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3426$as_echo_n "checking for suffix of executables... " >&6; }
3427if { { ac_try="$ac_link"
3428case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431esac
3432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3433$as_echo "$ac_try_echo"; } >&5
3434 (eval "$ac_link") 2>&5
bec39cab 3435 ac_status=$?
81ecdfbb
RW
3436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3437 test $ac_status = 0; }; then :
b4e70030
JB
3438 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3439# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3440# work properly (i.e., refer to `conftest.exe'), while it won't with
3441# `rm'.
3442for ac_file in conftest.exe conftest conftest.*; do
3443 test -f "$ac_file" || continue
3444 case $ac_file in
81ecdfbb 3445 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3446 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3447 break;;
3448 * ) break;;
3449 esac
3450done
c906108c 3451else
81ecdfbb
RW
3452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3454as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3455See \`config.log' for more details" "$LINENO" 5; }
c906108c 3456fi
d0ac1c44 3457rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3459$as_echo "$ac_cv_exeext" >&6; }
c906108c 3460
b4e70030 3461rm -f conftest.$ac_ext
bec39cab
AC
3462EXEEXT=$ac_cv_exeext
3463ac_exeext=$EXEEXT
d0ac1c44
SM
3464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3465/* end confdefs.h. */
3466#include <stdio.h>
3467int
3468main ()
3469{
3470FILE *f = fopen ("conftest.out", "w");
3471 return ferror (f) || fclose (f) != 0;
3472
3473 ;
3474 return 0;
3475}
3476_ACEOF
3477ac_clean_files="$ac_clean_files conftest.out"
3478# Check that the compiler produces executables we can run. If not, either
3479# the compiler is broken, or we cross compile.
3480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3481$as_echo_n "checking whether we are cross compiling... " >&6; }
3482if test "$cross_compiling" != yes; then
3483 { { ac_try="$ac_link"
3484case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487esac
3488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3489$as_echo "$ac_try_echo"; } >&5
3490 (eval "$ac_link") 2>&5
3491 ac_status=$?
3492 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3493 test $ac_status = 0; }
3494 if { ac_try='./conftest$ac_cv_exeext'
3495 { { case "(($ac_try" in
3496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3497 *) ac_try_echo=$ac_try;;
3498esac
3499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3500$as_echo "$ac_try_echo"; } >&5
3501 (eval "$ac_try") 2>&5
3502 ac_status=$?
3503 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3504 test $ac_status = 0; }; }; then
3505 cross_compiling=no
3506 else
3507 if test "$cross_compiling" = maybe; then
3508 cross_compiling=yes
3509 else
3510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3512as_fn_error $? "cannot run C compiled programs.
3513If you meant to cross compile, use \`--host'.
3514See \`config.log' for more details" "$LINENO" 5; }
3515 fi
3516 fi
3517fi
3518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3519$as_echo "$cross_compiling" >&6; }
3520
3521rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3522ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3524$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3525if ${ac_cv_objext+:} false; then :
81ecdfbb 3526 $as_echo_n "(cached) " >&6
bec39cab 3527else
81ecdfbb 3528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3529/* end confdefs.h. */
3530
3531int
3532main ()
3533{
3534
3535 ;
3536 return 0;
3537}
3538_ACEOF
3539rm -f conftest.o conftest.obj
81ecdfbb
RW
3540if { { ac_try="$ac_compile"
3541case "(($ac_try" in
3542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3543 *) ac_try_echo=$ac_try;;
3544esac
3545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3546$as_echo "$ac_try_echo"; } >&5
3547 (eval "$ac_compile") 2>&5
3548 ac_status=$?
3549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3550 test $ac_status = 0; }; then :
3551 for ac_file in conftest.o conftest.obj conftest.*; do
3552 test -f "$ac_file" || continue;
bec39cab 3553 case $ac_file in
81ecdfbb 3554 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3555 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3556 break;;
3557 esac
3558done
c906108c 3559else
81ecdfbb 3560 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3561sed 's/^/| /' conftest.$ac_ext >&5
3562
81ecdfbb
RW
3563{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3565as_fn_error $? "cannot compute suffix of object files: cannot compile
3566See \`config.log' for more details" "$LINENO" 5; }
c906108c 3567fi
b4e70030 3568rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3569fi
81ecdfbb
RW
3570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3571$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3572OBJEXT=$ac_cv_objext
3573ac_objext=$OBJEXT
81ecdfbb
RW
3574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3575$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3576if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3577 $as_echo_n "(cached) " >&6
c906108c 3578else
81ecdfbb 3579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3580/* end confdefs.h. */
3581
3582int
3583main ()
3584{
3585#ifndef __GNUC__
3586 choke me
3587#endif
3588
3589 ;
3590 return 0;
3591}
3592_ACEOF
81ecdfbb 3593if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3594 ac_compiler_gnu=yes
3595else
81ecdfbb 3596 ac_compiler_gnu=no
bec39cab 3597fi
81ecdfbb 3598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3599ac_cv_c_compiler_gnu=$ac_compiler_gnu
3600
3601fi
81ecdfbb
RW
3602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3603$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3604if test $ac_compiler_gnu = yes; then
3605 GCC=yes
3606else
3607 GCC=
3608fi
bec39cab
AC
3609ac_test_CFLAGS=${CFLAGS+set}
3610ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3612$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3613if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3614 $as_echo_n "(cached) " >&6
bec39cab 3615else
81ecdfbb
RW
3616 ac_save_c_werror_flag=$ac_c_werror_flag
3617 ac_c_werror_flag=yes
3618 ac_cv_prog_cc_g=no
3619 CFLAGS="-g"
3620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3621/* end confdefs.h. */
3622
3623int
3624main ()
3625{
3626
3627 ;
3628 return 0;
3629}
3630_ACEOF
81ecdfbb 3631if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3632 ac_cv_prog_cc_g=yes
3633else
81ecdfbb
RW
3634 CFLAGS=""
3635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3636/* end confdefs.h. */
3637
3638int
3639main ()
3640{
3641
3642 ;
3643 return 0;
3644}
3645_ACEOF
3646if ac_fn_c_try_compile "$LINENO"; then :
3647
3648else
3649 ac_c_werror_flag=$ac_save_c_werror_flag
3650 CFLAGS="-g"
3651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3652/* end confdefs.h. */
3653
3654int
3655main ()
3656{
c906108c 3657
81ecdfbb
RW
3658 ;
3659 return 0;
3660}
3661_ACEOF
3662if ac_fn_c_try_compile "$LINENO"; then :
3663 ac_cv_prog_cc_g=yes
3664fi
3665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3666fi
3667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3668fi
81ecdfbb
RW
3669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3670 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3671fi
81ecdfbb
RW
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3673$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3674if test "$ac_test_CFLAGS" = set; then
bec39cab 3675 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3676elif test $ac_cv_prog_cc_g = yes; then
3677 if test "$GCC" = yes; then
3678 CFLAGS="-g -O2"
3679 else
3680 CFLAGS="-g"
3681 fi
3682else
3683 if test "$GCC" = yes; then
3684 CFLAGS="-O2"
3685 else
3686 CFLAGS=
3687 fi
3688fi
81ecdfbb
RW
3689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3690$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3691if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3692 $as_echo_n "(cached) " >&6
bec39cab 3693else
81ecdfbb 3694 ac_cv_prog_cc_c89=no
bec39cab 3695ac_save_CC=$CC
81ecdfbb 3696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3697/* end confdefs.h. */
c906108c
SS
3698#include <stdarg.h>
3699#include <stdio.h>
d0ac1c44 3700struct stat;
c906108c
SS
3701/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3702struct buf { int x; };
3703FILE * (*rcsopen) (struct buf *, struct stat *, int);
3704static char *e (p, i)
3705 char **p;
3706 int i;
3707{
3708 return p[i];
3709}
3710static char *f (char * (*g) (char **, int), char **p, ...)
3711{
3712 char *s;
3713 va_list v;
3714 va_start (v,p);
3715 s = g (p, va_arg (v,int));
3716 va_end (v);
3717 return s;
3718}
bec39cab
AC
3719
3720/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3721 function prototypes and stuff, but not '\xHH' hex character constants.
3722 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3723 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3724 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3725 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3726 that's true only with -std. */
bec39cab
AC
3727int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3728
81ecdfbb
RW
3729/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3730 inside strings and character constants. */
3731#define FOO(x) 'x'
3732int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3733
c906108c
SS
3734int test (int i, double x);
3735struct s1 {int (*f) (int a);};
3736struct s2 {int (*f) (double a);};
3737int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3738int argc;
3739char **argv;
bec39cab
AC
3740int
3741main ()
3742{
c906108c 3743return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3744 ;
3745 return 0;
3746}
3747_ACEOF
81ecdfbb
RW
3748for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3749 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3750do
3751 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3752 if ac_fn_c_try_compile "$LINENO"; then :
3753 ac_cv_prog_cc_c89=$ac_arg
c906108c 3754fi
81ecdfbb
RW
3755rm -f core conftest.err conftest.$ac_objext
3756 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3757done
81ecdfbb 3758rm -f conftest.$ac_ext
bec39cab 3759CC=$ac_save_CC
c906108c
SS
3760
3761fi
81ecdfbb
RW
3762# AC_CACHE_VAL
3763case "x$ac_cv_prog_cc_c89" in
3764 x)
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3766$as_echo "none needed" >&6; } ;;
3767 xno)
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3769$as_echo "unsupported" >&6; } ;;
bec39cab 3770 *)
81ecdfbb
RW
3771 CC="$CC $ac_cv_prog_cc_c89"
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3773$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3774esac
81ecdfbb 3775if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3776
b4e70030
JB
3777fi
3778
bec39cab
AC
3779ac_ext=c
3780ac_cpp='$CPP $CPPFLAGS'
3781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3783ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3784
3bc3d82a
PA
3785ac_ext=cpp
3786ac_cpp='$CXXCPP $CPPFLAGS'
3787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3790if test -z "$CXX"; then
3791 if test -n "$CCC"; then
3792 CXX=$CCC
3793 else
3794 if test -n "$ac_tool_prefix"; then
3795 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3796 do
3797 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3798set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3800$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3801if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3802 $as_echo_n "(cached) " >&6
3803else
3804 if test -n "$CXX"; then
3805 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3806else
3807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3808for as_dir in $PATH
3809do
3810 IFS=$as_save_IFS
3811 test -z "$as_dir" && as_dir=.
3812 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3814 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3816 break 2
3817 fi
3818done
3819 done
3820IFS=$as_save_IFS
3821
3822fi
3823fi
3824CXX=$ac_cv_prog_CXX
3825if test -n "$CXX"; then
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3827$as_echo "$CXX" >&6; }
3828else
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3830$as_echo "no" >&6; }
3831fi
3832
3833
3834 test -n "$CXX" && break
3835 done
3836fi
3837if test -z "$CXX"; then
3838 ac_ct_CXX=$CXX
3839 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3840do
3841 # Extract the first word of "$ac_prog", so it can be a program name with args.
3842set dummy $ac_prog; ac_word=$2
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3844$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3845if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3846 $as_echo_n "(cached) " >&6
3847else
3848 if test -n "$ac_ct_CXX"; then
3849 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3850else
3851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3852for as_dir in $PATH
3853do
3854 IFS=$as_save_IFS
3855 test -z "$as_dir" && as_dir=.
3856 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3858 ac_cv_prog_ac_ct_CXX="$ac_prog"
3859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3860 break 2
3861 fi
3862done
3863 done
3864IFS=$as_save_IFS
3865
3866fi
3867fi
3868ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3869if test -n "$ac_ct_CXX"; then
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3871$as_echo "$ac_ct_CXX" >&6; }
3872else
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3874$as_echo "no" >&6; }
3875fi
3876
3877
3878 test -n "$ac_ct_CXX" && break
3879done
3880
3881 if test "x$ac_ct_CXX" = x; then
3882 CXX="g++"
3883 else
3884 case $cross_compiling:$ac_tool_warned in
3885yes:)
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3887$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3888ac_tool_warned=yes ;;
3889esac
3890 CXX=$ac_ct_CXX
3891 fi
3892fi
3893
3894 fi
3895fi
3896# Provide some information about the compiler.
3897$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3898set X $ac_compile
3899ac_compiler=$2
3900for ac_option in --version -v -V -qversion; do
3901 { { ac_try="$ac_compiler $ac_option >&5"
3902case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
3906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3909 ac_status=$?
3910 if test -s conftest.err; then
3911 sed '10a\
3912... rest of stderr output deleted ...
3913 10q' conftest.err >conftest.er1
3914 cat conftest.er1 >&5
3bc3d82a 3915 fi
d0ac1c44 3916 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3918 test $ac_status = 0; }
3919done
3920
3921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3922$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3923if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3924 $as_echo_n "(cached) " >&6
3925else
3926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3927/* end confdefs.h. */
3928
3929int
3930main ()
3931{
3932#ifndef __GNUC__
3933 choke me
3934#endif
3935
3936 ;
3937 return 0;
3938}
3939_ACEOF
3940if ac_fn_cxx_try_compile "$LINENO"; then :
3941 ac_compiler_gnu=yes
3942else
3943 ac_compiler_gnu=no
3944fi
3945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3946ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3947
3948fi
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3950$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3951if test $ac_compiler_gnu = yes; then
3952 GXX=yes
3953else
3954 GXX=
3955fi
3956ac_test_CXXFLAGS=${CXXFLAGS+set}
3957ac_save_CXXFLAGS=$CXXFLAGS
3958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3959$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3960if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3961 $as_echo_n "(cached) " >&6
3962else
3963 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3964 ac_cxx_werror_flag=yes
3965 ac_cv_prog_cxx_g=no
3966 CXXFLAGS="-g"
3967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3968/* end confdefs.h. */
3969
3970int
3971main ()
3972{
3973
3974 ;
3975 return 0;
3976}
3977_ACEOF
3978if ac_fn_cxx_try_compile "$LINENO"; then :
3979 ac_cv_prog_cxx_g=yes
3980else
3981 CXXFLAGS=""
3982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3983/* end confdefs.h. */
3984
3985int
3986main ()
3987{
3988
3989 ;
3990 return 0;
3991}
3992_ACEOF
3993if ac_fn_cxx_try_compile "$LINENO"; then :
3994
3995else
3996 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3997 CXXFLAGS="-g"
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999/* end confdefs.h. */
4000
4001int
4002main ()
4003{
4004
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009if ac_fn_cxx_try_compile "$LINENO"; then :
4010 ac_cv_prog_cxx_g=yes
4011fi
4012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4013fi
4014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4015fi
4016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4017 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4018fi
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4020$as_echo "$ac_cv_prog_cxx_g" >&6; }
4021if test "$ac_test_CXXFLAGS" = set; then
4022 CXXFLAGS=$ac_save_CXXFLAGS
4023elif test $ac_cv_prog_cxx_g = yes; then
4024 if test "$GXX" = yes; then
4025 CXXFLAGS="-g -O2"
4026 else
4027 CXXFLAGS="-g"
4028 fi
4029else
4030 if test "$GXX" = yes; then
4031 CXXFLAGS="-O2"
4032 else
4033 CXXFLAGS=
4034 fi
4035fi
4036ac_ext=c
4037ac_cpp='$CPP $CPPFLAGS'
4038ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4039ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4040ac_compiler_gnu=$ac_cv_c_compiler_gnu
4041
4042
60ca704f 4043
bec39cab
AC
4044ac_ext=c
4045ac_cpp='$CPP $CPPFLAGS'
4046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4048ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4050$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4051# On Suns, sometimes $CPP names a directory.
4052if test -n "$CPP" && test -d "$CPP"; then
4053 CPP=
8bb2c122 4054fi
bec39cab 4055if test -z "$CPP"; then
d0ac1c44 4056 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4057 $as_echo_n "(cached) " >&6
bec39cab
AC
4058else
4059 # Double quotes because CPP needs to be expanded
4060 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4061 do
4062 ac_preproc_ok=false
4063for ac_c_preproc_warn_flag in '' yes
4064do
4065 # Use a header file that comes with gcc, so configuring glibc
4066 # with a fresh cross-compiler works.
4067 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4068 # <limits.h> exists even on freestanding compilers.
4069 # On the NeXT, cc -E runs the code through the compiler's parser,
4070 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4072/* end confdefs.h. */
4073#ifdef __STDC__
4074# include <limits.h>
4075#else
4076# include <assert.h>
4077#endif
4078 Syntax error
4079_ACEOF
81ecdfbb 4080if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4081
81ecdfbb 4082else
bec39cab
AC
4083 # Broken: fails on valid input.
4084continue
4085fi
d0ac1c44 4086rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4087
81ecdfbb 4088 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4089 # can be detected and how.
81ecdfbb 4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4091/* end confdefs.h. */
4092#include <ac_nonexistent.h>
4093_ACEOF
81ecdfbb 4094if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4095 # Broken: success on invalid input.
4096continue
8bb2c122 4097else
bec39cab
AC
4098 # Passes both tests.
4099ac_preproc_ok=:
4100break
8bb2c122 4101fi
d0ac1c44 4102rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4103
bec39cab
AC
4104done
4105# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4106rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4107if $ac_preproc_ok; then :
bec39cab
AC
4108 break
4109fi
8bb2c122 4110
bec39cab
AC
4111 done
4112 ac_cv_prog_CPP=$CPP
ddc9cd0f 4113
c906108c 4114fi
bec39cab
AC
4115 CPP=$ac_cv_prog_CPP
4116else
4117 ac_cv_prog_CPP=$CPP
c906108c 4118fi
81ecdfbb
RW
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4120$as_echo "$CPP" >&6; }
bec39cab
AC
4121ac_preproc_ok=false
4122for ac_c_preproc_warn_flag in '' yes
4123do
4124 # Use a header file that comes with gcc, so configuring glibc
4125 # with a fresh cross-compiler works.
4126 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4127 # <limits.h> exists even on freestanding compilers.
4128 # On the NeXT, cc -E runs the code through the compiler's parser,
4129 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4131/* end confdefs.h. */
4132#ifdef __STDC__
4133# include <limits.h>
4134#else
4135# include <assert.h>
4136#endif
4137 Syntax error
4138_ACEOF
81ecdfbb 4139if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4140
81ecdfbb 4141else
bec39cab
AC
4142 # Broken: fails on valid input.
4143continue
4144fi
d0ac1c44 4145rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4146
81ecdfbb 4147 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4148 # can be detected and how.
81ecdfbb 4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4150/* end confdefs.h. */
4151#include <ac_nonexistent.h>
4152_ACEOF
81ecdfbb 4153if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4154 # Broken: success on invalid input.
4155continue
c906108c 4156else
bec39cab
AC
4157 # Passes both tests.
4158ac_preproc_ok=:
4159break
c906108c 4160fi
d0ac1c44 4161rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4162
bec39cab
AC
4163done
4164# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4165rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4166if $ac_preproc_ok; then :
4167
c906108c 4168else
81ecdfbb
RW
4169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4171as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4172See \`config.log' for more details" "$LINENO" 5; }
c906108c 4173fi
c906108c 4174
bec39cab
AC
4175ac_ext=c
4176ac_cpp='$CPP $CPPFLAGS'
4177ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4178ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4179ac_compiler_gnu=$ac_cv_c_compiler_gnu
4180
4181
81ecdfbb
RW
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4183$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4184if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4185 $as_echo_n "(cached) " >&6
4e8d927d 4186else
81ecdfbb
RW
4187 if test -z "$GREP"; then
4188 ac_path_GREP_found=false
4189 # Loop through the user's path and test for each of PROGNAME-LIST
4190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4191for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4192do
4193 IFS=$as_save_IFS
4194 test -z "$as_dir" && as_dir=.
4195 for ac_prog in grep ggrep; do
4196 for ac_exec_ext in '' $ac_executable_extensions; do
4197 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4198 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4199# Check for GNU ac_path_GREP and select it if it is found.
4200 # Check for GNU $ac_path_GREP
4201case `"$ac_path_GREP" --version 2>&1` in
4202*GNU*)
4203 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4204*)
4205 ac_count=0
4206 $as_echo_n 0123456789 >"conftest.in"
4207 while :
4208 do
4209 cat "conftest.in" "conftest.in" >"conftest.tmp"
4210 mv "conftest.tmp" "conftest.in"
4211 cp "conftest.in" "conftest.nl"
4212 $as_echo 'GREP' >> "conftest.nl"
4213 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4214 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4215 as_fn_arith $ac_count + 1 && ac_count=$as_val
4216 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4217 # Best one so far, save it but keep looking for a better one
4218 ac_cv_path_GREP="$ac_path_GREP"
4219 ac_path_GREP_max=$ac_count
bec39cab 4220 fi
81ecdfbb
RW
4221 # 10*(2^10) chars as input seems more than enough
4222 test $ac_count -gt 10 && break
4223 done
4224 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4225esac
bec39cab 4226
81ecdfbb
RW
4227 $ac_path_GREP_found && break 3
4228 done
4229 done
4230 done
4231IFS=$as_save_IFS
4232 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4233 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4234 fi
c906108c 4235else
81ecdfbb 4236 ac_cv_path_GREP=$GREP
c906108c 4237fi
c906108c 4238
81ecdfbb
RW
4239fi
4240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4241$as_echo "$ac_cv_path_GREP" >&6; }
4242 GREP="$ac_cv_path_GREP"
c906108c 4243
c906108c 4244
81ecdfbb
RW
4245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4246$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4247if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4248 $as_echo_n "(cached) " >&6
783e057b 4249else
81ecdfbb
RW
4250 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4251 then ac_cv_path_EGREP="$GREP -E"
4252 else
4253 if test -z "$EGREP"; then
4254 ac_path_EGREP_found=false
4255 # Loop through the user's path and test for each of PROGNAME-LIST
4256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4258do
4259 IFS=$as_save_IFS
4260 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4261 for ac_prog in egrep; do
4262 for ac_exec_ext in '' $ac_executable_extensions; do
4263 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4264 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4265# Check for GNU ac_path_EGREP and select it if it is found.
4266 # Check for GNU $ac_path_EGREP
4267case `"$ac_path_EGREP" --version 2>&1` in
4268*GNU*)
4269 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4270*)
4271 ac_count=0
4272 $as_echo_n 0123456789 >"conftest.in"
4273 while :
4274 do
4275 cat "conftest.in" "conftest.in" >"conftest.tmp"
4276 mv "conftest.tmp" "conftest.in"
4277 cp "conftest.in" "conftest.nl"
4278 $as_echo 'EGREP' >> "conftest.nl"
4279 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4280 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4281 as_fn_arith $ac_count + 1 && ac_count=$as_val
4282 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4283 # Best one so far, save it but keep looking for a better one
4284 ac_cv_path_EGREP="$ac_path_EGREP"
4285 ac_path_EGREP_max=$ac_count
4286 fi
4287 # 10*(2^10) chars as input seems more than enough
4288 test $ac_count -gt 10 && break
4289 done
4290 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4291esac
bec39cab 4292
81ecdfbb
RW
4293 $ac_path_EGREP_found && break 3
4294 done
4295 done
4296 done
4297IFS=$as_save_IFS
4298 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4299 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4300 fi
783e057b 4301else
81ecdfbb 4302 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4303fi
4304
81ecdfbb 4305 fi
783e057b 4306fi
81ecdfbb
RW
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4308$as_echo "$ac_cv_path_EGREP" >&6; }
4309 EGREP="$ac_cv_path_EGREP"
4310
783e057b 4311
81ecdfbb
RW
4312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4313$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4314if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4315 $as_echo_n "(cached) " >&6
783e057b 4316else
81ecdfbb 4317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4318/* end confdefs.h. */
783e057b 4319#include <stdlib.h>
bec39cab 4320#include <stdarg.h>
783e057b
DJ
4321#include <string.h>
4322#include <float.h>
c906108c 4323
bec39cab
AC
4324int
4325main ()
4326{
c906108c 4327
bec39cab
AC
4328 ;
4329 return 0;
4330}
4331_ACEOF
81ecdfbb 4332if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4333 ac_cv_header_stdc=yes
c906108c 4334else
81ecdfbb 4335 ac_cv_header_stdc=no
c906108c 4336fi
81ecdfbb 4337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4338
783e057b
DJ
4339if test $ac_cv_header_stdc = yes; then
4340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4342/* end confdefs.h. */
4343#include <string.h>
c906108c 4344
783e057b
DJ
4345_ACEOF
4346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4347 $EGREP "memchr" >/dev/null 2>&1; then :
4348
c906108c 4349else
783e057b 4350 ac_cv_header_stdc=no
c906108c 4351fi
783e057b 4352rm -f conftest*
c906108c
SS
4353
4354fi
4355
783e057b
DJ
4356if test $ac_cv_header_stdc = yes; then
4357 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4359/* end confdefs.h. */
4360#include <stdlib.h>
bec39cab 4361
783e057b
DJ
4362_ACEOF
4363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4364 $EGREP "free" >/dev/null 2>&1; then :
4365
bec39cab 4366else
783e057b 4367 ac_cv_header_stdc=no
bec39cab 4368fi
783e057b 4369rm -f conftest*
bec39cab
AC
4370
4371fi
bec39cab 4372
783e057b
DJ
4373if test $ac_cv_header_stdc = yes; then
4374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4375 if test "$cross_compiling" = yes; then :
783e057b 4376 :
bec39cab 4377else
81ecdfbb 4378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4379/* end confdefs.h. */
4380#include <ctype.h>
81ecdfbb 4381#include <stdlib.h>
783e057b
DJ
4382#if ((' ' & 0x0FF) == 0x020)
4383# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4384# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4385#else
4386# define ISLOWER(c) \
4387 (('a' <= (c) && (c) <= 'i') \
4388 || ('j' <= (c) && (c) <= 'r') \
4389 || ('s' <= (c) && (c) <= 'z'))
4390# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4391#endif
4392
4393#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4394int
4395main ()
4396{
4397 int i;
4398 for (i = 0; i < 256; i++)
4399 if (XOR (islower (i), ISLOWER (i))
4400 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4401 return 2;
4402 return 0;
783e057b
DJ
4403}
4404_ACEOF
81ecdfbb 4405if ac_fn_c_try_run "$LINENO"; then :
783e057b 4406
81ecdfbb
RW
4407else
4408 ac_cv_header_stdc=no
783e057b 4409fi
81ecdfbb
RW
4410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4411 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4412fi
81ecdfbb 4413
783e057b
DJ
4414fi
4415fi
81ecdfbb
RW
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4417$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4418if test $ac_cv_header_stdc = yes; then
4419
81ecdfbb 4420$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4421
4422fi
4423
4424# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4425for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4426 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4427do :
4428 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4429ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4430"
d0ac1c44 4431if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4432 cat >>confdefs.h <<_ACEOF
81ecdfbb 4433#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4434_ACEOF
4435
4436fi
4437
4438done
4439
4440
4441
81ecdfbb 4442 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4443if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4444 MINIX=yes
4445else
4446 MINIX=
4447fi
4448
4449
4450 if test "$MINIX" = yes; then
4451
81ecdfbb 4452$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4453
4454
81ecdfbb 4455$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4456
4457
81ecdfbb 4458$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4459
4460 fi
4461
4462
81ecdfbb
RW
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4464$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4465if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4466 $as_echo_n "(cached) " >&6
783e057b 4467else
81ecdfbb 4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4469/* end confdefs.h. */
4470
d0ac1c44
SM
4471# define __EXTENSIONS__ 1
4472 $ac_includes_default
783e057b
DJ
4473int
4474main ()
4475{
4476
4477 ;
4478 return 0;
4479}
4480_ACEOF
81ecdfbb 4481if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4482 ac_cv_safe_to_define___extensions__=yes
4483else
81ecdfbb 4484 ac_cv_safe_to_define___extensions__=no
783e057b 4485fi
81ecdfbb 4486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4487fi
81ecdfbb
RW
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4489$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4490 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4491 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4492
81ecdfbb 4493 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4494
81ecdfbb 4495 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4496
81ecdfbb 4497 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4498
81ecdfbb 4499 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4500
4501
c971b7fa
PA
4502ac_aux_dir=
4503for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4504 if test -f "$ac_dir/install-sh"; then
4505 ac_aux_dir=$ac_dir
4506 ac_install_sh="$ac_aux_dir/install-sh -c"
4507 break
4508 elif test -f "$ac_dir/install.sh"; then
4509 ac_aux_dir=$ac_dir
4510 ac_install_sh="$ac_aux_dir/install.sh -c"
4511 break
4512 elif test -f "$ac_dir/shtool"; then
4513 ac_aux_dir=$ac_dir
4514 ac_install_sh="$ac_aux_dir/shtool install -c"
4515 break
4516 fi
c971b7fa
PA
4517done
4518if test -z "$ac_aux_dir"; then
d0ac1c44 4519 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4520fi
770d76d7 4521
c971b7fa
PA
4522# These three variables are undocumented and unsupported,
4523# and are intended to be withdrawn in a future Autoconf release.
4524# They can cause serious problems if a builder's source tree is in a directory
4525# whose full name contains unusual characters.
4526ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4527ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4528ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4529
770d76d7 4530
c971b7fa
PA
4531# Make sure we can run config.sub.
4532$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4533 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4534
c971b7fa
PA
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4536$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4537if ${ac_cv_build+:} false; then :
c971b7fa 4538 $as_echo_n "(cached) " >&6
770d76d7 4539else
c971b7fa
PA
4540 ac_build_alias=$build_alias
4541test "x$ac_build_alias" = x &&
4542 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4543test "x$ac_build_alias" = x &&
d0ac1c44 4544 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4545ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4546 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4547
770d76d7 4548fi
c971b7fa
PA
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4550$as_echo "$ac_cv_build" >&6; }
4551case $ac_cv_build in
4552*-*-*) ;;
d0ac1c44 4553*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4554esac
c971b7fa
PA
4555build=$ac_cv_build
4556ac_save_IFS=$IFS; IFS='-'
4557set x $ac_cv_build
4558shift
4559build_cpu=$1
4560build_vendor=$2
4561shift; shift
4562# Remember, the first character of IFS is used to create $*,
4563# except with old shells:
4564build_os=$*
4565IFS=$ac_save_IFS
4566case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4567
4568
c971b7fa
PA
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4570$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4571if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4572 $as_echo_n "(cached) " >&6
4573else
c971b7fa
PA
4574 if test "x$host_alias" = x; then
4575 ac_cv_host=$ac_cv_build
81ecdfbb 4576else
c971b7fa 4577 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4578 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4579fi
81ecdfbb
RW
4580
4581fi
c971b7fa
PA
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4583$as_echo "$ac_cv_host" >&6; }
4584case $ac_cv_host in
4585*-*-*) ;;
d0ac1c44 4586*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4587esac
c971b7fa
PA
4588host=$ac_cv_host
4589ac_save_IFS=$IFS; IFS='-'
4590set x $ac_cv_host
4591shift
4592host_cpu=$1
4593host_vendor=$2
4594shift; shift
4595# Remember, the first character of IFS is used to create $*,
4596# except with old shells:
4597host_os=$*
4598IFS=$ac_save_IFS
4599case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4600
4601
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4603$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4604if ${ac_cv_target+:} false; then :
3388710e
JM
4605 $as_echo_n "(cached) " >&6
4606else
4607 if test "x$target_alias" = x; then
4608 ac_cv_target=$ac_cv_host
4609else
4610 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4611 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4612fi
4613
4614fi
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4616$as_echo "$ac_cv_target" >&6; }
4617case $ac_cv_target in
4618*-*-*) ;;
d0ac1c44 4619*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4620esac
4621target=$ac_cv_target
4622ac_save_IFS=$IFS; IFS='-'
4623set x $ac_cv_target
4624shift
4625target_cpu=$1
4626target_vendor=$2
4627shift; shift
4628# Remember, the first character of IFS is used to create $*,
4629# except with old shells:
4630target_os=$*
4631IFS=$ac_save_IFS
4632case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4633
4634
4635# The aliases save the names the user supplied, while $host etc.
4636# will get canonicalized.
4637test -n "$target_alias" &&
4638 test "$program_prefix$program_suffix$program_transform_name" = \
4639 NONENONEs,x,x, &&
4640 program_prefix=${target_alias}-
4641
4642# The tests for host and target for $enable_largefile require
4643# canonical names.
4644
4645
81ecdfbb 4646
da2f07f1
JK
4647# As the $enable_largefile decision depends on --enable-plugins we must set it
4648# even in directories otherwise not depending on the $plugins option.
4649
4650
2974be62
AM
4651 maybe_plugins=no
4652 for ac_header in dlfcn.h
4653do :
4654 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4655"
d0ac1c44 4656if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4657 cat >>confdefs.h <<_ACEOF
4658#define HAVE_DLFCN_H 1
4659_ACEOF
4660 maybe_plugins=yes
4661fi
4662
4663done
4664
4665 for ac_header in windows.h
4666do :
4667 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4668"
d0ac1c44 4669if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4670 cat >>confdefs.h <<_ACEOF
4671#define HAVE_WINDOWS_H 1
4672_ACEOF
4673 maybe_plugins=yes
4674fi
4675
4676done
4677
4678
4679 # Check whether --enable-plugins was given.
da2f07f1
JK
4680if test "${enable_plugins+set}" = set; then :
4681 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4682 no) plugins=no ;;
4683 *) plugins=yes
4684 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4685 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4686 fi ;;
4687 esac
da2f07f1 4688else
2974be62
AM
4689 plugins=$maybe_plugins
4690
da2f07f1
JK
4691fi
4692
2974be62 4693 if test "$plugins" = "yes"; then
458412c3
TT
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4695$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4696if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4697 $as_echo_n "(cached) " >&6
4698else
4699 ac_func_search_save_LIBS=$LIBS
4700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701/* end confdefs.h. */
4702
4703/* Override any GCC internal prototype to avoid an error.
4704 Use char because int might match the return type of a GCC
4705 builtin and then its argument prototype would still apply. */
4706#ifdef __cplusplus
4707extern "C"
4708#endif
458412c3 4709char dlsym ();
2974be62
AM
4710int
4711main ()
4712{
458412c3 4713return dlsym ();
2974be62
AM
4714 ;
4715 return 0;
4716}
4717_ACEOF
4718for ac_lib in '' dl; do
4719 if test -z "$ac_lib"; then
4720 ac_res="none required"
4721 else
4722 ac_res=-l$ac_lib
4723 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4724 fi
4725 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4726 ac_cv_search_dlsym=$ac_res
2974be62
AM
4727fi
4728rm -f core conftest.err conftest.$ac_objext \
4729 conftest$ac_exeext
d0ac1c44 4730 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4731 break
4732fi
4733done
d0ac1c44 4734if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4735
4736else
458412c3 4737 ac_cv_search_dlsym=no
2974be62
AM
4738fi
4739rm conftest.$ac_ext
4740LIBS=$ac_func_search_save_LIBS
4741fi
458412c3
TT
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4743$as_echo "$ac_cv_search_dlsym" >&6; }
4744ac_res=$ac_cv_search_dlsym
2974be62
AM
4745if test "$ac_res" != no; then :
4746 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4747
4748fi
4749
4750 fi
da2f07f1
JK
4751
4752
4753case "${host}" in
4754 sparc-*-solaris*|i[3-7]86-*-solaris*)
4755 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4756 # are mutually exclusive; and without procfs support, the bfd/ elf module
4757 # cannot provide certain routines such as elfcore_write_prpsinfo
4758 # or elfcore_write_prstatus. So unless the user explicitly requested
4759 # large-file support through the --enable-largefile switch, disable
4760 # large-file support in favor of procfs support.
4761 test "${target}" = "${host}" -a "x$plugins" = xno \
4762 && : ${enable_largefile="no"}
4763 ;;
4764esac
4765
4766# Check whether --enable-largefile was given.
4767if test "${enable_largefile+set}" = set; then :
4768 enableval=$enable_largefile;
4769fi
4770
4771if test "$enable_largefile" != no; then
4772
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4774$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4775if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4776 $as_echo_n "(cached) " >&6
4777else
4778 ac_cv_sys_largefile_CC=no
4779 if test "$GCC" != yes; then
4780 ac_save_CC=$CC
4781 while :; do
4782 # IRIX 6.2 and later do not support large files by default,
4783 # so use the C compiler's -n32 option if that helps.
4784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785/* end confdefs.h. */
4786#include <sys/types.h>
4787 /* Check that off_t can represent 2**63 - 1 correctly.
4788 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4789 since some C++ compilers masquerading as C compilers
4790 incorrectly reject 9223372036854775807. */
4791#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4792 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4793 && LARGE_OFF_T % 2147483647 == 1)
4794 ? 1 : -1];
4795int
4796main ()
4797{
4798
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803 if ac_fn_c_try_compile "$LINENO"; then :
4804 break
4805fi
4806rm -f core conftest.err conftest.$ac_objext
4807 CC="$CC -n32"
4808 if ac_fn_c_try_compile "$LINENO"; then :
4809 ac_cv_sys_largefile_CC=' -n32'; break
4810fi
4811rm -f core conftest.err conftest.$ac_objext
4812 break
4813 done
4814 CC=$ac_save_CC
4815 rm -f conftest.$ac_ext
4816 fi
4817fi
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4819$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4820 if test "$ac_cv_sys_largefile_CC" != no; then
4821 CC=$CC$ac_cv_sys_largefile_CC
4822 fi
4823
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4825$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4826if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4827 $as_echo_n "(cached) " >&6
4828else
4829 while :; do
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831/* end confdefs.h. */
4832#include <sys/types.h>
4833 /* Check that off_t can represent 2**63 - 1 correctly.
4834 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4835 since some C++ compilers masquerading as C compilers
4836 incorrectly reject 9223372036854775807. */
4837#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4838 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4839 && LARGE_OFF_T % 2147483647 == 1)
4840 ? 1 : -1];
4841int
4842main ()
4843{
4844
4845 ;
4846 return 0;
4847}
4848_ACEOF
4849if ac_fn_c_try_compile "$LINENO"; then :
4850 ac_cv_sys_file_offset_bits=no; break
4851fi
4852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4854/* end confdefs.h. */
4855#define _FILE_OFFSET_BITS 64
4856#include <sys/types.h>
4857 /* Check that off_t can represent 2**63 - 1 correctly.
4858 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4859 since some C++ compilers masquerading as C compilers
4860 incorrectly reject 9223372036854775807. */
4861#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4862 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4863 && LARGE_OFF_T % 2147483647 == 1)
4864 ? 1 : -1];
4865int
4866main ()
4867{
4868
4869 ;
4870 return 0;
4871}
4872_ACEOF
4873if ac_fn_c_try_compile "$LINENO"; then :
4874 ac_cv_sys_file_offset_bits=64; break
4875fi
4876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4877 ac_cv_sys_file_offset_bits=unknown
4878 break
4879done
4880fi
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4882$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4883case $ac_cv_sys_file_offset_bits in #(
4884 no | unknown) ;;
4885 *)
4886cat >>confdefs.h <<_ACEOF
4887#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4888_ACEOF
4889;;
4890esac
4891rm -rf conftest*
4892 if test $ac_cv_sys_file_offset_bits = unknown; then
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4894$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4895if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4896 $as_echo_n "(cached) " >&6
4897else
4898 while :; do
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900/* end confdefs.h. */
4901#include <sys/types.h>
4902 /* Check that off_t can represent 2**63 - 1 correctly.
4903 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4904 since some C++ compilers masquerading as C compilers
4905 incorrectly reject 9223372036854775807. */
4906#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4907 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4908 && LARGE_OFF_T % 2147483647 == 1)
4909 ? 1 : -1];
4910int
4911main ()
4912{
4913
4914 ;
4915 return 0;
4916}
4917_ACEOF
4918if ac_fn_c_try_compile "$LINENO"; then :
4919 ac_cv_sys_large_files=no; break
4920fi
4921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923/* end confdefs.h. */
4924#define _LARGE_FILES 1
4925#include <sys/types.h>
4926 /* Check that off_t can represent 2**63 - 1 correctly.
4927 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4928 since some C++ compilers masquerading as C compilers
4929 incorrectly reject 9223372036854775807. */
4930#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4931 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4932 && LARGE_OFF_T % 2147483647 == 1)
4933 ? 1 : -1];
4934int
4935main ()
4936{
4937
4938 ;
4939 return 0;
4940}
4941_ACEOF
4942if ac_fn_c_try_compile "$LINENO"; then :
4943 ac_cv_sys_large_files=1; break
4944fi
4945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946 ac_cv_sys_large_files=unknown
4947 break
4948done
4949fi
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4951$as_echo "$ac_cv_sys_large_files" >&6; }
4952case $ac_cv_sys_large_files in #(
4953 no | unknown) ;;
4954 *)
4955cat >>confdefs.h <<_ACEOF
4956#define _LARGE_FILES $ac_cv_sys_large_files
4957_ACEOF
4958;;
4959esac
4960rm -rf conftest*
4961 fi
d0ac1c44
SM
4962
4963
da2f07f1
JK
4964fi
4965
4966
4967
81ecdfbb
RW
4968
4969
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4971$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4972if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4973 $as_echo_n "(cached) " >&6
4974else
4975 am_cv_prog_cc_stdc=no
4976ac_save_CC="$CC"
4977# Don't try gcc -ansi; that turns off useful extensions and
4978# breaks some systems' header files.
4979# AIX -qlanglvl=ansi
4980# Ultrix and OSF/1 -std1
4981# HP-UX 10.20 and later -Ae
4982# HP-UX older versions -Aa -D_HPUX_SOURCE
4983# SVR4 -Xc -D__EXTENSIONS__
4984for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4985do
783e057b 4986 CC="$ac_save_CC $ac_arg"
81ecdfbb 4987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4988/* end confdefs.h. */
4989#include <stdarg.h>
4990#include <stdio.h>
4991#include <sys/types.h>
4992#include <sys/stat.h>
4993/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4994struct buf { int x; };
4995FILE * (*rcsopen) (struct buf *, struct stat *, int);
4996static char *e (p, i)
4997 char **p;
4998 int i;
4999{
5000 return p[i];
5001}
5002static char *f (char * (*g) (char **, int), char **p, ...)
5003{
5004 char *s;
5005 va_list v;
5006 va_start (v,p);
5007 s = g (p, va_arg (v,int));
5008 va_end (v);
5009 return s;
5010}
5011int test (int i, double x);
5012struct s1 {int (*f) (int a);};
5013struct s2 {int (*f) (double a);};
5014int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5015int argc;
5016char **argv;
5017
5018int
5019main ()
5020{
5021
5022return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5023
5024 ;
5025 return 0;
5026}
5027_ACEOF
81ecdfbb 5028if ac_fn_c_try_compile "$LINENO"; then :
783e057b 5029 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 5030fi
81ecdfbb 5031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
5032done
5033CC="$ac_save_CC"
5034
5035fi
5036
5037if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5039$as_echo "none needed" >&6; }
783e057b 5040else
81ecdfbb
RW
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5042$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
5043fi
5044case "x$am_cv_prog_cc_stdc" in
5045 x|xno) ;;
5046 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5047esac
5048
d0ac1c44
SM
5049# Expand $ac_aux_dir to an absolute path.
5050am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5051
d0ac1c44 5052if test x"${install_sh+set}" != xset; then
4869db5e
RM
5053 case $am_aux_dir in
5054 *\ * | *\ *)
5055 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5056 *)
5057 install_sh="\${SHELL} $am_aux_dir/install-sh"
5058 esac
5059fi
5060
d0ac1c44
SM
5061# Installed binaries are usually stripped using 'strip' when the user
5062# run "make install-strip". However 'strip' might not be the right
4869db5e 5063# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5064# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5065if test "$cross_compiling" != no; then
5066 if test -n "$ac_tool_prefix"; then
5067 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5068set dummy ${ac_tool_prefix}strip; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5071if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5072 $as_echo_n "(cached) " >&6
5073else
5074 if test -n "$STRIP"; then
5075 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5084 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
5088done
5089 done
5090IFS=$as_save_IFS
5091
5092fi
5093fi
5094STRIP=$ac_cv_prog_STRIP
5095if test -n "$STRIP"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5097$as_echo "$STRIP" >&6; }
5098else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104fi
5105if test -z "$ac_cv_prog_STRIP"; then
5106 ac_ct_STRIP=$STRIP
5107 # Extract the first word of "strip", so it can be a program name with args.
5108set dummy strip; ac_word=$2
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5111if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5112 $as_echo_n "(cached) " >&6
5113else
5114 if test -n "$ac_ct_STRIP"; then
5115 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
5122 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5124 ac_cv_prog_ac_ct_STRIP="strip"
5125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5126 break 2
5127 fi
5128done
5129 done
5130IFS=$as_save_IFS
5131
5132fi
5133fi
5134ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5135if test -n "$ac_ct_STRIP"; then
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5137$as_echo "$ac_ct_STRIP" >&6; }
5138else
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
5141fi
5142
5143 if test "x$ac_ct_STRIP" = x; then
5144 STRIP=":"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147yes:)
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5150ac_tool_warned=yes ;;
5151esac
5152 STRIP=$ac_ct_STRIP
5153 fi
5154else
5155 STRIP="$ac_cv_prog_STRIP"
5156fi
5157
5158fi
5159INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5160
783e057b
DJ
5161
5162ac_aux_dir=
81ecdfbb 5163for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5164 if test -f "$ac_dir/install-sh"; then
5165 ac_aux_dir=$ac_dir
5166 ac_install_sh="$ac_aux_dir/install-sh -c"
5167 break
5168 elif test -f "$ac_dir/install.sh"; then
5169 ac_aux_dir=$ac_dir
5170 ac_install_sh="$ac_aux_dir/install.sh -c"
5171 break
5172 elif test -f "$ac_dir/shtool"; then
5173 ac_aux_dir=$ac_dir
5174 ac_install_sh="$ac_aux_dir/shtool install -c"
5175 break
5176 fi
783e057b
DJ
5177done
5178if test -z "$ac_aux_dir"; then
d0ac1c44 5179 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5180fi
81ecdfbb
RW
5181
5182# These three variables are undocumented and unsupported,
5183# and are intended to be withdrawn in a future Autoconf release.
5184# They can cause serious problems if a builder's source tree is in a directory
5185# whose full name contains unusual characters.
5186ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5187ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5188ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5189
783e057b 5190
783e057b 5191
9009e1ae
MR
5192test "$program_prefix" != NONE &&
5193 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5194# Use a double $ so make ignores it.
5195test "$program_suffix" != NONE &&
5196 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5197# Double any \ or $.
5198# By default was `s,x,x', remove it if useless.
5199ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5200program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5201
81ecdfbb 5202
0bcda685
PA
5203# We require a C++11 compiler. Check if one is available, and if
5204# necessary, set CXX_DIALECT to some -std=xxx switch.
5205
41260ac2 5206 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5207 ac_ext=cpp
5208ac_cpp='$CXXCPP $CPPFLAGS'
5209ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5210ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5211ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5212 CXX_DIALECT=""
5213 ac_success=no
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5215$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5216if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5217 $as_echo_n "(cached) " >&6
5218else
5219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220/* end confdefs.h. */
5221
5222
5223// If the compiler admits that it is not ready for C++11, why torture it?
5224// Hopefully, this will speed up the test.
5225
5226#ifndef __cplusplus
5227
5228#error "This is not a C++ compiler"
5229
5230#elif __cplusplus < 201103L
5231
5232#error "This is not a C++11 compiler"
5233
5234#else
5235
5236namespace cxx11
5237{
5238
5239 namespace test_static_assert
5240 {
5241
5242 template <typename T>
5243 struct check
5244 {
5245 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5246 };
5247
5248 }
5249
5250 namespace test_final_override
5251 {
5252
5253 struct Base
5254 {
5255 virtual void f() {}
5256 };
5257
5258 struct Derived : public Base
5259 {
5260 virtual void f() override {}
5261 };
5262
5263 }
5264
5265 namespace test_double_right_angle_brackets
5266 {
5267
5268 template < typename T >
5269 struct check {};
5270
5271 typedef check<void> single_type;
5272 typedef check<check<void>> double_type;
5273 typedef check<check<check<void>>> triple_type;
5274 typedef check<check<check<check<void>>>> quadruple_type;
5275
5276 }
5277
5278 namespace test_decltype
5279 {
5280
5281 int
5282 f()
5283 {
5284 int a = 1;
5285 decltype(a) b = 2;
5286 return a + b;
5287 }
5288
5289 }
5290
5291 namespace test_type_deduction
5292 {
5293
5294 template < typename T1, typename T2 >
5295 struct is_same
5296 {
5297 static const bool value = false;
5298 };
5299
5300 template < typename T >
5301 struct is_same<T, T>
5302 {
5303 static const bool value = true;
5304 };
5305
5306 template < typename T1, typename T2 >
5307 auto
5308 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5309 {
5310 return a1 + a2;
5311 }
5312
5313 int
5314 test(const int c, volatile int v)
5315 {
5316 static_assert(is_same<int, decltype(0)>::value == true, "");
5317 static_assert(is_same<int, decltype(c)>::value == false, "");
5318 static_assert(is_same<int, decltype(v)>::value == false, "");
5319 auto ac = c;
5320 auto av = v;
5321 auto sumi = ac + av + 'x';
5322 auto sumf = ac + av + 1.0;
5323 static_assert(is_same<int, decltype(ac)>::value == true, "");
5324 static_assert(is_same<int, decltype(av)>::value == true, "");
5325 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5326 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5327 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5328 return (sumf > 0.0) ? sumi : add(c, v);
5329 }
5330
5331 }
5332
5333 namespace test_noexcept
5334 {
5335
5336 int f() { return 0; }
5337 int g() noexcept { return 0; }
5338
5339 static_assert(noexcept(f()) == false, "");
5340 static_assert(noexcept(g()) == true, "");
5341
5342 }
5343
5344 namespace test_constexpr
5345 {
5346
5347 template < typename CharT >
5348 unsigned long constexpr
5349 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5350 {
5351 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5352 }
5353
5354 template < typename CharT >
5355 unsigned long constexpr
5356 strlen_c(const CharT *const s) noexcept
5357 {
5358 return strlen_c_r(s, 0UL);
5359 }
5360
5361 static_assert(strlen_c("") == 0UL, "");
5362 static_assert(strlen_c("1") == 1UL, "");
5363 static_assert(strlen_c("example") == 7UL, "");
5364 static_assert(strlen_c("another\0example") == 7UL, "");
5365
5366 }
5367
5368 namespace test_rvalue_references
5369 {
5370
5371 template < int N >
5372 struct answer
5373 {
5374 static constexpr int value = N;
5375 };
5376
5377 answer<1> f(int&) { return answer<1>(); }
5378 answer<2> f(const int&) { return answer<2>(); }
5379 answer<3> f(int&&) { return answer<3>(); }
5380
5381 void
5382 test()
5383 {
5384 int i = 0;
5385 const int c = 0;
5386 static_assert(decltype(f(i))::value == 1, "");
5387 static_assert(decltype(f(c))::value == 2, "");
5388 static_assert(decltype(f(0))::value == 3, "");
5389 }
5390
5391 }
5392
5393 namespace test_uniform_initialization
5394 {
5395
5396 struct test
5397 {
5398 static const int zero {};
5399 static const int one {1};
5400 };
5401
5402 static_assert(test::zero == 0, "");
5403 static_assert(test::one == 1, "");
5404
5405 }
5406
5407 namespace test_lambdas
5408 {
5409
5410 void
5411 test1()
5412 {
5413 auto lambda1 = [](){};
5414 auto lambda2 = lambda1;
5415 lambda1();
5416 lambda2();
5417 }
5418
5419 int
5420 test2()
5421 {
5422 auto a = [](int i, int j){ return i + j; }(1, 2);
5423 auto b = []() -> int { return '0'; }();
5424 auto c = [=](){ return a + b; }();
5425 auto d = [&](){ return c; }();
5426 auto e = [a, &b](int x) mutable {
5427 const auto identity = [](int y){ return y; };
5428 for (auto i = 0; i < a; ++i)
5429 a += b--;
5430 return x + identity(a + b);
5431 }(0);
5432 return a + b + c + d + e;
5433 }
5434
5435 int
5436 test3()
5437 {
5438 const auto nullary = [](){ return 0; };
5439 const auto unary = [](int x){ return x; };
5440 using nullary_t = decltype(nullary);
5441 using unary_t = decltype(unary);
5442 const auto higher1st = [](nullary_t f){ return f(); };
5443 const auto higher2nd = [unary](nullary_t f1){
5444 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5445 };
5446 return higher1st(nullary) + higher2nd(nullary)(unary);
5447 }
5448
5449 }
5450
5451 namespace test_variadic_templates
5452 {
5453
5454 template <int...>
5455 struct sum;
5456
5457 template <int N0, int... N1toN>
5458 struct sum<N0, N1toN...>
5459 {
5460 static constexpr auto value = N0 + sum<N1toN...>::value;
5461 };
5462
5463 template <>
5464 struct sum<>
5465 {
5466 static constexpr auto value = 0;
5467 };
5468
5469 static_assert(sum<>::value == 0, "");
5470 static_assert(sum<1>::value == 1, "");
5471 static_assert(sum<23>::value == 23, "");
5472 static_assert(sum<1, 2>::value == 3, "");
5473 static_assert(sum<5, 5, 11>::value == 21, "");
5474 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5475
5476 }
5477
5478 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5479 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5480 // because of this.
5481 namespace test_template_alias_sfinae
5482 {
5483
5484 struct foo {};
5485
5486 template<typename T>
5487 using member = typename T::member_type;
5488
5489 template<typename T>
5490 void func(...) {}
5491
5492 template<typename T>
5493 void func(member<T>*) {}
5494
5495 void test();
5496
5497 void test() { func<foo>(0); }
5498
5499 }
5500
5501} // namespace cxx11
5502
5503#endif // __cplusplus >= 201103L
5504
5505
5506
5507_ACEOF
5508if ac_fn_cxx_try_compile "$LINENO"; then :
5509 ax_cv_cxx_compile_cxx11=yes
5510else
5511 ax_cv_cxx_compile_cxx11=no
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514fi
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5516$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5517 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5518 ac_success=yes
5519 fi
5520
5521 if test x$ac_success = xno; then
41260ac2
SM
5522 for alternative in ${ax_cxx_compile_alternatives}; do
5523 switch="-std=gnu++${alternative}"
0bcda685
PA
5524 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5526$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5527if eval \${$cachevar+:} false; then :
0bcda685
PA
5528 $as_echo_n "(cached) " >&6
5529else
5530 ac_save_CXX="$CXX"
5531 CXX="$CXX $switch"
5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533/* end confdefs.h. */
5534
5535
5536// If the compiler admits that it is not ready for C++11, why torture it?
5537// Hopefully, this will speed up the test.
5538
5539#ifndef __cplusplus
5540
5541#error "This is not a C++ compiler"
5542
5543#elif __cplusplus < 201103L
5544
5545#error "This is not a C++11 compiler"
5546
5547#else
5548
5549namespace cxx11
5550{
5551
5552 namespace test_static_assert
5553 {
5554
5555 template <typename T>
5556 struct check
5557 {
5558 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5559 };
5560
5561 }
5562
5563 namespace test_final_override
5564 {
5565
5566 struct Base
5567 {
5568 virtual void f() {}
5569 };
5570
5571 struct Derived : public Base
5572 {
5573 virtual void f() override {}
5574 };
5575
5576 }
5577
5578 namespace test_double_right_angle_brackets
5579 {
5580
5581 template < typename T >
5582 struct check {};
5583
5584 typedef check<void> single_type;
5585 typedef check<check<void>> double_type;
5586 typedef check<check<check<void>>> triple_type;
5587 typedef check<check<check<check<void>>>> quadruple_type;
5588
5589 }
5590
5591 namespace test_decltype
5592 {
5593
5594 int
5595 f()
5596 {
5597 int a = 1;
5598 decltype(a) b = 2;
5599 return a + b;
5600 }
5601
5602 }
5603
5604 namespace test_type_deduction
5605 {
5606
5607 template < typename T1, typename T2 >
5608 struct is_same
5609 {
5610 static const bool value = false;
5611 };
5612
5613 template < typename T >
5614 struct is_same<T, T>
5615 {
5616 static const bool value = true;
5617 };
5618
5619 template < typename T1, typename T2 >
5620 auto
5621 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5622 {
5623 return a1 + a2;
5624 }
5625
5626 int
5627 test(const int c, volatile int v)
5628 {
5629 static_assert(is_same<int, decltype(0)>::value == true, "");
5630 static_assert(is_same<int, decltype(c)>::value == false, "");
5631 static_assert(is_same<int, decltype(v)>::value == false, "");
5632 auto ac = c;
5633 auto av = v;
5634 auto sumi = ac + av + 'x';
5635 auto sumf = ac + av + 1.0;
5636 static_assert(is_same<int, decltype(ac)>::value == true, "");
5637 static_assert(is_same<int, decltype(av)>::value == true, "");
5638 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5639 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5640 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5641 return (sumf > 0.0) ? sumi : add(c, v);
5642 }
5643
5644 }
5645
5646 namespace test_noexcept
5647 {
5648
5649 int f() { return 0; }
5650 int g() noexcept { return 0; }
5651
5652 static_assert(noexcept(f()) == false, "");
5653 static_assert(noexcept(g()) == true, "");
5654
5655 }
5656
5657 namespace test_constexpr
5658 {
5659
5660 template < typename CharT >
5661 unsigned long constexpr
5662 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5663 {
5664 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5665 }
5666
5667 template < typename CharT >
5668 unsigned long constexpr
5669 strlen_c(const CharT *const s) noexcept
5670 {
5671 return strlen_c_r(s, 0UL);
5672 }
5673
5674 static_assert(strlen_c("") == 0UL, "");
5675 static_assert(strlen_c("1") == 1UL, "");
5676 static_assert(strlen_c("example") == 7UL, "");
5677 static_assert(strlen_c("another\0example") == 7UL, "");
5678
5679 }
5680
5681 namespace test_rvalue_references
5682 {
5683
5684 template < int N >
5685 struct answer
5686 {
5687 static constexpr int value = N;
5688 };
5689
5690 answer<1> f(int&) { return answer<1>(); }
5691 answer<2> f(const int&) { return answer<2>(); }
5692 answer<3> f(int&&) { return answer<3>(); }
5693
5694 void
5695 test()
5696 {
5697 int i = 0;
5698 const int c = 0;
5699 static_assert(decltype(f(i))::value == 1, "");
5700 static_assert(decltype(f(c))::value == 2, "");
5701 static_assert(decltype(f(0))::value == 3, "");
5702 }
5703
5704 }
5705
5706 namespace test_uniform_initialization
5707 {
5708
5709 struct test
5710 {
5711 static const int zero {};
5712 static const int one {1};
5713 };
5714
5715 static_assert(test::zero == 0, "");
5716 static_assert(test::one == 1, "");
5717
5718 }
5719
5720 namespace test_lambdas
5721 {
5722
5723 void
5724 test1()
5725 {
5726 auto lambda1 = [](){};
5727 auto lambda2 = lambda1;
5728 lambda1();
5729 lambda2();
5730 }
5731
5732 int
5733 test2()
5734 {
5735 auto a = [](int i, int j){ return i + j; }(1, 2);
5736 auto b = []() -> int { return '0'; }();
5737 auto c = [=](){ return a + b; }();
5738 auto d = [&](){ return c; }();
5739 auto e = [a, &b](int x) mutable {
5740 const auto identity = [](int y){ return y; };
5741 for (auto i = 0; i < a; ++i)
5742 a += b--;
5743 return x + identity(a + b);
5744 }(0);
5745 return a + b + c + d + e;
5746 }
5747
5748 int
5749 test3()
5750 {
5751 const auto nullary = [](){ return 0; };
5752 const auto unary = [](int x){ return x; };
5753 using nullary_t = decltype(nullary);
5754 using unary_t = decltype(unary);
5755 const auto higher1st = [](nullary_t f){ return f(); };
5756 const auto higher2nd = [unary](nullary_t f1){
5757 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5758 };
5759 return higher1st(nullary) + higher2nd(nullary)(unary);
5760 }
5761
5762 }
5763
5764 namespace test_variadic_templates
5765 {
5766
5767 template <int...>
5768 struct sum;
5769
5770 template <int N0, int... N1toN>
5771 struct sum<N0, N1toN...>
5772 {
5773 static constexpr auto value = N0 + sum<N1toN...>::value;
5774 };
5775
5776 template <>
5777 struct sum<>
5778 {
5779 static constexpr auto value = 0;
5780 };
5781
5782 static_assert(sum<>::value == 0, "");
5783 static_assert(sum<1>::value == 1, "");
5784 static_assert(sum<23>::value == 23, "");
5785 static_assert(sum<1, 2>::value == 3, "");
5786 static_assert(sum<5, 5, 11>::value == 21, "");
5787 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5788
5789 }
5790
5791 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5792 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5793 // because of this.
5794 namespace test_template_alias_sfinae
5795 {
5796
5797 struct foo {};
5798
5799 template<typename T>
5800 using member = typename T::member_type;
5801
5802 template<typename T>
5803 void func(...) {}
5804
5805 template<typename T>
5806 void func(member<T>*) {}
5807
5808 void test();
5809
5810 void test() { func<foo>(0); }
5811
5812 }
5813
5814} // namespace cxx11
5815
5816#endif // __cplusplus >= 201103L
5817
5818
5819
5820_ACEOF
5821if ac_fn_cxx_try_compile "$LINENO"; then :
5822 eval $cachevar=yes
5823else
5824 eval $cachevar=no
5825fi
5826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5827 CXX="$ac_save_CXX"
5828fi
5829eval ac_res=\$$cachevar
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5831$as_echo "$ac_res" >&6; }
5832 if eval test x\$$cachevar = xyes; then
5833 CXX_DIALECT="$switch"
5834 ac_success=yes
5835 break
5836 fi
5837 done
5838 fi
5839
5840 if test x$ac_success = xno; then
41260ac2
SM
5841 for alternative in ${ax_cxx_compile_alternatives}; do
5842 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5843 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5845$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5846if eval \${$cachevar+:} false; then :
0bcda685
PA
5847 $as_echo_n "(cached) " >&6
5848else
5849 ac_save_CXX="$CXX"
41260ac2
SM
5850 CXX="$CXX $switch"
5851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5852/* end confdefs.h. */
5853
5854
5855// If the compiler admits that it is not ready for C++11, why torture it?
5856// Hopefully, this will speed up the test.
5857
5858#ifndef __cplusplus
5859
5860#error "This is not a C++ compiler"
5861
5862#elif __cplusplus < 201103L
5863
5864#error "This is not a C++11 compiler"
5865
5866#else
5867
5868namespace cxx11
5869{
5870
5871 namespace test_static_assert
5872 {
5873
5874 template <typename T>
5875 struct check
5876 {
5877 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5878 };
5879
5880 }
5881
5882 namespace test_final_override
5883 {
5884
5885 struct Base
5886 {
5887 virtual void f() {}
5888 };
5889
5890 struct Derived : public Base
5891 {
5892 virtual void f() override {}
5893 };
5894
5895 }
5896
5897 namespace test_double_right_angle_brackets
5898 {
5899
5900 template < typename T >
5901 struct check {};
5902
5903 typedef check<void> single_type;
5904 typedef check<check<void>> double_type;
5905 typedef check<check<check<void>>> triple_type;
5906 typedef check<check<check<check<void>>>> quadruple_type;
5907
5908 }
5909
5910 namespace test_decltype
5911 {
5912
5913 int
5914 f()
5915 {
5916 int a = 1;
5917 decltype(a) b = 2;
5918 return a + b;
5919 }
5920
5921 }
5922
5923 namespace test_type_deduction
5924 {
5925
5926 template < typename T1, typename T2 >
5927 struct is_same
5928 {
5929 static const bool value = false;
5930 };
5931
5932 template < typename T >
5933 struct is_same<T, T>
5934 {
5935 static const bool value = true;
5936 };
5937
5938 template < typename T1, typename T2 >
5939 auto
5940 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5941 {
5942 return a1 + a2;
5943 }
5944
5945 int
5946 test(const int c, volatile int v)
5947 {
5948 static_assert(is_same<int, decltype(0)>::value == true, "");
5949 static_assert(is_same<int, decltype(c)>::value == false, "");
5950 static_assert(is_same<int, decltype(v)>::value == false, "");
5951 auto ac = c;
5952 auto av = v;
5953 auto sumi = ac + av + 'x';
5954 auto sumf = ac + av + 1.0;
5955 static_assert(is_same<int, decltype(ac)>::value == true, "");
5956 static_assert(is_same<int, decltype(av)>::value == true, "");
5957 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5958 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5959 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5960 return (sumf > 0.0) ? sumi : add(c, v);
5961 }
5962
5963 }
5964
5965 namespace test_noexcept
5966 {
5967
5968 int f() { return 0; }
5969 int g() noexcept { return 0; }
5970
5971 static_assert(noexcept(f()) == false, "");
5972 static_assert(noexcept(g()) == true, "");
5973
5974 }
5975
5976 namespace test_constexpr
5977 {
5978
5979 template < typename CharT >
5980 unsigned long constexpr
5981 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5982 {
5983 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5984 }
5985
5986 template < typename CharT >
5987 unsigned long constexpr
5988 strlen_c(const CharT *const s) noexcept
5989 {
5990 return strlen_c_r(s, 0UL);
5991 }
5992
5993 static_assert(strlen_c("") == 0UL, "");
5994 static_assert(strlen_c("1") == 1UL, "");
5995 static_assert(strlen_c("example") == 7UL, "");
5996 static_assert(strlen_c("another\0example") == 7UL, "");
5997
5998 }
5999
6000 namespace test_rvalue_references
6001 {
6002
6003 template < int N >
6004 struct answer
6005 {
6006 static constexpr int value = N;
6007 };
6008
6009 answer<1> f(int&) { return answer<1>(); }
6010 answer<2> f(const int&) { return answer<2>(); }
6011 answer<3> f(int&&) { return answer<3>(); }
6012
6013 void
6014 test()
6015 {
6016 int i = 0;
6017 const int c = 0;
6018 static_assert(decltype(f(i))::value == 1, "");
6019 static_assert(decltype(f(c))::value == 2, "");
6020 static_assert(decltype(f(0))::value == 3, "");
6021 }
6022
6023 }
6024
6025 namespace test_uniform_initialization
6026 {
6027
6028 struct test
6029 {
6030 static const int zero {};
6031 static const int one {1};
6032 };
6033
6034 static_assert(test::zero == 0, "");
6035 static_assert(test::one == 1, "");
6036
6037 }
6038
6039 namespace test_lambdas
6040 {
6041
6042 void
6043 test1()
6044 {
6045 auto lambda1 = [](){};
6046 auto lambda2 = lambda1;
6047 lambda1();
6048 lambda2();
6049 }
6050
6051 int
6052 test2()
6053 {
6054 auto a = [](int i, int j){ return i + j; }(1, 2);
6055 auto b = []() -> int { return '0'; }();
6056 auto c = [=](){ return a + b; }();
6057 auto d = [&](){ return c; }();
6058 auto e = [a, &b](int x) mutable {
6059 const auto identity = [](int y){ return y; };
6060 for (auto i = 0; i < a; ++i)
6061 a += b--;
6062 return x + identity(a + b);
6063 }(0);
6064 return a + b + c + d + e;
6065 }
6066
6067 int
6068 test3()
6069 {
6070 const auto nullary = [](){ return 0; };
6071 const auto unary = [](int x){ return x; };
6072 using nullary_t = decltype(nullary);
6073 using unary_t = decltype(unary);
6074 const auto higher1st = [](nullary_t f){ return f(); };
6075 const auto higher2nd = [unary](nullary_t f1){
6076 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6077 };
6078 return higher1st(nullary) + higher2nd(nullary)(unary);
6079 }
6080
6081 }
6082
6083 namespace test_variadic_templates
6084 {
6085
6086 template <int...>
6087 struct sum;
6088
6089 template <int N0, int... N1toN>
6090 struct sum<N0, N1toN...>
6091 {
6092 static constexpr auto value = N0 + sum<N1toN...>::value;
6093 };
6094
6095 template <>
6096 struct sum<>
6097 {
6098 static constexpr auto value = 0;
6099 };
6100
6101 static_assert(sum<>::value == 0, "");
6102 static_assert(sum<1>::value == 1, "");
6103 static_assert(sum<23>::value == 23, "");
6104 static_assert(sum<1, 2>::value == 3, "");
6105 static_assert(sum<5, 5, 11>::value == 21, "");
6106 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6107
6108 }
6109
6110 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6111 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6112 // because of this.
6113 namespace test_template_alias_sfinae
6114 {
6115
6116 struct foo {};
6117
6118 template<typename T>
6119 using member = typename T::member_type;
6120
6121 template<typename T>
6122 void func(...) {}
6123
6124 template<typename T>
6125 void func(member<T>*) {}
6126
6127 void test();
6128
6129 void test() { func<foo>(0); }
6130
6131 }
6132
6133} // namespace cxx11
6134
6135#endif // __cplusplus >= 201103L
6136
6137
6138
6139_ACEOF
6140if ac_fn_cxx_try_compile "$LINENO"; then :
6141 eval $cachevar=yes
6142else
6143 eval $cachevar=no
6144fi
6145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6146 CXX="$ac_save_CXX"
0bcda685
PA
6147fi
6148eval ac_res=\$$cachevar
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6150$as_echo "$ac_res" >&6; }
41260ac2
SM
6151 if eval test x\$$cachevar = xyes; then
6152 CXX_DIALECT="$switch"
6153 ac_success=yes
6154 break
6155 fi
6156 done
6157 if test x$ac_success = xyes; then
0bcda685
PA
6158 break
6159 fi
6160 done
6161 fi
6162 ac_ext=c
6163ac_cpp='$CPP $CPPFLAGS'
6164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6166ac_compiler_gnu=$ac_cv_c_compiler_gnu
6167
6168 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6169 if test x$ac_success = xno; then
d0ac1c44 6170 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6171 fi
6172 fi
6173 if test x$ac_success = xno; then
6174 HAVE_CXX11=0
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6176$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6177 else
6178 HAVE_CXX11=1
6179
6180$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6181
6182 fi
6183
6184
6185
6186
a417dc56
RW
6187# Dependency checking.
6188rm -rf .tst 2>/dev/null
6189mkdir .tst 2>/dev/null
6190if test -d .tst; then
6191 am__leading_dot=.
6192else
6193 am__leading_dot=_
6194fi
6195rmdir .tst 2>/dev/null
6196
6197DEPDIR="${am__leading_dot}deps"
6198
81ecdfbb 6199ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6200
6201
6202depcc="$CC" am_compiler_list=
6203
6204am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6206$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6207if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6208 $as_echo_n "(cached) " >&6
a417dc56
RW
6209else
6210 if test -f "$am_depcomp"; then
6211 # We make a subdir and do the tests there. Otherwise we can end up
6212 # making bogus files that we don't know about and never remove. For
6213 # instance it was reported that on HP-UX the gcc test will end up
6214 # making a dummy file named `D' -- because `-MD' means `put the output
6215 # in D'.
6216 mkdir conftest.dir
6217 # Copy depcomp to subdir because otherwise we won't find it if we're
6218 # using a relative directory.
6219 cp "$am_depcomp" conftest.dir
6220 cd conftest.dir
6221 # We will build objects and dependencies in a subdirectory because
6222 # it helps to detect inapplicable dependency modes. For instance
6223 # both Tru64's cc and ICC support -MD to output dependencies as a
6224 # side effect of compilation, but ICC will put the dependencies in
6225 # the current directory while Tru64 will put them in the object
6226 # directory.
6227 mkdir sub
6228
6229 am_cv_CC_dependencies_compiler_type=none
6230 if test "$am_compiler_list" = ""; then
6231 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6232 fi
6233 for depmode in $am_compiler_list; do
6234 if test $depmode = none; then break; fi
6235
81ecdfbb 6236 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6237 # Setup a source with many dependencies, because some compilers
6238 # like to wrap large dependency lists on column 80 (with \), and
6239 # we should not choose a depcomp mode which is confused by this.
6240 #
6241 # We need to recreate these files for each test, as the compiler may
6242 # overwrite some of them when testing with obscure command lines.
6243 # This happens at least with the AIX C compiler.
6244 : > sub/conftest.c
6245 for i in 1 2 3 4 5 6; do
6246 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6247 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6248 # Solaris 8's {/usr,}/bin/sh.
6249 touch sub/conftst$i.h
6250 done
6251 echo "include sub/conftest.Po" > confmf
6252
6253 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6254 # mode. It turns out that the SunPro C++ compiler does not properly
6255 # handle `-M -o', and we need to detect this.
6256 depcmd="depmode=$depmode \
6257 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6258 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6259 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6260 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6261 if env $depcmd > conftest.err 2>&1 &&
6262 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6263 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6264 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6265 # icc doesn't choke on unknown options, it will just issue warnings
6266 # or remarks (even with -Werror). So we grep stderr for any message
6267 # that says an option was ignored or not supported.
6268 # When given -MP, icc 7.0 and 7.1 complain thusly:
6269 # icc: Command line warning: ignoring option '-M'; no argument required
6270 # The diagnosis changed in icc 8.0:
6271 # icc: Command line remark: option '-MP' not supported
6272 if (grep 'ignoring option' conftest.err ||
6273 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6274 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6275 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6276 break
6277 fi
6278 fi
81ecdfbb 6279 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6280 sed -e 's/^/| /' < conftest.err >&5
6281 done
6282
6283 cd ..
6284 rm -rf conftest.dir
6285else
6286 am_cv_CC_dependencies_compiler_type=none
6287fi
6288
6289fi
81ecdfbb
RW
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6291$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6292if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6293then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6294else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6295
6296fi
6297
6298
c971b7fa
PA
6299
6300CONFIG_OBS=
6301CONFIG_DEPS=
6302CONFIG_SRCS=
6303ENABLE_CFLAGS=
6304
6305CONFIG_ALL=
6306CONFIG_CLEAN=
6307CONFIG_INSTALL=
6308CONFIG_UNINSTALL=
6309
6310# If we haven't got the data from the intl directory,
6311# assume NLS is disabled.
6312USE_NLS=no
6313LIBINTL=
6314LIBINTL_DEP=
6315INCINTL=
6316XGETTEXT=
6317GMSGFMT=
6318POSUB=
783e057b
DJ
6319
6320if test -f ../intl/config.intl; then
6321 . ../intl/config.intl
6322fi
81ecdfbb
RW
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6324$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6325if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }
783e057b 6328else
81ecdfbb
RW
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6330$as_echo "yes" >&6; }
783e057b 6331
81ecdfbb 6332$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6333
6334
81ecdfbb
RW
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6336$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6337 # Look for .po and .gmo files in the source directory.
6338 CATALOGS=
6339 XLINGUAS=
6340 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6341 # If there aren't any .gmo files the shell will give us the
6342 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6343 # weeded out.
6344 case "$cat" in *\**)
6345 continue;;
6346 esac
6347 # The quadruple backslash is collapsed to a double backslash
6348 # by the backticks, then collapsed again by the double quotes,
6349 # leaving us with one backslash in the sed expression (right
6350 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6351 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6352 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6353 # The user is allowed to set LINGUAS to a list of languages to
6354 # install catalogs for. If it's empty that means "all of them."
6355 if test "x$LINGUAS" = x; then
6356 CATALOGS="$CATALOGS $cat"
6357 XLINGUAS="$XLINGUAS $lang"
6358 else
6359 case "$LINGUAS" in *$lang*)
6360 CATALOGS="$CATALOGS $cat"
6361 XLINGUAS="$XLINGUAS $lang"
6362 ;;
6363 esac
e28b3332
DJ
6364 fi
6365 done
c971b7fa
PA
6366 LINGUAS="$XLINGUAS"
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6368$as_echo "$LINGUAS" >&6; }
6369
6370
6371 DATADIRNAME=share
6372
6373 INSTOBJEXT=.mo
6374
6375 GENCAT=gencat
6376
6377 CATOBJEXT=.gmo
e28b3332 6378
e28b3332
DJ
6379fi
6380
c971b7fa
PA
6381localedir='${datadir}/locale'
6382
6383
6384if test x"$USE_NLS" = xyes; then
6385 CONFIG_ALL="$CONFIG_ALL all-po"
6386 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6387 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6388 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6389fi
e28b3332 6390
c971b7fa
PA
6391PACKAGE=gdb
6392
6393cat >>confdefs.h <<_ACEOF
6394#define PACKAGE "$PACKAGE"
6395_ACEOF
6396
6397
6398
6399# We never need to detect it in this sub-configure.
6400# But preserve it for config.status --recheck.
6401
6402
6403
6404MAKEINFO_EXTRA_FLAGS=""
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6406$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6407if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6408 $as_echo_n "(cached) " >&6
6409else
6410 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6411 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6412 gdb_cv_have_makeinfo_click=yes
6413 else
6414 gdb_cv_have_makeinfo_click=no
6415 fi
6416fi
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6418$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6419if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6420 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6421fi
e28b3332
DJ
6422
6423
bec39cab
AC
6424
6425
81ecdfbb
RW
6426# Check whether --with-separate-debug-dir was given.
6427if test "${with_separate_debug_dir+set}" = set; then :
6428 withval=$with_separate_debug_dir;
b14b1491
TT
6429 DEBUGDIR=$withval
6430else
6431 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6432fi
6433
20e95c23 6434
783e057b
DJ
6435 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6436 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6437 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6438 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6439
783e057b
DJ
6440cat >>confdefs.h <<_ACEOF
6441#define DEBUGDIR "$ac_define_dir"
20e95c23 6442_ACEOF
20e95c23 6443
20e95c23 6444
20e95c23 6445
0c4a4063 6446
b14b1491
TT
6447 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6448 if test "x$prefix" = xNONE; then
6449 test_prefix=/usr/local
6450 else
6451 test_prefix=$prefix
6452 fi
783e057b 6453 else
b14b1491 6454 test_prefix=$exec_prefix
783e057b 6455 fi
b14b1491
TT
6456 value=0
6457 case ${ac_define_dir} in
6458 "${test_prefix}"|"${test_prefix}/"*|\
6459 '${exec_prefix}'|'${exec_prefix}/'*)
6460 value=1
6461 ;;
6462 esac
6463
6464cat >>confdefs.h <<_ACEOF
6465#define DEBUGDIR_RELOCATABLE $value
6466_ACEOF
6467
6468
6469
0c4a4063 6470
f83d8a90
DE
6471# We can't pass paths as command line arguments.
6472# Mingw32 tries to be clever and will convert the paths for us.
6473# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6474# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6475# This breaks GDB's relocatable path conversions since paths passed in
6476# config.h would not get so translated, the path prefixes no longer match.
6477
6478 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6479 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6480 ac_define_dir=`eval echo $bindir`
6481 ac_define_dir=`eval echo $ac_define_dir`
6482
6483cat >>confdefs.h <<_ACEOF
6484#define BINDIR "$ac_define_dir"
6485_ACEOF
6486
6487
6488
b14b1491
TT
6489# GDB's datadir relocation
6490
6491
6492
81ecdfbb
RW
6493# Check whether --with-gdb-datadir was given.
6494if test "${with_gdb_datadir+set}" = set; then :
6495 withval=$with_gdb_datadir;
b14b1491 6496 GDB_DATADIR=$withval
20e95c23 6497else
b14b1491 6498 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6499fi
6500
20e95c23 6501
b14b1491
TT
6502 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6503 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6504 ac_define_dir=`eval echo $GDB_DATADIR`
6505 ac_define_dir=`eval echo $ac_define_dir`
6506
6507cat >>confdefs.h <<_ACEOF
6508#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6509_ACEOF
6510
b14b1491
TT
6511
6512
0c4a4063 6513
b14b1491
TT
6514 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6515 if test "x$prefix" = xNONE; then
6516 test_prefix=/usr/local
6517 else
6518 test_prefix=$prefix
6519 fi
6520 else
6521 test_prefix=$exec_prefix
6522 fi
6523 value=0
6524 case ${ac_define_dir} in
6525 "${test_prefix}"|"${test_prefix}/"*|\
6526 '${exec_prefix}'|'${exec_prefix}/'*)
6527 value=1
6528 ;;
6529 esac
6530
6531cat >>confdefs.h <<_ACEOF
6532#define GDB_DATADIR_RELOCATABLE $value
6533_ACEOF
6534
6535
783e057b 6536
20e95c23 6537
0c4a4063 6538
81ecdfbb
RW
6539# Check whether --with-relocated-sources was given.
6540if test "${with_relocated_sources+set}" = set; then :
6541 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6542
6543 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6544 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6545 ac_define_dir=`eval echo $reloc_srcdir`
6546 ac_define_dir=`eval echo $ac_define_dir`
6547
6548cat >>confdefs.h <<_ACEOF
6549#define RELOC_SRCDIR "$ac_define_dir"
6550_ACEOF
6551
6552
6553
81ecdfbb
RW
6554fi
6555
29b0e8a2 6556
7349ff92
JK
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6558$as_echo_n "checking for default auto-load directory... " >&6; }
6559
6560# Check whether --with-auto-load-dir was given.
6561if test "${with_auto_load_dir+set}" = set; then :
6562 withval=$with_auto_load_dir;
6563else
1564a261 6564 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6565fi
6566
2861ee4f 6567escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6568
6569 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6570 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6571 ac_define_dir=`eval echo $escape_dir`
6572 ac_define_dir=`eval echo $ac_define_dir`
6573
6574cat >>confdefs.h <<_ACEOF
6575#define AUTO_LOAD_DIR "$ac_define_dir"
6576_ACEOF
6577
6578
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6580$as_echo "$with_auto_load_dir" >&6; }
6581
bccbefd2
JK
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6583$as_echo_n "checking for default auto-load safe-path... " >&6; }
6584
6585# Check whether --with-auto-load-safe-path was given.
6586if test "${with_auto_load_safe_path+set}" = set; then :
6587 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6588 with_auto_load_safe_path="/"
6589 fi
bccbefd2 6590else
7349ff92 6591 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6592fi
6593
2861ee4f 6594escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6595
6596 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6597 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6598 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6599 ac_define_dir=`eval echo $ac_define_dir`
6600
6601cat >>confdefs.h <<_ACEOF
6dea1fbd 6602#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6603_ACEOF
6604
6605
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6607$as_echo "$with_auto_load_safe_path" >&6; }
6608
29b0e8a2 6609
20e95c23 6610
5ae98d25 6611subdirs="$subdirs testsuite"
20e95c23
DJ
6612
6613
783e057b 6614# Check whether to support alternative target configurations
81ecdfbb
RW
6615# Check whether --enable-targets was given.
6616if test "${enable_targets+set}" = set; then :
6617 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6618 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6619 ;;
6620 no) enable_targets= ;;
6621 *) enable_targets=$enableval ;;
6622esac
81ecdfbb
RW
6623fi
6624
20e95c23 6625
783e057b 6626# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6627# Check whether --enable-64-bit-bfd was given.
6628if test "${enable_64_bit_bfd+set}" = set; then :
6629 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6630 yes) want64=true ;;
6631 no) want64=false ;;
d0ac1c44 6632 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6633esac
6634else
6635 want64=false
81ecdfbb
RW
6636fi
6637
783e057b
DJ
6638# Provide defaults for some variables set by the per-host and per-target
6639# configuration.
6640gdb_host_obs=posix-hdep.o
20e95c23 6641
783e057b
DJ
6642if test "${target}" = "${host}"; then
6643 gdb_native=yes
6644else
6645 gdb_native=no
6646fi
20e95c23 6647
783e057b 6648. $srcdir/configure.host
20e95c23 6649
783e057b 6650# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6651
783e057b
DJ
6652TARGET_OBS=
6653all_targets=
b292c783 6654HAVE_NATIVE_GCORE_TARGET=
20e95c23 6655
783e057b 6656for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6657do
783e057b
DJ
6658 if test "$targ_alias" = "all"; then
6659 all_targets=true
6660 else
6661 # Canonicalize the secondary target names.
6662 result=`$ac_config_sub $targ_alias 2>/dev/null`
6663 if test -n "$result"; then
6664 targ=$result
6665 else
6666 targ=$targ_alias
6667 fi
20e95c23 6668
783e057b 6669 . ${srcdir}/configure.tgt
20e95c23 6670
bf307134 6671 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6672 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6673fi
6674
783e057b
DJ
6675 # Target-specific object files
6676 for i in ${gdb_target_obs}; do
6677 case " $TARGET_OBS " in
6678 *" ${i} "*) ;;
6679 *)
6680 TARGET_OBS="$TARGET_OBS ${i}"
6681 ;;
6682 esac
6683 done
20e95c23 6684
783e057b
DJ
6685 # Check whether this target needs 64-bit CORE_ADDR
6686 if test x${want64} = xfalse; then
6687 . ${srcdir}/../bfd/config.bfd
6688 fi
b292c783
JK
6689
6690 # Check whether this target is native and supports gcore.
6691 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6692 && $gdb_have_gcore; then
6693 HAVE_NATIVE_GCORE_TARGET=1
6694 fi
783e057b 6695 fi
20e95c23
DJ
6696done
6697
783e057b
DJ
6698if test x${all_targets} = xtrue; then
6699
6700 # We want all 64-bit targets if we either:
6701 # - run on a 64-bit host or
6702 # - already require 64-bit support for some other target or
6703 # - the --enable-64-bit-bfd option was supplied
6704 # Otherwise we only support all 32-bit targets.
6705 #
6706 # NOTE: This test must be in sync with the corresponding
6707 # tests in BFD!
20e95c23 6708
783e057b 6709 if test x${want64} = xfalse; then
81ecdfbb
RW
6710 # The cast to long int works around a bug in the HP C Compiler
6711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6713# This bug is HP SR number 8606223364.
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6715$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6716if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6717 $as_echo_n "(cached) " >&6
c0993dbe 6718else
81ecdfbb 6719 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6720
81ecdfbb
RW
6721else
6722 if test "$ac_cv_type_long" = yes; then
6723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6725as_fn_error 77 "cannot compute sizeof (long)
6726See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6727 else
6728 ac_cv_sizeof_long=0
6729 fi
c0993dbe 6730fi
81ecdfbb 6731
c0993dbe 6732fi
81ecdfbb
RW
6733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6734$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6735
c0993dbe 6736
c0993dbe 6737
c0993dbe
UW
6738cat >>confdefs.h <<_ACEOF
6739#define SIZEOF_LONG $ac_cv_sizeof_long
6740_ACEOF
6741
6742
6743 if test "x${ac_cv_sizeof_long}" = "x8"; then
6744 want64=true
6745 fi
6746 fi
6747 if test x${want64} = xtrue; then
6748 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6749 else
6750 TARGET_OBS='$(ALL_TARGET_OBS)'
6751 fi
6752fi
6753
6754
6755
b292c783 6756
c0993dbe
UW
6757# For other settings, only the main target counts.
6758gdb_sim=
6759gdb_osabi=
c0993dbe
UW
6760targ=$target; . ${srcdir}/configure.tgt
6761
6762# Fetch the default architecture and default target vector from BFD.
6763targ=$target; . $srcdir/../bfd/config.bfd
6764
6765# We only want the first architecture, so strip off the others if
6766# there is more than one.
6767targ_archs=`echo $targ_archs | sed 's/ .*//'`
6768
6769if test "x$targ_archs" != x; then
6770
6771cat >>confdefs.h <<_ACEOF
6772#define DEFAULT_BFD_ARCH $targ_archs
6773_ACEOF
6774
6775fi
6776if test "x$targ_defvec" != x; then
6777
6778cat >>confdefs.h <<_ACEOF
6779#define DEFAULT_BFD_VEC $targ_defvec
6780_ACEOF
6781
6782fi
6783
c0993dbe 6784# Enable MI.
81ecdfbb
RW
6785# Check whether --enable-gdbmi was given.
6786if test "${enable_gdbmi+set}" = set; then :
6787 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6788 yes | no)
6789 ;;
6790 *)
d0ac1c44 6791 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6792 esac
6793else
6794 enable_gdbmi=yes
81ecdfbb
RW
6795fi
6796
c0993dbe 6797if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6798 if test -d "$srcdir/mi"; then
c0993dbe
UW
6799 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6800 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6801 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6802 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6803 fi
6804fi
6805
6806# Enable TUI.
81ecdfbb
RW
6807# Check whether --enable-tui was given.
6808if test "${enable_tui+set}" = set; then :
6809 enableval=$enable_tui; case $enableval in
3ca64bd3 6810 yes | no | auto)
c0993dbe
UW
6811 ;;
6812 *)
d0ac1c44 6813 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6814 esac
6815else
3ca64bd3 6816 enable_tui=auto
81ecdfbb
RW
6817fi
6818
c0993dbe
UW
6819
6820# Enable gdbtk.
81ecdfbb
RW
6821# Check whether --enable-gdbtk was given.
6822if test "${enable_gdbtk+set}" = set; then :
6823 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6824 yes | no)
6825 ;;
6826 *)
d0ac1c44 6827 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6828 esac
6829else
0ad6b8ee 6830 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6831 enable_gdbtk=yes
6832 else
6833 enable_gdbtk=no
6834 fi
81ecdfbb
RW
6835fi
6836
c0993dbe
UW
6837# We unconditionally disable gdbtk tests on selected platforms.
6838case $host_os in
6839 go32* | windows*)
81ecdfbb
RW
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6841$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6842 enable_gdbtk=no ;;
6843esac
6844
0d79cdc4
AM
6845# Handle optional debuginfod support
6846
6847# Enable debuginfod
6848
6849# Check whether --with-debuginfod was given.
6850if test "${with_debuginfod+set}" = set; then :
6851 withval=$with_debuginfod;
6852else
6853 with_debuginfod=auto
6854fi
6855
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6857$as_echo_n "checking whether to use debuginfod... " >&6; }
6858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6859$as_echo "$with_debuginfod" >&6; }
6860
6861if test "${with_debuginfod}" = no; then
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
6863$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
6864else
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debuginfod_begin in -ldebuginfod" >&5
6866$as_echo_n "checking for debuginfod_begin in -ldebuginfod... " >&6; }
6867if ${ac_cv_lib_debuginfod_debuginfod_begin+:} false; then :
6868 $as_echo_n "(cached) " >&6
6869else
6870 ac_check_lib_save_LIBS=$LIBS
6871LIBS="-ldebuginfod $LIBS"
6872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6873/* end confdefs.h. */
6874
6875/* Override any GCC internal prototype to avoid an error.
6876 Use char because int might match the return type of a GCC
6877 builtin and then its argument prototype would still apply. */
6878#ifdef __cplusplus
6879extern "C"
6880#endif
6881char debuginfod_begin ();
6882int
6883main ()
6884{
6885return debuginfod_begin ();
6886 ;
6887 return 0;
6888}
6889_ACEOF
6890if ac_fn_c_try_link "$LINENO"; then :
6891 ac_cv_lib_debuginfod_debuginfod_begin=yes
6892else
6893 ac_cv_lib_debuginfod_debuginfod_begin=no
6894fi
6895rm -f core conftest.err conftest.$ac_objext \
6896 conftest$ac_exeext conftest.$ac_ext
6897LIBS=$ac_check_lib_save_LIBS
6898fi
6899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_debuginfod_debuginfod_begin" >&5
6900$as_echo "$ac_cv_lib_debuginfod_debuginfod_begin" >&6; }
6901if test "x$ac_cv_lib_debuginfod_debuginfod_begin" = xyes; then :
6902 have_debuginfod_lib=yes
6903fi
6904
6905 ac_fn_c_check_decl "$LINENO" "debuginfod_begin" "ac_cv_have_decl_debuginfod_begin" "#include <elfutils/debuginfod.h>
6906"
6907if test "x$ac_cv_have_decl_debuginfod_begin" = xyes; then :
6908 have_debuginfod_h=yes
6909fi
bec39cab 6910
0d79cdc4
AM
6911 if test "x$have_debuginfod_lib" = "xyes" -a \
6912 "x$have_debuginfod_h" = "xyes"; then
6913
6914$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
6915
6916 LIBDEBUGINFOD="-ldebuginfod"
6917
6918 else
6919
6920 if test "$with_debuginfod" = yes; then
6921 as_fn_error $? "debuginfod is missing or unusable" "$LINENO" 5
6922 else
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&5
6924$as_echo "$as_me: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&2;}
6925 fi
6926 fi
6927fi
6928
6929
6930# Libunwind support for ia64.
05e7c244
JK
6931
6932# Check whether --with-libunwind-ia64 was given.
6933if test "${with_libunwind_ia64+set}" = set; then :
6934 withval=$with_libunwind_ia64;
bec39cab 6935else
05e7c244
JK
6936 with_libunwind_ia64=auto
6937fi
bec39cab 6938
05e7c244
JK
6939
6940# Backward compatibility option.
6941if test "${with_libunwind+set}" = set; then
6942 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6943 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6944 fi
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6946$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6947 with_libunwind_ia64="$with_libunwind"
6948fi
6949
6950case "$with_libunwind_ia64" in
6951 yes | no)
6952 ;;
6953 auto)
6954 for ac_header in libunwind-ia64.h
81ecdfbb 6955do :
b54a8fd7 6956 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6957if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6958 cat >>confdefs.h <<_ACEOF
b54a8fd7 6959#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6960_ACEOF
6961
6962fi
6963
6964done
6965
05e7c244
JK
6966 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6967 ;;
6968 *)
d0ac1c44 6969 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6970 ;;
6971esac
bec39cab 6972
05e7c244 6973if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6974 for ac_header in libunwind-ia64.h
81ecdfbb 6975do :
b54a8fd7 6976 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6977if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6978 cat >>confdefs.h <<_ACEOF
b54a8fd7 6979#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6980_ACEOF
6981
6982fi
6983
6984done
6985
05e7c244 6986 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6987 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6988 fi
6989 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6990 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6991 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6992fi
6993
cb01cfba
JB
6994opt_curses=no
6995
81ecdfbb
RW
6996# Check whether --with-curses was given.
6997if test "${with_curses+set}" = set; then :
6998 withval=$with_curses; opt_curses=$withval
6999fi
7000
cb01cfba 7001
76a39ba7 7002prefer_curses=no
cb01cfba 7003if test "$opt_curses" = "yes"; then
76a39ba7 7004 prefer_curses=yes
cb01cfba
JB
7005fi
7006
a9322a30 7007# Profiling support.
81ecdfbb
RW
7008# Check whether --enable-profiling was given.
7009if test "${enable_profiling+set}" = set; then :
7010 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7011 yes | no)
7012 ;;
7013 *)
d0ac1c44 7014 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7015 esac
7016else
7017 enable_profiling=no
81ecdfbb 7018fi
bec39cab 7019
a9322a30
TT
7020
7021for ac_func in monstartup _mcleanup
81ecdfbb
RW
7022do :
7023 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7024ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7025if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7026 cat >>confdefs.h <<_ACEOF
7027#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7028_ACEOF
a9322a30 7029
81ecdfbb
RW
7030fi
7031done
a9322a30 7032
81ecdfbb
RW
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7034$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7035if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7036 $as_echo_n "(cached) " >&6
7037else
7038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7039/* end confdefs.h. */
7040#include <stdlib.h>
7041extern char _etext;
a9322a30
TT
7042
7043int
7044main ()
7045{
7046free (&_etext);
7047 ;
7048 return 0;
7049}
bec39cab 7050_ACEOF
81ecdfbb 7051if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7052 ac_cv_var__etext=yes
bec39cab 7053else
81ecdfbb 7054 ac_cv_var__etext=no
bec39cab 7055fi
81ecdfbb
RW
7056rm -f core conftest.err conftest.$ac_objext \
7057 conftest$ac_exeext conftest.$ac_ext
bec39cab 7058fi
81ecdfbb
RW
7059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7060$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7061if test "$ac_cv_var__etext" = yes; then
60ca704f 7062
81ecdfbb 7063$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7064
bec39cab 7065fi
81ecdfbb
RW
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7067$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7068if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7069 $as_echo_n "(cached) " >&6
bec39cab 7070else
81ecdfbb 7071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7072/* end confdefs.h. */
a9322a30
TT
7073#include <stdlib.h>
7074extern char etext;
bec39cab
AC
7075
7076int
7077main ()
7078{
a9322a30 7079free (&etext);
bec39cab
AC
7080 ;
7081 return 0;
7082}
7083_ACEOF
81ecdfbb 7084if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7085 ac_cv_var_etext=yes
bec39cab 7086else
81ecdfbb 7087 ac_cv_var_etext=no
bec39cab 7088fi
81ecdfbb
RW
7089rm -f core conftest.err conftest.$ac_objext \
7090 conftest$ac_exeext conftest.$ac_ext
bec39cab 7091fi
81ecdfbb
RW
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7093$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7094if test "$ac_cv_var_etext" = yes; then
a9322a30 7095
81ecdfbb 7096$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7097
7098fi
a9322a30 7099if test "$enable_profiling" = yes ; then
0ad6b8ee 7100 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7101 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7102 fi
7103 PROFILE_CFLAGS=-pg
7104 OLD_CFLAGS="$CFLAGS"
7105 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7106
81ecdfbb
RW
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7108$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7109if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7110 $as_echo_n "(cached) " >&6
bec39cab 7111else
81ecdfbb 7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7113/* end confdefs.h. */
bec39cab
AC
7114
7115int
7116main ()
7117{
a9322a30 7118int x;
bec39cab
AC
7119 ;
7120 return 0;
7121}
7122_ACEOF
81ecdfbb 7123if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7124 ac_cv_cc_supports_pg=yes
bec39cab 7125else
81ecdfbb 7126 ac_cv_cc_supports_pg=no
bec39cab 7127fi
81ecdfbb 7128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7129fi
81ecdfbb
RW
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7131$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7132
0ad6b8ee 7133 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7134 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7135 fi
bec39cab 7136
a9322a30 7137 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7138fi
7139
44cee4fd
TT
7140CODESIGN_CERT=
7141# Check whether --enable-codesign was given.
7142if test "${enable_codesign+set}" = set; then :
7143 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7144fi
7145
7146
7147
c16158bc
JM
7148
7149
81ecdfbb
RW
7150# Check whether --with-pkgversion was given.
7151if test "${with_pkgversion+set}" = set; then :
7152 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7153 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7154 no) PKGVERSION= ;;
7155 *) PKGVERSION="($withval) " ;;
7156 esac
7157else
7158 PKGVERSION="(GDB) "
7159
81ecdfbb 7160fi
c16158bc
JM
7161
7162
7163
7164
81ecdfbb
RW
7165
7166# Check whether --with-bugurl was given.
7167if test "${with_bugurl+set}" = set; then :
7168 withval=$with_bugurl; case "$withval" in
d0ac1c44 7169 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7170 no) BUGURL=
7171 ;;
7172 *) BUGURL="$withval"
7173 ;;
7174 esac
7175else
112c22ed 7176 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7177
81ecdfbb
RW
7178fi
7179
c16158bc
JM
7180 case ${BUGURL} in
7181 "")
7182 REPORT_BUGS_TO=
7183 REPORT_BUGS_TEXI=
7184 ;;
7185 *)
7186 REPORT_BUGS_TO="<$BUGURL>"
7187 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7188 ;;
7189 esac;
7190
7191
7192
7193
7194cat >>confdefs.h <<_ACEOF
7195#define PKGVERSION "$PKGVERSION"
7196_ACEOF
7197
7198
7199cat >>confdefs.h <<_ACEOF
7200#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7201_ACEOF
7202
7203
bec39cab
AC
7204# --------------------- #
7205# Checks for programs. #
7206# --------------------- #
7207
7208for ac_prog in gawk mawk nawk awk
7209do
7210 # Extract the first word of "$ac_prog", so it can be a program name with args.
7211set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7213$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7214if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7215 $as_echo_n "(cached) " >&6
bec39cab
AC
7216else
7217 if test -n "$AWK"; then
7218 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7219else
7220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221for as_dir in $PATH
7222do
7223 IFS=$as_save_IFS
7224 test -z "$as_dir" && as_dir=.
81ecdfbb 7225 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7227 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7229 break 2
7230 fi
7231done
81ecdfbb
RW
7232 done
7233IFS=$as_save_IFS
bec39cab
AC
7234
7235fi
7236fi
7237AWK=$ac_cv_prog_AWK
7238if test -n "$AWK"; then
81ecdfbb
RW
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7240$as_echo "$AWK" >&6; }
bec39cab 7241else
81ecdfbb
RW
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7243$as_echo "no" >&6; }
bec39cab
AC
7244fi
7245
bec39cab 7246
81ecdfbb 7247 test -n "$AWK" && break
bec39cab
AC
7248done
7249
c971b7fa
PA
7250# Find a good install program. We prefer a C program (faster),
7251# so one script is as good as another. But avoid the broken or
7252# incompatible versions:
7253# SysV /etc/install, /usr/sbin/install
7254# SunOS /usr/etc/install
7255# IRIX /sbin/install
7256# AIX /bin/install
7257# AmigaOS /C/install, which installs bootblocks on floppy discs
7258# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7259# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7260# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7261# OS/2's system install, which has a completely different semantic
7262# ./install, which can be erroneously created by make from ./install.sh.
7263# Reject install programs that cannot install multiple files.
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7265$as_echo_n "checking for a BSD-compatible install... " >&6; }
7266if test -z "$INSTALL"; then
d0ac1c44 7267if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7268 $as_echo_n "(cached) " >&6
7269else
7270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271for as_dir in $PATH
7272do
7273 IFS=$as_save_IFS
7274 test -z "$as_dir" && as_dir=.
7275 # Account for people who put trailing slashes in PATH elements.
7276case $as_dir/ in #((
7277 ./ | .// | /[cC]/* | \
7278 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7279 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7280 /usr/ucb/* ) ;;
7281 *)
7282 # OSF1 and SCO ODT 3.0 have their own names for install.
7283 # Don't use installbsd from OSF since it installs stuff as root
7284 # by default.
7285 for ac_prog in ginstall scoinst install; do
7286 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7287 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7288 if test $ac_prog = install &&
7289 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7290 # AIX install. It has an incompatible calling convention.
7291 :
7292 elif test $ac_prog = install &&
7293 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7294 # program-specific install script used by HP pwplus--don't use.
7295 :
7296 else
7297 rm -rf conftest.one conftest.two conftest.dir
7298 echo one > conftest.one
7299 echo two > conftest.two
7300 mkdir conftest.dir
7301 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7302 test -s conftest.one && test -s conftest.two &&
7303 test -s conftest.dir/conftest.one &&
7304 test -s conftest.dir/conftest.two
7305 then
7306 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7307 break 3
7308 fi
7309 fi
7310 fi
7311 done
7312 done
7313 ;;
7314esac
7315
7316 done
7317IFS=$as_save_IFS
7318
7319rm -rf conftest.one conftest.two conftest.dir
7320
7321fi
7322 if test "${ac_cv_path_install+set}" = set; then
7323 INSTALL=$ac_cv_path_install
7324 else
7325 # As a last resort, use the slow shell script. Don't cache a
7326 # value for INSTALL within a source directory, because that will
7327 # break other packages using the cache if that directory is
7328 # removed, or if the value is a relative name.
7329 INSTALL=$ac_install_sh
7330 fi
7331fi
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7333$as_echo "$INSTALL" >&6; }
7334
7335# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7336# It thinks the first close brace ends the variable substitution.
7337test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7338
7339test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7340
7341test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7342
81ecdfbb
RW
7343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7344$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7345LN_S=$as_ln_s
7346if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7348$as_echo "yes" >&6; }
bec39cab 7349else
81ecdfbb
RW
7350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7351$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7352fi
7353
7354if test -n "$ac_tool_prefix"; then
7355 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7356set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7359if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7360 $as_echo_n "(cached) " >&6
bec39cab
AC
7361else
7362 if test -n "$RANLIB"; then
7363 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7364else
7365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366for as_dir in $PATH
7367do
7368 IFS=$as_save_IFS
7369 test -z "$as_dir" && as_dir=.
81ecdfbb 7370 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7372 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7374 break 2
7375 fi
7376done
81ecdfbb
RW
7377 done
7378IFS=$as_save_IFS
bec39cab
AC
7379
7380fi
7381fi
7382RANLIB=$ac_cv_prog_RANLIB
7383if test -n "$RANLIB"; then
81ecdfbb
RW
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7385$as_echo "$RANLIB" >&6; }
bec39cab 7386else
81ecdfbb
RW
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
bec39cab
AC
7389fi
7390
81ecdfbb 7391
bec39cab
AC
7392fi
7393if test -z "$ac_cv_prog_RANLIB"; then
7394 ac_ct_RANLIB=$RANLIB
7395 # Extract the first word of "ranlib", so it can be a program name with args.
7396set dummy ranlib; ac_word=$2
81ecdfbb
RW
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7398$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7399if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7400 $as_echo_n "(cached) " >&6
bec39cab
AC
7401else
7402 if test -n "$ac_ct_RANLIB"; then
7403 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7404else
7405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406for as_dir in $PATH
7407do
7408 IFS=$as_save_IFS
7409 test -z "$as_dir" && as_dir=.
81ecdfbb 7410 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7412 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7414 break 2
7415 fi
7416done
81ecdfbb
RW
7417 done
7418IFS=$as_save_IFS
bec39cab 7419
bec39cab
AC
7420fi
7421fi
7422ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7423if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7425$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7426else
81ecdfbb
RW
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428$as_echo "no" >&6; }
bec39cab
AC
7429fi
7430
81ecdfbb
RW
7431 if test "x$ac_ct_RANLIB" = x; then
7432 RANLIB=":"
7433 else
7434 case $cross_compiling:$ac_tool_warned in
7435yes:)
7436{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7437$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7438ac_tool_warned=yes ;;
7439esac
7440 RANLIB=$ac_ct_RANLIB
7441 fi
bec39cab
AC
7442else
7443 RANLIB="$ac_cv_prog_RANLIB"
7444fi
7445
7446for ac_prog in 'bison -y' byacc
7447do
7448 # Extract the first word of "$ac_prog", so it can be a program name with args.
7449set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7452if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7453 $as_echo_n "(cached) " >&6
bec39cab
AC
7454else
7455 if test -n "$YACC"; then
7456 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7457else
7458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459for as_dir in $PATH
7460do
7461 IFS=$as_save_IFS
7462 test -z "$as_dir" && as_dir=.
81ecdfbb 7463 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7465 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7467 break 2
7468 fi
7469done
81ecdfbb
RW
7470 done
7471IFS=$as_save_IFS
bec39cab
AC
7472
7473fi
7474fi
7475YACC=$ac_cv_prog_YACC
7476if test -n "$YACC"; then
81ecdfbb
RW
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7478$as_echo "$YACC" >&6; }
bec39cab 7479else
81ecdfbb
RW
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481$as_echo "no" >&6; }
bec39cab
AC
7482fi
7483
81ecdfbb 7484
bec39cab
AC
7485 test -n "$YACC" && break
7486done
7487test -n "$YACC" || YACC="yacc"
7488
7489
7490if test -n "$ac_tool_prefix"; then
7491 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7492set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7495if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7496 $as_echo_n "(cached) " >&6
bec39cab
AC
7497else
7498 if test -n "$AR"; then
7499 ac_cv_prog_AR="$AR" # Let the user override the test.
7500else
7501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502for as_dir in $PATH
7503do
7504 IFS=$as_save_IFS
7505 test -z "$as_dir" && as_dir=.
81ecdfbb 7506 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7508 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7510 break 2
7511 fi
7512done
81ecdfbb
RW
7513 done
7514IFS=$as_save_IFS
bec39cab
AC
7515
7516fi
7517fi
7518AR=$ac_cv_prog_AR
7519if test -n "$AR"; then
81ecdfbb
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7521$as_echo "$AR" >&6; }
bec39cab 7522else
81ecdfbb
RW
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7524$as_echo "no" >&6; }
bec39cab
AC
7525fi
7526
81ecdfbb 7527
bec39cab
AC
7528fi
7529if test -z "$ac_cv_prog_AR"; then
7530 ac_ct_AR=$AR
7531 # Extract the first word of "ar", so it can be a program name with args.
7532set dummy ar; ac_word=$2
81ecdfbb
RW
7533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7534$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7535if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7536 $as_echo_n "(cached) " >&6
bec39cab
AC
7537else
7538 if test -n "$ac_ct_AR"; then
7539 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7540else
7541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7542for as_dir in $PATH
7543do
7544 IFS=$as_save_IFS
7545 test -z "$as_dir" && as_dir=.
81ecdfbb 7546 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7548 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7550 break 2
7551 fi
7552done
81ecdfbb
RW
7553 done
7554IFS=$as_save_IFS
bec39cab
AC
7555
7556fi
7557fi
7558ac_ct_AR=$ac_cv_prog_ac_ct_AR
7559if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7561$as_echo "$ac_ct_AR" >&6; }
bec39cab 7562else
81ecdfbb
RW
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564$as_echo "no" >&6; }
bec39cab
AC
7565fi
7566
81ecdfbb
RW
7567 if test "x$ac_ct_AR" = x; then
7568 AR=""
7569 else
7570 case $cross_compiling:$ac_tool_warned in
7571yes:)
7572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7574ac_tool_warned=yes ;;
7575esac
7576 AR=$ac_ct_AR
7577 fi
bec39cab
AC
7578else
7579 AR="$ac_cv_prog_AR"
7580fi
7581
7582if test -n "$ac_tool_prefix"; then
7583 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7584set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7586$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7587if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7588 $as_echo_n "(cached) " >&6
bec39cab
AC
7589else
7590 if test -n "$DLLTOOL"; then
7591 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7592else
7593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7594for as_dir in $PATH
7595do
7596 IFS=$as_save_IFS
7597 test -z "$as_dir" && as_dir=.
81ecdfbb 7598 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7600 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7602 break 2
7603 fi
7604done
81ecdfbb
RW
7605 done
7606IFS=$as_save_IFS
bec39cab
AC
7607
7608fi
7609fi
7610DLLTOOL=$ac_cv_prog_DLLTOOL
7611if test -n "$DLLTOOL"; then
81ecdfbb
RW
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7613$as_echo "$DLLTOOL" >&6; }
bec39cab 7614else
81ecdfbb
RW
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7616$as_echo "no" >&6; }
bec39cab
AC
7617fi
7618
81ecdfbb 7619
bec39cab
AC
7620fi
7621if test -z "$ac_cv_prog_DLLTOOL"; then
7622 ac_ct_DLLTOOL=$DLLTOOL
7623 # Extract the first word of "dlltool", so it can be a program name with args.
7624set dummy dlltool; ac_word=$2
81ecdfbb
RW
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7626$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7627if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7628 $as_echo_n "(cached) " >&6
bec39cab
AC
7629else
7630 if test -n "$ac_ct_DLLTOOL"; then
7631 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7632else
7633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7634for as_dir in $PATH
7635do
7636 IFS=$as_save_IFS
7637 test -z "$as_dir" && as_dir=.
81ecdfbb 7638 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7640 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7642 break 2
7643 fi
7644done
81ecdfbb
RW
7645 done
7646IFS=$as_save_IFS
bec39cab
AC
7647
7648fi
7649fi
7650ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7651if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7653$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7654else
81ecdfbb
RW
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
bec39cab
AC
7657fi
7658
81ecdfbb
RW
7659 if test "x$ac_ct_DLLTOOL" = x; then
7660 DLLTOOL=""
7661 else
7662 case $cross_compiling:$ac_tool_warned in
7663yes:)
7664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7666ac_tool_warned=yes ;;
7667esac
7668 DLLTOOL=$ac_ct_DLLTOOL
7669 fi
bec39cab
AC
7670else
7671 DLLTOOL="$ac_cv_prog_DLLTOOL"
7672fi
7673
7674if test -n "$ac_tool_prefix"; then
7675 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7676set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7678$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7679if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7680 $as_echo_n "(cached) " >&6
bec39cab
AC
7681else
7682 if test -n "$WINDRES"; then
7683 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7684else
7685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7686for as_dir in $PATH
7687do
7688 IFS=$as_save_IFS
7689 test -z "$as_dir" && as_dir=.
81ecdfbb 7690 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7692 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7694 break 2
7695 fi
7696done
81ecdfbb
RW
7697 done
7698IFS=$as_save_IFS
bec39cab
AC
7699
7700fi
7701fi
7702WINDRES=$ac_cv_prog_WINDRES
7703if test -n "$WINDRES"; then
81ecdfbb
RW
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7705$as_echo "$WINDRES" >&6; }
bec39cab 7706else
81ecdfbb
RW
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708$as_echo "no" >&6; }
bec39cab
AC
7709fi
7710
81ecdfbb 7711
bec39cab
AC
7712fi
7713if test -z "$ac_cv_prog_WINDRES"; then
7714 ac_ct_WINDRES=$WINDRES
7715 # Extract the first word of "windres", so it can be a program name with args.
7716set dummy windres; ac_word=$2
81ecdfbb
RW
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7718$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7719if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7720 $as_echo_n "(cached) " >&6
bec39cab
AC
7721else
7722 if test -n "$ac_ct_WINDRES"; then
7723 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7724else
7725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726for as_dir in $PATH
7727do
7728 IFS=$as_save_IFS
7729 test -z "$as_dir" && as_dir=.
81ecdfbb 7730 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7732 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7734 break 2
7735 fi
7736done
81ecdfbb
RW
7737 done
7738IFS=$as_save_IFS
bec39cab
AC
7739
7740fi
7741fi
7742ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7743if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7745$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7746else
81ecdfbb
RW
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748$as_echo "no" >&6; }
c906108c 7749fi
bec39cab 7750
81ecdfbb
RW
7751 if test "x$ac_ct_WINDRES" = x; then
7752 WINDRES=""
7753 else
7754 case $cross_compiling:$ac_tool_warned in
7755yes:)
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7758ac_tool_warned=yes ;;
7759esac
7760 WINDRES=$ac_ct_WINDRES
7761 fi
c906108c 7762else
bec39cab 7763 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7764fi
7765
bec39cab 7766
036c3acb
TS
7767case $host_os in
7768 gnu*)
7769 # Needed for GNU Hurd hosts.
7770 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7771 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7772set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7774$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7775if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7776 $as_echo_n "(cached) " >&6
c906108c 7777else
bec39cab
AC
7778 if test -n "$MIG"; then
7779 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7780else
7781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7782for as_dir in $PATH
7783do
7784 IFS=$as_save_IFS
7785 test -z "$as_dir" && as_dir=.
81ecdfbb 7786 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7788 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7790 break 2
7791 fi
7792done
81ecdfbb
RW
7793 done
7794IFS=$as_save_IFS
bec39cab 7795
c906108c 7796fi
bec39cab
AC
7797fi
7798MIG=$ac_cv_prog_MIG
7799if test -n "$MIG"; then
81ecdfbb
RW
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7801$as_echo "$MIG" >&6; }
c906108c 7802else
81ecdfbb
RW
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804$as_echo "no" >&6; }
c906108c
SS
7805fi
7806
81ecdfbb 7807
bec39cab
AC
7808fi
7809if test -z "$ac_cv_prog_MIG"; then
7810 ac_ct_MIG=$MIG
7811 # Extract the first word of "mig", so it can be a program name with args.
7812set dummy mig; ac_word=$2
81ecdfbb
RW
7813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7815if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7816 $as_echo_n "(cached) " >&6
bec39cab
AC
7817else
7818 if test -n "$ac_ct_MIG"; then
7819 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7820else
7821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7822for as_dir in $PATH
7823do
7824 IFS=$as_save_IFS
7825 test -z "$as_dir" && as_dir=.
81ecdfbb 7826 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7828 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7830 break 2
7831 fi
7832done
81ecdfbb
RW
7833 done
7834IFS=$as_save_IFS
c906108c 7835
bec39cab
AC
7836fi
7837fi
7838ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7839if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7841$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7842else
81ecdfbb
RW
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7844$as_echo "no" >&6; }
bec39cab 7845fi
c906108c 7846
81ecdfbb
RW
7847 if test "x$ac_ct_MIG" = x; then
7848 MIG=""
7849 else
7850 case $cross_compiling:$ac_tool_warned in
7851yes:)
7852{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7853$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7854ac_tool_warned=yes ;;
7855esac
7856 MIG=$ac_ct_MIG
7857 fi
bec39cab
AC
7858else
7859 MIG="$ac_cv_prog_MIG"
7860fi
c906108c 7861
036c3acb 7862 if test x"$MIG" = x; then
d0ac1c44 7863 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7864 fi
7865 ;;
7866esac
c906108c 7867
bec39cab
AC
7868# ---------------------- #
7869# Checks for libraries. #
7870# ---------------------- #
c906108c 7871
bec39cab 7872# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7874$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7875if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7876 $as_echo_n "(cached) " >&6
bec39cab
AC
7877else
7878 ac_check_lib_save_LIBS=$LIBS
7879LIBS="-lm $LIBS"
81ecdfbb 7880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7881/* end confdefs.h. */
c906108c 7882
c906108c 7883
bec39cab
AC
7884int
7885main ()
7886{
81ecdfbb 7887return main ();
bec39cab
AC
7888 ;
7889 return 0;
7890}
7891_ACEOF
81ecdfbb 7892if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7893 ac_cv_lib_m_main=yes
7894else
81ecdfbb 7895 ac_cv_lib_m_main=no
bec39cab 7896fi
81ecdfbb
RW
7897rm -f core conftest.err conftest.$ac_objext \
7898 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7899LIBS=$ac_check_lib_save_LIBS
7900fi
81ecdfbb
RW
7901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7902$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7903if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7904 cat >>confdefs.h <<_ACEOF
7905#define HAVE_LIBM 1
7906_ACEOF
7907
7908 LIBS="-lm $LIBS"
c906108c 7909
c906108c 7910fi
bec39cab
AC
7911
7912
bec39cab 7913# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7915$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7916if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7917 $as_echo_n "(cached) " >&6
bec39cab
AC
7918else
7919 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7921/* end confdefs.h. */
ddc9cd0f 7922
81ecdfbb
RW
7923/* Override any GCC internal prototype to avoid an error.
7924 Use char because int might match the return type of a GCC
7925 builtin and then its argument prototype would still apply. */
bec39cab
AC
7926#ifdef __cplusplus
7927extern "C"
7928#endif
bec39cab
AC
7929char gethostbyname ();
7930int
7931main ()
7932{
81ecdfbb 7933return gethostbyname ();
bec39cab
AC
7934 ;
7935 return 0;
7936}
7937_ACEOF
81ecdfbb
RW
7938for ac_lib in '' nsl; do
7939 if test -z "$ac_lib"; then
7940 ac_res="none required"
7941 else
7942 ac_res=-l$ac_lib
b4e70030 7943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7944 fi
7945 if ac_fn_c_try_link "$LINENO"; then :
7946 ac_cv_search_gethostbyname=$ac_res
7947fi
7948rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext
d0ac1c44 7950 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7951 break
7952fi
7953done
d0ac1c44 7954if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7955
bec39cab 7956else
81ecdfbb 7957 ac_cv_search_gethostbyname=no
bec39cab 7958fi
81ecdfbb 7959rm conftest.$ac_ext
bec39cab
AC
7960LIBS=$ac_func_search_save_LIBS
7961fi
81ecdfbb
RW
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7963$as_echo "$ac_cv_search_gethostbyname" >&6; }
7964ac_res=$ac_cv_search_gethostbyname
7965if test "$ac_res" != no; then :
7966 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7967
bec39cab 7968fi
96baa820 7969
c906108c 7970
b4e70030 7971# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7973$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7974if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7975 $as_echo_n "(cached) " >&6
b4e70030
JB
7976else
7977 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7979/* end confdefs.h. */
7980
81ecdfbb
RW
7981/* Override any GCC internal prototype to avoid an error.
7982 Use char because int might match the return type of a GCC
7983 builtin and then its argument prototype would still apply. */
b4e70030
JB
7984#ifdef __cplusplus
7985extern "C"
7986#endif
b4e70030
JB
7987char socketpair ();
7988int
7989main ()
7990{
81ecdfbb 7991return socketpair ();
b4e70030
JB
7992 ;
7993 return 0;
7994}
7995_ACEOF
81ecdfbb
RW
7996for ac_lib in '' socket; do
7997 if test -z "$ac_lib"; then
7998 ac_res="none required"
7999 else
8000 ac_res=-l$ac_lib
b4e70030 8001 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8002 fi
8003 if ac_fn_c_try_link "$LINENO"; then :
8004 ac_cv_search_socketpair=$ac_res
8005fi
8006rm -f core conftest.err conftest.$ac_objext \
8007 conftest$ac_exeext
d0ac1c44 8008 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8009 break
8010fi
8011done
d0ac1c44 8012if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8013
b4e70030 8014else
81ecdfbb 8015 ac_cv_search_socketpair=no
b4e70030 8016fi
81ecdfbb 8017rm conftest.$ac_ext
b4e70030
JB
8018LIBS=$ac_func_search_save_LIBS
8019fi
81ecdfbb
RW
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8021$as_echo "$ac_cv_search_socketpair" >&6; }
8022ac_res=$ac_cv_search_socketpair
8023if test "$ac_res" != no; then :
8024 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8025
8026fi
8027
8028
233a11ab 8029# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8030
711a72d3 8031 # Use the system's zlib library.
39f3de7c
L
8032 zlibdir="-L\$(top_builddir)/../zlib"
8033 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8034
711a72d3
L
8035# Check whether --with-system-zlib was given.
8036if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8037 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8038 zlibdir=
8039 zlibinc=
8040 fi
b040ad30 8041
233a11ab 8042fi
233a11ab 8043
233a11ab 8044
233a11ab 8045
b040ad30 8046
233a11ab 8047
25268153 8048# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 8049# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8051$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 8052if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8053 $as_echo_n "(cached) " >&6
8054else
8055 ac_func_search_save_LIBS=$LIBS
8056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057/* end confdefs.h. */
8058
8059/* Override any GCC internal prototype to avoid an error.
8060 Use char because int might match the return type of a GCC
8061 builtin and then its argument prototype would still apply. */
8062#ifdef __cplusplus
8063extern "C"
8064#endif
8065char kinfo_getvmmap ();
8066int
8067main ()
8068{
8069return kinfo_getvmmap ();
8070 ;
8071 return 0;
8072}
8073_ACEOF
37773e78 8074for ac_lib in '' util util-freebsd; do
25268153
JB
8075 if test -z "$ac_lib"; then
8076 ac_res="none required"
8077 else
8078 ac_res=-l$ac_lib
8079 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8080 fi
8081 if ac_fn_c_try_link "$LINENO"; then :
8082 ac_cv_search_kinfo_getvmmap=$ac_res
8083fi
8084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext
d0ac1c44 8086 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8087 break
8088fi
8089done
d0ac1c44 8090if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8091
8092else
8093 ac_cv_search_kinfo_getvmmap=no
8094fi
8095rm conftest.$ac_ext
8096LIBS=$ac_func_search_save_LIBS
8097fi
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8099$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8100ac_res=$ac_cv_search_kinfo_getvmmap
8101if test "$ac_res" != no; then :
8102 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8103
8104$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8105
8106fi
8107
8108
77f120bf 8109
016a3251
DD
8110 if test "X$prefix" = "XNONE"; then
8111 acl_final_prefix="$ac_default_prefix"
8112 else
8113 acl_final_prefix="$prefix"
8114 fi
8115 if test "X$exec_prefix" = "XNONE"; then
8116 acl_final_exec_prefix='${prefix}'
8117 else
8118 acl_final_exec_prefix="$exec_prefix"
8119 fi
8120 acl_save_prefix="$prefix"
8121 prefix="$acl_final_prefix"
8122 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8123 prefix="$acl_save_prefix"
8124
8125
8126# Check whether --with-gnu-ld was given.
8127if test "${with_gnu_ld+set}" = set; then :
8128 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8129else
8130 with_gnu_ld=no
8131fi
8132
8133# Prepare PATH_SEPARATOR.
8134# The user is always right.
8135if test "${PATH_SEPARATOR+set}" != set; then
8136 echo "#! /bin/sh" >conf$$.sh
8137 echo "exit 0" >>conf$$.sh
8138 chmod +x conf$$.sh
8139 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8140 PATH_SEPARATOR=';'
8141 else
8142 PATH_SEPARATOR=:
8143 fi
8144 rm -f conf$$.sh
8145fi
8146ac_prog=ld
8147if test "$GCC" = yes; then
8148 # Check if gcc -print-prog-name=ld gives a path.
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8150$as_echo_n "checking for ld used by GCC... " >&6; }
8151 case $host in
8152 *-*-mingw*)
8153 # gcc leaves a trailing carriage return which upsets mingw
8154 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8155 *)
8156 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8157 esac
8158 case $ac_prog in
8159 # Accept absolute paths.
8160 [\\/]* | [A-Za-z]:[\\/]*)
8161 re_direlt='/[^/][^/]*/\.\./'
8162 # Canonicalize the path of ld
8163 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8164 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8165 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8166 done
8167 test -z "$LD" && LD="$ac_prog"
8168 ;;
8169 "")
8170 # If it fails, then pretend we aren't using GCC.
8171 ac_prog=ld
8172 ;;
8173 *)
8174 # If it is relative, then search for the first ld in PATH.
8175 with_gnu_ld=unknown
8176 ;;
8177 esac
8178elif test "$with_gnu_ld" = yes; then
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8180$as_echo_n "checking for GNU ld... " >&6; }
8181else
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8183$as_echo_n "checking for non-GNU ld... " >&6; }
8184fi
d0ac1c44 8185if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8186 $as_echo_n "(cached) " >&6
8187else
8188 if test -z "$LD"; then
8189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8190 for ac_dir in $PATH; do
8191 test -z "$ac_dir" && ac_dir=.
8192 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8193 acl_cv_path_LD="$ac_dir/$ac_prog"
8194 # Check to see if the program is GNU ld. I'd rather use --version,
8195 # but apparently some GNU ld's only accept -v.
8196 # Break only if it was the GNU/non-GNU ld that we prefer.
8197 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8198 test "$with_gnu_ld" != no && break
8199 else
8200 test "$with_gnu_ld" != yes && break
8201 fi
8202 fi
8203 done
8204 IFS="$ac_save_ifs"
8205else
8206 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8207fi
8208fi
8209
8210LD="$acl_cv_path_LD"
8211if test -n "$LD"; then
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8213$as_echo "$LD" >&6; }
8214else
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8216$as_echo "no" >&6; }
8217fi
d0ac1c44 8218test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8220$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8221if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8222 $as_echo_n "(cached) " >&6
8223else
8224 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8225if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8226 acl_cv_prog_gnu_ld=yes
8227else
8228 acl_cv_prog_gnu_ld=no
8229fi
8230fi
8231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8232$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8233with_gnu_ld=$acl_cv_prog_gnu_ld
8234
8235
8236
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8238$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8239if ${acl_cv_rpath+:} false; then :
016a3251
DD
8240 $as_echo_n "(cached) " >&6
8241else
8242
8243 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8244 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8245 . ./conftest.sh
8246 rm -f ./conftest.sh
8247 acl_cv_rpath=done
8248
8249fi
8250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8251$as_echo "$acl_cv_rpath" >&6; }
8252 wl="$acl_cv_wl"
8253 libext="$acl_cv_libext"
8254 shlibext="$acl_cv_shlibext"
8255 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8256 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8257 hardcode_direct="$acl_cv_hardcode_direct"
8258 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8259 # Check whether --enable-rpath was given.
8260if test "${enable_rpath+set}" = set; then :
8261 enableval=$enable_rpath; :
8262else
8263 enable_rpath=yes
8264fi
8265
8266
8267
8268
8269
8270
8271
8272
8273 use_additional=yes
8274
8275 acl_save_prefix="$prefix"
8276 prefix="$acl_final_prefix"
8277 acl_save_exec_prefix="$exec_prefix"
8278 exec_prefix="$acl_final_exec_prefix"
8279
8280 eval additional_includedir=\"$includedir\"
8281 eval additional_libdir=\"$libdir\"
8282
8283 exec_prefix="$acl_save_exec_prefix"
8284 prefix="$acl_save_prefix"
77f120bf 8285
6c7a06a3 8286
81ecdfbb
RW
8287# Check whether --with-libiconv-prefix was given.
8288if test "${with_libiconv_prefix+set}" = set; then :
8289 withval=$with_libiconv_prefix;
016a3251
DD
8290 if test "X$withval" = "Xno"; then
8291 use_additional=no
8292 else
8293 if test "X$withval" = "X"; then
8294
8295 acl_save_prefix="$prefix"
8296 prefix="$acl_final_prefix"
8297 acl_save_exec_prefix="$exec_prefix"
8298 exec_prefix="$acl_final_exec_prefix"
8299
8300 eval additional_includedir=\"$includedir\"
8301 eval additional_libdir=\"$libdir\"
8302
8303 exec_prefix="$acl_save_exec_prefix"
8304 prefix="$acl_save_prefix"
8305
8306 else
8307 additional_includedir="$withval/include"
8308 additional_libdir="$withval/lib"
8309 fi
8310 fi
6c7a06a3 8311
81ecdfbb
RW
8312fi
8313
9f1528a1
AB
8314
8315# Check whether --with-libiconv-type was given.
8316if test "${with_libiconv_type+set}" = set; then :
8317 withval=$with_libiconv_type; with_libiconv_type=$withval
8318else
8319 with_libiconv_type=auto
8320fi
8321
8322 lib_type=`eval echo \$with_libiconv_type`
8323
016a3251
DD
8324 LIBICONV=
8325 LTLIBICONV=
8326 INCICONV=
8327 rpathdirs=
8328 ltrpathdirs=
8329 names_already_handled=
8330 names_next_round='iconv '
8331 while test -n "$names_next_round"; do
8332 names_this_round="$names_next_round"
8333 names_next_round=
8334 for name in $names_this_round; do
8335 already_handled=
8336 for n in $names_already_handled; do
8337 if test "$n" = "$name"; then
8338 already_handled=yes
8339 break
8340 fi
8341 done
8342 if test -z "$already_handled"; then
8343 names_already_handled="$names_already_handled $name"
8344 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8345 eval value=\"\$HAVE_LIB$uppername\"
8346 if test -n "$value"; then
8347 if test "$value" = yes; then
8348 eval value=\"\$LIB$uppername\"
8349 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8350 eval value=\"\$LTLIB$uppername\"
8351 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8352 else
8353 :
8354 fi
8355 else
8356 found_dir=
8357 found_la=
8358 found_so=
8359 found_a=
8360 if test $use_additional = yes; then
9f1528a1 8361 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8362 found_dir="$additional_libdir"
8363 found_so="$additional_libdir/lib$name.$shlibext"
8364 if test -f "$additional_libdir/lib$name.la"; then
8365 found_la="$additional_libdir/lib$name.la"
8366 fi
9f1528a1 8367 elif test x$lib_type != xshared; then
016a3251
DD
8368 if test -f "$additional_libdir/lib$name.$libext"; then
8369 found_dir="$additional_libdir"
8370 found_a="$additional_libdir/lib$name.$libext"
8371 if test -f "$additional_libdir/lib$name.la"; then
8372 found_la="$additional_libdir/lib$name.la"
8373 fi
8374 fi
8375 fi
8376 fi
8377 if test "X$found_dir" = "X"; then
8378 for x in $LDFLAGS $LTLIBICONV; do
8379
8380 acl_save_prefix="$prefix"
8381 prefix="$acl_final_prefix"
8382 acl_save_exec_prefix="$exec_prefix"
8383 exec_prefix="$acl_final_exec_prefix"
8384 eval x=\"$x\"
8385 exec_prefix="$acl_save_exec_prefix"
8386 prefix="$acl_save_prefix"
8387
8388 case "$x" in
8389 -L*)
8390 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8391 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8392 found_dir="$dir"
8393 found_so="$dir/lib$name.$shlibext"
8394 if test -f "$dir/lib$name.la"; then
8395 found_la="$dir/lib$name.la"
8396 fi
9f1528a1 8397 elif test x$lib_type != xshared; then
016a3251
DD
8398 if test -f "$dir/lib$name.$libext"; then
8399 found_dir="$dir"
8400 found_a="$dir/lib$name.$libext"
8401 if test -f "$dir/lib$name.la"; then
8402 found_la="$dir/lib$name.la"
8403 fi
8404 fi
8405 fi
8406 ;;
8407 esac
8408 if test "X$found_dir" != "X"; then
8409 break
8410 fi
8411 done
8412 fi
8413 if test "X$found_dir" != "X"; then
8414 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8415 if test "X$found_so" != "X"; then
8416 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8417 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8418 else
8419 haveit=
8420 for x in $ltrpathdirs; do
8421 if test "X$x" = "X$found_dir"; then
8422 haveit=yes
8423 break
8424 fi
8425 done
8426 if test -z "$haveit"; then
8427 ltrpathdirs="$ltrpathdirs $found_dir"
8428 fi
8429 if test "$hardcode_direct" = yes; then
8430 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8431 else
8432 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8433 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8434 haveit=
8435 for x in $rpathdirs; do
8436 if test "X$x" = "X$found_dir"; then
8437 haveit=yes
8438 break
8439 fi
8440 done
8441 if test -z "$haveit"; then
8442 rpathdirs="$rpathdirs $found_dir"
8443 fi
8444 else
8445 haveit=
8446 for x in $LDFLAGS $LIBICONV; do
8447
8448 acl_save_prefix="$prefix"
8449 prefix="$acl_final_prefix"
8450 acl_save_exec_prefix="$exec_prefix"
8451 exec_prefix="$acl_final_exec_prefix"
8452 eval x=\"$x\"
8453 exec_prefix="$acl_save_exec_prefix"
8454 prefix="$acl_save_prefix"
8455
8456 if test "X$x" = "X-L$found_dir"; then
8457 haveit=yes
8458 break
8459 fi
8460 done
8461 if test -z "$haveit"; then
8462 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8463 fi
8464 if test "$hardcode_minus_L" != no; then
8465 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8466 else
8467 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8468 fi
8469 fi
8470 fi
8471 fi
8472 else
8473 if test "X$found_a" != "X"; then
8474 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8475 else
8476 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8477 fi
8478 fi
8479 additional_includedir=
8480 case "$found_dir" in
8481 */lib | */lib/)
8482 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8483 additional_includedir="$basedir/include"
8484 ;;
8485 esac
8486 if test "X$additional_includedir" != "X"; then
8487 if test "X$additional_includedir" != "X/usr/include"; then
8488 haveit=
8489 if test "X$additional_includedir" = "X/usr/local/include"; then
8490 if test -n "$GCC"; then
8491 case $host_os in
8492 linux*) haveit=yes;;
8493 esac
8494 fi
8495 fi
8496 if test -z "$haveit"; then
8497 for x in $CPPFLAGS $INCICONV; do
8498
8499 acl_save_prefix="$prefix"
8500 prefix="$acl_final_prefix"
8501 acl_save_exec_prefix="$exec_prefix"
8502 exec_prefix="$acl_final_exec_prefix"
8503 eval x=\"$x\"
8504 exec_prefix="$acl_save_exec_prefix"
8505 prefix="$acl_save_prefix"
8506
8507 if test "X$x" = "X-I$additional_includedir"; then
8508 haveit=yes
8509 break
8510 fi
8511 done
8512 if test -z "$haveit"; then
8513 if test -d "$additional_includedir"; then
8514 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8515 fi
8516 fi
8517 fi
8518 fi
8519 fi
8520 if test -n "$found_la"; then
8521 save_libdir="$libdir"
8522 case "$found_la" in
8523 */* | *\\*) . "$found_la" ;;
8524 *) . "./$found_la" ;;
8525 esac
8526 libdir="$save_libdir"
8527 for dep in $dependency_libs; do
8528 case "$dep" in
8529 -L*)
8530 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8531 if test "X$additional_libdir" != "X/usr/lib"; then
8532 haveit=
8533 if test "X$additional_libdir" = "X/usr/local/lib"; then
8534 if test -n "$GCC"; then
8535 case $host_os in
8536 linux*) haveit=yes;;
8537 esac
8538 fi
8539 fi
8540 if test -z "$haveit"; then
8541 haveit=
8542 for x in $LDFLAGS $LIBICONV; do
8543
8544 acl_save_prefix="$prefix"
8545 prefix="$acl_final_prefix"
8546 acl_save_exec_prefix="$exec_prefix"
8547 exec_prefix="$acl_final_exec_prefix"
8548 eval x=\"$x\"
8549 exec_prefix="$acl_save_exec_prefix"
8550 prefix="$acl_save_prefix"
8551
8552 if test "X$x" = "X-L$additional_libdir"; then
8553 haveit=yes
8554 break
8555 fi
8556 done
8557 if test -z "$haveit"; then
8558 if test -d "$additional_libdir"; then
8559 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8560 fi
8561 fi
8562 haveit=
8563 for x in $LDFLAGS $LTLIBICONV; do
8564
8565 acl_save_prefix="$prefix"
8566 prefix="$acl_final_prefix"
8567 acl_save_exec_prefix="$exec_prefix"
8568 exec_prefix="$acl_final_exec_prefix"
8569 eval x=\"$x\"
8570 exec_prefix="$acl_save_exec_prefix"
8571 prefix="$acl_save_prefix"
8572
8573 if test "X$x" = "X-L$additional_libdir"; then
8574 haveit=yes
8575 break
8576 fi
8577 done
8578 if test -z "$haveit"; then
8579 if test -d "$additional_libdir"; then
8580 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8581 fi
8582 fi
8583 fi
8584 fi
8585 ;;
8586 -R*)
8587 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8588 if test "$enable_rpath" != no; then
8589 haveit=
8590 for x in $rpathdirs; do
8591 if test "X$x" = "X$dir"; then
8592 haveit=yes
8593 break
8594 fi
8595 done
8596 if test -z "$haveit"; then
8597 rpathdirs="$rpathdirs $dir"
8598 fi
8599 haveit=
8600 for x in $ltrpathdirs; do
8601 if test "X$x" = "X$dir"; then
8602 haveit=yes
8603 break
8604 fi
8605 done
8606 if test -z "$haveit"; then
8607 ltrpathdirs="$ltrpathdirs $dir"
8608 fi
8609 fi
8610 ;;
8611 -l*)
8612 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8613 ;;
8614 *.la)
8615 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8616 ;;
8617 *)
8618 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8619 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8620 ;;
8621 esac
8622 done
8623 fi
8624 else
9f1528a1
AB
8625 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8627 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8628 else
8629 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8630 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8631 fi
016a3251
DD
8632 fi
8633 fi
8634 fi
8635 done
8636 done
8637 if test "X$rpathdirs" != "X"; then
8638 if test -n "$hardcode_libdir_separator"; then
8639 alldirs=
8640 for found_dir in $rpathdirs; do
8641 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8642 done
8643 acl_save_libdir="$libdir"
8644 libdir="$alldirs"
8645 eval flag=\"$hardcode_libdir_flag_spec\"
8646 libdir="$acl_save_libdir"
8647 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8648 else
8649 for found_dir in $rpathdirs; do
8650 acl_save_libdir="$libdir"
8651 libdir="$found_dir"
8652 eval flag=\"$hardcode_libdir_flag_spec\"
8653 libdir="$acl_save_libdir"
8654 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8655 done
8656 fi
8657 fi
8658 if test "X$ltrpathdirs" != "X"; then
8659 for found_dir in $ltrpathdirs; do
8660 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8661 done
8662 fi
8663
8664
8665
8666
8667
6c7a06a3 8668
6c7a06a3 8669
81ecdfbb
RW
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8671$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8672if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8673 $as_echo_n "(cached) " >&6
d542061a 8674else
6c7a06a3
TT
8675
8676 am_cv_func_iconv="no, consider installing GNU libiconv"
8677 am_cv_lib_iconv=no
016a3251
DD
8678 am_save_CPPFLAGS="$CPPFLAGS"
8679 CPPFLAGS="$CPPFLAGS $INCICONV"
8680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8681/* end confdefs.h. */
6c7a06a3
TT
8682#include <stdlib.h>
8683#include <iconv.h>
d542061a
UW
8684int
8685main ()
8686{
6c7a06a3 8687iconv_t cd = iconv_open("","");
016a3251
DD
8688 iconv(cd,NULL,NULL,NULL,NULL);
8689 iconv_close(cd);
d542061a
UW
8690 ;
8691 return 0;
8692}
8693_ACEOF
81ecdfbb 8694if ac_fn_c_try_link "$LINENO"; then :
016a3251 8695 am_cv_func_iconv=yes
d542061a 8696fi
81ecdfbb
RW
8697rm -f core conftest.err conftest.$ac_objext \
8698 conftest$ac_exeext conftest.$ac_ext
016a3251 8699 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8700
016a3251
DD
8701 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8702 for _libs in .libs _libs; do
8703 am_save_CPPFLAGS="$CPPFLAGS"
8704 am_save_LIBS="$LIBS"
8705 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8706 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8708/* end confdefs.h. */
6c7a06a3
TT
8709#include <stdlib.h>
8710#include <iconv.h>
d542061a
UW
8711int
8712main ()
8713{
6c7a06a3 8714iconv_t cd = iconv_open("","");
016a3251
DD
8715 iconv(cd,NULL,NULL,NULL,NULL);
8716 iconv_close(cd);
d542061a
UW
8717 ;
8718 return 0;
8719}
8720_ACEOF
81ecdfbb 8721if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8722 INCICONV="-I../libiconv/include"
8723 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8724 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8725 am_cv_lib_iconv=yes
8726 am_cv_func_iconv=yes
d542061a 8727fi
81ecdfbb
RW
8728rm -f core conftest.err conftest.$ac_objext \
8729 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8730 CPPFLAGS="$am_save_CPPFLAGS"
8731 LIBS="$am_save_LIBS"
8732 if test "$am_cv_func_iconv" = "yes"; then
8733 break
8734 fi
8735 done
77f120bf 8736 fi
94ae1714 8737
4edb1e84 8738 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8739 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8740 am_save_LIBS="$LIBS"
5d762de0 8741 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8742 LIBS="$LIBS $LIBICONV"
81ecdfbb 8743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8744/* end confdefs.h. */
6c7a06a3
TT
8745#include <stdlib.h>
8746#include <iconv.h>
bec39cab
AC
8747int
8748main ()
8749{
6c7a06a3
TT
8750iconv_t cd = iconv_open("","");
8751 iconv(cd,NULL,NULL,NULL,NULL);
8752 iconv_close(cd);
bec39cab
AC
8753 ;
8754 return 0;
8755}
8756_ACEOF
81ecdfbb 8757if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8758 am_cv_lib_iconv=yes
6c7a06a3 8759 am_cv_func_iconv=yes
627af7ea 8760fi
81ecdfbb
RW
8761rm -f core conftest.err conftest.$ac_objext \
8762 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8763 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8764 LIBS="$am_save_LIBS"
6c7a06a3
TT
8765 fi
8766
8767fi
81ecdfbb
RW
8768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8769$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8770 if test "$am_cv_func_iconv" = yes; then
8771
8772$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8773
016a3251 8774 fi
fc3b640d 8775 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8776
8777 for element in $INCICONV; do
8778 haveit=
8779 for x in $CPPFLAGS; do
8780
8781 acl_save_prefix="$prefix"
8782 prefix="$acl_final_prefix"
8783 acl_save_exec_prefix="$exec_prefix"
8784 exec_prefix="$acl_final_exec_prefix"
8785 eval x=\"$x\"
8786 exec_prefix="$acl_save_exec_prefix"
8787 prefix="$acl_save_prefix"
8788
8789 if test "X$x" = "X$element"; then
8790 haveit=yes
8791 break
8792 fi
8793 done
8794 if test -z "$haveit"; then
8795 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8796 fi
8797 done
8798
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8800$as_echo_n "checking how to link with libiconv... " >&6; }
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8802$as_echo "$LIBICONV" >&6; }
94ae1714 8803 else
016a3251
DD
8804 LIBICONV=
8805 LTLIBICONV=
fc3b640d 8806 fi
94ae1714 8807
6c7a06a3 8808
6c7a06a3 8809
016a3251 8810 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8812$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8813 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8814 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8815else
8816
81ecdfbb 8817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8818/* end confdefs.h. */
8819
6c7a06a3
TT
8820#include <stdlib.h>
8821#include <iconv.h>
8822extern
b4e70030 8823#ifdef __cplusplus
6c7a06a3 8824"C"
b4e70030 8825#endif
6c7a06a3
TT
8826#if defined(__STDC__) || defined(__cplusplus)
8827size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8828#else
8829size_t iconv();
8830#endif
8831
b4e70030
JB
8832int
8833main ()
8834{
6c7a06a3 8835
b4e70030
JB
8836 ;
8837 return 0;
8838}
8839_ACEOF
81ecdfbb 8840if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8841 am_cv_proto_iconv_arg1=""
4e8d927d 8842else
81ecdfbb 8843 am_cv_proto_iconv_arg1="const"
b4e70030 8844fi
81ecdfbb 8845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8846 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
8847fi
8848
8849 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8851 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8852$as_echo "${ac_t:-
8853 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8854
8855cat >>confdefs.h <<_ACEOF
8856#define ICONV_CONST $am_cv_proto_iconv_arg1
8857_ACEOF
8858
8859 fi
6c7a06a3
TT
8860
8861
478aac75
DE
8862# GDB may fork/exec the iconv program to get the list of supported character
8863# sets. Allow the user to specify where to find it.
8864# There are several factors affecting the choice of option name:
8865# - There is already --with-libiconv-prefix but we can't use it, it specifies
8866# the build-time location of libiconv files.
8867# - The program we need to find is iconv, which comes with glibc. The user
8868# doesn't necessarily have libiconv installed. Therefore naming this
8869# --with-libiconv-foo feels wrong.
8870# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8871# defined to work on directories not files (though it really doesn't know
8872# the difference).
8873# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8874# with --with-libiconv-prefix.
8875# Putting these together is why the option name is --with-iconv-bin.
8876
8877
8878# Check whether --with-iconv-bin was given.
8879if test "${with_iconv_bin+set}" = set; then :
8880 withval=$with_iconv_bin; iconv_bin="${withval}"
8881
8882cat >>confdefs.h <<_ACEOF
8883#define ICONV_BIN "${iconv_bin}"
8884_ACEOF
8885
8886
8887 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8888 if test "x$prefix" = xNONE; then
8889 test_prefix=/usr/local
8890 else
8891 test_prefix=$prefix
8892 fi
8893 else
8894 test_prefix=$exec_prefix
8895 fi
8896 value=0
8897 case ${iconv_bin} in
8898 "${test_prefix}"|"${test_prefix}/"*|\
8899 '${exec_prefix}'|'${exec_prefix}/'*)
8900 value=1
8901 ;;
8902 esac
8903
8904cat >>confdefs.h <<_ACEOF
8905#define ICONV_BIN_RELOCATABLE $value
8906_ACEOF
8907
8908
8909
8910fi
8911
8912
cb01cfba 8913# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8914if test x"$enable_tui" != xno; then
cb01cfba
JB
8915 prefer_curses=yes
8916fi
8917
8918curses_found=no
8919if test x"$prefer_curses" = xyes; then
8920 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8921 # curses library because the latter might not provide all the
8922 # functionality we need. However, this leads to problems on systems
8923 # where the linker searches /usr/local/lib, but the compiler doesn't
8924 # search /usr/local/include, if ncurses is installed in /usr/local. A
8925 # default installation of ncurses on alpha*-dec-osf* will lead to such
8926 # a situation.
81ecdfbb
RW
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8928$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8929if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8930 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8931else
8932 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8934/* end confdefs.h. */
8935
81ecdfbb
RW
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. */
6c7a06a3
TT
8939#ifdef __cplusplus
8940extern "C"
8941#endif
6c7a06a3
TT
8942char waddstr ();
8943int
8944main ()
8945{
81ecdfbb 8946return waddstr ();
6c7a06a3
TT
8947 ;
8948 return 0;
8949}
8950_ACEOF
5007d765 8951for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8952 if test -z "$ac_lib"; then
8953 ac_res="none required"
8954 else
8955 ac_res=-l$ac_lib
8956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8957 fi
8958 if ac_fn_c_try_link "$LINENO"; then :
8959 ac_cv_search_waddstr=$ac_res
8960fi
8961rm -f core conftest.err conftest.$ac_objext \
8962 conftest$ac_exeext
d0ac1c44 8963 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8964 break
8965fi
8966done
d0ac1c44 8967if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8968
6c7a06a3 8969else
81ecdfbb
RW
8970 ac_cv_search_waddstr=no
8971fi
8972rm conftest.$ac_ext
8973LIBS=$ac_func_search_save_LIBS
8974fi
8975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8976$as_echo "$ac_cv_search_waddstr" >&6; }
8977ac_res=$ac_cv_search_waddstr
8978if test "$ac_res" != no; then :
8979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8980
8981fi
8982
8983
cb01cfba
JB
8984 if test "$ac_cv_search_waddstr" != no; then
8985 curses_found=yes
8986 fi
8987fi
8988
8989# Check whether we should enable the TUI, but only do so if we really
8990# can.
8991if test x"$enable_tui" != xno; then
0ad6b8ee 8992 if test -d "$srcdir/tui"; then
cb01cfba 8993 if test "$curses_found" != no; then
6c7a06a3
TT
8994 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8995 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8996 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8997 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8998 else
8999 if test x"$enable_tui" = xyes; then
d0ac1c44 9000 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9001 else
81ecdfbb
RW
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9003$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9004 fi
9005 fi
9006 fi
9007fi
9008
9009# Since GDB uses Readline, we need termcap functionality. In many
9010# cases this will be provided by the curses library, but some systems
96fe4562 9011# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9012
9013case $host_os in
9014 cygwin*)
0ad6b8ee 9015 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9016 LIBS="../libtermcap/libtermcap.a $LIBS"
9017 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9018 fi ;;
9019 go32* | *djgpp*)
9020 ac_cv_search_tgetent="none required"
9021 ;;
6c7a06a3
TT
9022esac
9023
9024# These are the libraries checked by Readline.
81ecdfbb
RW
9025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9026$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9027if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9028 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9029else
9030 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9032/* end confdefs.h. */
9033
81ecdfbb
RW
9034/* Override any GCC internal prototype to avoid an error.
9035 Use char because int might match the return type of a GCC
9036 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9037#ifdef __cplusplus
9038extern "C"
9039#endif
6c7a06a3
TT
9040char tgetent ();
9041int
9042main ()
9043{
81ecdfbb 9044return tgetent ();
6c7a06a3
TT
9045 ;
9046 return 0;
9047}
9048_ACEOF
2578ecb1 9049for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9050 if test -z "$ac_lib"; then
9051 ac_res="none required"
9052 else
9053 ac_res=-l$ac_lib
6c7a06a3 9054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9055 fi
9056 if ac_fn_c_try_link "$LINENO"; then :
9057 ac_cv_search_tgetent=$ac_res
9058fi
9059rm -f core conftest.err conftest.$ac_objext \
9060 conftest$ac_exeext
d0ac1c44 9061 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9062 break
9063fi
9064done
d0ac1c44 9065if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9066
6c7a06a3 9067else
81ecdfbb 9068 ac_cv_search_tgetent=no
6c7a06a3 9069fi
81ecdfbb 9070rm conftest.$ac_ext
6c7a06a3
TT
9071LIBS=$ac_func_search_save_LIBS
9072fi
81ecdfbb
RW
9073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9074$as_echo "$ac_cv_search_tgetent" >&6; }
9075ac_res=$ac_cv_search_tgetent
9076if test "$ac_res" != no; then :
9077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9078
06825bd1
MK
9079fi
9080
06825bd1 9081
bec39cab 9082if test "$ac_cv_search_tgetent" = no; then
7a85168d 9083 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9084fi
9085
3841debe 9086
81ecdfbb
RW
9087# Check whether --with-system-readline was given.
9088if test "${with_system_readline+set}" = set; then :
9089 withval=$with_system_readline;
9090fi
6a30b0a5 9091
6a30b0a5
AS
9092
9093if test "$with_system_readline" = yes; then
86c6b807
TT
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9095$as_echo_n "checking whether system readline is new enough... " >&6; }
9096if ${gdb_cv_readline_ok+:} false; then :
9097 $as_echo_n "(cached) " >&6
9098else
9099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9100/* end confdefs.h. */
9101#include <stdio.h>
9102#include <readline/readline.h>
9103int
9104main ()
9105{
9106#if RL_VERSION_MAJOR < 7
9107# error "readline version 7 required"
9108#endif
9109 ;
9110 return 0;
9111}
9112_ACEOF
9113if ac_fn_c_try_compile "$LINENO"; then :
9114 gdb_cv_readline_ok=yes
9115else
9116 gdb_cv_readline_ok=no
9117fi
9118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9119fi
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9121$as_echo "$gdb_cv_readline_ok" >&6; }
9122 if test "$gdb_cv_readline_ok" != yes; then
9123 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9124 fi
9125
6a30b0a5
AS
9126 READLINE=-lreadline
9127 READLINE_DEPS=
9128 READLINE_CFLAGS=
39037522 9129 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9130else
9131 READLINE='$(READLINE_DIR)/libreadline.a'
9132 READLINE_DEPS='$(READLINE)'
9133 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9134 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9135fi
9136
9137
9138
9139
9140
f997c383
SD
9141# Generate jit-reader.h
9142
9143# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9144TARGET_PTR=
9145
9146# The cast to long int works around a bug in the HP C Compiler
9147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9149# This bug is HP SR number 8606223364.
9150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9151$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9152if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9153 $as_echo_n "(cached) " >&6
9154else
9155 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9156
9157else
9158 if test "$ac_cv_type_unsigned_long_long" = yes; then
9159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9161as_fn_error 77 "cannot compute sizeof (unsigned long long)
9162See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9163 else
9164 ac_cv_sizeof_unsigned_long_long=0
9165 fi
9166fi
9167
9168fi
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9170$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9171
9172
9173
9174cat >>confdefs.h <<_ACEOF
9175#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9176_ACEOF
9177
9178
9179# The cast to long int works around a bug in the HP C Compiler
9180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9182# This bug is HP SR number 8606223364.
9183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9184$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9185if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9186 $as_echo_n "(cached) " >&6
9187else
9188 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9189
9190else
9191 if test "$ac_cv_type_unsigned_long" = yes; then
9192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9194as_fn_error 77 "cannot compute sizeof (unsigned long)
9195See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9196 else
9197 ac_cv_sizeof_unsigned_long=0
9198 fi
9199fi
9200
9201fi
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9203$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9204
9205
9206
9207cat >>confdefs.h <<_ACEOF
9208#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9209_ACEOF
9210
9211
9212# The cast to long int works around a bug in the HP C Compiler
9213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9215# This bug is HP SR number 8606223364.
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9217$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9218if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9219 $as_echo_n "(cached) " >&6
9220else
9221 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9222
9223else
9224 if test "$ac_cv_type_unsigned___int128" = yes; then
9225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9227as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9228See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9229 else
9230 ac_cv_sizeof_unsigned___int128=0
9231 fi
9232fi
9233
9234fi
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9236$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9237
9238
9239
9240cat >>confdefs.h <<_ACEOF
9241#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9242_ACEOF
9243
9244
9245
9246if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9247 TARGET_PTR="unsigned long"
9248elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9249 TARGET_PTR="unsigned long long"
9250elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9251 TARGET_PTR="unsigned __int128"
9252else
9253 TARGET_PTR="unsigned long"
9254fi
9255
9256
9257ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9258
9259
a2d08b9e
SD
9260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9261$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9262if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9263 $as_echo_n "(cached) " >&6
9264else
9265 ac_func_search_save_LIBS=$LIBS
9266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9267/* end confdefs.h. */
9268
9269/* Override any GCC internal prototype to avoid an error.
9270 Use char because int might match the return type of a GCC
9271 builtin and then its argument prototype would still apply. */
9272#ifdef __cplusplus
9273extern "C"
9274#endif
9275char dlopen ();
9276int
9277main ()
9278{
9279return dlopen ();
9280 ;
9281 return 0;
9282}
9283_ACEOF
9284for ac_lib in '' dl; do
9285 if test -z "$ac_lib"; then
9286 ac_res="none required"
9287 else
9288 ac_res=-l$ac_lib
9289 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9290 fi
9291 if ac_fn_c_try_link "$LINENO"; then :
9292 ac_cv_search_dlopen=$ac_res
9293fi
9294rm -f core conftest.err conftest.$ac_objext \
9295 conftest$ac_exeext
d0ac1c44 9296 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9297 break
9298fi
9299done
d0ac1c44 9300if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9301
9302else
9303 ac_cv_search_dlopen=no
9304fi
9305rm conftest.$ac_ext
9306LIBS=$ac_func_search_save_LIBS
9307fi
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9309$as_echo "$ac_cv_search_dlopen" >&6; }
9310ac_res=$ac_cv_search_dlopen
9311if test "$ac_res" != no; then :
9312 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9313
9314fi
9315
9316
39037522 9317
b8e0a31c
SD
9318
9319# Check whether --with-jit-reader-dir was given.
9320if test "${with_jit_reader_dir+set}" = set; then :
9321 withval=$with_jit_reader_dir;
9322 JIT_READER_DIR=$withval
9323else
9324 JIT_READER_DIR=${libdir}/gdb
9325fi
9326
9327
9328 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9329 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9330 ac_define_dir=`eval echo $JIT_READER_DIR`
9331 ac_define_dir=`eval echo $ac_define_dir`
9332
9333cat >>confdefs.h <<_ACEOF
9334#define JIT_READER_DIR "$ac_define_dir"
9335_ACEOF
9336
9337
9338
9339
9340 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9341 if test "x$prefix" = xNONE; then
9342 test_prefix=/usr/local
9343 else
9344 test_prefix=$prefix
9345 fi
9346 else
9347 test_prefix=$exec_prefix
9348 fi
9349 value=0
9350 case ${ac_define_dir} in
9351 "${test_prefix}"|"${test_prefix}/"*|\
9352 '${exec_prefix}'|'${exec_prefix}/'*)
9353 value=1
9354 ;;
9355 esac
9356
9357cat >>confdefs.h <<_ACEOF
9358#define JIT_READER_DIR_RELOCATABLE $value
9359_ACEOF
9360
9361
9362
9363
9364
81ecdfbb
RW
9365# Check whether --with-expat was given.
9366if test "${with_expat+set}" = set; then :
9367 withval=$with_expat;
5c39566f
DJ
9368else
9369 with_expat=auto
81ecdfbb
RW
9370fi
9371
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9373$as_echo_n "checking whether to use expat... " >&6; }
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9375$as_echo "$with_expat" >&6; }
5c39566f
DJ
9376
9377if test "${with_expat}" = no; then
81ecdfbb
RW
9378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9379$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9380 HAVE_LIBEXPAT=no
9381else
9382
3841debe
DJ
9383
9384
9385
9386
9387
9388
9389
9390 use_additional=yes
9391
9392 acl_save_prefix="$prefix"
9393 prefix="$acl_final_prefix"
9394 acl_save_exec_prefix="$exec_prefix"
9395 exec_prefix="$acl_final_exec_prefix"
9396
9397 eval additional_includedir=\"$includedir\"
9398 eval additional_libdir=\"$libdir\"
9399
9400 exec_prefix="$acl_save_exec_prefix"
9401 prefix="$acl_save_prefix"
9402
9403
81ecdfbb
RW
9404# Check whether --with-libexpat-prefix was given.
9405if test "${with_libexpat_prefix+set}" = set; then :
9406 withval=$with_libexpat_prefix;
3841debe
DJ
9407 if test "X$withval" = "Xno"; then
9408 use_additional=no
9409 else
9410 if test "X$withval" = "X"; then
9411
9412 acl_save_prefix="$prefix"
9413 prefix="$acl_final_prefix"
9414 acl_save_exec_prefix="$exec_prefix"
9415 exec_prefix="$acl_final_exec_prefix"
9416
9417 eval additional_includedir=\"$includedir\"
9418 eval additional_libdir=\"$libdir\"
9419
9420 exec_prefix="$acl_save_exec_prefix"
9421 prefix="$acl_save_prefix"
9422
9423 else
9424 additional_includedir="$withval/include"
9425 additional_libdir="$withval/lib"
9426 fi
9427 fi
9428
81ecdfbb
RW
9429fi
9430
9f1528a1
AB
9431
9432# Check whether --with-libexpat-type was given.
9433if test "${with_libexpat_type+set}" = set; then :
9434 withval=$with_libexpat_type; with_libexpat_type=$withval
9435else
9436 with_libexpat_type=auto
9437fi
9438
9439 lib_type=`eval echo \$with_libexpat_type`
9440
3841debe
DJ
9441 LIBEXPAT=
9442 LTLIBEXPAT=
9443 INCEXPAT=
9444 rpathdirs=
9445 ltrpathdirs=
9446 names_already_handled=
9447 names_next_round='expat '
9448 while test -n "$names_next_round"; do
9449 names_this_round="$names_next_round"
9450 names_next_round=
9451 for name in $names_this_round; do
9452 already_handled=
9453 for n in $names_already_handled; do
9454 if test "$n" = "$name"; then
9455 already_handled=yes
9456 break
9457 fi
9458 done
9459 if test -z "$already_handled"; then
9460 names_already_handled="$names_already_handled $name"
9461 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9462 eval value=\"\$HAVE_LIB$uppername\"
9463 if test -n "$value"; then
9464 if test "$value" = yes; then
9465 eval value=\"\$LIB$uppername\"
9466 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9467 eval value=\"\$LTLIB$uppername\"
9468 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9469 else
9470 :
9471 fi
9472 else
9473 found_dir=
9474 found_la=
9475 found_so=
9476 found_a=
9477 if test $use_additional = yes; then
9f1528a1 9478 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9479 found_dir="$additional_libdir"
9480 found_so="$additional_libdir/lib$name.$shlibext"
9481 if test -f "$additional_libdir/lib$name.la"; then
9482 found_la="$additional_libdir/lib$name.la"
9483 fi
9f1528a1 9484 elif test x$lib_type != xshared; then
3841debe
DJ
9485 if test -f "$additional_libdir/lib$name.$libext"; then
9486 found_dir="$additional_libdir"
9487 found_a="$additional_libdir/lib$name.$libext"
9488 if test -f "$additional_libdir/lib$name.la"; then
9489 found_la="$additional_libdir/lib$name.la"
9490 fi
9491 fi
9492 fi
9493 fi
9494 if test "X$found_dir" = "X"; then
9495 for x in $LDFLAGS $LTLIBEXPAT; do
9496
9497 acl_save_prefix="$prefix"
9498 prefix="$acl_final_prefix"
9499 acl_save_exec_prefix="$exec_prefix"
9500 exec_prefix="$acl_final_exec_prefix"
9501 eval x=\"$x\"
9502 exec_prefix="$acl_save_exec_prefix"
9503 prefix="$acl_save_prefix"
9504
9505 case "$x" in
9506 -L*)
9507 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9508 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9509 found_dir="$dir"
9510 found_so="$dir/lib$name.$shlibext"
9511 if test -f "$dir/lib$name.la"; then
9512 found_la="$dir/lib$name.la"
9513 fi
9f1528a1 9514 elif test x$lib_type != xshared; then
3841debe
DJ
9515 if test -f "$dir/lib$name.$libext"; then
9516 found_dir="$dir"
9517 found_a="$dir/lib$name.$libext"
9518 if test -f "$dir/lib$name.la"; then
9519 found_la="$dir/lib$name.la"
9520 fi
9521 fi
9522 fi
9523 ;;
9524 esac
9525 if test "X$found_dir" != "X"; then
9526 break
9527 fi
9528 done
9529 fi
9530 if test "X$found_dir" != "X"; then
9531 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9532 if test "X$found_so" != "X"; then
9533 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9534 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9535 else
9536 haveit=
9537 for x in $ltrpathdirs; do
9538 if test "X$x" = "X$found_dir"; then
9539 haveit=yes
9540 break
9541 fi
9542 done
9543 if test -z "$haveit"; then
9544 ltrpathdirs="$ltrpathdirs $found_dir"
9545 fi
9546 if test "$hardcode_direct" = yes; then
9547 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9548 else
9549 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9550 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9551 haveit=
9552 for x in $rpathdirs; do
9553 if test "X$x" = "X$found_dir"; then
9554 haveit=yes
9555 break
9556 fi
9557 done
9558 if test -z "$haveit"; then
9559 rpathdirs="$rpathdirs $found_dir"
9560 fi
9561 else
9562 haveit=
9563 for x in $LDFLAGS $LIBEXPAT; do
9564
9565 acl_save_prefix="$prefix"
9566 prefix="$acl_final_prefix"
9567 acl_save_exec_prefix="$exec_prefix"
9568 exec_prefix="$acl_final_exec_prefix"
9569 eval x=\"$x\"
9570 exec_prefix="$acl_save_exec_prefix"
9571 prefix="$acl_save_prefix"
9572
9573 if test "X$x" = "X-L$found_dir"; then
9574 haveit=yes
9575 break
9576 fi
9577 done
9578 if test -z "$haveit"; then
9579 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9580 fi
9581 if test "$hardcode_minus_L" != no; then
9582 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9583 else
9584 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9585 fi
9586 fi
9587 fi
9588 fi
9589 else
9590 if test "X$found_a" != "X"; then
9591 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9592 else
9593 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9594 fi
9595 fi
9596 additional_includedir=
9597 case "$found_dir" in
9598 */lib | */lib/)
9599 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9600 additional_includedir="$basedir/include"
9601 ;;
9602 esac
9603 if test "X$additional_includedir" != "X"; then
9604 if test "X$additional_includedir" != "X/usr/include"; then
9605 haveit=
9606 if test "X$additional_includedir" = "X/usr/local/include"; then
9607 if test -n "$GCC"; then
9608 case $host_os in
9609 linux*) haveit=yes;;
9610 esac
9611 fi
9612 fi
9613 if test -z "$haveit"; then
9614 for x in $CPPFLAGS $INCEXPAT; do
9615
9616 acl_save_prefix="$prefix"
9617 prefix="$acl_final_prefix"
9618 acl_save_exec_prefix="$exec_prefix"
9619 exec_prefix="$acl_final_exec_prefix"
9620 eval x=\"$x\"
9621 exec_prefix="$acl_save_exec_prefix"
9622 prefix="$acl_save_prefix"
9623
9624 if test "X$x" = "X-I$additional_includedir"; then
9625 haveit=yes
9626 break
9627 fi
9628 done
9629 if test -z "$haveit"; then
9630 if test -d "$additional_includedir"; then
9631 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9632 fi
9633 fi
9634 fi
9635 fi
9636 fi
9637 if test -n "$found_la"; then
9638 save_libdir="$libdir"
9639 case "$found_la" in
9640 */* | *\\*) . "$found_la" ;;
9641 *) . "./$found_la" ;;
9642 esac
9643 libdir="$save_libdir"
9644 for dep in $dependency_libs; do
9645 case "$dep" in
9646 -L*)
9647 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9648 if test "X$additional_libdir" != "X/usr/lib"; then
9649 haveit=
9650 if test "X$additional_libdir" = "X/usr/local/lib"; then
9651 if test -n "$GCC"; then
9652 case $host_os in
9653 linux*) haveit=yes;;
9654 esac
9655 fi
9656 fi
9657 if test -z "$haveit"; then
9658 haveit=
9659 for x in $LDFLAGS $LIBEXPAT; do
9660
9661 acl_save_prefix="$prefix"
9662 prefix="$acl_final_prefix"
9663 acl_save_exec_prefix="$exec_prefix"
9664 exec_prefix="$acl_final_exec_prefix"
9665 eval x=\"$x\"
9666 exec_prefix="$acl_save_exec_prefix"
9667 prefix="$acl_save_prefix"
9668
9669 if test "X$x" = "X-L$additional_libdir"; then
9670 haveit=yes
9671 break
9672 fi
9673 done
9674 if test -z "$haveit"; then
9675 if test -d "$additional_libdir"; then
9676 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9677 fi
9678 fi
9679 haveit=
9680 for x in $LDFLAGS $LTLIBEXPAT; do
9681
9682 acl_save_prefix="$prefix"
9683 prefix="$acl_final_prefix"
9684 acl_save_exec_prefix="$exec_prefix"
9685 exec_prefix="$acl_final_exec_prefix"
9686 eval x=\"$x\"
9687 exec_prefix="$acl_save_exec_prefix"
9688 prefix="$acl_save_prefix"
9689
9690 if test "X$x" = "X-L$additional_libdir"; then
9691 haveit=yes
9692 break
9693 fi
9694 done
9695 if test -z "$haveit"; then
9696 if test -d "$additional_libdir"; then
9697 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9698 fi
9699 fi
9700 fi
9701 fi
9702 ;;
9703 -R*)
9704 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9705 if test "$enable_rpath" != no; then
9706 haveit=
9707 for x in $rpathdirs; do
9708 if test "X$x" = "X$dir"; then
9709 haveit=yes
9710 break
9711 fi
9712 done
9713 if test -z "$haveit"; then
9714 rpathdirs="$rpathdirs $dir"
9715 fi
9716 haveit=
9717 for x in $ltrpathdirs; do
9718 if test "X$x" = "X$dir"; then
9719 haveit=yes
9720 break
9721 fi
9722 done
9723 if test -z "$haveit"; then
9724 ltrpathdirs="$ltrpathdirs $dir"
9725 fi
9726 fi
9727 ;;
9728 -l*)
9729 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9730 ;;
9731 *.la)
9732 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9733 ;;
9734 *)
9735 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9736 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9737 ;;
81ecdfbb
RW
9738 esac
9739 done
9740 fi
9741 else
9f1528a1
AB
9742 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9744 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9745 else
9746 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9747 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9748 fi
81ecdfbb
RW
9749 fi
9750 fi
9751 fi
9752 done
9753 done
9754 if test "X$rpathdirs" != "X"; then
9755 if test -n "$hardcode_libdir_separator"; then
9756 alldirs=
9757 for found_dir in $rpathdirs; do
9758 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9759 done
9760 acl_save_libdir="$libdir"
9761 libdir="$alldirs"
9762 eval flag=\"$hardcode_libdir_flag_spec\"
9763 libdir="$acl_save_libdir"
9764 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9765 else
9766 for found_dir in $rpathdirs; do
9767 acl_save_libdir="$libdir"
9768 libdir="$found_dir"
9769 eval flag=\"$hardcode_libdir_flag_spec\"
9770 libdir="$acl_save_libdir"
9771 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9772 done
9773 fi
9774 fi
9775 if test "X$ltrpathdirs" != "X"; then
9776 for found_dir in $ltrpathdirs; do
9777 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9778 done
9779 fi
a9322a30
TT
9780
9781
81ecdfbb 9782 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9783
81ecdfbb
RW
9784 for element in $INCEXPAT; do
9785 haveit=
9786 for x in $CPPFLAGS; do
a9322a30 9787
81ecdfbb
RW
9788 acl_save_prefix="$prefix"
9789 prefix="$acl_final_prefix"
9790 acl_save_exec_prefix="$exec_prefix"
9791 exec_prefix="$acl_final_exec_prefix"
9792 eval x=\"$x\"
9793 exec_prefix="$acl_save_exec_prefix"
9794 prefix="$acl_save_prefix"
a8111142 9795
81ecdfbb
RW
9796 if test "X$x" = "X$element"; then
9797 haveit=yes
9798 break
9799 fi
9800 done
9801 if test -z "$haveit"; then
9802 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9803 fi
9804 done
a9322a30
TT
9805
9806
81ecdfbb
RW
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9808$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9809if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9810 $as_echo_n "(cached) " >&6
bec39cab 9811else
bec39cab 9812
81ecdfbb
RW
9813 ac_save_LIBS="$LIBS"
9814 LIBS="$LIBS $LIBEXPAT"
9815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9816/* end confdefs.h. */
81ecdfbb
RW
9817#include "expat.h"
9818int
9819main ()
9820{
9821XML_Parser p = XML_ParserCreate (0);
9822 ;
9823 return 0;
9824}
bec39cab 9825_ACEOF
81ecdfbb
RW
9826if ac_fn_c_try_link "$LINENO"; then :
9827 ac_cv_libexpat=yes
c906108c 9828else
81ecdfbb 9829 ac_cv_libexpat=no
bec39cab 9830fi
81ecdfbb
RW
9831rm -f core conftest.err conftest.$ac_objext \
9832 conftest$ac_exeext conftest.$ac_ext
9833 LIBS="$ac_save_LIBS"
c906108c 9834
95ca63c4 9835fi
81ecdfbb
RW
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9837$as_echo "$ac_cv_libexpat" >&6; }
9838 if test "$ac_cv_libexpat" = yes; then
9839 HAVE_LIBEXPAT=yes
bec39cab 9840
81ecdfbb 9841$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9842
81ecdfbb
RW
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9844$as_echo_n "checking how to link with libexpat... " >&6; }
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9846$as_echo "$LIBEXPAT" >&6; }
9847 else
9848 HAVE_LIBEXPAT=no
9849 CPPFLAGS="$ac_save_CPPFLAGS"
9850 LIBEXPAT=
9851 LTLIBEXPAT=
9852 fi
95ca63c4
CF
9853
9854
9855
7cb9022a
MK
9856
9857
bec39cab 9858
81ecdfbb
RW
9859 if test "$HAVE_LIBEXPAT" != yes; then
9860 if test "$with_expat" = yes; then
d0ac1c44 9861 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9862 else
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9864$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9865 fi
9866 else
9867 save_LIBS=$LIBS
9868 LIBS="$LIBS $LIBEXPAT"
9869 for ac_func in XML_StopParser
9870do :
9871 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9872if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9873 cat >>confdefs.h <<_ACEOF
81ecdfbb 9874#define HAVE_XML_STOPPARSER 1
bec39cab 9875_ACEOF
95ca63c4 9876
bec39cab 9877fi
bec39cab 9878done
95ca63c4 9879
81ecdfbb
RW
9880 LIBS=$save_LIBS
9881 fi
a9322a30
TT
9882fi
9883
2400729e
UW
9884
9885# Check whether --with-mpfr was given.
9886if test "${with_mpfr+set}" = set; then :
9887 withval=$with_mpfr;
9888else
9889 with_mpfr=auto
9890fi
9891
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9893$as_echo_n "checking whether to use MPFR... " >&6; }
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9895$as_echo "$with_mpfr" >&6; }
9896
9897if test "${with_mpfr}" = no; then
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9899$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9900 HAVE_LIBMPFR=no
9901else
9902
9903
9904
9905
9906
9907
9908
9909
9910 use_additional=yes
9911
9912 acl_save_prefix="$prefix"
9913 prefix="$acl_final_prefix"
9914 acl_save_exec_prefix="$exec_prefix"
9915 exec_prefix="$acl_final_exec_prefix"
9916
9917 eval additional_includedir=\"$includedir\"
9918 eval additional_libdir=\"$libdir\"
9919
9920 exec_prefix="$acl_save_exec_prefix"
9921 prefix="$acl_save_prefix"
9922
9923
9924# Check whether --with-libmpfr-prefix was given.
9925if test "${with_libmpfr_prefix+set}" = set; then :
9926 withval=$with_libmpfr_prefix;
9927 if test "X$withval" = "Xno"; then
9928 use_additional=no
9929 else
9930 if test "X$withval" = "X"; then
9931
9932 acl_save_prefix="$prefix"
9933 prefix="$acl_final_prefix"
9934 acl_save_exec_prefix="$exec_prefix"
9935 exec_prefix="$acl_final_exec_prefix"
9936
9937 eval additional_includedir=\"$includedir\"
9938 eval additional_libdir=\"$libdir\"
9939
9940 exec_prefix="$acl_save_exec_prefix"
9941 prefix="$acl_save_prefix"
9942
9943 else
9944 additional_includedir="$withval/include"
9945 additional_libdir="$withval/lib"
9946 fi
9947 fi
9948
9949fi
9950
9f1528a1
AB
9951
9952# Check whether --with-libmpfr-type was given.
9953if test "${with_libmpfr_type+set}" = set; then :
9954 withval=$with_libmpfr_type; with_libmpfr_type=$withval
9955else
9956 with_libmpfr_type=auto
9957fi
9958
9959 lib_type=`eval echo \$with_libmpfr_type`
9960
2400729e
UW
9961 LIBMPFR=
9962 LTLIBMPFR=
9963 INCMPFR=
9964 rpathdirs=
9965 ltrpathdirs=
9966 names_already_handled=
da658607 9967 names_next_round='mpfr gmp'
2400729e
UW
9968 while test -n "$names_next_round"; do
9969 names_this_round="$names_next_round"
9970 names_next_round=
9971 for name in $names_this_round; do
9972 already_handled=
9973 for n in $names_already_handled; do
9974 if test "$n" = "$name"; then
9975 already_handled=yes
9976 break
9977 fi
9978 done
9979 if test -z "$already_handled"; then
9980 names_already_handled="$names_already_handled $name"
9981 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9982 eval value=\"\$HAVE_LIB$uppername\"
9983 if test -n "$value"; then
9984 if test "$value" = yes; then
9985 eval value=\"\$LIB$uppername\"
9986 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9987 eval value=\"\$LTLIB$uppername\"
9988 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9989 else
9990 :
9991 fi
9992 else
9993 found_dir=
9994 found_la=
9995 found_so=
9996 found_a=
9997 if test $use_additional = yes; then
9f1528a1 9998 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
9999 found_dir="$additional_libdir"
10000 found_so="$additional_libdir/lib$name.$shlibext"
10001 if test -f "$additional_libdir/lib$name.la"; then
10002 found_la="$additional_libdir/lib$name.la"
10003 fi
9f1528a1 10004 elif test x$lib_type != xshared; then
2400729e
UW
10005 if test -f "$additional_libdir/lib$name.$libext"; then
10006 found_dir="$additional_libdir"
10007 found_a="$additional_libdir/lib$name.$libext"
10008 if test -f "$additional_libdir/lib$name.la"; then
10009 found_la="$additional_libdir/lib$name.la"
10010 fi
10011 fi
10012 fi
10013 fi
10014 if test "X$found_dir" = "X"; then
10015 for x in $LDFLAGS $LTLIBMPFR; do
10016
10017 acl_save_prefix="$prefix"
10018 prefix="$acl_final_prefix"
10019 acl_save_exec_prefix="$exec_prefix"
10020 exec_prefix="$acl_final_exec_prefix"
10021 eval x=\"$x\"
10022 exec_prefix="$acl_save_exec_prefix"
10023 prefix="$acl_save_prefix"
10024
10025 case "$x" in
10026 -L*)
10027 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10028 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10029 found_dir="$dir"
10030 found_so="$dir/lib$name.$shlibext"
10031 if test -f "$dir/lib$name.la"; then
10032 found_la="$dir/lib$name.la"
10033 fi
9f1528a1 10034 elif test x$lib_type != xshared; then
2400729e
UW
10035 if test -f "$dir/lib$name.$libext"; then
10036 found_dir="$dir"
10037 found_a="$dir/lib$name.$libext"
10038 if test -f "$dir/lib$name.la"; then
10039 found_la="$dir/lib$name.la"
10040 fi
10041 fi
10042 fi
10043 ;;
10044 esac
10045 if test "X$found_dir" != "X"; then
10046 break
10047 fi
10048 done
10049 fi
10050 if test "X$found_dir" != "X"; then
10051 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10052 if test "X$found_so" != "X"; then
10053 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10054 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10055 else
10056 haveit=
10057 for x in $ltrpathdirs; do
10058 if test "X$x" = "X$found_dir"; then
10059 haveit=yes
10060 break
10061 fi
10062 done
10063 if test -z "$haveit"; then
10064 ltrpathdirs="$ltrpathdirs $found_dir"
10065 fi
10066 if test "$hardcode_direct" = yes; then
10067 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10068 else
10069 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10070 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10071 haveit=
10072 for x in $rpathdirs; do
10073 if test "X$x" = "X$found_dir"; then
10074 haveit=yes
10075 break
10076 fi
10077 done
10078 if test -z "$haveit"; then
10079 rpathdirs="$rpathdirs $found_dir"
10080 fi
10081 else
10082 haveit=
10083 for x in $LDFLAGS $LIBMPFR; do
10084
10085 acl_save_prefix="$prefix"
10086 prefix="$acl_final_prefix"
10087 acl_save_exec_prefix="$exec_prefix"
10088 exec_prefix="$acl_final_exec_prefix"
10089 eval x=\"$x\"
10090 exec_prefix="$acl_save_exec_prefix"
10091 prefix="$acl_save_prefix"
10092
10093 if test "X$x" = "X-L$found_dir"; then
10094 haveit=yes
10095 break
10096 fi
10097 done
10098 if test -z "$haveit"; then
10099 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10100 fi
10101 if test "$hardcode_minus_L" != no; then
10102 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10103 else
10104 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10105 fi
10106 fi
10107 fi
10108 fi
10109 else
10110 if test "X$found_a" != "X"; then
10111 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10112 else
10113 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10114 fi
10115 fi
10116 additional_includedir=
10117 case "$found_dir" in
10118 */lib | */lib/)
10119 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10120 additional_includedir="$basedir/include"
10121 ;;
10122 esac
10123 if test "X$additional_includedir" != "X"; then
10124 if test "X$additional_includedir" != "X/usr/include"; then
10125 haveit=
10126 if test "X$additional_includedir" = "X/usr/local/include"; then
10127 if test -n "$GCC"; then
10128 case $host_os in
10129 linux*) haveit=yes;;
10130 esac
10131 fi
10132 fi
10133 if test -z "$haveit"; then
10134 for x in $CPPFLAGS $INCMPFR; do
10135
10136 acl_save_prefix="$prefix"
10137 prefix="$acl_final_prefix"
10138 acl_save_exec_prefix="$exec_prefix"
10139 exec_prefix="$acl_final_exec_prefix"
10140 eval x=\"$x\"
10141 exec_prefix="$acl_save_exec_prefix"
10142 prefix="$acl_save_prefix"
10143
10144 if test "X$x" = "X-I$additional_includedir"; then
10145 haveit=yes
10146 break
10147 fi
10148 done
10149 if test -z "$haveit"; then
10150 if test -d "$additional_includedir"; then
10151 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10152 fi
10153 fi
10154 fi
10155 fi
10156 fi
10157 if test -n "$found_la"; then
10158 save_libdir="$libdir"
10159 case "$found_la" in
10160 */* | *\\*) . "$found_la" ;;
10161 *) . "./$found_la" ;;
10162 esac
10163 libdir="$save_libdir"
10164 for dep in $dependency_libs; do
10165 case "$dep" in
10166 -L*)
10167 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10168 if test "X$additional_libdir" != "X/usr/lib"; then
10169 haveit=
10170 if test "X$additional_libdir" = "X/usr/local/lib"; then
10171 if test -n "$GCC"; then
10172 case $host_os in
10173 linux*) haveit=yes;;
10174 esac
10175 fi
10176 fi
10177 if test -z "$haveit"; then
10178 haveit=
10179 for x in $LDFLAGS $LIBMPFR; do
10180
10181 acl_save_prefix="$prefix"
10182 prefix="$acl_final_prefix"
10183 acl_save_exec_prefix="$exec_prefix"
10184 exec_prefix="$acl_final_exec_prefix"
10185 eval x=\"$x\"
10186 exec_prefix="$acl_save_exec_prefix"
10187 prefix="$acl_save_prefix"
10188
10189 if test "X$x" = "X-L$additional_libdir"; then
10190 haveit=yes
10191 break
10192 fi
10193 done
10194 if test -z "$haveit"; then
10195 if test -d "$additional_libdir"; then
10196 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10197 fi
10198 fi
10199 haveit=
10200 for x in $LDFLAGS $LTLIBMPFR; do
10201
10202 acl_save_prefix="$prefix"
10203 prefix="$acl_final_prefix"
10204 acl_save_exec_prefix="$exec_prefix"
10205 exec_prefix="$acl_final_exec_prefix"
10206 eval x=\"$x\"
10207 exec_prefix="$acl_save_exec_prefix"
10208 prefix="$acl_save_prefix"
10209
10210 if test "X$x" = "X-L$additional_libdir"; then
10211 haveit=yes
10212 break
10213 fi
10214 done
10215 if test -z "$haveit"; then
10216 if test -d "$additional_libdir"; then
10217 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10218 fi
10219 fi
10220 fi
10221 fi
10222 ;;
10223 -R*)
10224 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10225 if test "$enable_rpath" != no; then
10226 haveit=
10227 for x in $rpathdirs; do
10228 if test "X$x" = "X$dir"; then
10229 haveit=yes
10230 break
10231 fi
10232 done
10233 if test -z "$haveit"; then
10234 rpathdirs="$rpathdirs $dir"
10235 fi
10236 haveit=
10237 for x in $ltrpathdirs; do
10238 if test "X$x" = "X$dir"; then
10239 haveit=yes
10240 break
10241 fi
10242 done
10243 if test -z "$haveit"; then
10244 ltrpathdirs="$ltrpathdirs $dir"
10245 fi
10246 fi
10247 ;;
10248 -l*)
10249 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10250 ;;
10251 *.la)
10252 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10253 ;;
10254 *)
10255 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10256 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10257 ;;
10258 esac
10259 done
10260 fi
10261 else
9f1528a1
AB
10262 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10263 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10264 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10265 else
10266 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10267 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10268 fi
2400729e
UW
10269 fi
10270 fi
10271 fi
10272 done
10273 done
10274 if test "X$rpathdirs" != "X"; then
10275 if test -n "$hardcode_libdir_separator"; then
10276 alldirs=
10277 for found_dir in $rpathdirs; do
10278 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10279 done
10280 acl_save_libdir="$libdir"
10281 libdir="$alldirs"
10282 eval flag=\"$hardcode_libdir_flag_spec\"
10283 libdir="$acl_save_libdir"
10284 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10285 else
10286 for found_dir in $rpathdirs; do
10287 acl_save_libdir="$libdir"
10288 libdir="$found_dir"
10289 eval flag=\"$hardcode_libdir_flag_spec\"
10290 libdir="$acl_save_libdir"
10291 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10292 done
10293 fi
10294 fi
10295 if test "X$ltrpathdirs" != "X"; then
10296 for found_dir in $ltrpathdirs; do
10297 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10298 done
10299 fi
10300
10301
10302 ac_save_CPPFLAGS="$CPPFLAGS"
10303
10304 for element in $INCMPFR; do
10305 haveit=
10306 for x in $CPPFLAGS; do
10307
10308 acl_save_prefix="$prefix"
10309 prefix="$acl_final_prefix"
10310 acl_save_exec_prefix="$exec_prefix"
10311 exec_prefix="$acl_final_exec_prefix"
10312 eval x=\"$x\"
10313 exec_prefix="$acl_save_exec_prefix"
10314 prefix="$acl_save_prefix"
10315
10316 if test "X$x" = "X$element"; then
10317 haveit=yes
10318 break
10319 fi
10320 done
10321 if test -z "$haveit"; then
10322 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10323 fi
10324 done
10325
10326
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10328$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10329if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10330 $as_echo_n "(cached) " >&6
10331else
10332
10333 ac_save_LIBS="$LIBS"
10334 LIBS="$LIBS $LIBMPFR"
10335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10336/* end confdefs.h. */
10337#include <mpfr.h>
10338int
10339main ()
10340{
10341mpfr_exp_t exp; mpfr_t x;
10342 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10343 ;
10344 return 0;
10345}
10346_ACEOF
10347if ac_fn_c_try_link "$LINENO"; then :
10348 ac_cv_libmpfr=yes
10349else
10350 ac_cv_libmpfr=no
10351fi
10352rm -f core conftest.err conftest.$ac_objext \
10353 conftest$ac_exeext conftest.$ac_ext
10354 LIBS="$ac_save_LIBS"
10355
10356fi
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10358$as_echo "$ac_cv_libmpfr" >&6; }
10359 if test "$ac_cv_libmpfr" = yes; then
10360 HAVE_LIBMPFR=yes
10361
10362$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10363
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10365$as_echo_n "checking how to link with libmpfr... " >&6; }
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10367$as_echo "$LIBMPFR" >&6; }
10368 else
10369 HAVE_LIBMPFR=no
10370 CPPFLAGS="$ac_save_CPPFLAGS"
10371 LIBMPFR=
10372 LTLIBMPFR=
10373 fi
10374
10375
10376
10377
10378
10379
10380 if test "$HAVE_LIBMPFR" != yes; then
10381 if test "$with_mpfr" = yes; then
d0ac1c44 10382 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10383 else
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10385$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10386 fi
10387 fi
10388fi
10389
d344e670
DE
10390# --------------------- #
10391# Check for libpython. #
10392# --------------------- #
10393
a9322a30 10394
a9322a30
TT
10395
10396
ec685c5e 10397
0c4a4063 10398
81ecdfbb
RW
10399# Check whether --with-python was given.
10400if test "${with_python+set}" = set; then :
10401 withval=$with_python;
bec39cab 10402else
81ecdfbb 10403 with_python=auto
bec39cab 10404fi
bec39cab 10405
81ecdfbb
RW
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10407$as_echo_n "checking whether to use python... " >&6; }
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10409$as_echo "$with_python" >&6; }
9a156167 10410
81ecdfbb
RW
10411if test "${with_python}" = no; then
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10413$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10414 have_libpython=no
bec39cab 10415else
81ecdfbb 10416 case "${with_python}" in
8c85a4e2 10417 [\\/]* | ?:[\\/]*)
0ad6b8ee 10418 if test -d "${with_python}"; then
ec685c5e 10419 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10420 python_prog="${with_python}/bin/python"
0c4a4063 10421 python_prefix=
9c4ea6c5
JB
10422 # If python does not exit ${with_python}/bin, then try in
10423 # ${with_python}. On Windows/MinGW, this is where the Python
10424 # executable is.
10425 if test ! -x "${python_prog}"; then
10426 python_prog="${with_python}/python"
10427 python_prefix=
10428 fi
e7a30f46 10429 if test ! -x "${python_prog}"; then
ec685c5e
DE
10430 # Fall back to gdb 7.0/7.1 behaviour.
10431 python_prog=missing
0c4a4063 10432 python_prefix=${with_python}
ec685c5e 10433 fi
e7a30f46 10434 elif test -x "${with_python}"; then
ec685c5e
DE
10435 # While we can't run python compiled for $host (unless host == build),
10436 # the user could write a script that provides the needed information,
10437 # so we support that.
ec685c5e 10438 python_prog=${with_python}
0c4a4063 10439 python_prefix=
ec685c5e 10440 else
d0ac1c44 10441 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10442 fi
81ecdfbb 10443 ;;
ec685c5e
DE
10444 */*)
10445 # Disallow --with-python=foo/bar.
d0ac1c44 10446 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10447 ;;
ec685c5e
DE
10448 *)
10449 # The user has either specified auto, yes, or the name of the python
10450 # program assumed to be in $PATH.
10451 python_prefix=
10452 case "${with_python}" in
10453 yes | auto)
0ad6b8ee 10454 if test "${build}" = "${host}"; then
ec685c5e
DE
10455 # Extract the first word of "python", so it can be a program name with args.
10456set dummy python; ac_word=$2
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10458$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10459if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10460 $as_echo_n "(cached) " >&6
10461else
10462 case $python_prog_path in
10463 [\\/]* | ?:[\\/]*)
10464 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10465 ;;
10466 *)
10467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10468for as_dir in $PATH
10469do
10470 IFS=$as_save_IFS
10471 test -z "$as_dir" && as_dir=.
10472 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10474 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10476 break 2
10477 fi
10478done
10479 done
10480IFS=$as_save_IFS
10481
10482 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10483 ;;
10484esac
10485fi
10486python_prog_path=$ac_cv_path_python_prog_path
10487if test -n "$python_prog_path"; then
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10489$as_echo "$python_prog_path" >&6; }
10490else
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
10493fi
10494
10495
10496 if test "${python_prog_path}" = missing; then
10497 python_prog=missing
10498 else
10499 python_prog=${python_prog_path}
10500 fi
10501 else
10502 # Not much we can do except assume the cross-compiler will find the
10503 # right files.
10504 python_prog=missing
10505 fi
10506 ;;
10507 *)
10508 # While we can't run python compiled for $host (unless host == build),
10509 # the user could write a script that provides the needed information,
10510 # so we support that.
10511 python_prog="${with_python}"
10512 # Extract the first word of "${python_prog}", so it can be a program name with args.
10513set dummy ${python_prog}; ac_word=$2
10514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10515$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10516if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10517 $as_echo_n "(cached) " >&6
10518else
10519 case $python_prog_path in
10520 [\\/]* | ?:[\\/]*)
10521 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10522 ;;
10523 *)
10524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10525for as_dir in $PATH
10526do
10527 IFS=$as_save_IFS
10528 test -z "$as_dir" && as_dir=.
10529 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10531 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10533 break 2
10534 fi
10535done
10536 done
10537IFS=$as_save_IFS
10538
10539 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10540 ;;
10541esac
10542fi
10543python_prog_path=$ac_cv_path_python_prog_path
10544if test -n "$python_prog_path"; then
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10546$as_echo "$python_prog_path" >&6; }
10547else
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10549$as_echo "no" >&6; }
10550fi
10551
10552
10553 if test "${python_prog_path}" = missing; then
d0ac1c44 10554 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10555 fi
10556 ;;
10557 esac
81ecdfbb
RW
10558 esac
10559
ec685c5e 10560 if test "${python_prog}" != missing; then
e7a30f46
DE
10561 # We have a python program to use, but it may be too old.
10562 # Don't flag an error for --with-python=auto (the default).
10563 have_python_config=yes
ec685c5e
DE
10564 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10565 if test $? != 0; then
e7a30f46
DE
10566 have_python_config=failed
10567 if test "${with_python}" != auto; then
d0ac1c44 10568 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10569 fi
ec685c5e
DE
10570 fi
10571 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10572 if test $? != 0; then
e7a30f46
DE
10573 have_python_config=failed
10574 if test "${with_python}" != auto; then
d0ac1c44 10575 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10576 fi
ec685c5e 10577 fi
0c4a4063
DE
10578 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10579 if test $? != 0; then
e7a30f46
DE
10580 have_python_config=failed
10581 if test "${with_python}" != auto; then
d0ac1c44 10582 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10583 fi
0c4a4063 10584 fi
ec685c5e 10585 else
ac534cba
JB
10586 # We do not have a python executable we can use to determine where
10587 # to find the Python headers and libs. We cannot guess the include
10588 # path from the python_prefix either, because that include path
10589 # depends on the Python version. So, there is nothing much we can
10590 # do except assume that the compiler will be able to find those files.
10591 python_includes=
10592 python_libs=
0c4a4063 10593 have_python_config=no
ec685c5e 10594 fi
bec39cab 10595
ec685c5e
DE
10596 # If we have python-config, only try the configuration it provides.
10597 # Otherwise fallback on the old way of trying different versions of
10598 # python in turn.
81ecdfbb 10599
ec685c5e
DE
10600 have_libpython=no
10601 if test "${have_python_config}" = yes; then
71737c43 10602
ec685c5e
DE
10603
10604 new_CPPFLAGS=${python_includes}
10605 new_LIBS=${python_libs}
71737c43
CB
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10607$as_echo_n "checking for python... " >&6; }
ec685c5e 10608 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10609 save_LIBS=$LIBS
ec685c5e 10610 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10611 LIBS="$new_LIBS $LIBS"
ec685c5e 10612 found_usable_python=no
81ecdfbb 10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10614/* end confdefs.h. */
ac534cba 10615#include "Python.h"
81ecdfbb
RW
10616int
10617main ()
10618{
10619Py_Initialize ();
10620 ;
10621 return 0;
10622}
bec39cab 10623_ACEOF
81ecdfbb 10624if ac_fn_c_try_link "$LINENO"; then :
71737c43 10625 have_libpython=yes
ec685c5e 10626 found_usable_python=yes
ac534cba
JB
10627 PYTHON_CPPFLAGS=$new_CPPFLAGS
10628 PYTHON_LIBS=$new_LIBS
9a156167 10629fi
81ecdfbb
RW
10630rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10632 CPPFLAGS=$save_CPPFLAGS
10633 LIBS=$save_LIBS
ec685c5e
DE
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10635$as_echo "${found_usable_python}" >&6; }
9a156167 10636
e7a30f46 10637 elif test "${have_python_config}" != failed; then
ec685c5e 10638 if test "${have_libpython}" = no; then
9a156167 10639
420697bb
TT
10640
10641 new_CPPFLAGS=${python_includes}
bf27f0e2 10642 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10644$as_echo_n "checking for python... " >&6; }
420697bb
TT
10645 save_CPPFLAGS=$CPPFLAGS
10646 save_LIBS=$LIBS
10647 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10648 LIBS="$new_LIBS $LIBS"
420697bb
TT
10649 found_usable_python=no
10650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651/* end confdefs.h. */
ac534cba 10652#include "Python.h"
420697bb
TT
10653int
10654main ()
10655{
10656Py_Initialize ();
10657 ;
10658 return 0;
10659}
10660_ACEOF
10661if ac_fn_c_try_link "$LINENO"; then :
71737c43 10662 have_libpython=yes
420697bb 10663 found_usable_python=yes
ac534cba
JB
10664 PYTHON_CPPFLAGS=$new_CPPFLAGS
10665 PYTHON_LIBS=$new_LIBS
420697bb
TT
10666fi
10667rm -f core conftest.err conftest.$ac_objext \
10668 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10669 CPPFLAGS=$save_CPPFLAGS
10670 LIBS=$save_LIBS
420697bb
TT
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10672$as_echo "${found_usable_python}" >&6; }
10673
10674 fi
10675 if test "${have_libpython}" = no; then
10676
ec685c5e
DE
10677
10678 new_CPPFLAGS=${python_includes}
bf27f0e2 10679 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10681$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10682 save_CPPFLAGS=$CPPFLAGS
10683 save_LIBS=$LIBS
10684 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10685 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10686 found_usable_python=no
10687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10688/* end confdefs.h. */
ac534cba 10689#include "Python.h"
ec685c5e
DE
10690int
10691main ()
10692{
10693Py_Initialize ();
10694 ;
10695 return 0;
10696}
10697_ACEOF
10698if ac_fn_c_try_link "$LINENO"; then :
71737c43 10699 have_libpython=yes
ec685c5e 10700 found_usable_python=yes
ac534cba
JB
10701 PYTHON_CPPFLAGS=$new_CPPFLAGS
10702 PYTHON_LIBS=$new_LIBS
ec685c5e 10703fi
81ecdfbb
RW
10704rm -f core conftest.err conftest.$ac_objext \
10705 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10706 CPPFLAGS=$save_CPPFLAGS
10707 LIBS=$save_LIBS
ec685c5e
DE
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10709$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10710
ec685c5e
DE
10711 fi
10712 fi
ec685c5e
DE
10713
10714 if test "${have_libpython}" = no; then
81ecdfbb
RW
10715 case "${with_python}" in
10716 yes)
d0ac1c44 10717 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10718 ;;
10719 auto)
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10721$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10722 ;;
10723 *)
d0ac1c44 10724 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10725 ;;
10726 esac
0c4a4063
DE
10727 else
10728 if test -n "${python_prefix}"; then
10729
10730cat >>confdefs.h <<_ACEOF
10731#define WITH_PYTHON_PATH "${python_prefix}"
10732_ACEOF
10733
10734
10735 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10736 if test "x$prefix" = xNONE; then
10737 test_prefix=/usr/local
10738 else
10739 test_prefix=$prefix
10740 fi
10741 else
10742 test_prefix=$exec_prefix
10743 fi
10744 value=0
10745 case ${python_prefix} in
10746 "${test_prefix}"|"${test_prefix}/"*|\
10747 '${exec_prefix}'|'${exec_prefix}/'*)
10748 value=1
10749 ;;
10750 esac
10751
10752cat >>confdefs.h <<_ACEOF
10753#define PYTHON_PATH_RELOCATABLE $value
10754_ACEOF
10755
10756
10757 fi
81ecdfbb 10758 fi
436868fb 10759fi
436868fb 10760
d13c7322
AB
10761
10762# Check whether --with-python-libdir was given.
10763if test "${with_python_libdir+set}" = set; then :
10764 withval=$with_python_libdir;
10765else
10766
10767 # If no python libdir is specified then select one based on
10768 # python's prefix path.
10769 if test -n "${python_prefix}"; then
10770 with_python_libdir=${python_prefix}/lib
10771 fi
10772
10773fi
10774
10775
ec685c5e 10776if test "${have_libpython}" != no; then
436868fb 10777
81ecdfbb 10778$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10779
81ecdfbb
RW
10780 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10781 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10782 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10783 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10784 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10785
d13c7322
AB
10786 if test -n "${with_python_libdir}"; then
10787
10788cat >>confdefs.h <<_ACEOF
10789#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10790_ACEOF
10791
10792
10793 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10794 if test "x$prefix" = xNONE; then
10795 test_prefix=/usr/local
10796 else
10797 test_prefix=$prefix
10798 fi
10799 else
10800 test_prefix=$exec_prefix
10801 fi
10802 value=0
10803 case ${with_python_libdir} in
10804 "${test_prefix}"|"${test_prefix}/"*|\
10805 '${exec_prefix}'|'${exec_prefix}/'*)
10806 value=1
10807 ;;
10808 esac
10809
10810cat >>confdefs.h <<_ACEOF
10811#define PYTHON_LIBDIR_RELOCATABLE $value
10812_ACEOF
10813
10814
10815 fi
10816
81ecdfbb
RW
10817 # Flags needed to compile Python code (taken from python-config --cflags).
10818 # We cannot call python-config directly because it will output whatever was
10819 # used when compiling the Python interpreter itself, including flags which
10820 # would make the python-related objects be compiled differently from the
10821 # rest of GDB (e.g., -O2 and -fPIC).
10822 if test "${GCC}" = yes; then
ae292b3a
TT
10823 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10824 # Python headers recommend -DNDEBUG, but it's unclear if that just
10825 # refers to building Python itself. In release mode, though, it
10826 # doesn't hurt for the Python code in gdb to follow.
10827 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10828 fi
436868fb 10829
81ecdfbb
RW
10830 if test "x${tentative_python_cflags}" != x; then
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10832$as_echo_n "checking compiler flags for python code... " >&6; }
10833 for flag in ${tentative_python_cflags}; do
10834 # Check that the compiler accepts it
10835 saved_CFLAGS="$CFLAGS"
10836 CFLAGS="$CFLAGS $flag"
10837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10838/* end confdefs.h. */
81ecdfbb 10839
a9322a30
TT
10840int
10841main ()
10842{
a9322a30
TT
10843
10844 ;
10845 return 0;
10846}
bec39cab 10847_ACEOF
81ecdfbb
RW
10848if ac_fn_c_try_compile "$LINENO"; then :
10849 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10850fi
81ecdfbb
RW
10851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10852 CFLAGS="$saved_CFLAGS"
10853 done
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10855$as_echo "${PYTHON_CFLAGS}" >&6; }
10856 fi
043b6510 10857
c83393b9
JB
10858 # On x64 Windows, Python's include headers, and pyconfig.h in
10859 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10860 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10861 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10862 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10863 # The issue was reported to the Python community, but still isn't
10864 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10865
043b6510 10866 case "$gdb_host" in
c83393b9
JB
10867 mingw64)
10868 if test "${GCC}" = yes; then
10869 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10870 fi
10871 ;;
043b6510 10872 esac
81ecdfbb 10873else
6dddc817
DE
10874 # Even if Python support is not compiled in, we need to have this file
10875 # included so that the "python" command, et.al., still exists.
8fd8d003 10876 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10877 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10878fi
9a156167 10879
a4a1c157
PA
10880# Work around Python http://bugs.python.org/issue10112. See also
10881# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10882# no effect. Note that the only test after this that uses Python is
10883# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10884# run without -export-dynamic too.
10885PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10886
10887
ed3ef339
DE
10888
10889
4df42755
DE
10890 if test "${have_libpython}" != no; then
10891 HAVE_PYTHON_TRUE=
10892 HAVE_PYTHON_FALSE='#'
10893else
10894 HAVE_PYTHON_TRUE='#'
10895 HAVE_PYTHON_FALSE=
10896fi
10897
ed3ef339
DE
10898
10899# -------------------- #
10900# Check for libguile. #
10901# -------------------- #
10902
10903
e1402065
DE
10904
10905
10906
10907
10908# Check whether --with-guile was given.
10909if test "${with_guile+set}" = set; then :
10910 withval=$with_guile;
10911else
10912 with_guile=auto
10913fi
10914
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10916$as_echo_n "checking whether to use guile... " >&6; }
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10918$as_echo "$with_guile" >&6; }
10919
ed3ef339
DE
10920# Extract the first word of "pkg-config", so it can be a program name with args.
10921set dummy pkg-config; ac_word=$2
10922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10923$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10924if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10925 $as_echo_n "(cached) " >&6
10926else
10927 case $pkg_config_prog_path in
10928 [\\/]* | ?:[\\/]*)
10929 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10930 ;;
10931 *)
10932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10933for as_dir in $PATH
10934do
10935 IFS=$as_save_IFS
10936 test -z "$as_dir" && as_dir=.
10937 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10939 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10941 break 2
10942 fi
10943done
10944 done
10945IFS=$as_save_IFS
10946
10947 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10948 ;;
10949esac
10950fi
10951pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10952if test -n "$pkg_config_prog_path"; then
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10954$as_echo "$pkg_config_prog_path" >&6; }
10955else
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957$as_echo "no" >&6; }
10958fi
10959
10960
10961
6e66f753 10962try_guile_versions="guile-2.0"
ed3ef339
DE
10963have_libguile=no
10964case "${with_guile}" in
10965no)
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10967$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10968 ;;
10969auto)
e1402065
DE
10970 if test "${pkg_config_prog_path}" = "missing"; then
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10972$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10973 else
ed3ef339
DE
10974
10975 pkg_config=${pkg_config_prog_path}
10976 guile_version_list=${try_guile_versions}
10977 flag_errors=no
10978
ed3ef339
DE
10979 found_usable_guile=checking
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10981$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10982 for guile_version in ${guile_version_list}; do
10983 ${pkg_config} --exists ${guile_version} 2>/dev/null
10984 if test $? != 0; then
10985 continue
10986 fi
10987 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10988 if test $? != 0; then
d0ac1c44 10989 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10990 fi
10991 new_LIBS=`${pkg_config} --libs ${guile_version}`
10992 if test $? != 0; then
d0ac1c44 10993 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10994 fi
10995 found_usable_guile=${guile_version}
10996 break
10997 done
10998 if test "${found_usable_guile}" = "checking"; then
10999 if test "${flag_errors}" = "yes"; then
d0ac1c44 11000 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11001 else
11002 found_usable_guile=no
11003 fi
11004 fi
11005 if test "${found_usable_guile}" != no; then
11006 save_CPPFLAGS=$CPPFLAGS
11007 save_LIBS=$LIBS
11008 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11009 LIBS="$LIBS $new_LIBS"
11010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11011/* end confdefs.h. */
11012#include "libguile.h"
11013int
11014main ()
11015{
11016scm_init_guile ();
11017 ;
11018 return 0;
11019}
11020_ACEOF
11021if ac_fn_c_try_link "$LINENO"; then :
11022 have_libguile=yes
11023 GUILE_CPPFLAGS=$new_CPPFLAGS
11024 GUILE_LIBS=$new_LIBS
11025else
11026 found_usable_guile=no
11027fi
11028rm -f core conftest.err conftest.$ac_objext \
11029 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11030 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11031if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11032
11033$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11034
11035
11036fi
11037
ed3ef339
DE
11038 CPPFLAGS=$save_CPPFLAGS
11039 LIBS=$save_LIBS
11040 if test "${found_usable_guile}" = no; then
11041 if test "${flag_errors}" = yes; then
11042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11044as_fn_error $? "linking guile version ${guile_version} test program failed
11045See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11046 fi
11047 fi
11048 fi
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11050$as_echo "${found_usable_guile}" >&6; }
11051
e1402065 11052 fi
ed3ef339
DE
11053 ;;
11054yes)
e1402065 11055 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11056 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11057 fi
ed3ef339
DE
11058
11059 pkg_config=${pkg_config_prog_path}
11060 guile_version_list=${try_guile_versions}
11061 flag_errors=yes
11062
ed3ef339
DE
11063 found_usable_guile=checking
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11065$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11066 for guile_version in ${guile_version_list}; do
11067 ${pkg_config} --exists ${guile_version} 2>/dev/null
11068 if test $? != 0; then
11069 continue
11070 fi
11071 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11072 if test $? != 0; then
d0ac1c44 11073 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11074 fi
11075 new_LIBS=`${pkg_config} --libs ${guile_version}`
11076 if test $? != 0; then
d0ac1c44 11077 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11078 fi
11079 found_usable_guile=${guile_version}
11080 break
11081 done
11082 if test "${found_usable_guile}" = "checking"; then
11083 if test "${flag_errors}" = "yes"; then
d0ac1c44 11084 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11085 else
11086 found_usable_guile=no
11087 fi
11088 fi
11089 if test "${found_usable_guile}" != no; then
11090 save_CPPFLAGS=$CPPFLAGS
11091 save_LIBS=$LIBS
11092 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11093 LIBS="$LIBS $new_LIBS"
11094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11095/* end confdefs.h. */
11096#include "libguile.h"
11097int
11098main ()
11099{
11100scm_init_guile ();
11101 ;
11102 return 0;
11103}
11104_ACEOF
11105if ac_fn_c_try_link "$LINENO"; then :
11106 have_libguile=yes
11107 GUILE_CPPFLAGS=$new_CPPFLAGS
11108 GUILE_LIBS=$new_LIBS
11109else
11110 found_usable_guile=no
11111fi
11112rm -f core conftest.err conftest.$ac_objext \
11113 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11114 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11115if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11116
11117$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11118
11119
11120fi
11121
ed3ef339
DE
11122 CPPFLAGS=$save_CPPFLAGS
11123 LIBS=$save_LIBS
11124 if test "${found_usable_guile}" = no; then
11125 if test "${flag_errors}" = yes; then
11126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11128as_fn_error $? "linking guile version ${guile_version} test program failed
11129See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11130 fi
11131 fi
11132 fi
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11134$as_echo "${found_usable_guile}" >&6; }
11135
11136 ;;
11137[\\/]* | ?:[\\/]*)
e1402065 11138 if test -x "${with_guile}"; then
ed3ef339
DE
11139
11140 pkg_config=${with_guile}
11141 guile_version_list=${try_guile_versions}
11142 flag_errors=yes
11143
ed3ef339
DE
11144 found_usable_guile=checking
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11146$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11147 for guile_version in ${guile_version_list}; do
11148 ${pkg_config} --exists ${guile_version} 2>/dev/null
11149 if test $? != 0; then
11150 continue
11151 fi
11152 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11153 if test $? != 0; then
d0ac1c44 11154 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11155 fi
11156 new_LIBS=`${pkg_config} --libs ${guile_version}`
11157 if test $? != 0; then
d0ac1c44 11158 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11159 fi
11160 found_usable_guile=${guile_version}
11161 break
11162 done
11163 if test "${found_usable_guile}" = "checking"; then
11164 if test "${flag_errors}" = "yes"; then
d0ac1c44 11165 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11166 else
11167 found_usable_guile=no
11168 fi
11169 fi
11170 if test "${found_usable_guile}" != no; then
11171 save_CPPFLAGS=$CPPFLAGS
11172 save_LIBS=$LIBS
11173 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11174 LIBS="$LIBS $new_LIBS"
11175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11176/* end confdefs.h. */
11177#include "libguile.h"
11178int
11179main ()
11180{
11181scm_init_guile ();
11182 ;
11183 return 0;
11184}
11185_ACEOF
11186if ac_fn_c_try_link "$LINENO"; then :
11187 have_libguile=yes
11188 GUILE_CPPFLAGS=$new_CPPFLAGS
11189 GUILE_LIBS=$new_LIBS
11190else
11191 found_usable_guile=no
11192fi
11193rm -f core conftest.err conftest.$ac_objext \
11194 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11195 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11196if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11197
11198$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11199
11200
11201fi
11202
ed3ef339
DE
11203 CPPFLAGS=$save_CPPFLAGS
11204 LIBS=$save_LIBS
11205 if test "${found_usable_guile}" = no; then
11206 if test "${flag_errors}" = yes; then
11207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11209as_fn_error $? "linking guile version ${guile_version} test program failed
11210See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11211 fi
11212 fi
11213 fi
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11215$as_echo "${found_usable_guile}" >&6; }
11216
e1402065 11217 else
d0ac1c44 11218 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11219 fi
ed3ef339
DE
11220 ;;
11221"" | */*)
11222 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11223 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11224 ;;
11225*)
11226 # A space separate list of guile versions to try, in order.
e1402065 11227 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11228 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11229 fi
ed3ef339
DE
11230
11231 pkg_config=${pkg_config_prog_path}
11232 guile_version_list=${with_guile}
11233 flag_errors=yes
11234
ed3ef339
DE
11235 found_usable_guile=checking
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11237$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11238 for guile_version in ${guile_version_list}; do
11239 ${pkg_config} --exists ${guile_version} 2>/dev/null
11240 if test $? != 0; then
11241 continue
11242 fi
11243 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11244 if test $? != 0; then
d0ac1c44 11245 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11246 fi
11247 new_LIBS=`${pkg_config} --libs ${guile_version}`
11248 if test $? != 0; then
d0ac1c44 11249 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11250 fi
11251 found_usable_guile=${guile_version}
11252 break
11253 done
11254 if test "${found_usable_guile}" = "checking"; then
11255 if test "${flag_errors}" = "yes"; then
d0ac1c44 11256 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11257 else
11258 found_usable_guile=no
11259 fi
11260 fi
11261 if test "${found_usable_guile}" != no; then
11262 save_CPPFLAGS=$CPPFLAGS
11263 save_LIBS=$LIBS
11264 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11265 LIBS="$LIBS $new_LIBS"
11266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267/* end confdefs.h. */
11268#include "libguile.h"
11269int
11270main ()
11271{
11272scm_init_guile ();
11273 ;
11274 return 0;
11275}
11276_ACEOF
11277if ac_fn_c_try_link "$LINENO"; then :
11278 have_libguile=yes
11279 GUILE_CPPFLAGS=$new_CPPFLAGS
11280 GUILE_LIBS=$new_LIBS
11281else
11282 found_usable_guile=no
11283fi
11284rm -f core conftest.err conftest.$ac_objext \
11285 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11286 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11287if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11288
11289$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11290
11291
11292fi
11293
ed3ef339
DE
11294 CPPFLAGS=$save_CPPFLAGS
11295 LIBS=$save_LIBS
11296 if test "${found_usable_guile}" = no; then
11297 if test "${flag_errors}" = yes; then
11298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11300as_fn_error $? "linking guile version ${guile_version} test program failed
11301See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11302 fi
11303 fi
11304 fi
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11306$as_echo "${found_usable_guile}" >&6; }
11307
11308 ;;
11309esac
11310
e76c5d17 11311if test "${have_libguile}" != no; then
d342a0da
DE
11312 case "${with_guile}" in
11313 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11314
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11316$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11317if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11318 $as_echo_n "(cached) " >&6
11319else
d342a0da 11320 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11321
11322 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11323 # the 'guild' and 'bindir' variables. In that case, try to guess
11324 # what the program name is, at the risk of getting it wrong if
11325 # Guile was configured with '--program-suffix' or similar.
11326 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11327 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11328 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11329 fi
11330
11331fi
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11333$as_echo "$ac_cv_guild_program_name" >&6; }
11334
11335 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11336 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11337 fi
11338
11339 GUILD="$ac_cv_guild_program_name"
11340
11341
d342a0da
DE
11342 ;;
11343 *)
11344
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11346$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11347if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11348 $as_echo_n "(cached) " >&6
11349else
11350 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11351
11352 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11353 # the 'guild' and 'bindir' variables. In that case, try to guess
11354 # what the program name is, at the risk of getting it wrong if
11355 # Guile was configured with '--program-suffix' or similar.
11356 if test "x$ac_cv_guild_program_name" = "x"; then
11357 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11358 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11359 fi
11360
11361fi
11362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11363$as_echo "$ac_cv_guild_program_name" >&6; }
11364
11365 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11366 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11367 fi
11368
11369 GUILD="$ac_cv_guild_program_name"
11370
11371
11372 ;;
11373 esac
e76c5d17
DE
11374
11375
11376 if test "$cross_compiling" = no; then
11377 GUILD_TARGET_FLAG=
11378 else
11379 GUILD_TARGET_FLAG="--target=$host"
11380 fi
11381
11382
11383
11384
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11386$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11387if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11388 $as_echo_n "(cached) " >&6
11389else
11390 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11391 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11392 ac_cv_guild_ok=yes
11393 else
11394 ac_cv_guild_ok=no
11395 fi
11396fi
11397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11398$as_echo "$ac_cv_guild_ok" >&6; }
11399
11400 if test "$ac_cv_guild_ok" = no; then
11401 have_libguile=no
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11403$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11404 fi
11405fi
11406
ed3ef339
DE
11407if test "${have_libguile}" != no; then
11408
11409$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11410
11411 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11412 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11413 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11414 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11415 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11416
11417 save_LIBS="$LIBS"
11418 save_CPPFLAGS="$CPPFLAGS"
11419 LIBS="$GUILE_LIBS"
11420 CPPFLAGS="$GUILE_CPPFLAGS"
11421 for ac_func in scm_new_smob
11422do :
11423 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11424if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11425 cat >>confdefs.h <<_ACEOF
11426#define HAVE_SCM_NEW_SMOB 1
11427_ACEOF
11428
11429fi
11430done
11431
11432 LIBS="$save_LIBS"
11433 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11434else
11435 # Even if Guile support is not compiled in, we need to have these files
11436 # included.
bd810fff 11437 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11438 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11439fi
9a156167 11440
ac534cba 11441
4df42755
DE
11442 if test "${have_libguile}" != no; then
11443 HAVE_GUILE_TRUE=
11444 HAVE_GUILE_FALSE='#'
11445else
11446 HAVE_GUILE_TRUE='#'
11447 HAVE_GUILE_FALSE=
11448fi
11449
ac534cba 11450
62f29fda
TT
11451# ---------------------------- #
11452# Check for source highlight. #
11453# ---------------------------- #
11454
11455SRCHIGH_LIBS=
11456SRCHIGH_CFLAGS=
189b8c2e
ST
11457
11458# Check whether --enable-source-highlight was given.
11459if test "${enable_source_highlight+set}" = set; then :
11460 enableval=$enable_source_highlight; case "${enableval}" in
11461 yes) enable_source_highlight=yes ;;
11462 no) enable_source_highlight=no ;;
11463 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11464esac
11465else
11466 enable_source_highlight=auto
11467fi
11468
11469
11470if test "${enable_source_highlight}" != "no"; then
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11472$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11473 if test "${pkg_config_prog_path}" = "missing"; then
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11475$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11476 if test "${enable_source_highlight}" = "yes"; then
11477 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11478 fi
11479 else
d806ea2d
TT
11480 case "$LDFLAGS" in
11481 *static-libstdc*)
11482 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11483 ;;
11484 esac
11485
189b8c2e 11486 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11487 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11488 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11489
11490$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493$as_echo "yes" >&6; }
189b8c2e 11494 else
62f29fda
TT
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
189b8c2e
ST
11497 if test "${enable_source_highlight}" = "yes"; then
11498 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11499 fi
11500 fi
11501 fi
62f29fda
TT
11502fi
11503
11504
11505
05ea2a05
TT
11506# ------------------------- #
11507# Checks for header files. #
11508# ------------------------- #
58bfce93 11509
05ea2a05
TT
11510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11511$as_echo_n "checking for ANSI C header files... " >&6; }
11512if ${ac_cv_header_stdc+:} false; then :
11513 $as_echo_n "(cached) " >&6
58bfce93 11514else
5599c404
MM
11515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11516/* end confdefs.h. */
05ea2a05
TT
11517#include <stdlib.h>
11518#include <stdarg.h>
11519#include <string.h>
11520#include <float.h>
5599c404 11521
05ea2a05
TT
11522int
11523main ()
11524{
5599c404 11525
05ea2a05
TT
11526 ;
11527 return 0;
11528}
5599c404 11529_ACEOF
05ea2a05
TT
11530if ac_fn_c_try_compile "$LINENO"; then :
11531 ac_cv_header_stdc=yes
5599c404 11532else
05ea2a05 11533 ac_cv_header_stdc=no
5599c404 11534fi
05ea2a05 11535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11536
05ea2a05
TT
11537if test $ac_cv_header_stdc = yes; then
11538 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540/* end confdefs.h. */
11541#include <string.h>
58bfce93 11542
05ea2a05
TT
11543_ACEOF
11544if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11545 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11546
05ea2a05
TT
11547else
11548 ac_cv_header_stdc=no
11549fi
11550rm -f conftest*
58bfce93 11551
05ea2a05 11552fi
58bfce93 11553
05ea2a05
TT
11554if test $ac_cv_header_stdc = yes; then
11555 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11557/* end confdefs.h. */
11558#include <stdlib.h>
58bfce93 11559
05ea2a05
TT
11560_ACEOF
11561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11562 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11563
05ea2a05
TT
11564else
11565 ac_cv_header_stdc=no
11566fi
11567rm -f conftest*
58bfce93 11568
05ea2a05 11569fi
58bfce93 11570
05ea2a05
TT
11571if test $ac_cv_header_stdc = yes; then
11572 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11573 if test "$cross_compiling" = yes; then :
11574 :
11575else
11576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577/* end confdefs.h. */
11578#include <ctype.h>
11579#include <stdlib.h>
11580#if ((' ' & 0x0FF) == 0x020)
11581# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11582# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11583#else
11584# define ISLOWER(c) \
11585 (('a' <= (c) && (c) <= 'i') \
11586 || ('j' <= (c) && (c) <= 'r') \
11587 || ('s' <= (c) && (c) <= 'z'))
11588# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11589#endif
58bfce93 11590
05ea2a05
TT
11591#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11592int
11593main ()
11594{
11595 int i;
11596 for (i = 0; i < 256; i++)
11597 if (XOR (islower (i), ISLOWER (i))
11598 || toupper (i) != TOUPPER (i))
11599 return 2;
11600 return 0;
11601}
11602_ACEOF
11603if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11604
05ea2a05
TT
11605else
11606 ac_cv_header_stdc=no
11607fi
11608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11609 conftest.$ac_objext conftest.beam conftest.$ac_ext
11610fi
58bfce93 11611
05ea2a05
TT
11612fi
11613fi
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11615$as_echo "$ac_cv_header_stdc" >&6; }
11616if test $ac_cv_header_stdc = yes; then
58bfce93 11617
05ea2a05 11618$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11619
05ea2a05 11620fi
58bfce93 11621
05ea2a05 11622# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 11623for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
11624 thread_db.h \
11625 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11626 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 11627 sys/reg.h sys/debugreg.h \
05ea2a05
TT
11628 termios.h elf_hp.h
11629do :
11630 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11631ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11632if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11633 cat >>confdefs.h <<_ACEOF
11634#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11635_ACEOF
58bfce93
MM
11636
11637fi
11638
05ea2a05 11639done
58bfce93 11640
05ea2a05
TT
11641for ac_header in sys/user.h
11642do :
11643 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11644# include <sys/param.h>
11645#endif
58bfce93 11646
05ea2a05
TT
11647"
11648if test "x$ac_cv_header_sys_user_h" = xyes; then :
11649 cat >>confdefs.h <<_ACEOF
11650#define HAVE_SYS_USER_H 1
11651_ACEOF
58bfce93 11652
05ea2a05 11653fi
58bfce93 11654
05ea2a05 11655done
58bfce93 11656
58bfce93 11657
05ea2a05
TT
11658for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11659do :
11660 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11661ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11662if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11663 cat >>confdefs.h <<_ACEOF
11664#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11665_ACEOF
58bfce93 11666
05ea2a05 11667fi
58bfce93 11668
05ea2a05 11669done
58bfce93 11670
05ea2a05
TT
11671for ac_header in term.h
11672do :
11673 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11674# include <curses.h>
11675#endif
58bfce93 11676
05ea2a05
TT
11677"
11678if test "x$ac_cv_header_term_h" = xyes; then :
11679 cat >>confdefs.h <<_ACEOF
11680#define HAVE_TERM_H 1
11681_ACEOF
58bfce93 11682
05ea2a05 11683fi
58bfce93 11684
05ea2a05 11685done
58bfce93 11686
58bfce93 11687
05ea2a05
TT
11688# ------------------------- #
11689# Checks for declarations. #
11690# ------------------------- #
58bfce93 11691
58bfce93 11692
05ea2a05
TT
11693 # Check for presence and size of long long.
11694 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11695if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11696
05ea2a05
TT
11697cat >>confdefs.h <<_ACEOF
11698#define HAVE_LONG_LONG 1
11699_ACEOF
11700
11701# The cast to long int works around a bug in the HP C Compiler
11702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11704# This bug is HP SR number 8606223364.
11705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11706$as_echo_n "checking size of long long... " >&6; }
11707if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11708 $as_echo_n "(cached) " >&6
11709else
05ea2a05 11710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11711
58bfce93 11712else
05ea2a05
TT
11713 if test "$ac_cv_type_long_long" = yes; then
11714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11716as_fn_error 77 "cannot compute sizeof (long long)
11717See \`config.log' for more details" "$LINENO" 5; }
11718 else
11719 ac_cv_sizeof_long_long=0
11720 fi
58bfce93 11721fi
58bfce93
MM
11722
11723fi
05ea2a05
TT
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11725$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11726
58bfce93 11727
58bfce93 11728
05ea2a05
TT
11729cat >>confdefs.h <<_ACEOF
11730#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11731_ACEOF
58bfce93
MM
11732
11733
05ea2a05 11734fi
58bfce93
MM
11735
11736
05ea2a05
TT
11737 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11738ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11739if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11740 ac_have_decl=1
11741else
11742 ac_have_decl=0
11743fi
58bfce93 11744
05ea2a05
TT
11745cat >>confdefs.h <<_ACEOF
11746#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11747_ACEOF
05ea2a05
TT
11748ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11749if test "x$ac_cv_have_decl_ffs" = xyes; then :
11750 ac_have_decl=1
11751else
11752 ac_have_decl=0
c56ccc05 11753fi
c56ccc05
MM
11754
11755cat >>confdefs.h <<_ACEOF
05ea2a05 11756#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11757_ACEOF
05ea2a05
TT
11758ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11759if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11760 ac_have_decl=1
11761else
11762 ac_have_decl=0
c56ccc05 11763fi
c56ccc05
MM
11764
11765cat >>confdefs.h <<_ACEOF
05ea2a05 11766#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 11767_ACEOF
05ea2a05
TT
11768ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11769if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11770 ac_have_decl=1
11771else
11772 ac_have_decl=0
11773fi
c56ccc05 11774
05ea2a05
TT
11775cat >>confdefs.h <<_ACEOF
11776#define HAVE_DECL_VASPRINTF $ac_have_decl
11777_ACEOF
11778ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11779if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11780 ac_have_decl=1
11781else
11782 ac_have_decl=0
c56ccc05
MM
11783fi
11784
05ea2a05
TT
11785cat >>confdefs.h <<_ACEOF
11786#define HAVE_DECL_SNPRINTF $ac_have_decl
11787_ACEOF
11788ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11789if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11790 ac_have_decl=1
11791else
11792 ac_have_decl=0
58bfce93
MM
11793fi
11794
05ea2a05
TT
11795cat >>confdefs.h <<_ACEOF
11796#define HAVE_DECL_VSNPRINTF $ac_have_decl
11797_ACEOF
c890192f 11798
05ea2a05
TT
11799 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11800if test "x$ac_cv_have_decl_strtol" = xyes; then :
11801 ac_have_decl=1
bec39cab 11802else
05ea2a05
TT
11803 ac_have_decl=0
11804fi
81ecdfbb 11805
05ea2a05
TT
11806cat >>confdefs.h <<_ACEOF
11807#define HAVE_DECL_STRTOL $ac_have_decl
11808_ACEOF
11809ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11810if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11811 ac_have_decl=1
11812else
11813 ac_have_decl=0
11814fi
a9322a30 11815
05ea2a05
TT
11816cat >>confdefs.h <<_ACEOF
11817#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 11818_ACEOF
05ea2a05
TT
11819ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11820if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11821 ac_have_decl=1
bec39cab 11822else
05ea2a05 11823 ac_have_decl=0
a9322a30 11824fi
bec39cab 11825
05ea2a05
TT
11826cat >>confdefs.h <<_ACEOF
11827#define HAVE_DECL_STRTOLL $ac_have_decl
11828_ACEOF
11829ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11830if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11831 ac_have_decl=1
11832else
11833 ac_have_decl=0
11834fi
bec39cab 11835
05ea2a05
TT
11836cat >>confdefs.h <<_ACEOF
11837#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 11838_ACEOF
bec39cab 11839
05ea2a05
TT
11840 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11841if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11842 ac_have_decl=1
bec39cab 11843else
05ea2a05 11844 ac_have_decl=0
81ecdfbb 11845fi
81ecdfbb 11846
05ea2a05
TT
11847cat >>confdefs.h <<_ACEOF
11848#define HAVE_DECL_STRVERSCMP $ac_have_decl
11849_ACEOF
81ecdfbb 11850
81ecdfbb 11851
06825bd1 11852
05ea2a05
TT
11853ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11854if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11855 ac_have_decl=1
81ecdfbb 11856else
05ea2a05 11857 ac_have_decl=0
81ecdfbb 11858fi
bec39cab 11859
05ea2a05
TT
11860cat >>confdefs.h <<_ACEOF
11861#define HAVE_DECL_SNPRINTF $ac_have_decl
11862_ACEOF
81ecdfbb 11863
05ea2a05
TT
11864
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11866$as_echo_n "checking for LC_MESSAGES... " >&6; }
11867if ${am_cv_val_LC_MESSAGES+:} false; then :
11868 $as_echo_n "(cached) " >&6
bec39cab 11869else
81ecdfbb 11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11871/* end confdefs.h. */
05ea2a05 11872#include <locale.h>
a9322a30
TT
11873int
11874main ()
11875{
05ea2a05
TT
11876return LC_MESSAGES
11877 ;
a9322a30
TT
11878 return 0;
11879}
bec39cab 11880_ACEOF
05ea2a05
TT
11881if ac_fn_c_try_link "$LINENO"; then :
11882 am_cv_val_LC_MESSAGES=yes
bec39cab 11883else
05ea2a05 11884 am_cv_val_LC_MESSAGES=no
81ecdfbb 11885fi
05ea2a05
TT
11886rm -f core conftest.err conftest.$ac_objext \
11887 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 11888fi
05ea2a05
TT
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11890$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11891 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11892
05ea2a05 11893$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 11894
05ea2a05 11895 fi
5ee754fc 11896
bec39cab 11897
05ea2a05
TT
11898# ------------------ #
11899# Checks for types. #
11900# ------------------ #
11901
11902ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11903#include <sys/socket.h>
11904
11905"
11906if test "x$ac_cv_type_socklen_t" = xyes; then :
11907
11908cat >>confdefs.h <<_ACEOF
11909#define HAVE_SOCKLEN_T 1
bec39cab 11910_ACEOF
c906108c 11911
05ea2a05 11912
bec39cab 11913fi
81ecdfbb 11914
81ecdfbb 11915
05ea2a05
TT
11916# ------------------------------------- #
11917# Checks for compiler characteristics. #
11918# ------------------------------------- #
a9322a30 11919
05ea2a05
TT
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11921$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11922if ${ac_cv_c_const+:} false; then :
11923 $as_echo_n "(cached) " >&6
11924else
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926/* end confdefs.h. */
bec39cab 11927
05ea2a05
TT
11928int
11929main ()
11930{
bec39cab 11931
05ea2a05
TT
11932#ifndef __cplusplus
11933 /* Ultrix mips cc rejects this sort of thing. */
11934 typedef int charset[2];
11935 const charset cs = { 0, 0 };
11936 /* SunOS 4.1.1 cc rejects this. */
11937 char const *const *pcpcc;
11938 char **ppc;
11939 /* NEC SVR4.0.2 mips cc rejects this. */
11940 struct point {int x, y;};
11941 static struct point const zero = {0,0};
11942 /* AIX XL C 1.02.0.0 rejects this.
11943 It does not let you subtract one const X* pointer from another in
11944 an arm of an if-expression whose if-part is not a constant
11945 expression */
11946 const char *g = "string";
11947 pcpcc = &g + (g ? g-g : 0);
11948 /* HPUX 7.0 cc rejects these. */
11949 ++pcpcc;
11950 ppc = (char**) pcpcc;
11951 pcpcc = (char const *const *) ppc;
11952 { /* SCO 3.2v4 cc rejects this sort of thing. */
11953 char tx;
11954 char *t = &tx;
11955 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 11956
05ea2a05
TT
11957 *t++ = 0;
11958 if (s) return 0;
11959 }
11960 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11961 int x[] = {25, 17};
11962 const int *foo = &x[0];
11963 ++foo;
11964 }
11965 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11966 typedef const int *iptr;
11967 iptr p = 0;
11968 ++p;
11969 }
11970 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11971 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11972 struct s { int j; const int *ap[3]; } bx;
11973 struct s *b = &bx; b->j = 5;
11974 }
11975 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11976 const int foo = 10;
11977 if (!foo) return 0;
11978 }
11979 return !cs[0] && !zero.x;
11980#endif
5ee754fc 11981
05ea2a05
TT
11982 ;
11983 return 0;
11984}
bec39cab 11985_ACEOF
05ea2a05
TT
11986if ac_fn_c_try_compile "$LINENO"; then :
11987 ac_cv_c_const=yes
11988else
11989 ac_cv_c_const=no
11990fi
11991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11992fi
05ea2a05
TT
11993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11994$as_echo "$ac_cv_c_const" >&6; }
11995if test $ac_cv_c_const = no; then
5ee754fc 11996
05ea2a05 11997$as_echo "#define const /**/" >>confdefs.h
bec39cab 11998
05ea2a05
TT
11999fi
12000
12001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12002$as_echo_n "checking for inline... " >&6; }
12003if ${ac_cv_c_inline+:} false; then :
12004 $as_echo_n "(cached) " >&6
12005else
12006 ac_cv_c_inline=no
12007for ac_kw in inline __inline__ __inline; do
12008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009/* end confdefs.h. */
12010#ifndef __cplusplus
12011typedef int foo_t;
12012static $ac_kw foo_t static_foo () {return 0; }
12013$ac_kw foo_t foo () {return 0; }
81ecdfbb 12014#endif
bec39cab 12015
a8111142 12016_ACEOF
05ea2a05
TT
12017if ac_fn_c_try_compile "$LINENO"; then :
12018 ac_cv_c_inline=$ac_kw
a8111142 12019fi
05ea2a05
TT
12020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12021 test "$ac_cv_c_inline" != no && break
81ecdfbb 12022done
a8111142 12023
05ea2a05
TT
12024fi
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12026$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12027
05ea2a05
TT
12028case $ac_cv_c_inline in
12029 inline | yes) ;;
12030 *)
12031 case $ac_cv_c_inline in
12032 no) ac_val=;;
12033 *) ac_val=$ac_cv_c_inline;;
12034 esac
12035 cat >>confdefs.h <<_ACEOF
12036#ifndef __cplusplus
12037#define inline $ac_val
12038#endif
07697489 12039_ACEOF
05ea2a05
TT
12040 ;;
12041esac
07697489 12042
05ea2a05
TT
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12044$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12045if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12046 $as_echo_n "(cached) " >&6
12047else
05ea2a05
TT
12048 ac_cv_c_bigendian=unknown
12049 # See if we're dealing with a universal compiler.
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051/* end confdefs.h. */
12052#ifndef __APPLE_CC__
12053 not a universal capable compiler
12054 #endif
12055 typedef int dummy;
07697489 12056
05ea2a05
TT
12057_ACEOF
12058if ac_fn_c_try_compile "$LINENO"; then :
07697489 12059
05ea2a05
TT
12060 # Check for potential -arch flags. It is not universal unless
12061 # there are at least two -arch flags with different values.
12062 ac_arch=
12063 ac_prev=
12064 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12065 if test -n "$ac_prev"; then
12066 case $ac_word in
12067 i?86 | x86_64 | ppc | ppc64)
12068 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12069 ac_arch=$ac_word
12070 else
12071 ac_cv_c_bigendian=universal
12072 break
12073 fi
12074 ;;
12075 esac
12076 ac_prev=
12077 elif test "x$ac_word" = "x-arch"; then
12078 ac_prev=arch
12079 fi
12080 done
07697489 12081fi
05ea2a05
TT
12082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12083 if test $ac_cv_c_bigendian = unknown; then
12084 # See if sys/param.h defines the BYTE_ORDER macro.
12085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12086/* end confdefs.h. */
12087#include <sys/types.h>
12088 #include <sys/param.h>
07697489 12089
05ea2a05
TT
12090int
12091main ()
12092{
12093#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12094 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12095 && LITTLE_ENDIAN)
12096 bogus endian macros
12097 #endif
07697489 12098
05ea2a05
TT
12099 ;
12100 return 0;
12101}
07697489 12102_ACEOF
05ea2a05
TT
12103if ac_fn_c_try_compile "$LINENO"; then :
12104 # It does; now see whether it defined to BIG_ENDIAN or not.
12105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12106/* end confdefs.h. */
12107#include <sys/types.h>
12108 #include <sys/param.h>
07697489 12109
05ea2a05
TT
12110int
12111main ()
12112{
12113#if BYTE_ORDER != BIG_ENDIAN
12114 not big endian
12115 #endif
07697489 12116
05ea2a05
TT
12117 ;
12118 return 0;
12119}
07697489 12120_ACEOF
05ea2a05
TT
12121if ac_fn_c_try_compile "$LINENO"; then :
12122 ac_cv_c_bigendian=yes
07697489 12123else
05ea2a05 12124 ac_cv_c_bigendian=no
07697489 12125fi
05ea2a05 12126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12127fi
05ea2a05
TT
12128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12129 fi
12130 if test $ac_cv_c_bigendian = unknown; then
12131 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12133/* end confdefs.h. */
12134#include <limits.h>
07697489 12135
05ea2a05
TT
12136int
12137main ()
12138{
12139#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12140 bogus endian macros
12141 #endif
07697489 12142
05ea2a05
TT
12143 ;
12144 return 0;
12145}
07697489 12146_ACEOF
05ea2a05
TT
12147if ac_fn_c_try_compile "$LINENO"; then :
12148 # It does; now see whether it defined to _BIG_ENDIAN or not.
12149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150/* end confdefs.h. */
12151#include <limits.h>
07697489 12152
05ea2a05
TT
12153int
12154main ()
12155{
12156#ifndef _BIG_ENDIAN
12157 not big endian
12158 #endif
07697489 12159
05ea2a05
TT
12160 ;
12161 return 0;
12162}
07697489 12163_ACEOF
05ea2a05
TT
12164if ac_fn_c_try_compile "$LINENO"; then :
12165 ac_cv_c_bigendian=yes
07697489 12166else
05ea2a05 12167 ac_cv_c_bigendian=no
07697489 12168fi
05ea2a05 12169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12170fi
05ea2a05
TT
12171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12172 fi
12173 if test $ac_cv_c_bigendian = unknown; then
12174 # Compile a test program.
12175 if test "$cross_compiling" = yes; then :
12176 # Try to guess by grepping values from an object file.
12177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12178/* end confdefs.h. */
12179short int ascii_mm[] =
12180 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12181 short int ascii_ii[] =
12182 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12183 int use_ascii (int i) {
12184 return ascii_mm[i] + ascii_ii[i];
12185 }
12186 short int ebcdic_ii[] =
12187 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12188 short int ebcdic_mm[] =
12189 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12190 int use_ebcdic (int i) {
12191 return ebcdic_mm[i] + ebcdic_ii[i];
12192 }
12193 extern int foo;
07697489 12194
05ea2a05
TT
12195int
12196main ()
12197{
12198return use_ascii (foo) == use_ebcdic (foo);
12199 ;
12200 return 0;
12201}
07697489 12202_ACEOF
05ea2a05
TT
12203if ac_fn_c_try_compile "$LINENO"; then :
12204 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12205 ac_cv_c_bigendian=yes
12206 fi
12207 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12208 if test "$ac_cv_c_bigendian" = unknown; then
12209 ac_cv_c_bigendian=no
12210 else
12211 # finding both strings is unlikely to happen, but who knows?
12212 ac_cv_c_bigendian=unknown
12213 fi
12214 fi
07697489 12215fi
05ea2a05
TT
12216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12217else
12218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219/* end confdefs.h. */
12220$ac_includes_default
12221int
12222main ()
12223{
07697489 12224
05ea2a05
TT
12225 /* Are we little or big endian? From Harbison&Steele. */
12226 union
12227 {
12228 long int l;
12229 char c[sizeof (long int)];
12230 } u;
12231 u.l = 1;
12232 return u.c[sizeof (long int) - 1] == 1;
12233
12234 ;
12235 return 0;
12236}
07697489 12237_ACEOF
05ea2a05
TT
12238if ac_fn_c_try_run "$LINENO"; then :
12239 ac_cv_c_bigendian=no
07697489 12240else
05ea2a05
TT
12241 ac_cv_c_bigendian=yes
12242fi
12243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12244 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12245fi
12246
05ea2a05 12247 fi
07697489 12248fi
05ea2a05
TT
12249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12250$as_echo "$ac_cv_c_bigendian" >&6; }
12251 case $ac_cv_c_bigendian in #(
12252 yes)
12253 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12254;; #(
12255 no)
12256 ;; #(
12257 universal)
07697489 12258
05ea2a05 12259$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12260
05ea2a05
TT
12261 ;; #(
12262 *)
12263 as_fn_error $? "unknown endianness
12264 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12265 esac
07697489
PA
12266
12267
05ea2a05
TT
12268# ------------------------------ #
12269# Checks for library functions. #
12270# ------------------------------ #
81ecdfbb 12271
05ea2a05 12272for ac_func in getuid getgid \
8ae8e197 12273 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12274 getpgid setsid \
12275 sigaction sigsetmask socketpair \
12276 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12277 setrlimit getrlimit posix_madvise waitpid \
12278 use_default_colors
12279do :
12280 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12281ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12282if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12283 cat >>confdefs.h <<_ACEOF
12284#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12285_ACEOF
5ee754fc 12286
05ea2a05
TT
12287fi
12288done
5ee754fc 12289
05ea2a05
TT
12290
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12292$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12293if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12294 $as_echo_n "(cached) " >&6
bec39cab 12295else
81ecdfbb 12296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12297/* end confdefs.h. */
05ea2a05 12298#include <langinfo.h>
a9322a30
TT
12299int
12300main ()
12301{
05ea2a05 12302char* cs = nl_langinfo(CODESET);
a9322a30
TT
12303 ;
12304 return 0;
12305}
bec39cab 12306_ACEOF
81ecdfbb 12307if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12308 am_cv_langinfo_codeset=yes
bec39cab 12309else
05ea2a05 12310 am_cv_langinfo_codeset=no
81ecdfbb
RW
12311fi
12312rm -f core conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12314
81ecdfbb 12315fi
05ea2a05
TT
12316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12317$as_echo "$am_cv_langinfo_codeset" >&6; }
12318 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12319
05ea2a05 12320$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12321
12322 fi
12323
05ea2a05
TT
12324ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12325if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12326
05ea2a05 12327else
81ecdfbb
RW
12328
12329cat >>confdefs.h <<_ACEOF
05ea2a05 12330#define size_t unsigned int
7eb368b3 12331_ACEOF
7eb368b3 12332
7eb368b3 12333fi
7eb368b3 12334
7eb368b3 12335
a9322a30 12336
7eb368b3 12337
05ea2a05
TT
12338 for ac_header in $ac_header_list
12339do :
12340 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12341ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12342"
12343if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12344 cat >>confdefs.h <<_ACEOF
12345#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12346_ACEOF
7eb368b3 12347
05ea2a05 12348fi
7eb368b3 12349
05ea2a05 12350done
a9322a30 12351
05ea2a05
TT
12352
12353
12354
12355
12356
12357
12358ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12359if test "x$ac_cv_type_pid_t" = xyes; then :
12360
12361else
bec39cab 12362
a9322a30 12363cat >>confdefs.h <<_ACEOF
05ea2a05 12364#define pid_t int
a9322a30
TT
12365_ACEOF
12366
05ea2a05
TT
12367fi
12368
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12370$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12371if ${ac_cv_path_SED+:} false; then :
12372 $as_echo_n "(cached) " >&6
12373else
12374 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12375 for ac_i in 1 2 3 4 5 6 7; do
12376 ac_script="$ac_script$as_nl$ac_script"
12377 done
12378 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12379 { ac_script=; unset ac_script;}
12380 if test -z "$SED"; then
12381 ac_path_SED_found=false
12382 # Loop through the user's path and test for each of PROGNAME-LIST
12383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12384for as_dir in $PATH
12385do
12386 IFS=$as_save_IFS
12387 test -z "$as_dir" && as_dir=.
12388 for ac_prog in sed gsed; do
12389 for ac_exec_ext in '' $ac_executable_extensions; do
12390 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12391 as_fn_executable_p "$ac_path_SED" || continue
12392# Check for GNU ac_path_SED and select it if it is found.
12393 # Check for GNU $ac_path_SED
12394case `"$ac_path_SED" --version 2>&1` in
12395*GNU*)
12396 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12397*)
12398 ac_count=0
12399 $as_echo_n 0123456789 >"conftest.in"
12400 while :
12401 do
12402 cat "conftest.in" "conftest.in" >"conftest.tmp"
12403 mv "conftest.tmp" "conftest.in"
12404 cp "conftest.in" "conftest.nl"
12405 $as_echo '' >> "conftest.nl"
12406 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12407 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12408 as_fn_arith $ac_count + 1 && ac_count=$as_val
12409 if test $ac_count -gt ${ac_path_SED_max-0}; then
12410 # Best one so far, save it but keep looking for a better one
12411 ac_cv_path_SED="$ac_path_SED"
12412 ac_path_SED_max=$ac_count
12413 fi
12414 # 10*(2^10) chars as input seems more than enough
12415 test $ac_count -gt 10 && break
12416 done
12417 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12418esac
a9322a30 12419
05ea2a05
TT
12420 $ac_path_SED_found && break 3
12421 done
12422 done
12423 done
12424IFS=$as_save_IFS
12425 if test -z "$ac_cv_path_SED"; then
12426 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12427 fi
12428else
12429 ac_cv_path_SED=$SED
a9322a30
TT
12430fi
12431
05ea2a05
TT
12432fi
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12434$as_echo "$ac_cv_path_SED" >&6; }
12435 SED="$ac_cv_path_SED"
12436 rm -f conftest.sed
a9322a30 12437
a9322a30 12438
db6878ac
SM
12439 # Set the 'development' global.
12440 . $srcdir/../bfd/development.sh
12441
05ea2a05
TT
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12443$as_echo_n "checking for ANSI C header files... " >&6; }
12444if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12445 $as_echo_n "(cached) " >&6
a9322a30 12446else
81ecdfbb 12447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12448/* end confdefs.h. */
05ea2a05
TT
12449#include <stdlib.h>
12450#include <stdarg.h>
12451#include <string.h>
12452#include <float.h>
a9322a30
TT
12453
12454int
12455main ()
12456{
d0ac1c44 12457
a9322a30
TT
12458 ;
12459 return 0;
12460}
bec39cab 12461_ACEOF
81ecdfbb 12462if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12463 ac_cv_header_stdc=yes
5ee754fc 12464else
05ea2a05 12465 ac_cv_header_stdc=no
5ee754fc 12466fi
81ecdfbb 12467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12468
05ea2a05
TT
12469if test $ac_cv_header_stdc = yes; then
12470 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12472/* end confdefs.h. */
12473#include <string.h>
bec39cab 12474
05ea2a05
TT
12475_ACEOF
12476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12477 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12478
bec39cab 12479else
05ea2a05
TT
12480 ac_cv_header_stdc=no
12481fi
12482rm -f conftest*
12483
12484fi
12485
12486if test $ac_cv_header_stdc = yes; then
12487 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12489/* end confdefs.h. */
05ea2a05 12490#include <stdlib.h>
a9322a30 12491
bec39cab 12492_ACEOF
05ea2a05
TT
12493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12494 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12495
05ea2a05
TT
12496else
12497 ac_cv_header_stdc=no
5ee754fc 12498fi
05ea2a05 12499rm -f conftest*
5ee754fc 12500
05ea2a05 12501fi
bec39cab 12502
05ea2a05
TT
12503if test $ac_cv_header_stdc = yes; then
12504 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12505 if test "$cross_compiling" = yes; then :
12506 :
bec39cab 12507else
05ea2a05 12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12509/* end confdefs.h. */
05ea2a05
TT
12510#include <ctype.h>
12511#include <stdlib.h>
12512#if ((' ' & 0x0FF) == 0x020)
12513# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12514# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12515#else
12516# define ISLOWER(c) \
12517 (('a' <= (c) && (c) <= 'i') \
12518 || ('j' <= (c) && (c) <= 'r') \
12519 || ('s' <= (c) && (c) <= 'z'))
12520# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12521#endif
a9322a30 12522
05ea2a05 12523#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12524int
12525main ()
12526{
05ea2a05
TT
12527 int i;
12528 for (i = 0; i < 256; i++)
12529 if (XOR (islower (i), ISLOWER (i))
12530 || toupper (i) != TOUPPER (i))
12531 return 2;
a9322a30
TT
12532 return 0;
12533}
bec39cab 12534_ACEOF
05ea2a05 12535if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12536
5ee754fc 12537else
05ea2a05 12538 ac_cv_header_stdc=no
5ee754fc 12539fi
05ea2a05
TT
12540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12541 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12542fi
bec39cab 12543
05ea2a05
TT
12544fi
12545fi
12546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12547$as_echo "$ac_cv_header_stdc" >&6; }
12548if test $ac_cv_header_stdc = yes; then
81ecdfbb 12549
05ea2a05
TT
12550$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12551
12552fi
81ecdfbb 12553
05ea2a05
TT
12554 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12555# for constant arguments. Useless!
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12557$as_echo_n "checking for working alloca.h... " >&6; }
12558if ${ac_cv_working_alloca_h+:} false; then :
12559 $as_echo_n "(cached) " >&6
12560else
12561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12562/* end confdefs.h. */
12563#include <alloca.h>
7eb368b3
NR
12564int
12565main ()
12566{
05ea2a05
TT
12567char *p = (char *) alloca (2 * sizeof (int));
12568 if (p) return 0;
7eb368b3
NR
12569 ;
12570 return 0;
12571}
12572_ACEOF
05ea2a05
TT
12573if ac_fn_c_try_link "$LINENO"; then :
12574 ac_cv_working_alloca_h=yes
81ecdfbb 12575else
05ea2a05 12576 ac_cv_working_alloca_h=no
a9322a30 12577fi
05ea2a05
TT
12578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
a9322a30 12580fi
05ea2a05
TT
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12582$as_echo "$ac_cv_working_alloca_h" >&6; }
12583if test $ac_cv_working_alloca_h = yes; then
12584
12585$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12586
7eb368b3 12587fi
05ea2a05
TT
12588
12589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12590$as_echo_n "checking for alloca... " >&6; }
12591if ${ac_cv_func_alloca_works+:} false; then :
12592 $as_echo_n "(cached) " >&6
bec39cab 12593else
81ecdfbb 12594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12595/* end confdefs.h. */
05ea2a05
TT
12596#ifdef __GNUC__
12597# define alloca __builtin_alloca
12598#else
12599# ifdef _MSC_VER
12600# include <malloc.h>
12601# define alloca _alloca
12602# else
12603# ifdef HAVE_ALLOCA_H
12604# include <alloca.h>
12605# else
12606# ifdef _AIX
12607 #pragma alloca
12608# else
12609# ifndef alloca /* predefined by HP cc +Olibcalls */
12610void *alloca (size_t);
12611# endif
12612# endif
12613# endif
12614# endif
12615#endif
12616
d3ea6809
MM
12617int
12618main ()
12619{
05ea2a05
TT
12620char *p = (char *) alloca (1);
12621 if (p) return 0;
81ecdfbb
RW
12622 ;
12623 return 0;
d3ea6809
MM
12624}
12625_ACEOF
05ea2a05
TT
12626if ac_fn_c_try_link "$LINENO"; then :
12627 ac_cv_func_alloca_works=yes
d3ea6809 12628else
05ea2a05 12629 ac_cv_func_alloca_works=no
a9322a30 12630fi
05ea2a05
TT
12631rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12633fi
05ea2a05
TT
12634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12635$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12636
05ea2a05 12637if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12638
05ea2a05 12639$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12640
05ea2a05
TT
12641else
12642 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12643# that cause trouble. Some versions do not even contain alloca or
12644# contain a buggy version. If you still want to use their alloca,
12645# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12646
05ea2a05 12647ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12648
05ea2a05 12649$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12650
12651
05ea2a05
TT
12652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12653$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12654if ${ac_cv_os_cray+:} false; then :
12655 $as_echo_n "(cached) " >&6
12656else
12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658/* end confdefs.h. */
12659#if defined CRAY && ! defined CRAY2
12660webecray
12661#else
12662wenotbecray
12663#endif
12664
12665_ACEOF
12666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12667 $EGREP "webecray" >/dev/null 2>&1; then :
12668 ac_cv_os_cray=yes
12669else
12670 ac_cv_os_cray=no
12671fi
12672rm -f conftest*
12673
12674fi
12675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12676$as_echo "$ac_cv_os_cray" >&6; }
12677if test $ac_cv_os_cray = yes; then
12678 for ac_func in _getb67 GETB67 getb67; do
12679 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12680ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12681if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12682
12683cat >>confdefs.h <<_ACEOF
12684#define CRAY_STACKSEG_END $ac_func
12685_ACEOF
12686
12687 break
12688fi
12689
12690 done
12691fi
12692
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12694$as_echo_n "checking stack direction for C alloca... " >&6; }
12695if ${ac_cv_c_stack_direction+:} false; then :
12696 $as_echo_n "(cached) " >&6
12697else
12698 if test "$cross_compiling" = yes; then :
12699 ac_cv_c_stack_direction=0
12700else
12701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702/* end confdefs.h. */
12703$ac_includes_default
12704int
12705find_stack_direction (int *addr, int depth)
12706{
12707 int dir, dummy = 0;
12708 if (! addr)
12709 addr = &dummy;
12710 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12711 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12712 return dir + dummy;
12713}
12714
12715int
12716main (int argc, char **argv)
12717{
12718 return find_stack_direction (0, argc + !argv + 20) < 0;
12719}
12720_ACEOF
12721if ac_fn_c_try_run "$LINENO"; then :
12722 ac_cv_c_stack_direction=1
12723else
12724 ac_cv_c_stack_direction=-1
12725fi
12726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12727 conftest.$ac_objext conftest.beam conftest.$ac_ext
12728fi
12729
12730fi
12731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12732$as_echo "$ac_cv_c_stack_direction" >&6; }
12733cat >>confdefs.h <<_ACEOF
12734#define STACK_DIRECTION $ac_cv_c_stack_direction
12735_ACEOF
12736
12737
12738fi
12739
12740
12741 WIN32APILIBS=
12742 case ${host} in
12743 *mingw32*)
12744
12745$as_echo "#define USE_WIN32API 1" >>confdefs.h
12746
12747 WIN32APILIBS="-lws2_32"
12748 ;;
12749 esac
12750
12751
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12753$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12754if ${am_cv_langinfo_codeset+:} false; then :
12755 $as_echo_n "(cached) " >&6
12756else
12757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12758/* end confdefs.h. */
12759#include <langinfo.h>
12760int
12761main ()
12762{
12763char* cs = nl_langinfo(CODESET);
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768if ac_fn_c_try_link "$LINENO"; then :
12769 am_cv_langinfo_codeset=yes
12770else
12771 am_cv_langinfo_codeset=no
12772fi
12773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
12775
12776fi
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12778$as_echo "$am_cv_langinfo_codeset" >&6; }
12779 if test $am_cv_langinfo_codeset = yes; then
12780
12781$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12782
12783 fi
12784
12785
8ae8e197 12786 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h poll.h sys/poll.h sys/select.h
81ecdfbb
RW
12787do :
12788 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12789ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12790if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12791 cat >>confdefs.h <<_ACEOF
81ecdfbb 12792#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12793_ACEOF
b757528f 12794
b757528f 12795fi
bec39cab 12796
a9322a30 12797done
a3828db0 12798
d0ac1c44
SM
12799
12800
a9322a30 12801for ac_func in getpagesize
81ecdfbb
RW
12802do :
12803 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12804if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12805 cat >>confdefs.h <<_ACEOF
81ecdfbb 12806#define HAVE_GETPAGESIZE 1
bec39cab 12807_ACEOF
bcb3dc3d 12808
bcb3dc3d
MK
12809fi
12810done
12811
81ecdfbb
RW
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12813$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12814if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12815 $as_echo_n "(cached) " >&6
a9322a30 12816else
81ecdfbb 12817 if test "$cross_compiling" = yes; then :
a9322a30 12818 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12819else
81ecdfbb 12820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12821/* end confdefs.h. */
a9322a30
TT
12822$ac_includes_default
12823/* malloc might have been renamed as rpl_malloc. */
12824#undef malloc
bec39cab 12825
a9322a30
TT
12826/* Thanks to Mike Haertel and Jim Avera for this test.
12827 Here is a matrix of mmap possibilities:
12828 mmap private not fixed
12829 mmap private fixed at somewhere currently unmapped
12830 mmap private fixed at somewhere already mapped
12831 mmap shared not fixed
12832 mmap shared fixed at somewhere currently unmapped
12833 mmap shared fixed at somewhere already mapped
12834 For private mappings, we should verify that changes cannot be read()
12835 back from the file, nor mmap's back from the file at a different
12836 address. (There have been systems where private was not correctly
12837 implemented like the infamous i386 svr4.0, and systems where the
12838 VM page cache was not coherent with the file system buffer cache
12839 like early versions of FreeBSD and possibly contemporary NetBSD.)
12840 For shared mappings, we should conversely verify that changes get
12841 propagated back to all the places they're supposed to be.
bec39cab 12842
a9322a30
TT
12843 Grep wants private fixed already mapped.
12844 The main things grep needs to know about mmap are:
12845 * does it exist and is it safe to write into the mmap'd area
12846 * how to use it (BSD variants) */
8b9cf735 12847
a9322a30
TT
12848#include <fcntl.h>
12849#include <sys/mman.h>
8b9cf735 12850
81ecdfbb 12851#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12852char *malloc ();
a3828db0
MK
12853#endif
12854
a9322a30 12855/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12856#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12857# ifdef _SC_PAGESIZE
12858# define getpagesize() sysconf(_SC_PAGESIZE)
12859# else /* no _SC_PAGESIZE */
81ecdfbb 12860# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12861# include <sys/param.h>
12862# ifdef EXEC_PAGESIZE
12863# define getpagesize() EXEC_PAGESIZE
12864# else /* no EXEC_PAGESIZE */
12865# ifdef NBPG
12866# define getpagesize() NBPG * CLSIZE
12867# ifndef CLSIZE
12868# define CLSIZE 1
12869# endif /* no CLSIZE */
12870# else /* no NBPG */
12871# ifdef NBPC
12872# define getpagesize() NBPC
12873# else /* no NBPC */
12874# ifdef PAGESIZE
12875# define getpagesize() PAGESIZE
12876# endif /* PAGESIZE */
12877# endif /* no NBPC */
12878# endif /* no NBPG */
12879# endif /* no EXEC_PAGESIZE */
12880# else /* no HAVE_SYS_PARAM_H */
12881# define getpagesize() 8192 /* punt totally */
12882# endif /* no HAVE_SYS_PARAM_H */
12883# endif /* no _SC_PAGESIZE */
12884
12885#endif /* no HAVE_GETPAGESIZE */
12886
bec39cab
AC
12887int
12888main ()
12889{
a9322a30 12890 char *data, *data2, *data3;
d0ac1c44 12891 const char *cdata2;
a9322a30 12892 int i, pagesize;
d0ac1c44 12893 int fd, fd2;
a9322a30
TT
12894
12895 pagesize = getpagesize ();
12896
12897 /* First, make a file with some known garbage in it. */
12898 data = (char *) malloc (pagesize);
12899 if (!data)
81ecdfbb 12900 return 1;
a9322a30
TT
12901 for (i = 0; i < pagesize; ++i)
12902 *(data + i) = rand ();
12903 umask (0);
12904 fd = creat ("conftest.mmap", 0600);
12905 if (fd < 0)
d0ac1c44 12906 return 2;
a9322a30 12907 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12908 return 3;
a9322a30
TT
12909 close (fd);
12910
d0ac1c44
SM
12911 /* Next, check that the tail of a page is zero-filled. File must have
12912 non-zero length, otherwise we risk SIGBUS for entire page. */
12913 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12914 if (fd2 < 0)
12915 return 4;
12916 cdata2 = "";
12917 if (write (fd2, cdata2, 1) != 1)
12918 return 5;
12919 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12920 if (data2 == MAP_FAILED)
12921 return 6;
12922 for (i = 0; i < pagesize; ++i)
12923 if (*(data2 + i))
12924 return 7;
12925 close (fd2);
12926 if (munmap (data2, pagesize))
12927 return 8;
12928
a9322a30
TT
12929 /* Next, try to mmap the file at a fixed address which already has
12930 something else allocated at it. If we can, also make sure that
12931 we see the same garbage. */
12932 fd = open ("conftest.mmap", O_RDWR);
12933 if (fd < 0)
d0ac1c44 12934 return 9;
a9322a30
TT
12935 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12936 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12937 return 10;
a9322a30
TT
12938 for (i = 0; i < pagesize; ++i)
12939 if (*(data + i) != *(data2 + i))
d0ac1c44 12940 return 11;
a9322a30
TT
12941
12942 /* Finally, make sure that changes to the mapped area do not
12943 percolate back to the file as seen by read(). (This is a bug on
12944 some variants of i386 svr4.0.) */
12945 for (i = 0; i < pagesize; ++i)
12946 *(data2 + i) = *(data2 + i) + 1;
12947 data3 = (char *) malloc (pagesize);
12948 if (!data3)
d0ac1c44 12949 return 12;
a9322a30 12950 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12951 return 13;
a9322a30
TT
12952 for (i = 0; i < pagesize; ++i)
12953 if (*(data + i) != *(data3 + i))
d0ac1c44 12954 return 14;
a9322a30 12955 close (fd);
81ecdfbb 12956 return 0;
bec39cab
AC
12957}
12958_ACEOF
81ecdfbb 12959if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12960 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12961else
81ecdfbb 12962 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12963fi
81ecdfbb
RW
12964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12965 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12966fi
81ecdfbb 12967
a9322a30 12968fi
81ecdfbb
RW
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12970$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12971if test $ac_cv_func_mmap_fixed_mapped = yes; then
12972
81ecdfbb 12973$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12974
086ec9eb 12975fi
d0ac1c44 12976rm -f conftest.mmap conftest.txt
a3828db0 12977
05ea2a05 12978 for ac_header in vfork.h
81ecdfbb
RW
12979do :
12980 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12981if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12982 cat >>confdefs.h <<_ACEOF
81ecdfbb 12983#define HAVE_VFORK_H 1
bec39cab 12984_ACEOF
c906108c
SS
12985
12986fi
a9322a30 12987
a3828db0 12988done
c906108c 12989
a9322a30 12990for ac_func in fork vfork
81ecdfbb
RW
12991do :
12992 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12993ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12994if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12995 cat >>confdefs.h <<_ACEOF
81ecdfbb 12996#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12997_ACEOF
b83266a0 12998
97bf5e38 12999fi
a3828db0 13000done
b83266a0 13001
a9322a30 13002if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13004$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13005if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13006 $as_echo_n "(cached) " >&6
a9322a30 13007else
81ecdfbb 13008 if test "$cross_compiling" = yes; then :
a9322a30
TT
13009 ac_cv_func_fork_works=cross
13010else
81ecdfbb
RW
13011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012/* end confdefs.h. */
13013$ac_includes_default
13014int
13015main ()
13016{
13017
13018 /* By Ruediger Kuhlmann. */
13019 return fork () < 0;
13020
13021 ;
13022 return 0;
13023}
a9322a30 13024_ACEOF
81ecdfbb 13025if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13026 ac_cv_func_fork_works=yes
13027else
81ecdfbb 13028 ac_cv_func_fork_works=no
a9322a30 13029fi
81ecdfbb
RW
13030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13031 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13032fi
81ecdfbb 13033
a9322a30 13034fi
81ecdfbb
RW
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13036$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13037
13038else
13039 ac_cv_func_fork_works=$ac_cv_func_fork
13040fi
13041if test "x$ac_cv_func_fork_works" = xcross; then
13042 case $host in
13043 *-*-amigaos* | *-*-msdosdjgpp*)
13044 # Override, as these systems have only a dummy fork() stub
13045 ac_cv_func_fork_works=no
13046 ;;
13047 *)
13048 ac_cv_func_fork_works=yes
13049 ;;
13050 esac
81ecdfbb
RW
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13052$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13053fi
13054ac_cv_func_vfork_works=$ac_cv_func_vfork
13055if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13057$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13058if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13059 $as_echo_n "(cached) " >&6
a9322a30 13060else
81ecdfbb 13061 if test "$cross_compiling" = yes; then :
a9322a30
TT
13062 ac_cv_func_vfork_works=cross
13063else
81ecdfbb 13064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13065/* end confdefs.h. */
13066/* Thanks to Paul Eggert for this test. */
81ecdfbb 13067$ac_includes_default
a9322a30 13068#include <sys/wait.h>
81ecdfbb 13069#ifdef HAVE_VFORK_H
a9322a30
TT
13070# include <vfork.h>
13071#endif
13072/* On some sparc systems, changes by the child to local and incoming
13073 argument registers are propagated back to the parent. The compiler
13074 is told about this with #include <vfork.h>, but some compilers
13075 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13076 static variable whose address is put into a register that is
13077 clobbered by the vfork. */
13078static void
13079#ifdef __cplusplus
13080sparc_address_test (int arg)
13081# else
13082sparc_address_test (arg) int arg;
13083#endif
13084{
13085 static pid_t child;
13086 if (!child) {
13087 child = vfork ();
13088 if (child < 0) {
13089 perror ("vfork");
13090 _exit(2);
13091 }
13092 if (!child) {
13093 arg = getpid();
13094 write(-1, "", 0);
13095 _exit (arg);
13096 }
13097 }
13098}
13099
13100int
13101main ()
13102{
13103 pid_t parent = getpid ();
13104 pid_t child;
13105
13106 sparc_address_test (0);
13107
13108 child = vfork ();
13109
13110 if (child == 0) {
13111 /* Here is another test for sparc vfork register problems. This
13112 test uses lots of local variables, at least as many local
13113 variables as main has allocated so far including compiler
13114 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13115 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13116 reuse the register of parent for one of the local variables,
13117 since it will think that parent can't possibly be used any more
13118 in this routine. Assigning to the local variable will thus
13119 munge parent in the parent process. */
13120 pid_t
13121 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13122 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13123 /* Convince the compiler that p..p7 are live; otherwise, it might
13124 use the same hardware register for all 8 local variables. */
13125 if (p != p1 || p != p2 || p != p3 || p != p4
13126 || p != p5 || p != p6 || p != p7)
13127 _exit(1);
13128
13129 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13130 from child file descriptors. If the child closes a descriptor
13131 before it execs or exits, this munges the parent's descriptor
13132 as well. Test for this by closing stdout in the child. */
13133 _exit(close(fileno(stdout)) != 0);
13134 } else {
13135 int status;
13136 struct stat st;
13137
13138 while (wait(&status) != child)
13139 ;
81ecdfbb 13140 return (
a9322a30
TT
13141 /* Was there some problem with vforking? */
13142 child < 0
13143
13144 /* Did the child fail? (This shouldn't happen.) */
13145 || status
13146
13147 /* Did the vfork/compiler bug occur? */
13148 || parent != getpid()
13149
13150 /* Did the file descriptor bug occur? */
13151 || fstat(fileno(stdout), &st) != 0
13152 );
13153 }
13154}
13155_ACEOF
81ecdfbb 13156if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13157 ac_cv_func_vfork_works=yes
13158else
81ecdfbb 13159 ac_cv_func_vfork_works=no
a9322a30 13160fi
81ecdfbb
RW
13161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13162 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13163fi
81ecdfbb 13164
a9322a30 13165fi
81ecdfbb
RW
13166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13167$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13168
13169fi;
13170if test "x$ac_cv_func_fork_works" = xcross; then
13171 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13173$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13174fi
13175
13176if test "x$ac_cv_func_vfork_works" = xyes; then
13177
81ecdfbb 13178$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13179
13180else
13181
81ecdfbb 13182$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13183
13184fi
13185if test "x$ac_cv_func_fork_works" = xyes; then
13186
81ecdfbb 13187$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13188
13189fi
13190
8ae8e197 13191 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13192 ptrace64 sbrk setns sigaltstack sigprocmask \
13193 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13194do :
13195 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13196ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13197if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13198 cat >>confdefs.h <<_ACEOF
81ecdfbb 13199#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13200_ACEOF
13201
13202fi
13203done
13204
13205
05ea2a05
TT
13206 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13207"
13208if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13209 ac_have_decl=1
6c7a06a3 13210else
05ea2a05
TT
13211 ac_have_decl=0
13212fi
13213
13214cat >>confdefs.h <<_ACEOF
13215#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13216_ACEOF
13217
13218
13219 if test "$cross_compiling" = yes; then :
81ecdfbb 13220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13221/* end confdefs.h. */
05ea2a05 13222#include <sys/personality.h>
6c7a06a3
TT
13223int
13224main ()
13225{
05ea2a05
TT
13226
13227 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13228 # define ADDR_NO_RANDOMIZE 0x0040000
13229 # endif
13230 /* Test the flag could be set and stays set. */
13231 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13232 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13233 return 1
bec39cab
AC
13234 ;
13235 return 0;
13236}
13237_ACEOF
81ecdfbb 13238if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13239 have_personality=true
a4db0f07 13240else
05ea2a05 13241 have_personality=false
a4db0f07 13242fi
81ecdfbb
RW
13243rm -f core conftest.err conftest.$ac_objext \
13244 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13245else
13246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247/* end confdefs.h. */
13248#include <sys/personality.h>
13249int
13250main ()
13251{
6c7a06a3 13252
05ea2a05
TT
13253 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13254 # define ADDR_NO_RANDOMIZE 0x0040000
13255 # endif
13256 /* Test the flag could be set and stays set. */
13257 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13258 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13259 return 1
13260 ;
13261 return 0;
13262}
13263_ACEOF
13264if ac_fn_c_try_run "$LINENO"; then :
13265 have_personality=true
13266else
13267 have_personality=false
13268fi
13269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13270 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13271fi
6c7a06a3 13272
05ea2a05
TT
13273 if $have_personality
13274 then
a4db0f07 13275
05ea2a05 13276$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13277
05ea2a05 13278 fi
d0ac1c44 13279
05ea2a05
TT
13280 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13281if test "x$ac_cv_have_decl_strstr" = xyes; then :
13282 ac_have_decl=1
d0ac1c44 13283else
05ea2a05
TT
13284 ac_have_decl=0
13285fi
d0ac1c44
SM
13286
13287cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13288#define HAVE_DECL_STRSTR $ac_have_decl
13289_ACEOF
13290
13291
13292 # ----------------------- #
13293 # Checks for structures. #
13294 # ----------------------- #
13295
13296 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13297if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13298
13299cat >>confdefs.h <<_ACEOF
13300#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13301_ACEOF
13302
05ea2a05 13303
d0ac1c44 13304fi
05ea2a05
TT
13305ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13306if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13307
05ea2a05
TT
13308cat >>confdefs.h <<_ACEOF
13309#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13310_ACEOF
13311
13312
13313fi
13314
13315
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13317$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13318if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13319 $as_echo_n "(cached) " >&6
13320else
05ea2a05
TT
13321 ac_func_search_save_LIBS=$LIBS
13322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13323/* end confdefs.h. */
3266f10b 13324
05ea2a05
TT
13325/* Override any GCC internal prototype to avoid an error.
13326 Use char because int might match the return type of a GCC
13327 builtin and then its argument prototype would still apply. */
13328#ifdef __cplusplus
13329extern "C"
13330#endif
13331char kinfo_getfile ();
3266f10b
TT
13332int
13333main ()
13334{
05ea2a05 13335return kinfo_getfile ();
3266f10b
TT
13336 ;
13337 return 0;
13338}
13339_ACEOF
05ea2a05
TT
13340for ac_lib in '' util util-freebsd; do
13341 if test -z "$ac_lib"; then
13342 ac_res="none required"
13343 else
13344 ac_res=-l$ac_lib
13345 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13346 fi
13347 if ac_fn_c_try_link "$LINENO"; then :
13348 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13349fi
05ea2a05
TT
13350rm -f core conftest.err conftest.$ac_objext \
13351 conftest$ac_exeext
13352 if ${ac_cv_search_kinfo_getfile+:} false; then :
13353 break
13354fi
13355done
13356if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13357
13358else
05ea2a05 13359 ac_cv_search_kinfo_getfile=no
3266f10b 13360fi
05ea2a05
TT
13361rm conftest.$ac_ext
13362LIBS=$ac_func_search_save_LIBS
13363fi
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13365$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13366ac_res=$ac_cv_search_kinfo_getfile
13367if test "$ac_res" != no; then :
13368 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13369
13370$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
3266f10b
TT
13371
13372fi
13373
3266f10b 13374
05ea2a05
TT
13375 # Check for std::thread. This does not work on some platforms, like
13376 # mingw and DJGPP.
13377 ac_ext=cpp
13378ac_cpp='$CXXCPP $CPPFLAGS'
13379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13382
3266f10b 13383
3266f10b 13384
3266f10b 13385
3266f10b 13386
05ea2a05
TT
13387ac_ext=c
13388ac_cpp='$CPP $CPPFLAGS'
13389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13391ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13392
05ea2a05 13393ax_pthread_ok=no
3266f10b 13394
05ea2a05
TT
13395# We used to check for pthread.h first, but this fails if pthread.h
13396# requires special compiler flags (e.g. on Tru64 or Sequent).
13397# It gets checked for in the link test anyway.
3266f10b 13398
05ea2a05
TT
13399# First of all, check if the user has set any of the PTHREAD_LIBS,
13400# etcetera environment variables, and if threads linking works using
13401# them:
13402if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13403 ax_pthread_save_CC="$CC"
13404 ax_pthread_save_CFLAGS="$CFLAGS"
13405 ax_pthread_save_LIBS="$LIBS"
13406 if test "x$PTHREAD_CC" != "x"; then :
13407 CC="$PTHREAD_CC"
3266f10b 13408fi
05ea2a05
TT
13409 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13410 LIBS="$PTHREAD_LIBS $LIBS"
13411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13412$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13414/* end confdefs.h. */
05ea2a05
TT
13415
13416/* Override any GCC internal prototype to avoid an error.
13417 Use char because int might match the return type of a GCC
13418 builtin and then its argument prototype would still apply. */
13419#ifdef __cplusplus
13420extern "C"
13421#endif
13422char pthread_join ();
3266f10b
TT
13423int
13424main ()
13425{
05ea2a05 13426return pthread_join ();
3266f10b
TT
13427 ;
13428 return 0;
13429}
13430_ACEOF
13431if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13432 ax_pthread_ok=yes
3266f10b
TT
13433fi
13434rm -f core conftest.err conftest.$ac_objext \
13435 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13437$as_echo "$ax_pthread_ok" >&6; }
13438 if test "x$ax_pthread_ok" = "xno"; then
13439 PTHREAD_LIBS=""
13440 PTHREAD_CFLAGS=""
13441 fi
13442 CC="$ax_pthread_save_CC"
13443 CFLAGS="$ax_pthread_save_CFLAGS"
13444 LIBS="$ax_pthread_save_LIBS"
3266f10b 13445fi
3266f10b 13446
05ea2a05
TT
13447# We must check for the threads library under a number of different
13448# names; the ordering is very important because some systems
13449# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13450# libraries is broken (non-POSIX).
3266f10b 13451
05ea2a05
TT
13452# Create a list of thread flags to try. Items starting with a "-" are
13453# C compiler flags, and other items are library names, except for "none"
13454# which indicates that we try without any flags at all, and "pthread-config"
13455# which is a program returning the flags for the Pth emulation library.
3266f10b 13456
05ea2a05 13457ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13458
05ea2a05
TT
13459# The ordering *is* (sometimes) important. Some notes on the
13460# individual items follow:
3266f10b 13461
05ea2a05
TT
13462# pthreads: AIX (must check this before -lpthread)
13463# none: in case threads are in libc; should be tried before -Kthread and
13464# other compiler flags to prevent continual compiler warnings
13465# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13466# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13467# (Note: HP C rejects this with "bad form for `-t' option")
13468# -pthreads: Solaris/gcc (Note: HP C also rejects)
13469# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13470# doesn't hurt to check since this sometimes defines pthreads and
13471# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13472# is present but should not be used directly; and before -mthreads,
13473# because the compiler interprets this as "-mt" + "-hreads")
13474# -mthreads: Mingw32/gcc, Lynx/gcc
13475# pthread: Linux, etcetera
13476# --thread-safe: KAI C++
13477# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13478
05ea2a05 13479case $host_os in
3266f10b 13480
05ea2a05 13481 freebsd*)
3266f10b 13482
05ea2a05
TT
13483 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13484 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13485
05ea2a05
TT
13486 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13487 ;;
3266f10b 13488
05ea2a05 13489 hpux*)
3266f10b 13490
05ea2a05
TT
13491 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13492 # multi-threading and also sets -lpthread."
13493
13494 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13495 ;;
13496
13497 openedition*)
13498
13499 # IBM z/OS requires a feature-test macro to be defined in order to
13500 # enable POSIX threads at all, so give the user a hint if this is
13501 # not set. (We don't define these ourselves, as they can affect
13502 # other portions of the system API in unpredictable ways.)
13503
13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13505/* end confdefs.h. */
05ea2a05
TT
13506
13507# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13508 AX_PTHREAD_ZOS_MISSING
13509# endif
3266f10b
TT
13510
13511_ACEOF
13512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13513 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13515$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13516fi
13517rm -f conftest*
13518
05ea2a05 13519 ;;
3266f10b 13520
05ea2a05 13521 solaris*)
3266f10b 13522
05ea2a05
TT
13523 # On Solaris (at least, for some versions), libc contains stubbed
13524 # (non-functional) versions of the pthreads routines, so link-based
13525 # tests will erroneously succeed. (N.B.: The stubs are missing
13526 # pthread_cleanup_push, or rather a function called by this macro,
13527 # so we could check for that, but who knows whether they'll stub
13528 # that too in a future libc.) So we'll check first for the
13529 # standard Solaris way of linking pthreads (-mt -lpthread).
13530
13531 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13532 ;;
13533esac
13534
13535# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13536
13537if test "x$GCC" = "xyes"; then :
13538 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13539fi
13540
05ea2a05
TT
13541# The presence of a feature test macro requesting re-entrant function
13542# definitions is, on some systems, a strong hint that pthreads support is
13543# correctly enabled
13544
13545case $host_os in
13546 darwin* | hpux* | linux* | osf* | solaris*)
13547 ax_pthread_check_macro="_REENTRANT"
13548 ;;
13549
13550 aix*)
13551 ax_pthread_check_macro="_THREAD_SAFE"
13552 ;;
13553
13554 *)
13555 ax_pthread_check_macro="--"
13556 ;;
13557esac
13558if test "x$ax_pthread_check_macro" = "x--"; then :
13559 ax_pthread_check_cond=0
13560else
13561 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13562fi
13563
05ea2a05
TT
13564# Are we compiling with Clang?
13565
13566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13567$as_echo_n "checking whether $CC is Clang... " >&6; }
13568if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13569 $as_echo_n "(cached) " >&6
13570else
05ea2a05
TT
13571 ax_cv_PTHREAD_CLANG=no
13572 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13573 if test "x$GCC" = "xyes"; then
13574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13575/* end confdefs.h. */
05ea2a05
TT
13576/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13577# if defined(__clang__) && defined(__llvm__)
13578 AX_PTHREAD_CC_IS_CLANG
13579# endif
3266f10b 13580
3266f10b 13581_ACEOF
05ea2a05
TT
13582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13583 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13584 ax_cv_PTHREAD_CLANG=yes
3266f10b 13585fi
05ea2a05
TT
13586rm -f conftest*
13587
13588 fi
3266f10b
TT
13589
13590fi
05ea2a05
TT
13591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13592$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13593ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13594
05ea2a05 13595ax_pthread_clang_warning=no
3266f10b 13596
05ea2a05
TT
13597# Clang needs special handling, because older versions handle the -pthread
13598# option in a rather... idiosyncratic way
3266f10b 13599
05ea2a05 13600if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13601
05ea2a05 13602 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13603
05ea2a05
TT
13604 # (Note 1: This will need to be revisited if a system that Clang
13605 # supports has POSIX threads in a separate library. This tends not
13606 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13607
05ea2a05
TT
13608 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13609 # to get POSIX threads support; the API is always present and
13610 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13611 # -pthread does define _REENTRANT, and while the Darwin headers
13612 # ignore this macro, third-party headers might not.)
b2ceabe8 13613
05ea2a05
TT
13614 PTHREAD_CFLAGS="-pthread"
13615 PTHREAD_LIBS=
3266f10b 13616
05ea2a05
TT
13617 ax_pthread_ok=yes
13618
13619 # However, older versions of Clang make a point of warning the user
13620 # that, in an invocation where only linking and no compilation is
13621 # taking place, the -pthread option has no effect ("argument unused
13622 # during compilation"). They expect -pthread to be passed in only
13623 # when source code is being compiled.
13624 #
13625 # Problem is, this is at odds with the way Automake and most other
13626 # C build frameworks function, which is that the same flags used in
13627 # compilation (CFLAGS) are also used in linking. Many systems
13628 # supported by AX_PTHREAD require exactly this for POSIX threads
13629 # support, and in fact it is often not straightforward to specify a
13630 # flag that is used only in the compilation phase and not in
13631 # linking. Such a scenario is extremely rare in practice.
13632 #
13633 # Even though use of the -pthread flag in linking would only print
13634 # a warning, this can be a nuisance for well-run software projects
13635 # that build with -Werror. So if the active version of Clang has
13636 # this misfeature, we search for an option to squash it.
13637
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13639$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13640if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13641 $as_echo_n "(cached) " >&6
13642else
13643 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13644 # Create an alternate version of $ac_link that compiles and
13645 # links in two steps (.c -> .o, .o -> exe) instead of one
13646 # (.c -> exe), because the warning occurs only in the second
13647 # step
13648 ax_pthread_save_ac_link="$ac_link"
13649 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13650 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13651 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13652 ax_pthread_save_CFLAGS="$CFLAGS"
13653 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13654 if test "x$ax_pthread_try" = "xunknown"; then :
13655 break
13656fi
13657 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13658 ac_link="$ax_pthread_save_ac_link"
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13660/* end confdefs.h. */
13661int main(void){return 0;}
3266f10b
TT
13662_ACEOF
13663if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13664 ac_link="$ax_pthread_2step_ac_link"
13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666/* end confdefs.h. */
13667int main(void){return 0;}
13668_ACEOF
13669if ac_fn_c_try_link "$LINENO"; then :
13670 break
3266f10b
TT
13671fi
13672rm -f core conftest.err conftest.$ac_objext \
13673 conftest$ac_exeext conftest.$ac_ext
13674
13675fi
05ea2a05
TT
13676rm -f core conftest.err conftest.$ac_objext \
13677 conftest$ac_exeext conftest.$ac_ext
13678 done
13679 ac_link="$ax_pthread_save_ac_link"
13680 CFLAGS="$ax_pthread_save_CFLAGS"
13681 if test "x$ax_pthread_try" = "x"; then :
13682 ax_pthread_try=no
13683fi
13684 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13685
05ea2a05
TT
13686fi
13687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13688$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13689
05ea2a05
TT
13690 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13691 no | unknown) ;;
13692 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13693 esac
3266f10b 13694
05ea2a05 13695fi # $ax_pthread_clang = yes
3266f10b 13696
05ea2a05
TT
13697if test "x$ax_pthread_ok" = "xno"; then
13698for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13699
05ea2a05
TT
13700 case $ax_pthread_try_flag in
13701 none)
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13703$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13704 ;;
3266f10b 13705
05ea2a05
TT
13706 -mt,pthread)
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13708$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13709 PTHREAD_CFLAGS="-mt"
13710 PTHREAD_LIBS="-lpthread"
13711 ;;
3266f10b 13712
05ea2a05
TT
13713 -*)
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13715$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13716 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13717 ;;
3266f10b 13718
05ea2a05
TT
13719 pthread-config)
13720 # Extract the first word of "pthread-config", so it can be a program name with args.
13721set dummy pthread-config; ac_word=$2
13722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13723$as_echo_n "checking for $ac_word... " >&6; }
13724if ${ac_cv_prog_ax_pthread_config+:} false; then :
13725 $as_echo_n "(cached) " >&6
13726else
13727 if test -n "$ax_pthread_config"; then
13728 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13729else
13730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13731for as_dir in $PATH
13732do
13733 IFS=$as_save_IFS
13734 test -z "$as_dir" && as_dir=.
13735 for ac_exec_ext in '' $ac_executable_extensions; do
13736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13737 ac_cv_prog_ax_pthread_config="yes"
13738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13739 break 2
13740 fi
3266f10b 13741done
05ea2a05
TT
13742 done
13743IFS=$as_save_IFS
3266f10b 13744
05ea2a05
TT
13745 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13746fi
13747fi
13748ax_pthread_config=$ac_cv_prog_ax_pthread_config
13749if test -n "$ax_pthread_config"; then
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13751$as_echo "$ax_pthread_config" >&6; }
3266f10b 13752else
05ea2a05
TT
13753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
3266f10b
TT
13755fi
13756
5e030278 13757
05ea2a05
TT
13758 if test "x$ax_pthread_config" = "xno"; then :
13759 continue
13760fi
13761 PTHREAD_CFLAGS="`pthread-config --cflags`"
13762 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13763 ;;
5e030278 13764
05ea2a05
TT
13765 *)
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13767$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13768 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13769 ;;
13770 esac
5e030278 13771
5e030278
TT
13772 ax_pthread_save_CFLAGS="$CFLAGS"
13773 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13774 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13775 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13776
13777 # Check for various functions. We must include pthread.h,
13778 # since some functions may be macros. (On the Sequent, we
13779 # need a special flag -Kthread to make this header compile.)
13780 # We check for pthread_join because it is in -lpthread on IRIX
13781 # while pthread_create is in libc. We check for pthread_attr_init
13782 # due to DEC craziness with -lpthreads. We check for
13783 # pthread_cleanup_push because it is one of the few pthread
13784 # functions on Solaris that doesn't have a non-functional libc stub.
13785 # We try pthread_create on general principles.
13786
5e030278
TT
13787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13788/* end confdefs.h. */
05ea2a05
TT
13789#include <pthread.h>
13790# if $ax_pthread_check_cond
13791# error "$ax_pthread_check_macro must be defined"
13792# endif
13793 static void routine(void *a) { a = 0; }
13794 static void *start_routine(void *a) { return a; }
5e030278
TT
13795int
13796main ()
13797{
05ea2a05
TT
13798pthread_t th; pthread_attr_t attr;
13799 pthread_create(&th, 0, start_routine, 0);
13800 pthread_join(th, 0);
13801 pthread_attr_init(&attr);
13802 pthread_cleanup_push(routine, 0);
13803 pthread_cleanup_pop(0) /* ; */
5e030278
TT
13804 ;
13805 return 0;
13806}
13807_ACEOF
13808if ac_fn_c_try_link "$LINENO"; then :
13809 ax_pthread_ok=yes
13810fi
13811rm -f core conftest.err conftest.$ac_objext \
13812 conftest$ac_exeext conftest.$ac_ext
05ea2a05 13813
5e030278
TT
13814 CFLAGS="$ax_pthread_save_CFLAGS"
13815 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
13816
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13818$as_echo "$ax_pthread_ok" >&6; }
13819 if test "x$ax_pthread_ok" = "xyes"; then :
13820 break
5e030278
TT
13821fi
13822
05ea2a05
TT
13823 PTHREAD_LIBS=""
13824 PTHREAD_CFLAGS=""
13825done
13826fi
5e030278 13827
05ea2a05
TT
13828# Various other checks:
13829if test "x$ax_pthread_ok" = "xyes"; then
13830 ax_pthread_save_CFLAGS="$CFLAGS"
13831 ax_pthread_save_LIBS="$LIBS"
13832 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13833 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 13834
05ea2a05
TT
13835 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13837$as_echo_n "checking for joinable pthread attribute... " >&6; }
13838if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13839 $as_echo_n "(cached) " >&6
13840else
13841 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13842 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13844/* end confdefs.h. */
13845#include <pthread.h>
13846int
13847main ()
13848{
13849int attr = $ax_pthread_attr; return attr /* ; */
13850 ;
13851 return 0;
13852}
13853_ACEOF
13854if ac_fn_c_try_link "$LINENO"; then :
13855 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13856fi
13857rm -f core conftest.err conftest.$ac_objext \
13858 conftest$ac_exeext conftest.$ac_ext
13859 done
5e030278 13860
05ea2a05
TT
13861fi
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13863$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13864 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13865 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13866 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 13867
05ea2a05
TT
13868cat >>confdefs.h <<_ACEOF
13869#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13870_ACEOF
5e030278 13871
05ea2a05 13872 ax_pthread_joinable_attr_defined=yes
5e030278 13873
05ea2a05 13874fi
5e030278 13875
05ea2a05
TT
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13877$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13878if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13879 $as_echo_n "(cached) " >&6
13880else
13881 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13882 case $host_os in
13883 solaris*)
13884 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13885 ;;
13886 esac
5e030278 13887
05ea2a05
TT
13888fi
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13890$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13891 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13892 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13893 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13894 ax_pthread_special_flags_added=yes
13895fi
5e030278 13896
05ea2a05
TT
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13898$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13899if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13900 $as_echo_n "(cached) " >&6
13901else
13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903/* end confdefs.h. */
13904#include <pthread.h>
13905int
13906main ()
13907{
13908int i = PTHREAD_PRIO_INHERIT;
13909 ;
13910 return 0;
13911}
13912_ACEOF
13913if ac_fn_c_try_link "$LINENO"; then :
13914 ax_cv_PTHREAD_PRIO_INHERIT=yes
13915else
13916 ax_cv_PTHREAD_PRIO_INHERIT=no
13917fi
13918rm -f core conftest.err conftest.$ac_objext \
13919 conftest$ac_exeext conftest.$ac_ext
5e030278 13920
05ea2a05
TT
13921fi
13922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13923$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13924 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13925 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 13926
05ea2a05 13927$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 13928
05ea2a05 13929 ax_pthread_prio_inherit_defined=yes
5e030278 13930
05ea2a05 13931fi
5e030278 13932
05ea2a05
TT
13933 CFLAGS="$ax_pthread_save_CFLAGS"
13934 LIBS="$ax_pthread_save_LIBS"
5e030278 13935
05ea2a05
TT
13936 # More AIX lossage: compile with *_r variant
13937 if test "x$GCC" != "xyes"; then
13938 case $host_os in
13939 aix*)
13940 case "x/$CC" in #(
13941 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13942 #handle absolute path differently from PATH based program lookup
13943 case "x$CC" in #(
13944 x/*) :
13945 if as_fn_executable_p ${CC}_r; then :
13946 PTHREAD_CC="${CC}_r"
13947fi ;; #(
13948 *) :
13949 for ac_prog in ${CC}_r
13950do
13951 # Extract the first word of "$ac_prog", so it can be a program name with args.
13952set dummy $ac_prog; ac_word=$2
13953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13954$as_echo_n "checking for $ac_word... " >&6; }
13955if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13956 $as_echo_n "(cached) " >&6
13957else
13958 if test -n "$PTHREAD_CC"; then
13959 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13960else
13961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13962for as_dir in $PATH
13963do
13964 IFS=$as_save_IFS
13965 test -z "$as_dir" && as_dir=.
13966 for ac_exec_ext in '' $ac_executable_extensions; do
13967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13968 ac_cv_prog_PTHREAD_CC="$ac_prog"
13969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13970 break 2
13971 fi
13972done
13973 done
13974IFS=$as_save_IFS
5e030278 13975
5e030278 13976fi
05ea2a05
TT
13977fi
13978PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13979if test -n "$PTHREAD_CC"; then
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13981$as_echo "$PTHREAD_CC" >&6; }
13982else
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13984$as_echo "no" >&6; }
13985fi
5e030278 13986
5e030278 13987
05ea2a05
TT
13988 test -n "$PTHREAD_CC" && break
13989done
13990test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13991 ;;
13992esac ;; #(
13993 *) :
13994 ;;
5e030278 13995esac
05ea2a05
TT
13996 ;;
13997 esac
13998 fi
13999fi
5e030278 14000
05ea2a05 14001test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14002
5e030278 14003
5e030278 14004
5e030278 14005
5e030278 14006
05ea2a05
TT
14007# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14008if test "x$ax_pthread_ok" = "xyes"; then
14009 threads=yes
14010 :
5e030278 14011else
05ea2a05
TT
14012 ax_pthread_ok=no
14013 threads=no
5e030278 14014fi
05ea2a05
TT
14015ac_ext=cpp
14016ac_cpp='$CXXCPP $CPPFLAGS'
14017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14020
5e030278 14021
05ea2a05
TT
14022 if test "$threads" = "yes"; then
14023 save_LIBS="$LIBS"
14024 LIBS="$PTHREAD_LIBS $LIBS"
14025 save_CXXFLAGS="$CXXFLAGS"
14026 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14028$as_echo_n "checking for std::thread... " >&6; }
14029if ${gdb_cv_cxx_std_thread+:} false; then :
14030 $as_echo_n "(cached) " >&6
14031else
14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14033/* end confdefs.h. */
05ea2a05
TT
14034#include <thread>
14035 void callback() { }
14036int
14037main ()
14038{
14039std::thread t(callback);
14040 ;
14041 return 0;
14042}
5e030278 14043_ACEOF
05ea2a05
TT
14044if ac_fn_cxx_try_compile "$LINENO"; then :
14045 gdb_cv_cxx_std_thread=yes
14046else
14047 gdb_cv_cxx_std_thread=no
5e030278 14048fi
05ea2a05
TT
14049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14050fi
14051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14052$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14053
05ea2a05
TT
14054 # This check must be here, while LIBS includes any necessary
14055 # threading library.
14056 for ac_func in pthread_sigmask pthread_setname_np
14057do :
14058 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14059ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14060if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14061 cat >>confdefs.h <<_ACEOF
14062#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14063_ACEOF
5e030278
TT
14064
14065fi
05ea2a05 14066done
5e030278 14067
5e030278 14068
05ea2a05
TT
14069 LIBS="$save_LIBS"
14070 CXXFLAGS="$save_CXXFLAGS"
14071 fi
14072 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14073
05ea2a05 14074$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14075
05ea2a05
TT
14076 fi
14077 ac_ext=c
14078ac_cpp='$CPP $CPPFLAGS'
14079ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14080ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14081ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14082
5e030278 14083
05ea2a05
TT
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14085$as_echo_n "checking for sigsetjmp... " >&6; }
14086if ${gdb_cv_func_sigsetjmp+:} false; then :
14087 $as_echo_n "(cached) " >&6
14088else
14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090/* end confdefs.h. */
5e030278 14091
05ea2a05 14092 #include <setjmp.h>
5e030278 14093
05ea2a05
TT
14094int
14095main ()
14096{
14097sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14098 ;
14099 return 0;
14100}
14101_ACEOF
14102if ac_fn_c_try_compile "$LINENO"; then :
14103 gdb_cv_func_sigsetjmp=yes
14104else
14105 gdb_cv_func_sigsetjmp=no
14106fi
14107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14108fi
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14110$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14111 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14112
05ea2a05 14113$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14114
05ea2a05
TT
14115 fi
14116
14117
14118# Check whether --with-intel_pt was given.
14119if test "${with_intel_pt+set}" = set; then :
14120 withval=$with_intel_pt;
5e030278 14121else
05ea2a05 14122 with_intel_pt=auto
5e030278 14123fi
05ea2a05
TT
14124
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14126$as_echo_n "checking whether to use intel pt... " >&6; }
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14128$as_echo "$with_intel_pt" >&6; }
14129
14130 if test "${with_intel_pt}" = no; then
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14132$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14133 HAVE_LIBIPT=no
14134 else
14135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14136/* end confdefs.h. */
5e030278 14137
05ea2a05
TT
14138 #include <linux/perf_event.h>
14139 #ifndef PERF_ATTR_SIZE_VER5
14140 # error
14141 #endif
5e030278 14142
05ea2a05
TT
14143_ACEOF
14144if ac_fn_c_try_cpp "$LINENO"; then :
14145 perf_event=yes
14146else
14147 perf_event=no
5e030278 14148fi
05ea2a05
TT
14149rm -f conftest.err conftest.i conftest.$ac_ext
14150 if test "$perf_event" != yes; then
14151 if test "$with_intel_pt" = yes; then
14152 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14153 else
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14155$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14156 fi
14157 fi
5e030278 14158
5e030278 14159
5e030278 14160
5e030278 14161
5e030278 14162
5e030278 14163
5e030278 14164
5e030278 14165
5e030278 14166
05ea2a05 14167 use_additional=yes
5e030278 14168
05ea2a05
TT
14169 acl_save_prefix="$prefix"
14170 prefix="$acl_final_prefix"
14171 acl_save_exec_prefix="$exec_prefix"
14172 exec_prefix="$acl_final_exec_prefix"
5e030278 14173
05ea2a05
TT
14174 eval additional_includedir=\"$includedir\"
14175 eval additional_libdir=\"$libdir\"
5e030278 14176
05ea2a05
TT
14177 exec_prefix="$acl_save_exec_prefix"
14178 prefix="$acl_save_prefix"
5e030278 14179
5e030278 14180
05ea2a05
TT
14181# Check whether --with-libipt-prefix was given.
14182if test "${with_libipt_prefix+set}" = set; then :
14183 withval=$with_libipt_prefix;
14184 if test "X$withval" = "Xno"; then
14185 use_additional=no
14186 else
14187 if test "X$withval" = "X"; then
5e030278 14188
05ea2a05
TT
14189 acl_save_prefix="$prefix"
14190 prefix="$acl_final_prefix"
14191 acl_save_exec_prefix="$exec_prefix"
14192 exec_prefix="$acl_final_exec_prefix"
5e030278 14193
05ea2a05
TT
14194 eval additional_includedir=\"$includedir\"
14195 eval additional_libdir=\"$libdir\"
5e030278 14196
05ea2a05
TT
14197 exec_prefix="$acl_save_exec_prefix"
14198 prefix="$acl_save_prefix"
5e030278 14199
05ea2a05
TT
14200 else
14201 additional_includedir="$withval/include"
14202 additional_libdir="$withval/lib"
14203 fi
14204 fi
5e030278
TT
14205
14206fi
5e030278 14207
9f1528a1
AB
14208
14209# Check whether --with-libipt-type was given.
14210if test "${with_libipt_type+set}" = set; then :
14211 withval=$with_libipt_type; with_libipt_type=$withval
14212else
14213 with_libipt_type=auto
14214fi
14215
14216 lib_type=`eval echo \$with_libipt_type`
14217
05ea2a05
TT
14218 LIBIPT=
14219 LTLIBIPT=
14220 INCIPT=
14221 rpathdirs=
14222 ltrpathdirs=
14223 names_already_handled=
14224 names_next_round='ipt '
14225 while test -n "$names_next_round"; do
14226 names_this_round="$names_next_round"
14227 names_next_round=
14228 for name in $names_this_round; do
14229 already_handled=
14230 for n in $names_already_handled; do
14231 if test "$n" = "$name"; then
14232 already_handled=yes
14233 break
14234 fi
14235 done
14236 if test -z "$already_handled"; then
14237 names_already_handled="$names_already_handled $name"
14238 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14239 eval value=\"\$HAVE_LIB$uppername\"
14240 if test -n "$value"; then
14241 if test "$value" = yes; then
14242 eval value=\"\$LIB$uppername\"
14243 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14244 eval value=\"\$LTLIB$uppername\"
14245 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14246 else
14247 :
14248 fi
14249 else
14250 found_dir=
14251 found_la=
14252 found_so=
14253 found_a=
14254 if test $use_additional = yes; then
9f1528a1 14255 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14256 found_dir="$additional_libdir"
14257 found_so="$additional_libdir/lib$name.$shlibext"
14258 if test -f "$additional_libdir/lib$name.la"; then
14259 found_la="$additional_libdir/lib$name.la"
14260 fi
9f1528a1 14261 elif test x$lib_type != xshared; then
05ea2a05
TT
14262 if test -f "$additional_libdir/lib$name.$libext"; then
14263 found_dir="$additional_libdir"
14264 found_a="$additional_libdir/lib$name.$libext"
14265 if test -f "$additional_libdir/lib$name.la"; then
14266 found_la="$additional_libdir/lib$name.la"
14267 fi
14268 fi
14269 fi
14270 fi
14271 if test "X$found_dir" = "X"; then
14272 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14273
05ea2a05
TT
14274 acl_save_prefix="$prefix"
14275 prefix="$acl_final_prefix"
14276 acl_save_exec_prefix="$exec_prefix"
14277 exec_prefix="$acl_final_exec_prefix"
14278 eval x=\"$x\"
14279 exec_prefix="$acl_save_exec_prefix"
14280 prefix="$acl_save_prefix"
5e030278 14281
05ea2a05
TT
14282 case "$x" in
14283 -L*)
14284 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14285 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14286 found_dir="$dir"
14287 found_so="$dir/lib$name.$shlibext"
14288 if test -f "$dir/lib$name.la"; then
14289 found_la="$dir/lib$name.la"
14290 fi
9f1528a1 14291 elif test x$lib_type != xshared; then
05ea2a05
TT
14292 if test -f "$dir/lib$name.$libext"; then
14293 found_dir="$dir"
14294 found_a="$dir/lib$name.$libext"
14295 if test -f "$dir/lib$name.la"; then
14296 found_la="$dir/lib$name.la"
14297 fi
14298 fi
14299 fi
14300 ;;
14301 esac
14302 if test "X$found_dir" != "X"; then
14303 break
14304 fi
14305 done
14306 fi
14307 if test "X$found_dir" != "X"; then
14308 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14309 if test "X$found_so" != "X"; then
14310 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14311 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14312 else
14313 haveit=
14314 for x in $ltrpathdirs; do
14315 if test "X$x" = "X$found_dir"; then
14316 haveit=yes
14317 break
14318 fi
14319 done
14320 if test -z "$haveit"; then
14321 ltrpathdirs="$ltrpathdirs $found_dir"
14322 fi
14323 if test "$hardcode_direct" = yes; then
14324 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14325 else
14326 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14327 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14328 haveit=
14329 for x in $rpathdirs; do
14330 if test "X$x" = "X$found_dir"; then
14331 haveit=yes
14332 break
14333 fi
14334 done
14335 if test -z "$haveit"; then
14336 rpathdirs="$rpathdirs $found_dir"
14337 fi
14338 else
14339 haveit=
14340 for x in $LDFLAGS $LIBIPT; do
5e030278 14341
05ea2a05
TT
14342 acl_save_prefix="$prefix"
14343 prefix="$acl_final_prefix"
14344 acl_save_exec_prefix="$exec_prefix"
14345 exec_prefix="$acl_final_exec_prefix"
14346 eval x=\"$x\"
14347 exec_prefix="$acl_save_exec_prefix"
14348 prefix="$acl_save_prefix"
5e030278 14349
05ea2a05
TT
14350 if test "X$x" = "X-L$found_dir"; then
14351 haveit=yes
14352 break
14353 fi
14354 done
14355 if test -z "$haveit"; then
14356 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14357 fi
14358 if test "$hardcode_minus_L" != no; then
14359 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14360 else
14361 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14362 fi
14363 fi
14364 fi
14365 fi
14366 else
14367 if test "X$found_a" != "X"; then
14368 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14369 else
14370 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14371 fi
14372 fi
14373 additional_includedir=
14374 case "$found_dir" in
14375 */lib | */lib/)
14376 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14377 additional_includedir="$basedir/include"
14378 ;;
14379 esac
14380 if test "X$additional_includedir" != "X"; then
14381 if test "X$additional_includedir" != "X/usr/include"; then
14382 haveit=
14383 if test "X$additional_includedir" = "X/usr/local/include"; then
14384 if test -n "$GCC"; then
14385 case $host_os in
14386 linux*) haveit=yes;;
14387 esac
14388 fi
14389 fi
14390 if test -z "$haveit"; then
14391 for x in $CPPFLAGS $INCIPT; do
5e030278 14392
05ea2a05
TT
14393 acl_save_prefix="$prefix"
14394 prefix="$acl_final_prefix"
14395 acl_save_exec_prefix="$exec_prefix"
14396 exec_prefix="$acl_final_exec_prefix"
14397 eval x=\"$x\"
14398 exec_prefix="$acl_save_exec_prefix"
14399 prefix="$acl_save_prefix"
5e030278 14400
05ea2a05
TT
14401 if test "X$x" = "X-I$additional_includedir"; then
14402 haveit=yes
14403 break
14404 fi
14405 done
14406 if test -z "$haveit"; then
14407 if test -d "$additional_includedir"; then
14408 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14409 fi
14410 fi
14411 fi
14412 fi
14413 fi
14414 if test -n "$found_la"; then
14415 save_libdir="$libdir"
14416 case "$found_la" in
14417 */* | *\\*) . "$found_la" ;;
14418 *) . "./$found_la" ;;
14419 esac
14420 libdir="$save_libdir"
14421 for dep in $dependency_libs; do
14422 case "$dep" in
14423 -L*)
14424 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14425 if test "X$additional_libdir" != "X/usr/lib"; then
14426 haveit=
14427 if test "X$additional_libdir" = "X/usr/local/lib"; then
14428 if test -n "$GCC"; then
14429 case $host_os in
14430 linux*) haveit=yes;;
14431 esac
14432 fi
14433 fi
14434 if test -z "$haveit"; then
14435 haveit=
14436 for x in $LDFLAGS $LIBIPT; do
5e030278 14437
05ea2a05
TT
14438 acl_save_prefix="$prefix"
14439 prefix="$acl_final_prefix"
14440 acl_save_exec_prefix="$exec_prefix"
14441 exec_prefix="$acl_final_exec_prefix"
14442 eval x=\"$x\"
14443 exec_prefix="$acl_save_exec_prefix"
14444 prefix="$acl_save_prefix"
5e030278 14445
05ea2a05
TT
14446 if test "X$x" = "X-L$additional_libdir"; then
14447 haveit=yes
14448 break
14449 fi
14450 done
14451 if test -z "$haveit"; then
14452 if test -d "$additional_libdir"; then
14453 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14454 fi
14455 fi
14456 haveit=
14457 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14458
05ea2a05
TT
14459 acl_save_prefix="$prefix"
14460 prefix="$acl_final_prefix"
14461 acl_save_exec_prefix="$exec_prefix"
14462 exec_prefix="$acl_final_exec_prefix"
14463 eval x=\"$x\"
14464 exec_prefix="$acl_save_exec_prefix"
14465 prefix="$acl_save_prefix"
5e030278 14466
05ea2a05
TT
14467 if test "X$x" = "X-L$additional_libdir"; then
14468 haveit=yes
14469 break
14470 fi
14471 done
14472 if test -z "$haveit"; then
14473 if test -d "$additional_libdir"; then
14474 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14475 fi
14476 fi
14477 fi
14478 fi
14479 ;;
14480 -R*)
14481 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14482 if test "$enable_rpath" != no; then
14483 haveit=
14484 for x in $rpathdirs; do
14485 if test "X$x" = "X$dir"; then
14486 haveit=yes
14487 break
14488 fi
14489 done
14490 if test -z "$haveit"; then
14491 rpathdirs="$rpathdirs $dir"
14492 fi
14493 haveit=
14494 for x in $ltrpathdirs; do
14495 if test "X$x" = "X$dir"; then
14496 haveit=yes
14497 break
14498 fi
14499 done
14500 if test -z "$haveit"; then
14501 ltrpathdirs="$ltrpathdirs $dir"
14502 fi
14503 fi
14504 ;;
14505 -l*)
14506 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14507 ;;
14508 *.la)
14509 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14510 ;;
14511 *)
14512 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14513 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14514 ;;
14515 esac
14516 done
14517 fi
14518 else
9f1528a1
AB
14519 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14520 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14521 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14522 else
14523 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14524 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14525 fi
05ea2a05 14526 fi
5e030278 14527 fi
05ea2a05
TT
14528 fi
14529 done
14530 done
14531 if test "X$rpathdirs" != "X"; then
14532 if test -n "$hardcode_libdir_separator"; then
14533 alldirs=
14534 for found_dir in $rpathdirs; do
14535 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14536 done
14537 acl_save_libdir="$libdir"
14538 libdir="$alldirs"
14539 eval flag=\"$hardcode_libdir_flag_spec\"
14540 libdir="$acl_save_libdir"
14541 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14542 else
14543 for found_dir in $rpathdirs; do
14544 acl_save_libdir="$libdir"
14545 libdir="$found_dir"
14546 eval flag=\"$hardcode_libdir_flag_spec\"
14547 libdir="$acl_save_libdir"
14548 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14549 done
14550 fi
14551 fi
14552 if test "X$ltrpathdirs" != "X"; then
14553 for found_dir in $ltrpathdirs; do
14554 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14555 done
14556 fi
5e030278
TT
14557
14558
05ea2a05 14559 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14560
05ea2a05
TT
14561 for element in $INCIPT; do
14562 haveit=
14563 for x in $CPPFLAGS; do
5e030278 14564
05ea2a05
TT
14565 acl_save_prefix="$prefix"
14566 prefix="$acl_final_prefix"
14567 acl_save_exec_prefix="$exec_prefix"
14568 exec_prefix="$acl_final_exec_prefix"
14569 eval x=\"$x\"
14570 exec_prefix="$acl_save_exec_prefix"
14571 prefix="$acl_save_prefix"
5e030278 14572
05ea2a05
TT
14573 if test "X$x" = "X$element"; then
14574 haveit=yes
14575 break
14576 fi
14577 done
14578 if test -z "$haveit"; then
14579 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14580 fi
14581 done
5e030278
TT
14582
14583
05ea2a05
TT
14584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14585$as_echo_n "checking for libipt... " >&6; }
14586if ${ac_cv_libipt+:} false; then :
5e030278
TT
14587 $as_echo_n "(cached) " >&6
14588else
05ea2a05
TT
14589
14590 ac_save_LIBS="$LIBS"
14591 LIBS="$LIBS $LIBIPT"
14592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14593/* end confdefs.h. */
05ea2a05 14594#include "intel-pt.h"
5e030278
TT
14595int
14596main ()
14597{
05ea2a05 14598pt_insn_alloc_decoder (0);
5e030278
TT
14599 ;
14600 return 0;
14601}
14602_ACEOF
05ea2a05
TT
14603if ac_fn_c_try_link "$LINENO"; then :
14604 ac_cv_libipt=yes
5e030278 14605else
05ea2a05 14606 ac_cv_libipt=no
5e030278 14607fi
05ea2a05
TT
14608rm -f core conftest.err conftest.$ac_objext \
14609 conftest$ac_exeext conftest.$ac_ext
14610 LIBS="$ac_save_LIBS"
14611
5e030278 14612fi
05ea2a05
TT
14613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14614$as_echo "$ac_cv_libipt" >&6; }
14615 if test "$ac_cv_libipt" = yes; then
14616 HAVE_LIBIPT=yes
21987b9c 14617
05ea2a05
TT
14618$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14619
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14621$as_echo_n "checking how to link with libipt... " >&6; }
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14623$as_echo "$LIBIPT" >&6; }
14624 else
14625 HAVE_LIBIPT=no
14626 CPPFLAGS="$ac_save_CPPFLAGS"
14627 LIBIPT=
14628 LTLIBIPT=
14629 fi
14630
14631
14632
14633
14634
14635
14636 if test "$HAVE_LIBIPT" != yes; then
14637 if test "$with_intel_pt" = yes; then
14638 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14639 else
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14641$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14642 fi
14643 else
14644 save_LIBS=$LIBS
14645 LIBS="$LIBS $LIBIPT"
14646 for ac_func in pt_insn_event
21987b9c 14647do :
05ea2a05
TT
14648 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14649if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14650 cat >>confdefs.h <<_ACEOF
05ea2a05 14651#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14652_ACEOF
14653
14654fi
14655done
14656
05ea2a05
TT
14657 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14658"
14659if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14660
05ea2a05
TT
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_STRUCT_PT_INSN_ENABLED 1
14663_ACEOF
5e030278 14664
5e030278 14665
05ea2a05
TT
14666fi
14667ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14668"
14669if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14670
14671cat >>confdefs.h <<_ACEOF
14672#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14673_ACEOF
5e030278
TT
14674
14675
05ea2a05
TT
14676fi
14677
14678 LIBS=$save_LIBS
14679 fi
14680 fi
14681
14682 if test "$ac_cv_header_sys_procfs_h" = yes; then
14683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14684$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14685 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14686 $as_echo_n "(cached) " >&6
14687else
14688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689/* end confdefs.h. */
14690
05ea2a05
TT
14691#define _SYSCALL32
14692/* Needed for new procfs interface on sparc-solaris. */
14693#define _STRUCTURED_PROC 1
14694#include <sys/procfs.h>
e9bcb658
GB
14695int
14696main ()
14697{
05ea2a05 14698gregset_t avar
e9bcb658
GB
14699 ;
14700 return 0;
14701}
14702_ACEOF
14703if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14704 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14705else
05ea2a05 14706 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14707
14708fi
05ea2a05 14709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14710fi
06825bd1 14711
05ea2a05 14712 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14713
05ea2a05 14714$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14715
05ea2a05
TT
14716 fi
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14718$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14719
14720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14721$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14722 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14723 $as_echo_n "(cached) " >&6
bec39cab 14724else
81ecdfbb 14725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14726/* end confdefs.h. */
05ea2a05
TT
14727
14728#define _SYSCALL32
14729/* Needed for new procfs interface on sparc-solaris. */
14730#define _STRUCTURED_PROC 1
14731#include <sys/procfs.h>
bec39cab
AC
14732int
14733main ()
14734{
05ea2a05 14735fpregset_t avar
064ef605
DJ
14736 ;
14737 return 0;
14738}
14739_ACEOF
9b30624b 14740if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14741 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14742else
14743 bfd_cv_have_sys_procfs_type_fpregset_t=no
14744
14745fi
14746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14747fi
14748
14749 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14750
14751$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14752
14753 fi
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14755$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14756
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14758$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14759 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14760 $as_echo_n "(cached) " >&6
064ef605 14761else
81ecdfbb 14762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14763/* end confdefs.h. */
05ea2a05
TT
14764
14765#define _SYSCALL32
14766/* Needed for new procfs interface on sparc-solaris. */
14767#define _STRUCTURED_PROC 1
14768#include <sys/procfs.h>
064ef605
DJ
14769int
14770main ()
14771{
05ea2a05 14772prgregset_t avar
bec39cab
AC
14773 ;
14774 return 0;
14775}
14776_ACEOF
9b30624b 14777if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14778 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14779else
05ea2a05
TT
14780 bfd_cv_have_sys_procfs_type_prgregset_t=no
14781
70f9f479 14782fi
81ecdfbb 14783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14784fi
bec39cab 14785
05ea2a05 14786 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 14787
05ea2a05
TT
14788$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14789
14790 fi
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14792$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14793
14794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14795$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14796 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14797 $as_echo_n "(cached) " >&6
bec39cab 14798else
81ecdfbb 14799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14800/* end confdefs.h. */
05ea2a05
TT
14801
14802#define _SYSCALL32
14803/* Needed for new procfs interface on sparc-solaris. */
14804#define _STRUCTURED_PROC 1
14805#include <sys/procfs.h>
064ef605
DJ
14806int
14807main ()
14808{
05ea2a05 14809prfpregset_t avar
064ef605
DJ
14810 ;
14811 return 0;
14812}
14813_ACEOF
9b30624b 14814if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14815 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 14816else
05ea2a05 14817 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 14818
5c7f2947 14819fi
81ecdfbb 14820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
14821fi
14822
14823 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14824
14825$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14826
14827 fi
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14829$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14830
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14832$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14833 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14834 $as_echo_n "(cached) " >&6
14835else
14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14837/* end confdefs.h. */
05ea2a05
TT
14838
14839#define _SYSCALL32
14840/* Needed for new procfs interface on sparc-solaris. */
14841#define _STRUCTURED_PROC 1
14842#include <sys/procfs.h>
bec39cab
AC
14843int
14844main ()
14845{
05ea2a05 14846prgregset32_t avar
bec39cab
AC
14847 ;
14848 return 0;
14849}
14850_ACEOF
9b30624b 14851if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14852 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14853else
14854 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 14855
064ef605 14856fi
81ecdfbb 14857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 14858fi
96d7229d 14859
05ea2a05 14860 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 14861
05ea2a05 14862$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 14863
05ea2a05
TT
14864 fi
14865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14866$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 14867
05ea2a05
TT
14868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14869$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14870 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14871 $as_echo_n "(cached) " >&6
bec39cab 14872else
81ecdfbb 14873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14874/* end confdefs.h. */
05ea2a05
TT
14875
14876#define _SYSCALL32
14877/* Needed for new procfs interface on sparc-solaris. */
14878#define _STRUCTURED_PROC 1
14879#include <sys/procfs.h>
bec39cab
AC
14880int
14881main ()
14882{
05ea2a05 14883lwpid_t avar
bec39cab
AC
14884 ;
14885 return 0;
14886}
14887_ACEOF
05ea2a05
TT
14888if ac_fn_c_try_compile "$LINENO"; then :
14889 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 14890else
05ea2a05
TT
14891 bfd_cv_have_sys_procfs_type_lwpid_t=no
14892
c906108c 14893fi
05ea2a05 14894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14895fi
81ecdfbb 14896
05ea2a05 14897 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 14898
05ea2a05 14899$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 14900
05ea2a05
TT
14901 fi
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14903$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 14904
05ea2a05
TT
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14906$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14907 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14908 $as_echo_n "(cached) " >&6
97bf5e38 14909else
81ecdfbb 14910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14911/* end confdefs.h. */
a3828db0 14912
05ea2a05
TT
14913#define _SYSCALL32
14914/* Needed for new procfs interface on sparc-solaris. */
14915#define _STRUCTURED_PROC 1
14916#include <sys/procfs.h>
bec39cab
AC
14917int
14918main ()
14919{
05ea2a05 14920psaddr_t avar
bec39cab
AC
14921 ;
14922 return 0;
14923}
14924_ACEOF
81ecdfbb 14925if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14926 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14927else
05ea2a05
TT
14928 bfd_cv_have_sys_procfs_type_psaddr_t=no
14929
c906108c 14930fi
81ecdfbb 14931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14932fi
c3f6f71d 14933
05ea2a05 14934 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 14935
05ea2a05 14936$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 14937
05ea2a05
TT
14938 fi
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14940$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14941
14942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14943$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14944 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
14945 $as_echo_n "(cached) " >&6
14946else
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948/* end confdefs.h. */
05ea2a05
TT
14949
14950#define _SYSCALL32
14951/* Needed for new procfs interface on sparc-solaris. */
14952#define _STRUCTURED_PROC 1
14953#include <sys/procfs.h>
db1ff28b
JK
14954int
14955main ()
14956{
05ea2a05 14957elf_fpregset_t avar
db1ff28b
JK
14958 ;
14959 return 0;
14960}
14961_ACEOF
14962if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14963 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 14964else
05ea2a05
TT
14965 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14966
db1ff28b
JK
14967fi
14968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14969fi
db1ff28b 14970
05ea2a05 14971 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 14972
05ea2a05 14973$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 14974
05ea2a05
TT
14975 fi
14976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14977$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 14978
05ea2a05
TT
14979 fi
14980
14981
14982# Check the return and argument types of ptrace.
14983
14984
14985for ac_header in sys/ptrace.h ptrace.h
14986do :
14987 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14988ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14989if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14990 cat >>confdefs.h <<_ACEOF
14991#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14992_ACEOF
db1ff28b
JK
14993
14994fi
14995
05ea2a05
TT
14996done
14997
81ecdfbb 14998
05ea2a05
TT
14999gdb_ptrace_headers='
15000#include <sys/types.h>
15001#if HAVE_SYS_PTRACE_H
15002# include <sys/ptrace.h>
15003#endif
15004#if HAVE_UNISTD_H
15005# include <unistd.h>
15006#endif
15007'
5c45e068 15008
05ea2a05
TT
15009# Check return type. Varargs (used on GNU/Linux) conflict with the
15010# empty argument list, so check for that explicitly.
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15012$as_echo_n "checking return type of ptrace... " >&6; }
15013if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15014 $as_echo_n "(cached) " >&6
bec39cab 15015else
81ecdfbb 15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15017/* end confdefs.h. */
05ea2a05 15018$gdb_ptrace_headers
bec39cab
AC
15019int
15020main ()
15021{
05ea2a05 15022extern long ptrace (enum __ptrace_request, ...);
bec39cab
AC
15023 ;
15024 return 0;
15025}
15026_ACEOF
81ecdfbb 15027if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15028 gdb_cv_func_ptrace_ret='long'
bec39cab 15029else
81ecdfbb 15030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15031/* end confdefs.h. */
05ea2a05 15032$gdb_ptrace_headers
bec39cab
AC
15033int
15034main ()
15035{
05ea2a05 15036extern int ptrace ();
bec39cab
AC
15037 ;
15038 return 0;
15039}
15040_ACEOF
81ecdfbb 15041if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15042 gdb_cv_func_ptrace_ret='int'
27ca5dad 15043else
05ea2a05 15044 gdb_cv_func_ptrace_ret='long'
27ca5dad 15045fi
81ecdfbb 15046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15047fi
05ea2a05 15048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15049fi
05ea2a05
TT
15050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15051$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068
MK
15052
15053cat >>confdefs.h <<_ACEOF
05ea2a05 15054#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15055_ACEOF
3862412b 15056
05ea2a05
TT
15057# Check argument types.
15058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15059$as_echo_n "checking types of arguments for ptrace... " >&6; }
15060if ${gdb_cv_func_ptrace_args+:} false; then :
15061 $as_echo_n "(cached) " >&6
15062else
5c45e068 15063
05ea2a05
TT
15064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15065/* end confdefs.h. */
15066$gdb_ptrace_headers
15067int
15068main ()
15069{
15070extern long ptrace (enum __ptrace_request, ...);
15071 ;
15072 return 0;
15073}
bec39cab 15074_ACEOF
05ea2a05
TT
15075if ac_fn_c_try_compile "$LINENO"; then :
15076 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15077else
15078
15079for gdb_arg1 in 'int' 'long'; do
15080 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15081 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15082 for gdb_arg4 in 'int' 'long' 'void *'; do
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084/* end confdefs.h. */
15085$gdb_ptrace_headers
15086int
15087main ()
15088{
3862412b 15089
05ea2a05
TT
15090extern $gdb_cv_func_ptrace_ret
15091 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5c45e068 15092
05ea2a05
TT
15093 ;
15094 return 0;
15095}
15096_ACEOF
15097if ac_fn_c_try_compile "$LINENO"; then :
15098 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15099 break 4;
97bf5e38 15100fi
05ea2a05
TT
15101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15102 for gdb_arg5 in 'int *' 'int' 'long'; do
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104/* end confdefs.h. */
15105$gdb_ptrace_headers
15106int
15107main ()
15108{
3862412b 15109
05ea2a05
TT
15110extern $gdb_cv_func_ptrace_ret
15111 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5c45e068 15112
05ea2a05
TT
15113 ;
15114 return 0;
15115}
6fea9e18 15116_ACEOF
05ea2a05 15117if ac_fn_c_try_compile "$LINENO"; then :
6fea9e18 15118
05ea2a05
TT
15119gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15120 break 5;
15121fi
15122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15123 done
15124 done
15125 done
15126 done
15127done
15128# Provide a safe default value.
15129: ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15130
15131fi
05ea2a05
TT
15132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15133fi
15134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15135$as_echo "$gdb_cv_func_ptrace_args" >&6; }
15136ac_save_IFS=$IFS; IFS=','
15137set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15138IFS=$ac_save_IFS
15139shift
6fea9e18
L
15140
15141cat >>confdefs.h <<_ACEOF
05ea2a05 15142#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15143_ACEOF
15144
15145
05ea2a05
TT
15146cat >>confdefs.h <<_ACEOF
15147#define PTRACE_TYPE_ARG3 $3
bec39cab 15148_ACEOF
451928c5 15149
60ca704f 15150
05ea2a05
TT
15151cat >>confdefs.h <<_ACEOF
15152#define PTRACE_TYPE_ARG4 $4
15153_ACEOF
15154
15155if test -n "$5"; then
15156
15157cat >>confdefs.h <<_ACEOF
15158#define PTRACE_TYPE_ARG5 $5
15159_ACEOF
451928c5 15160
97bf5e38 15161fi
451928c5 15162
05ea2a05
TT
15163
15164if test "$cross_compiling" = no; then
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15166$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15167if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15168 $as_echo_n "(cached) " >&6
05ea2a05
TT
15169else
15170 if test "$cross_compiling" = yes; then :
15171 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15172else
81ecdfbb 15173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15174/* end confdefs.h. */
05ea2a05 15175$ac_includes_default
bec39cab
AC
15176int
15177main ()
15178{
05ea2a05
TT
15179/* If this system has a BSD-style setpgrp which takes arguments,
15180 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15181 exit successfully. */
15182 return setpgrp (1,1) != -1;
bec39cab
AC
15183 ;
15184 return 0;
15185}
15186_ACEOF
05ea2a05
TT
15187if ac_fn_c_try_run "$LINENO"; then :
15188 ac_cv_func_setpgrp_void=no
451928c5 15189else
05ea2a05 15190 ac_cv_func_setpgrp_void=yes
451928c5 15191fi
05ea2a05
TT
15192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15193 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15194fi
15195
05ea2a05
TT
15196fi
15197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15198$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15199if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15200
05ea2a05 15201$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15202
97bf5e38 15203fi
451928c5 15204
05ea2a05
TT
15205else
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15207$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15208if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15209 $as_echo_n "(cached) " >&6
3862412b 15210else
81ecdfbb 15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15212/* end confdefs.h. */
05ea2a05
TT
15213
15214#include <unistd.h>
15215
bec39cab
AC
15216int
15217main ()
15218{
05ea2a05
TT
15219
15220 if (setpgrp(1,1) == -1)
15221 exit (0);
15222 else
15223 exit (1);
15224
bec39cab
AC
15225 ;
15226 return 0;
15227}
15228_ACEOF
81ecdfbb 15229if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15230 ac_cv_func_setpgrp_void=no
3862412b 15231else
05ea2a05 15232 ac_cv_func_setpgrp_void=yes
3862412b 15233fi
81ecdfbb 15234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15235fi
05ea2a05
TT
15236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15237$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15238if test "$ac_cv_func_setpgrp_void" = yes; then
15239 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15240
05ea2a05 15241fi
97bf5e38 15242fi
3862412b 15243
05ea2a05
TT
15244# Assume we'll default to using the included libiberty regex.
15245gdb_use_included_regex=yes
15246
15247# However, if the system regex is GNU regex, then default to *not*
15248# using the included regex.
15249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15250$as_echo_n "checking for GNU regex... " >&6; }
15251if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15252 $as_echo_n "(cached) " >&6
3862412b 15253else
81ecdfbb 15254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15255/* end confdefs.h. */
05ea2a05 15256#include <gnu-versions.h>
bec39cab
AC
15257int
15258main ()
15259{
05ea2a05
TT
15260#define REGEX_INTERFACE_VERSION 1
15261#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15262# error "Version mismatch"
15263#endif
bec39cab
AC
15264 ;
15265 return 0;
15266}
15267_ACEOF
81ecdfbb 15268if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15269 gdb_cv_have_gnu_regex=yes
3862412b 15270else
05ea2a05 15271 gdb_cv_have_gnu_regex=no
3862412b 15272fi
81ecdfbb 15273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15274fi
05ea2a05
TT
15275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15276$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15277if test "$gdb_cv_have_gnu_regex" = yes; then
15278 gdb_use_included_regex=no
15279fi
3862412b 15280
3862412b 15281
05ea2a05
TT
15282# Check whether --with-included-regex was given.
15283if test "${with_included_regex+set}" = set; then :
15284 withval=$with_included_regex; gdb_with_regex=$withval
15285else
15286 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15287fi
3862412b 15288
05ea2a05 15289if test "$gdb_with_regex" = yes; then
6e9567fe 15290
05ea2a05 15291$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15292
15293fi
15294
05ea2a05
TT
15295# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15296ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15297#include <sys/proc.h>
6e9567fe 15298
e6cdd38e 15299"
05ea2a05 15300if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15301
15302cat >>confdefs.h <<_ACEOF
05ea2a05 15303#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15304_ACEOF
15305
15306
15307fi
15308
6e9567fe 15309
05ea2a05
TT
15310# See if <sys/lwp.h> defines `struct lwp`.
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15312$as_echo_n "checking for struct lwp... " >&6; }
15313if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15314 $as_echo_n "(cached) " >&6
596c9d4b 15315else
81ecdfbb 15316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15317/* end confdefs.h. */
05ea2a05
TT
15318#include <sys/param.h>
15319#define _KMEMUSER
15320#include <sys/lwp.h>
bec39cab
AC
15321int
15322main ()
15323{
05ea2a05 15324struct lwp l;
bec39cab
AC
15325 ;
15326 return 0;
15327}
15328_ACEOF
81ecdfbb 15329if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15330 gdb_cv_struct_lwp=yes
596c9d4b 15331else
05ea2a05 15332 gdb_cv_struct_lwp=no
596c9d4b 15333fi
81ecdfbb 15334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b 15335fi
05ea2a05
TT
15336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15337$as_echo "$gdb_cv_struct_lwp" >&6; }
15338if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15339
05ea2a05 15340$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15341
05ea2a05 15342fi
451928c5 15343
05ea2a05
TT
15344# See if <machine/reg.h> degines `struct reg'.
15345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15346$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15347if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15348 $as_echo_n "(cached) " >&6
d84dd0c5 15349else
81ecdfbb 15350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15351/* end confdefs.h. */
05ea2a05
TT
15352#include <sys/types.h>
15353#include <machine/reg.h>
bec39cab
AC
15354int
15355main ()
15356{
05ea2a05 15357struct reg r;
bec39cab
AC
15358 ;
15359 return 0;
15360}
15361_ACEOF
81ecdfbb 15362if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15363 gdb_cv_struct_reg=yes
d84dd0c5 15364else
05ea2a05 15365 gdb_cv_struct_reg=no
d84dd0c5 15366fi
81ecdfbb 15367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5 15368fi
05ea2a05
TT
15369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15370$as_echo "$gdb_cv_struct_reg" >&6; }
15371if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15372
05ea2a05 15373$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15374
05ea2a05 15375fi
d84dd0c5 15376
05ea2a05
TT
15377# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15378# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15379ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15380#include <machine/reg.h>
15381"
15382if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15383
05ea2a05
TT
15384cat >>confdefs.h <<_ACEOF
15385#define HAVE_STRUCT_REG_R_FS 1
15386_ACEOF
15387
15388
15389fi
15390ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15391#include <machine/reg.h>
15392"
15393if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15394
15395cat >>confdefs.h <<_ACEOF
15396#define HAVE_STRUCT_REG_R_GS 1
15397_ACEOF
15398
15399
15400fi
15401
15402
05ea2a05
TT
15403# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15405$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15406if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15407 $as_echo_n "(cached) " >&6
d45fe813 15408else
81ecdfbb 15409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15410/* end confdefs.h. */
05ea2a05 15411#include <sys/ptrace.h>
bec39cab
AC
15412int
15413main ()
15414{
05ea2a05 15415PTRACE_GETREGS;
bec39cab
AC
15416 ;
15417 return 0;
15418}
15419_ACEOF
81ecdfbb 15420if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15421 gdb_cv_have_ptrace_getregs=yes
d45fe813 15422else
05ea2a05 15423 gdb_cv_have_ptrace_getregs=no
d45fe813 15424fi
81ecdfbb 15425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15426fi
15427
05ea2a05
TT
15428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15429$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15430if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15431
05ea2a05 15432$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15433
05ea2a05 15434fi
d45fe813 15435
05ea2a05
TT
15436# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15438$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15439if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15440 $as_echo_n "(cached) " >&6
d45fe813 15441else
81ecdfbb 15442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15443/* end confdefs.h. */
05ea2a05 15444#include <sys/ptrace.h>
bec39cab
AC
15445int
15446main ()
15447{
05ea2a05 15448PTRACE_GETFPXREGS;
bec39cab
AC
15449 ;
15450 return 0;
15451}
15452_ACEOF
81ecdfbb 15453if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15454 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15455else
05ea2a05 15456 gdb_cv_have_ptrace_getfpxregs=no
d45fe813 15457fi
81ecdfbb 15458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15459fi
15460
05ea2a05
TT
15461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15462$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15463if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15464
05ea2a05 15465$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15466
05ea2a05 15467fi
d45fe813 15468
05ea2a05
TT
15469# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15471$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15472if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15473 $as_echo_n "(cached) " >&6
d45fe813 15474else
81ecdfbb 15475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15476/* end confdefs.h. */
05ea2a05
TT
15477#include <sys/types.h>
15478#include <sys/ptrace.h>
bec39cab
AC
15479int
15480main ()
15481{
05ea2a05 15482PT_GETDBREGS;
bec39cab
AC
15483 ;
15484 return 0;
15485}
15486_ACEOF
81ecdfbb 15487if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15488 gdb_cv_have_pt_getdbregs=yes
d45fe813 15489else
05ea2a05 15490 gdb_cv_have_pt_getdbregs=no
d45fe813 15491fi
81ecdfbb 15492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15493fi
15494
05ea2a05
TT
15495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15496$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15497if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15498
05ea2a05 15499$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15500
05ea2a05 15501fi
c906108c 15502
05ea2a05
TT
15503# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15505$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15506if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15507 $as_echo_n "(cached) " >&6
c906108c 15508else
81ecdfbb 15509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15510/* end confdefs.h. */
05ea2a05
TT
15511#include <sys/types.h>
15512#include <sys/ptrace.h>
bec39cab
AC
15513int
15514main ()
15515{
05ea2a05 15516PT_GETXMMREGS;
bec39cab
AC
15517 ;
15518 return 0;
15519}
15520_ACEOF
81ecdfbb 15521if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15522 gdb_cv_have_pt_getxmmregs=yes
c906108c 15523else
05ea2a05 15524 gdb_cv_have_pt_getxmmregs=no
c906108c 15525fi
81ecdfbb 15526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15527fi
15528
05ea2a05
TT
15529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15530$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15531if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15532
05ea2a05 15533$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15534
05ea2a05 15535fi
c906108c 15536
05ea2a05
TT
15537# See if <sys/ptrace.h> supports LWP names on FreeBSD
15538# Older FreeBSD versions don't have the pl_tdname member of
15539# `struct ptrace_lwpinfo'.
15540ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15541"
15542if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15543
05ea2a05
TT
15544cat >>confdefs.h <<_ACEOF
15545#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15546_ACEOF
43b7e92b 15547
05ea2a05 15548
43b7e92b
GB
15549fi
15550
43b7e92b 15551
05ea2a05
TT
15552# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15553# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15554# FreeBSD 10.3.
15555ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15556"
15557if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15558
15559cat >>confdefs.h <<_ACEOF
15560#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15561_ACEOF
43b7e92b 15562
43b7e92b 15563
c906108c 15564fi
c906108c 15565
05ea2a05 15566
bc8bcb4b 15567# Check if the compiler supports the `long long' type.
c906108c 15568
81ecdfbb
RW
15569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15570$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15571if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15572 $as_echo_n "(cached) " >&6
97bf5e38 15573else
81ecdfbb 15574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15575/* end confdefs.h. */
bc8bcb4b 15576extern long long foo;
bec39cab
AC
15577int
15578main ()
15579{
bc8bcb4b 15580switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15581 ;
15582 return 0;
15583}
15584_ACEOF
81ecdfbb 15585if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15586 gdb_cv_c_long_long=yes
15587else
81ecdfbb 15588 gdb_cv_c_long_long=no
97bf5e38 15589fi
81ecdfbb 15590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15591fi
81ecdfbb
RW
15592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15593$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15594if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15595 # libdecnumber requires long long.
d0ac1c44 15596 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15597fi
15598
bc8bcb4b 15599# Check if the compiler and runtime support printing long longs.
97bf5e38 15600
81ecdfbb
RW
15601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15602$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15603if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15604 $as_echo_n "(cached) " >&6
97bf5e38 15605else
81ecdfbb 15606 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15607 gdb_cv_printf_has_long_long=no
15608else
81ecdfbb 15609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15610/* end confdefs.h. */
bc8bcb4b
MK
15611$ac_includes_default
15612int
15613main ()
15614{
15615char buf[32];
97bf5e38
MK
15616 long long l = 0;
15617 l = (l << 16) + 0x0123;
15618 l = (l << 16) + 0x4567;
15619 l = (l << 16) + 0x89ab;
15620 l = (l << 16) + 0xcdef;
15621 sprintf (buf, "0x%016llx", l);
15622 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15623 ;
15624 return 0;
c906108c 15625}
bec39cab 15626_ACEOF
81ecdfbb 15627if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15628 gdb_cv_printf_has_long_long=yes
15629else
81ecdfbb 15630 gdb_cv_printf_has_long_long=no
97bf5e38 15631fi
81ecdfbb
RW
15632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15633 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15634fi
81ecdfbb 15635
97bf5e38 15636fi
81ecdfbb
RW
15637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15638$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15639if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15640
81ecdfbb 15641$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15642
15643fi
97bf5e38 15644
1a619819
LM
15645# Check if the compiler and runtime support printing decfloats.
15646
81ecdfbb
RW
15647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15648$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15649if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15650 $as_echo_n "(cached) " >&6
1a619819 15651else
81ecdfbb 15652 if test "$cross_compiling" = yes; then :
1a619819
LM
15653 gdb_cv_printf_has_decfloat=no
15654else
81ecdfbb 15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15656/* end confdefs.h. */
15657$ac_includes_default
15658int
15659main ()
15660{
15661char buf[64];
15662 _Decimal32 d32 = 1.2345df;
15663 _Decimal64 d64 = 1.2345dd;
15664 _Decimal128 d128 = 1.2345dl;
15665 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15666 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15667 ;
15668 return 0;
15669}
15670_ACEOF
81ecdfbb 15671if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15672 gdb_cv_printf_has_decfloat=yes
15673else
81ecdfbb 15674 gdb_cv_printf_has_decfloat=no
1a619819 15675fi
81ecdfbb
RW
15676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15677 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15678fi
81ecdfbb 15679
1a619819 15680fi
81ecdfbb
RW
15681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15682$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15683if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15684
81ecdfbb 15685$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15686
15687fi
15688
bc8bcb4b
MK
15689# Check if the compiler supports the `long double' type. We can't use
15690# AC_C_LONG_DOUBLE because that one does additional checks on the
15691# constants defined in <float.h> that fail on some systems,
15692# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15693
81ecdfbb
RW
15694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15695$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15696if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15697 $as_echo_n "(cached) " >&6
97bf5e38 15698else
81ecdfbb 15699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15700/* end confdefs.h. */
97bf5e38 15701long double foo;
bec39cab 15702_ACEOF
81ecdfbb 15703if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15704 gdb_cv_c_long_double=yes
97bf5e38 15705else
81ecdfbb 15706 gdb_cv_c_long_double=no
97bf5e38 15707fi
81ecdfbb 15708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15709fi
81ecdfbb
RW
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15711$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15712if test "$gdb_cv_c_long_double" = yes; then
c906108c 15713
81ecdfbb 15714$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15715
15716fi
15717
bc8bcb4b 15718# Check if the compiler and runtime support printing long doubles.
97bf5e38 15719
81ecdfbb
RW
15720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15721$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15722if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15723 $as_echo_n "(cached) " >&6
97bf5e38 15724else
81ecdfbb 15725 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15726 gdb_cv_printf_has_long_double=no
15727else
81ecdfbb 15728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15729/* end confdefs.h. */
bc8bcb4b
MK
15730$ac_includes_default
15731int
15732main ()
15733{
15734char buf[16];
97bf5e38
MK
15735 long double f = 3.141592653;
15736 sprintf (buf, "%Lg", f);
15737 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15738 ;
15739 return 0;
97bf5e38 15740}
bec39cab 15741_ACEOF
81ecdfbb 15742if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15743 gdb_cv_printf_has_long_double=yes
c906108c 15744else
81ecdfbb 15745 gdb_cv_printf_has_long_double=no
c906108c 15746fi
81ecdfbb
RW
15747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15748 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15749fi
81ecdfbb 15750
c906108c 15751fi
81ecdfbb
RW
15752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15753$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15754if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15755
81ecdfbb 15756$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15757
15758fi
97bf5e38 15759
bc8bcb4b 15760# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15761
81ecdfbb
RW
15762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15763$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15764if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15765 $as_echo_n "(cached) " >&6
97bf5e38 15766else
81ecdfbb 15767 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15768 gdb_cv_scanf_has_long_double=no
15769else
81ecdfbb 15770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15771/* end confdefs.h. */
bc8bcb4b
MK
15772#include <stdio.h>
15773int
15774main ()
15775{
15776char *buf = "3.141592653";
97bf5e38
MK
15777 long double f = 0;
15778 sscanf (buf, "%Lg", &f);
15779 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15780 ;
15781 return 0;
97bf5e38 15782}
bec39cab 15783_ACEOF
81ecdfbb 15784if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15785 gdb_cv_scanf_has_long_double=yes
15786else
81ecdfbb 15787 gdb_cv_scanf_has_long_double=no
97bf5e38 15788fi
81ecdfbb
RW
15789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15790 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15791fi
81ecdfbb 15792
c906108c 15793fi
81ecdfbb
RW
15794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15795$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15796if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15797
81ecdfbb 15798$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15799
15800fi
c906108c 15801
438013df
AO
15802case ${host_os} in
15803aix*)
81ecdfbb
RW
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15805$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15806if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15807 $as_echo_n "(cached) " >&6
438013df 15808else
bec39cab 15809
438013df
AO
15810 SAVE_LDFLAGS=$LDFLAGS
15811
15812 case $GCC in
15813 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15814 *) gdb_cv_bigtoc=-bbigtoc ;;
15815 esac
15816
15817 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15819/* end confdefs.h. */
438013df 15820
bec39cab
AC
15821int
15822main ()
15823{
438013df 15824int i;
bec39cab
AC
15825 ;
15826 return 0;
15827}
15828_ACEOF
81ecdfbb 15829if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15830
81ecdfbb
RW
15831else
15832 gdb_cv_bigtoc=
438013df 15833fi
81ecdfbb
RW
15834rm -f core conftest.err conftest.$ac_objext \
15835 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15836 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15837
bec39cab 15838fi
81ecdfbb
RW
15839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15840$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15841 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15842 ;;
15843esac
15844
38f6b338 15845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15846$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15847dynamic_list=false
15848if test "${gdb_native}" = yes; then
15849 # The dynamically loaded libthread_db needs access to symbols in the gdb
15850 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15851 # may not be supported there.
15852 old_LDFLAGS="$LDFLAGS"
15853 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15854 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15855 LDFLAGS="$LDFLAGS $RDYNAMIC"
15856 if test "${have_libpython}" = no; then
15857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15858/* end confdefs.h. */
15859
15860int
15861main ()
15862{
15863
15864 ;
15865 return 0;
15866}
15867_ACEOF
15868if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15869 dynamic_list=true
15870fi
15871rm -f core conftest.err conftest.$ac_objext \
15872 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15873 else
15874 # Workaround http://bugs.python.org/issue4434 where static
15875 # libpythonX.Y.a would get its symbols required for
15876 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15877 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15878
15879 # Note the workaround for Python
15880 # http://bugs.python.org/issue10112 earlier has removed
15881 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15882 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15883 # always pass.
38f6b338
JK
15884 old_CFLAGS="$CFLAGS"
15885 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15886 old_LIBS="$LIBS"
15887 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15888 old_CPPFLAGS="$CPPFLAGS"
15889 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15890 if test "$cross_compiling" = yes; then :
3bebe2f2 15891 true
f6528abd 15892else
3bebe2f2
JK
15893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15894/* end confdefs.h. */
1b4f615e 15895#include "Python.h"
3bebe2f2
JK
15896int
15897main ()
15898{
15899int err;
38f6b338
JK
15900 Py_Initialize ();
15901 err = PyRun_SimpleString ("import itertools\n");
15902 Py_Finalize ();
15903 return err == 0 ? 0 : 1;
3bebe2f2
JK
15904 ;
15905 return 0;
15906}
15907_ACEOF
15908if ac_fn_c_try_run "$LINENO"; then :
15909 dynamic_list=true
15910fi
15911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15912 conftest.$ac_objext conftest.beam conftest.$ac_ext
15913fi
15914
8c1fb155 15915 LIBS="$old_LIBS"
38f6b338 15916 CFLAGS="$old_CFLAGS"
1b4f615e 15917 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15918 fi
15919 LDFLAGS="$old_LDFLAGS"
15920fi
15921if $dynamic_list; then
15922 found="-Wl,--dynamic-list"
15923 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15924else
38f6b338
JK
15925 found="-rdynamic"
15926 RDYNAMIC="-rdynamic"
f6528abd 15927fi
f6528abd 15928
38f6b338 15929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15930$as_echo "$found" >&6; }
0407b3f1 15931
f6528abd 15932
0ad6b8ee 15933if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 15934 case ${host_os} in
d92419e5 15935 aix*)
81ecdfbb
RW
15936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15937$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15938 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15939 $as_echo_n "(cached) " >&6
bec39cab 15940else
81ecdfbb 15941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15942/* end confdefs.h. */
d92419e5 15943#include <sys/pthdebug.h>
bec39cab
AC
15944int
15945main ()
15946{
d92419e5
JB
15947#ifndef PTHDB_VERSION_3
15948 #error
15949 #endif
bec39cab
AC
15950 ;
15951 return 0;
15952}
15953_ACEOF
81ecdfbb 15954if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15955 gdb_cv_have_aix_thread_debug=yes
15956else
81ecdfbb 15957 gdb_cv_have_aix_thread_debug=no
d92419e5 15958fi
81ecdfbb 15959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15960fi
15961
81ecdfbb
RW
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15963$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 15964 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 15965 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15966 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15967 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15968
15969 # Older versions of AIX do not provide the declaration for
15970 # the getthrds function (it appears that it was introduced
15971 # with AIX 6.x).
15972 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15973"
d0ac1c44 15974if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15975 ac_have_decl=1
15976else
15977 ac_have_decl=0
15978fi
15979
15980cat >>confdefs.h <<_ACEOF
15981#define HAVE_DECL_GETTHRDS $ac_have_decl
15982_ACEOF
15983
d92419e5
JB
15984 fi
15985 ;;
c906108c 15986 esac
bec39cab 15987
c906108c
SS
15988fi
15989
3f47be5c 15990if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15992$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15993if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15994 $as_echo_n "(cached) " >&6
bec39cab 15995else
81ecdfbb 15996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15997/* end confdefs.h. */
3f47be5c 15998#include <thread_db.h>
bec39cab
AC
15999int
16000main ()
16001{
3f47be5c 16002int i = TD_NOTALLOC;
bec39cab
AC
16003 ;
16004 return 0;
16005}
16006_ACEOF
81ecdfbb 16007if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16008 gdb_cv_thread_db_h_has_td_notalloc=yes
16009else
81ecdfbb 16010 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16011
3f47be5c 16012fi
81ecdfbb 16013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16014
bec39cab 16015fi
81ecdfbb
RW
16016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16017$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16019$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16020if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16021 $as_echo_n "(cached) " >&6
59f80f10 16022else
81ecdfbb 16023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16024/* end confdefs.h. */
16025#include <thread_db.h>
16026int
16027main ()
16028{
16029int i = TD_VERSION;
16030 ;
16031 return 0;
16032}
16033_ACEOF
81ecdfbb 16034if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16035 gdb_cv_thread_db_h_has_td_version=yes
16036else
81ecdfbb 16037 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16038
16039fi
81ecdfbb 16040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16041
16042fi
81ecdfbb
RW
16043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16044$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16046$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16047if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16048 $as_echo_n "(cached) " >&6
59f80f10 16049else
81ecdfbb 16050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16051/* end confdefs.h. */
16052#include <thread_db.h>
16053int
16054main ()
16055{
16056int i = TD_NOTLS;
16057 ;
16058 return 0;
16059}
16060_ACEOF
81ecdfbb 16061if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16062 gdb_cv_thread_db_h_has_td_notls=yes
16063else
81ecdfbb 16064 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16065
16066fi
81ecdfbb 16067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16068
16069fi
81ecdfbb
RW
16070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16071$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16072fi
16073if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16074
81ecdfbb 16075$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16076
59f80f10
DJ
16077fi
16078if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16079
81ecdfbb 16080$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16081
16082fi
16083if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16084
81ecdfbb 16085$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16086
3f47be5c
EZ
16087fi
16088
e655c1a2
PA
16089case $host_os in
16090 go32* | *djgpp*)
16091 gdbinit=gdb.ini
16092 ;;
16093 *)
16094 gdbinit=.gdbinit
16095 ;;
16096esac
16097
16098cat >>confdefs.h <<_ACEOF
16099#define GDBINIT "$gdbinit"
16100_ACEOF
16101
16102
fb40c209 16103
f83d8a90
DE
16104# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16105# except that the argument to --with-sysroot is optional.
16106# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16107if test "x$with_sysroot" = xyes; then
16108 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16109fi
bec39cab 16110
81ecdfbb
RW
16111# Check whether --with-sysroot was given.
16112if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16113 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16114else
16115 TARGET_SYSTEM_ROOT=
16116fi
030292b7 16117
030292b7 16118
f83d8a90
DE
16119 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16121 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16122 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16123
f83d8a90
DE
16124cat >>confdefs.h <<_ACEOF
16125#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16126_ACEOF
bec39cab 16127
030292b7 16128
b14b1491 16129
f83d8a90
DE
16130
16131 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16132 if test "x$prefix" = xNONE; then
16133 test_prefix=/usr/local
16134 else
16135 test_prefix=$prefix
16136 fi
16137 else
16138 test_prefix=$exec_prefix
16139 fi
16140 value=0
16141 case ${ac_define_dir} in
16142 "${test_prefix}"|"${test_prefix}/"*|\
16143 '${exec_prefix}'|'${exec_prefix}/'*)
16144 value=1
16145 ;;
16146 esac
16147
16148cat >>confdefs.h <<_ACEOF
16149#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16150_ACEOF
030292b7
DJ
16151
16152
16153
16e7150e 16154
16e7150e 16155
81ecdfbb
RW
16156# Check whether --with-system-gdbinit was given.
16157if test "${with_system_gdbinit+set}" = set; then :
16158 withval=$with_system_gdbinit;
b14b1491
TT
16159 SYSTEM_GDBINIT=$withval
16160else
16161 SYSTEM_GDBINIT=
81ecdfbb
RW
16162fi
16163
16e7150e
JG
16164
16165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16167 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16168 ac_define_dir=`eval echo $ac_define_dir`
16169
16170cat >>confdefs.h <<_ACEOF
16171#define SYSTEM_GDBINIT "$ac_define_dir"
16172_ACEOF
16173
16174
16175
0c4a4063 16176
b14b1491
TT
16177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16178 if test "x$prefix" = xNONE; then
16179 test_prefix=/usr/local
16180 else
16181 test_prefix=$prefix
16182 fi
16183 else
16184 test_prefix=$exec_prefix
16185 fi
16186 value=0
16187 case ${ac_define_dir} in
16188 "${test_prefix}"|"${test_prefix}/"*|\
16189 '${exec_prefix}'|'${exec_prefix}/'*)
16190 value=1
16191 ;;
16192 esac
16e7150e 16193
b14b1491
TT
16194cat >>confdefs.h <<_ACEOF
16195#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16196_ACEOF
16197
b14b1491 16198
16e7150e 16199
0c4a4063 16200
b835bb52 16201
ed2a2229
CB
16202# Check whether --with-system-gdbinit-dir was given.
16203if test "${with_system_gdbinit_dir+set}" = set; then :
16204 withval=$with_system_gdbinit_dir;
16205 SYSTEM_GDBINIT_DIR=$withval
16206else
16207 SYSTEM_GDBINIT_DIR=
16208fi
16209
16210
16211 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16212 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16213 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16214 ac_define_dir=`eval echo $ac_define_dir`
16215
16216cat >>confdefs.h <<_ACEOF
16217#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16218_ACEOF
16219
16220
16221
16222
16223 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16224 if test "x$prefix" = xNONE; then
16225 test_prefix=/usr/local
16226 else
16227 test_prefix=$prefix
16228 fi
16229 else
16230 test_prefix=$exec_prefix
16231 fi
16232 value=0
16233 case ${ac_define_dir} in
16234 "${test_prefix}"|"${test_prefix}/"*|\
16235 '${exec_prefix}'|'${exec_prefix}/'*)
16236 value=1
16237 ;;
16238 esac
16239
16240cat >>confdefs.h <<_ACEOF
16241#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16242_ACEOF
16243
16244
16245
16246
16247
81ecdfbb
RW
16248# Check whether --enable-werror was given.
16249if test "${enable_werror+set}" = set; then :
16250 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16251 yes | y) ERROR_ON_WARNING="yes" ;;
16252 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16253 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16254 esac
81ecdfbb
RW
16255fi
16256
094a342e 16257
9a084706
PA
16258# Enable -Werror by default when using gcc. Turn it off for releases.
16259if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16260 ERROR_ON_WARNING=yes
16261fi
16262
16263WERROR_CFLAGS=""
16264if test "${ERROR_ON_WARNING}" = yes ; then
16265 WERROR_CFLAGS="-Werror"
16266fi
16267
cf6de44d 16268# The options we'll try to enable.
aac331e4 16269build_warnings="-Wall -Wpointer-arith \
a0de763e 16270-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16271-Wno-switch -Wno-char-subscripts \
cf6de44d 16272-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16273-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16274-Wno-mismatched-tags \
632e107b 16275-Wno-error=deprecated-register \
85e26832 16276-Wsuggest-override \
1a34f210 16277-Wimplicit-fallthrough=3 \
96643e35 16278-Wduplicated-cond \
33a6bc35
TT
16279-Wshadow=local \
16280-Wdeprecated-copy \
16281-Wdeprecated-copy-dtor \
bb564c58 16282-Wredundant-move \
8ddd8e0e 16283-Wmissing-declarations \
a0761e34 16284-Wmissing-prototypes \
898e7f60
SM
16285-Wstrict-null-sentinel \
16286"
3bc3d82a 16287
3526781e 16288case "${host}" in
4fa7574e
RO
16289 *-*-mingw32*)
16290 # Enable -Wno-format by default when using gcc on mingw since many
16291 # GCC versions complain about %I64.
16292 build_warnings="$build_warnings -Wno-format" ;;
16293 *-*-solaris*)
16294 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16295 # doesn't understand.
16296 build_warnings="$build_warnings -Wno-unknown-pragmas"
16297 # Solaris 11 <unistd.h> marks vfork deprecated.
16298 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16299 *)
16300 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16301 # but there's a special case for this below.
16302 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16303esac
16304
81ecdfbb
RW
16305# Check whether --enable-build-warnings was given.
16306if test "${enable_build_warnings+set}" = set; then :
16307 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16308 yes) ;;
16309 no) build_warnings="-w";;
16310 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16311 build_warnings="${build_warnings} ${t}";;
16312 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16313 build_warnings="${t} ${build_warnings}";;
16314 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16315esac
d4f3574e 16316if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16317 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16318fi
81ecdfbb
RW
16319fi
16320# Check whether --enable-gdb-build-warnings was given.
16321if test "${enable_gdb_build_warnings+set}" = set; then :
16322 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16323 yes) ;;
16324 no) build_warnings="-w";;
16325 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16326 build_warnings="${build_warnings} ${t}";;
16327 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16328 build_warnings="${t} ${build_warnings}";;
16329 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16330esac
16331if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16332 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16333fi
81ecdfbb 16334fi
3bc3d82a
PA
16335
16336# The set of warnings supported by a C++ compiler is not the same as
16337# of the C compiler.
cf6de44d 16338ac_ext=cpp
3bc3d82a
PA
16339ac_cpp='$CXXCPP $CPPFLAGS'
16340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16343
3bc3d82a 16344
81ecdfbb 16345WARN_CFLAGS=""
c906108c
SS
16346if test "x${build_warnings}" != x -a "x$GCC" = xyes
16347then
81ecdfbb
RW
16348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16349$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16350 # Separate out the -Werror flag as some files just cannot be
16351 # compiled with it enabled.
16352 for w in ${build_warnings}; do
7544db95
PA
16353 # GCC does not complain about -Wno-unknown-warning. Invert
16354 # and test -Wunknown-warning instead.
16355 case $w in
16356 -Wno-*)
16357 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16358 -Wformat-nonliteral)
16359 # gcc requires -Wformat before -Wformat-nonliteral
16360 # will work, so stick them together.
16361 w="-Wformat $w"
16362 wtest="$w"
16363 ;;
7544db95
PA
16364 *)
16365 wtest=$w ;;
16366 esac
16367
746a987d
AC
16368 case $w in
16369 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16370 *)
16371 # Check whether GCC accepts it.
4536bbc6 16372 saved_CFLAGS="$CFLAGS"
3e019bdc 16373 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16374 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16375 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16376 if test "x$w" = "x-Wunused-variable"; then
16377 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16378 # fixed in GCC 4.9. This test is derived from the gdb
16379 # source code that triggered this bug in GCC.
16380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16381/* end confdefs.h. */
16382struct scoped_restore_base {};
16383 struct scoped_restore_tmpl : public scoped_restore_base {
16384 ~scoped_restore_tmpl() {}
16385 };
16386int
16387main ()
16388{
16389const scoped_restore_base &b = scoped_restore_tmpl();
16390 ;
16391 return 0;
16392}
16393_ACEOF
16394if ac_fn_cxx_try_compile "$LINENO"; then :
16395 WARN_CFLAGS="${WARN_CFLAGS} $w"
16396fi
16397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16398 else
16399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16400/* end confdefs.h. */
4536bbc6 16401
bec39cab
AC
16402int
16403main ()
16404{
4536bbc6 16405
bec39cab
AC
16406 ;
16407 return 0;
16408}
16409_ACEOF
3bc3d82a 16410if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16411 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16412fi
81ecdfbb 16413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16414 fi
4536bbc6 16415 CFLAGS="$saved_CFLAGS"
3bc3d82a 16416 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16417 esac
16418 done
81ecdfbb
RW
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16420$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16421fi
16422
16423
104c1213 16424
cf6de44d 16425ac_ext=c
3bc3d82a
PA
16426ac_cpp='$CPP $CPPFLAGS'
16427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16429ac_compiler_gnu=$ac_cv_c_compiler_gnu
16430
3bc3d82a 16431
b835bb52 16432
f35d5ade
TT
16433# Check whether --enable-ubsan was given.
16434if test "${enable_ubsan+set}" = set; then :
16435 enableval=$enable_ubsan;
16436else
eff98030 16437 enable_ubsan=no
f35d5ade
TT
16438fi
16439
16440if test "x$enable_ubsan" = xauto; then
16441 if $development; then
16442 enable_ubsan=yes
16443 fi
16444fi
16445ac_ext=cpp
16446ac_cpp='$CXXCPP $CPPFLAGS'
16447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16450
16451if test "x$enable_ubsan" = xyes; then
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16453$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16454 saved_CXXFLAGS="$CXXFLAGS"
16455 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457/* end confdefs.h. */
16458
16459int
16460main ()
16461{
16462
16463 ;
16464 return 0;
16465}
16466_ACEOF
16467if ac_fn_cxx_try_link "$LINENO"; then :
16468 enable_ubsan=yes
16469else
16470 enable_ubsan=no
16471fi
16472rm -f core conftest.err conftest.$ac_objext \
16473 conftest$ac_exeext conftest.$ac_ext
16474 CXXFLAGS="$saved_CXXFLAGS"
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16476$as_echo "$enable_ubsan" >&6; }
16477 if test "x$enable_ubsan" = xyes; then
16478 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16479 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16480 fi
16481fi
16482ac_ext=c
16483ac_cpp='$CPP $CPPFLAGS'
16484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16486ac_compiler_gnu=$ac_cv_c_compiler_gnu
16487
16488
16489
7a292a7a 16490# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16492$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16493if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16494 $as_echo_n "(cached) " >&6
bec39cab 16495else
81ecdfbb 16496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16497/* end confdefs.h. */
7a292a7a
SS
16498
16499#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16500lose
16501#endif
bec39cab 16502_ACEOF
7a292a7a 16503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16504 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16505 gdb_cv_os_cygwin=yes
16506else
7a292a7a
SS
16507 gdb_cv_os_cygwin=no
16508fi
16509rm -f conftest*
16510
16511fi
81ecdfbb
RW
16512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16513$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16514
aff38e61 16515
3eb25fda 16516SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16517case ${host} in
95cbc983
AC
16518 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16519 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16520 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16521 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16522esac
16523
16524
cd0fc7c3
SS
16525# libreadline needs libuser32.a in a cygwin environment
16526WIN32LIBS=
0ad6b8ee 16527if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16528 WIN32LIBS="-luser32"
16529 case "${target}" in
16530 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16531 ;;
16532 esac
cd0fc7c3 16533fi
c906108c 16534
b4505029 16535# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16536# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16537WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16538
31d99776 16539# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16540
16541 OLD_CFLAGS=$CFLAGS
16542 OLD_LDFLAGS=$LDFLAGS
16543 OLD_LIBS=$LIBS
16544 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16545 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16546 # always want our bfd.
16547 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16548 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16549 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16550 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16551 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16553$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16554if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16555 $as_echo_n "(cached) " >&6
31d99776 16556else
81ecdfbb 16557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16558/* end confdefs.h. */
16559#include <stdlib.h>
def63ff0
TT
16560 #include "bfd.h"
16561 #include "elf-bfd.h"
31d99776
DJ
16562
16563int
16564main ()
16565{
def63ff0 16566return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16567 ;
16568 return 0;
16569}
16570_ACEOF
81ecdfbb 16571if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16572 gdb_cv_var_elf=yes
16573else
81ecdfbb 16574 gdb_cv_var_elf=no
31d99776 16575fi
81ecdfbb
RW
16576rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
31d99776 16578fi
81ecdfbb
RW
16579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16580$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16581 CFLAGS=$OLD_CFLAGS
16582 LDFLAGS=$OLD_LDFLAGS
16583 LIBS=$OLD_LIBS
0ad6b8ee 16584if test "$gdb_cv_var_elf" = yes; then
d4777acb 16585 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16586
81ecdfbb 16587$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16588
075ff26d
JK
16589 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16590 if test "$plugins" = "yes"; then
a48b32c0
L
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16592$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16593if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16594 $as_echo_n "(cached) " >&6
16595else
16596 ac_func_search_save_LIBS=$LIBS
16597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16598/* end confdefs.h. */
16599
16600/* Override any GCC internal prototype to avoid an error.
16601 Use char because int might match the return type of a GCC
16602 builtin and then its argument prototype would still apply. */
16603#ifdef __cplusplus
16604extern "C"
16605#endif
16606char dlopen ();
16607int
16608main ()
16609{
16610return dlopen ();
16611 ;
16612 return 0;
16613}
16614_ACEOF
16615for ac_lib in '' dl; do
16616 if test -z "$ac_lib"; then
16617 ac_res="none required"
16618 else
16619 ac_res=-l$ac_lib
16620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16621 fi
16622 if ac_fn_c_try_link "$LINENO"; then :
16623 ac_cv_search_dlopen=$ac_res
16624fi
16625rm -f core conftest.err conftest.$ac_objext \
16626 conftest$ac_exeext
d0ac1c44 16627 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16628 break
16629fi
16630done
d0ac1c44 16631if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16632
16633else
16634 ac_cv_search_dlopen=no
16635fi
16636rm conftest.$ac_ext
16637LIBS=$ac_func_search_save_LIBS
16638fi
16639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16640$as_echo "$ac_cv_search_dlopen" >&6; }
16641ac_res=$ac_cv_search_dlopen
16642if test "$ac_res" != no; then :
16643 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16644
16645fi
16646
075ff26d 16647 fi
31d99776 16648fi
31d99776 16649
4f05add4
TT
16650# Add macho support to GDB, but only if BFD includes it.
16651
16652 OLD_CFLAGS=$CFLAGS
16653 OLD_LDFLAGS=$LDFLAGS
16654 OLD_LIBS=$LIBS
16655 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16656 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16657 # always want our bfd.
16658 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16659 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16660 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16661 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16662 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16664$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16665if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16666 $as_echo_n "(cached) " >&6
16667else
16668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16669/* end confdefs.h. */
16670#include <stdlib.h>
16671 #include "bfd.h"
16672 #include "mach-o.h"
16673
16674int
16675main ()
16676{
16677return bfd_mach_o_lookup_command (NULL, 0, NULL);
16678 ;
16679 return 0;
16680}
16681_ACEOF
16682if ac_fn_c_try_link "$LINENO"; then :
16683 gdb_cv_var_macho=yes
16684else
16685 gdb_cv_var_macho=no
16686fi
16687rm -f core conftest.err conftest.$ac_objext \
16688 conftest$ac_exeext conftest.$ac_ext
16689fi
16690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16691$as_echo "$gdb_cv_var_macho" >&6; }
16692 CFLAGS=$OLD_CFLAGS
16693 LDFLAGS=$OLD_LDFLAGS
16694 LIBS=$OLD_LIBS
0ad6b8ee 16695if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16696 CONFIG_OBS="$CONFIG_OBS machoread.o"
16697fi
16698
121ce6e5
DJ
16699# Add any host-specific objects to GDB.
16700CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16701
608e2dbb 16702# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16703if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16704
16705# Check whether --with-lzma was given.
16706if test "${with_lzma+set}" = set; then :
16707 withval=$with_lzma;
16708else
16709 with_lzma=auto
16710fi
16711
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16713$as_echo_n "checking whether to use lzma... " >&6; }
16714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16715$as_echo "$with_lzma" >&6; }
16716
16717 if test "${with_lzma}" != no; then
16718
16719
16720
16721
16722
16723
16724
16725
16726 use_additional=yes
16727
16728 acl_save_prefix="$prefix"
16729 prefix="$acl_final_prefix"
16730 acl_save_exec_prefix="$exec_prefix"
16731 exec_prefix="$acl_final_exec_prefix"
16732
16733 eval additional_includedir=\"$includedir\"
16734 eval additional_libdir=\"$libdir\"
16735
16736 exec_prefix="$acl_save_exec_prefix"
16737 prefix="$acl_save_prefix"
16738
16739
16740# Check whether --with-liblzma-prefix was given.
16741if test "${with_liblzma_prefix+set}" = set; then :
16742 withval=$with_liblzma_prefix;
16743 if test "X$withval" = "Xno"; then
16744 use_additional=no
16745 else
16746 if test "X$withval" = "X"; then
16747
16748 acl_save_prefix="$prefix"
16749 prefix="$acl_final_prefix"
16750 acl_save_exec_prefix="$exec_prefix"
16751 exec_prefix="$acl_final_exec_prefix"
16752
16753 eval additional_includedir=\"$includedir\"
16754 eval additional_libdir=\"$libdir\"
16755
16756 exec_prefix="$acl_save_exec_prefix"
16757 prefix="$acl_save_prefix"
16758
16759 else
16760 additional_includedir="$withval/include"
16761 additional_libdir="$withval/lib"
16762 fi
16763 fi
16764
16765fi
16766
9f1528a1
AB
16767
16768# Check whether --with-liblzma-type was given.
16769if test "${with_liblzma_type+set}" = set; then :
16770 withval=$with_liblzma_type; with_liblzma_type=$withval
16771else
16772 with_liblzma_type=auto
16773fi
16774
16775 lib_type=`eval echo \$with_liblzma_type`
16776
608e2dbb
TT
16777 LIBLZMA=
16778 LTLIBLZMA=
16779 INCLZMA=
16780 rpathdirs=
16781 ltrpathdirs=
16782 names_already_handled=
16783 names_next_round='lzma '
16784 while test -n "$names_next_round"; do
16785 names_this_round="$names_next_round"
16786 names_next_round=
16787 for name in $names_this_round; do
16788 already_handled=
16789 for n in $names_already_handled; do
16790 if test "$n" = "$name"; then
16791 already_handled=yes
16792 break
16793 fi
16794 done
16795 if test -z "$already_handled"; then
16796 names_already_handled="$names_already_handled $name"
16797 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16798 eval value=\"\$HAVE_LIB$uppername\"
16799 if test -n "$value"; then
16800 if test "$value" = yes; then
16801 eval value=\"\$LIB$uppername\"
16802 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16803 eval value=\"\$LTLIB$uppername\"
16804 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16805 else
16806 :
16807 fi
16808 else
16809 found_dir=
16810 found_la=
16811 found_so=
16812 found_a=
16813 if test $use_additional = yes; then
9f1528a1 16814 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
16815 found_dir="$additional_libdir"
16816 found_so="$additional_libdir/lib$name.$shlibext"
16817 if test -f "$additional_libdir/lib$name.la"; then
16818 found_la="$additional_libdir/lib$name.la"
16819 fi
9f1528a1 16820 elif test x$lib_type != xshared; then
608e2dbb
TT
16821 if test -f "$additional_libdir/lib$name.$libext"; then
16822 found_dir="$additional_libdir"
16823 found_a="$additional_libdir/lib$name.$libext"
16824 if test -f "$additional_libdir/lib$name.la"; then
16825 found_la="$additional_libdir/lib$name.la"
16826 fi
16827 fi
16828 fi
16829 fi
16830 if test "X$found_dir" = "X"; then
16831 for x in $LDFLAGS $LTLIBLZMA; do
16832
16833 acl_save_prefix="$prefix"
16834 prefix="$acl_final_prefix"
16835 acl_save_exec_prefix="$exec_prefix"
16836 exec_prefix="$acl_final_exec_prefix"
16837 eval x=\"$x\"
16838 exec_prefix="$acl_save_exec_prefix"
16839 prefix="$acl_save_prefix"
16840
16841 case "$x" in
16842 -L*)
16843 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 16844 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
16845 found_dir="$dir"
16846 found_so="$dir/lib$name.$shlibext"
16847 if test -f "$dir/lib$name.la"; then
16848 found_la="$dir/lib$name.la"
16849 fi
9f1528a1 16850 elif test x$lib_type != xshared; then
608e2dbb
TT
16851 if test -f "$dir/lib$name.$libext"; then
16852 found_dir="$dir"
16853 found_a="$dir/lib$name.$libext"
16854 if test -f "$dir/lib$name.la"; then
16855 found_la="$dir/lib$name.la"
16856 fi
16857 fi
16858 fi
16859 ;;
16860 esac
16861 if test "X$found_dir" != "X"; then
16862 break
16863 fi
16864 done
16865 fi
16866 if test "X$found_dir" != "X"; then
16867 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16868 if test "X$found_so" != "X"; then
16869 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16870 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16871 else
16872 haveit=
16873 for x in $ltrpathdirs; do
16874 if test "X$x" = "X$found_dir"; then
16875 haveit=yes
16876 break
16877 fi
16878 done
16879 if test -z "$haveit"; then
16880 ltrpathdirs="$ltrpathdirs $found_dir"
16881 fi
16882 if test "$hardcode_direct" = yes; then
16883 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16884 else
16885 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16886 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16887 haveit=
16888 for x in $rpathdirs; do
16889 if test "X$x" = "X$found_dir"; then
16890 haveit=yes
16891 break
16892 fi
16893 done
16894 if test -z "$haveit"; then
16895 rpathdirs="$rpathdirs $found_dir"
16896 fi
16897 else
16898 haveit=
16899 for x in $LDFLAGS $LIBLZMA; do
16900
16901 acl_save_prefix="$prefix"
16902 prefix="$acl_final_prefix"
16903 acl_save_exec_prefix="$exec_prefix"
16904 exec_prefix="$acl_final_exec_prefix"
16905 eval x=\"$x\"
16906 exec_prefix="$acl_save_exec_prefix"
16907 prefix="$acl_save_prefix"
16908
16909 if test "X$x" = "X-L$found_dir"; then
16910 haveit=yes
16911 break
16912 fi
16913 done
16914 if test -z "$haveit"; then
16915 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16916 fi
16917 if test "$hardcode_minus_L" != no; then
16918 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16919 else
16920 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16921 fi
16922 fi
16923 fi
16924 fi
16925 else
16926 if test "X$found_a" != "X"; then
16927 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16928 else
16929 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16930 fi
16931 fi
16932 additional_includedir=
16933 case "$found_dir" in
16934 */lib | */lib/)
16935 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16936 additional_includedir="$basedir/include"
16937 ;;
16938 esac
16939 if test "X$additional_includedir" != "X"; then
16940 if test "X$additional_includedir" != "X/usr/include"; then
16941 haveit=
16942 if test "X$additional_includedir" = "X/usr/local/include"; then
16943 if test -n "$GCC"; then
16944 case $host_os in
16945 linux*) haveit=yes;;
16946 esac
16947 fi
16948 fi
16949 if test -z "$haveit"; then
16950 for x in $CPPFLAGS $INCLZMA; do
16951
16952 acl_save_prefix="$prefix"
16953 prefix="$acl_final_prefix"
16954 acl_save_exec_prefix="$exec_prefix"
16955 exec_prefix="$acl_final_exec_prefix"
16956 eval x=\"$x\"
16957 exec_prefix="$acl_save_exec_prefix"
16958 prefix="$acl_save_prefix"
16959
16960 if test "X$x" = "X-I$additional_includedir"; then
16961 haveit=yes
16962 break
16963 fi
16964 done
16965 if test -z "$haveit"; then
16966 if test -d "$additional_includedir"; then
16967 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16968 fi
16969 fi
16970 fi
16971 fi
16972 fi
16973 if test -n "$found_la"; then
16974 save_libdir="$libdir"
16975 case "$found_la" in
16976 */* | *\\*) . "$found_la" ;;
16977 *) . "./$found_la" ;;
16978 esac
16979 libdir="$save_libdir"
16980 for dep in $dependency_libs; do
16981 case "$dep" in
16982 -L*)
16983 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16984 if test "X$additional_libdir" != "X/usr/lib"; then
16985 haveit=
16986 if test "X$additional_libdir" = "X/usr/local/lib"; then
16987 if test -n "$GCC"; then
16988 case $host_os in
16989 linux*) haveit=yes;;
16990 esac
16991 fi
16992 fi
16993 if test -z "$haveit"; then
16994 haveit=
16995 for x in $LDFLAGS $LIBLZMA; do
16996
16997 acl_save_prefix="$prefix"
16998 prefix="$acl_final_prefix"
16999 acl_save_exec_prefix="$exec_prefix"
17000 exec_prefix="$acl_final_exec_prefix"
17001 eval x=\"$x\"
17002 exec_prefix="$acl_save_exec_prefix"
17003 prefix="$acl_save_prefix"
17004
17005 if test "X$x" = "X-L$additional_libdir"; then
17006 haveit=yes
17007 break
17008 fi
17009 done
17010 if test -z "$haveit"; then
17011 if test -d "$additional_libdir"; then
17012 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17013 fi
17014 fi
17015 haveit=
17016 for x in $LDFLAGS $LTLIBLZMA; do
17017
17018 acl_save_prefix="$prefix"
17019 prefix="$acl_final_prefix"
17020 acl_save_exec_prefix="$exec_prefix"
17021 exec_prefix="$acl_final_exec_prefix"
17022 eval x=\"$x\"
17023 exec_prefix="$acl_save_exec_prefix"
17024 prefix="$acl_save_prefix"
17025
17026 if test "X$x" = "X-L$additional_libdir"; then
17027 haveit=yes
17028 break
17029 fi
17030 done
17031 if test -z "$haveit"; then
17032 if test -d "$additional_libdir"; then
17033 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17034 fi
17035 fi
17036 fi
17037 fi
17038 ;;
17039 -R*)
17040 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17041 if test "$enable_rpath" != no; then
17042 haveit=
17043 for x in $rpathdirs; do
17044 if test "X$x" = "X$dir"; then
17045 haveit=yes
17046 break
17047 fi
17048 done
17049 if test -z "$haveit"; then
17050 rpathdirs="$rpathdirs $dir"
17051 fi
17052 haveit=
17053 for x in $ltrpathdirs; do
17054 if test "X$x" = "X$dir"; then
17055 haveit=yes
17056 break
17057 fi
17058 done
17059 if test -z "$haveit"; then
17060 ltrpathdirs="$ltrpathdirs $dir"
17061 fi
17062 fi
17063 ;;
17064 -l*)
17065 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17066 ;;
17067 *.la)
17068 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17069 ;;
17070 *)
17071 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17072 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17073 ;;
17074 esac
17075 done
17076 fi
17077 else
9f1528a1
AB
17078 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17079 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17080 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17081 else
17082 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17083 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17084 fi
608e2dbb
TT
17085 fi
17086 fi
17087 fi
17088 done
17089 done
17090 if test "X$rpathdirs" != "X"; then
17091 if test -n "$hardcode_libdir_separator"; then
17092 alldirs=
17093 for found_dir in $rpathdirs; do
17094 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17095 done
17096 acl_save_libdir="$libdir"
17097 libdir="$alldirs"
17098 eval flag=\"$hardcode_libdir_flag_spec\"
17099 libdir="$acl_save_libdir"
17100 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17101 else
17102 for found_dir in $rpathdirs; do
17103 acl_save_libdir="$libdir"
17104 libdir="$found_dir"
17105 eval flag=\"$hardcode_libdir_flag_spec\"
17106 libdir="$acl_save_libdir"
17107 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17108 done
17109 fi
17110 fi
17111 if test "X$ltrpathdirs" != "X"; then
17112 for found_dir in $ltrpathdirs; do
17113 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17114 done
17115 fi
17116
17117
17118 ac_save_CPPFLAGS="$CPPFLAGS"
17119
17120 for element in $INCLZMA; do
17121 haveit=
17122 for x in $CPPFLAGS; do
17123
17124 acl_save_prefix="$prefix"
17125 prefix="$acl_final_prefix"
17126 acl_save_exec_prefix="$exec_prefix"
17127 exec_prefix="$acl_final_exec_prefix"
17128 eval x=\"$x\"
17129 exec_prefix="$acl_save_exec_prefix"
17130 prefix="$acl_save_prefix"
17131
17132 if test "X$x" = "X$element"; then
17133 haveit=yes
17134 break
17135 fi
17136 done
17137 if test -z "$haveit"; then
17138 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17139 fi
17140 done
17141
17142
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17144$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17145if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17146 $as_echo_n "(cached) " >&6
17147else
17148
17149 ac_save_LIBS="$LIBS"
17150 LIBS="$LIBS $LIBLZMA"
17151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17152/* end confdefs.h. */
17153#include "lzma.h"
17154int
17155main ()
17156{
17157lzma_index_iter iter;
17158 lzma_index_iter_init (&iter, 0);
17159 lzma_mf_is_supported (LZMA_MF_HC3);
17160 ;
17161 return 0;
17162}
17163_ACEOF
17164if ac_fn_c_try_link "$LINENO"; then :
17165 ac_cv_liblzma=yes
17166else
17167 ac_cv_liblzma=no
17168fi
17169rm -f core conftest.err conftest.$ac_objext \
17170 conftest$ac_exeext conftest.$ac_ext
17171 LIBS="$ac_save_LIBS"
17172
17173fi
17174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17175$as_echo "$ac_cv_liblzma" >&6; }
17176 if test "$ac_cv_liblzma" = yes; then
17177 HAVE_LIBLZMA=yes
17178
17179$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17180
17181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17182$as_echo_n "checking how to link with liblzma... " >&6; }
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17184$as_echo "$LIBLZMA" >&6; }
17185 else
17186 HAVE_LIBLZMA=no
17187 CPPFLAGS="$ac_save_CPPFLAGS"
17188 LIBLZMA=
17189 LTLIBLZMA=
17190 fi
17191
17192
17193
17194
17195
17196
17197 if test "$HAVE_LIBLZMA" != yes; then
17198 if test "$with_lzma" = yes; then
d0ac1c44 17199 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17200 fi
17201 fi
17202 fi
17203fi
17204
3fc11d3e
JM
17205LIBGUI="../libgui/src/libgui.a"
17206GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17207
17208
7a292a7a 17209
3fc11d3e
JM
17210WIN32LDAPP=
17211
17212
17213
d91670b9 17214case "${host}" in
686a5eed 17215*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17216 configdir="win"
17217 ;;
17218*)
17219 configdir="unix"
17220 ;;
17221esac
3fc11d3e
JM
17222
17223GDBTKLIBS=
17224if test "${enable_gdbtk}" = "yes"; then
17225
d1c3b63a
KS
17226 # Gdbtk must have an absolute path to srcdir in order to run
17227 # properly when not installed.
17228 here=`pwd`
17229 cd ${srcdir}
17230 GDBTK_SRC_DIR=`pwd`
17231 cd $here
17232
bec39cab 17233
5062cc19
KS
17234 #
17235 # Ok, lets find the tcl configuration
17236 # First, look for one uninstalled.
17237 # the alternative search directory is invoked by --with-tcl
17238 #
3fc11d3e 17239
5062cc19
KS
17240 if test x"${no_tcl}" = x ; then
17241 # we reset no_tcl in case something fails here
17242 no_tcl=true
bec39cab 17243
81ecdfbb
RW
17244# Check whether --with-tcl was given.
17245if test "${with_tcl+set}" = set; then :
17246 withval=$with_tcl; with_tclconfig=${withval}
17247fi
17248
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17250$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17251 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17252 $as_echo_n "(cached) " >&6
3fc11d3e 17253else
bec39cab 17254
3fc11d3e 17255
5062cc19
KS
17256 # First check to see if --with-tcl was specified.
17257 case "${host}" in
17258 *-*-cygwin*) platDir="win" ;;
17259 *) platDir="unix" ;;
17260 esac
17261 if test x"${with_tclconfig}" != x ; then
17262 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17263 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17264 else
d0ac1c44 17265 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17266 fi
17267 fi
17268
17269 # then check for a private Tcl installation
17270 if test x"${ac_cv_c_tclconfig}" = x ; then
17271 for i in \
17272 ../tcl \
17273 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17274 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17275 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17276 ../../tcl \
17277 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17278 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17279 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17280 ../../../tcl \
17281 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17282 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17283 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17284 if test -f "$i/$platDir/tclConfig.sh" ; then
17285 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17286 break
17287 fi
17288 done
17289 fi
17290
17291 # on Darwin, check in Framework installation locations
17292 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17293 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17294 `ls -d /Library/Frameworks 2>/dev/null` \
17295 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17296 `ls -d /System/Library/Frameworks 2>/dev/null` \
17297 ; do
17298 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17299 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17300 break
17301 fi
17302 done
17303 fi
17304
17305 # check in a few common install locations
17306 if test x"${ac_cv_c_tclconfig}" = x ; then
17307 for i in `ls -d ${libdir} 2>/dev/null` \
17308 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17309 `ls -d ${prefix}/lib 2>/dev/null` \
17310 `ls -d /usr/local/lib 2>/dev/null` \
17311 `ls -d /usr/contrib/lib 2>/dev/null` \
17312 `ls -d /usr/lib 2>/dev/null` \
17313 ; do
17314 if test -f "$i/tclConfig.sh" ; then
17315 ac_cv_c_tclconfig=`(cd $i; pwd)`
17316 break
17317 fi
17318 done
17319 fi
3fc11d3e 17320
5062cc19
KS
17321 # check in a few other private locations
17322 if test x"${ac_cv_c_tclconfig}" = x ; then
17323 for i in \
17324 ${srcdir}/../tcl \
17325 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17326 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17327 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17328 if test -f "$i/$platDir/tclConfig.sh" ; then
17329 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17330 break
17331 fi
17332 done
17333 fi
bec39cab 17334
3fc11d3e
JM
17335fi
17336
5062cc19
KS
17337
17338 if test x"${ac_cv_c_tclconfig}" = x ; then
17339 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17341$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17342 else
17343 no_tcl=
17344 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17346$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17347 fi
17348 fi
3fc11d3e 17349
bec39cab 17350
85541719
DE
17351 # If $no_tk is nonempty, then we can't do Tk, and there is no
17352 # point to doing Tcl.
bec39cab 17353
5062cc19
KS
17354 #
17355 # Ok, lets find the tk configuration
17356 # First, look for one uninstalled.
17357 # the alternative search directory is invoked by --with-tk
17358 #
3fc11d3e 17359
5062cc19
KS
17360 if test x"${no_tk}" = x ; then
17361 # we reset no_tk in case something fails here
17362 no_tk=true
bec39cab 17363
81ecdfbb
RW
17364# Check whether --with-tk was given.
17365if test "${with_tk+set}" = set; then :
17366 withval=$with_tk; with_tkconfig=${withval}
17367fi
17368
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17370$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17371 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17372 $as_echo_n "(cached) " >&6
bec39cab 17373else
3fc11d3e
JM
17374
17375
5062cc19
KS
17376 # First check to see if --with-tkconfig was specified.
17377 if test x"${with_tkconfig}" != x ; then
17378 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17379 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17380 else
d0ac1c44 17381 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17382 fi
17383 fi
3fc11d3e 17384
5062cc19
KS
17385 # then check for a private Tk library
17386 case "${host}" in
17387 *-*-cygwin*) platDir="win" ;;
17388 *) platDir="unix" ;;
17389 esac
17390 if test x"${ac_cv_c_tkconfig}" = x ; then
17391 for i in \
17392 ../tk \
17393 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17394 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17395 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17396 ../../tk \
17397 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17398 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17399 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17400 ../../../tk \
17401 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17402 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17403 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17404 if test -f "$i/$platDir/tkConfig.sh" ; then
17405 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17406 break
17407 fi
17408 done
17409 fi
17410
17411 # on Darwin, check in Framework installation locations
17412 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17413 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17414 `ls -d /Library/Frameworks 2>/dev/null` \
17415 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17416 `ls -d /System/Library/Frameworks 2>/dev/null` \
17417 ; do
17418 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17419 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17420 break
17421 fi
17422 done
17423 fi
17424
17425 # check in a few common install locations
17426 if test x"${ac_cv_c_tkconfig}" = x ; then
17427 for i in `ls -d ${libdir} 2>/dev/null` \
17428 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17429 `ls -d ${prefix}/lib 2>/dev/null` \
17430 `ls -d /usr/local/lib 2>/dev/null` \
17431 `ls -d /usr/contrib/lib 2>/dev/null` \
17432 `ls -d /usr/lib 2>/dev/null` \
17433 ; do
17434 if test -f "$i/tkConfig.sh" ; then
17435 ac_cv_c_tkconfig=`(cd $i; pwd)`
17436 break
17437 fi
17438 done
17439 fi
17440 # check in a few other private locations
17441 if test x"${ac_cv_c_tkconfig}" = x ; then
17442 for i in \
17443 ${srcdir}/../tk \
17444 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17445 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17446 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17447 if test -f "$i/$platDir/tkConfig.sh" ; then
17448 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17449 break
17450 fi
17451 done
17452 fi
3fc11d3e 17453
3fc11d3e
JM
17454fi
17455
17456
5062cc19
KS
17457 if test x"${ac_cv_c_tkconfig}" = x ; then
17458 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17460$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17461 else
17462 no_tk=
17463 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17465$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17466 fi
3fc11d3e 17467 fi
dd2504ab 17468
dd2504ab 17469
85541719
DE
17470 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17471
81ecdfbb
RW
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17473$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17474
17475 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17477$as_echo "loading" >&6; }
85541719
DE
17478 . ${TCL_BIN_DIR}/tclConfig.sh
17479 else
81ecdfbb
RW
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17481$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17482 fi
17483
17484 # eval is required to do the TCL_DBGX substitution
17485 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17486 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17487
17488 # If the TCL_BIN_DIR is the build directory (not the install directory),
17489 # then set the common variable name to the value of the build variables.
17490 # For example, the variable TCL_LIB_SPEC will be set to the value
17491 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17492 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17493 # installed and uninstalled version of Tcl.
17494 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17495 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17496 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17497 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17498 elif test "`uname -s`" = "Darwin"; then
17499 # If Tcl was built as a framework, attempt to use the libraries
17500 # from the framework at the given location so that linking works
a68ffae9 17501 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17502 case ${TCL_DEFS} in
17503 *TCL_FRAMEWORK*)
17504 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17505 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17506 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17507 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17508 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17509 break
17510 fi
17511 done
17512 fi
17513 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17514 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17515 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17516 fi
17517 ;;
17518 esac
17519 fi
17520
17521 # eval is required to do the TCL_DBGX substitution
17522 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17523 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17524 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17525 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541 # Check for in-tree tcl
17542 here=`pwd`
17543 cd ${srcdir}/..
17544 topdir=`pwd`
17545 cd ${here}
17546
17547 intree="no"
17548 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17549 intree="yes"
17550 fi
17551
17552 # Find Tcl private headers
17553 if test x"${intree}" = xno; then
17554
81ecdfbb
RW
17555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17556$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17557 private_dir=""
17558 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17559 if test -f ${dir}/tclInt.h ; then
17560 private_dir=${dir}
17561 fi
17562
17563 if test x"${private_dir}" = x; then
d0ac1c44 17564 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17565 else
17566 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17568$as_echo "${private_dir}" >&6; }
85541719
DE
17569 fi
17570
17571 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17572 TCL_LIBRARY="${TCL_LIB_SPEC}"
17573 TCL_DEPS=""
17574 else
17575 # If building tcl in the same src tree, private headers
17576 # are not needed, but we need to be sure to use the right
17577 # headers library
17578 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17579 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17580 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17581 fi
17582
17583
17584
17585
17586
81ecdfbb
RW
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17588$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17589
5062cc19 17590 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17592$as_echo "loading" >&6; }
5062cc19 17593 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17594 else
81ecdfbb
RW
17595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17596$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17597 fi
bec39cab 17598
5062cc19
KS
17599 # eval is required to do the TK_DBGX substitution
17600 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17601 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17602
17603 # If the TK_BIN_DIR is the build directory (not the install directory),
17604 # then set the common variable name to the value of the build variables.
17605 # For example, the variable TK_LIB_SPEC will be set to the value
17606 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17607 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17608 # installed and uninstalled version of Tcl.
85541719 17609 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17610 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17611 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17612 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17613 elif test "`uname -s`" = "Darwin"; then
17614 # If Tk was built as a framework, attempt to use the libraries
17615 # from the framework at the given location so that linking works
a68ffae9 17616 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17617 case ${TK_DEFS} in
17618 *TK_FRAMEWORK*)
85541719 17619 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17620 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17621 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17622 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17623 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17624 break
17625 fi
17626 done
17627 fi
85541719 17628 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17629 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17630 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17631 fi
17632 ;;
17633 esac
3fc11d3e
JM
17634 fi
17635
5062cc19
KS
17636 # eval is required to do the TK_DBGX substitution
17637 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17638 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17639 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17640 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17641
3fc11d3e
JM
17642
17643
bec39cab
AC
17644
17645
17646
17647
17648
17649
17650
3fc11d3e 17651
3fc11d3e 17652
bec39cab 17653
bec39cab 17654
85541719
DE
17655 # Check for in-tree Tk
17656 intree="no"
17657 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17658 intree="yes"
17659 fi
3fc11d3e 17660
85541719
DE
17661 # Find Tk private headers
17662 if test x"${intree}" = xno; then
3fc11d3e 17663
81ecdfbb
RW
17664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17665$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17666 private_dir=""
17667 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17668 if test -f ${dir}/tkInt.h; then
17669 private_dir=${dir}
3fc11d3e 17670 fi
bec39cab 17671
5062cc19 17672 if test x"${private_dir}" = x; then
d0ac1c44 17673 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17674 else
5062cc19 17675 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17677$as_echo "${private_dir}" >&6; }
3fc11d3e 17678 fi
3fc11d3e 17679
85541719
DE
17680 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17681 TK_LIBRARY=${TK_LIB_SPEC}
17682 TK_DEPS=""
17683 else
17684 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17685 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17686 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17687 fi
3fc11d3e
JM
17688
17689
3fc11d3e
JM
17690
17691
3fc11d3e 17692
85541719 17693 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17694
85541719
DE
17695 # Include some libraries that Tcl and Tk want.
17696 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17697 # Yes, the ordering seems wrong here. But it isn't.
17698 # TK_LIBS is the list of libraries that need to be linked
17699 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17700 # were in LIBS then any link tests after this point would
17701 # try to include things like `$(LIBGUI)', which wouldn't work.
17702 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17703
85541719
DE
17704 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17705 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17706 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17707 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17708 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17709 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17710 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17711
0ad6b8ee 17712 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17713 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17714 WIN32LDAPP="-Wl,--subsystem,console"
17715 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17716 fi
ffc6a242 17717
81ecdfbb 17718 subdirs="$subdirs gdbtk"
3ace7edb 17719
85541719 17720 fi
3fc11d3e
JM
17721fi
17722
17723
17724
17725
17726
17727
17728
17729
81ecdfbb
RW
17730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17731$as_echo_n "checking for X... " >&6; }
bec39cab 17732
c906108c 17733
81ecdfbb
RW
17734# Check whether --with-x was given.
17735if test "${with_x+set}" = set; then :
17736 withval=$with_x;
17737fi
c906108c
SS
17738
17739# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17740if test "x$with_x" = xno; then
17741 # The user explicitly disabled X.
17742 have_x=disabled
17743else
81ecdfbb 17744 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17745 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17746 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17747 $as_echo_n "(cached) " >&6
c906108c
SS
17748else
17749 # One or both of the vars are not set, and there is no cached value.
bec39cab 17750ac_x_includes=no ac_x_libraries=no
81ecdfbb 17751rm -f -r conftest.dir
bec39cab
AC
17752if mkdir conftest.dir; then
17753 cd conftest.dir
bec39cab 17754 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17755incroot:
17756 @echo incroot='${INCROOT}'
17757usrlibdir:
17758 @echo usrlibdir='${USRLIBDIR}'
17759libdir:
17760 @echo libdir='${LIBDIR}'
17761_ACEOF
17762 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17763 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17764 for ac_var in incroot usrlibdir libdir; do
17765 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17766 done
c906108c 17767 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17768 for ac_extension in a so sl dylib la dll; do
17769 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17770 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17771 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17772 fi
17773 done
17774 # Screen out bogus values from the imake configuration. They are
17775 # bogus both because they are the default anyway, and because
17776 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17777 case $ac_im_incroot in
81ecdfbb 17778 /usr/include) ac_x_includes= ;;
bec39cab 17779 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17780 esac
bec39cab 17781 case $ac_im_usrlibdir in
81ecdfbb 17782 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17783 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17784 esac
17785 fi
17786 cd ..
81ecdfbb 17787 rm -f -r conftest.dir
c906108c
SS
17788fi
17789
bec39cab
AC
17790# Standard set of common directories for X headers.
17791# Check X11 before X11Rn because it is often a symlink to the current release.
17792ac_x_header_dirs='
17793/usr/X11/include
81ecdfbb 17794/usr/X11R7/include
bec39cab
AC
17795/usr/X11R6/include
17796/usr/X11R5/include
17797/usr/X11R4/include
17798
17799/usr/include/X11
81ecdfbb 17800/usr/include/X11R7
bec39cab
AC
17801/usr/include/X11R6
17802/usr/include/X11R5
17803/usr/include/X11R4
17804
17805/usr/local/X11/include
81ecdfbb 17806/usr/local/X11R7/include
bec39cab
AC
17807/usr/local/X11R6/include
17808/usr/local/X11R5/include
17809/usr/local/X11R4/include
17810
17811/usr/local/include/X11
81ecdfbb 17812/usr/local/include/X11R7
bec39cab
AC
17813/usr/local/include/X11R6
17814/usr/local/include/X11R5
17815/usr/local/include/X11R4
17816
17817/usr/X386/include
17818/usr/x386/include
17819/usr/XFree86/include/X11
17820
17821/usr/include
17822/usr/local/include
17823/usr/unsupported/include
17824/usr/athena/include
17825/usr/local/x11r5/include
17826/usr/lpp/Xamples/include
17827
17828/usr/openwin/include
17829/usr/openwin/share/include'
17830
17831if test "$ac_x_includes" = no; then
81ecdfbb 17832 # Guess where to find include files, by looking for Xlib.h.
c906108c 17833 # First, try using that file with no special directory specified.
81ecdfbb 17834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17835/* end confdefs.h. */
81ecdfbb 17836#include <X11/Xlib.h>
bec39cab 17837_ACEOF
81ecdfbb 17838if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17839 # We can compile using X headers with no special include directory.
17840ac_x_includes=
17841else
bec39cab 17842 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17843 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17844 ac_x_includes=$ac_dir
17845 break
17846 fi
17847done
c906108c 17848fi
d0ac1c44 17849rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17850fi # $ac_x_includes = no
c906108c 17851
bec39cab 17852if test "$ac_x_libraries" = no; then
c906108c 17853 # Check for the libraries.
c906108c
SS
17854 # See if we find them without any special options.
17855 # Don't add to $LIBS permanently.
bec39cab 17856 ac_save_LIBS=$LIBS
81ecdfbb
RW
17857 LIBS="-lX11 $LIBS"
17858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17859/* end confdefs.h. */
81ecdfbb 17860#include <X11/Xlib.h>
bec39cab
AC
17861int
17862main ()
17863{
81ecdfbb 17864XrmInitialize ()
bec39cab
AC
17865 ;
17866 return 0;
17867}
17868_ACEOF
81ecdfbb 17869if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17870 LIBS=$ac_save_LIBS
c906108c
SS
17871# We can link X programs with no special library path.
17872ac_x_libraries=
17873else
81ecdfbb
RW
17874 LIBS=$ac_save_LIBS
17875for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17876do
bec39cab 17877 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17878 for ac_extension in a so sl dylib la dll; do
17879 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17880 ac_x_libraries=$ac_dir
17881 break 2
17882 fi
17883 done
17884done
17885fi
81ecdfbb
RW
17886rm -f core conftest.err conftest.$ac_objext \
17887 conftest$ac_exeext conftest.$ac_ext
bec39cab 17888fi # $ac_x_libraries = no
c906108c 17889
81ecdfbb
RW
17890case $ac_x_includes,$ac_x_libraries in #(
17891 no,* | *,no | *\'*)
17892 # Didn't find X, or a directory has "'" in its name.
17893 ac_cv_have_x="have_x=no";; #(
17894 *)
17895 # Record where we found X for the cache.
17896 ac_cv_have_x="have_x=yes\
17897 ac_x_includes='$ac_x_includes'\
17898 ac_x_libraries='$ac_x_libraries'"
17899esac
c906108c 17900fi
81ecdfbb
RW
17901;; #(
17902 *) have_x=yes;;
17903 esac
c906108c
SS
17904 eval "$ac_cv_have_x"
17905fi # $with_x != no
17906
17907if test "$have_x" != yes; then
81ecdfbb
RW
17908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17909$as_echo "$have_x" >&6; }
c906108c
SS
17910 no_x=yes
17911else
17912 # If each of the values was on the command line, it overrides each guess.
17913 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17914 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17915 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17916 ac_cv_have_x="have_x=yes\
17917 ac_x_includes='$x_includes'\
17918 ac_x_libraries='$x_libraries'"
17919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17920$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17921fi
17922
17923
bec39cab 17924# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17925# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17926# This code just checks for a few cases where we'd like to ignore those
17927# definitions, even when they're present in the '.mt' file. These cases
17928# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17929# not part of the source tree.
7a292a7a 17930#
81ecdfbb
RW
17931# Check whether --enable-sim was given.
17932if test "${enable_sim+set}" = set; then :
17933 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17934 echo "enableval = ${enableval}";
17935 case "${enableval}" in
17936 yes) ignore_sim=false ;;
17937 no) ignore_sim=true ;;
17938 *) ignore_sim=false ;;
17939 esac
17940else
17941 ignore_sim=false
81ecdfbb
RW
17942fi
17943
7a292a7a
SS
17944
17945if test ! -d "${srcdir}/../sim"; then
17946 ignore_sim=true
17947fi
17948
9b624dbe
UW
17949SIM=
17950SIM_OBS=
17951if test "${ignore_sim}" = "false"; then
17952 if test x"${gdb_sim}" != x ; then
17953 SIM="${gdb_sim}"
17954 SIM_OBS="remote-sim.o"
60ca704f 17955
81ecdfbb 17956$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17957
976102cd
PA
17958
17959 # Some tdep code should only be compiled in when the ppc sim is
17960 # built. PR sim/13418.
17961 case $target in
17962 powerpc*-*-*)
17963
17964$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17965
17966 ;;
17967 esac
9b624dbe 17968 fi
7a292a7a
SS
17969fi
17970
17971
17972
c906108c
SS
17973
17974
17975
17976
17977
17978
dfcd3bfb 17979
e56ac5c3
AC
17980
17981
b3a90332
AC
17982
17983
c35f4ffc 17984# List of host floatformats.
bec39cab
AC
17985
17986cat >>confdefs.h <<_ACEOF
c35f4ffc 17987#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17988_ACEOF
c35f4ffc 17989
bec39cab
AC
17990
17991cat >>confdefs.h <<_ACEOF
c35f4ffc 17992#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17993_ACEOF
17994
c35f4ffc 17995
bec39cab 17996cat >>confdefs.h <<_ACEOF
c35f4ffc 17997#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17998_ACEOF
c35f4ffc
AC
17999
18000
c906108c
SS
18001# target_subdir is used by the testsuite to find the target libraries.
18002target_subdir=
18003if test "${host}" != "${target}"; then
18004 target_subdir="${target_alias}/"
18005fi
18006
18007
21ea5acd 18008# Import nat definitions.
2b351b19 18009nat_makefile_frag=/dev/null
771b4502 18010if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18011 . ${srcdir}/configure.nat
18012 nativefile=$NAT_FILE
c906108c 18013fi
c906108c 18014
c906108c
SS
18015
18016
18017
21ea5acd
SDJ
18018
18019
18020
18021
18022
c906108c
SS
18023
18024
b00a8037 18025if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18026
18027cat >>confdefs.h <<_ACEOF
b00a8037 18028#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18029_ACEOF
b00a8037
DJ
18030
18031fi
18032
393fd4c3
YQ
18033# Check for babeltrace and babeltrace-ctf
18034
18035# Check whether --with-babeltrace was given.
18036if test "${with_babeltrace+set}" = set; then :
18037 withval=$with_babeltrace;
18038else
18039 with_babeltrace=auto
18040fi
18041
18042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18043$as_echo_n "checking whether to use babeltrace... " >&6; }
18044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18045$as_echo "$with_babeltrace" >&6; }
18046
18047if test "x$with_babeltrace" = "xno"; then
18048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18049$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18050else
18051 # Append -Werror to CFLAGS so that configure can catch the warning
18052 # "assignment from incompatible pointer type", which is related to
18053 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18054 # in GDB, while babeltrace 1.0.3 is broken.
18055 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18056 # safe to save and restore CFLAGS here.
18057 saved_CFLAGS=$CFLAGS
18058 CFLAGS="$CFLAGS -Werror"
18059
18060
18061
18062
18063
18064
18065
18066
18067 use_additional=yes
18068
18069 acl_save_prefix="$prefix"
18070 prefix="$acl_final_prefix"
18071 acl_save_exec_prefix="$exec_prefix"
18072 exec_prefix="$acl_final_exec_prefix"
18073
18074 eval additional_includedir=\"$includedir\"
18075 eval additional_libdir=\"$libdir\"
18076
18077 exec_prefix="$acl_save_exec_prefix"
18078 prefix="$acl_save_prefix"
18079
18080
18081# Check whether --with-libbabeltrace-prefix was given.
18082if test "${with_libbabeltrace_prefix+set}" = set; then :
18083 withval=$with_libbabeltrace_prefix;
18084 if test "X$withval" = "Xno"; then
18085 use_additional=no
18086 else
18087 if test "X$withval" = "X"; then
18088
18089 acl_save_prefix="$prefix"
18090 prefix="$acl_final_prefix"
18091 acl_save_exec_prefix="$exec_prefix"
18092 exec_prefix="$acl_final_exec_prefix"
18093
18094 eval additional_includedir=\"$includedir\"
18095 eval additional_libdir=\"$libdir\"
18096
18097 exec_prefix="$acl_save_exec_prefix"
18098 prefix="$acl_save_prefix"
18099
18100 else
18101 additional_includedir="$withval/include"
18102 additional_libdir="$withval/lib"
18103 fi
18104 fi
18105
18106fi
18107
9f1528a1
AB
18108
18109# Check whether --with-libbabeltrace-type was given.
18110if test "${with_libbabeltrace_type+set}" = set; then :
18111 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18112else
18113 with_libbabeltrace_type=auto
18114fi
18115
18116 lib_type=`eval echo \$with_libbabeltrace_type`
18117
393fd4c3
YQ
18118 LIBBABELTRACE=
18119 LTLIBBABELTRACE=
18120 INCBABELTRACE=
18121 rpathdirs=
18122 ltrpathdirs=
18123 names_already_handled=
18124 names_next_round='babeltrace babeltrace-ctf'
18125 while test -n "$names_next_round"; do
18126 names_this_round="$names_next_round"
18127 names_next_round=
18128 for name in $names_this_round; do
18129 already_handled=
18130 for n in $names_already_handled; do
18131 if test "$n" = "$name"; then
18132 already_handled=yes
18133 break
18134 fi
18135 done
18136 if test -z "$already_handled"; then
18137 names_already_handled="$names_already_handled $name"
18138 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18139 eval value=\"\$HAVE_LIB$uppername\"
18140 if test -n "$value"; then
18141 if test "$value" = yes; then
18142 eval value=\"\$LIB$uppername\"
18143 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18144 eval value=\"\$LTLIB$uppername\"
18145 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18146 else
18147 :
18148 fi
18149 else
18150 found_dir=
18151 found_la=
18152 found_so=
18153 found_a=
18154 if test $use_additional = yes; then
9f1528a1 18155 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18156 found_dir="$additional_libdir"
18157 found_so="$additional_libdir/lib$name.$shlibext"
18158 if test -f "$additional_libdir/lib$name.la"; then
18159 found_la="$additional_libdir/lib$name.la"
18160 fi
9f1528a1 18161 elif test x$lib_type != xshared; then
393fd4c3
YQ
18162 if test -f "$additional_libdir/lib$name.$libext"; then
18163 found_dir="$additional_libdir"
18164 found_a="$additional_libdir/lib$name.$libext"
18165 if test -f "$additional_libdir/lib$name.la"; then
18166 found_la="$additional_libdir/lib$name.la"
18167 fi
18168 fi
18169 fi
18170 fi
18171 if test "X$found_dir" = "X"; then
18172 for x in $LDFLAGS $LTLIBBABELTRACE; do
18173
18174 acl_save_prefix="$prefix"
18175 prefix="$acl_final_prefix"
18176 acl_save_exec_prefix="$exec_prefix"
18177 exec_prefix="$acl_final_exec_prefix"
18178 eval x=\"$x\"
18179 exec_prefix="$acl_save_exec_prefix"
18180 prefix="$acl_save_prefix"
18181
18182 case "$x" in
18183 -L*)
18184 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18185 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18186 found_dir="$dir"
18187 found_so="$dir/lib$name.$shlibext"
18188 if test -f "$dir/lib$name.la"; then
18189 found_la="$dir/lib$name.la"
18190 fi
9f1528a1 18191 elif test x$lib_type != xshared; then
393fd4c3
YQ
18192 if test -f "$dir/lib$name.$libext"; then
18193 found_dir="$dir"
18194 found_a="$dir/lib$name.$libext"
18195 if test -f "$dir/lib$name.la"; then
18196 found_la="$dir/lib$name.la"
18197 fi
18198 fi
18199 fi
18200 ;;
18201 esac
18202 if test "X$found_dir" != "X"; then
18203 break
18204 fi
18205 done
18206 fi
18207 if test "X$found_dir" != "X"; then
18208 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18209 if test "X$found_so" != "X"; then
18210 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18211 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18212 else
18213 haveit=
18214 for x in $ltrpathdirs; do
18215 if test "X$x" = "X$found_dir"; then
18216 haveit=yes
18217 break
18218 fi
18219 done
18220 if test -z "$haveit"; then
18221 ltrpathdirs="$ltrpathdirs $found_dir"
18222 fi
18223 if test "$hardcode_direct" = yes; then
18224 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18225 else
18226 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18227 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18228 haveit=
18229 for x in $rpathdirs; do
18230 if test "X$x" = "X$found_dir"; then
18231 haveit=yes
18232 break
18233 fi
18234 done
18235 if test -z "$haveit"; then
18236 rpathdirs="$rpathdirs $found_dir"
18237 fi
18238 else
18239 haveit=
18240 for x in $LDFLAGS $LIBBABELTRACE; do
18241
18242 acl_save_prefix="$prefix"
18243 prefix="$acl_final_prefix"
18244 acl_save_exec_prefix="$exec_prefix"
18245 exec_prefix="$acl_final_exec_prefix"
18246 eval x=\"$x\"
18247 exec_prefix="$acl_save_exec_prefix"
18248 prefix="$acl_save_prefix"
18249
18250 if test "X$x" = "X-L$found_dir"; then
18251 haveit=yes
18252 break
18253 fi
18254 done
18255 if test -z "$haveit"; then
18256 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18257 fi
18258 if test "$hardcode_minus_L" != no; then
18259 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18260 else
18261 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18262 fi
18263 fi
18264 fi
18265 fi
18266 else
18267 if test "X$found_a" != "X"; then
18268 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18269 else
18270 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18271 fi
18272 fi
18273 additional_includedir=
18274 case "$found_dir" in
18275 */lib | */lib/)
18276 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18277 additional_includedir="$basedir/include"
18278 ;;
18279 esac
18280 if test "X$additional_includedir" != "X"; then
18281 if test "X$additional_includedir" != "X/usr/include"; then
18282 haveit=
18283 if test "X$additional_includedir" = "X/usr/local/include"; then
18284 if test -n "$GCC"; then
18285 case $host_os in
18286 linux*) haveit=yes;;
18287 esac
18288 fi
18289 fi
18290 if test -z "$haveit"; then
18291 for x in $CPPFLAGS $INCBABELTRACE; do
18292
18293 acl_save_prefix="$prefix"
18294 prefix="$acl_final_prefix"
18295 acl_save_exec_prefix="$exec_prefix"
18296 exec_prefix="$acl_final_exec_prefix"
18297 eval x=\"$x\"
18298 exec_prefix="$acl_save_exec_prefix"
18299 prefix="$acl_save_prefix"
18300
18301 if test "X$x" = "X-I$additional_includedir"; then
18302 haveit=yes
18303 break
18304 fi
18305 done
18306 if test -z "$haveit"; then
18307 if test -d "$additional_includedir"; then
18308 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18309 fi
18310 fi
18311 fi
18312 fi
18313 fi
18314 if test -n "$found_la"; then
18315 save_libdir="$libdir"
18316 case "$found_la" in
18317 */* | *\\*) . "$found_la" ;;
18318 *) . "./$found_la" ;;
18319 esac
18320 libdir="$save_libdir"
18321 for dep in $dependency_libs; do
18322 case "$dep" in
18323 -L*)
18324 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18325 if test "X$additional_libdir" != "X/usr/lib"; then
18326 haveit=
18327 if test "X$additional_libdir" = "X/usr/local/lib"; then
18328 if test -n "$GCC"; then
18329 case $host_os in
18330 linux*) haveit=yes;;
18331 esac
18332 fi
18333 fi
18334 if test -z "$haveit"; then
18335 haveit=
18336 for x in $LDFLAGS $LIBBABELTRACE; do
18337
18338 acl_save_prefix="$prefix"
18339 prefix="$acl_final_prefix"
18340 acl_save_exec_prefix="$exec_prefix"
18341 exec_prefix="$acl_final_exec_prefix"
18342 eval x=\"$x\"
18343 exec_prefix="$acl_save_exec_prefix"
18344 prefix="$acl_save_prefix"
18345
18346 if test "X$x" = "X-L$additional_libdir"; then
18347 haveit=yes
18348 break
18349 fi
18350 done
18351 if test -z "$haveit"; then
18352 if test -d "$additional_libdir"; then
18353 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18354 fi
18355 fi
18356 haveit=
18357 for x in $LDFLAGS $LTLIBBABELTRACE; do
18358
18359 acl_save_prefix="$prefix"
18360 prefix="$acl_final_prefix"
18361 acl_save_exec_prefix="$exec_prefix"
18362 exec_prefix="$acl_final_exec_prefix"
18363 eval x=\"$x\"
18364 exec_prefix="$acl_save_exec_prefix"
18365 prefix="$acl_save_prefix"
18366
18367 if test "X$x" = "X-L$additional_libdir"; then
18368 haveit=yes
18369 break
18370 fi
18371 done
18372 if test -z "$haveit"; then
18373 if test -d "$additional_libdir"; then
18374 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18375 fi
18376 fi
18377 fi
18378 fi
18379 ;;
18380 -R*)
18381 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18382 if test "$enable_rpath" != no; then
18383 haveit=
18384 for x in $rpathdirs; do
18385 if test "X$x" = "X$dir"; then
18386 haveit=yes
18387 break
18388 fi
18389 done
18390 if test -z "$haveit"; then
18391 rpathdirs="$rpathdirs $dir"
18392 fi
18393 haveit=
18394 for x in $ltrpathdirs; do
18395 if test "X$x" = "X$dir"; then
18396 haveit=yes
18397 break
18398 fi
18399 done
18400 if test -z "$haveit"; then
18401 ltrpathdirs="$ltrpathdirs $dir"
18402 fi
18403 fi
18404 ;;
18405 -l*)
18406 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18407 ;;
18408 *.la)
18409 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18410 ;;
18411 *)
18412 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18413 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18414 ;;
18415 esac
18416 done
18417 fi
18418 else
9f1528a1
AB
18419 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18420 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18421 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18422 else
18423 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18424 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18425 fi
393fd4c3
YQ
18426 fi
18427 fi
18428 fi
18429 done
18430 done
18431 if test "X$rpathdirs" != "X"; then
18432 if test -n "$hardcode_libdir_separator"; then
18433 alldirs=
18434 for found_dir in $rpathdirs; do
18435 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18436 done
18437 acl_save_libdir="$libdir"
18438 libdir="$alldirs"
18439 eval flag=\"$hardcode_libdir_flag_spec\"
18440 libdir="$acl_save_libdir"
18441 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18442 else
18443 for found_dir in $rpathdirs; do
18444 acl_save_libdir="$libdir"
18445 libdir="$found_dir"
18446 eval flag=\"$hardcode_libdir_flag_spec\"
18447 libdir="$acl_save_libdir"
18448 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18449 done
18450 fi
18451 fi
18452 if test "X$ltrpathdirs" != "X"; then
18453 for found_dir in $ltrpathdirs; do
18454 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18455 done
18456 fi
18457
18458
18459 ac_save_CPPFLAGS="$CPPFLAGS"
18460
18461 for element in $INCBABELTRACE; do
18462 haveit=
18463 for x in $CPPFLAGS; do
18464
18465 acl_save_prefix="$prefix"
18466 prefix="$acl_final_prefix"
18467 acl_save_exec_prefix="$exec_prefix"
18468 exec_prefix="$acl_final_exec_prefix"
18469 eval x=\"$x\"
18470 exec_prefix="$acl_save_exec_prefix"
18471 prefix="$acl_save_prefix"
18472
18473 if test "X$x" = "X$element"; then
18474 haveit=yes
18475 break
18476 fi
18477 done
18478 if test -z "$haveit"; then
18479 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18480 fi
18481 done
18482
18483
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18485$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18486if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18487 $as_echo_n "(cached) " >&6
18488else
18489
18490 ac_save_LIBS="$LIBS"
18491 LIBS="$LIBS $LIBBABELTRACE"
18492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18493/* end confdefs.h. */
18494#include <babeltrace/babeltrace.h>
18495 #include <babeltrace/ctf/events.h>
18496 #include <babeltrace/ctf/iterator.h>
18497int
18498main ()
18499{
18500struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18501 struct bt_ctf_event *event = NULL;
18502 const struct bt_definition *scope;
18503
13cdc2af 18504 pos->type = BT_SEEK_BEGIN;
65c749e7 18505 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18506 scope = bt_ctf_get_top_level_scope (event,
18507 BT_STREAM_EVENT_HEADER);
18508 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18509
18510 ;
18511 return 0;
18512}
18513_ACEOF
18514if ac_fn_c_try_link "$LINENO"; then :
18515 ac_cv_libbabeltrace=yes
18516else
18517 ac_cv_libbabeltrace=no
18518fi
18519rm -f core conftest.err conftest.$ac_objext \
18520 conftest$ac_exeext conftest.$ac_ext
18521 LIBS="$ac_save_LIBS"
18522
18523fi
18524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18525$as_echo "$ac_cv_libbabeltrace" >&6; }
18526 if test "$ac_cv_libbabeltrace" = yes; then
18527 HAVE_LIBBABELTRACE=yes
18528
18529$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18530
18531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18532$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18534$as_echo "$LIBBABELTRACE" >&6; }
18535 else
18536 HAVE_LIBBABELTRACE=no
18537 CPPFLAGS="$ac_save_CPPFLAGS"
18538 LIBBABELTRACE=
18539 LTLIBBABELTRACE=
18540 fi
18541
18542
18543
18544
18545
18546
18547 CFLAGS=$saved_CFLAGS
18548
18549 if test "$HAVE_LIBBABELTRACE" != yes; then
18550 if test "$with_babeltrace" = yes; then
d0ac1c44 18551 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18552 else
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18554$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18555 fi
18556 fi
18557fi
18558
ccb1ba62
CB
18559# Check for xxhash
18560
18561# Check whether --with-xxhash was given.
18562if test "${with_xxhash+set}" = set; then :
18563 withval=$with_xxhash;
18564else
18565 with_xxhash=auto
18566fi
18567
18568
1776e3e5
NA
18569 # Check whether --enable-libctf was given.
18570if test "${enable_libctf+set}" = set; then :
18571 enableval=$enable_libctf;
18572 case "$enableval" in
18573 yes|no) ;;
18574 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18575 esac
18576
18577else
18578 enable_libctf=yes
18579fi
18580
18581
18582if test x${enable_static} = xno; then
18583 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18584 CTF_DEPS="../libctf/.libs/libctf.so"
18585else
18586 LIBCTF="../libctf/.libs/libctf.a"
18587 CTF_DEPS="$LIBCTF"
18588fi
18589if test "${enable_libctf}" = yes; then
18590
18591$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18592
18593else
18594 LIBCTF=
18595 CTF_DEPS=
18596fi
18597
18598
18599
18600
18601# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18602# empty version.
18603
ccb1ba62
CB
18604if test "x$with_xxhash" != "xno"; then
18605
18606
18607
18608
18609
18610
18611
18612
18613 use_additional=yes
18614
18615 acl_save_prefix="$prefix"
18616 prefix="$acl_final_prefix"
18617 acl_save_exec_prefix="$exec_prefix"
18618 exec_prefix="$acl_final_exec_prefix"
18619
18620 eval additional_includedir=\"$includedir\"
18621 eval additional_libdir=\"$libdir\"
18622
18623 exec_prefix="$acl_save_exec_prefix"
18624 prefix="$acl_save_prefix"
18625
18626
18627# Check whether --with-libxxhash-prefix was given.
18628if test "${with_libxxhash_prefix+set}" = set; then :
18629 withval=$with_libxxhash_prefix;
18630 if test "X$withval" = "Xno"; then
18631 use_additional=no
18632 else
18633 if test "X$withval" = "X"; then
18634
18635 acl_save_prefix="$prefix"
18636 prefix="$acl_final_prefix"
18637 acl_save_exec_prefix="$exec_prefix"
18638 exec_prefix="$acl_final_exec_prefix"
18639
18640 eval additional_includedir=\"$includedir\"
18641 eval additional_libdir=\"$libdir\"
18642
18643 exec_prefix="$acl_save_exec_prefix"
18644 prefix="$acl_save_prefix"
18645
18646 else
18647 additional_includedir="$withval/include"
18648 additional_libdir="$withval/lib"
18649 fi
18650 fi
18651
18652fi
18653
9f1528a1
AB
18654
18655# Check whether --with-libxxhash-type was given.
18656if test "${with_libxxhash_type+set}" = set; then :
18657 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18658else
18659 with_libxxhash_type=auto
18660fi
18661
18662 lib_type=`eval echo \$with_libxxhash_type`
18663
ccb1ba62
CB
18664 LIBXXHASH=
18665 LTLIBXXHASH=
18666 INCXXHASH=
18667 rpathdirs=
18668 ltrpathdirs=
18669 names_already_handled=
18670 names_next_round='xxhash '
18671 while test -n "$names_next_round"; do
18672 names_this_round="$names_next_round"
18673 names_next_round=
18674 for name in $names_this_round; do
18675 already_handled=
18676 for n in $names_already_handled; do
18677 if test "$n" = "$name"; then
18678 already_handled=yes
18679 break
18680 fi
18681 done
18682 if test -z "$already_handled"; then
18683 names_already_handled="$names_already_handled $name"
18684 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18685 eval value=\"\$HAVE_LIB$uppername\"
18686 if test -n "$value"; then
18687 if test "$value" = yes; then
18688 eval value=\"\$LIB$uppername\"
18689 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18690 eval value=\"\$LTLIB$uppername\"
18691 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18692 else
18693 :
18694 fi
18695 else
18696 found_dir=
18697 found_la=
18698 found_so=
18699 found_a=
18700 if test $use_additional = yes; then
9f1528a1 18701 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18702 found_dir="$additional_libdir"
18703 found_so="$additional_libdir/lib$name.$shlibext"
18704 if test -f "$additional_libdir/lib$name.la"; then
18705 found_la="$additional_libdir/lib$name.la"
18706 fi
9f1528a1 18707 elif test x$lib_type != xshared; then
ccb1ba62
CB
18708 if test -f "$additional_libdir/lib$name.$libext"; then
18709 found_dir="$additional_libdir"
18710 found_a="$additional_libdir/lib$name.$libext"
18711 if test -f "$additional_libdir/lib$name.la"; then
18712 found_la="$additional_libdir/lib$name.la"
18713 fi
18714 fi
18715 fi
18716 fi
18717 if test "X$found_dir" = "X"; then
18718 for x in $LDFLAGS $LTLIBXXHASH; do
18719
18720 acl_save_prefix="$prefix"
18721 prefix="$acl_final_prefix"
18722 acl_save_exec_prefix="$exec_prefix"
18723 exec_prefix="$acl_final_exec_prefix"
18724 eval x=\"$x\"
18725 exec_prefix="$acl_save_exec_prefix"
18726 prefix="$acl_save_prefix"
18727
18728 case "$x" in
18729 -L*)
18730 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18731 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18732 found_dir="$dir"
18733 found_so="$dir/lib$name.$shlibext"
18734 if test -f "$dir/lib$name.la"; then
18735 found_la="$dir/lib$name.la"
18736 fi
9f1528a1 18737 elif test x$lib_type != xshared; then
ccb1ba62
CB
18738 if test -f "$dir/lib$name.$libext"; then
18739 found_dir="$dir"
18740 found_a="$dir/lib$name.$libext"
18741 if test -f "$dir/lib$name.la"; then
18742 found_la="$dir/lib$name.la"
18743 fi
18744 fi
18745 fi
18746 ;;
18747 esac
18748 if test "X$found_dir" != "X"; then
18749 break
18750 fi
18751 done
18752 fi
18753 if test "X$found_dir" != "X"; then
18754 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18755 if test "X$found_so" != "X"; then
18756 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18757 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18758 else
18759 haveit=
18760 for x in $ltrpathdirs; do
18761 if test "X$x" = "X$found_dir"; then
18762 haveit=yes
18763 break
18764 fi
18765 done
18766 if test -z "$haveit"; then
18767 ltrpathdirs="$ltrpathdirs $found_dir"
18768 fi
18769 if test "$hardcode_direct" = yes; then
18770 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18771 else
18772 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18773 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18774 haveit=
18775 for x in $rpathdirs; do
18776 if test "X$x" = "X$found_dir"; then
18777 haveit=yes
18778 break
18779 fi
18780 done
18781 if test -z "$haveit"; then
18782 rpathdirs="$rpathdirs $found_dir"
18783 fi
18784 else
18785 haveit=
18786 for x in $LDFLAGS $LIBXXHASH; do
18787
18788 acl_save_prefix="$prefix"
18789 prefix="$acl_final_prefix"
18790 acl_save_exec_prefix="$exec_prefix"
18791 exec_prefix="$acl_final_exec_prefix"
18792 eval x=\"$x\"
18793 exec_prefix="$acl_save_exec_prefix"
18794 prefix="$acl_save_prefix"
18795
18796 if test "X$x" = "X-L$found_dir"; then
18797 haveit=yes
18798 break
18799 fi
18800 done
18801 if test -z "$haveit"; then
18802 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18803 fi
18804 if test "$hardcode_minus_L" != no; then
18805 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18806 else
18807 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18808 fi
18809 fi
18810 fi
18811 fi
18812 else
18813 if test "X$found_a" != "X"; then
18814 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18815 else
18816 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18817 fi
18818 fi
18819 additional_includedir=
18820 case "$found_dir" in
18821 */lib | */lib/)
18822 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18823 additional_includedir="$basedir/include"
18824 ;;
18825 esac
18826 if test "X$additional_includedir" != "X"; then
18827 if test "X$additional_includedir" != "X/usr/include"; then
18828 haveit=
18829 if test "X$additional_includedir" = "X/usr/local/include"; then
18830 if test -n "$GCC"; then
18831 case $host_os in
18832 linux*) haveit=yes;;
18833 esac
18834 fi
18835 fi
18836 if test -z "$haveit"; then
18837 for x in $CPPFLAGS $INCXXHASH; do
18838
18839 acl_save_prefix="$prefix"
18840 prefix="$acl_final_prefix"
18841 acl_save_exec_prefix="$exec_prefix"
18842 exec_prefix="$acl_final_exec_prefix"
18843 eval x=\"$x\"
18844 exec_prefix="$acl_save_exec_prefix"
18845 prefix="$acl_save_prefix"
18846
18847 if test "X$x" = "X-I$additional_includedir"; then
18848 haveit=yes
18849 break
18850 fi
18851 done
18852 if test -z "$haveit"; then
18853 if test -d "$additional_includedir"; then
18854 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18855 fi
18856 fi
18857 fi
18858 fi
18859 fi
18860 if test -n "$found_la"; then
18861 save_libdir="$libdir"
18862 case "$found_la" in
18863 */* | *\\*) . "$found_la" ;;
18864 *) . "./$found_la" ;;
18865 esac
18866 libdir="$save_libdir"
18867 for dep in $dependency_libs; do
18868 case "$dep" in
18869 -L*)
18870 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18871 if test "X$additional_libdir" != "X/usr/lib"; then
18872 haveit=
18873 if test "X$additional_libdir" = "X/usr/local/lib"; then
18874 if test -n "$GCC"; then
18875 case $host_os in
18876 linux*) haveit=yes;;
18877 esac
18878 fi
18879 fi
18880 if test -z "$haveit"; then
18881 haveit=
18882 for x in $LDFLAGS $LIBXXHASH; do
18883
18884 acl_save_prefix="$prefix"
18885 prefix="$acl_final_prefix"
18886 acl_save_exec_prefix="$exec_prefix"
18887 exec_prefix="$acl_final_exec_prefix"
18888 eval x=\"$x\"
18889 exec_prefix="$acl_save_exec_prefix"
18890 prefix="$acl_save_prefix"
18891
18892 if test "X$x" = "X-L$additional_libdir"; then
18893 haveit=yes
18894 break
18895 fi
18896 done
18897 if test -z "$haveit"; then
18898 if test -d "$additional_libdir"; then
18899 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18900 fi
18901 fi
18902 haveit=
18903 for x in $LDFLAGS $LTLIBXXHASH; do
18904
18905 acl_save_prefix="$prefix"
18906 prefix="$acl_final_prefix"
18907 acl_save_exec_prefix="$exec_prefix"
18908 exec_prefix="$acl_final_exec_prefix"
18909 eval x=\"$x\"
18910 exec_prefix="$acl_save_exec_prefix"
18911 prefix="$acl_save_prefix"
18912
18913 if test "X$x" = "X-L$additional_libdir"; then
18914 haveit=yes
18915 break
18916 fi
18917 done
18918 if test -z "$haveit"; then
18919 if test -d "$additional_libdir"; then
18920 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18921 fi
18922 fi
18923 fi
18924 fi
18925 ;;
18926 -R*)
18927 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18928 if test "$enable_rpath" != no; then
18929 haveit=
18930 for x in $rpathdirs; do
18931 if test "X$x" = "X$dir"; then
18932 haveit=yes
18933 break
18934 fi
18935 done
18936 if test -z "$haveit"; then
18937 rpathdirs="$rpathdirs $dir"
18938 fi
18939 haveit=
18940 for x in $ltrpathdirs; do
18941 if test "X$x" = "X$dir"; then
18942 haveit=yes
18943 break
18944 fi
18945 done
18946 if test -z "$haveit"; then
18947 ltrpathdirs="$ltrpathdirs $dir"
18948 fi
18949 fi
18950 ;;
18951 -l*)
18952 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18953 ;;
18954 *.la)
18955 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18956 ;;
18957 *)
18958 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18959 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18960 ;;
18961 esac
18962 done
18963 fi
18964 else
9f1528a1
AB
18965 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18966 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18967 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18968 else
18969 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
18970 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
18971 fi
ccb1ba62
CB
18972 fi
18973 fi
18974 fi
18975 done
18976 done
18977 if test "X$rpathdirs" != "X"; then
18978 if test -n "$hardcode_libdir_separator"; then
18979 alldirs=
18980 for found_dir in $rpathdirs; do
18981 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18982 done
18983 acl_save_libdir="$libdir"
18984 libdir="$alldirs"
18985 eval flag=\"$hardcode_libdir_flag_spec\"
18986 libdir="$acl_save_libdir"
18987 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18988 else
18989 for found_dir in $rpathdirs; do
18990 acl_save_libdir="$libdir"
18991 libdir="$found_dir"
18992 eval flag=\"$hardcode_libdir_flag_spec\"
18993 libdir="$acl_save_libdir"
18994 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18995 done
18996 fi
18997 fi
18998 if test "X$ltrpathdirs" != "X"; then
18999 for found_dir in $ltrpathdirs; do
19000 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19001 done
19002 fi
19003
19004
19005 ac_save_CPPFLAGS="$CPPFLAGS"
19006
19007 for element in $INCXXHASH; do
19008 haveit=
19009 for x in $CPPFLAGS; do
19010
19011 acl_save_prefix="$prefix"
19012 prefix="$acl_final_prefix"
19013 acl_save_exec_prefix="$exec_prefix"
19014 exec_prefix="$acl_final_exec_prefix"
19015 eval x=\"$x\"
19016 exec_prefix="$acl_save_exec_prefix"
19017 prefix="$acl_save_prefix"
19018
19019 if test "X$x" = "X$element"; then
19020 haveit=yes
19021 break
19022 fi
19023 done
19024 if test -z "$haveit"; then
19025 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19026 fi
19027 done
19028
19029
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19031$as_echo_n "checking for libxxhash... " >&6; }
19032if ${ac_cv_libxxhash+:} false; then :
19033 $as_echo_n "(cached) " >&6
19034else
19035
19036 ac_save_LIBS="$LIBS"
19037 LIBS="$LIBS $LIBXXHASH"
19038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19039/* end confdefs.h. */
19040#include <xxhash.h>
19041int
19042main ()
19043{
19044XXH32("foo", 3, 0);
19045
19046 ;
19047 return 0;
19048}
19049_ACEOF
19050if ac_fn_c_try_link "$LINENO"; then :
19051 ac_cv_libxxhash=yes
19052else
19053 ac_cv_libxxhash=no
19054fi
19055rm -f core conftest.err conftest.$ac_objext \
19056 conftest$ac_exeext conftest.$ac_ext
19057 LIBS="$ac_save_LIBS"
19058
19059fi
19060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19061$as_echo "$ac_cv_libxxhash" >&6; }
19062 if test "$ac_cv_libxxhash" = yes; then
19063 HAVE_LIBXXHASH=yes
19064
19065$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19066
19067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19068$as_echo_n "checking how to link with libxxhash... " >&6; }
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19070$as_echo "$LIBXXHASH" >&6; }
19071 else
19072 HAVE_LIBXXHASH=no
19073 CPPFLAGS="$ac_save_CPPFLAGS"
19074 LIBXXHASH=
19075 LTLIBXXHASH=
19076 fi
19077
19078
19079
19080
19081
19082
19083 if test "$HAVE_LIBXXHASH" != yes; then
19084 if test "$with_xxhash" = yes; then
19085 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19086 fi
19087 fi
19088 if test "x$with_xxhash" = "xauto"; then
19089 with_xxhash="$HAVE_LIBXXHASH"
19090 fi
19091fi
19092
19093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19094$as_echo_n "checking whether to use xxhash... " >&6; }
19095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19096$as_echo "$with_xxhash" >&6; }
19097
a0a461e5 19098NM_H=
c906108c
SS
19099rm -f nm.h
19100if test "${nativefile}" != ""; then
0f475e27
AC
19101 case "${nativefile}" in
19102 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19103 * ) GDB_NM_FILE="${nativefile}"
19104 esac
a0a461e5
TT
19105 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19106
60ca704f
SE
19107
19108cat >>confdefs.h <<_ACEOF
b78960be 19109#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19110_ACEOF
5a2402b8 19111
a0a461e5 19112 NM_H=nm.h
c906108c 19113fi
5a2402b8
AC
19114
19115
a0a461e5 19116
e3487908
GKB
19117for ac_prog in xsltproc
19118do
19119 # Extract the first word of "$ac_prog", so it can be a program name with args.
19120set dummy $ac_prog; ac_word=$2
19121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19122$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19123if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19124 $as_echo_n "(cached) " >&6
19125else
19126 case $XSLTPROC in
19127 [\\/]* | ?:[\\/]*)
19128 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19129 ;;
19130 *)
19131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19132for as_dir in $PATH
19133do
19134 IFS=$as_save_IFS
19135 test -z "$as_dir" && as_dir=.
19136 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19138 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19140 break 2
19141 fi
19142done
19143 done
19144IFS=$as_save_IFS
19145
19146 ;;
19147esac
19148fi
19149XSLTPROC=$ac_cv_path_XSLTPROC
19150if test -n "$XSLTPROC"; then
19151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19152$as_echo "$XSLTPROC" >&6; }
19153else
19154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19155$as_echo "no" >&6; }
19156fi
19157
19158
19159 test -n "$XSLTPROC" && break
19160done
19161test -n "$XSLTPROC" || XSLTPROC="missing"
19162
19163if test "x$USE_MAINTAINER_MODE" = xyes; then
19164 if test "${XSLTPROC}" = missing; then
d0ac1c44 19165 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19166 fi
19167fi
19168
19169
c906108c
SS
19170
19171
c906108c 19172
81ecdfbb 19173$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19174
bec39cab 19175
8ecfd7bd
SDJ
19176
19177# Check whether we will enable the inclusion of unit tests when
19178# compiling GDB.
19179#
19180# The default value of this option changes depending whether we're on
19181# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19182# it's "false"). The $development variable is set by the GDB_AC_COMMON
19183# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19184
19185if test "x$development" != xtrue && test "x$development" != xfalse; then :
19186 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19187fi
19188
8ecfd7bd
SDJ
19189# Check whether --enable-unit-tests was given.
19190if test "${enable_unit_tests+set}" = set; then :
19191 enableval=$enable_unit_tests; case "${enableval}" in
19192 yes) enable_unittests=true ;;
19193 no) enable_unittests=false ;;
19194 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19195esac
19196else
19197 enable_unittests=$development
19198fi
19199
19200
19201if $enable_unittests; then
dcd1f979
TT
19202
19203$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19204
8ecfd7bd 19205
74cd3f9d
SM
19206 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19207 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19208
dcd1f979
TT
19209fi
19210
b292c783 19211
8ecfd7bd 19212
f6a88844
JM
19213 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19214 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19215 if test "x$GDB_TRANSFORM_NAME" = x; then
19216 GDB_TRANSFORM_NAME=gdb
19217 fi
19218
19219
19220
19221 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19222 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19223 if test "x$GCORE_TRANSFORM_NAME" = x; then
19224 GCORE_TRANSFORM_NAME=gcore
19225 fi
19226
b292c783
JK
19227
19228ac_config_files="$ac_config_files gcore"
19229
141ec9f6 19230ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19231
89a34d1b 19232
bec39cab
AC
19233cat >confcache <<\_ACEOF
19234# This file is a shell script that caches the results of configure
19235# tests run on this system so they can be shared between configure
19236# scripts and configure runs, see configure's option --config-cache.
19237# It is not useful on other systems. If it contains results you don't
19238# want to keep, you may remove or edit it.
19239#
19240# config.status only pays attention to the cache file if you give it
19241# the --recheck option to rerun configure.
19242#
19243# `ac_cv_env_foo' variables (set or unset) will be overridden when
19244# loading this file, other *unset* `ac_cv_foo' will be assigned the
19245# following values.
19246
19247_ACEOF
19248
19249# The following way of writing the cache mishandles newlines in values,
19250# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19251# So, we kill variables containing newlines.
bec39cab
AC
19252# Ultrix sh set writes to stderr and can't be redirected directly,
19253# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19254(
19255 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19256 eval ac_val=\$$ac_var
19257 case $ac_val in #(
19258 *${as_nl}*)
19259 case $ac_var in #(
19260 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19261$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19262 esac
19263 case $ac_var in #(
19264 _ | IFS | as_nl) ;; #(
19265 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19266 *) { eval $ac_var=; unset $ac_var;} ;;
19267 esac ;;
19268 esac
19269 done
19270
bec39cab 19271 (set) 2>&1 |
81ecdfbb
RW
19272 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19273 *${as_nl}ac_space=\ *)
19274 # `set' does not quote correctly, so add quotes: double-quote
19275 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19276 sed -n \
19277 "s/'/'\\\\''/g;
19278 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19279 ;; #(
bec39cab
AC
19280 *)
19281 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19282 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19283 ;;
81ecdfbb
RW
19284 esac |
19285 sort
19286) |
bec39cab 19287 sed '
81ecdfbb 19288 /^ac_cv_env_/b end
bec39cab 19289 t clear
81ecdfbb 19290 :clear
bec39cab
AC
19291 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19292 t end
81ecdfbb
RW
19293 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19294 :end' >>confcache
19295if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19296 if test -w "$cache_file"; then
d0ac1c44 19297 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19298 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19299$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19300 if test ! -f "$cache_file" || test -h "$cache_file"; then
19301 cat confcache >"$cache_file"
19302 else
19303 case $cache_file in #(
19304 */* | ?:*)
19305 mv -f confcache "$cache_file"$$ &&
19306 mv -f "$cache_file"$$ "$cache_file" ;; #(
19307 *)
19308 mv -f confcache "$cache_file" ;;
19309 esac
19310 fi
19311 fi
bec39cab 19312 else
81ecdfbb
RW
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19314$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19315 fi
19316fi
19317rm -f confcache
19318
19319test "x$prefix" = xNONE && prefix=$ac_default_prefix
19320# Let make expand exec_prefix.
19321test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19322
bec39cab
AC
19323DEFS=-DHAVE_CONFIG_H
19324
19325ac_libobjs=
19326ac_ltlibobjs=
d0ac1c44 19327U=
bec39cab
AC
19328for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19329 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19330 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19331 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19332 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19333 # will be set to the directory where LIBOBJS objects are built.
19334 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19335 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19336done
19337LIBOBJS=$ac_libobjs
19338
19339LTLIBOBJS=$ac_ltlibobjs
19340
19341
85981d60 19342if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19343 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19344Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19345fi
4df42755 19346if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19347 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19348Usually this means the macro was only invoked conditionally." "$LINENO" 5
19349fi
19350if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19351 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19352Usually this means the macro was only invoked conditionally." "$LINENO" 5
19353fi
81ecdfbb
RW
19354
19355
d0ac1c44 19356: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19357ac_write_fail=0
bec39cab
AC
19358ac_clean_files_save=$ac_clean_files
19359ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19360{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19361$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19362as_write_fail=0
19363cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19364#! $SHELL
19365# Generated by $as_me.
19366# Run this file to recreate the current configuration.
19367# Compiler output produced by configure, useful for debugging
19368# configure, is in config.log if it exists.
19369
19370debug=false
19371ac_cs_recheck=false
19372ac_cs_silent=false
bec39cab 19373
81ecdfbb
RW
19374SHELL=\${CONFIG_SHELL-$SHELL}
19375export SHELL
19376_ASEOF
19377cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19378## -------------------- ##
19379## M4sh Initialization. ##
19380## -------------------- ##
19381
19382# Be more Bourne compatible
19383DUALCASE=1; export DUALCASE # for MKS sh
19384if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19385 emulate sh
19386 NULLCMD=:
81ecdfbb 19387 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19388 # is contrary to our usage. Disable this feature.
19389 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19390 setopt NO_GLOB_SUBST
19391else
19392 case `(set -o) 2>/dev/null` in #(
19393 *posix*) :
19394 set -o posix ;; #(
19395 *) :
19396 ;;
19397esac
bec39cab 19398fi
bec39cab 19399
81ecdfbb
RW
19400
19401as_nl='
19402'
19403export as_nl
19404# Printing a long string crashes Solaris 7 /usr/bin/printf.
19405as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19406as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19407as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19408# Prefer a ksh shell builtin over an external printf program on Solaris,
19409# but without wasting forks for bash or zsh.
19410if test -z "$BASH_VERSION$ZSH_VERSION" \
19411 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19412 as_echo='print -r --'
19413 as_echo_n='print -rn --'
19414elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19415 as_echo='printf %s\n'
19416 as_echo_n='printf %s'
19417else
19418 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19419 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19420 as_echo_n='/usr/ucb/echo -n'
19421 else
19422 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19423 as_echo_n_body='eval
19424 arg=$1;
19425 case $arg in #(
19426 *"$as_nl"*)
19427 expr "X$arg" : "X\\(.*\\)$as_nl";
19428 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19429 esac;
19430 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19431 '
19432 export as_echo_n_body
19433 as_echo_n='sh -c $as_echo_n_body as_echo'
19434 fi
19435 export as_echo_body
19436 as_echo='sh -c $as_echo_body as_echo'
19437fi
19438
19439# The user is always right.
19440if test "${PATH_SEPARATOR+set}" != set; then
19441 PATH_SEPARATOR=:
19442 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19443 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19444 PATH_SEPARATOR=';'
19445 }
bec39cab
AC
19446fi
19447
19448
81ecdfbb
RW
19449# IFS
19450# We need space, tab and new line, in precisely that order. Quoting is
19451# there to prevent editors from complaining about space-tab.
19452# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19453# splitting by setting IFS to empty value.)
19454IFS=" "" $as_nl"
19455
19456# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19457as_myself=
81ecdfbb
RW
19458case $0 in #((
19459 *[\\/]* ) as_myself=$0 ;;
19460 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19461for as_dir in $PATH
19462do
19463 IFS=$as_save_IFS
19464 test -z "$as_dir" && as_dir=.
19465 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19466 done
19467IFS=$as_save_IFS
19468
19469 ;;
19470esac
19471# We did not find ourselves, most probably we were run as `sh COMMAND'
19472# in which case we are not to be found in the path.
19473if test "x$as_myself" = x; then
19474 as_myself=$0
19475fi
19476if test ! -f "$as_myself"; then
19477 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19478 exit 1
19479fi
19480
19481# Unset variables that we do not need and which cause bugs (e.g. in
19482# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19483# suppresses any "Segmentation fault" message there. '((' could
19484# trigger a bug in pdksh 5.2.14.
19485for as_var in BASH_ENV ENV MAIL MAILPATH
19486do eval test x\${$as_var+set} = xset \
19487 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19488done
bec39cab
AC
19489PS1='$ '
19490PS2='> '
19491PS4='+ '
19492
19493# NLS nuisances.
81ecdfbb
RW
19494LC_ALL=C
19495export LC_ALL
19496LANGUAGE=C
19497export LANGUAGE
19498
19499# CDPATH.
19500(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19501
19502
d0ac1c44
SM
19503# as_fn_error STATUS ERROR [LINENO LOG_FD]
19504# ----------------------------------------
81ecdfbb
RW
19505# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19506# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19507# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19508as_fn_error ()
19509{
d0ac1c44
SM
19510 as_status=$1; test $as_status -eq 0 && as_status=1
19511 if test "$4"; then
19512 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19513 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19514 fi
d0ac1c44 19515 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19516 as_fn_exit $as_status
19517} # as_fn_error
19518
19519
19520# as_fn_set_status STATUS
19521# -----------------------
19522# Set $? to STATUS, without forking.
19523as_fn_set_status ()
19524{
19525 return $1
19526} # as_fn_set_status
19527
19528# as_fn_exit STATUS
19529# -----------------
19530# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19531as_fn_exit ()
19532{
19533 set +e
19534 as_fn_set_status $1
19535 exit $1
19536} # as_fn_exit
19537
19538# as_fn_unset VAR
19539# ---------------
19540# Portably unset VAR.
19541as_fn_unset ()
19542{
19543 { eval $1=; unset $1;}
19544}
19545as_unset=as_fn_unset
19546# as_fn_append VAR VALUE
19547# ----------------------
19548# Append the text in VALUE to the end of the definition contained in VAR. Take
19549# advantage of any shell optimizations that allow amortized linear growth over
19550# repeated appends, instead of the typical quadratic growth present in naive
19551# implementations.
19552if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19553 eval 'as_fn_append ()
19554 {
19555 eval $1+=\$2
19556 }'
19557else
19558 as_fn_append ()
19559 {
19560 eval $1=\$$1\$2
19561 }
19562fi # as_fn_append
19563
19564# as_fn_arith ARG...
19565# ------------------
19566# Perform arithmetic evaluation on the ARGs, and store the result in the
19567# global $as_val. Take advantage of shells that can avoid forks. The arguments
19568# must be portable across $(()) and expr.
19569if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19570 eval 'as_fn_arith ()
19571 {
19572 as_val=$(( $* ))
19573 }'
19574else
19575 as_fn_arith ()
19576 {
19577 as_val=`expr "$@" || test $? -eq 1`
19578 }
19579fi # as_fn_arith
bec39cab 19580
81ecdfbb
RW
19581
19582if expr a : '\(a\)' >/dev/null 2>&1 &&
19583 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19584 as_expr=expr
19585else
19586 as_expr=false
19587fi
19588
81ecdfbb 19589if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19590 as_basename=basename
19591else
19592 as_basename=false
19593fi
19594
81ecdfbb
RW
19595if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19596 as_dirname=dirname
19597else
19598 as_dirname=false
19599fi
bec39cab 19600
81ecdfbb 19601as_me=`$as_basename -- "$0" ||
bec39cab
AC
19602$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19603 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19604 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19605$as_echo X/"$0" |
19606 sed '/^.*\/\([^/][^/]*\)\/*$/{
19607 s//\1/
19608 q
19609 }
19610 /^X\/\(\/\/\)$/{
19611 s//\1/
19612 q
19613 }
19614 /^X\/\(\/\).*/{
19615 s//\1/
19616 q
19617 }
19618 s/.*/./; q'`
b4e70030 19619
b4e70030
JB
19620# Avoid depending upon Character Ranges.
19621as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19622as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19623as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19624as_cr_digits='0123456789'
19625as_cr_alnum=$as_cr_Letters$as_cr_digits
19626
81ecdfbb
RW
19627ECHO_C= ECHO_N= ECHO_T=
19628case `echo -n x` in #(((((
19629-n*)
19630 case `echo 'xy\c'` in
19631 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19632 xy) ECHO_C='\c';;
19633 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19634 ECHO_T=' ';;
19635 esac;;
19636*)
19637 ECHO_N='-n';;
bec39cab
AC
19638esac
19639
81ecdfbb
RW
19640rm -f conf$$ conf$$.exe conf$$.file
19641if test -d conf$$.dir; then
19642 rm -f conf$$.dir/conf$$.file
bec39cab 19643else
81ecdfbb
RW
19644 rm -f conf$$.dir
19645 mkdir conf$$.dir 2>/dev/null
bec39cab 19646fi
81ecdfbb
RW
19647if (echo >conf$$.file) 2>/dev/null; then
19648 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19649 as_ln_s='ln -s'
81ecdfbb
RW
19650 # ... but there are two gotchas:
19651 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19652 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19653 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19654 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19655 as_ln_s='cp -pR'
81ecdfbb
RW
19656 elif ln conf$$.file conf$$ 2>/dev/null; then
19657 as_ln_s=ln
19658 else
d0ac1c44 19659 as_ln_s='cp -pR'
b4e70030 19660 fi
bec39cab 19661else
d0ac1c44 19662 as_ln_s='cp -pR'
bec39cab 19663fi
81ecdfbb
RW
19664rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19665rmdir conf$$.dir 2>/dev/null
19666
19667
19668# as_fn_mkdir_p
19669# -------------
19670# Create "$as_dir" as a directory, including parents if necessary.
19671as_fn_mkdir_p ()
19672{
19673
19674 case $as_dir in #(
19675 -*) as_dir=./$as_dir;;
19676 esac
19677 test -d "$as_dir" || eval $as_mkdir_p || {
19678 as_dirs=
19679 while :; do
19680 case $as_dir in #(
19681 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19682 *) as_qdir=$as_dir;;
19683 esac
19684 as_dirs="'$as_qdir' $as_dirs"
19685 as_dir=`$as_dirname -- "$as_dir" ||
19686$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19687 X"$as_dir" : 'X\(//\)[^/]' \| \
19688 X"$as_dir" : 'X\(//\)$' \| \
19689 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19690$as_echo X"$as_dir" |
19691 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19692 s//\1/
19693 q
19694 }
19695 /^X\(\/\/\)[^/].*/{
19696 s//\1/
19697 q
19698 }
19699 /^X\(\/\/\)$/{
19700 s//\1/
19701 q
19702 }
19703 /^X\(\/\).*/{
19704 s//\1/
19705 q
19706 }
19707 s/.*/./; q'`
19708 test -d "$as_dir" && break
19709 done
19710 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19711 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19712
bec39cab 19713
81ecdfbb 19714} # as_fn_mkdir_p
bec39cab 19715if mkdir -p . 2>/dev/null; then
81ecdfbb 19716 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19717else
19718 test -d ./-p && rmdir ./-p
19719 as_mkdir_p=false
19720fi
19721
d0ac1c44
SM
19722
19723# as_fn_executable_p FILE
19724# -----------------------
19725# Test if FILE is an executable regular file.
19726as_fn_executable_p ()
19727{
19728 test -f "$1" && test -x "$1"
19729} # as_fn_executable_p
19730as_test_x='test -x'
19731as_executable_p=as_fn_executable_p
bec39cab
AC
19732
19733# Sed expression to map a string onto a valid CPP name.
19734as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19735
19736# Sed expression to map a string onto a valid variable name.
19737as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19738
19739
bec39cab 19740exec 6>&1
81ecdfbb
RW
19741## ----------------------------------- ##
19742## Main body of $CONFIG_STATUS script. ##
19743## ----------------------------------- ##
19744_ASEOF
19745test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19746
19747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19748# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19749# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19750# values after options handling.
19751ac_log="
bec39cab 19752This file was extended by $as_me, which was
d0ac1c44 19753generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19754
19755 CONFIG_FILES = $CONFIG_FILES
19756 CONFIG_HEADERS = $CONFIG_HEADERS
19757 CONFIG_LINKS = $CONFIG_LINKS
19758 CONFIG_COMMANDS = $CONFIG_COMMANDS
19759 $ $0 $@
19760
81ecdfbb
RW
19761on `(hostname || uname -n) 2>/dev/null | sed 1q`
19762"
19763
bec39cab
AC
19764_ACEOF
19765
81ecdfbb
RW
19766case $ac_config_files in *"
19767"*) set x $ac_config_files; shift; ac_config_files=$*;;
19768esac
234b45d4 19769
81ecdfbb
RW
19770case $ac_config_headers in *"
19771"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19772esac
b4e70030 19773
b4e70030 19774
81ecdfbb
RW
19775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19776# Files that config.status was made for.
19777config_files="$ac_config_files"
19778config_headers="$ac_config_headers"
19779config_links="$ac_config_links"
19780config_commands="$ac_config_commands"
234b45d4 19781
81ecdfbb 19782_ACEOF
b4e70030 19783
81ecdfbb 19784cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19785ac_cs_usage="\
81ecdfbb
RW
19786\`$as_me' instantiates files and other configuration actions
19787from templates according to the current configuration. Unless the files
19788and actions are specified as TAGs, all are instantiated by default.
234b45d4 19789
81ecdfbb 19790Usage: $0 [OPTION]... [TAG]...
234b45d4 19791
bec39cab 19792 -h, --help print this help, then exit
81ecdfbb 19793 -V, --version print version number and configuration settings, then exit
d0ac1c44 19794 --config print configuration, then exit
81ecdfbb
RW
19795 -q, --quiet, --silent
19796 do not print progress messages
bec39cab
AC
19797 -d, --debug don't remove temporary files
19798 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19799 --file=FILE[:TEMPLATE]
19800 instantiate the configuration file FILE
19801 --header=FILE[:TEMPLATE]
19802 instantiate the configuration header FILE
234b45d4 19803
bec39cab
AC
19804Configuration files:
19805$config_files
234b45d4 19806
bec39cab
AC
19807Configuration headers:
19808$config_headers
234b45d4 19809
bec39cab
AC
19810Configuration links:
19811$config_links
234b45d4 19812
bec39cab
AC
19813Configuration commands:
19814$config_commands
19815
81ecdfbb 19816Report bugs to the package provider."
b4e70030 19817
81ecdfbb
RW
19818_ACEOF
19819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19820ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19821ac_cs_version="\\
19822config.status
d0ac1c44
SM
19823configured by $0, generated by GNU Autoconf 2.69,
19824 with options \\"\$ac_cs_config\\"
bec39cab 19825
d0ac1c44 19826Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19827This config.status script is free software; the Free Software Foundation
19828gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19829
19830ac_pwd='$ac_pwd'
19831srcdir='$srcdir'
19832INSTALL='$INSTALL'
81ecdfbb
RW
19833AWK='$AWK'
19834test -n "\$AWK" || AWK=awk
bec39cab
AC
19835_ACEOF
19836
81ecdfbb
RW
19837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19838# The default lists apply if the user does not specify any file.
bec39cab
AC
19839ac_need_defaults=:
19840while test $# != 0
19841do
19842 case $1 in
d0ac1c44 19843 --*=?*)
81ecdfbb
RW
19844 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19845 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 19846 ac_shift=:
c906108c 19847 ;;
d0ac1c44
SM
19848 --*=)
19849 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19850 ac_optarg=
19851 ac_shift=:
19852 ;;
81ecdfbb 19853 *)
bec39cab
AC
19854 ac_option=$1
19855 ac_optarg=$2
19856 ac_shift=shift
c906108c 19857 ;;
bec39cab 19858 esac
c906108c 19859
bec39cab
AC
19860 case $ac_option in
19861 # Handling of the options.
bec39cab
AC
19862 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19863 ac_cs_recheck=: ;;
81ecdfbb
RW
19864 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19865 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
19866 --config | --confi | --conf | --con | --co | --c )
19867 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 19868 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
19869 debug=: ;;
19870 --file | --fil | --fi | --f )
19871 $ac_shift
81ecdfbb
RW
19872 case $ac_optarg in
19873 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 19874 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
19875 esac
19876 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
19877 ac_need_defaults=false;;
19878 --header | --heade | --head | --hea )
19879 $ac_shift
81ecdfbb
RW
19880 case $ac_optarg in
19881 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19882 esac
19883 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 19884 ac_need_defaults=false;;
81ecdfbb
RW
19885 --he | --h)
19886 # Conflict between --help and --header
d0ac1c44 19887 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
19888Try \`$0 --help' for more information.";;
19889 --help | --hel | -h )
19890 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
19891 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19892 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19893 ac_cs_silent=: ;;
c906108c 19894
bec39cab 19895 # This is an error.
d0ac1c44 19896 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 19897Try \`$0 --help' for more information." ;;
c906108c 19898
81ecdfbb
RW
19899 *) as_fn_append ac_config_targets " $1"
19900 ac_need_defaults=false ;;
c906108c 19901
bec39cab
AC
19902 esac
19903 shift
19904done
c906108c 19905
bec39cab 19906ac_configure_extra_args=
c906108c 19907
bec39cab
AC
19908if $ac_cs_silent; then
19909 exec 6>/dev/null
19910 ac_configure_extra_args="$ac_configure_extra_args --silent"
19911fi
c906108c 19912
bec39cab 19913_ACEOF
81ecdfbb 19914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 19915if \$ac_cs_recheck; then
d0ac1c44 19916 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
19917 shift
19918 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19919 CONFIG_SHELL='$SHELL'
19920 export CONFIG_SHELL
19921 exec "\$@"
bec39cab
AC
19922fi
19923
19924_ACEOF
81ecdfbb
RW
19925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19926exec 5>>config.log
19927{
19928 echo
19929 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19930## Running $as_me. ##
19931_ASBOX
19932 $as_echo "$ac_log"
19933} >&5
bec39cab 19934
81ecdfbb
RW
19935_ACEOF
19936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 19937#
81ecdfbb 19938# INIT-COMMANDS
c906108c 19939#
a417dc56 19940ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 19941GDB_NM_FILE=$GDB_NM_FILE
b4e70030 19942
bec39cab
AC
19943_ACEOF
19944
81ecdfbb 19945cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 19946
81ecdfbb 19947# Handling of arguments.
bec39cab 19948for ac_config_target in $ac_config_targets
c906108c 19949do
81ecdfbb
RW
19950 case $ac_config_target in
19951 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19952 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 19953 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 19954 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 19955 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 19956 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 19957 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 19958 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 19959 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 19960 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 19961
d0ac1c44 19962 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
19963 esac
19964done
19965
81ecdfbb 19966
bec39cab
AC
19967# If the user did not use the arguments to specify the items to instantiate,
19968# then the envvar interface is used. Set only those that are not.
19969# We use the long form for the default assignment because of an extremely
19970# bizarre bug on SunOS 4.1.3.
19971if $ac_need_defaults; then
19972 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19973 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19974 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19975 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19976fi
19977
b4e70030 19978# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 19979# simply because there is no reason against having it here, and in addition,
b4e70030 19980# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
19981# Hook for its removal unless debugging.
19982# Note that there is a small window in which the directory will not be cleaned:
19983# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
19984$debug ||
19985{
d0ac1c44 19986 tmp= ac_tmp=
81ecdfbb 19987 trap 'exit_status=$?
d0ac1c44
SM
19988 : "${ac_tmp:=$tmp}"
19989 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
19990' 0
19991 trap 'as_fn_exit 1' 1 2 13 15
19992}
19993# Create a (secure) tmp directory for tmp files.
19994
19995{
19996 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 19997 test -d "$tmp"
81ecdfbb
RW
19998} ||
19999{
20000 tmp=./conf$$-$RANDOM
20001 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20002} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20003ac_tmp=$tmp
81ecdfbb
RW
20004
20005# Set up the scripts for CONFIG_FILES section.
20006# No need to generate them if there are no CONFIG_FILES.
20007# This happens for instance with `./config.status config.h'.
20008if test -n "$CONFIG_FILES"; then
20009
20010if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20011 ac_cs_awk_getline=:
20012 ac_cs_awk_pipe_init=
20013 ac_cs_awk_read_file='
20014 while ((getline aline < (F[key])) > 0)
20015 print(aline)
20016 close(F[key])'
20017 ac_cs_awk_pipe_fini=
20018else
20019 ac_cs_awk_getline=false
20020 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20021 ac_cs_awk_read_file='
20022 print "|#_!!_#|"
20023 print "cat " F[key] " &&"
20024 '$ac_cs_awk_pipe_init
20025 # The final `:' finishes the AND list.
20026 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20027fi
20028ac_cr=`echo X | tr X '\015'`
20029# On cygwin, bash can eat \r inside `` if the user requested igncr.
20030# But we know of no other shell where ac_cr would be empty at this
20031# point, so we can use a bashism as a fallback.
20032if test "x$ac_cr" = x; then
20033 eval ac_cr=\$\'\\r\'
20034fi
20035ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20036if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20037 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20038else
20039 ac_cs_awk_cr=$ac_cr
20040fi
20041
d0ac1c44 20042echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20043_ACEOF
20044
20045# Create commands to substitute file output variables.
20046{
20047 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20048 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20049 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20050 echo "_ACAWK" &&
20051 echo "_ACEOF"
20052} >conf$$files.sh &&
20053. ./conf$$files.sh ||
d0ac1c44 20054 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20055rm -f conf$$files.sh
20056
20057{
20058 echo "cat >conf$$subs.awk <<_ACEOF" &&
20059 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20060 echo "_ACEOF"
20061} >conf$$subs.sh ||
d0ac1c44
SM
20062 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20063ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20064ac_delim='%!_!# '
20065for ac_last_try in false false false false false :; do
20066 . ./conf$$subs.sh ||
d0ac1c44 20067 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20068
20069 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20070 if test $ac_delim_n = $ac_delim_num; then
20071 break
20072 elif $ac_last_try; then
d0ac1c44 20073 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20074 else
20075 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20076 fi
20077done
20078rm -f conf$$subs.sh
20079
20080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20081cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20082_ACEOF
20083sed -n '
20084h
20085s/^/S["/; s/!.*/"]=/
20086p
20087g
20088s/^[^!]*!//
20089:repl
20090t repl
20091s/'"$ac_delim"'$//
20092t delim
20093:nl
20094h
d0ac1c44 20095s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20096t more1
20097s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20098p
20099n
20100b repl
20101:more1
20102s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20103p
20104g
20105s/.\{148\}//
20106t nl
20107:delim
20108h
d0ac1c44 20109s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20110t more2
20111s/["\\]/\\&/g; s/^/"/; s/$/"/
20112p
20113b
20114:more2
20115s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20116p
20117g
20118s/.\{148\}//
20119t delim
20120' <conf$$subs.awk | sed '
20121/^[^""]/{
20122 N
20123 s/\n//
20124}
20125' >>$CONFIG_STATUS || ac_write_fail=1
20126rm -f conf$$subs.awk
20127cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20128_ACAWK
d0ac1c44 20129cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20130 for (key in S) S_is_set[key] = 1
20131 FS = "\a"
20132 \$ac_cs_awk_pipe_init
20133}
20134{
20135 line = $ 0
20136 nfields = split(line, field, "@")
20137 substed = 0
20138 len = length(field[1])
20139 for (i = 2; i < nfields; i++) {
20140 key = field[i]
20141 keylen = length(key)
20142 if (S_is_set[key]) {
20143 value = S[key]
20144 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20145 len += length(value) + length(field[++i])
20146 substed = 1
20147 } else
20148 len += 1 + keylen
20149 }
20150 if (nfields == 3 && !substed) {
20151 key = field[2]
20152 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20153 \$ac_cs_awk_read_file
20154 next
20155 }
20156 }
20157 print line
b4e70030 20158}
81ecdfbb
RW
20159\$ac_cs_awk_pipe_fini
20160_ACAWK
20161_ACEOF
20162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20163if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20164 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20165else
20166 cat
d0ac1c44
SM
20167fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20168 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20169_ACEOF
20170
d0ac1c44
SM
20171# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20172# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20173# trailing colons and then remove the whole line if VPATH becomes empty
20174# (actually we leave an empty line to preserve line numbers).
20175if test "x$srcdir" = x.; then
d0ac1c44
SM
20176 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20177h
20178s///
20179s/^/:/
20180s/[ ]*$/:/
20181s/:\$(srcdir):/:/g
20182s/:\${srcdir}:/:/g
20183s/:@srcdir@:/:/g
20184s/^:*//
81ecdfbb 20185s/:*$//
d0ac1c44
SM
20186x
20187s/\(=[ ]*\).*/\1/
20188G
20189s/\n//
81ecdfbb
RW
20190s/^[^=]*=[ ]*$//
20191}'
20192fi
20193
20194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20195fi # test -n "$CONFIG_FILES"
20196
20197# Set up the scripts for CONFIG_HEADERS section.
20198# No need to generate them if there are no CONFIG_HEADERS.
20199# This happens for instance with `./config.status Makefile'.
20200if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20201cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20202BEGIN {
20203_ACEOF
20204
20205# Transform confdefs.h into an awk script `defines.awk', embedded as
20206# here-document in config.status, that substitutes the proper values into
20207# config.h.in to produce config.h.
4e8d927d 20208
81ecdfbb
RW
20209# Create a delimiter string that does not exist in confdefs.h, to ease
20210# handling of long lines.
20211ac_delim='%!_!# '
20212for ac_last_try in false false :; do
d0ac1c44
SM
20213 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20214 if test -z "$ac_tt"; then
81ecdfbb
RW
20215 break
20216 elif $ac_last_try; then
d0ac1c44 20217 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20218 else
20219 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20220 fi
20221done
4e8d927d 20222
81ecdfbb
RW
20223# For the awk script, D is an array of macro values keyed by name,
20224# likewise P contains macro parameters if any. Preserve backslash
20225# newline sequences.
20226
20227ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20228sed -n '
20229s/.\{148\}/&'"$ac_delim"'/g
20230t rset
20231:rset
20232s/^[ ]*#[ ]*define[ ][ ]*/ /
20233t def
20234d
20235:def
20236s/\\$//
20237t bsnl
20238s/["\\]/\\&/g
20239s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20240D["\1"]=" \3"/p
20241s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20242d
20243:bsnl
20244s/["\\]/\\&/g
20245s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20246D["\1"]=" \3\\\\\\n"\\/p
20247t cont
20248s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20249t cont
20250d
20251:cont
20252n
20253s/.\{148\}/&'"$ac_delim"'/g
20254t clear
20255:clear
20256s/\\$//
20257t bsnlc
20258s/["\\]/\\&/g; s/^/"/; s/$/"/p
20259d
20260:bsnlc
20261s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20262b cont
20263' <confdefs.h | sed '
20264s/'"$ac_delim"'/"\\\
20265"/g' >>$CONFIG_STATUS || ac_write_fail=1
20266
20267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20268 for (key in D) D_is_set[key] = 1
20269 FS = "\a"
20270}
20271/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20272 line = \$ 0
20273 split(line, arg, " ")
20274 if (arg[1] == "#") {
20275 defundef = arg[2]
20276 mac1 = arg[3]
20277 } else {
20278 defundef = substr(arg[1], 2)
20279 mac1 = arg[2]
20280 }
20281 split(mac1, mac2, "(") #)
20282 macro = mac2[1]
20283 prefix = substr(line, 1, index(line, defundef) - 1)
20284 if (D_is_set[macro]) {
20285 # Preserve the white space surrounding the "#".
20286 print prefix "define", macro P[macro] D[macro]
20287 next
20288 } else {
20289 # Replace #undef with comments. This is necessary, for example,
20290 # in the case of _POSIX_SOURCE, which is predefined and required
20291 # on some systems where configure will not decide to define it.
20292 if (defundef == "undef") {
20293 print "/*", prefix defundef, macro, "*/"
20294 next
20295 }
20296 }
b4e70030 20297}
81ecdfbb
RW
20298{ print }
20299_ACAWK
b4e70030 20300_ACEOF
81ecdfbb 20301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20302 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20303fi # test -n "$CONFIG_HEADERS"
4e8d927d 20304
4e8d927d 20305
81ecdfbb
RW
20306eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20307shift
20308for ac_tag
20309do
20310 case $ac_tag in
20311 :[FHLC]) ac_mode=$ac_tag; continue;;
20312 esac
20313 case $ac_mode$ac_tag in
20314 :[FHL]*:*);;
d0ac1c44 20315 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20316 :[FH]-) ac_tag=-:-;;
20317 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20318 esac
20319 ac_save_IFS=$IFS
20320 IFS=:
20321 set x $ac_tag
20322 IFS=$ac_save_IFS
20323 shift
20324 ac_file=$1
20325 shift
4e8d927d 20326
81ecdfbb
RW
20327 case $ac_mode in
20328 :L) ac_source=$1;;
20329 :[FH])
20330 ac_file_inputs=
20331 for ac_f
20332 do
20333 case $ac_f in
d0ac1c44 20334 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20335 *) # Look for the file first in the build tree, then in the source tree
20336 # (if the path is not absolute). The absolute path cannot be DOS-style,
20337 # because $ac_f cannot contain `:'.
20338 test -f "$ac_f" ||
20339 case $ac_f in
20340 [\\/$]*) false;;
20341 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20342 esac ||
d0ac1c44 20343 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20344 esac
20345 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20346 as_fn_append ac_file_inputs " '$ac_f'"
20347 done
20348
20349 # Let's still pretend it is `configure' which instantiates (i.e., don't
20350 # use $as_me), people would be surprised to read:
20351 # /* config.h. Generated by config.status. */
20352 configure_input='Generated from '`
20353 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20354 `' by configure.'
20355 if test x"$ac_file" != x-; then
20356 configure_input="$ac_file. $configure_input"
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20358$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20359 fi
81ecdfbb
RW
20360 # Neutralize special characters interpreted by sed in replacement strings.
20361 case $configure_input in #(
20362 *\&* | *\|* | *\\* )
20363 ac_sed_conf_input=`$as_echo "$configure_input" |
20364 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20365 *) ac_sed_conf_input=$configure_input;;
20366 esac
4e8d927d 20367
81ecdfbb 20368 case $ac_tag in
d0ac1c44
SM
20369 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20370 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20371 esac
20372 ;;
c906108c
SS
20373 esac
20374
81ecdfbb 20375 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20376$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20377 X"$ac_file" : 'X\(//\)[^/]' \| \
20378 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20379 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20380$as_echo X"$ac_file" |
20381 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20382 s//\1/
20383 q
20384 }
20385 /^X\(\/\/\)[^/].*/{
20386 s//\1/
20387 q
20388 }
20389 /^X\(\/\/\)$/{
20390 s//\1/
20391 q
20392 }
20393 /^X\(\/\).*/{
20394 s//\1/
20395 q
20396 }
20397 s/.*/./; q'`
20398 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20399 ac_builddir=.
20400
81ecdfbb
RW
20401case "$ac_dir" in
20402.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20403*)
20404 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20405 # A ".." for each directory in $ac_dir_suffix.
20406 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20407 case $ac_top_builddir_sub in
20408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20410 esac ;;
20411esac
20412ac_abs_top_builddir=$ac_pwd
20413ac_abs_builddir=$ac_pwd$ac_dir_suffix
20414# for backward compatibility:
20415ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20416
20417case $srcdir in
81ecdfbb 20418 .) # We are building in place.
bec39cab 20419 ac_srcdir=.
81ecdfbb
RW
20420 ac_top_srcdir=$ac_top_builddir_sub
20421 ac_abs_top_srcdir=$ac_pwd ;;
20422 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20423 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20424 ac_top_srcdir=$srcdir
20425 ac_abs_top_srcdir=$srcdir ;;
20426 *) # Relative name.
20427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20428 ac_top_srcdir=$ac_top_build_prefix$srcdir
20429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20430esac
81ecdfbb 20431ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20432
c906108c 20433
81ecdfbb
RW
20434 case $ac_mode in
20435 :F)
20436 #
20437 # CONFIG_FILE
20438 #
c906108c 20439
bec39cab
AC
20440 case $INSTALL in
20441 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20442 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20443 esac
81ecdfbb 20444_ACEOF
121ce6e5 20445
81ecdfbb
RW
20446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20447# If the template does not know about datarootdir, expand it.
20448# FIXME: This hack should be removed a few years after 2.60.
20449ac_datarootdir_hack=; ac_datarootdir_seen=
20450ac_sed_dataroot='
20451/datarootdir/ {
20452 p
20453 q
20454}
20455/@datadir@/p
20456/@docdir@/p
20457/@infodir@/p
20458/@localedir@/p
20459/@mandir@/p'
20460case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20461*datarootdir*) ac_datarootdir_seen=yes;;
20462*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20464$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20465_ACEOF
20466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20467 ac_datarootdir_hack='
20468 s&@datadir@&$datadir&g
20469 s&@docdir@&$docdir&g
20470 s&@infodir@&$infodir&g
20471 s&@localedir@&$localedir&g
20472 s&@mandir@&$mandir&g
20473 s&\\\${datarootdir}&$datarootdir&g' ;;
20474esac
4e8d927d 20475_ACEOF
81ecdfbb
RW
20476
20477# Neutralize VPATH when `$srcdir' = `.'.
20478# Shell code in configure.ac might set extrasub.
20479# FIXME: do we really want to maintain this feature?
20480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20481ac_sed_extra="$ac_vpsub
bec39cab
AC
20482$extrasub
20483_ACEOF
81ecdfbb 20484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20485:t
20486/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20487s|@configure_input@|$ac_sed_conf_input|;t t
20488s&@top_builddir@&$ac_top_builddir_sub&;t t
20489s&@top_build_prefix@&$ac_top_build_prefix&;t t
20490s&@srcdir@&$ac_srcdir&;t t
20491s&@abs_srcdir@&$ac_abs_srcdir&;t t
20492s&@top_srcdir@&$ac_top_srcdir&;t t
20493s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20494s&@builddir@&$ac_builddir&;t t
20495s&@abs_builddir@&$ac_abs_builddir&;t t
20496s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20497s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20498$ac_datarootdir_hack
20499"
20500eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20501if $ac_cs_awk_getline; then
d0ac1c44 20502 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20503else
d0ac1c44
SM
20504 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20505fi \
20506 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20507
20508test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20509 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20510 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20511 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20513which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20514$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20515which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20516
d0ac1c44 20517 rm -f "$ac_tmp/stdin"
bec39cab 20518 case $ac_file in
d0ac1c44
SM
20519 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20520 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20521 esac \
d0ac1c44 20522 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20523 ;;
20524 :H)
20525 #
20526 # CONFIG_HEADER
20527 #
bec39cab 20528 if test x"$ac_file" != x-; then
81ecdfbb
RW
20529 {
20530 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20531 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20532 } >"$ac_tmp/config.h" \
20533 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20534 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20535 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20536$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20537 else
81ecdfbb 20538 rm -f "$ac_file"
d0ac1c44
SM
20539 mv "$ac_tmp/config.h" "$ac_file" \
20540 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20541 fi
20542 else
81ecdfbb 20543 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20544 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20545 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20546 fi
81ecdfbb
RW
20547 ;;
20548 :L)
20549 #
20550 # CONFIG_LINK
20551 #
c906108c 20552
81ecdfbb
RW
20553 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20554 :
b4e70030 20555 else
81ecdfbb
RW
20556 # Prefer the file from the source tree if names are identical.
20557 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20558 ac_source=$srcdir/$ac_source
20559 fi
b4e70030 20560
81ecdfbb
RW
20561 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20562$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20563
81ecdfbb 20564 if test ! -r "$ac_source"; then
d0ac1c44 20565 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20566 fi
20567 rm -f "$ac_file"
bec39cab 20568
81ecdfbb 20569 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20570 case $ac_source in
81ecdfbb
RW
20571 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20572 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20573 esac
20574 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20575 ln "$ac_source" "$ac_file" 2>/dev/null ||
20576 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20577 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20578 fi
20579 ;;
20580 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20581$as_echo "$as_me: executing $ac_file commands" >&6;}
20582 ;;
c906108c 20583 esac
b4e70030 20584
bec39cab 20585
81ecdfbb 20586 case $ac_file$ac_mode in
c5adaa19 20587 "config.h":H) echo > stamp-h ;;
81ecdfbb 20588 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20589 "nm.h":L) echo > stamp-nmh ;;
b292c783 20590 "gcore":F) chmod +x gcore ;;
81ecdfbb 20591
bec39cab 20592 esac
81ecdfbb 20593done # for ac_tag
c906108c 20594
bec39cab 20595
81ecdfbb 20596as_fn_exit 0
bec39cab 20597_ACEOF
bec39cab
AC
20598ac_clean_files=$ac_clean_files_save
20599
81ecdfbb 20600test $ac_write_fail = 0 ||
d0ac1c44 20601 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20602
bec39cab
AC
20603
20604# configure is writing to config.log, and then calls config.status.
20605# config.status does its own redirection, appending to config.log.
20606# Unfortunately, on DOS this fails, as config.log is still kept open
20607# by configure, so config.status won't be able to write to it; its
20608# output is simply discarded. So we exec the FD to /dev/null,
20609# effectively closing config.log, so it can be properly (re)opened and
20610# appended to by config.status. When coming back to configure, we
20611# need to make the FD available again.
20612if test "$no_create" != yes; then
20613 ac_cs_success=:
20614 ac_config_status_args=
20615 test "$silent" = yes &&
20616 ac_config_status_args="$ac_config_status_args --quiet"
20617 exec 5>/dev/null
20618 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20619 exec 5>>config.log
20620 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20621 # would make configure fail if this is the last instruction.
d0ac1c44 20622 $ac_cs_success || as_fn_exit 1
bec39cab 20623fi
c906108c 20624
bec39cab 20625#
81ecdfbb 20626# CONFIG_SUBDIRS section.
bec39cab 20627#
c906108c
SS
20628if test "$no_recursion" != yes; then
20629
81ecdfbb
RW
20630 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20631 # so they do not pile up.
c906108c
SS
20632 ac_sub_configure_args=
20633 ac_prev=
fdc59709
PB
20634 eval "set x $ac_configure_args"
20635 shift
20636 for ac_arg
20637 do
c906108c
SS
20638 if test -n "$ac_prev"; then
20639 ac_prev=
20640 continue
20641 fi
bec39cab 20642 case $ac_arg in
c906108c
SS
20643 -cache-file | --cache-file | --cache-fil | --cache-fi \
20644 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20645 ac_prev=cache_file ;;
20646 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20647 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20648 | --c=*)
20649 ;;
20650 --config-cache | -C)
c906108c
SS
20651 ;;
20652 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20653 ac_prev=srcdir ;;
20654 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20655 ;;
bec39cab
AC
20656 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20657 ac_prev=prefix ;;
20658 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20659 ;;
81ecdfbb
RW
20660 --disable-option-checking)
20661 ;;
fdc59709
PB
20662 *)
20663 case $ac_arg in
81ecdfbb 20664 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20665 esac
81ecdfbb 20666 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20667 esac
20668 done
20669
bec39cab
AC
20670 # Always prepend --prefix to ensure using the same prefix
20671 # in subdir configurations.
fdc59709
PB
20672 ac_arg="--prefix=$prefix"
20673 case $ac_arg in
81ecdfbb 20674 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20675 esac
81ecdfbb
RW
20676 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20677
20678 # Pass --silent
20679 if test "$silent" = yes; then
20680 ac_sub_configure_args="--silent $ac_sub_configure_args"
20681 fi
20682
20683 # Always prepend --disable-option-checking to silence warnings, since
20684 # different subdirs can have different --enable and --with options.
20685 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20686
b4e70030 20687 ac_popdir=`pwd`
bec39cab 20688 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20689
20690 # Do not complain, so a configure script can configure whichever
20691 # parts of a large source tree are present.
fdc59709 20692 test -d "$srcdir/$ac_dir" || continue
c906108c 20693
81ecdfbb
RW
20694 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20695 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20696 $as_echo "$ac_msg" >&6
20697 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20698 ac_builddir=.
20699
81ecdfbb
RW
20700case "$ac_dir" in
20701.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20702*)
20703 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20704 # A ".." for each directory in $ac_dir_suffix.
20705 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20706 case $ac_top_builddir_sub in
20707 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20708 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20709 esac ;;
20710esac
20711ac_abs_top_builddir=$ac_pwd
20712ac_abs_builddir=$ac_pwd$ac_dir_suffix
20713# for backward compatibility:
20714ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20715
20716case $srcdir in
81ecdfbb 20717 .) # We are building in place.
bec39cab 20718 ac_srcdir=.
81ecdfbb
RW
20719 ac_top_srcdir=$ac_top_builddir_sub
20720 ac_abs_top_srcdir=$ac_pwd ;;
20721 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20722 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20723 ac_top_srcdir=$srcdir
20724 ac_abs_top_srcdir=$srcdir ;;
20725 *) # Relative name.
20726 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20727 ac_top_srcdir=$ac_top_build_prefix$srcdir
20728 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20729esac
81ecdfbb 20730ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20731
c906108c 20732
fdc59709 20733 cd "$ac_dir"
c906108c
SS
20734
20735 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20736 if test -f "$ac_srcdir/configure.gnu"; then
20737 ac_sub_configure=$ac_srcdir/configure.gnu
20738 elif test -f "$ac_srcdir/configure"; then
20739 ac_sub_configure=$ac_srcdir/configure
20740 elif test -f "$ac_srcdir/configure.in"; then
20741 # This should be Cygnus configure.
20742 ac_sub_configure=$ac_aux_dir/configure
c906108c 20743 else
81ecdfbb
RW
20744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20745$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20746 ac_sub_configure=
20747 fi
20748
20749 # The recursion is here.
20750 if test -n "$ac_sub_configure"; then
c906108c 20751 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20752 case $cache_file in
20753 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20754 *) # Relative name.
20755 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20756 esac
c906108c 20757
81ecdfbb
RW
20758 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
20759$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20760 # The eval makes quoting arguments work.
fdc59709
PB
20761 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20762 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20763 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20764 fi
20765
fdc59709 20766 cd "$ac_popdir"
c906108c
SS
20767 done
20768fi
81ecdfbb
RW
20769if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20771$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20772fi
c906108c 20773
This page took 3.351519 seconds and 4 git commands to generate.