]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Fix gdb crash when trying to print the address of a synthetic C++ reference
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
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.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
58bfce93
MM
661LTLIBIPT
662LIBIPT
663HAVE_LIBIPT
4df42755
DE
664HAVE_GUILE_FALSE
665HAVE_GUILE_TRUE
ed3ef339
DE
666GUILE_LIBS
667GUILE_CPPFLAGS
e76c5d17
DE
668GUILD_TARGET_FLAG
669GUILD
ed3ef339 670pkg_config_prog_path
4df42755
DE
671HAVE_PYTHON_FALSE
672HAVE_PYTHON_TRUE
ac534cba
JB
673PYTHON_LIBS
674PYTHON_CPPFLAGS
81ecdfbb 675PYTHON_CFLAGS
ec685c5e 676python_prog_path
81ecdfbb
RW
677LTLIBEXPAT
678LIBEXPAT
679HAVE_LIBEXPAT
b8e0a31c 680JIT_READER_DIR
f997c383 681TARGET_PTR
39037522 682READLINE_TEXI_INCFLAG
81ecdfbb
RW
683READLINE_CFLAGS
684READLINE_DEPS
685READLINE
016a3251
DD
686LTLIBICONV
687LIBICONV
711a72d3
L
688zlibinc
689zlibdir
81ecdfbb
RW
690MIG
691WINDRES
692DLLTOOL
c971b7fa 693AR
81ecdfbb
RW
694YFLAGS
695YACC
c971b7fa 696RANLIB
81ecdfbb 697LN_S
c971b7fa
PA
698INSTALL_DATA
699INSTALL_SCRIPT
700INSTALL_PROGRAM
701AWK
81ecdfbb
RW
702REPORT_BUGS_TEXI
703REPORT_BUGS_TO
704PKGVERSION
b292c783 705HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
706TARGET_OBS
707subdirs
708GDB_DATADIR
709DEBUGDIR
5048e516
JK
710MAKEINFO_EXTRA_FLAGS
711MAKEINFOFLAGS
712MAKEINFO
81ecdfbb
RW
713PACKAGE
714GNULIB_STDINT_H
81ecdfbb
RW
715CATOBJEXT
716GENCAT
717INSTOBJEXT
718DATADIRNAME
719CATALOGS
720POSUB
721GMSGFMT
722XGETTEXT
723INCINTL
724LIBINTL_DEP
725LIBINTL
726USE_NLS
727SET_MAKE
728GMAKE_FALSE
729GMAKE_TRUE
730MAKE
731CCDEPMODE
732DEPDIR
733am__leading_dot
a994041d 734COMPILER_CFLAGS
3bc3d82a 735COMPILER
4869db5e
RM
736INSTALL_STRIP_PROGRAM
737STRIP
738install_sh
81ecdfbb
RW
739target_os
740target_vendor
741target_cpu
742target
743host_os
744host_vendor
745host_cpu
746host
747build_os
748build_vendor
749build_cpu
750build
c971b7fa
PA
751EGREP
752GREP
753CPP
3bc3d82a
PA
754ac_ct_CXX
755CXXFLAGS
756CXX
81ecdfbb
RW
757OBJEXT
758EXEEXT
759ac_ct_CC
760CPPFLAGS
761LDFLAGS
762CFLAGS
763CC
764MAINT
765MAINTAINER_MODE_FALSE
766MAINTAINER_MODE_TRUE
767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
a4ce5b0d 805ac_subst_files='host_makefile_frag'
81ecdfbb
RW
806ac_user_opts='
807enable_option_checking
808enable_maintainer_mode
da2f07f1
JK
809enable_plugins
810enable_largefile
3bc3d82a 811enable_build_with_cxx
81ecdfbb
RW
812with_separate_debug_dir
813with_gdb_datadir
814with_relocated_sources
7349ff92 815with_auto_load_dir
bccbefd2 816with_auto_load_safe_path
81ecdfbb
RW
817enable_targets
818enable_64_bit_bfd
819enable_gdbcli
820enable_gdbmi
821enable_tui
822enable_gdbtk
05e7c244 823with_libunwind_ia64
81ecdfbb
RW
824with_curses
825enable_profiling
826with_pkgversion
827with_bugurl
711a72d3 828with_system_zlib
016a3251
DD
829with_gnu_ld
830enable_rpath
81ecdfbb 831with_libiconv_prefix
478aac75 832with_iconv_bin
81ecdfbb 833with_system_readline
b8e0a31c 834with_jit_reader_dir
81ecdfbb 835with_expat
81ecdfbb
RW
836with_libexpat_prefix
837with_python
ed3ef339 838with_guile
a8db4212 839enable_libmcheck
58bfce93
MM
840with_intel_pt
841with_libipt_prefix
81ecdfbb
RW
842with_included_regex
843with_sysroot
844with_system_gdbinit
845enable_werror
846enable_build_warnings
847enable_gdb_build_warnings
608e2dbb
TT
848with_lzma
849with_liblzma_prefix
81ecdfbb
RW
850with_tcl
851with_tk
852with_x
853enable_sim
854enable_multi_ice
496c0e1b 855enable_gdbserver
393fd4c3
YQ
856with_babeltrace
857with_libbabeltrace_prefix
81ecdfbb
RW
858'
859 ac_precious_vars='build_alias
860host_alias
861target_alias
862CC
863CFLAGS
864LDFLAGS
865LIBS
866CPPFLAGS
3bc3d82a
PA
867CXX
868CXXFLAGS
869CCC
81ecdfbb 870CPP
f06e05e0
JK
871MAKEINFO
872MAKEINFOFLAGS
81ecdfbb
RW
873YACC
874YFLAGS
875XMKMF'
5ae98d25 876ac_subdirs_all='testsuite
81ecdfbb
RW
877gdbtk
878multi-ice
879gdbserver'
c906108c
SS
880
881# Initialize some variables set by options.
bec39cab
AC
882ac_init_help=
883ac_init_version=false
81ecdfbb
RW
884ac_unrecognized_opts=
885ac_unrecognized_sep=
c906108c
SS
886# The variables have the same names as the options, with
887# dashes changed to underlines.
bec39cab 888cache_file=/dev/null
c906108c 889exec_prefix=NONE
c906108c 890no_create=
c906108c
SS
891no_recursion=
892prefix=NONE
893program_prefix=NONE
894program_suffix=NONE
895program_transform_name=s,x,x,
896silent=
897site=
898srcdir=
c906108c
SS
899verbose=
900x_includes=NONE
901x_libraries=NONE
bec39cab
AC
902
903# Installation directory options.
904# These are left unexpanded so users can "make install exec_prefix=/foo"
905# and all the variables that are supposed to be based on exec_prefix
906# by default will actually change.
907# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 908# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
909bindir='${exec_prefix}/bin'
910sbindir='${exec_prefix}/sbin'
911libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
912datarootdir='${prefix}/share'
913datadir='${datarootdir}'
c906108c
SS
914sysconfdir='${prefix}/etc'
915sharedstatedir='${prefix}/com'
916localstatedir='${prefix}/var'
c906108c
SS
917includedir='${prefix}/include'
918oldincludedir='/usr/include'
81ecdfbb
RW
919docdir='${datarootdir}/doc/${PACKAGE}'
920infodir='${datarootdir}/info'
921htmldir='${docdir}'
922dvidir='${docdir}'
923pdfdir='${docdir}'
924psdir='${docdir}'
925libdir='${exec_prefix}/lib'
926localedir='${datarootdir}/locale'
927mandir='${datarootdir}/man'
c906108c 928
c906108c 929ac_prev=
81ecdfbb 930ac_dashdash=
c906108c
SS
931for ac_option
932do
c906108c
SS
933 # If the previous option needs an argument, assign it.
934 if test -n "$ac_prev"; then
81ecdfbb 935 eval $ac_prev=\$ac_option
c906108c
SS
936 ac_prev=
937 continue
938 fi
939
81ecdfbb
RW
940 case $ac_option in
941 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942 *) ac_optarg=yes ;;
943 esac
c906108c
SS
944
945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
81ecdfbb
RW
947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
c906108c
SS
950
951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 954 bindir=$ac_optarg ;;
c906108c
SS
955
956 -build | --build | --buil | --bui | --bu)
bec39cab 957 ac_prev=build_alias ;;
c906108c 958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 959 build_alias=$ac_optarg ;;
c906108c
SS
960
961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
c906108c 970
81ecdfbb 971 -datadir | --datadir | --datadi | --datad)
c906108c 972 ac_prev=datadir ;;
81ecdfbb 973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 974 datadir=$ac_optarg ;;
c906108c 975
81ecdfbb
RW
976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
c906108c 983 -disable-* | --disable-*)
81ecdfbb 984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 985 # Reject names that are not valid shell variable names.
81ecdfbb
RW
986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987 as_fn_error "invalid feature name: $ac_useropt"
988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=no ;;
998
999 -docdir | --docdir | --docdi | --doc | --do)
1000 ac_prev=docdir ;;
1001 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002 docdir=$ac_optarg ;;
1003
1004 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005 ac_prev=dvidir ;;
1006 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007 dvidir=$ac_optarg ;;
c906108c
SS
1008
1009 -enable-* | --enable-*)
81ecdfbb 1010 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1011 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1013 as_fn_error "invalid feature name: $ac_useropt"
1014 ac_useropt_orig=$ac_useropt
1015 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016 case $ac_user_opts in
1017 *"
1018"enable_$ac_useropt"
1019"*) ;;
1020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021 ac_unrecognized_sep=', ';;
b4e70030 1022 esac
81ecdfbb 1023 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1024
1025 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027 | --exec | --exe | --ex)
1028 ac_prev=exec_prefix ;;
1029 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031 | --exec=* | --exe=* | --ex=*)
bec39cab 1032 exec_prefix=$ac_optarg ;;
c906108c
SS
1033
1034 -gas | --gas | --ga | --g)
1035 # Obsolete; use --with-gas.
1036 with_gas=yes ;;
1037
bec39cab
AC
1038 -help | --help | --hel | --he | -h)
1039 ac_init_help=long ;;
1040 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041 ac_init_help=recursive ;;
1042 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043 ac_init_help=short ;;
c906108c
SS
1044
1045 -host | --host | --hos | --ho)
bec39cab 1046 ac_prev=host_alias ;;
c906108c 1047 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1048 host_alias=$ac_optarg ;;
c906108c 1049
81ecdfbb
RW
1050 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051 ac_prev=htmldir ;;
1052 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053 | --ht=*)
1054 htmldir=$ac_optarg ;;
1055
c906108c
SS
1056 -includedir | --includedir | --includedi | --included | --include \
1057 | --includ | --inclu | --incl | --inc)
1058 ac_prev=includedir ;;
1059 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1061 includedir=$ac_optarg ;;
c906108c
SS
1062
1063 -infodir | --infodir | --infodi | --infod | --info | --inf)
1064 ac_prev=infodir ;;
1065 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1066 infodir=$ac_optarg ;;
c906108c
SS
1067
1068 -libdir | --libdir | --libdi | --libd)
1069 ac_prev=libdir ;;
1070 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1071 libdir=$ac_optarg ;;
c906108c
SS
1072
1073 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074 | --libexe | --libex | --libe)
1075 ac_prev=libexecdir ;;
1076 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077 | --libexe=* | --libex=* | --libe=*)
bec39cab 1078 libexecdir=$ac_optarg ;;
c906108c 1079
81ecdfbb
RW
1080 -localedir | --localedir | --localedi | --localed | --locale)
1081 ac_prev=localedir ;;
1082 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083 localedir=$ac_optarg ;;
1084
c906108c 1085 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1086 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1087 ac_prev=localstatedir ;;
1088 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1089 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1090 localstatedir=$ac_optarg ;;
c906108c
SS
1091
1092 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093 ac_prev=mandir ;;
1094 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1095 mandir=$ac_optarg ;;
c906108c
SS
1096
1097 -nfp | --nfp | --nf)
1098 # Obsolete; use --without-fp.
1099 with_fp=no ;;
1100
1101 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1102 | --no-cr | --no-c | -n)
c906108c
SS
1103 no_create=yes ;;
1104
1105 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107 no_recursion=yes ;;
1108
1109 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111 | --oldin | --oldi | --old | --ol | --o)
1112 ac_prev=oldincludedir ;;
1113 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1116 oldincludedir=$ac_optarg ;;
c906108c
SS
1117
1118 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119 ac_prev=prefix ;;
1120 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1121 prefix=$ac_optarg ;;
c906108c
SS
1122
1123 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124 | --program-pre | --program-pr | --program-p)
1125 ac_prev=program_prefix ;;
1126 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1128 program_prefix=$ac_optarg ;;
c906108c
SS
1129
1130 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131 | --program-suf | --program-su | --program-s)
1132 ac_prev=program_suffix ;;
1133 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1135 program_suffix=$ac_optarg ;;
c906108c
SS
1136
1137 -program-transform-name | --program-transform-name \
1138 | --program-transform-nam | --program-transform-na \
1139 | --program-transform-n | --program-transform- \
1140 | --program-transform | --program-transfor \
1141 | --program-transfo | --program-transf \
1142 | --program-trans | --program-tran \
1143 | --progr-tra | --program-tr | --program-t)
1144 ac_prev=program_transform_name ;;
1145 -program-transform-name=* | --program-transform-name=* \
1146 | --program-transform-nam=* | --program-transform-na=* \
1147 | --program-transform-n=* | --program-transform-=* \
1148 | --program-transform=* | --program-transfor=* \
1149 | --program-transfo=* | --program-transf=* \
1150 | --program-trans=* | --program-tran=* \
1151 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1152 program_transform_name=$ac_optarg ;;
c906108c 1153
81ecdfbb
RW
1154 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155 ac_prev=pdfdir ;;
1156 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157 pdfdir=$ac_optarg ;;
1158
1159 -psdir | --psdir | --psdi | --psd | --ps)
1160 ac_prev=psdir ;;
1161 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162 psdir=$ac_optarg ;;
1163
c906108c
SS
1164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165 | -silent | --silent | --silen | --sile | --sil)
1166 silent=yes ;;
1167
1168 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169 ac_prev=sbindir ;;
1170 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171 | --sbi=* | --sb=*)
bec39cab 1172 sbindir=$ac_optarg ;;
c906108c
SS
1173
1174 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176 | --sharedst | --shareds | --shared | --share | --shar \
1177 | --sha | --sh)
1178 ac_prev=sharedstatedir ;;
1179 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182 | --sha=* | --sh=*)
bec39cab 1183 sharedstatedir=$ac_optarg ;;
c906108c
SS
1184
1185 -site | --site | --sit)
1186 ac_prev=site ;;
1187 -site=* | --site=* | --sit=*)
bec39cab 1188 site=$ac_optarg ;;
3ace7edb 1189
c906108c
SS
1190 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191 ac_prev=srcdir ;;
1192 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1193 srcdir=$ac_optarg ;;
c906108c
SS
1194
1195 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196 | --syscon | --sysco | --sysc | --sys | --sy)
1197 ac_prev=sysconfdir ;;
1198 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1200 sysconfdir=$ac_optarg ;;
c906108c
SS
1201
1202 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1203 ac_prev=target_alias ;;
c906108c 1204 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1205 target_alias=$ac_optarg ;;
c906108c
SS
1206
1207 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208 verbose=yes ;;
1209
bec39cab
AC
1210 -version | --version | --versio | --versi | --vers | -V)
1211 ac_init_version=: ;;
c906108c
SS
1212
1213 -with-* | --with-*)
81ecdfbb 1214 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1215 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217 as_fn_error "invalid package name: $ac_useropt"
1218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
b4e70030 1226 esac
81ecdfbb 1227 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1228
1229 -without-* | --without-*)
81ecdfbb 1230 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1231 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1232 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233 as_fn_error "invalid package name: $ac_useropt"
1234 ac_useropt_orig=$ac_useropt
1235 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236 case $ac_user_opts in
1237 *"
1238"with_$ac_useropt"
1239"*) ;;
1240 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241 ac_unrecognized_sep=', ';;
1242 esac
1243 eval with_$ac_useropt=no ;;
c906108c
SS
1244
1245 --x)
1246 # Obsolete; use --with-x.
1247 with_x=yes ;;
1248
1249 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250 | --x-incl | --x-inc | --x-in | --x-i)
1251 ac_prev=x_includes ;;
1252 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1254 x_includes=$ac_optarg ;;
c906108c
SS
1255
1256 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258 ac_prev=x_libraries ;;
1259 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1261 x_libraries=$ac_optarg ;;
c906108c 1262
81ecdfbb
RW
1263 -*) as_fn_error "unrecognized option: \`$ac_option'
1264Try \`$0 --help' for more information."
c906108c
SS
1265 ;;
1266
bec39cab
AC
1267 *=*)
1268 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1270 case $ac_envvar in #(
1271 '' | [0-9]* | *[!_$as_cr_alnum]* )
1272 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1273 esac
1274 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1275 export $ac_envvar ;;
1276
c906108c 1277 *)
bec39cab 1278 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1279 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1280 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1281 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1282 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1283 ;;
1284
1285 esac
1286done
1287
1288if test -n "$ac_prev"; then
bec39cab 1289 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1290 as_fn_error "missing argument to $ac_option"
c906108c 1291fi
c906108c 1292
81ecdfbb
RW
1293if test -n "$ac_unrecognized_opts"; then
1294 case $enable_option_checking in
1295 no) ;;
1296 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1297 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1298 esac
81ecdfbb 1299fi
b4e70030 1300
81ecdfbb
RW
1301# Check all directory arguments for consistency.
1302for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303 datadir sysconfdir sharedstatedir localstatedir includedir \
1304 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1305 libdir localedir mandir
b4e70030 1306do
81ecdfbb
RW
1307 eval ac_val=\$$ac_var
1308 # Remove trailing slashes.
1309 case $ac_val in
1310 */ )
1311 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312 eval $ac_var=\$ac_val;;
1313 esac
1314 # Be sure to have absolute directory names.
b4e70030 1315 case $ac_val in
81ecdfbb
RW
1316 [\\/$]* | ?:[\\/]* ) continue;;
1317 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1318 esac
81ecdfbb 1319 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1320done
1321
bec39cab
AC
1322# There might be people who depend on the old broken behavior: `$host'
1323# used to hold the argument of --host etc.
1324# FIXME: To remove some day.
1325build=$build_alias
1326host=$host_alias
1327target=$target_alias
1328
1329# FIXME: To remove some day.
1330if test "x$host_alias" != x; then
1331 if test "x$build_alias" = x; then
1332 cross_compiling=maybe
81ecdfbb 1333 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1334 If a cross compiler is detected then cross compile mode will be used." >&2
1335 elif test "x$build_alias" != "x$host_alias"; then
1336 cross_compiling=yes
1337 fi
1338fi
c906108c 1339
bec39cab
AC
1340ac_tool_prefix=
1341test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343test "$silent" = yes && exec 6>/dev/null
c906108c 1344
c906108c 1345
81ecdfbb
RW
1346ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347ac_ls_di=`ls -di .` &&
1348ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1349 as_fn_error "working directory cannot be determined"
1350test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1351 as_fn_error "pwd does not report name of working directory"
1352
1353
c906108c
SS
1354# Find the source files, if location was not specified.
1355if test -z "$srcdir"; then
1356 ac_srcdir_defaulted=yes
81ecdfbb
RW
1357 # Try the directory containing this script, then the parent directory.
1358 ac_confdir=`$as_dirname -- "$as_myself" ||
1359$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360 X"$as_myself" : 'X\(//\)[^/]' \| \
1361 X"$as_myself" : 'X\(//\)$' \| \
1362 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1363$as_echo X"$as_myself" |
1364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)[^/].*/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\).*/{
1377 s//\1/
1378 q
1379 }
1380 s/.*/./; q'`
c906108c 1381 srcdir=$ac_confdir
81ecdfbb 1382 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1383 srcdir=..
1384 fi
1385else
1386 ac_srcdir_defaulted=no
1387fi
81ecdfbb
RW
1388if test ! -r "$srcdir/$ac_unique_file"; then
1389 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1390 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1391fi
1392ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393ac_abs_confdir=`(
1394 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1395 pwd)`
1396# When building in place, set srcdir=.
1397if test "$ac_abs_confdir" = "$ac_pwd"; then
1398 srcdir=.
1399fi
1400# Remove unnecessary trailing slashes from srcdir.
1401# Double slashes in file names in object file debugging info
1402# mess up M-x gdb in Emacs.
1403case $srcdir in
1404*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405esac
1406for ac_var in $ac_precious_vars; do
1407 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_env_${ac_var}_value=\$${ac_var}
1409 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411done
c906108c 1412
bec39cab
AC
1413#
1414# Report the --help message.
1415#
1416if test "$ac_init_help" = "long"; then
1417 # Omit some internal or obsolete options to make the list less imposing.
1418 # This message is too long to be a string in the A/UX 3.1 sh.
1419 cat <<_ACEOF
1420\`configure' configures this package to adapt to many kinds of systems.
1421
1422Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425VAR=VALUE. See below for descriptions of some of the useful variables.
1426
1427Defaults for the options are specified in brackets.
1428
1429Configuration:
1430 -h, --help display this help and exit
1431 --help=short display options specific to this package
1432 --help=recursive display the short help of all the included packages
1433 -V, --version display version information and exit
1434 -q, --quiet, --silent do not print \`checking...' messages
1435 --cache-file=FILE cache test results in FILE [disabled]
1436 -C, --config-cache alias for \`--cache-file=config.cache'
1437 -n, --no-create do not create output files
1438 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1439
bec39cab
AC
1440Installation directories:
1441 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1442 [$ac_default_prefix]
bec39cab 1443 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1444 [PREFIX]
bec39cab
AC
1445
1446By default, \`make install' will install all the files in
1447\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1448an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449for instance \`--prefix=\$HOME'.
1450
1451For better control, use the options below.
1452
1453Fine tuning of the installation directories:
81ecdfbb
RW
1454 --bindir=DIR user executables [EPREFIX/bin]
1455 --sbindir=DIR system admin executables [EPREFIX/sbin]
1456 --libexecdir=DIR program executables [EPREFIX/libexec]
1457 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1458 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1459 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1460 --libdir=DIR object code libraries [EPREFIX/lib]
1461 --includedir=DIR C header files [PREFIX/include]
1462 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1463 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1464 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1465 --infodir=DIR info documentation [DATAROOTDIR/info]
1466 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1467 --mandir=DIR man documentation [DATAROOTDIR/man]
1468 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1469 --htmldir=DIR html documentation [DOCDIR]
1470 --dvidir=DIR dvi documentation [DOCDIR]
1471 --pdfdir=DIR pdf documentation [DOCDIR]
1472 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1473_ACEOF
1474
1475 cat <<\_ACEOF
1476
9009e1ae
MR
1477Program names:
1478 --program-prefix=PREFIX prepend PREFIX to installed program names
1479 --program-suffix=SUFFIX append SUFFIX to installed program names
1480 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1481
bec39cab
AC
1482X features:
1483 --x-includes=DIR X include files are in DIR
1484 --x-libraries=DIR X library files are in DIR
1485
1486System types:
1487 --build=BUILD configure for building on BUILD [guessed]
1488 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1489 --target=TARGET configure for building compilers for TARGET [HOST]
1490_ACEOF
1491fi
1492
1493if test -n "$ac_init_help"; then
1494
1495 cat <<\_ACEOF
1496
1497Optional Features:
81ecdfbb 1498 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1499 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1500 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1501 --enable-maintainer-mode enable make rules and dependencies not useful
1502 (and sometimes confusing) to the casual installer
2974be62 1503 --enable-plugins Enable support for plugins
da2f07f1 1504 --disable-largefile omit support for large files
3bc3d82a 1505 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1506 --enable-targets=TARGETS
1507 alternative target configurations
c0993dbe 1508 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1509 --disable-gdbcli disable command-line interface (CLI)
1510 --disable-gdbmi disable machine-interface (MI)
1511 --enable-tui enable full-screen terminal user interface (TUI)
1512 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1513 --enable-profiling enable profiling of GDB
3841debe 1514 --disable-rpath do not hardcode runtime library paths
17ef446e 1515 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1516 --enable-werror treat compile warnings as errors
32c1c914 1517 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1518 --enable-gdb-build-warnings
32c1c914 1519 enable GDB specific build-time compiler warnings if
a1220294 1520 gcc is used
32c1c914 1521 --enable-sim link gdb with simulator
bec39cab 1522 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1523 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1524 is auto)
bec39cab
AC
1525
1526Optional Packages:
1527 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1528 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1529 --with-separate-debug-dir=PATH
32c1c914 1530 look for global separate debug info in this path
62e4f60c 1531 [LIBDIR/debug]
b14b1491
TT
1532 --with-gdb-datadir=PATH look for global separate data files in this path
1533 [DATADIR/gdb]
29b0e8a2 1534 --with-relocated-sources=PATH
32c1c914 1535 automatically relocate this path for source files
7349ff92 1536 --with-auto-load-dir=PATH
aff139ff 1537 directories from which to load auto-loaded scripts
1564a261 1538 [$debugdir:$datadir/auto-load]
bccbefd2 1539 --with-auto-load-safe-path=PATH
aff139ff 1540 directories safe to hold auto-loaded files
7349ff92 1541 [--with-auto-load-dir]
bccbefd2
JK
1542 --without-auto-load-safe-path
1543 do not restrict auto-loaded files locations
05e7c244 1544 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1545 --with-curses use the curses library instead of the termcap
1546 library
c16158bc
JM
1547 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1548 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1549 --with-system-zlib use installed libz
016a3251
DD
1550 --with-gnu-ld assume the C compiler uses GNU ld default=no
1551 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1552 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1553 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1554 --with-system-readline use installed readline library
b8e0a31c
SD
1555 --with-jit-reader-dir=PATH
1556 directory to load the JIT readers from
5c39566f 1557 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1558 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1559 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1560 --with-python[=PYTHON] include python support
1561 (auto/yes/no/<python-program>)
ed3ef339
DE
1562 --with-guile[=GUILE] include guile support
1563 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1564 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1565 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1566 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1567 --without-included-regex
1568 don't use included regex; this is the default on
1569 systems with version 2 of the GNU C library (use
1570 with caution on other system)
81ecdfbb 1571 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1572 --with-system-gdbinit=PATH
32c1c914 1573 automatically load a system-wide gdbinit file
608e2dbb
TT
1574 --with-lzma support lzma compression (auto/yes/no)
1575 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1576 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1577 --with-tcl directory containing tcl configuration (tclConfig.sh)
1578 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1579 --with-x use the X Window System
393fd4c3
YQ
1580 --with-babeltrace include babeltrace support (auto/yes/no)
1581 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1582 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1583
1584Some influential environment variables:
1585 CC C compiler command
1586 CFLAGS C compiler flags
1587 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1588 nonstandard directory <lib dir>
81ecdfbb
RW
1589 LIBS libraries to pass to the linker, e.g. -l<library>
1590 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1591 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1592 CXX C++ compiler command
1593 CXXFLAGS C++ compiler flags
bec39cab 1594 CPP C preprocessor
f06e05e0
JK
1595 MAKEINFO Parent configure detects if it is of sufficient version.
1596 MAKEINFOFLAGS
1597 Parameters for MAKEINFO.
81ecdfbb
RW
1598 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1599 the first program found out of: `bison -y', `byacc', `yacc'.
1600 YFLAGS The list of arguments that will be passed by default to $YACC.
1601 This script will default YFLAGS to the empty string to avoid a
1602 default value of `-d' given by some make applications.
1603 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1604
1605Use these variables to override the choices made by `configure' or to help
1606it to find libraries and programs with nonstandard names/locations.
1607
81ecdfbb 1608Report bugs to the package provider.
bec39cab 1609_ACEOF
81ecdfbb 1610ac_status=$?
bec39cab
AC
1611fi
1612
1613if test "$ac_init_help" = "recursive"; then
1614 # If there are subdirs, report their specific --help.
bec39cab 1615 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1616 test -d "$ac_dir" ||
1617 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618 continue
bec39cab
AC
1619 ac_builddir=.
1620
81ecdfbb
RW
1621case "$ac_dir" in
1622.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623*)
1624 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1625 # A ".." for each directory in $ac_dir_suffix.
1626 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1627 case $ac_top_builddir_sub in
1628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 esac ;;
1631esac
1632ac_abs_top_builddir=$ac_pwd
1633ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634# for backward compatibility:
1635ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1636
1637case $srcdir in
81ecdfbb 1638 .) # We are building in place.
bec39cab 1639 ac_srcdir=.
81ecdfbb
RW
1640 ac_top_srcdir=$ac_top_builddir_sub
1641 ac_abs_top_srcdir=$ac_pwd ;;
1642 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1643 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1644 ac_top_srcdir=$srcdir
1645 ac_abs_top_srcdir=$srcdir ;;
1646 *) # Relative name.
1647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648 ac_top_srcdir=$ac_top_build_prefix$srcdir
1649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1650esac
81ecdfbb 1651ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1652
81ecdfbb
RW
1653 cd "$ac_dir" || { ac_status=$?; continue; }
1654 # Check for guested configure.
1655 if test -f "$ac_srcdir/configure.gnu"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658 elif test -f "$ac_srcdir/configure"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1661 else
81ecdfbb
RW
1662 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1663 fi || ac_status=$?
1664 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1665 done
1666fi
1667
81ecdfbb 1668test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1669if $ac_init_version; then
1670 cat <<\_ACEOF
81ecdfbb
RW
1671configure
1672generated by GNU Autoconf 2.64
bec39cab 1673
81ecdfbb 1674Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1675This configure script is free software; the Free Software Foundation
1676gives unlimited permission to copy, distribute and modify it.
1677_ACEOF
81ecdfbb 1678 exit
bec39cab 1679fi
bec39cab 1680
81ecdfbb
RW
1681## ------------------------ ##
1682## Autoconf initialization. ##
1683## ------------------------ ##
bec39cab 1684
81ecdfbb
RW
1685# ac_fn_c_try_compile LINENO
1686# --------------------------
1687# Try to compile conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_compile ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 rm -f conftest.$ac_objext
1692 if { { ac_try="$ac_compile"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_compile") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && {
1708 test -z "$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 } && test -s conftest.$ac_objext; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1715
81ecdfbb
RW
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1719 return $ac_retval
1720
1721} # ac_fn_c_try_compile
1722
3bc3d82a
PA
1723# ac_fn_cxx_try_compile LINENO
1724# ----------------------------
1725# Try to compile conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_cxx_try_compile ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext
1730 if { { ac_try="$ac_compile"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_compile") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_cxx_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest.$ac_objext; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757 return $ac_retval
1758
1759} # ac_fn_cxx_try_compile
1760
81ecdfbb
RW
1761# ac_fn_c_try_cpp LINENO
1762# ----------------------
1763# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_cpp ()
bec39cab 1765{
81ecdfbb
RW
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767 if { { ac_try="$ac_cpp conftest.$ac_ext"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } >/dev/null && {
1783 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 }; then :
1786 ac_retval=0
1787else
1788 $as_echo "$as_me: failed program was:" >&5
1789sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1790
81ecdfbb
RW
1791 ac_retval=1
1792fi
1793 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1794 return $ac_retval
bec39cab 1795
81ecdfbb 1796} # ac_fn_c_try_cpp
bec39cab 1797
81ecdfbb
RW
1798# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799# -------------------------------------------------------
1800# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801# the include files in INCLUDES and setting the cache variable VAR
1802# accordingly.
1803ac_fn_c_check_header_mongrel ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808$as_echo_n "checking for $2... " >&6; }
1809if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1810 $as_echo_n "(cached) " >&6
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815else
1816 # Is the header compilable?
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818$as_echo_n "checking $2 usability... " >&6; }
1819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_compile "$LINENO"; then :
1825 ac_header_compiler=yes
1826else
1827 ac_header_compiler=no
1828fi
1829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831$as_echo "$ac_header_compiler" >&6; }
bec39cab 1832
81ecdfbb
RW
1833# Is the header present?
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835$as_echo_n "checking $2 presence... " >&6; }
1836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_cpp "$LINENO"; then :
1841 ac_header_preproc=yes
1842else
1843 ac_header_preproc=no
1844fi
1845rm -f conftest.err conftest.$ac_ext
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847$as_echo "$ac_header_preproc" >&6; }
bec39cab 1848
81ecdfbb
RW
1849# So? What about this header?
1850case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851 yes:no: )
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856 ;;
1857 no:yes:* )
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1861$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1865$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868 ;;
1869esac
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
1872if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873 $as_echo_n "(cached) " >&6
1874else
1875 eval "$3=\$ac_header_compiler"
1876fi
1877eval ac_res=\$$3
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1879$as_echo "$ac_res" >&6; }
1880fi
1881 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1882
81ecdfbb 1883} # ac_fn_c_check_header_mongrel
bec39cab 1884
81ecdfbb
RW
1885# ac_fn_c_try_run LINENO
1886# ----------------------
1887# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1888# that executables *can* be run.
1889ac_fn_c_try_run ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 if { { ac_try="$ac_link"
1893case "(($ac_try" in
1894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1895 *) ac_try_echo=$ac_try;;
1896esac
1897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1898$as_echo "$ac_try_echo"; } >&5
1899 (eval "$ac_link") 2>&5
1900 ac_status=$?
1901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1902 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1903 { { case "(($ac_try" in
1904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905 *) ac_try_echo=$ac_try;;
1906esac
1907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908$as_echo "$ac_try_echo"; } >&5
1909 (eval "$ac_try") 2>&5
1910 ac_status=$?
1911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; }; }; then :
1913 ac_retval=0
1914else
1915 $as_echo "$as_me: program exited with status $ac_status" >&5
1916 $as_echo "$as_me: failed program was:" >&5
1917sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1918
81ecdfbb
RW
1919 ac_retval=$ac_status
1920fi
1921 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1922 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1923 return $ac_retval
bec39cab 1924
81ecdfbb 1925} # ac_fn_c_try_run
bec39cab 1926
81ecdfbb
RW
1927# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1928# -------------------------------------------------------
1929# Tests whether HEADER exists and can be compiled using the include files in
1930# INCLUDES, setting the cache variable VAR accordingly.
1931ac_fn_c_check_header_compile ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1935$as_echo_n "checking for $2... " >&6; }
1936if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1937 $as_echo_n "(cached) " >&6
1938else
1939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940/* end confdefs.h. */
1941$4
1942#include <$2>
bec39cab 1943_ACEOF
81ecdfbb
RW
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 eval "$3=yes"
1946else
1947 eval "$3=no"
1948fi
1949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1950fi
1951eval ac_res=\$$3
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1953$as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1955
81ecdfbb 1956} # ac_fn_c_check_header_compile
bec39cab 1957
2974be62
AM
1958# ac_fn_c_try_link LINENO
1959# -----------------------
1960# Try to link conftest.$ac_ext, and return whether this succeeded.
1961ac_fn_c_try_link ()
1962{
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 rm -f conftest.$ac_objext conftest$ac_exeext
1965 if { { ac_try="$ac_link"
1966case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>conftest.err
1973 ac_status=$?
1974 if test -s conftest.err; then
1975 grep -v '^ *+' conftest.err >conftest.er1
1976 cat conftest.er1 >&5
1977 mv -f conftest.er1 conftest.err
1978 fi
1979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980 test $ac_status = 0; } && {
1981 test -z "$ac_c_werror_flag" ||
1982 test ! -s conftest.err
1983 } && test -s conftest$ac_exeext && {
1984 test "$cross_compiling" = yes ||
1985 $as_test_x conftest$ac_exeext
1986 }; then :
1987 ac_retval=0
1988else
1989 $as_echo "$as_me: failed program was:" >&5
1990sed 's/^/| /' conftest.$ac_ext >&5
1991
1992 ac_retval=1
1993fi
1994 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1995 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1996 # interfere with the next link command; also delete a directory that is
1997 # left behind by Apple's compiler. We do this before executing the actions.
1998 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1999 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000 return $ac_retval
2001
2002} # ac_fn_c_try_link
2003
81ecdfbb
RW
2004# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005# --------------------------------------------
2006# Tries to find the compile-time value of EXPR in a program that includes
2007# INCLUDES, setting VAR accordingly. Returns whether the value could be
2008# computed
2009ac_fn_c_compute_int ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 if test "$cross_compiling" = yes; then
2013 # Depending upon the size, compute the lo and hi bounds.
2014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) >= 0)];
2021test_array [0] = 0
bec39cab 2022
81ecdfbb
RW
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_lo=0 ac_mid=0
2029 while :; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2037test_array [0] = 0
bec39cab 2038
81ecdfbb
RW
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_hi=$ac_mid; break
2045else
2046 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047 if test $ac_lo -le $ac_mid; then
2048 ac_lo= ac_hi=
2049 break
2050 fi
2051 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2052fi
81ecdfbb
RW
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 done
c906108c 2055else
81ecdfbb
RW
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) < 0)];
2063test_array [0] = 0
bec39cab 2064
81ecdfbb
RW
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=-1 ac_mid=-1
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2079test_array [0] = 0
bec39cab 2080
81ecdfbb
RW
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=$ac_mid; break
2087else
2088 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089 if test $ac_mid -le $ac_hi; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 ac_lo= ac_hi=
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103# Binary search between lo and hi bounds.
2104while test "x$ac_lo" != "x$ac_hi"; do
2105 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2113test_array [0] = 0
bec39cab 2114
81ecdfbb
RW
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid
2121else
2122 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125done
2126case $ac_lo in #((
2127?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128'') ac_retval=1 ;;
2129esac
2130 else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134static long int longval () { return $2; }
2135static unsigned long int ulongval () { return $2; }
2136#include <stdio.h>
2137#include <stdlib.h>
2138int
2139main ()
2140{
bec39cab 2141
81ecdfbb
RW
2142 FILE *f = fopen ("conftest.val", "w");
2143 if (! f)
2144 return 1;
2145 if (($2) < 0)
2146 {
2147 long int i = longval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%ld", i);
2151 }
2152 else
2153 {
2154 unsigned long int i = ulongval ();
2155 if (i != ($2))
2156 return 1;
2157 fprintf (f, "%lu", i);
2158 }
2159 /* Do not output a trailing newline, as this causes \r\n confusion
2160 on some platforms. */
2161 return ferror (f) || fclose (f) != 0;
bec39cab 2162
81ecdfbb
RW
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_run "$LINENO"; then :
2168 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169else
2170 ac_retval=1
2171fi
2172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173 conftest.$ac_objext conftest.beam conftest.$ac_ext
2174rm -f conftest.val
bec39cab 2175
81ecdfbb
RW
2176 fi
2177 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2178 return $ac_retval
bec39cab 2179
81ecdfbb 2180} # ac_fn_c_compute_int
bec39cab 2181
55a8c076
YQ
2182# ac_fn_c_check_func LINENO FUNC VAR
2183# ----------------------------------
2184# Tests whether FUNC exists, setting the cache variable VAR accordingly
2185ac_fn_c_check_func ()
81ecdfbb
RW
2186{
2187 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189$as_echo_n "checking for $2... " >&6; }
2190if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2191 $as_echo_n "(cached) " >&6
2192else
81ecdfbb
RW
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
55a8c076
YQ
2195/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2197#define $2 innocuous_$2
2198
2199/* System header to define __stub macros and hopefully few prototypes,
2200 which can conflict with char $2 (); below.
2201 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202 <limits.h> exists even on freestanding compilers. */
2203
2204#ifdef __STDC__
2205# include <limits.h>
2206#else
2207# include <assert.h>
2208#endif
2209
2210#undef $2
2211
2212/* Override any GCC internal prototype to avoid an error.
2213 Use char because int might match the return type of a GCC
2214 builtin and then its argument prototype would still apply. */
2215#ifdef __cplusplus
2216extern "C"
2217#endif
2218char $2 ();
2219/* The GNU C library defines this for functions which it implements
2220 to always fail with ENOSYS. Some functions are actually named
2221 something starting with __ and the normal name is an alias. */
2222#if defined __stub_$2 || defined __stub___$2
2223choke me
2224#endif
2225
2226int
2227main ()
2228{
2229return $2 ();
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_link "$LINENO"; then :
2235 eval "$3=yes"
2236else
2237 eval "$3=no"
2238fi
2239rm -f core conftest.err conftest.$ac_objext \
2240 conftest$ac_exeext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
2245 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2246
2247} # ac_fn_c_check_func
2248
07697489
PA
2249# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2250# -------------------------------------------
2251# Tests whether TYPE exists after having included INCLUDES, setting cache
2252# variable VAR accordingly.
2253ac_fn_c_check_type ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
2258if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2259 $as_echo_n "(cached) " >&6
2260else
2261 eval "$3=no"
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268if (sizeof ($2))
2269 return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$4
2278int
2279main ()
2280{
2281if (sizeof (($2)))
2282 return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288
2289else
2290 eval "$3=yes"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$3
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
2299 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2300
2301} # ac_fn_c_check_type
2302
770d76d7
PA
2303# ac_fn_c_check_decl LINENO SYMBOL VAR
2304# ------------------------------------
2305# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2306ac_fn_c_check_decl ()
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 as_decl_name=`echo $2|sed 's/ *(.*//'`
2310 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$4
2319int
2320main ()
2321{
2322#ifndef $as_decl_name
2323#ifdef __cplusplus
2324 (void) $as_decl_use;
2325#else
2326 (void) $as_decl_name;
2327#endif
2328#endif
2329
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$3=yes"
2336else
2337 eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$3
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
2344 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2345
2346} # ac_fn_c_check_decl
2347
55a8c076
YQ
2348# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2349# ----------------------------------------------------
2350# Tries to find if the field MEMBER exists in type AGGR, after including
2351# INCLUDES, setting cache variable VAR accordingly.
2352ac_fn_c_check_member ()
2353{
2354 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2356$as_echo_n "checking for $2.$3... " >&6; }
2357if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$5
2363int
2364main ()
2365{
2366static $2 ac_aggr;
2367if (ac_aggr.$3)
2368return 0;
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"; then :
2374 eval "$4=yes"
2375else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377/* end confdefs.h. */
2378$5
2379int
2380main ()
2381{
2382static $2 ac_aggr;
2383if (sizeof ac_aggr.$3)
2384return 0;
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$4=yes"
2391else
2392 eval "$4=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$4
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2402
2403} # ac_fn_c_check_member
54019719
PA
2404
2405# ac_fn_cxx_check_decl LINENO SYMBOL VAR
2406# --------------------------------------
2407# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2408ac_fn_cxx_check_decl ()
2409{
2410 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411 as_decl_name=`echo $2|sed 's/ *(.*//'`
2412 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2414$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2415if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2416 $as_echo_n "(cached) " >&6
2417else
2418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2419/* end confdefs.h. */
2420$4
2421int
2422main ()
2423{
2424#ifndef $as_decl_name
2425#ifdef __cplusplus
2426 (void) $as_decl_use;
2427#else
2428 (void) $as_decl_name;
2429#endif
2430#endif
2431
2432 ;
2433 return 0;
2434}
2435_ACEOF
2436if ac_fn_cxx_try_compile "$LINENO"; then :
2437 eval "$3=yes"
2438else
2439 eval "$3=no"
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442fi
2443eval ac_res=\$$3
2444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2445$as_echo "$ac_res" >&6; }
2446 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2447
2448} # ac_fn_cxx_check_decl
81ecdfbb
RW
2449cat >config.log <<_ACEOF
2450This file contains any messages produced by compilers while
2451running configure, to aid debugging if configure makes a mistake.
d5af19ba 2452
81ecdfbb
RW
2453It was created by $as_me, which was
2454generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2455
81ecdfbb 2456 $ $0 $@
413ccac7 2457
81ecdfbb
RW
2458_ACEOF
2459exec 5>>config.log
2460{
2461cat <<_ASUNAME
2462## --------- ##
2463## Platform. ##
2464## --------- ##
413ccac7 2465
81ecdfbb
RW
2466hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2467uname -m = `(uname -m) 2>/dev/null || echo unknown`
2468uname -r = `(uname -r) 2>/dev/null || echo unknown`
2469uname -s = `(uname -s) 2>/dev/null || echo unknown`
2470uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2471
81ecdfbb
RW
2472/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2473/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2474
81ecdfbb
RW
2475/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2476/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2477/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2478/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2479/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2480/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2481/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2482
81ecdfbb 2483_ASUNAME
bec39cab 2484
bec39cab
AC
2485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2490 $as_echo "PATH: $as_dir"
2491 done
2492IFS=$as_save_IFS
bec39cab 2493
81ecdfbb 2494} >&5
bec39cab 2495
81ecdfbb 2496cat >&5 <<_ACEOF
bec39cab 2497
bec39cab 2498
81ecdfbb
RW
2499## ----------- ##
2500## Core tests. ##
2501## ----------- ##
2502
2503_ACEOF
2504
2505
2506# Keep a trace of the command line.
2507# Strip out --no-create and --no-recursion so they do not pile up.
2508# Strip out --silent because we don't want to record it for future runs.
2509# Also quote any args containing shell meta-characters.
2510# Make two passes to allow for proper duplicate-argument suppression.
2511ac_configure_args=
2512ac_configure_args0=
2513ac_configure_args1=
2514ac_must_keep_next=false
2515for ac_pass in 1 2
2516do
2517 for ac_arg
2518 do
2519 case $ac_arg in
2520 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2521 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2522 | -silent | --silent | --silen | --sile | --sil)
2523 continue ;;
2524 *\'*)
2525 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2526 esac
2527 case $ac_pass in
2528 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2529 2)
2530 as_fn_append ac_configure_args1 " '$ac_arg'"
2531 if test $ac_must_keep_next = true; then
2532 ac_must_keep_next=false # Got value, back to normal.
2533 else
2534 case $ac_arg in
2535 *=* | --config-cache | -C | -disable-* | --disable-* \
2536 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2537 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2538 | -with-* | --with-* | -without-* | --without-* | --x)
2539 case "$ac_configure_args0 " in
2540 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2541 esac
2542 ;;
2543 -* ) ac_must_keep_next=true ;;
2544 esac
2545 fi
2546 as_fn_append ac_configure_args " '$ac_arg'"
2547 ;;
2548 esac
2549 done
2550done
2551{ ac_configure_args0=; unset ac_configure_args0;}
2552{ ac_configure_args1=; unset ac_configure_args1;}
2553
2554# When interrupted or exit'd, cleanup temporary files, and complete
2555# config.log. We remove comments because anyway the quotes in there
2556# would cause problems or look ugly.
2557# WARNING: Use '\'' to represent an apostrophe within the trap.
2558# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2559trap 'exit_status=$?
2560 # Save into config.log some information that might help in debugging.
2561 {
2562 echo
2563
2564 cat <<\_ASBOX
2565## ---------------- ##
2566## Cache variables. ##
2567## ---------------- ##
2568_ASBOX
2569 echo
2570 # The following way of writing the cache mishandles newlines in values,
2571(
2572 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in #(
2575 *${as_nl}*)
2576 case $ac_var in #(
2577 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2578$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2579 esac
2580 case $ac_var in #(
2581 _ | IFS | as_nl) ;; #(
2582 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2583 *) { eval $ac_var=; unset $ac_var;} ;;
2584 esac ;;
2585 esac
2586 done
2587 (set) 2>&1 |
2588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2589 *${as_nl}ac_space=\ *)
2590 sed -n \
2591 "s/'\''/'\''\\\\'\'''\''/g;
2592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2593 ;; #(
2594 *)
2595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2596 ;;
2597 esac |
2598 sort
2599)
2600 echo
2601
2602 cat <<\_ASBOX
2603## ----------------- ##
2604## Output variables. ##
2605## ----------------- ##
2606_ASBOX
2607 echo
2608 for ac_var in $ac_subst_vars
2609 do
2610 eval ac_val=\$$ac_var
2611 case $ac_val in
2612 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2613 esac
2614 $as_echo "$ac_var='\''$ac_val'\''"
2615 done | sort
2616 echo
2617
2618 if test -n "$ac_subst_files"; then
2619 cat <<\_ASBOX
2620## ------------------- ##
2621## File substitutions. ##
2622## ------------------- ##
2623_ASBOX
2624 echo
2625 for ac_var in $ac_subst_files
2626 do
2627 eval ac_val=\$$ac_var
2628 case $ac_val in
2629 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2630 esac
2631 $as_echo "$ac_var='\''$ac_val'\''"
2632 done | sort
2633 echo
2634 fi
2635
2636 if test -s confdefs.h; then
2637 cat <<\_ASBOX
2638## ----------- ##
2639## confdefs.h. ##
2640## ----------- ##
2641_ASBOX
2642 echo
2643 cat confdefs.h
2644 echo
2645 fi
2646 test "$ac_signal" != 0 &&
2647 $as_echo "$as_me: caught signal $ac_signal"
2648 $as_echo "$as_me: exit $exit_status"
2649 } >&5
2650 rm -f core *.core core.conftest.* &&
2651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2652 exit $exit_status
2653' 0
2654for ac_signal in 1 2 13 15; do
2655 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2656done
2657ac_signal=0
2658
2659# confdefs.h avoids OS command line length limits that DEFS can exceed.
2660rm -f -r conftest* confdefs.h
2661
2662$as_echo "/* confdefs.h */" > confdefs.h
2663
2664# Predefined preprocessor variables.
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_NAME "$PACKAGE_NAME"
2668_ACEOF
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2672_ACEOF
2673
2674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_VERSION "$PACKAGE_VERSION"
2676_ACEOF
2677
2678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_STRING "$PACKAGE_STRING"
2680_ACEOF
2681
2682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2684_ACEOF
2685
2686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_URL "$PACKAGE_URL"
2688_ACEOF
2689
2690
2691# Let the site file select an alternate cache file if it wants to.
2692# Prefer an explicitly selected file to automatically selected ones.
2693ac_site_file1=NONE
2694ac_site_file2=NONE
2695if test -n "$CONFIG_SITE"; then
2696 ac_site_file1=$CONFIG_SITE
2697elif test "x$prefix" != xNONE; then
2698 ac_site_file1=$prefix/share/config.site
2699 ac_site_file2=$prefix/etc/config.site
2700else
2701 ac_site_file1=$ac_default_prefix/share/config.site
2702 ac_site_file2=$ac_default_prefix/etc/config.site
2703fi
2704for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2705do
2706 test "x$ac_site_file" = xNONE && continue
2707 if test -r "$ac_site_file"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2709$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2710 sed 's/^/| /' "$ac_site_file" >&5
2711 . "$ac_site_file"
2712 fi
2713done
2714
2715if test -r "$cache_file"; then
2716 # Some versions of bash will fail to source /dev/null (special
2717 # files actually), so we avoid doing that.
2718 if test -f "$cache_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
2721 case $cache_file in
2722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723 *) . "./$cache_file";;
2724 esac
2725 fi
2726else
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
2729 >$cache_file
bec39cab
AC
2730fi
2731
81ecdfbb
RW
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
2735for ac_var in $ac_precious_vars; do
2736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737 eval ac_new_set=\$ac_env_${ac_var}_set
2738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739 eval ac_new_val=\$ac_env_${ac_var}_value
2740 case $ac_old_set,$ac_new_set in
2741 set,)
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2744 ac_cache_corrupted=: ;;
2745 ,set)
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2748 ac_cache_corrupted=: ;;
2749 ,);;
2750 *)
2751 if test "x$ac_old_val" != "x$ac_new_val"; then
2752 # differences in whitespace do not lead to failure.
2753 ac_old_val_w=`echo x $ac_old_val`
2754 ac_new_val_w=`echo x $ac_new_val`
2755 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758 ac_cache_corrupted=:
2759 else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762 eval $ac_var=\$ac_old_val
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2765$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2768 fi;;
2769 esac
2770 # Pass precious variables to config.status.
2771 if test "$ac_new_set" = set; then
2772 case $ac_new_val in
2773 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2774 *) ac_arg=$ac_var=$ac_new_val ;;
2775 esac
2776 case " $ac_configure_args " in
2777 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2778 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2779 esac
2780 fi
2781done
2782if $ac_cache_corrupted; then
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2787 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2788fi
2789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
2792
2793ac_ext=c
2794ac_cpp='$CPP $CPPFLAGS'
2795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
2798
2799
2800
2801
2802
2803ac_config_headers="$ac_config_headers config.h:config.in"
2804
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2807$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2808 # Check whether --enable-maintainer-mode was given.
2809if test "${enable_maintainer_mode+set}" = set; then :
2810 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2811else
2812 USE_MAINTAINER_MODE=no
2813fi
2814
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2816$as_echo "$USE_MAINTAINER_MODE" >&6; }
2817 if test $USE_MAINTAINER_MODE = yes; then
2818 MAINTAINER_MODE_TRUE=
2819 MAINTAINER_MODE_FALSE='#'
2820else
2821 MAINTAINER_MODE_TRUE='#'
2822 MAINTAINER_MODE_FALSE=
2823fi
2824
2825 MAINT=$MAINTAINER_MODE_TRUE
2826
2827
2828
17ef446e 2829# Set the 'development' global.
270c9937 2830. $srcdir/../bfd/development.sh
f5f1cdb6 2831
81ecdfbb
RW
2832ac_ext=c
2833ac_cpp='$CPP $CPPFLAGS'
2834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2836ac_compiler_gnu=$ac_cv_c_compiler_gnu
2837if test -n "$ac_tool_prefix"; then
2838 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2839set dummy ${ac_tool_prefix}gcc; ac_word=$2
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2841$as_echo_n "checking for $ac_word... " >&6; }
2842if test "${ac_cv_prog_CC+set}" = set; then :
2843 $as_echo_n "(cached) " >&6
c906108c
SS
2844else
2845 if test -n "$CC"; then
2846 ac_cv_prog_CC="$CC" # Let the user override the test.
2847else
bec39cab
AC
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851 IFS=$as_save_IFS
2852 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2853 for ac_exec_ext in '' $ac_executable_extensions; do
2854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2855 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2857 break 2
2858 fi
2859done
81ecdfbb
RW
2860 done
2861IFS=$as_save_IFS
bec39cab 2862
c906108c
SS
2863fi
2864fi
bec39cab 2865CC=$ac_cv_prog_CC
c906108c 2866if test -n "$CC"; then
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2868$as_echo "$CC" >&6; }
c906108c 2869else
81ecdfbb
RW
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2871$as_echo "no" >&6; }
c906108c
SS
2872fi
2873
81ecdfbb 2874
b4e70030
JB
2875fi
2876if test -z "$ac_cv_prog_CC"; then
2877 ac_ct_CC=$CC
81ecdfbb
RW
2878 # Extract the first word of "gcc", so it can be a program name with args.
2879set dummy gcc; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
2882if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2883 $as_echo_n "(cached) " >&6
b4e70030
JB
2884else
2885 if test -n "$ac_ct_CC"; then
2886 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2895 ac_cv_prog_ac_ct_CC="gcc"
2896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2897 break 2
4e8d927d 2898 fi
b4e70030 2899done
81ecdfbb
RW
2900 done
2901IFS=$as_save_IFS
b4e70030
JB
2902
2903fi
2904fi
2905ac_ct_CC=$ac_cv_prog_ac_ct_CC
2906if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2908$as_echo "$ac_ct_CC" >&6; }
b4e70030 2909else
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
b4e70030
JB
2912fi
2913
81ecdfbb
RW
2914 if test "x$ac_ct_CC" = x; then
2915 CC=""
2916 else
2917 case $cross_compiling:$ac_tool_warned in
2918yes:)
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2921ac_tool_warned=yes ;;
2922esac
2923 CC=$ac_ct_CC
2924 fi
b4e70030
JB
2925else
2926 CC="$ac_cv_prog_CC"
2927fi
2928
c906108c 2929if test -z "$CC"; then
81ecdfbb
RW
2930 if test -n "$ac_tool_prefix"; then
2931 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2932set dummy ${ac_tool_prefix}cc; ac_word=$2
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2934$as_echo_n "checking for $ac_word... " >&6; }
2935if test "${ac_cv_prog_CC+set}" = set; then :
2936 $as_echo_n "(cached) " >&6
c906108c
SS
2937else
2938 if test -n "$CC"; then
2939 ac_cv_prog_CC="$CC" # Let the user override the test.
2940else
bec39cab
AC
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944 IFS=$as_save_IFS
2945 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2946 for ac_exec_ext in '' $ac_executable_extensions; do
2947 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2948 ac_cv_prog_CC="${ac_tool_prefix}cc"
2949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2950 break 2
2951 fi
2952done
81ecdfbb
RW
2953 done
2954IFS=$as_save_IFS
2955
2956fi
2957fi
2958CC=$ac_cv_prog_CC
2959if test -n "$CC"; then
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2961$as_echo "$CC" >&6; }
2962else
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2964$as_echo "no" >&6; }
2965fi
2966
2967
2968 fi
2969fi
2970if test -z "$CC"; then
2971 # Extract the first word of "cc", so it can be a program name with args.
2972set dummy cc; ac_word=$2
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2974$as_echo_n "checking for $ac_word... " >&6; }
2975if test "${ac_cv_prog_CC+set}" = set; then :
2976 $as_echo_n "(cached) " >&6
2977else
2978 if test -n "$CC"; then
2979 ac_cv_prog_CC="$CC" # Let the user override the test.
2980else
2981 ac_prog_rejected=no
2982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983for as_dir in $PATH
2984do
2985 IFS=$as_save_IFS
2986 test -z "$as_dir" && as_dir=.
2987 for ac_exec_ext in '' $ac_executable_extensions; do
2988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2989 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2990 ac_prog_rejected=yes
2991 continue
2992 fi
2993 ac_cv_prog_CC="cc"
2994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995 break 2
2996 fi
2997done
2998 done
2999IFS=$as_save_IFS
bec39cab 3000
c906108c
SS
3001if test $ac_prog_rejected = yes; then
3002 # We found a bogon in the path, so make sure we never use it.
3003 set dummy $ac_cv_prog_CC
3004 shift
bec39cab 3005 if test $# != 0; then
c906108c
SS
3006 # We chose a different compiler from the bogus one.
3007 # However, it has the same basename, so the bogon will be chosen
3008 # first if we set CC to just the basename; use the full file name.
3009 shift
bec39cab 3010 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3011 fi
3012fi
3013fi
3014fi
bec39cab 3015CC=$ac_cv_prog_CC
c906108c 3016if test -n "$CC"; then
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
c906108c 3019else
81ecdfbb
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
c906108c
SS
3022fi
3023
81ecdfbb 3024
bec39cab
AC
3025fi
3026if test -z "$CC"; then
3027 if test -n "$ac_tool_prefix"; then
81ecdfbb 3028 for ac_prog in cl.exe
bec39cab
AC
3029 do
3030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
3034if test "${ac_cv_prog_CC+set}" = set; then :
3035 $as_echo_n "(cached) " >&6
c906108c
SS
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
bec39cab
AC
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3047 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3049 break 2
3050 fi
3051done
81ecdfbb
RW
3052 done
3053IFS=$as_save_IFS
bec39cab 3054
c906108c
SS
3055fi
3056fi
bec39cab 3057CC=$ac_cv_prog_CC
c906108c 3058if test -n "$CC"; then
81ecdfbb
RW
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3060$as_echo "$CC" >&6; }
c906108c 3061else
81ecdfbb
RW
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
c906108c 3064fi
bec39cab 3065
81ecdfbb 3066
bec39cab
AC
3067 test -n "$CC" && break
3068 done
3069fi
3070if test -z "$CC"; then
3071 ac_ct_CC=$CC
81ecdfbb 3072 for ac_prog in cl.exe
bec39cab
AC
3073do
3074 # Extract the first word of "$ac_prog", so it can be a program name with args.
3075set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077$as_echo_n "checking for $ac_word... " >&6; }
3078if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3079 $as_echo_n "(cached) " >&6
bec39cab
AC
3080else
3081 if test -n "$ac_ct_CC"; then
3082 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083else
3084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085for as_dir in $PATH
3086do
3087 IFS=$as_save_IFS
3088 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3089 for ac_exec_ext in '' $ac_executable_extensions; do
3090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3091 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3093 break 2
c906108c 3094 fi
bec39cab 3095done
81ecdfbb
RW
3096 done
3097IFS=$as_save_IFS
bec39cab
AC
3098
3099fi
3100fi
3101ac_ct_CC=$ac_cv_prog_ac_ct_CC
3102if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3104$as_echo "$ac_ct_CC" >&6; }
bec39cab 3105else
81ecdfbb
RW
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
c906108c
SS
3108fi
3109
81ecdfbb 3110
bec39cab
AC
3111 test -n "$ac_ct_CC" && break
3112done
c906108c 3113
81ecdfbb
RW
3114 if test "x$ac_ct_CC" = x; then
3115 CC=""
3116 else
3117 case $cross_compiling:$ac_tool_warned in
3118yes:)
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3121ac_tool_warned=yes ;;
3122esac
3123 CC=$ac_ct_CC
3124 fi
bec39cab
AC
3125fi
3126
3127fi
3128
3129
81ecdfbb
RW
3130test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132as_fn_error "no acceptable C compiler found in \$PATH
3133See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3134
3135# Provide some information about the compiler.
81ecdfbb
RW
3136$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3137set X $ac_compile
3138ac_compiler=$2
3139for ac_option in --version -v -V -qversion; do
3140 { { ac_try="$ac_compiler $ac_option >&5"
3141case "(($ac_try" in
3142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3143 *) ac_try_echo=$ac_try;;
3144esac
3145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3146$as_echo "$ac_try_echo"; } >&5
3147 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3148 ac_status=$?
81ecdfbb
RW
3149 if test -s conftest.err; then
3150 sed '10a\
3151... rest of stderr output deleted ...
3152 10q' conftest.err >conftest.er1
3153 cat conftest.er1 >&5
3154 rm -f conftest.er1 conftest.err
3155 fi
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }
3158done
bec39cab 3159
81ecdfbb 3160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3161/* end confdefs.h. */
3162
3163int
3164main ()
3165{
3166
3167 ;
3168 return 0;
3169}
3170_ACEOF
3171ac_clean_files_save=$ac_clean_files
81ecdfbb 3172ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3173# Try to create an executable without -o first, disregard a.out.
3174# It will help us diagnose broken compilers, and finding out an intuition
3175# of exeext.
81ecdfbb
RW
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3177$as_echo_n "checking for C compiler default output file name... " >&6; }
3178ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3179
3180# The possible output files:
3181ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3182
3183ac_rmfiles=
3184for ac_file in $ac_files
3185do
3186 case $ac_file in
3187 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3188 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3189 esac
3190done
3191rm -f $ac_rmfiles
3192
3193if { { ac_try="$ac_link_default"
3194case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
3198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3199$as_echo "$ac_try_echo"; } >&5
3200 (eval "$ac_link_default") 2>&5
3201 ac_status=$?
3202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3203 test $ac_status = 0; }; then :
3204 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3205# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3206# in a Makefile. We should not override ac_cv_exeext if it was cached,
3207# so that the user can short-circuit this test for compilers unknown to
3208# Autoconf.
3209for ac_file in $ac_files ''
bec39cab
AC
3210do
3211 test -f "$ac_file" || continue
3212 case $ac_file in
81ecdfbb 3213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3214 ;;
3215 [ab].out )
3216 # We found the default executable, but exeext='' is most
3217 # certainly right.
3218 break;;
3219 *.* )
81ecdfbb
RW
3220 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3221 then :; else
3222 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3223 fi
3224 # We set ac_cv_exeext here because the later test for it is not
3225 # safe: cross compilers may not add the suffix if given an `-o'
3226 # argument, so we may need to know it at that point already.
3227 # Even if this section looks crufty: it has the advantage of
3228 # actually working.
b4e70030
JB
3229 break;;
3230 * )
3231 break;;
bec39cab
AC
3232 esac
3233done
81ecdfbb
RW
3234test "$ac_cv_exeext" = no && ac_cv_exeext=
3235
bec39cab 3236else
81ecdfbb
RW
3237 ac_file=''
3238fi
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3240$as_echo "$ac_file" >&6; }
3241if test -z "$ac_file"; then :
3242 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
81ecdfbb
RW
3245{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3247{ as_fn_set_status 77
3248as_fn_error "C compiler cannot create executables
3249See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3250fi
b4e70030 3251ac_exeext=$ac_cv_exeext
b4e70030 3252
81ecdfbb 3253# Check that the compiler produces executables we can run. If not, either
bec39cab 3254# the compiler is broken, or we cross compile.
81ecdfbb
RW
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3256$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3257# If not cross compiling, check that we can run a simple program.
3258if test "$cross_compiling" != yes; then
3259 if { ac_try='./$ac_file'
81ecdfbb
RW
3260 { { case "(($ac_try" in
3261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262 *) ac_try_echo=$ac_try;;
3263esac
3264eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3265$as_echo "$ac_try_echo"; } >&5
3266 (eval "$ac_try") 2>&5
bec39cab 3267 ac_status=$?
81ecdfbb
RW
3268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3269 test $ac_status = 0; }; }; then
bec39cab 3270 cross_compiling=no
c906108c 3271 else
bec39cab
AC
3272 if test "$cross_compiling" = maybe; then
3273 cross_compiling=yes
3274 else
81ecdfbb
RW
3275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3277as_fn_error "cannot run C compiled programs.
bec39cab 3278If you meant to cross compile, use \`--host'.
81ecdfbb 3279See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3280 fi
c906108c 3281 fi
bec39cab 3282fi
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3284$as_echo "yes" >&6; }
bec39cab 3285
81ecdfbb 3286rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3287ac_clean_files=$ac_clean_files_save
81ecdfbb 3288# Check that the compiler produces executables we can run. If not, either
b4e70030 3289# the compiler is broken, or we cross compile.
81ecdfbb
RW
3290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3291$as_echo_n "checking whether we are cross compiling... " >&6; }
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3293$as_echo "$cross_compiling" >&6; }
3294
3295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3296$as_echo_n "checking for suffix of executables... " >&6; }
3297if { { ac_try="$ac_link"
3298case "(($ac_try" in
3299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3300 *) ac_try_echo=$ac_try;;
3301esac
3302eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3303$as_echo "$ac_try_echo"; } >&5
3304 (eval "$ac_link") 2>&5
bec39cab 3305 ac_status=$?
81ecdfbb
RW
3306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3307 test $ac_status = 0; }; then :
b4e70030
JB
3308 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3309# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3310# work properly (i.e., refer to `conftest.exe'), while it won't with
3311# `rm'.
3312for ac_file in conftest.exe conftest conftest.*; do
3313 test -f "$ac_file" || continue
3314 case $ac_file in
81ecdfbb 3315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3316 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3317 break;;
3318 * ) break;;
3319 esac
3320done
c906108c 3321else
81ecdfbb
RW
3322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3324as_fn_error "cannot compute suffix of executables: cannot compile and link
3325See \`config.log' for more details." "$LINENO" 5; }
c906108c 3326fi
b4e70030 3327rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3329$as_echo "$ac_cv_exeext" >&6; }
c906108c 3330
b4e70030 3331rm -f conftest.$ac_ext
bec39cab
AC
3332EXEEXT=$ac_cv_exeext
3333ac_exeext=$EXEEXT
81ecdfbb
RW
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3335$as_echo_n "checking for suffix of object files... " >&6; }
3336if test "${ac_cv_objext+set}" = set; then :
3337 $as_echo_n "(cached) " >&6
bec39cab 3338else
81ecdfbb 3339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3340/* end confdefs.h. */
3341
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350rm -f conftest.o conftest.obj
81ecdfbb
RW
3351if { { ac_try="$ac_compile"
3352case "(($ac_try" in
3353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3354 *) ac_try_echo=$ac_try;;
3355esac
3356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3357$as_echo "$ac_try_echo"; } >&5
3358 (eval "$ac_compile") 2>&5
3359 ac_status=$?
3360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3361 test $ac_status = 0; }; then :
3362 for ac_file in conftest.o conftest.obj conftest.*; do
3363 test -f "$ac_file" || continue;
bec39cab 3364 case $ac_file in
81ecdfbb 3365 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3366 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3367 break;;
3368 esac
3369done
c906108c 3370else
81ecdfbb 3371 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3372sed 's/^/| /' conftest.$ac_ext >&5
3373
81ecdfbb
RW
3374{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3376as_fn_error "cannot compute suffix of object files: cannot compile
3377See \`config.log' for more details." "$LINENO" 5; }
c906108c 3378fi
b4e70030 3379rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3380fi
81ecdfbb
RW
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3382$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3383OBJEXT=$ac_cv_objext
3384ac_objext=$OBJEXT
81ecdfbb
RW
3385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3386$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3387if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
c906108c 3389else
81ecdfbb 3390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3391/* end confdefs.h. */
3392
3393int
3394main ()
3395{
3396#ifndef __GNUC__
3397 choke me
3398#endif
3399
3400 ;
3401 return 0;
3402}
3403_ACEOF
81ecdfbb 3404if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3405 ac_compiler_gnu=yes
3406else
81ecdfbb 3407 ac_compiler_gnu=no
bec39cab 3408fi
81ecdfbb 3409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3410ac_cv_c_compiler_gnu=$ac_compiler_gnu
3411
3412fi
81ecdfbb
RW
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3414$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3415if test $ac_compiler_gnu = yes; then
3416 GCC=yes
3417else
3418 GCC=
3419fi
bec39cab
AC
3420ac_test_CFLAGS=${CFLAGS+set}
3421ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3423$as_echo_n "checking whether $CC accepts -g... " >&6; }
3424if test "${ac_cv_prog_cc_g+set}" = set; then :
3425 $as_echo_n "(cached) " >&6
bec39cab 3426else
81ecdfbb
RW
3427 ac_save_c_werror_flag=$ac_c_werror_flag
3428 ac_c_werror_flag=yes
3429 ac_cv_prog_cc_g=no
3430 CFLAGS="-g"
3431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3432/* end confdefs.h. */
3433
3434int
3435main ()
3436{
3437
3438 ;
3439 return 0;
3440}
3441_ACEOF
81ecdfbb 3442if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3443 ac_cv_prog_cc_g=yes
3444else
81ecdfbb
RW
3445 CFLAGS=""
3446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3447/* end confdefs.h. */
3448
3449int
3450main ()
3451{
3452
3453 ;
3454 return 0;
3455}
3456_ACEOF
3457if ac_fn_c_try_compile "$LINENO"; then :
3458
3459else
3460 ac_c_werror_flag=$ac_save_c_werror_flag
3461 CFLAGS="-g"
3462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3463/* end confdefs.h. */
3464
3465int
3466main ()
3467{
c906108c 3468
81ecdfbb
RW
3469 ;
3470 return 0;
3471}
3472_ACEOF
3473if ac_fn_c_try_compile "$LINENO"; then :
3474 ac_cv_prog_cc_g=yes
3475fi
3476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3477fi
3478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3479fi
81ecdfbb
RW
3480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3481 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3482fi
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3484$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3485if test "$ac_test_CFLAGS" = set; then
bec39cab 3486 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3487elif test $ac_cv_prog_cc_g = yes; then
3488 if test "$GCC" = yes; then
3489 CFLAGS="-g -O2"
3490 else
3491 CFLAGS="-g"
3492 fi
3493else
3494 if test "$GCC" = yes; then
3495 CFLAGS="-O2"
3496 else
3497 CFLAGS=
3498 fi
3499fi
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3501$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3502if test "${ac_cv_prog_cc_c89+set}" = set; then :
3503 $as_echo_n "(cached) " >&6
bec39cab 3504else
81ecdfbb 3505 ac_cv_prog_cc_c89=no
bec39cab 3506ac_save_CC=$CC
81ecdfbb 3507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3508/* end confdefs.h. */
c906108c
SS
3509#include <stdarg.h>
3510#include <stdio.h>
3511#include <sys/types.h>
3512#include <sys/stat.h>
3513/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3514struct buf { int x; };
3515FILE * (*rcsopen) (struct buf *, struct stat *, int);
3516static char *e (p, i)
3517 char **p;
3518 int i;
3519{
3520 return p[i];
3521}
3522static char *f (char * (*g) (char **, int), char **p, ...)
3523{
3524 char *s;
3525 va_list v;
3526 va_start (v,p);
3527 s = g (p, va_arg (v,int));
3528 va_end (v);
3529 return s;
3530}
bec39cab
AC
3531
3532/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3533 function prototypes and stuff, but not '\xHH' hex character constants.
3534 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3535 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3536 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3537 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3538 that's true only with -std. */
bec39cab
AC
3539int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3540
81ecdfbb
RW
3541/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3542 inside strings and character constants. */
3543#define FOO(x) 'x'
3544int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3545
c906108c
SS
3546int test (int i, double x);
3547struct s1 {int (*f) (int a);};
3548struct s2 {int (*f) (double a);};
3549int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3550int argc;
3551char **argv;
bec39cab
AC
3552int
3553main ()
3554{
c906108c 3555return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3556 ;
3557 return 0;
3558}
3559_ACEOF
81ecdfbb
RW
3560for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3561 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3562do
3563 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3564 if ac_fn_c_try_compile "$LINENO"; then :
3565 ac_cv_prog_cc_c89=$ac_arg
c906108c 3566fi
81ecdfbb
RW
3567rm -f core conftest.err conftest.$ac_objext
3568 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3569done
81ecdfbb 3570rm -f conftest.$ac_ext
bec39cab 3571CC=$ac_save_CC
c906108c
SS
3572
3573fi
81ecdfbb
RW
3574# AC_CACHE_VAL
3575case "x$ac_cv_prog_cc_c89" in
3576 x)
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3578$as_echo "none needed" >&6; } ;;
3579 xno)
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3581$as_echo "unsupported" >&6; } ;;
bec39cab 3582 *)
81ecdfbb
RW
3583 CC="$CC $ac_cv_prog_cc_c89"
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3585$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3586esac
81ecdfbb 3587if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3588
b4e70030
JB
3589fi
3590
bec39cab
AC
3591ac_ext=c
3592ac_cpp='$CPP $CPPFLAGS'
3593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3595ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3596
3bc3d82a
PA
3597ac_ext=cpp
3598ac_cpp='$CXXCPP $CPPFLAGS'
3599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3602if test -z "$CXX"; then
3603 if test -n "$CCC"; then
3604 CXX=$CCC
3605 else
3606 if test -n "$ac_tool_prefix"; then
3607 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3608 do
3609 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
3613if test "${ac_cv_prog_CXX+set}" = set; then :
3614 $as_echo_n "(cached) " >&6
3615else
3616 if test -n "$CXX"; then
3617 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3618else
3619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
3624 for ac_exec_ext in '' $ac_executable_extensions; do
3625 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3626 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3628 break 2
3629 fi
3630done
3631 done
3632IFS=$as_save_IFS
3633
3634fi
3635fi
3636CXX=$ac_cv_prog_CXX
3637if test -n "$CXX"; then
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3639$as_echo "$CXX" >&6; }
3640else
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
3643fi
3644
3645
3646 test -n "$CXX" && break
3647 done
3648fi
3649if test -z "$CXX"; then
3650 ac_ct_CXX=$CXX
3651 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3652do
3653 # Extract the first word of "$ac_prog", so it can be a program name with args.
3654set dummy $ac_prog; ac_word=$2
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
3657if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3658 $as_echo_n "(cached) " >&6
3659else
3660 if test -n "$ac_ct_CXX"; then
3661 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
3668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3670 ac_cv_prog_ac_ct_CXX="$ac_prog"
3671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3672 break 2
3673 fi
3674done
3675 done
3676IFS=$as_save_IFS
3677
3678fi
3679fi
3680ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3681if test -n "$ac_ct_CXX"; then
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3683$as_echo "$ac_ct_CXX" >&6; }
3684else
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
3687fi
3688
3689
3690 test -n "$ac_ct_CXX" && break
3691done
3692
3693 if test "x$ac_ct_CXX" = x; then
3694 CXX="g++"
3695 else
3696 case $cross_compiling:$ac_tool_warned in
3697yes:)
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3700ac_tool_warned=yes ;;
3701esac
3702 CXX=$ac_ct_CXX
3703 fi
3704fi
3705
3706 fi
3707fi
3708# Provide some information about the compiler.
3709$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3710set X $ac_compile
3711ac_compiler=$2
3712for ac_option in --version -v -V -qversion; do
3713 { { ac_try="$ac_compiler $ac_option >&5"
3714case "(($ac_try" in
3715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716 *) ac_try_echo=$ac_try;;
3717esac
3718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3719$as_echo "$ac_try_echo"; } >&5
3720 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3721 ac_status=$?
3722 if test -s conftest.err; then
3723 sed '10a\
3724... rest of stderr output deleted ...
3725 10q' conftest.err >conftest.er1
3726 cat conftest.er1 >&5
3727 rm -f conftest.er1 conftest.err
3728 fi
3729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }
3731done
3732
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3734$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3735if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3736 $as_echo_n "(cached) " >&6
3737else
3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h. */
3740
3741int
3742main ()
3743{
3744#ifndef __GNUC__
3745 choke me
3746#endif
3747
3748 ;
3749 return 0;
3750}
3751_ACEOF
3752if ac_fn_cxx_try_compile "$LINENO"; then :
3753 ac_compiler_gnu=yes
3754else
3755 ac_compiler_gnu=no
3756fi
3757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3758ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3759
3760fi
3761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3762$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3763if test $ac_compiler_gnu = yes; then
3764 GXX=yes
3765else
3766 GXX=
3767fi
3768ac_test_CXXFLAGS=${CXXFLAGS+set}
3769ac_save_CXXFLAGS=$CXXFLAGS
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3771$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3772if test "${ac_cv_prog_cxx_g+set}" = set; then :
3773 $as_echo_n "(cached) " >&6
3774else
3775 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3776 ac_cxx_werror_flag=yes
3777 ac_cv_prog_cxx_g=no
3778 CXXFLAGS="-g"
3779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3780/* end confdefs.h. */
3781
3782int
3783main ()
3784{
3785
3786 ;
3787 return 0;
3788}
3789_ACEOF
3790if ac_fn_cxx_try_compile "$LINENO"; then :
3791 ac_cv_prog_cxx_g=yes
3792else
3793 CXXFLAGS=""
3794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3795/* end confdefs.h. */
3796
3797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
3805if ac_fn_cxx_try_compile "$LINENO"; then :
3806
3807else
3808 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3809 CXXFLAGS="-g"
3810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3811/* end confdefs.h. */
3812
3813int
3814main ()
3815{
3816
3817 ;
3818 return 0;
3819}
3820_ACEOF
3821if ac_fn_cxx_try_compile "$LINENO"; then :
3822 ac_cv_prog_cxx_g=yes
3823fi
3824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3825fi
3826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3827fi
3828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3829 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3830fi
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3832$as_echo "$ac_cv_prog_cxx_g" >&6; }
3833if test "$ac_test_CXXFLAGS" = set; then
3834 CXXFLAGS=$ac_save_CXXFLAGS
3835elif test $ac_cv_prog_cxx_g = yes; then
3836 if test "$GXX" = yes; then
3837 CXXFLAGS="-g -O2"
3838 else
3839 CXXFLAGS="-g"
3840 fi
3841else
3842 if test "$GXX" = yes; then
3843 CXXFLAGS="-O2"
3844 else
3845 CXXFLAGS=
3846 fi
3847fi
3848ac_ext=c
3849ac_cpp='$CPP $CPPFLAGS'
3850ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3851ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3852ac_compiler_gnu=$ac_cv_c_compiler_gnu
3853
3854
60ca704f 3855
bec39cab
AC
3856ac_ext=c
3857ac_cpp='$CPP $CPPFLAGS'
3858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3860ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3862$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3863# On Suns, sometimes $CPP names a directory.
3864if test -n "$CPP" && test -d "$CPP"; then
3865 CPP=
8bb2c122 3866fi
bec39cab 3867if test -z "$CPP"; then
81ecdfbb
RW
3868 if test "${ac_cv_prog_CPP+set}" = set; then :
3869 $as_echo_n "(cached) " >&6
bec39cab
AC
3870else
3871 # Double quotes because CPP needs to be expanded
3872 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3873 do
3874 ac_preproc_ok=false
3875for ac_c_preproc_warn_flag in '' yes
3876do
3877 # Use a header file that comes with gcc, so configuring glibc
3878 # with a fresh cross-compiler works.
3879 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3880 # <limits.h> exists even on freestanding compilers.
3881 # On the NeXT, cc -E runs the code through the compiler's parser,
3882 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3884/* end confdefs.h. */
3885#ifdef __STDC__
3886# include <limits.h>
3887#else
3888# include <assert.h>
3889#endif
3890 Syntax error
3891_ACEOF
81ecdfbb 3892if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3893
81ecdfbb 3894else
bec39cab
AC
3895 # Broken: fails on valid input.
3896continue
3897fi
3898rm -f conftest.err conftest.$ac_ext
3899
81ecdfbb 3900 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3901 # can be detected and how.
81ecdfbb 3902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3903/* end confdefs.h. */
3904#include <ac_nonexistent.h>
3905_ACEOF
81ecdfbb 3906if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3907 # Broken: success on invalid input.
3908continue
8bb2c122 3909else
bec39cab
AC
3910 # Passes both tests.
3911ac_preproc_ok=:
3912break
8bb2c122 3913fi
bec39cab 3914rm -f conftest.err conftest.$ac_ext
8bb2c122 3915
bec39cab
AC
3916done
3917# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3918rm -f conftest.err conftest.$ac_ext
81ecdfbb 3919if $ac_preproc_ok; then :
bec39cab
AC
3920 break
3921fi
8bb2c122 3922
bec39cab
AC
3923 done
3924 ac_cv_prog_CPP=$CPP
ddc9cd0f 3925
c906108c 3926fi
bec39cab
AC
3927 CPP=$ac_cv_prog_CPP
3928else
3929 ac_cv_prog_CPP=$CPP
c906108c 3930fi
81ecdfbb
RW
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3932$as_echo "$CPP" >&6; }
bec39cab
AC
3933ac_preproc_ok=false
3934for ac_c_preproc_warn_flag in '' yes
3935do
3936 # Use a header file that comes with gcc, so configuring glibc
3937 # with a fresh cross-compiler works.
3938 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3939 # <limits.h> exists even on freestanding compilers.
3940 # On the NeXT, cc -E runs the code through the compiler's parser,
3941 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3943/* end confdefs.h. */
3944#ifdef __STDC__
3945# include <limits.h>
3946#else
3947# include <assert.h>
3948#endif
3949 Syntax error
3950_ACEOF
81ecdfbb 3951if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3952
81ecdfbb 3953else
bec39cab
AC
3954 # Broken: fails on valid input.
3955continue
3956fi
3957rm -f conftest.err conftest.$ac_ext
3958
81ecdfbb 3959 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3960 # can be detected and how.
81ecdfbb 3961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3962/* end confdefs.h. */
3963#include <ac_nonexistent.h>
3964_ACEOF
81ecdfbb 3965if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3966 # Broken: success on invalid input.
3967continue
c906108c 3968else
bec39cab
AC
3969 # Passes both tests.
3970ac_preproc_ok=:
3971break
c906108c 3972fi
bec39cab 3973rm -f conftest.err conftest.$ac_ext
c906108c 3974
bec39cab
AC
3975done
3976# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3977rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3978if $ac_preproc_ok; then :
3979
c906108c 3980else
81ecdfbb
RW
3981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3983as_fn_error "C preprocessor \"$CPP\" fails sanity check
3984See \`config.log' for more details." "$LINENO" 5; }
c906108c 3985fi
c906108c 3986
bec39cab
AC
3987ac_ext=c
3988ac_cpp='$CPP $CPPFLAGS'
3989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3991ac_compiler_gnu=$ac_cv_c_compiler_gnu
3992
3993
81ecdfbb
RW
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3995$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3996if test "${ac_cv_path_GREP+set}" = set; then :
3997 $as_echo_n "(cached) " >&6
4e8d927d 3998else
81ecdfbb
RW
3999 if test -z "$GREP"; then
4000 ac_path_GREP_found=false
4001 # Loop through the user's path and test for each of PROGNAME-LIST
4002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4003for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4004do
4005 IFS=$as_save_IFS
4006 test -z "$as_dir" && as_dir=.
4007 for ac_prog in grep ggrep; do
4008 for ac_exec_ext in '' $ac_executable_extensions; do
4009 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4010 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4011# Check for GNU ac_path_GREP and select it if it is found.
4012 # Check for GNU $ac_path_GREP
4013case `"$ac_path_GREP" --version 2>&1` in
4014*GNU*)
4015 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4016*)
4017 ac_count=0
4018 $as_echo_n 0123456789 >"conftest.in"
4019 while :
4020 do
4021 cat "conftest.in" "conftest.in" >"conftest.tmp"
4022 mv "conftest.tmp" "conftest.in"
4023 cp "conftest.in" "conftest.nl"
4024 $as_echo 'GREP' >> "conftest.nl"
4025 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4026 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4027 as_fn_arith $ac_count + 1 && ac_count=$as_val
4028 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4029 # Best one so far, save it but keep looking for a better one
4030 ac_cv_path_GREP="$ac_path_GREP"
4031 ac_path_GREP_max=$ac_count
bec39cab 4032 fi
81ecdfbb
RW
4033 # 10*(2^10) chars as input seems more than enough
4034 test $ac_count -gt 10 && break
4035 done
4036 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4037esac
bec39cab 4038
81ecdfbb
RW
4039 $ac_path_GREP_found && break 3
4040 done
4041 done
4042 done
4043IFS=$as_save_IFS
4044 if test -z "$ac_cv_path_GREP"; then
4045 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4046 fi
c906108c 4047else
81ecdfbb 4048 ac_cv_path_GREP=$GREP
c906108c 4049fi
c906108c 4050
81ecdfbb
RW
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4053$as_echo "$ac_cv_path_GREP" >&6; }
4054 GREP="$ac_cv_path_GREP"
c906108c 4055
c906108c 4056
81ecdfbb
RW
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4058$as_echo_n "checking for egrep... " >&6; }
4059if test "${ac_cv_path_EGREP+set}" = set; then :
4060 $as_echo_n "(cached) " >&6
783e057b 4061else
81ecdfbb
RW
4062 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4063 then ac_cv_path_EGREP="$GREP -E"
4064 else
4065 if test -z "$EGREP"; then
4066 ac_path_EGREP_found=false
4067 # Loop through the user's path and test for each of PROGNAME-LIST
4068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4073 for ac_prog in egrep; do
4074 for ac_exec_ext in '' $ac_executable_extensions; do
4075 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4076 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4077# Check for GNU ac_path_EGREP and select it if it is found.
4078 # Check for GNU $ac_path_EGREP
4079case `"$ac_path_EGREP" --version 2>&1` in
4080*GNU*)
4081 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4082*)
4083 ac_count=0
4084 $as_echo_n 0123456789 >"conftest.in"
4085 while :
4086 do
4087 cat "conftest.in" "conftest.in" >"conftest.tmp"
4088 mv "conftest.tmp" "conftest.in"
4089 cp "conftest.in" "conftest.nl"
4090 $as_echo 'EGREP' >> "conftest.nl"
4091 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4092 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4093 as_fn_arith $ac_count + 1 && ac_count=$as_val
4094 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4095 # Best one so far, save it but keep looking for a better one
4096 ac_cv_path_EGREP="$ac_path_EGREP"
4097 ac_path_EGREP_max=$ac_count
4098 fi
4099 # 10*(2^10) chars as input seems more than enough
4100 test $ac_count -gt 10 && break
4101 done
4102 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4103esac
bec39cab 4104
81ecdfbb
RW
4105 $ac_path_EGREP_found && break 3
4106 done
4107 done
4108 done
4109IFS=$as_save_IFS
4110 if test -z "$ac_cv_path_EGREP"; then
4111 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4112 fi
783e057b 4113else
81ecdfbb 4114 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4115fi
4116
81ecdfbb 4117 fi
783e057b 4118fi
81ecdfbb
RW
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4120$as_echo "$ac_cv_path_EGREP" >&6; }
4121 EGREP="$ac_cv_path_EGREP"
4122
783e057b 4123
81ecdfbb
RW
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4125$as_echo_n "checking for ANSI C header files... " >&6; }
4126if test "${ac_cv_header_stdc+set}" = set; then :
4127 $as_echo_n "(cached) " >&6
783e057b 4128else
81ecdfbb 4129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4130/* end confdefs.h. */
783e057b 4131#include <stdlib.h>
bec39cab 4132#include <stdarg.h>
783e057b
DJ
4133#include <string.h>
4134#include <float.h>
c906108c 4135
bec39cab
AC
4136int
4137main ()
4138{
c906108c 4139
bec39cab
AC
4140 ;
4141 return 0;
4142}
4143_ACEOF
81ecdfbb 4144if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4145 ac_cv_header_stdc=yes
c906108c 4146else
81ecdfbb 4147 ac_cv_header_stdc=no
c906108c 4148fi
81ecdfbb 4149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4150
783e057b
DJ
4151if test $ac_cv_header_stdc = yes; then
4152 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4154/* end confdefs.h. */
4155#include <string.h>
c906108c 4156
783e057b
DJ
4157_ACEOF
4158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4159 $EGREP "memchr" >/dev/null 2>&1; then :
4160
c906108c 4161else
783e057b 4162 ac_cv_header_stdc=no
c906108c 4163fi
783e057b 4164rm -f conftest*
c906108c
SS
4165
4166fi
4167
783e057b
DJ
4168if test $ac_cv_header_stdc = yes; then
4169 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4171/* end confdefs.h. */
4172#include <stdlib.h>
bec39cab 4173
783e057b
DJ
4174_ACEOF
4175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4176 $EGREP "free" >/dev/null 2>&1; then :
4177
bec39cab 4178else
783e057b 4179 ac_cv_header_stdc=no
bec39cab 4180fi
783e057b 4181rm -f conftest*
bec39cab
AC
4182
4183fi
bec39cab 4184
783e057b
DJ
4185if test $ac_cv_header_stdc = yes; then
4186 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4187 if test "$cross_compiling" = yes; then :
783e057b 4188 :
bec39cab 4189else
81ecdfbb 4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4191/* end confdefs.h. */
4192#include <ctype.h>
81ecdfbb 4193#include <stdlib.h>
783e057b
DJ
4194#if ((' ' & 0x0FF) == 0x020)
4195# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4196# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4197#else
4198# define ISLOWER(c) \
4199 (('a' <= (c) && (c) <= 'i') \
4200 || ('j' <= (c) && (c) <= 'r') \
4201 || ('s' <= (c) && (c) <= 'z'))
4202# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4203#endif
4204
4205#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4206int
4207main ()
4208{
4209 int i;
4210 for (i = 0; i < 256; i++)
4211 if (XOR (islower (i), ISLOWER (i))
4212 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4213 return 2;
4214 return 0;
783e057b
DJ
4215}
4216_ACEOF
81ecdfbb 4217if ac_fn_c_try_run "$LINENO"; then :
783e057b 4218
81ecdfbb
RW
4219else
4220 ac_cv_header_stdc=no
783e057b 4221fi
81ecdfbb
RW
4222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4223 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4224fi
81ecdfbb 4225
783e057b
DJ
4226fi
4227fi
81ecdfbb
RW
4228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4229$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4230if test $ac_cv_header_stdc = yes; then
4231
81ecdfbb 4232$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4233
4234fi
4235
4236# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4237for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4238 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4239do :
4240 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4241ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4242"
4243eval as_val=\$$as_ac_Header
4244 if test "x$as_val" = x""yes; then :
783e057b 4245 cat >>confdefs.h <<_ACEOF
81ecdfbb 4246#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4247_ACEOF
4248
4249fi
4250
4251done
4252
4253
4254
81ecdfbb
RW
4255 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4256if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4257 MINIX=yes
4258else
4259 MINIX=
4260fi
4261
4262
4263 if test "$MINIX" = yes; then
4264
81ecdfbb 4265$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4266
4267
81ecdfbb 4268$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4269
4270
81ecdfbb 4271$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4272
4273 fi
4274
4275
81ecdfbb
RW
4276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4277$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4278if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4279 $as_echo_n "(cached) " >&6
783e057b 4280else
81ecdfbb 4281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4282/* end confdefs.h. */
4283
c971b7fa
PA
4284# define __EXTENSIONS__ 1
4285 $ac_includes_default
783e057b
DJ
4286int
4287main ()
4288{
4289
4290 ;
4291 return 0;
4292}
4293_ACEOF
81ecdfbb 4294if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4295 ac_cv_safe_to_define___extensions__=yes
4296else
81ecdfbb 4297 ac_cv_safe_to_define___extensions__=no
783e057b 4298fi
81ecdfbb 4299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4300fi
81ecdfbb
RW
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4302$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4303 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4304 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4305
81ecdfbb 4306 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4307
81ecdfbb 4308 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4309
81ecdfbb 4310 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4311
81ecdfbb 4312 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4313
4314
c971b7fa
PA
4315ac_aux_dir=
4316for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4317 for ac_t in install-sh install.sh shtool; do
4318 if test -f "$ac_dir/$ac_t"; then
4319 ac_aux_dir=$ac_dir
4320 ac_install_sh="$ac_aux_dir/$ac_t -c"
4321 break 2
4322 fi
4323 done
4324done
4325if test -z "$ac_aux_dir"; then
4326 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4327fi
770d76d7 4328
c971b7fa
PA
4329# These three variables are undocumented and unsupported,
4330# and are intended to be withdrawn in a future Autoconf release.
4331# They can cause serious problems if a builder's source tree is in a directory
4332# whose full name contains unusual characters.
4333ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4334ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4335ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4336
770d76d7 4337
c971b7fa
PA
4338# Make sure we can run config.sub.
4339$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4340 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4341
c971b7fa
PA
4342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4343$as_echo_n "checking build system type... " >&6; }
4344if test "${ac_cv_build+set}" = set; then :
4345 $as_echo_n "(cached) " >&6
770d76d7 4346else
c971b7fa
PA
4347 ac_build_alias=$build_alias
4348test "x$ac_build_alias" = x &&
4349 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4350test "x$ac_build_alias" = x &&
4351 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4352ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4353 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4354
770d76d7 4355fi
c971b7fa
PA
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4357$as_echo "$ac_cv_build" >&6; }
4358case $ac_cv_build in
4359*-*-*) ;;
4360*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4361esac
c971b7fa
PA
4362build=$ac_cv_build
4363ac_save_IFS=$IFS; IFS='-'
4364set x $ac_cv_build
4365shift
4366build_cpu=$1
4367build_vendor=$2
4368shift; shift
4369# Remember, the first character of IFS is used to create $*,
4370# except with old shells:
4371build_os=$*
4372IFS=$ac_save_IFS
4373case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4374
4375
c971b7fa
PA
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4377$as_echo_n "checking host system type... " >&6; }
4378if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4379 $as_echo_n "(cached) " >&6
4380else
c971b7fa
PA
4381 if test "x$host_alias" = x; then
4382 ac_cv_host=$ac_cv_build
81ecdfbb 4383else
c971b7fa
PA
4384 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4385 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4386fi
81ecdfbb
RW
4387
4388fi
c971b7fa
PA
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4390$as_echo "$ac_cv_host" >&6; }
4391case $ac_cv_host in
4392*-*-*) ;;
4393*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4394esac
c971b7fa
PA
4395host=$ac_cv_host
4396ac_save_IFS=$IFS; IFS='-'
4397set x $ac_cv_host
4398shift
4399host_cpu=$1
4400host_vendor=$2
4401shift; shift
4402# Remember, the first character of IFS is used to create $*,
4403# except with old shells:
4404host_os=$*
4405IFS=$ac_save_IFS
4406case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4407
4408
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4410$as_echo_n "checking target system type... " >&6; }
4411if test "${ac_cv_target+set}" = set; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 if test "x$target_alias" = x; then
4415 ac_cv_target=$ac_cv_host
4416else
4417 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4418 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4419fi
4420
4421fi
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4423$as_echo "$ac_cv_target" >&6; }
4424case $ac_cv_target in
4425*-*-*) ;;
4426*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4427esac
4428target=$ac_cv_target
4429ac_save_IFS=$IFS; IFS='-'
4430set x $ac_cv_target
4431shift
4432target_cpu=$1
4433target_vendor=$2
4434shift; shift
4435# Remember, the first character of IFS is used to create $*,
4436# except with old shells:
4437target_os=$*
4438IFS=$ac_save_IFS
4439case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4440
4441
4442# The aliases save the names the user supplied, while $host etc.
4443# will get canonicalized.
4444test -n "$target_alias" &&
4445 test "$program_prefix$program_suffix$program_transform_name" = \
4446 NONENONEs,x,x, &&
4447 program_prefix=${target_alias}-
4448
4449# The tests for host and target for $enable_largefile require
4450# canonical names.
4451
4452
81ecdfbb 4453
da2f07f1
JK
4454# As the $enable_largefile decision depends on --enable-plugins we must set it
4455# even in directories otherwise not depending on the $plugins option.
4456
4457
2974be62
AM
4458 maybe_plugins=no
4459 for ac_header in dlfcn.h
4460do :
4461 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4462"
4463if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4464 cat >>confdefs.h <<_ACEOF
4465#define HAVE_DLFCN_H 1
4466_ACEOF
4467 maybe_plugins=yes
4468fi
4469
4470done
4471
4472 for ac_header in windows.h
4473do :
4474 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4475"
4476if test "x$ac_cv_header_windows_h" = x""yes; then :
4477 cat >>confdefs.h <<_ACEOF
4478#define HAVE_WINDOWS_H 1
4479_ACEOF
4480 maybe_plugins=yes
4481fi
4482
4483done
4484
4485
4486 # Check whether --enable-plugins was given.
da2f07f1
JK
4487if test "${enable_plugins+set}" = set; then :
4488 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4489 no) plugins=no ;;
4490 *) plugins=yes
4491 if test "$maybe_plugins" != "yes" ; then
4492 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4493 fi ;;
4494 esac
da2f07f1 4495else
2974be62
AM
4496 plugins=$maybe_plugins
4497
da2f07f1
JK
4498fi
4499
2974be62
AM
4500 if test "$plugins" = "yes"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4502$as_echo_n "checking for library containing dlopen... " >&6; }
4503if test "${ac_cv_search_dlopen+set}" = set; then :
4504 $as_echo_n "(cached) " >&6
4505else
4506 ac_func_search_save_LIBS=$LIBS
4507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509
4510/* Override any GCC internal prototype to avoid an error.
4511 Use char because int might match the return type of a GCC
4512 builtin and then its argument prototype would still apply. */
4513#ifdef __cplusplus
4514extern "C"
4515#endif
4516char dlopen ();
4517int
4518main ()
4519{
4520return dlopen ();
4521 ;
4522 return 0;
4523}
4524_ACEOF
4525for ac_lib in '' dl; do
4526 if test -z "$ac_lib"; then
4527 ac_res="none required"
4528 else
4529 ac_res=-l$ac_lib
4530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4531 fi
4532 if ac_fn_c_try_link "$LINENO"; then :
4533 ac_cv_search_dlopen=$ac_res
4534fi
4535rm -f core conftest.err conftest.$ac_objext \
4536 conftest$ac_exeext
4537 if test "${ac_cv_search_dlopen+set}" = set; then :
4538 break
4539fi
4540done
4541if test "${ac_cv_search_dlopen+set}" = set; then :
4542
4543else
4544 ac_cv_search_dlopen=no
4545fi
4546rm conftest.$ac_ext
4547LIBS=$ac_func_search_save_LIBS
4548fi
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4550$as_echo "$ac_cv_search_dlopen" >&6; }
4551ac_res=$ac_cv_search_dlopen
4552if test "$ac_res" != no; then :
4553 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4554
4555fi
4556
4557 fi
da2f07f1
JK
4558
4559
4560case "${host}" in
4561 sparc-*-solaris*|i[3-7]86-*-solaris*)
4562 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4563 # are mutually exclusive; and without procfs support, the bfd/ elf module
4564 # cannot provide certain routines such as elfcore_write_prpsinfo
4565 # or elfcore_write_prstatus. So unless the user explicitly requested
4566 # large-file support through the --enable-largefile switch, disable
4567 # large-file support in favor of procfs support.
4568 test "${target}" = "${host}" -a "x$plugins" = xno \
4569 && : ${enable_largefile="no"}
4570 ;;
4571esac
4572
4573# Check whether --enable-largefile was given.
4574if test "${enable_largefile+set}" = set; then :
4575 enableval=$enable_largefile;
4576fi
4577
4578if test "$enable_largefile" != no; then
4579
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4581$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4582if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4583 $as_echo_n "(cached) " >&6
4584else
4585 ac_cv_sys_largefile_CC=no
4586 if test "$GCC" != yes; then
4587 ac_save_CC=$CC
4588 while :; do
4589 # IRIX 6.2 and later do not support large files by default,
4590 # so use the C compiler's -n32 option if that helps.
4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h. */
4593#include <sys/types.h>
4594 /* Check that off_t can represent 2**63 - 1 correctly.
4595 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4596 since some C++ compilers masquerading as C compilers
4597 incorrectly reject 9223372036854775807. */
4598#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4599 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4600 && LARGE_OFF_T % 2147483647 == 1)
4601 ? 1 : -1];
4602int
4603main ()
4604{
4605
4606 ;
4607 return 0;
4608}
4609_ACEOF
4610 if ac_fn_c_try_compile "$LINENO"; then :
4611 break
4612fi
4613rm -f core conftest.err conftest.$ac_objext
4614 CC="$CC -n32"
4615 if ac_fn_c_try_compile "$LINENO"; then :
4616 ac_cv_sys_largefile_CC=' -n32'; break
4617fi
4618rm -f core conftest.err conftest.$ac_objext
4619 break
4620 done
4621 CC=$ac_save_CC
4622 rm -f conftest.$ac_ext
4623 fi
4624fi
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4626$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4627 if test "$ac_cv_sys_largefile_CC" != no; then
4628 CC=$CC$ac_cv_sys_largefile_CC
4629 fi
4630
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4632$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4633if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 while :; do
4637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4638/* end confdefs.h. */
4639#include <sys/types.h>
4640 /* Check that off_t can represent 2**63 - 1 correctly.
4641 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4642 since some C++ compilers masquerading as C compilers
4643 incorrectly reject 9223372036854775807. */
4644#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4645 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4646 && LARGE_OFF_T % 2147483647 == 1)
4647 ? 1 : -1];
4648int
4649main ()
4650{
4651
4652 ;
4653 return 0;
4654}
4655_ACEOF
4656if ac_fn_c_try_compile "$LINENO"; then :
4657 ac_cv_sys_file_offset_bits=no; break
4658fi
4659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661/* end confdefs.h. */
4662#define _FILE_OFFSET_BITS 64
4663#include <sys/types.h>
4664 /* Check that off_t can represent 2**63 - 1 correctly.
4665 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4666 since some C++ compilers masquerading as C compilers
4667 incorrectly reject 9223372036854775807. */
4668#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4669 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4670 && LARGE_OFF_T % 2147483647 == 1)
4671 ? 1 : -1];
4672int
4673main ()
4674{
4675
4676 ;
4677 return 0;
4678}
4679_ACEOF
4680if ac_fn_c_try_compile "$LINENO"; then :
4681 ac_cv_sys_file_offset_bits=64; break
4682fi
4683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 ac_cv_sys_file_offset_bits=unknown
4685 break
4686done
4687fi
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4689$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4690case $ac_cv_sys_file_offset_bits in #(
4691 no | unknown) ;;
4692 *)
4693cat >>confdefs.h <<_ACEOF
4694#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4695_ACEOF
4696;;
4697esac
4698rm -rf conftest*
4699 if test $ac_cv_sys_file_offset_bits = unknown; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4701$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4702if test "${ac_cv_sys_large_files+set}" = set; then :
4703 $as_echo_n "(cached) " >&6
4704else
4705 while :; do
4706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4707/* end confdefs.h. */
4708#include <sys/types.h>
4709 /* Check that off_t can represent 2**63 - 1 correctly.
4710 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4711 since some C++ compilers masquerading as C compilers
4712 incorrectly reject 9223372036854775807. */
4713#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4714 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4715 && LARGE_OFF_T % 2147483647 == 1)
4716 ? 1 : -1];
4717int
4718main ()
4719{
4720
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725if ac_fn_c_try_compile "$LINENO"; then :
4726 ac_cv_sys_large_files=no; break
4727fi
4728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4730/* end confdefs.h. */
4731#define _LARGE_FILES 1
4732#include <sys/types.h>
4733 /* Check that off_t can represent 2**63 - 1 correctly.
4734 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4735 since some C++ compilers masquerading as C compilers
4736 incorrectly reject 9223372036854775807. */
4737#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4738 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4739 && LARGE_OFF_T % 2147483647 == 1)
4740 ? 1 : -1];
4741int
4742main ()
4743{
4744
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749if ac_fn_c_try_compile "$LINENO"; then :
4750 ac_cv_sys_large_files=1; break
4751fi
4752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 ac_cv_sys_large_files=unknown
4754 break
4755done
4756fi
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4758$as_echo "$ac_cv_sys_large_files" >&6; }
4759case $ac_cv_sys_large_files in #(
4760 no | unknown) ;;
4761 *)
4762cat >>confdefs.h <<_ACEOF
4763#define _LARGE_FILES $ac_cv_sys_large_files
4764_ACEOF
4765;;
4766esac
4767rm -rf conftest*
4768 fi
4769fi
4770
4771
4772
81ecdfbb
RW
4773
4774
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4776$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4777if test "${am_cv_prog_cc_stdc+set}" = set; then :
4778 $as_echo_n "(cached) " >&6
4779else
4780 am_cv_prog_cc_stdc=no
4781ac_save_CC="$CC"
4782# Don't try gcc -ansi; that turns off useful extensions and
4783# breaks some systems' header files.
4784# AIX -qlanglvl=ansi
4785# Ultrix and OSF/1 -std1
4786# HP-UX 10.20 and later -Ae
4787# HP-UX older versions -Aa -D_HPUX_SOURCE
4788# SVR4 -Xc -D__EXTENSIONS__
4789for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4790do
783e057b 4791 CC="$ac_save_CC $ac_arg"
81ecdfbb 4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4793/* end confdefs.h. */
4794#include <stdarg.h>
4795#include <stdio.h>
4796#include <sys/types.h>
4797#include <sys/stat.h>
4798/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4799struct buf { int x; };
4800FILE * (*rcsopen) (struct buf *, struct stat *, int);
4801static char *e (p, i)
4802 char **p;
4803 int i;
4804{
4805 return p[i];
4806}
4807static char *f (char * (*g) (char **, int), char **p, ...)
4808{
4809 char *s;
4810 va_list v;
4811 va_start (v,p);
4812 s = g (p, va_arg (v,int));
4813 va_end (v);
4814 return s;
4815}
4816int test (int i, double x);
4817struct s1 {int (*f) (int a);};
4818struct s2 {int (*f) (double a);};
4819int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4820int argc;
4821char **argv;
4822
4823int
4824main ()
4825{
4826
4827return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4828
4829 ;
4830 return 0;
4831}
4832_ACEOF
81ecdfbb 4833if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4834 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4835fi
81ecdfbb 4836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4837done
4838CC="$ac_save_CC"
4839
4840fi
4841
4842if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4844$as_echo "none needed" >&6; }
783e057b 4845else
81ecdfbb
RW
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4847$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4848fi
4849case "x$am_cv_prog_cc_stdc" in
4850 x|xno) ;;
4851 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4852esac
4853
4869db5e
RM
4854# expand $ac_aux_dir to an absolute path
4855am_aux_dir=`cd $ac_aux_dir && pwd`
4856
4857if test x"${install_sh}" != xset; then
4858 case $am_aux_dir in
4859 *\ * | *\ *)
4860 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4861 *)
4862 install_sh="\${SHELL} $am_aux_dir/install-sh"
4863 esac
4864fi
4865
4866# Installed binaries are usually stripped using `strip' when the user
4867# run `make install-strip'. However `strip' might not be the right
4868# tool to use in cross-compilation environments, therefore Automake
4869# will honor the `STRIP' environment variable to overrule this program.
4870if test "$cross_compiling" != no; then
4871 if test -n "$ac_tool_prefix"; then
4872 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4873set dummy ${ac_tool_prefix}strip; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if test "${ac_cv_prog_STRIP+set}" = set; then :
4877 $as_echo_n "(cached) " >&6
4878else
4879 if test -n "$STRIP"; then
4880 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4881else
4882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885 IFS=$as_save_IFS
4886 test -z "$as_dir" && as_dir=.
4887 for ac_exec_ext in '' $ac_executable_extensions; do
4888 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4889 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891 break 2
4892 fi
4893done
4894 done
4895IFS=$as_save_IFS
4896
4897fi
4898fi
4899STRIP=$ac_cv_prog_STRIP
4900if test -n "$STRIP"; then
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4902$as_echo "$STRIP" >&6; }
4903else
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
4906fi
4907
4908
4909fi
4910if test -z "$ac_cv_prog_STRIP"; then
4911 ac_ct_STRIP=$STRIP
4912 # Extract the first word of "strip", so it can be a program name with args.
4913set dummy strip; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
4918else
4919 if test -n "$ac_ct_STRIP"; then
4920 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4921else
4922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929 ac_cv_prog_ac_ct_STRIP="strip"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937fi
4938fi
4939ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4940if test -n "$ac_ct_STRIP"; then
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4942$as_echo "$ac_ct_STRIP" >&6; }
4943else
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945$as_echo "no" >&6; }
4946fi
4947
4948 if test "x$ac_ct_STRIP" = x; then
4949 STRIP=":"
4950 else
4951 case $cross_compiling:$ac_tool_warned in
4952yes:)
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4955ac_tool_warned=yes ;;
4956esac
4957 STRIP=$ac_ct_STRIP
4958 fi
4959else
4960 STRIP="$ac_cv_prog_STRIP"
4961fi
4962
4963fi
4964INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4965
783e057b
DJ
4966
4967ac_aux_dir=
81ecdfbb
RW
4968for ac_dir in .. "$srcdir"/..; do
4969 for ac_t in install-sh install.sh shtool; do
4970 if test -f "$ac_dir/$ac_t"; then
4971 ac_aux_dir=$ac_dir
4972 ac_install_sh="$ac_aux_dir/$ac_t -c"
4973 break 2
4974 fi
4975 done
783e057b
DJ
4976done
4977if test -z "$ac_aux_dir"; then
81ecdfbb 4978 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4979fi
81ecdfbb
RW
4980
4981# These three variables are undocumented and unsupported,
4982# and are intended to be withdrawn in a future Autoconf release.
4983# They can cause serious problems if a builder's source tree is in a directory
4984# whose full name contains unusual characters.
4985ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4986ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4987ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4988
783e057b 4989
783e057b 4990
9009e1ae
MR
4991test "$program_prefix" != NONE &&
4992 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4993# Use a double $ so make ignores it.
4994test "$program_suffix" != NONE &&
4995 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4996# Double any \ or $.
4997# By default was `s,x,x', remove it if useless.
4998ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4999program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5000
81ecdfbb 5001
3bc3d82a
PA
5002# See if we are building with C++, and substitute COMPILER.
5003
5004 # Check whether --enable-build-with-cxx was given.
5005if test "${enable_build_with_cxx+set}" = set; then :
5006 enableval=$enable_build_with_cxx; case $enableval in
5007 yes | no)
5008 ;;
5009 *)
5010 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
5011 esac
5012else
5013 enable_build_with_cxx=no
5014fi
5015
5016
5017 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 5018 COMPILER='$(CXX)'
a994041d 5019 COMPILER_CFLAGS='$(CXXFLAGS)'
3bc3d82a
PA
5020 else
5021 COMPILER='$(CC)'
a994041d 5022 COMPILER_CFLAGS='$(CFLAGS)'
3bc3d82a
PA
5023 fi
5024
5025
5026
a994041d 5027
a417dc56
RW
5028# Dependency checking.
5029rm -rf .tst 2>/dev/null
5030mkdir .tst 2>/dev/null
5031if test -d .tst; then
5032 am__leading_dot=.
5033else
5034 am__leading_dot=_
5035fi
5036rmdir .tst 2>/dev/null
5037
5038DEPDIR="${am__leading_dot}deps"
5039
81ecdfbb 5040ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5041
5042
5043depcc="$CC" am_compiler_list=
5044
5045am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5047$as_echo_n "checking dependency style of $depcc... " >&6; }
5048if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5049 $as_echo_n "(cached) " >&6
a417dc56
RW
5050else
5051 if test -f "$am_depcomp"; then
5052 # We make a subdir and do the tests there. Otherwise we can end up
5053 # making bogus files that we don't know about and never remove. For
5054 # instance it was reported that on HP-UX the gcc test will end up
5055 # making a dummy file named `D' -- because `-MD' means `put the output
5056 # in D'.
5057 mkdir conftest.dir
5058 # Copy depcomp to subdir because otherwise we won't find it if we're
5059 # using a relative directory.
5060 cp "$am_depcomp" conftest.dir
5061 cd conftest.dir
5062 # We will build objects and dependencies in a subdirectory because
5063 # it helps to detect inapplicable dependency modes. For instance
5064 # both Tru64's cc and ICC support -MD to output dependencies as a
5065 # side effect of compilation, but ICC will put the dependencies in
5066 # the current directory while Tru64 will put them in the object
5067 # directory.
5068 mkdir sub
5069
5070 am_cv_CC_dependencies_compiler_type=none
5071 if test "$am_compiler_list" = ""; then
5072 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5073 fi
5074 for depmode in $am_compiler_list; do
5075 if test $depmode = none; then break; fi
5076
81ecdfbb 5077 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5078 # Setup a source with many dependencies, because some compilers
5079 # like to wrap large dependency lists on column 80 (with \), and
5080 # we should not choose a depcomp mode which is confused by this.
5081 #
5082 # We need to recreate these files for each test, as the compiler may
5083 # overwrite some of them when testing with obscure command lines.
5084 # This happens at least with the AIX C compiler.
5085 : > sub/conftest.c
5086 for i in 1 2 3 4 5 6; do
5087 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5088 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5089 # Solaris 8's {/usr,}/bin/sh.
5090 touch sub/conftst$i.h
5091 done
5092 echo "include sub/conftest.Po" > confmf
5093
5094 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5095 # mode. It turns out that the SunPro C++ compiler does not properly
5096 # handle `-M -o', and we need to detect this.
5097 depcmd="depmode=$depmode \
5098 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5099 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5100 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5101 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5102 if env $depcmd > conftest.err 2>&1 &&
5103 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5104 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5105 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5106 # icc doesn't choke on unknown options, it will just issue warnings
5107 # or remarks (even with -Werror). So we grep stderr for any message
5108 # that says an option was ignored or not supported.
5109 # When given -MP, icc 7.0 and 7.1 complain thusly:
5110 # icc: Command line warning: ignoring option '-M'; no argument required
5111 # The diagnosis changed in icc 8.0:
5112 # icc: Command line remark: option '-MP' not supported
5113 if (grep 'ignoring option' conftest.err ||
5114 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5115 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5116 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5117 break
5118 fi
5119 fi
81ecdfbb 5120 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5121 sed -e 's/^/| /' < conftest.err >&5
5122 done
5123
5124 cd ..
5125 rm -rf conftest.dir
5126else
5127 am_cv_CC_dependencies_compiler_type=none
5128fi
5129
5130fi
81ecdfbb
RW
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5132$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5133if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5134then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5135else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5136
5137fi
5138
5139
5140# Check for the 'make' the user wants to use.
5141for ac_prog in make
5142do
5143 # Extract the first word of "$ac_prog", so it can be a program name with args.
5144set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146$as_echo_n "checking for $ac_word... " >&6; }
5147if test "${ac_cv_prog_MAKE+set}" = set; then :
5148 $as_echo_n "(cached) " >&6
a417dc56
RW
5149else
5150 if test -n "$MAKE"; then
5151 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5152else
5153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156 IFS=$as_save_IFS
5157 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5158 for ac_exec_ext in '' $ac_executable_extensions; do
5159 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5160 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5162 break 2
5163 fi
5164done
81ecdfbb
RW
5165 done
5166IFS=$as_save_IFS
a417dc56
RW
5167
5168fi
5169fi
5170MAKE=$ac_cv_prog_MAKE
5171if test -n "$MAKE"; then
81ecdfbb
RW
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5173$as_echo "$MAKE" >&6; }
a417dc56 5174else
81ecdfbb
RW
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176$as_echo "no" >&6; }
a417dc56
RW
5177fi
5178
81ecdfbb 5179
a417dc56
RW
5180 test -n "$MAKE" && break
5181done
5182
5183MAKE_IS_GNU=
5184case "`$MAKE --version 2>&1 | sed 1q`" in
5185 *GNU*)
5186 MAKE_IS_GNU=yes
5187 ;;
5188esac
81ecdfbb 5189 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5190 GMAKE_TRUE=
5191 GMAKE_FALSE='#'
5192else
5193 GMAKE_TRUE='#'
5194 GMAKE_FALSE=
5195fi
5196
81ecdfbb
RW
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5198$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5199set x ${MAKE-make}
5200ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5201if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5202 $as_echo_n "(cached) " >&6
a417dc56
RW
5203else
5204 cat >conftest.make <<\_ACEOF
81ecdfbb 5205SHELL = /bin/sh
a417dc56 5206all:
81ecdfbb 5207 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5208_ACEOF
5209# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5210case `${MAKE-make} -f conftest.make 2>/dev/null` in
5211 *@@@%%%=?*=@@@%%%*)
5212 eval ac_cv_prog_make_${ac_make}_set=yes;;
5213 *)
5214 eval ac_cv_prog_make_${ac_make}_set=no;;
5215esac
a417dc56
RW
5216rm -f conftest.make
5217fi
81ecdfbb
RW
5218if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5220$as_echo "yes" >&6; }
a417dc56
RW
5221 SET_MAKE=
5222else
81ecdfbb
RW
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224$as_echo "no" >&6; }
a417dc56
RW
5225 SET_MAKE="MAKE=${MAKE-make}"
5226fi
5227
5228
648d586d
JB
5229gnulib_extra_configure_args=
5230# If large-file support is disabled, make sure gnulib does the same.
5231if test "$enable_largefile" = no; then
5232gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5233fi
5234
c971b7fa
PA
5235# Configure gnulib. We need to build gnulib under some other
5236# directory not "gnulib", to avoid the problem of both GDB and
5237# GDBserver wanting to build it in the same directory, when building
5238# in the source dir.
783e057b 5239
c971b7fa
PA
5240 in_src="gnulib"
5241 in_build="build-gnulib"
648d586d 5242 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5243
5244 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5245 # so they do not pile up.
5246 ac_sub_configure_args=
5247 ac_prev=
5248 eval "set x $ac_configure_args"
5249 shift
5250 for ac_arg
5251 do
5252 if test -n "$ac_prev"; then
5253 ac_prev=
5254 continue
5255 fi
5256 case $ac_arg in
5257 -cache-file | --cache-file | --cache-fil | --cache-fi \
5258 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5259 ac_prev=cache_file ;;
5260 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5261 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5262 | --c=*)
5263 ;;
5264 --config-cache | -C)
5265 ;;
5266 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5267 ac_prev=srcdir ;;
5268 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5269 ;;
5270 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5271 ac_prev=prefix ;;
5272 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5273 ;;
5274 --disable-option-checking)
5275 ;;
5276 *)
5277 case $ac_arg in
5278 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5279 esac
5280 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5281 esac
5282 done
5283
5284 # Always prepend --prefix to ensure using the same prefix
5285 # in subdir configurations.
5286 ac_arg="--prefix=$prefix"
5287 case $ac_arg in
5288 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5289 esac
5290 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5291
5292 # Pass --silent
5293 if test "$silent" = yes; then
5294 ac_sub_configure_args="--silent $ac_sub_configure_args"
5295 fi
5296
5297 # Always prepend --disable-option-checking to silence warnings, since
5298 # different subdirs can have different --enable and --with options.
5299 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5300
5301 ac_popdir=`pwd`
5302 ac_dir=$in_build
5303
5304 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5305 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5306 $as_echo "$ac_msg" >&6
5307 as_dir="$ac_dir"; as_fn_mkdir_p
5308
38ea300a
PA
5309 case $srcdir in
5310 [\\/]* | ?:[\\/]* )
5311 ac_srcdir=$srcdir/$in_src ;;
5312 *) # Relative name.
5313 ac_srcdir=../$srcdir/$in_src ;;
5314 esac
c971b7fa
PA
5315
5316 cd "$ac_dir"
5317
5318 ac_sub_configure=$ac_srcdir/configure
5319
5320 # Make the cache file name correct relative to the subdirectory.
5321 case $cache_file in
5322 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5323 *) # Relative name.
5324 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5325 esac
5326
648d586d
JB
5327 if test -n "$in_extra_args"; then
5328 # Add the extra args at the end.
5329 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5330 fi
5331
c971b7fa
PA
5332 { $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
5333$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5334 # The eval makes quoting arguments work.
5335 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5336 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5337 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5338
5339 cd "$ac_popdir"
783e057b 5340
c971b7fa
PA
5341
5342
5343CONFIG_OBS=
5344CONFIG_DEPS=
5345CONFIG_SRCS=
5346ENABLE_CFLAGS=
5347
5348CONFIG_ALL=
5349CONFIG_CLEAN=
5350CONFIG_INSTALL=
5351CONFIG_UNINSTALL=
5352
5353# If we haven't got the data from the intl directory,
5354# assume NLS is disabled.
5355USE_NLS=no
5356LIBINTL=
5357LIBINTL_DEP=
5358INCINTL=
5359XGETTEXT=
5360GMSGFMT=
5361POSUB=
783e057b
DJ
5362
5363if test -f ../intl/config.intl; then
5364 . ../intl/config.intl
5365fi
81ecdfbb
RW
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5367$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5368if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
783e057b 5371else
81ecdfbb
RW
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5373$as_echo "yes" >&6; }
783e057b 5374
81ecdfbb 5375$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5376
5377
81ecdfbb
RW
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5379$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5380 # Look for .po and .gmo files in the source directory.
5381 CATALOGS=
5382 XLINGUAS=
5383 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5384 # If there aren't any .gmo files the shell will give us the
5385 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5386 # weeded out.
5387 case "$cat" in *\**)
5388 continue;;
5389 esac
5390 # The quadruple backslash is collapsed to a double backslash
5391 # by the backticks, then collapsed again by the double quotes,
5392 # leaving us with one backslash in the sed expression (right
5393 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5394 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5395 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5396 # The user is allowed to set LINGUAS to a list of languages to
5397 # install catalogs for. If it's empty that means "all of them."
5398 if test "x$LINGUAS" = x; then
5399 CATALOGS="$CATALOGS $cat"
5400 XLINGUAS="$XLINGUAS $lang"
5401 else
5402 case "$LINGUAS" in *$lang*)
5403 CATALOGS="$CATALOGS $cat"
5404 XLINGUAS="$XLINGUAS $lang"
5405 ;;
5406 esac
e28b3332
DJ
5407 fi
5408 done
c971b7fa
PA
5409 LINGUAS="$XLINGUAS"
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5411$as_echo "$LINGUAS" >&6; }
5412
5413
5414 DATADIRNAME=share
5415
5416 INSTOBJEXT=.mo
5417
5418 GENCAT=gencat
5419
5420 CATOBJEXT=.gmo
e28b3332 5421
e28b3332
DJ
5422fi
5423
c971b7fa
PA
5424localedir='${datadir}/locale'
5425
5426
5427if test x"$USE_NLS" = xyes; then
5428 CONFIG_ALL="$CONFIG_ALL all-po"
5429 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5430 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5431 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5432fi
e28b3332 5433
c971b7fa
PA
5434GNULIB=build-gnulib/import
5435
5436# For Makefile dependencies.
5437GNULIB_STDINT_H=
5438if test x"$STDINT_H" != x; then
5439 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5440fi
5441
5442
c971b7fa
PA
5443PACKAGE=gdb
5444
5445cat >>confdefs.h <<_ACEOF
5446#define PACKAGE "$PACKAGE"
5447_ACEOF
5448
5449
5450
5451# We never need to detect it in this sub-configure.
5452# But preserve it for config.status --recheck.
5453
5454
5455
5456MAKEINFO_EXTRA_FLAGS=""
5457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5458$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5459if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5460 $as_echo_n "(cached) " >&6
5461else
5462 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5463 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5464 gdb_cv_have_makeinfo_click=yes
5465 else
5466 gdb_cv_have_makeinfo_click=no
5467 fi
5468fi
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5470$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5471if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5472 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5473fi
e28b3332
DJ
5474
5475
bec39cab
AC
5476
5477
81ecdfbb
RW
5478# Check whether --with-separate-debug-dir was given.
5479if test "${with_separate_debug_dir+set}" = set; then :
5480 withval=$with_separate_debug_dir;
b14b1491
TT
5481 DEBUGDIR=$withval
5482else
5483 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5484fi
5485
20e95c23 5486
783e057b
DJ
5487 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5488 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5489 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5490 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5491
783e057b
DJ
5492cat >>confdefs.h <<_ACEOF
5493#define DEBUGDIR "$ac_define_dir"
20e95c23 5494_ACEOF
20e95c23 5495
20e95c23 5496
20e95c23 5497
0c4a4063 5498
b14b1491
TT
5499 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5500 if test "x$prefix" = xNONE; then
5501 test_prefix=/usr/local
5502 else
5503 test_prefix=$prefix
5504 fi
783e057b 5505 else
b14b1491 5506 test_prefix=$exec_prefix
783e057b 5507 fi
b14b1491
TT
5508 value=0
5509 case ${ac_define_dir} in
5510 "${test_prefix}"|"${test_prefix}/"*|\
5511 '${exec_prefix}'|'${exec_prefix}/'*)
5512 value=1
5513 ;;
5514 esac
5515
5516cat >>confdefs.h <<_ACEOF
5517#define DEBUGDIR_RELOCATABLE $value
5518_ACEOF
5519
5520
5521
0c4a4063 5522
f83d8a90
DE
5523# We can't pass paths as command line arguments.
5524# Mingw32 tries to be clever and will convert the paths for us.
5525# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5526# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5527# This breaks GDB's relocatable path conversions since paths passed in
5528# config.h would not get so translated, the path prefixes no longer match.
5529
5530 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5531 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5532 ac_define_dir=`eval echo $bindir`
5533 ac_define_dir=`eval echo $ac_define_dir`
5534
5535cat >>confdefs.h <<_ACEOF
5536#define BINDIR "$ac_define_dir"
5537_ACEOF
5538
5539
5540
b14b1491
TT
5541# GDB's datadir relocation
5542
5543
5544
81ecdfbb
RW
5545# Check whether --with-gdb-datadir was given.
5546if test "${with_gdb_datadir+set}" = set; then :
5547 withval=$with_gdb_datadir;
b14b1491 5548 GDB_DATADIR=$withval
20e95c23 5549else
b14b1491 5550 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5551fi
5552
20e95c23 5553
b14b1491
TT
5554 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5555 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5556 ac_define_dir=`eval echo $GDB_DATADIR`
5557 ac_define_dir=`eval echo $ac_define_dir`
5558
5559cat >>confdefs.h <<_ACEOF
5560#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5561_ACEOF
5562
b14b1491
TT
5563
5564
0c4a4063 5565
b14b1491
TT
5566 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5567 if test "x$prefix" = xNONE; then
5568 test_prefix=/usr/local
5569 else
5570 test_prefix=$prefix
5571 fi
5572 else
5573 test_prefix=$exec_prefix
5574 fi
5575 value=0
5576 case ${ac_define_dir} in
5577 "${test_prefix}"|"${test_prefix}/"*|\
5578 '${exec_prefix}'|'${exec_prefix}/'*)
5579 value=1
5580 ;;
5581 esac
5582
5583cat >>confdefs.h <<_ACEOF
5584#define GDB_DATADIR_RELOCATABLE $value
5585_ACEOF
5586
5587
783e057b 5588
20e95c23 5589
0c4a4063 5590
81ecdfbb
RW
5591# Check whether --with-relocated-sources was given.
5592if test "${with_relocated_sources+set}" = set; then :
5593 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5594
5595 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5596 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5597 ac_define_dir=`eval echo $reloc_srcdir`
5598 ac_define_dir=`eval echo $ac_define_dir`
5599
5600cat >>confdefs.h <<_ACEOF
5601#define RELOC_SRCDIR "$ac_define_dir"
5602_ACEOF
5603
5604
5605
81ecdfbb
RW
5606fi
5607
29b0e8a2 5608
7349ff92
JK
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5610$as_echo_n "checking for default auto-load directory... " >&6; }
5611
5612# Check whether --with-auto-load-dir was given.
5613if test "${with_auto_load_dir+set}" = set; then :
5614 withval=$with_auto_load_dir;
5615else
1564a261 5616 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5617fi
5618
1564a261 5619escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5620
5621 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5622 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5623 ac_define_dir=`eval echo $escape_dir`
5624 ac_define_dir=`eval echo $ac_define_dir`
5625
5626cat >>confdefs.h <<_ACEOF
5627#define AUTO_LOAD_DIR "$ac_define_dir"
5628_ACEOF
5629
5630
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5632$as_echo "$with_auto_load_dir" >&6; }
5633
bccbefd2
JK
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5635$as_echo_n "checking for default auto-load safe-path... " >&6; }
5636
5637# Check whether --with-auto-load-safe-path was given.
5638if test "${with_auto_load_safe_path+set}" = set; then :
5639 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5640 with_auto_load_safe_path="/"
5641 fi
bccbefd2 5642else
7349ff92 5643 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5644fi
5645
1564a261 5646escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5647
5648 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5649 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5650 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5651 ac_define_dir=`eval echo $ac_define_dir`
5652
5653cat >>confdefs.h <<_ACEOF
6dea1fbd 5654#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5655_ACEOF
5656
5657
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5659$as_echo "$with_auto_load_safe_path" >&6; }
5660
29b0e8a2 5661
20e95c23 5662
5ae98d25 5663subdirs="$subdirs testsuite"
20e95c23
DJ
5664
5665
783e057b 5666# Check whether to support alternative target configurations
81ecdfbb
RW
5667# Check whether --enable-targets was given.
5668if test "${enable_targets+set}" = set; then :
5669 enableval=$enable_targets; case "${enableval}" in
5670 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5671 ;;
5672 no) enable_targets= ;;
5673 *) enable_targets=$enableval ;;
5674esac
81ecdfbb
RW
5675fi
5676
20e95c23 5677
783e057b 5678# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5679# Check whether --enable-64-bit-bfd was given.
5680if test "${enable_64_bit_bfd+set}" = set; then :
5681 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5682 yes) want64=true ;;
5683 no) want64=false ;;
81ecdfbb 5684 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5685esac
5686else
5687 want64=false
81ecdfbb
RW
5688fi
5689
783e057b
DJ
5690# Provide defaults for some variables set by the per-host and per-target
5691# configuration.
5692gdb_host_obs=posix-hdep.o
20e95c23 5693
783e057b
DJ
5694if test "${target}" = "${host}"; then
5695 gdb_native=yes
5696else
5697 gdb_native=no
5698fi
20e95c23 5699
783e057b 5700. $srcdir/configure.host
20e95c23 5701
fb23d554
SDJ
5702# Add in the common host objects.
5703. $srcdir/common/common.host
5704gdb_host_obs="$gdb_host_obs $common_host_obs"
5705
783e057b 5706# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5707
783e057b
DJ
5708TARGET_OBS=
5709all_targets=
b292c783 5710HAVE_NATIVE_GCORE_TARGET=
20e95c23 5711
783e057b 5712for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5713do
783e057b
DJ
5714 if test "$targ_alias" = "all"; then
5715 all_targets=true
5716 else
5717 # Canonicalize the secondary target names.
5718 result=`$ac_config_sub $targ_alias 2>/dev/null`
5719 if test -n "$result"; then
5720 targ=$result
5721 else
5722 targ=$targ_alias
5723 fi
20e95c23 5724
783e057b 5725 . ${srcdir}/configure.tgt
20e95c23 5726
bf307134
JB
5727 if test -z "${gdb_target_obs}"; then :
5728 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5729fi
5730
783e057b
DJ
5731 # Target-specific object files
5732 for i in ${gdb_target_obs}; do
5733 case " $TARGET_OBS " in
5734 *" ${i} "*) ;;
5735 *)
5736 TARGET_OBS="$TARGET_OBS ${i}"
5737 ;;
5738 esac
5739 done
20e95c23 5740
783e057b
DJ
5741 # Check whether this target needs 64-bit CORE_ADDR
5742 if test x${want64} = xfalse; then
5743 . ${srcdir}/../bfd/config.bfd
5744 fi
b292c783
JK
5745
5746 # Check whether this target is native and supports gcore.
5747 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5748 && $gdb_have_gcore; then
5749 HAVE_NATIVE_GCORE_TARGET=1
5750 fi
783e057b 5751 fi
20e95c23
DJ
5752done
5753
783e057b
DJ
5754if test x${all_targets} = xtrue; then
5755
5756 # We want all 64-bit targets if we either:
5757 # - run on a 64-bit host or
5758 # - already require 64-bit support for some other target or
5759 # - the --enable-64-bit-bfd option was supplied
5760 # Otherwise we only support all 32-bit targets.
5761 #
5762 # NOTE: This test must be in sync with the corresponding
5763 # tests in BFD!
20e95c23 5764
783e057b 5765 if test x${want64} = xfalse; then
81ecdfbb
RW
5766 # The cast to long int works around a bug in the HP C Compiler
5767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5769# This bug is HP SR number 8606223364.
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5771$as_echo_n "checking size of long... " >&6; }
5772if test "${ac_cv_sizeof_long+set}" = set; then :
5773 $as_echo_n "(cached) " >&6
c0993dbe 5774else
81ecdfbb 5775 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5776
81ecdfbb
RW
5777else
5778 if test "$ac_cv_type_long" = yes; then
5779 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5780$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5781{ as_fn_set_status 77
5782as_fn_error "cannot compute sizeof (long)
5783See \`config.log' for more details." "$LINENO" 5; }; }
5784 else
5785 ac_cv_sizeof_long=0
5786 fi
c0993dbe 5787fi
81ecdfbb 5788
c0993dbe 5789fi
81ecdfbb
RW
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5791$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5792
c0993dbe 5793
c0993dbe 5794
c0993dbe
UW
5795cat >>confdefs.h <<_ACEOF
5796#define SIZEOF_LONG $ac_cv_sizeof_long
5797_ACEOF
5798
5799
5800 if test "x${ac_cv_sizeof_long}" = "x8"; then
5801 want64=true
5802 fi
5803 fi
5804 if test x${want64} = xtrue; then
5805 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5806 else
5807 TARGET_OBS='$(ALL_TARGET_OBS)'
5808 fi
5809fi
5810
5811
5812
b292c783 5813
c0993dbe
UW
5814# For other settings, only the main target counts.
5815gdb_sim=
5816gdb_osabi=
5817build_gdbserver=
5818targ=$target; . ${srcdir}/configure.tgt
5819
5820# Fetch the default architecture and default target vector from BFD.
5821targ=$target; . $srcdir/../bfd/config.bfd
5822
5823# We only want the first architecture, so strip off the others if
5824# there is more than one.
5825targ_archs=`echo $targ_archs | sed 's/ .*//'`
5826
5827if test "x$targ_archs" != x; then
5828
5829cat >>confdefs.h <<_ACEOF
5830#define DEFAULT_BFD_ARCH $targ_archs
5831_ACEOF
5832
5833fi
5834if test "x$targ_defvec" != x; then
5835
5836cat >>confdefs.h <<_ACEOF
5837#define DEFAULT_BFD_VEC $targ_defvec
5838_ACEOF
5839
5840fi
5841
c0993dbe
UW
5842# The CLI cannot be disabled yet, but may be in the future.
5843
5844# Enable CLI.
81ecdfbb
RW
5845# Check whether --enable-gdbcli was given.
5846if test "${enable_gdbcli+set}" = set; then :
5847 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5848 yes)
5849 ;;
5850 no)
81ecdfbb 5851 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5852 *)
81ecdfbb 5853 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5854 esac
5855else
5856 enable_gdbcli=yes
81ecdfbb
RW
5857fi
5858
c0993dbe
UW
5859if test x"$enable_gdbcli" = xyes; then
5860 if test -d $srcdir/cli; then
5861 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5862 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5863 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5864 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5865 fi
5866fi
5867
5868# Enable MI.
81ecdfbb
RW
5869# Check whether --enable-gdbmi was given.
5870if test "${enable_gdbmi+set}" = set; then :
5871 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5872 yes | no)
5873 ;;
5874 *)
81ecdfbb 5875 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5876 esac
5877else
5878 enable_gdbmi=yes
81ecdfbb
RW
5879fi
5880
c0993dbe
UW
5881if test x"$enable_gdbmi" = xyes; then
5882 if test -d $srcdir/mi; then
5883 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5884 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5885 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5886 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5887 fi
5888fi
5889
5890# Enable TUI.
81ecdfbb
RW
5891# Check whether --enable-tui was given.
5892if test "${enable_tui+set}" = set; then :
5893 enableval=$enable_tui; case $enableval in
3ca64bd3 5894 yes | no | auto)
c0993dbe
UW
5895 ;;
5896 *)
81ecdfbb 5897 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5898 esac
5899else
3ca64bd3 5900 enable_tui=auto
81ecdfbb
RW
5901fi
5902
c0993dbe
UW
5903
5904# Enable gdbtk.
81ecdfbb
RW
5905# Check whether --enable-gdbtk was given.
5906if test "${enable_gdbtk+set}" = set; then :
5907 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5908 yes | no)
5909 ;;
5910 *)
81ecdfbb 5911 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5912 esac
5913else
5062cc19 5914 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5915 enable_gdbtk=yes
5916 else
5917 enable_gdbtk=no
5918 fi
81ecdfbb
RW
5919fi
5920
c0993dbe
UW
5921# We unconditionally disable gdbtk tests on selected platforms.
5922case $host_os in
5923 go32* | windows*)
81ecdfbb
RW
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5925$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5926 enable_gdbtk=no ;;
5927esac
5928
05e7c244 5929# Libunwind support for ia64.
bec39cab 5930
05e7c244
JK
5931
5932# Check whether --with-libunwind-ia64 was given.
5933if test "${with_libunwind_ia64+set}" = set; then :
5934 withval=$with_libunwind_ia64;
bec39cab 5935else
05e7c244
JK
5936 with_libunwind_ia64=auto
5937fi
bec39cab 5938
05e7c244
JK
5939
5940# Backward compatibility option.
5941if test "${with_libunwind+set}" = set; then
5942 if test x"$with_libunwind_ia64" != xauto; then
5943 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5944 fi
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5946$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5947 with_libunwind_ia64="$with_libunwind"
5948fi
5949
5950case "$with_libunwind_ia64" in
5951 yes | no)
5952 ;;
5953 auto)
5954 for ac_header in libunwind-ia64.h
81ecdfbb 5955do :
b54a8fd7
PA
5956 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5957if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5958 cat >>confdefs.h <<_ACEOF
b54a8fd7 5959#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5960_ACEOF
5961
5962fi
5963
5964done
5965
05e7c244
JK
5966 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5967 ;;
5968 *)
5969 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5970 ;;
5971esac
bec39cab 5972
05e7c244 5973if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5974 for ac_header in libunwind-ia64.h
81ecdfbb 5975do :
b54a8fd7
PA
5976 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5977if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5978 cat >>confdefs.h <<_ACEOF
b54a8fd7 5979#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5980_ACEOF
5981
5982fi
5983
5984done
5985
05e7c244
JK
5986 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5987 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5988 fi
5989 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5990 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5991 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5992fi
5993
cb01cfba
JB
5994opt_curses=no
5995
81ecdfbb
RW
5996# Check whether --with-curses was given.
5997if test "${with_curses+set}" = set; then :
5998 withval=$with_curses; opt_curses=$withval
5999fi
6000
cb01cfba 6001
76a39ba7 6002prefer_curses=no
cb01cfba 6003if test "$opt_curses" = "yes"; then
76a39ba7 6004 prefer_curses=yes
cb01cfba
JB
6005fi
6006
a9322a30 6007# Profiling support.
81ecdfbb
RW
6008# Check whether --enable-profiling was given.
6009if test "${enable_profiling+set}" = set; then :
6010 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6011 yes | no)
6012 ;;
6013 *)
81ecdfbb 6014 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6015 esac
6016else
6017 enable_profiling=no
81ecdfbb 6018fi
bec39cab 6019
a9322a30
TT
6020
6021for ac_func in monstartup _mcleanup
81ecdfbb
RW
6022do :
6023 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6024ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6025eval as_val=\$$as_ac_var
6026 if test "x$as_val" = x""yes; then :
6027 cat >>confdefs.h <<_ACEOF
6028#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6029_ACEOF
a9322a30 6030
81ecdfbb
RW
6031fi
6032done
a9322a30 6033
81ecdfbb
RW
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6035$as_echo_n "checking for _etext... " >&6; }
6036if test "${ac_cv_var__etext+set}" = set; then :
6037 $as_echo_n "(cached) " >&6
6038else
6039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6040/* end confdefs.h. */
6041#include <stdlib.h>
6042extern char _etext;
a9322a30
TT
6043
6044int
6045main ()
6046{
6047free (&_etext);
6048 ;
6049 return 0;
6050}
bec39cab 6051_ACEOF
81ecdfbb 6052if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6053 ac_cv_var__etext=yes
bec39cab 6054else
81ecdfbb 6055 ac_cv_var__etext=no
bec39cab 6056fi
81ecdfbb
RW
6057rm -f core conftest.err conftest.$ac_objext \
6058 conftest$ac_exeext conftest.$ac_ext
bec39cab 6059fi
81ecdfbb
RW
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6061$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6062if test $ac_cv_var__etext = yes; then
60ca704f 6063
81ecdfbb 6064$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6065
bec39cab 6066fi
81ecdfbb
RW
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6068$as_echo_n "checking for etext... " >&6; }
6069if test "${ac_cv_var_etext+set}" = set; then :
6070 $as_echo_n "(cached) " >&6
bec39cab 6071else
81ecdfbb 6072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6073/* end confdefs.h. */
a9322a30
TT
6074#include <stdlib.h>
6075extern char etext;
bec39cab
AC
6076
6077int
6078main ()
6079{
a9322a30 6080free (&etext);
bec39cab
AC
6081 ;
6082 return 0;
6083}
6084_ACEOF
81ecdfbb 6085if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6086 ac_cv_var_etext=yes
bec39cab 6087else
81ecdfbb 6088 ac_cv_var_etext=no
bec39cab 6089fi
81ecdfbb
RW
6090rm -f core conftest.err conftest.$ac_objext \
6091 conftest$ac_exeext conftest.$ac_ext
bec39cab 6092fi
81ecdfbb
RW
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6094$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6095if test $ac_cv_var_etext = yes; then
6096
81ecdfbb 6097$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6098
6099fi
a9322a30
TT
6100if test "$enable_profiling" = yes ; then
6101 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6102 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6103 fi
6104 PROFILE_CFLAGS=-pg
6105 OLD_CFLAGS="$CFLAGS"
6106 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6107
81ecdfbb
RW
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6109$as_echo_n "checking whether $CC supports -pg... " >&6; }
6110if test "${ac_cv_cc_supports_pg+set}" = set; then :
6111 $as_echo_n "(cached) " >&6
bec39cab 6112else
81ecdfbb 6113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6114/* end confdefs.h. */
bec39cab
AC
6115
6116int
6117main ()
6118{
a9322a30 6119int x;
bec39cab
AC
6120 ;
6121 return 0;
6122}
6123_ACEOF
81ecdfbb 6124if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6125 ac_cv_cc_supports_pg=yes
bec39cab 6126else
81ecdfbb 6127 ac_cv_cc_supports_pg=no
bec39cab 6128fi
81ecdfbb 6129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6130fi
81ecdfbb
RW
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6132$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6133
a9322a30 6134 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6135 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6136 fi
bec39cab 6137
a9322a30 6138 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6139fi
6140
c16158bc
JM
6141
6142
81ecdfbb
RW
6143# Check whether --with-pkgversion was given.
6144if test "${with_pkgversion+set}" = set; then :
6145 withval=$with_pkgversion; case "$withval" in
6146 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6147 no) PKGVERSION= ;;
6148 *) PKGVERSION="($withval) " ;;
6149 esac
6150else
6151 PKGVERSION="(GDB) "
6152
81ecdfbb 6153fi
c16158bc
JM
6154
6155
6156
6157
81ecdfbb
RW
6158
6159# Check whether --with-bugurl was given.
6160if test "${with_bugurl+set}" = set; then :
6161 withval=$with_bugurl; case "$withval" in
6162 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6163 no) BUGURL=
6164 ;;
6165 *) BUGURL="$withval"
6166 ;;
6167 esac
6168else
6169 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6170
81ecdfbb
RW
6171fi
6172
c16158bc
JM
6173 case ${BUGURL} in
6174 "")
6175 REPORT_BUGS_TO=
6176 REPORT_BUGS_TEXI=
6177 ;;
6178 *)
6179 REPORT_BUGS_TO="<$BUGURL>"
6180 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6181 ;;
6182 esac;
6183
6184
6185
6186
6187cat >>confdefs.h <<_ACEOF
6188#define PKGVERSION "$PKGVERSION"
6189_ACEOF
6190
6191
6192cat >>confdefs.h <<_ACEOF
6193#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6194_ACEOF
6195
6196
bec39cab
AC
6197# --------------------- #
6198# Checks for programs. #
6199# --------------------- #
6200
6201for ac_prog in gawk mawk nawk awk
6202do
6203 # Extract the first word of "$ac_prog", so it can be a program name with args.
6204set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6206$as_echo_n "checking for $ac_word... " >&6; }
6207if test "${ac_cv_prog_AWK+set}" = set; then :
6208 $as_echo_n "(cached) " >&6
bec39cab
AC
6209else
6210 if test -n "$AWK"; then
6211 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6212else
6213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214for as_dir in $PATH
6215do
6216 IFS=$as_save_IFS
6217 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6218 for ac_exec_ext in '' $ac_executable_extensions; do
6219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6220 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6222 break 2
6223 fi
6224done
81ecdfbb
RW
6225 done
6226IFS=$as_save_IFS
bec39cab
AC
6227
6228fi
6229fi
6230AWK=$ac_cv_prog_AWK
6231if test -n "$AWK"; then
81ecdfbb
RW
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6233$as_echo "$AWK" >&6; }
bec39cab 6234else
81ecdfbb
RW
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6236$as_echo "no" >&6; }
bec39cab
AC
6237fi
6238
bec39cab 6239
81ecdfbb 6240 test -n "$AWK" && break
bec39cab
AC
6241done
6242
c971b7fa
PA
6243# Find a good install program. We prefer a C program (faster),
6244# so one script is as good as another. But avoid the broken or
6245# incompatible versions:
6246# SysV /etc/install, /usr/sbin/install
6247# SunOS /usr/etc/install
6248# IRIX /sbin/install
6249# AIX /bin/install
6250# AmigaOS /C/install, which installs bootblocks on floppy discs
6251# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6252# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6253# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6254# OS/2's system install, which has a completely different semantic
6255# ./install, which can be erroneously created by make from ./install.sh.
6256# Reject install programs that cannot install multiple files.
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6258$as_echo_n "checking for a BSD-compatible install... " >&6; }
6259if test -z "$INSTALL"; then
6260if test "${ac_cv_path_install+set}" = set; then :
6261 $as_echo_n "(cached) " >&6
6262else
6263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH
6265do
6266 IFS=$as_save_IFS
6267 test -z "$as_dir" && as_dir=.
6268 # Account for people who put trailing slashes in PATH elements.
6269case $as_dir/ in #((
6270 ./ | .// | /[cC]/* | \
6271 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6272 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6273 /usr/ucb/* ) ;;
6274 *)
6275 # OSF1 and SCO ODT 3.0 have their own names for install.
6276 # Don't use installbsd from OSF since it installs stuff as root
6277 # by default.
6278 for ac_prog in ginstall scoinst install; do
6279 for ac_exec_ext in '' $ac_executable_extensions; do
6280 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6281 if test $ac_prog = install &&
6282 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6283 # AIX install. It has an incompatible calling convention.
6284 :
6285 elif test $ac_prog = install &&
6286 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6287 # program-specific install script used by HP pwplus--don't use.
6288 :
6289 else
6290 rm -rf conftest.one conftest.two conftest.dir
6291 echo one > conftest.one
6292 echo two > conftest.two
6293 mkdir conftest.dir
6294 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6295 test -s conftest.one && test -s conftest.two &&
6296 test -s conftest.dir/conftest.one &&
6297 test -s conftest.dir/conftest.two
6298 then
6299 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6300 break 3
6301 fi
6302 fi
6303 fi
6304 done
6305 done
6306 ;;
6307esac
6308
6309 done
6310IFS=$as_save_IFS
6311
6312rm -rf conftest.one conftest.two conftest.dir
6313
6314fi
6315 if test "${ac_cv_path_install+set}" = set; then
6316 INSTALL=$ac_cv_path_install
6317 else
6318 # As a last resort, use the slow shell script. Don't cache a
6319 # value for INSTALL within a source directory, because that will
6320 # break other packages using the cache if that directory is
6321 # removed, or if the value is a relative name.
6322 INSTALL=$ac_install_sh
6323 fi
6324fi
6325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6326$as_echo "$INSTALL" >&6; }
6327
6328# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6329# It thinks the first close brace ends the variable substitution.
6330test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6331
6332test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6333
6334test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6335
81ecdfbb
RW
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6337$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6338LN_S=$as_ln_s
6339if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6341$as_echo "yes" >&6; }
bec39cab 6342else
81ecdfbb
RW
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6344$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6345fi
6346
6347if test -n "$ac_tool_prefix"; then
6348 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6349set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6351$as_echo_n "checking for $ac_word... " >&6; }
6352if test "${ac_cv_prog_RANLIB+set}" = set; then :
6353 $as_echo_n "(cached) " >&6
bec39cab
AC
6354else
6355 if test -n "$RANLIB"; then
6356 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6357else
6358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6359for as_dir in $PATH
6360do
6361 IFS=$as_save_IFS
6362 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6363 for ac_exec_ext in '' $ac_executable_extensions; do
6364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6365 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6367 break 2
6368 fi
6369done
81ecdfbb
RW
6370 done
6371IFS=$as_save_IFS
bec39cab
AC
6372
6373fi
6374fi
6375RANLIB=$ac_cv_prog_RANLIB
6376if test -n "$RANLIB"; then
81ecdfbb
RW
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6378$as_echo "$RANLIB" >&6; }
bec39cab 6379else
81ecdfbb
RW
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381$as_echo "no" >&6; }
bec39cab
AC
6382fi
6383
81ecdfbb 6384
bec39cab
AC
6385fi
6386if test -z "$ac_cv_prog_RANLIB"; then
6387 ac_ct_RANLIB=$RANLIB
6388 # Extract the first word of "ranlib", so it can be a program name with args.
6389set dummy ranlib; ac_word=$2
81ecdfbb
RW
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6393 $as_echo_n "(cached) " >&6
bec39cab
AC
6394else
6395 if test -n "$ac_ct_RANLIB"; then
6396 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6397else
6398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401 IFS=$as_save_IFS
6402 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6403 for ac_exec_ext in '' $ac_executable_extensions; do
6404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6405 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6407 break 2
6408 fi
6409done
81ecdfbb
RW
6410 done
6411IFS=$as_save_IFS
bec39cab 6412
bec39cab
AC
6413fi
6414fi
6415ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6416if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6418$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6419else
81ecdfbb
RW
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421$as_echo "no" >&6; }
bec39cab
AC
6422fi
6423
81ecdfbb
RW
6424 if test "x$ac_ct_RANLIB" = x; then
6425 RANLIB=":"
6426 else
6427 case $cross_compiling:$ac_tool_warned in
6428yes:)
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6431ac_tool_warned=yes ;;
6432esac
6433 RANLIB=$ac_ct_RANLIB
6434 fi
bec39cab
AC
6435else
6436 RANLIB="$ac_cv_prog_RANLIB"
6437fi
6438
6439for ac_prog in 'bison -y' byacc
6440do
6441 # Extract the first word of "$ac_prog", so it can be a program name with args.
6442set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444$as_echo_n "checking for $ac_word... " >&6; }
6445if test "${ac_cv_prog_YACC+set}" = set; then :
6446 $as_echo_n "(cached) " >&6
bec39cab
AC
6447else
6448 if test -n "$YACC"; then
6449 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6450else
6451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454 IFS=$as_save_IFS
6455 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6456 for ac_exec_ext in '' $ac_executable_extensions; do
6457 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6458 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6460 break 2
6461 fi
6462done
81ecdfbb
RW
6463 done
6464IFS=$as_save_IFS
bec39cab
AC
6465
6466fi
6467fi
6468YACC=$ac_cv_prog_YACC
6469if test -n "$YACC"; then
81ecdfbb
RW
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6471$as_echo "$YACC" >&6; }
bec39cab 6472else
81ecdfbb
RW
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; }
bec39cab
AC
6475fi
6476
81ecdfbb 6477
bec39cab
AC
6478 test -n "$YACC" && break
6479done
6480test -n "$YACC" || YACC="yacc"
6481
6482
6483if test -n "$ac_tool_prefix"; then
6484 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6485set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6487$as_echo_n "checking for $ac_word... " >&6; }
6488if test "${ac_cv_prog_AR+set}" = set; then :
6489 $as_echo_n "(cached) " >&6
bec39cab
AC
6490else
6491 if test -n "$AR"; then
6492 ac_cv_prog_AR="$AR" # Let the user override the test.
6493else
6494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6495for as_dir in $PATH
6496do
6497 IFS=$as_save_IFS
6498 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6499 for ac_exec_ext in '' $ac_executable_extensions; do
6500 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6501 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6503 break 2
6504 fi
6505done
81ecdfbb
RW
6506 done
6507IFS=$as_save_IFS
bec39cab
AC
6508
6509fi
6510fi
6511AR=$ac_cv_prog_AR
6512if test -n "$AR"; then
81ecdfbb
RW
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6514$as_echo "$AR" >&6; }
bec39cab 6515else
81ecdfbb
RW
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
bec39cab
AC
6518fi
6519
81ecdfbb 6520
bec39cab
AC
6521fi
6522if test -z "$ac_cv_prog_AR"; then
6523 ac_ct_AR=$AR
6524 # Extract the first word of "ar", so it can be a program name with args.
6525set dummy ar; ac_word=$2
81ecdfbb
RW
6526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6527$as_echo_n "checking for $ac_word... " >&6; }
6528if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6529 $as_echo_n "(cached) " >&6
bec39cab
AC
6530else
6531 if test -n "$ac_ct_AR"; then
6532 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6533else
6534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6535for as_dir in $PATH
6536do
6537 IFS=$as_save_IFS
6538 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6539 for ac_exec_ext in '' $ac_executable_extensions; do
6540 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6541 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6543 break 2
6544 fi
6545done
81ecdfbb
RW
6546 done
6547IFS=$as_save_IFS
bec39cab
AC
6548
6549fi
6550fi
6551ac_ct_AR=$ac_cv_prog_ac_ct_AR
6552if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6554$as_echo "$ac_ct_AR" >&6; }
bec39cab 6555else
81ecdfbb
RW
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
bec39cab
AC
6558fi
6559
81ecdfbb
RW
6560 if test "x$ac_ct_AR" = x; then
6561 AR=""
6562 else
6563 case $cross_compiling:$ac_tool_warned in
6564yes:)
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6566$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6567ac_tool_warned=yes ;;
6568esac
6569 AR=$ac_ct_AR
6570 fi
bec39cab
AC
6571else
6572 AR="$ac_cv_prog_AR"
6573fi
6574
6575if test -n "$ac_tool_prefix"; then
6576 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6577set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6579$as_echo_n "checking for $ac_word... " >&6; }
6580if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6581 $as_echo_n "(cached) " >&6
bec39cab
AC
6582else
6583 if test -n "$DLLTOOL"; then
6584 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6585else
6586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6587for as_dir in $PATH
6588do
6589 IFS=$as_save_IFS
6590 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6591 for ac_exec_ext in '' $ac_executable_extensions; do
6592 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6593 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6595 break 2
6596 fi
6597done
81ecdfbb
RW
6598 done
6599IFS=$as_save_IFS
bec39cab
AC
6600
6601fi
6602fi
6603DLLTOOL=$ac_cv_prog_DLLTOOL
6604if test -n "$DLLTOOL"; then
81ecdfbb
RW
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6606$as_echo "$DLLTOOL" >&6; }
bec39cab 6607else
81ecdfbb
RW
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609$as_echo "no" >&6; }
bec39cab
AC
6610fi
6611
81ecdfbb 6612
bec39cab
AC
6613fi
6614if test -z "$ac_cv_prog_DLLTOOL"; then
6615 ac_ct_DLLTOOL=$DLLTOOL
6616 # Extract the first word of "dlltool", so it can be a program name with args.
6617set dummy dlltool; ac_word=$2
81ecdfbb
RW
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619$as_echo_n "checking for $ac_word... " >&6; }
6620if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6621 $as_echo_n "(cached) " >&6
bec39cab
AC
6622else
6623 if test -n "$ac_ct_DLLTOOL"; then
6624 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6625else
6626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629 IFS=$as_save_IFS
6630 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6631 for ac_exec_ext in '' $ac_executable_extensions; do
6632 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6633 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6635 break 2
6636 fi
6637done
81ecdfbb
RW
6638 done
6639IFS=$as_save_IFS
bec39cab
AC
6640
6641fi
6642fi
6643ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6644if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6646$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6647else
81ecdfbb
RW
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
bec39cab
AC
6650fi
6651
81ecdfbb
RW
6652 if test "x$ac_ct_DLLTOOL" = x; then
6653 DLLTOOL=""
6654 else
6655 case $cross_compiling:$ac_tool_warned in
6656yes:)
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6659ac_tool_warned=yes ;;
6660esac
6661 DLLTOOL=$ac_ct_DLLTOOL
6662 fi
bec39cab
AC
6663else
6664 DLLTOOL="$ac_cv_prog_DLLTOOL"
6665fi
6666
6667if test -n "$ac_tool_prefix"; then
6668 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6669set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671$as_echo_n "checking for $ac_word... " >&6; }
6672if test "${ac_cv_prog_WINDRES+set}" = set; then :
6673 $as_echo_n "(cached) " >&6
bec39cab
AC
6674else
6675 if test -n "$WINDRES"; then
6676 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6677else
6678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in $PATH
6680do
6681 IFS=$as_save_IFS
6682 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6683 for ac_exec_ext in '' $ac_executable_extensions; do
6684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6685 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6687 break 2
6688 fi
6689done
81ecdfbb
RW
6690 done
6691IFS=$as_save_IFS
bec39cab
AC
6692
6693fi
6694fi
6695WINDRES=$ac_cv_prog_WINDRES
6696if test -n "$WINDRES"; then
81ecdfbb
RW
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6698$as_echo "$WINDRES" >&6; }
bec39cab 6699else
81ecdfbb
RW
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701$as_echo "no" >&6; }
bec39cab
AC
6702fi
6703
81ecdfbb 6704
bec39cab
AC
6705fi
6706if test -z "$ac_cv_prog_WINDRES"; then
6707 ac_ct_WINDRES=$WINDRES
6708 # Extract the first word of "windres", so it can be a program name with args.
6709set dummy windres; ac_word=$2
81ecdfbb
RW
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6713 $as_echo_n "(cached) " >&6
bec39cab
AC
6714else
6715 if test -n "$ac_ct_WINDRES"; then
6716 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6717else
6718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721 IFS=$as_save_IFS
6722 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6723 for ac_exec_ext in '' $ac_executable_extensions; do
6724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6725 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6727 break 2
6728 fi
6729done
81ecdfbb
RW
6730 done
6731IFS=$as_save_IFS
bec39cab
AC
6732
6733fi
6734fi
6735ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6736if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6738$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6739else
81ecdfbb
RW
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
c906108c 6742fi
bec39cab 6743
81ecdfbb
RW
6744 if test "x$ac_ct_WINDRES" = x; then
6745 WINDRES=""
6746 else
6747 case $cross_compiling:$ac_tool_warned in
6748yes:)
6749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6751ac_tool_warned=yes ;;
6752esac
6753 WINDRES=$ac_ct_WINDRES
6754 fi
c906108c 6755else
bec39cab 6756 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6757fi
6758
bec39cab 6759
036c3acb
TS
6760case $host_os in
6761 gnu*)
6762 # Needed for GNU Hurd hosts.
6763 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6764 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6765set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6767$as_echo_n "checking for $ac_word... " >&6; }
6768if test "${ac_cv_prog_MIG+set}" = set; then :
6769 $as_echo_n "(cached) " >&6
c906108c 6770else
bec39cab
AC
6771 if test -n "$MIG"; then
6772 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6773else
6774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6775for as_dir in $PATH
6776do
6777 IFS=$as_save_IFS
6778 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6779 for ac_exec_ext in '' $ac_executable_extensions; do
6780 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6781 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6783 break 2
6784 fi
6785done
81ecdfbb
RW
6786 done
6787IFS=$as_save_IFS
bec39cab 6788
c906108c 6789fi
bec39cab
AC
6790fi
6791MIG=$ac_cv_prog_MIG
6792if test -n "$MIG"; then
81ecdfbb
RW
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6794$as_echo "$MIG" >&6; }
c906108c 6795else
81ecdfbb
RW
6796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6797$as_echo "no" >&6; }
c906108c
SS
6798fi
6799
81ecdfbb 6800
bec39cab
AC
6801fi
6802if test -z "$ac_cv_prog_MIG"; then
6803 ac_ct_MIG=$MIG
6804 # Extract the first word of "mig", so it can be a program name with args.
6805set dummy mig; ac_word=$2
81ecdfbb
RW
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6807$as_echo_n "checking for $ac_word... " >&6; }
6808if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6809 $as_echo_n "(cached) " >&6
bec39cab
AC
6810else
6811 if test -n "$ac_ct_MIG"; then
6812 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6813else
6814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815for as_dir in $PATH
6816do
6817 IFS=$as_save_IFS
6818 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6819 for ac_exec_ext in '' $ac_executable_extensions; do
6820 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6821 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6823 break 2
6824 fi
6825done
81ecdfbb
RW
6826 done
6827IFS=$as_save_IFS
c906108c 6828
bec39cab
AC
6829fi
6830fi
6831ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6832if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6834$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6835else
81ecdfbb
RW
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
bec39cab 6838fi
c906108c 6839
81ecdfbb
RW
6840 if test "x$ac_ct_MIG" = x; then
6841 MIG=""
6842 else
6843 case $cross_compiling:$ac_tool_warned in
6844yes:)
6845{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6846$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6847ac_tool_warned=yes ;;
6848esac
6849 MIG=$ac_ct_MIG
6850 fi
bec39cab
AC
6851else
6852 MIG="$ac_cv_prog_MIG"
6853fi
c906108c 6854
036c3acb
TS
6855 if test x"$MIG" = x; then
6856 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6857 fi
6858 ;;
6859esac
c906108c 6860
bec39cab
AC
6861# ---------------------- #
6862# Checks for libraries. #
6863# ---------------------- #
c906108c 6864
bec39cab 6865# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6867$as_echo_n "checking for main in -lm... " >&6; }
6868if test "${ac_cv_lib_m_main+set}" = set; then :
6869 $as_echo_n "(cached) " >&6
bec39cab
AC
6870else
6871 ac_check_lib_save_LIBS=$LIBS
6872LIBS="-lm $LIBS"
81ecdfbb 6873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6874/* end confdefs.h. */
c906108c 6875
c906108c 6876
bec39cab
AC
6877int
6878main ()
6879{
81ecdfbb 6880return main ();
bec39cab
AC
6881 ;
6882 return 0;
6883}
6884_ACEOF
81ecdfbb 6885if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6886 ac_cv_lib_m_main=yes
6887else
81ecdfbb 6888 ac_cv_lib_m_main=no
bec39cab 6889fi
81ecdfbb
RW
6890rm -f core conftest.err conftest.$ac_objext \
6891 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6892LIBS=$ac_check_lib_save_LIBS
6893fi
81ecdfbb
RW
6894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6895$as_echo "$ac_cv_lib_m_main" >&6; }
6896if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6897 cat >>confdefs.h <<_ACEOF
6898#define HAVE_LIBM 1
6899_ACEOF
6900
6901 LIBS="-lm $LIBS"
c906108c 6902
c906108c 6903fi
bec39cab
AC
6904
6905
6906# We need to link with -lw to get `wctype' on Solaris before Solaris
6907# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6908# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6909# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6910ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6911if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6912
c906108c 6913else
81ecdfbb
RW
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6915$as_echo_n "checking for wctype in -lw... " >&6; }
6916if test "${ac_cv_lib_w_wctype+set}" = set; then :
6917 $as_echo_n "(cached) " >&6
bec39cab
AC
6918else
6919 ac_check_lib_save_LIBS=$LIBS
6920LIBS="-lw $LIBS"
81ecdfbb 6921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6922/* end confdefs.h. */
c906108c 6923
81ecdfbb
RW
6924/* Override any GCC internal prototype to avoid an error.
6925 Use char because int might match the return type of a GCC
6926 builtin and then its argument prototype would still apply. */
bec39cab
AC
6927#ifdef __cplusplus
6928extern "C"
6929#endif
bec39cab
AC
6930char wctype ();
6931int
6932main ()
6933{
81ecdfbb 6934return wctype ();
bec39cab
AC
6935 ;
6936 return 0;
6937}
6938_ACEOF
81ecdfbb 6939if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6940 ac_cv_lib_w_wctype=yes
6941else
81ecdfbb 6942 ac_cv_lib_w_wctype=no
bec39cab 6943fi
81ecdfbb
RW
6944rm -f core conftest.err conftest.$ac_objext \
6945 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6946LIBS=$ac_check_lib_save_LIBS
6947fi
81ecdfbb
RW
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6949$as_echo "$ac_cv_lib_w_wctype" >&6; }
6950if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6951 cat >>confdefs.h <<_ACEOF
6952#define HAVE_LIBW 1
6953_ACEOF
c906108c 6954
bec39cab 6955 LIBS="-lw $LIBS"
c906108c 6956
bec39cab 6957fi
c906108c 6958
bec39cab 6959fi
c906108c 6960
ddc9cd0f 6961
bec39cab 6962# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6964$as_echo_n "checking for library containing gethostbyname... " >&6; }
6965if test "${ac_cv_search_gethostbyname+set}" = set; then :
6966 $as_echo_n "(cached) " >&6
bec39cab
AC
6967else
6968 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6970/* end confdefs.h. */
ddc9cd0f 6971
81ecdfbb
RW
6972/* Override any GCC internal prototype to avoid an error.
6973 Use char because int might match the return type of a GCC
6974 builtin and then its argument prototype would still apply. */
bec39cab
AC
6975#ifdef __cplusplus
6976extern "C"
6977#endif
bec39cab
AC
6978char gethostbyname ();
6979int
6980main ()
6981{
81ecdfbb 6982return gethostbyname ();
bec39cab
AC
6983 ;
6984 return 0;
6985}
6986_ACEOF
81ecdfbb
RW
6987for ac_lib in '' nsl; do
6988 if test -z "$ac_lib"; then
6989 ac_res="none required"
6990 else
6991 ac_res=-l$ac_lib
b4e70030 6992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6993 fi
6994 if ac_fn_c_try_link "$LINENO"; then :
6995 ac_cv_search_gethostbyname=$ac_res
6996fi
6997rm -f core conftest.err conftest.$ac_objext \
6998 conftest$ac_exeext
6999 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7000 break
7001fi
7002done
7003if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7004
bec39cab 7005else
81ecdfbb 7006 ac_cv_search_gethostbyname=no
bec39cab 7007fi
81ecdfbb 7008rm conftest.$ac_ext
bec39cab
AC
7009LIBS=$ac_func_search_save_LIBS
7010fi
81ecdfbb
RW
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7012$as_echo "$ac_cv_search_gethostbyname" >&6; }
7013ac_res=$ac_cv_search_gethostbyname
7014if test "$ac_res" != no; then :
7015 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7016
bec39cab 7017fi
96baa820 7018
c906108c 7019
b4e70030 7020# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7022$as_echo_n "checking for library containing socketpair... " >&6; }
7023if test "${ac_cv_search_socketpair+set}" = set; then :
7024 $as_echo_n "(cached) " >&6
b4e70030
JB
7025else
7026 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7028/* end confdefs.h. */
7029
81ecdfbb
RW
7030/* Override any GCC internal prototype to avoid an error.
7031 Use char because int might match the return type of a GCC
7032 builtin and then its argument prototype would still apply. */
b4e70030
JB
7033#ifdef __cplusplus
7034extern "C"
7035#endif
b4e70030
JB
7036char socketpair ();
7037int
7038main ()
7039{
81ecdfbb 7040return socketpair ();
b4e70030
JB
7041 ;
7042 return 0;
7043}
7044_ACEOF
81ecdfbb
RW
7045for ac_lib in '' socket; do
7046 if test -z "$ac_lib"; then
7047 ac_res="none required"
7048 else
7049 ac_res=-l$ac_lib
b4e70030 7050 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7051 fi
7052 if ac_fn_c_try_link "$LINENO"; then :
7053 ac_cv_search_socketpair=$ac_res
7054fi
7055rm -f core conftest.err conftest.$ac_objext \
7056 conftest$ac_exeext
7057 if test "${ac_cv_search_socketpair+set}" = set; then :
7058 break
7059fi
7060done
7061if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7062
b4e70030 7063else
81ecdfbb 7064 ac_cv_search_socketpair=no
b4e70030 7065fi
81ecdfbb 7066rm conftest.$ac_ext
b4e70030
JB
7067LIBS=$ac_func_search_save_LIBS
7068fi
81ecdfbb
RW
7069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7070$as_echo "$ac_cv_search_socketpair" >&6; }
7071ac_res=$ac_cv_search_socketpair
7072if test "$ac_res" != no; then :
7073 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7074
7075fi
7076
7077
233a11ab 7078# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7079
711a72d3 7080 # Use the system's zlib library.
39f3de7c
L
7081 zlibdir="-L\$(top_builddir)/../zlib"
7082 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7083
711a72d3
L
7084# Check whether --with-system-zlib was given.
7085if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7086 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7087 zlibdir=
7088 zlibinc=
7089 fi
b040ad30 7090
233a11ab 7091fi
233a11ab 7092
233a11ab 7093
233a11ab 7094
b040ad30 7095
233a11ab 7096
25268153
JB
7097# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7099$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7100if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7101 $as_echo_n "(cached) " >&6
7102else
7103 ac_func_search_save_LIBS=$LIBS
7104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105/* end confdefs.h. */
7106
7107/* Override any GCC internal prototype to avoid an error.
7108 Use char because int might match the return type of a GCC
7109 builtin and then its argument prototype would still apply. */
7110#ifdef __cplusplus
7111extern "C"
7112#endif
7113char kinfo_getvmmap ();
7114int
7115main ()
7116{
7117return kinfo_getvmmap ();
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122for ac_lib in '' util; do
7123 if test -z "$ac_lib"; then
7124 ac_res="none required"
7125 else
7126 ac_res=-l$ac_lib
7127 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7128 fi
7129 if ac_fn_c_try_link "$LINENO"; then :
7130 ac_cv_search_kinfo_getvmmap=$ac_res
7131fi
7132rm -f core conftest.err conftest.$ac_objext \
7133 conftest$ac_exeext
7134 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7135 break
7136fi
7137done
7138if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7139
7140else
7141 ac_cv_search_kinfo_getvmmap=no
7142fi
7143rm conftest.$ac_ext
7144LIBS=$ac_func_search_save_LIBS
7145fi
7146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7147$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7148ac_res=$ac_cv_search_kinfo_getvmmap
7149if test "$ac_res" != no; then :
7150 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7151
7152$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7153
7154fi
7155
7156
77f120bf 7157
016a3251
DD
7158 if test "X$prefix" = "XNONE"; then
7159 acl_final_prefix="$ac_default_prefix"
7160 else
7161 acl_final_prefix="$prefix"
7162 fi
7163 if test "X$exec_prefix" = "XNONE"; then
7164 acl_final_exec_prefix='${prefix}'
7165 else
7166 acl_final_exec_prefix="$exec_prefix"
7167 fi
7168 acl_save_prefix="$prefix"
7169 prefix="$acl_final_prefix"
7170 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7171 prefix="$acl_save_prefix"
7172
7173
7174# Check whether --with-gnu-ld was given.
7175if test "${with_gnu_ld+set}" = set; then :
7176 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7177else
7178 with_gnu_ld=no
7179fi
7180
7181# Prepare PATH_SEPARATOR.
7182# The user is always right.
7183if test "${PATH_SEPARATOR+set}" != set; then
7184 echo "#! /bin/sh" >conf$$.sh
7185 echo "exit 0" >>conf$$.sh
7186 chmod +x conf$$.sh
7187 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7188 PATH_SEPARATOR=';'
7189 else
7190 PATH_SEPARATOR=:
7191 fi
7192 rm -f conf$$.sh
7193fi
7194ac_prog=ld
7195if test "$GCC" = yes; then
7196 # Check if gcc -print-prog-name=ld gives a path.
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7198$as_echo_n "checking for ld used by GCC... " >&6; }
7199 case $host in
7200 *-*-mingw*)
7201 # gcc leaves a trailing carriage return which upsets mingw
7202 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7203 *)
7204 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7205 esac
7206 case $ac_prog in
7207 # Accept absolute paths.
7208 [\\/]* | [A-Za-z]:[\\/]*)
7209 re_direlt='/[^/][^/]*/\.\./'
7210 # Canonicalize the path of ld
7211 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7212 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7213 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7214 done
7215 test -z "$LD" && LD="$ac_prog"
7216 ;;
7217 "")
7218 # If it fails, then pretend we aren't using GCC.
7219 ac_prog=ld
7220 ;;
7221 *)
7222 # If it is relative, then search for the first ld in PATH.
7223 with_gnu_ld=unknown
7224 ;;
7225 esac
7226elif test "$with_gnu_ld" = yes; then
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7228$as_echo_n "checking for GNU ld... " >&6; }
7229else
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7231$as_echo_n "checking for non-GNU ld... " >&6; }
7232fi
7233if test "${acl_cv_path_LD+set}" = set; then :
7234 $as_echo_n "(cached) " >&6
7235else
7236 if test -z "$LD"; then
7237 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7238 for ac_dir in $PATH; do
7239 test -z "$ac_dir" && ac_dir=.
7240 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7241 acl_cv_path_LD="$ac_dir/$ac_prog"
7242 # Check to see if the program is GNU ld. I'd rather use --version,
7243 # but apparently some GNU ld's only accept -v.
7244 # Break only if it was the GNU/non-GNU ld that we prefer.
7245 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7246 test "$with_gnu_ld" != no && break
7247 else
7248 test "$with_gnu_ld" != yes && break
7249 fi
7250 fi
7251 done
7252 IFS="$ac_save_ifs"
7253else
7254 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7255fi
7256fi
7257
7258LD="$acl_cv_path_LD"
7259if test -n "$LD"; then
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7261$as_echo "$LD" >&6; }
7262else
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264$as_echo "no" >&6; }
7265fi
7266test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7268$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7269if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7270 $as_echo_n "(cached) " >&6
7271else
7272 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7273if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7274 acl_cv_prog_gnu_ld=yes
7275else
7276 acl_cv_prog_gnu_ld=no
7277fi
7278fi
7279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7280$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7281with_gnu_ld=$acl_cv_prog_gnu_ld
7282
7283
7284
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7286$as_echo_n "checking for shared library run path origin... " >&6; }
7287if test "${acl_cv_rpath+set}" = set; then :
7288 $as_echo_n "(cached) " >&6
7289else
7290
7291 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7292 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7293 . ./conftest.sh
7294 rm -f ./conftest.sh
7295 acl_cv_rpath=done
7296
7297fi
7298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7299$as_echo "$acl_cv_rpath" >&6; }
7300 wl="$acl_cv_wl"
7301 libext="$acl_cv_libext"
7302 shlibext="$acl_cv_shlibext"
7303 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7304 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7305 hardcode_direct="$acl_cv_hardcode_direct"
7306 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7307 # Check whether --enable-rpath was given.
7308if test "${enable_rpath+set}" = set; then :
7309 enableval=$enable_rpath; :
7310else
7311 enable_rpath=yes
7312fi
7313
7314
7315
7316
7317
7318
7319
7320
7321 use_additional=yes
7322
7323 acl_save_prefix="$prefix"
7324 prefix="$acl_final_prefix"
7325 acl_save_exec_prefix="$exec_prefix"
7326 exec_prefix="$acl_final_exec_prefix"
7327
7328 eval additional_includedir=\"$includedir\"
7329 eval additional_libdir=\"$libdir\"
7330
7331 exec_prefix="$acl_save_exec_prefix"
7332 prefix="$acl_save_prefix"
77f120bf 7333
6c7a06a3 7334
81ecdfbb
RW
7335# Check whether --with-libiconv-prefix was given.
7336if test "${with_libiconv_prefix+set}" = set; then :
7337 withval=$with_libiconv_prefix;
016a3251
DD
7338 if test "X$withval" = "Xno"; then
7339 use_additional=no
7340 else
7341 if test "X$withval" = "X"; then
7342
7343 acl_save_prefix="$prefix"
7344 prefix="$acl_final_prefix"
7345 acl_save_exec_prefix="$exec_prefix"
7346 exec_prefix="$acl_final_exec_prefix"
7347
7348 eval additional_includedir=\"$includedir\"
7349 eval additional_libdir=\"$libdir\"
7350
7351 exec_prefix="$acl_save_exec_prefix"
7352 prefix="$acl_save_prefix"
7353
7354 else
7355 additional_includedir="$withval/include"
7356 additional_libdir="$withval/lib"
7357 fi
7358 fi
6c7a06a3 7359
81ecdfbb
RW
7360fi
7361
016a3251
DD
7362 LIBICONV=
7363 LTLIBICONV=
7364 INCICONV=
7365 rpathdirs=
7366 ltrpathdirs=
7367 names_already_handled=
7368 names_next_round='iconv '
7369 while test -n "$names_next_round"; do
7370 names_this_round="$names_next_round"
7371 names_next_round=
7372 for name in $names_this_round; do
7373 already_handled=
7374 for n in $names_already_handled; do
7375 if test "$n" = "$name"; then
7376 already_handled=yes
7377 break
7378 fi
7379 done
7380 if test -z "$already_handled"; then
7381 names_already_handled="$names_already_handled $name"
7382 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7383 eval value=\"\$HAVE_LIB$uppername\"
7384 if test -n "$value"; then
7385 if test "$value" = yes; then
7386 eval value=\"\$LIB$uppername\"
7387 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7388 eval value=\"\$LTLIB$uppername\"
7389 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7390 else
7391 :
7392 fi
7393 else
7394 found_dir=
7395 found_la=
7396 found_so=
7397 found_a=
7398 if test $use_additional = yes; then
7399 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7400 found_dir="$additional_libdir"
7401 found_so="$additional_libdir/lib$name.$shlibext"
7402 if test -f "$additional_libdir/lib$name.la"; then
7403 found_la="$additional_libdir/lib$name.la"
7404 fi
7405 else
7406 if test -f "$additional_libdir/lib$name.$libext"; then
7407 found_dir="$additional_libdir"
7408 found_a="$additional_libdir/lib$name.$libext"
7409 if test -f "$additional_libdir/lib$name.la"; then
7410 found_la="$additional_libdir/lib$name.la"
7411 fi
7412 fi
7413 fi
7414 fi
7415 if test "X$found_dir" = "X"; then
7416 for x in $LDFLAGS $LTLIBICONV; do
7417
7418 acl_save_prefix="$prefix"
7419 prefix="$acl_final_prefix"
7420 acl_save_exec_prefix="$exec_prefix"
7421 exec_prefix="$acl_final_exec_prefix"
7422 eval x=\"$x\"
7423 exec_prefix="$acl_save_exec_prefix"
7424 prefix="$acl_save_prefix"
7425
7426 case "$x" in
7427 -L*)
7428 dir=`echo "X$x" | sed -e 's/^X-L//'`
7429 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7430 found_dir="$dir"
7431 found_so="$dir/lib$name.$shlibext"
7432 if test -f "$dir/lib$name.la"; then
7433 found_la="$dir/lib$name.la"
7434 fi
7435 else
7436 if test -f "$dir/lib$name.$libext"; then
7437 found_dir="$dir"
7438 found_a="$dir/lib$name.$libext"
7439 if test -f "$dir/lib$name.la"; then
7440 found_la="$dir/lib$name.la"
7441 fi
7442 fi
7443 fi
7444 ;;
7445 esac
7446 if test "X$found_dir" != "X"; then
7447 break
7448 fi
7449 done
7450 fi
7451 if test "X$found_dir" != "X"; then
7452 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7453 if test "X$found_so" != "X"; then
7454 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7455 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7456 else
7457 haveit=
7458 for x in $ltrpathdirs; do
7459 if test "X$x" = "X$found_dir"; then
7460 haveit=yes
7461 break
7462 fi
7463 done
7464 if test -z "$haveit"; then
7465 ltrpathdirs="$ltrpathdirs $found_dir"
7466 fi
7467 if test "$hardcode_direct" = yes; then
7468 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7469 else
7470 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7471 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7472 haveit=
7473 for x in $rpathdirs; do
7474 if test "X$x" = "X$found_dir"; then
7475 haveit=yes
7476 break
7477 fi
7478 done
7479 if test -z "$haveit"; then
7480 rpathdirs="$rpathdirs $found_dir"
7481 fi
7482 else
7483 haveit=
7484 for x in $LDFLAGS $LIBICONV; do
7485
7486 acl_save_prefix="$prefix"
7487 prefix="$acl_final_prefix"
7488 acl_save_exec_prefix="$exec_prefix"
7489 exec_prefix="$acl_final_exec_prefix"
7490 eval x=\"$x\"
7491 exec_prefix="$acl_save_exec_prefix"
7492 prefix="$acl_save_prefix"
7493
7494 if test "X$x" = "X-L$found_dir"; then
7495 haveit=yes
7496 break
7497 fi
7498 done
7499 if test -z "$haveit"; then
7500 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7501 fi
7502 if test "$hardcode_minus_L" != no; then
7503 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7504 else
7505 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7506 fi
7507 fi
7508 fi
7509 fi
7510 else
7511 if test "X$found_a" != "X"; then
7512 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7513 else
7514 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7515 fi
7516 fi
7517 additional_includedir=
7518 case "$found_dir" in
7519 */lib | */lib/)
7520 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7521 additional_includedir="$basedir/include"
7522 ;;
7523 esac
7524 if test "X$additional_includedir" != "X"; then
7525 if test "X$additional_includedir" != "X/usr/include"; then
7526 haveit=
7527 if test "X$additional_includedir" = "X/usr/local/include"; then
7528 if test -n "$GCC"; then
7529 case $host_os in
7530 linux*) haveit=yes;;
7531 esac
7532 fi
7533 fi
7534 if test -z "$haveit"; then
7535 for x in $CPPFLAGS $INCICONV; do
7536
7537 acl_save_prefix="$prefix"
7538 prefix="$acl_final_prefix"
7539 acl_save_exec_prefix="$exec_prefix"
7540 exec_prefix="$acl_final_exec_prefix"
7541 eval x=\"$x\"
7542 exec_prefix="$acl_save_exec_prefix"
7543 prefix="$acl_save_prefix"
7544
7545 if test "X$x" = "X-I$additional_includedir"; then
7546 haveit=yes
7547 break
7548 fi
7549 done
7550 if test -z "$haveit"; then
7551 if test -d "$additional_includedir"; then
7552 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7553 fi
7554 fi
7555 fi
7556 fi
7557 fi
7558 if test -n "$found_la"; then
7559 save_libdir="$libdir"
7560 case "$found_la" in
7561 */* | *\\*) . "$found_la" ;;
7562 *) . "./$found_la" ;;
7563 esac
7564 libdir="$save_libdir"
7565 for dep in $dependency_libs; do
7566 case "$dep" in
7567 -L*)
7568 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7569 if test "X$additional_libdir" != "X/usr/lib"; then
7570 haveit=
7571 if test "X$additional_libdir" = "X/usr/local/lib"; then
7572 if test -n "$GCC"; then
7573 case $host_os in
7574 linux*) haveit=yes;;
7575 esac
7576 fi
7577 fi
7578 if test -z "$haveit"; then
7579 haveit=
7580 for x in $LDFLAGS $LIBICONV; do
7581
7582 acl_save_prefix="$prefix"
7583 prefix="$acl_final_prefix"
7584 acl_save_exec_prefix="$exec_prefix"
7585 exec_prefix="$acl_final_exec_prefix"
7586 eval x=\"$x\"
7587 exec_prefix="$acl_save_exec_prefix"
7588 prefix="$acl_save_prefix"
7589
7590 if test "X$x" = "X-L$additional_libdir"; then
7591 haveit=yes
7592 break
7593 fi
7594 done
7595 if test -z "$haveit"; then
7596 if test -d "$additional_libdir"; then
7597 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7598 fi
7599 fi
7600 haveit=
7601 for x in $LDFLAGS $LTLIBICONV; do
7602
7603 acl_save_prefix="$prefix"
7604 prefix="$acl_final_prefix"
7605 acl_save_exec_prefix="$exec_prefix"
7606 exec_prefix="$acl_final_exec_prefix"
7607 eval x=\"$x\"
7608 exec_prefix="$acl_save_exec_prefix"
7609 prefix="$acl_save_prefix"
7610
7611 if test "X$x" = "X-L$additional_libdir"; then
7612 haveit=yes
7613 break
7614 fi
7615 done
7616 if test -z "$haveit"; then
7617 if test -d "$additional_libdir"; then
7618 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7619 fi
7620 fi
7621 fi
7622 fi
7623 ;;
7624 -R*)
7625 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7626 if test "$enable_rpath" != no; then
7627 haveit=
7628 for x in $rpathdirs; do
7629 if test "X$x" = "X$dir"; then
7630 haveit=yes
7631 break
7632 fi
7633 done
7634 if test -z "$haveit"; then
7635 rpathdirs="$rpathdirs $dir"
7636 fi
7637 haveit=
7638 for x in $ltrpathdirs; do
7639 if test "X$x" = "X$dir"; then
7640 haveit=yes
7641 break
7642 fi
7643 done
7644 if test -z "$haveit"; then
7645 ltrpathdirs="$ltrpathdirs $dir"
7646 fi
7647 fi
7648 ;;
7649 -l*)
7650 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7651 ;;
7652 *.la)
7653 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7654 ;;
7655 *)
7656 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7657 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7658 ;;
7659 esac
7660 done
7661 fi
7662 else
7663 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7664 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7665 fi
7666 fi
7667 fi
7668 done
7669 done
7670 if test "X$rpathdirs" != "X"; then
7671 if test -n "$hardcode_libdir_separator"; then
7672 alldirs=
7673 for found_dir in $rpathdirs; do
7674 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7675 done
7676 acl_save_libdir="$libdir"
7677 libdir="$alldirs"
7678 eval flag=\"$hardcode_libdir_flag_spec\"
7679 libdir="$acl_save_libdir"
7680 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7681 else
7682 for found_dir in $rpathdirs; do
7683 acl_save_libdir="$libdir"
7684 libdir="$found_dir"
7685 eval flag=\"$hardcode_libdir_flag_spec\"
7686 libdir="$acl_save_libdir"
7687 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7688 done
7689 fi
7690 fi
7691 if test "X$ltrpathdirs" != "X"; then
7692 for found_dir in $ltrpathdirs; do
7693 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7694 done
7695 fi
7696
7697
7698
7699
7700
6c7a06a3 7701
6c7a06a3 7702
81ecdfbb
RW
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7704$as_echo_n "checking for iconv... " >&6; }
7705if test "${am_cv_func_iconv+set}" = set; then :
7706 $as_echo_n "(cached) " >&6
d542061a 7707else
6c7a06a3
TT
7708
7709 am_cv_func_iconv="no, consider installing GNU libiconv"
7710 am_cv_lib_iconv=no
016a3251
DD
7711 am_save_CPPFLAGS="$CPPFLAGS"
7712 CPPFLAGS="$CPPFLAGS $INCICONV"
7713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7714/* end confdefs.h. */
6c7a06a3
TT
7715#include <stdlib.h>
7716#include <iconv.h>
d542061a
UW
7717int
7718main ()
7719{
6c7a06a3 7720iconv_t cd = iconv_open("","");
016a3251
DD
7721 iconv(cd,NULL,NULL,NULL,NULL);
7722 iconv_close(cd);
d542061a
UW
7723 ;
7724 return 0;
7725}
7726_ACEOF
81ecdfbb 7727if ac_fn_c_try_link "$LINENO"; then :
016a3251 7728 am_cv_func_iconv=yes
d542061a 7729fi
81ecdfbb
RW
7730rm -f core conftest.err conftest.$ac_objext \
7731 conftest$ac_exeext conftest.$ac_ext
016a3251 7732 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7733
016a3251
DD
7734 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7735 for _libs in .libs _libs; do
7736 am_save_CPPFLAGS="$CPPFLAGS"
7737 am_save_LIBS="$LIBS"
7738 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7739 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7741/* end confdefs.h. */
6c7a06a3
TT
7742#include <stdlib.h>
7743#include <iconv.h>
d542061a
UW
7744int
7745main ()
7746{
6c7a06a3 7747iconv_t cd = iconv_open("","");
016a3251
DD
7748 iconv(cd,NULL,NULL,NULL,NULL);
7749 iconv_close(cd);
d542061a
UW
7750 ;
7751 return 0;
7752}
7753_ACEOF
81ecdfbb 7754if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7755 INCICONV="-I../libiconv/include"
7756 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7757 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7758 am_cv_lib_iconv=yes
7759 am_cv_func_iconv=yes
d542061a 7760fi
81ecdfbb
RW
7761rm -f core conftest.err conftest.$ac_objext \
7762 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7763 CPPFLAGS="$am_save_CPPFLAGS"
7764 LIBS="$am_save_LIBS"
7765 if test "$am_cv_func_iconv" = "yes"; then
7766 break
7767 fi
7768 done
77f120bf 7769 fi
94ae1714 7770
4edb1e84 7771 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7772 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7773 am_save_LIBS="$LIBS"
016a3251
DD
7774 CPPFLAGS="$LIBS $INCICONV"
7775 LIBS="$LIBS $LIBICONV"
81ecdfbb 7776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7777/* end confdefs.h. */
6c7a06a3
TT
7778#include <stdlib.h>
7779#include <iconv.h>
bec39cab
AC
7780int
7781main ()
7782{
6c7a06a3
TT
7783iconv_t cd = iconv_open("","");
7784 iconv(cd,NULL,NULL,NULL,NULL);
7785 iconv_close(cd);
bec39cab
AC
7786 ;
7787 return 0;
7788}
7789_ACEOF
81ecdfbb 7790if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7791 am_cv_lib_iconv=yes
6c7a06a3 7792 am_cv_func_iconv=yes
627af7ea 7793fi
81ecdfbb
RW
7794rm -f core conftest.err conftest.$ac_objext \
7795 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7796 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7797 LIBS="$am_save_LIBS"
6c7a06a3
TT
7798 fi
7799
7800fi
81ecdfbb
RW
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7802$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7803 if test "$am_cv_func_iconv" = yes; then
7804
7805$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7806
016a3251 7807 fi
fc3b640d 7808 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7809
7810 for element in $INCICONV; do
7811 haveit=
7812 for x in $CPPFLAGS; do
7813
7814 acl_save_prefix="$prefix"
7815 prefix="$acl_final_prefix"
7816 acl_save_exec_prefix="$exec_prefix"
7817 exec_prefix="$acl_final_exec_prefix"
7818 eval x=\"$x\"
7819 exec_prefix="$acl_save_exec_prefix"
7820 prefix="$acl_save_prefix"
7821
7822 if test "X$x" = "X$element"; then
7823 haveit=yes
7824 break
7825 fi
7826 done
7827 if test -z "$haveit"; then
7828 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7829 fi
7830 done
7831
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7833$as_echo_n "checking how to link with libiconv... " >&6; }
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7835$as_echo "$LIBICONV" >&6; }
94ae1714 7836 else
016a3251
DD
7837 LIBICONV=
7838 LTLIBICONV=
fc3b640d 7839 fi
94ae1714 7840
6c7a06a3 7841
6c7a06a3 7842
016a3251 7843 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7845$as_echo_n "checking for iconv declaration... " >&6; }
7846 if test "${am_cv_proto_iconv+set}" = set; then :
7847 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7848else
7849
81ecdfbb 7850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7851/* end confdefs.h. */
7852
6c7a06a3
TT
7853#include <stdlib.h>
7854#include <iconv.h>
7855extern
b4e70030 7856#ifdef __cplusplus
6c7a06a3 7857"C"
b4e70030 7858#endif
6c7a06a3
TT
7859#if defined(__STDC__) || defined(__cplusplus)
7860size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7861#else
7862size_t iconv();
7863#endif
7864
b4e70030
JB
7865int
7866main ()
7867{
6c7a06a3 7868
b4e70030
JB
7869 ;
7870 return 0;
7871}
7872_ACEOF
81ecdfbb 7873if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7874 am_cv_proto_iconv_arg1=""
4e8d927d 7875else
81ecdfbb 7876 am_cv_proto_iconv_arg1="const"
b4e70030 7877fi
81ecdfbb 7878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7879 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);"
7880fi
7881
7882 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7884 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7885$as_echo "${ac_t:-
7886 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7887
7888cat >>confdefs.h <<_ACEOF
7889#define ICONV_CONST $am_cv_proto_iconv_arg1
7890_ACEOF
7891
7892 fi
6c7a06a3
TT
7893
7894
478aac75
DE
7895# GDB may fork/exec the iconv program to get the list of supported character
7896# sets. Allow the user to specify where to find it.
7897# There are several factors affecting the choice of option name:
7898# - There is already --with-libiconv-prefix but we can't use it, it specifies
7899# the build-time location of libiconv files.
7900# - The program we need to find is iconv, which comes with glibc. The user
7901# doesn't necessarily have libiconv installed. Therefore naming this
7902# --with-libiconv-foo feels wrong.
7903# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7904# defined to work on directories not files (though it really doesn't know
7905# the difference).
7906# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7907# with --with-libiconv-prefix.
7908# Putting these together is why the option name is --with-iconv-bin.
7909
7910
7911# Check whether --with-iconv-bin was given.
7912if test "${with_iconv_bin+set}" = set; then :
7913 withval=$with_iconv_bin; iconv_bin="${withval}"
7914
7915cat >>confdefs.h <<_ACEOF
7916#define ICONV_BIN "${iconv_bin}"
7917_ACEOF
7918
7919
7920 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7921 if test "x$prefix" = xNONE; then
7922 test_prefix=/usr/local
7923 else
7924 test_prefix=$prefix
7925 fi
7926 else
7927 test_prefix=$exec_prefix
7928 fi
7929 value=0
7930 case ${iconv_bin} in
7931 "${test_prefix}"|"${test_prefix}/"*|\
7932 '${exec_prefix}'|'${exec_prefix}/'*)
7933 value=1
7934 ;;
7935 esac
7936
7937cat >>confdefs.h <<_ACEOF
7938#define ICONV_BIN_RELOCATABLE $value
7939_ACEOF
7940
7941
7942
7943fi
7944
7945
cb01cfba 7946# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7947if test x"$enable_tui" != xno; then
cb01cfba
JB
7948 prefer_curses=yes
7949fi
7950
7951curses_found=no
7952if test x"$prefer_curses" = xyes; then
7953 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7954 # curses library because the latter might not provide all the
7955 # functionality we need. However, this leads to problems on systems
7956 # where the linker searches /usr/local/lib, but the compiler doesn't
7957 # search /usr/local/include, if ncurses is installed in /usr/local. A
7958 # default installation of ncurses on alpha*-dec-osf* will lead to such
7959 # a situation.
81ecdfbb
RW
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7961$as_echo_n "checking for library containing waddstr... " >&6; }
7962if test "${ac_cv_search_waddstr+set}" = set; then :
7963 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7964else
7965 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7967/* end confdefs.h. */
7968
81ecdfbb
RW
7969/* Override any GCC internal prototype to avoid an error.
7970 Use char because int might match the return type of a GCC
7971 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7972#ifdef __cplusplus
7973extern "C"
7974#endif
6c7a06a3
TT
7975char waddstr ();
7976int
7977main ()
7978{
81ecdfbb 7979return waddstr ();
6c7a06a3
TT
7980 ;
7981 return 0;
7982}
7983_ACEOF
81ecdfbb
RW
7984for ac_lib in '' ncurses cursesX curses; do
7985 if test -z "$ac_lib"; then
7986 ac_res="none required"
7987 else
7988 ac_res=-l$ac_lib
7989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7990 fi
7991 if ac_fn_c_try_link "$LINENO"; then :
7992 ac_cv_search_waddstr=$ac_res
7993fi
7994rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext
7996 if test "${ac_cv_search_waddstr+set}" = set; then :
7997 break
7998fi
7999done
8000if test "${ac_cv_search_waddstr+set}" = set; then :
8001
6c7a06a3 8002else
81ecdfbb
RW
8003 ac_cv_search_waddstr=no
8004fi
8005rm conftest.$ac_ext
8006LIBS=$ac_func_search_save_LIBS
8007fi
8008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8009$as_echo "$ac_cv_search_waddstr" >&6; }
8010ac_res=$ac_cv_search_waddstr
8011if test "$ac_res" != no; then :
8012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8013
8014fi
8015
8016
cb01cfba
JB
8017 if test "$ac_cv_search_waddstr" != no; then
8018 curses_found=yes
8019 fi
8020fi
8021
8022# Check whether we should enable the TUI, but only do so if we really
8023# can.
8024if test x"$enable_tui" != xno; then
8025 if test -d $srcdir/tui; then
8026 if test "$curses_found" != no; then
6c7a06a3
TT
8027 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8028 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8029 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8031 else
8032 if test x"$enable_tui" = xyes; then
81ecdfbb 8033 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8034 else
81ecdfbb
RW
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8036$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8037 fi
8038 fi
8039 fi
8040fi
8041
8042# Since GDB uses Readline, we need termcap functionality. In many
8043# cases this will be provided by the curses library, but some systems
8044# have a seperate termcap library, or no curses library at all.
8045
8046case $host_os in
8047 cygwin*)
8048 if test -d $srcdir/libtermcap; then
8049 LIBS="../libtermcap/libtermcap.a $LIBS"
8050 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8051 fi ;;
8052 go32* | *djgpp*)
8053 ac_cv_search_tgetent="none required"
8054 ;;
6c7a06a3
TT
8055esac
8056
8057# These are the libraries checked by Readline.
81ecdfbb
RW
8058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8059$as_echo_n "checking for library containing tgetent... " >&6; }
8060if test "${ac_cv_search_tgetent+set}" = set; then :
8061 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8062else
8063 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8065/* end confdefs.h. */
8066
81ecdfbb
RW
8067/* Override any GCC internal prototype to avoid an error.
8068 Use char because int might match the return type of a GCC
8069 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8070#ifdef __cplusplus
8071extern "C"
8072#endif
6c7a06a3
TT
8073char tgetent ();
8074int
8075main ()
8076{
81ecdfbb 8077return tgetent ();
6c7a06a3
TT
8078 ;
8079 return 0;
8080}
8081_ACEOF
81ecdfbb
RW
8082for ac_lib in '' termcap tinfo curses ncurses; do
8083 if test -z "$ac_lib"; then
8084 ac_res="none required"
8085 else
8086 ac_res=-l$ac_lib
6c7a06a3 8087 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8088 fi
8089 if ac_fn_c_try_link "$LINENO"; then :
8090 ac_cv_search_tgetent=$ac_res
8091fi
8092rm -f core conftest.err conftest.$ac_objext \
8093 conftest$ac_exeext
8094 if test "${ac_cv_search_tgetent+set}" = set; then :
8095 break
8096fi
8097done
8098if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8099
6c7a06a3 8100else
81ecdfbb 8101 ac_cv_search_tgetent=no
6c7a06a3 8102fi
81ecdfbb 8103rm conftest.$ac_ext
6c7a06a3
TT
8104LIBS=$ac_func_search_save_LIBS
8105fi
81ecdfbb
RW
8106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8107$as_echo "$ac_cv_search_tgetent" >&6; }
8108ac_res=$ac_cv_search_tgetent
8109if test "$ac_res" != no; then :
8110 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8111
06825bd1
MK
8112fi
8113
06825bd1 8114
bec39cab 8115if test "$ac_cv_search_tgetent" = no; then
7a85168d 8116 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8117fi
8118
3841debe 8119
81ecdfbb
RW
8120# Check whether --with-system-readline was given.
8121if test "${with_system_readline+set}" = set; then :
8122 withval=$with_system_readline;
8123fi
6a30b0a5 8124
6a30b0a5
AS
8125
8126if test "$with_system_readline" = yes; then
8127 READLINE=-lreadline
8128 READLINE_DEPS=
8129 READLINE_CFLAGS=
39037522 8130 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8131else
8132 READLINE='$(READLINE_DIR)/libreadline.a'
8133 READLINE_DEPS='$(READLINE)'
8134 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8135 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8136fi
8137
8138
8139
8140
8141
f997c383
SD
8142# Generate jit-reader.h
8143
8144# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8145TARGET_PTR=
8146
8147# The cast to long int works around a bug in the HP C Compiler
8148# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8149# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8150# This bug is HP SR number 8606223364.
8151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8152$as_echo_n "checking size of unsigned long long... " >&6; }
8153if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8154 $as_echo_n "(cached) " >&6
8155else
8156 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8157
8158else
8159 if test "$ac_cv_type_unsigned_long_long" = yes; then
8160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8162{ as_fn_set_status 77
8163as_fn_error "cannot compute sizeof (unsigned long long)
8164See \`config.log' for more details." "$LINENO" 5; }; }
8165 else
8166 ac_cv_sizeof_unsigned_long_long=0
8167 fi
8168fi
8169
8170fi
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8172$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8173
8174
8175
8176cat >>confdefs.h <<_ACEOF
8177#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8178_ACEOF
8179
8180
8181# The cast to long int works around a bug in the HP C Compiler
8182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8184# This bug is HP SR number 8606223364.
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8186$as_echo_n "checking size of unsigned long... " >&6; }
8187if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8188 $as_echo_n "(cached) " >&6
8189else
8190 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8191
8192else
8193 if test "$ac_cv_type_unsigned_long" = yes; then
8194 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8195$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8196{ as_fn_set_status 77
8197as_fn_error "cannot compute sizeof (unsigned long)
8198See \`config.log' for more details." "$LINENO" 5; }; }
8199 else
8200 ac_cv_sizeof_unsigned_long=0
8201 fi
8202fi
8203
8204fi
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8206$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8207
8208
8209
8210cat >>confdefs.h <<_ACEOF
8211#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8212_ACEOF
8213
8214
8215# The cast to long int works around a bug in the HP C Compiler
8216# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8217# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8218# This bug is HP SR number 8606223364.
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8220$as_echo_n "checking size of unsigned __int128... " >&6; }
8221if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8222 $as_echo_n "(cached) " >&6
8223else
8224 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8225
8226else
8227 if test "$ac_cv_type_unsigned___int128" = yes; then
8228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8230{ as_fn_set_status 77
8231as_fn_error "cannot compute sizeof (unsigned __int128)
8232See \`config.log' for more details." "$LINENO" 5; }; }
8233 else
8234 ac_cv_sizeof_unsigned___int128=0
8235 fi
8236fi
8237
8238fi
8239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8240$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8241
8242
8243
8244cat >>confdefs.h <<_ACEOF
8245#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8246_ACEOF
8247
8248
8249
8250if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8251 TARGET_PTR="unsigned long"
8252elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8253 TARGET_PTR="unsigned long long"
8254elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8255 TARGET_PTR="unsigned __int128"
8256else
8257 TARGET_PTR="unsigned long"
8258fi
8259
8260
8261ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8262
8263
a2d08b9e
SD
8264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8265$as_echo_n "checking for library containing dlopen... " >&6; }
8266if test "${ac_cv_search_dlopen+set}" = set; then :
8267 $as_echo_n "(cached) " >&6
8268else
8269 ac_func_search_save_LIBS=$LIBS
8270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8271/* end confdefs.h. */
8272
8273/* Override any GCC internal prototype to avoid an error.
8274 Use char because int might match the return type of a GCC
8275 builtin and then its argument prototype would still apply. */
8276#ifdef __cplusplus
8277extern "C"
8278#endif
8279char dlopen ();
8280int
8281main ()
8282{
8283return dlopen ();
8284 ;
8285 return 0;
8286}
8287_ACEOF
8288for ac_lib in '' dl; do
8289 if test -z "$ac_lib"; then
8290 ac_res="none required"
8291 else
8292 ac_res=-l$ac_lib
8293 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8294 fi
8295 if ac_fn_c_try_link "$LINENO"; then :
8296 ac_cv_search_dlopen=$ac_res
8297fi
8298rm -f core conftest.err conftest.$ac_objext \
8299 conftest$ac_exeext
8300 if test "${ac_cv_search_dlopen+set}" = set; then :
8301 break
8302fi
8303done
8304if test "${ac_cv_search_dlopen+set}" = set; then :
8305
8306else
8307 ac_cv_search_dlopen=no
8308fi
8309rm conftest.$ac_ext
8310LIBS=$ac_func_search_save_LIBS
8311fi
8312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8313$as_echo "$ac_cv_search_dlopen" >&6; }
8314ac_res=$ac_cv_search_dlopen
8315if test "$ac_res" != no; then :
8316 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8317
8318fi
8319
8320
39037522 8321
b8e0a31c
SD
8322
8323# Check whether --with-jit-reader-dir was given.
8324if test "${with_jit_reader_dir+set}" = set; then :
8325 withval=$with_jit_reader_dir;
8326 JIT_READER_DIR=$withval
8327else
8328 JIT_READER_DIR=${libdir}/gdb
8329fi
8330
8331
8332 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8333 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8334 ac_define_dir=`eval echo $JIT_READER_DIR`
8335 ac_define_dir=`eval echo $ac_define_dir`
8336
8337cat >>confdefs.h <<_ACEOF
8338#define JIT_READER_DIR "$ac_define_dir"
8339_ACEOF
8340
8341
8342
8343
8344 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8345 if test "x$prefix" = xNONE; then
8346 test_prefix=/usr/local
8347 else
8348 test_prefix=$prefix
8349 fi
8350 else
8351 test_prefix=$exec_prefix
8352 fi
8353 value=0
8354 case ${ac_define_dir} in
8355 "${test_prefix}"|"${test_prefix}/"*|\
8356 '${exec_prefix}'|'${exec_prefix}/'*)
8357 value=1
8358 ;;
8359 esac
8360
8361cat >>confdefs.h <<_ACEOF
8362#define JIT_READER_DIR_RELOCATABLE $value
8363_ACEOF
8364
8365
8366
8367
8368
81ecdfbb
RW
8369# Check whether --with-expat was given.
8370if test "${with_expat+set}" = set; then :
8371 withval=$with_expat;
5c39566f
DJ
8372else
8373 with_expat=auto
81ecdfbb
RW
8374fi
8375
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8377$as_echo_n "checking whether to use expat... " >&6; }
8378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8379$as_echo "$with_expat" >&6; }
5c39566f
DJ
8380
8381if test "${with_expat}" = no; then
81ecdfbb
RW
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8383$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8384 HAVE_LIBEXPAT=no
8385else
8386
3841debe
DJ
8387
8388
8389
8390
8391
8392
8393
8394 use_additional=yes
8395
8396 acl_save_prefix="$prefix"
8397 prefix="$acl_final_prefix"
8398 acl_save_exec_prefix="$exec_prefix"
8399 exec_prefix="$acl_final_exec_prefix"
8400
8401 eval additional_includedir=\"$includedir\"
8402 eval additional_libdir=\"$libdir\"
8403
8404 exec_prefix="$acl_save_exec_prefix"
8405 prefix="$acl_save_prefix"
8406
8407
81ecdfbb
RW
8408# Check whether --with-libexpat-prefix was given.
8409if test "${with_libexpat_prefix+set}" = set; then :
8410 withval=$with_libexpat_prefix;
3841debe
DJ
8411 if test "X$withval" = "Xno"; then
8412 use_additional=no
8413 else
8414 if test "X$withval" = "X"; then
8415
8416 acl_save_prefix="$prefix"
8417 prefix="$acl_final_prefix"
8418 acl_save_exec_prefix="$exec_prefix"
8419 exec_prefix="$acl_final_exec_prefix"
8420
8421 eval additional_includedir=\"$includedir\"
8422 eval additional_libdir=\"$libdir\"
8423
8424 exec_prefix="$acl_save_exec_prefix"
8425 prefix="$acl_save_prefix"
8426
8427 else
8428 additional_includedir="$withval/include"
8429 additional_libdir="$withval/lib"
8430 fi
8431 fi
8432
81ecdfbb
RW
8433fi
8434
3841debe
DJ
8435 LIBEXPAT=
8436 LTLIBEXPAT=
8437 INCEXPAT=
8438 rpathdirs=
8439 ltrpathdirs=
8440 names_already_handled=
8441 names_next_round='expat '
8442 while test -n "$names_next_round"; do
8443 names_this_round="$names_next_round"
8444 names_next_round=
8445 for name in $names_this_round; do
8446 already_handled=
8447 for n in $names_already_handled; do
8448 if test "$n" = "$name"; then
8449 already_handled=yes
8450 break
8451 fi
8452 done
8453 if test -z "$already_handled"; then
8454 names_already_handled="$names_already_handled $name"
8455 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8456 eval value=\"\$HAVE_LIB$uppername\"
8457 if test -n "$value"; then
8458 if test "$value" = yes; then
8459 eval value=\"\$LIB$uppername\"
8460 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8461 eval value=\"\$LTLIB$uppername\"
8462 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8463 else
8464 :
8465 fi
8466 else
8467 found_dir=
8468 found_la=
8469 found_so=
8470 found_a=
8471 if test $use_additional = yes; then
8472 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8473 found_dir="$additional_libdir"
8474 found_so="$additional_libdir/lib$name.$shlibext"
8475 if test -f "$additional_libdir/lib$name.la"; then
8476 found_la="$additional_libdir/lib$name.la"
8477 fi
8478 else
8479 if test -f "$additional_libdir/lib$name.$libext"; then
8480 found_dir="$additional_libdir"
8481 found_a="$additional_libdir/lib$name.$libext"
8482 if test -f "$additional_libdir/lib$name.la"; then
8483 found_la="$additional_libdir/lib$name.la"
8484 fi
8485 fi
8486 fi
8487 fi
8488 if test "X$found_dir" = "X"; then
8489 for x in $LDFLAGS $LTLIBEXPAT; do
8490
8491 acl_save_prefix="$prefix"
8492 prefix="$acl_final_prefix"
8493 acl_save_exec_prefix="$exec_prefix"
8494 exec_prefix="$acl_final_exec_prefix"
8495 eval x=\"$x\"
8496 exec_prefix="$acl_save_exec_prefix"
8497 prefix="$acl_save_prefix"
8498
8499 case "$x" in
8500 -L*)
8501 dir=`echo "X$x" | sed -e 's/^X-L//'`
8502 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8503 found_dir="$dir"
8504 found_so="$dir/lib$name.$shlibext"
8505 if test -f "$dir/lib$name.la"; then
8506 found_la="$dir/lib$name.la"
8507 fi
8508 else
8509 if test -f "$dir/lib$name.$libext"; then
8510 found_dir="$dir"
8511 found_a="$dir/lib$name.$libext"
8512 if test -f "$dir/lib$name.la"; then
8513 found_la="$dir/lib$name.la"
8514 fi
8515 fi
8516 fi
8517 ;;
8518 esac
8519 if test "X$found_dir" != "X"; then
8520 break
8521 fi
8522 done
8523 fi
8524 if test "X$found_dir" != "X"; then
8525 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8526 if test "X$found_so" != "X"; then
8527 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8528 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8529 else
8530 haveit=
8531 for x in $ltrpathdirs; do
8532 if test "X$x" = "X$found_dir"; then
8533 haveit=yes
8534 break
8535 fi
8536 done
8537 if test -z "$haveit"; then
8538 ltrpathdirs="$ltrpathdirs $found_dir"
8539 fi
8540 if test "$hardcode_direct" = yes; then
8541 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8542 else
8543 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8544 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8545 haveit=
8546 for x in $rpathdirs; do
8547 if test "X$x" = "X$found_dir"; then
8548 haveit=yes
8549 break
8550 fi
8551 done
8552 if test -z "$haveit"; then
8553 rpathdirs="$rpathdirs $found_dir"
8554 fi
8555 else
8556 haveit=
8557 for x in $LDFLAGS $LIBEXPAT; do
8558
8559 acl_save_prefix="$prefix"
8560 prefix="$acl_final_prefix"
8561 acl_save_exec_prefix="$exec_prefix"
8562 exec_prefix="$acl_final_exec_prefix"
8563 eval x=\"$x\"
8564 exec_prefix="$acl_save_exec_prefix"
8565 prefix="$acl_save_prefix"
8566
8567 if test "X$x" = "X-L$found_dir"; then
8568 haveit=yes
8569 break
8570 fi
8571 done
8572 if test -z "$haveit"; then
8573 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8574 fi
8575 if test "$hardcode_minus_L" != no; then
8576 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8577 else
8578 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8579 fi
8580 fi
8581 fi
8582 fi
8583 else
8584 if test "X$found_a" != "X"; then
8585 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8586 else
8587 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8588 fi
8589 fi
8590 additional_includedir=
8591 case "$found_dir" in
8592 */lib | */lib/)
8593 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8594 additional_includedir="$basedir/include"
8595 ;;
8596 esac
8597 if test "X$additional_includedir" != "X"; then
8598 if test "X$additional_includedir" != "X/usr/include"; then
8599 haveit=
8600 if test "X$additional_includedir" = "X/usr/local/include"; then
8601 if test -n "$GCC"; then
8602 case $host_os in
8603 linux*) haveit=yes;;
8604 esac
8605 fi
8606 fi
8607 if test -z "$haveit"; then
8608 for x in $CPPFLAGS $INCEXPAT; do
8609
8610 acl_save_prefix="$prefix"
8611 prefix="$acl_final_prefix"
8612 acl_save_exec_prefix="$exec_prefix"
8613 exec_prefix="$acl_final_exec_prefix"
8614 eval x=\"$x\"
8615 exec_prefix="$acl_save_exec_prefix"
8616 prefix="$acl_save_prefix"
8617
8618 if test "X$x" = "X-I$additional_includedir"; then
8619 haveit=yes
8620 break
8621 fi
8622 done
8623 if test -z "$haveit"; then
8624 if test -d "$additional_includedir"; then
8625 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8626 fi
8627 fi
8628 fi
8629 fi
8630 fi
8631 if test -n "$found_la"; then
8632 save_libdir="$libdir"
8633 case "$found_la" in
8634 */* | *\\*) . "$found_la" ;;
8635 *) . "./$found_la" ;;
8636 esac
8637 libdir="$save_libdir"
8638 for dep in $dependency_libs; do
8639 case "$dep" in
8640 -L*)
8641 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8642 if test "X$additional_libdir" != "X/usr/lib"; then
8643 haveit=
8644 if test "X$additional_libdir" = "X/usr/local/lib"; then
8645 if test -n "$GCC"; then
8646 case $host_os in
8647 linux*) haveit=yes;;
8648 esac
8649 fi
8650 fi
8651 if test -z "$haveit"; then
8652 haveit=
8653 for x in $LDFLAGS $LIBEXPAT; do
8654
8655 acl_save_prefix="$prefix"
8656 prefix="$acl_final_prefix"
8657 acl_save_exec_prefix="$exec_prefix"
8658 exec_prefix="$acl_final_exec_prefix"
8659 eval x=\"$x\"
8660 exec_prefix="$acl_save_exec_prefix"
8661 prefix="$acl_save_prefix"
8662
8663 if test "X$x" = "X-L$additional_libdir"; then
8664 haveit=yes
8665 break
8666 fi
8667 done
8668 if test -z "$haveit"; then
8669 if test -d "$additional_libdir"; then
8670 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8671 fi
8672 fi
8673 haveit=
8674 for x in $LDFLAGS $LTLIBEXPAT; do
8675
8676 acl_save_prefix="$prefix"
8677 prefix="$acl_final_prefix"
8678 acl_save_exec_prefix="$exec_prefix"
8679 exec_prefix="$acl_final_exec_prefix"
8680 eval x=\"$x\"
8681 exec_prefix="$acl_save_exec_prefix"
8682 prefix="$acl_save_prefix"
8683
8684 if test "X$x" = "X-L$additional_libdir"; then
8685 haveit=yes
8686 break
8687 fi
8688 done
8689 if test -z "$haveit"; then
8690 if test -d "$additional_libdir"; then
8691 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8692 fi
8693 fi
8694 fi
8695 fi
8696 ;;
8697 -R*)
8698 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8699 if test "$enable_rpath" != no; then
8700 haveit=
8701 for x in $rpathdirs; do
8702 if test "X$x" = "X$dir"; then
8703 haveit=yes
8704 break
8705 fi
8706 done
8707 if test -z "$haveit"; then
8708 rpathdirs="$rpathdirs $dir"
8709 fi
8710 haveit=
8711 for x in $ltrpathdirs; do
8712 if test "X$x" = "X$dir"; then
8713 haveit=yes
8714 break
8715 fi
8716 done
8717 if test -z "$haveit"; then
8718 ltrpathdirs="$ltrpathdirs $dir"
8719 fi
8720 fi
8721 ;;
8722 -l*)
8723 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8724 ;;
8725 *.la)
8726 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8727 ;;
8728 *)
8729 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8730 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8731 ;;
81ecdfbb
RW
8732 esac
8733 done
8734 fi
8735 else
8736 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8737 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8738 fi
8739 fi
8740 fi
8741 done
8742 done
8743 if test "X$rpathdirs" != "X"; then
8744 if test -n "$hardcode_libdir_separator"; then
8745 alldirs=
8746 for found_dir in $rpathdirs; do
8747 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8748 done
8749 acl_save_libdir="$libdir"
8750 libdir="$alldirs"
8751 eval flag=\"$hardcode_libdir_flag_spec\"
8752 libdir="$acl_save_libdir"
8753 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8754 else
8755 for found_dir in $rpathdirs; do
8756 acl_save_libdir="$libdir"
8757 libdir="$found_dir"
8758 eval flag=\"$hardcode_libdir_flag_spec\"
8759 libdir="$acl_save_libdir"
8760 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8761 done
8762 fi
8763 fi
8764 if test "X$ltrpathdirs" != "X"; then
8765 for found_dir in $ltrpathdirs; do
8766 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8767 done
8768 fi
a9322a30
TT
8769
8770
81ecdfbb 8771 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8772
81ecdfbb
RW
8773 for element in $INCEXPAT; do
8774 haveit=
8775 for x in $CPPFLAGS; do
a9322a30 8776
81ecdfbb
RW
8777 acl_save_prefix="$prefix"
8778 prefix="$acl_final_prefix"
8779 acl_save_exec_prefix="$exec_prefix"
8780 exec_prefix="$acl_final_exec_prefix"
8781 eval x=\"$x\"
8782 exec_prefix="$acl_save_exec_prefix"
8783 prefix="$acl_save_prefix"
a8111142 8784
81ecdfbb
RW
8785 if test "X$x" = "X$element"; then
8786 haveit=yes
8787 break
8788 fi
8789 done
8790 if test -z "$haveit"; then
8791 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8792 fi
8793 done
a9322a30
TT
8794
8795
81ecdfbb
RW
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8797$as_echo_n "checking for libexpat... " >&6; }
8798if test "${ac_cv_libexpat+set}" = set; then :
8799 $as_echo_n "(cached) " >&6
bec39cab 8800else
bec39cab 8801
81ecdfbb
RW
8802 ac_save_LIBS="$LIBS"
8803 LIBS="$LIBS $LIBEXPAT"
8804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8805/* end confdefs.h. */
81ecdfbb
RW
8806#include "expat.h"
8807int
8808main ()
8809{
8810XML_Parser p = XML_ParserCreate (0);
8811 ;
8812 return 0;
8813}
bec39cab 8814_ACEOF
81ecdfbb
RW
8815if ac_fn_c_try_link "$LINENO"; then :
8816 ac_cv_libexpat=yes
c906108c 8817else
81ecdfbb 8818 ac_cv_libexpat=no
bec39cab 8819fi
81ecdfbb
RW
8820rm -f core conftest.err conftest.$ac_objext \
8821 conftest$ac_exeext conftest.$ac_ext
8822 LIBS="$ac_save_LIBS"
c906108c 8823
95ca63c4 8824fi
81ecdfbb
RW
8825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8826$as_echo "$ac_cv_libexpat" >&6; }
8827 if test "$ac_cv_libexpat" = yes; then
8828 HAVE_LIBEXPAT=yes
bec39cab 8829
81ecdfbb 8830$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8831
81ecdfbb
RW
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8833$as_echo_n "checking how to link with libexpat... " >&6; }
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8835$as_echo "$LIBEXPAT" >&6; }
8836 else
8837 HAVE_LIBEXPAT=no
8838 CPPFLAGS="$ac_save_CPPFLAGS"
8839 LIBEXPAT=
8840 LTLIBEXPAT=
8841 fi
95ca63c4
CF
8842
8843
8844
7cb9022a
MK
8845
8846
bec39cab 8847
81ecdfbb
RW
8848 if test "$HAVE_LIBEXPAT" != yes; then
8849 if test "$with_expat" = yes; then
8850 as_fn_error "expat is missing or unusable" "$LINENO" 5
8851 else
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8853$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8854 fi
8855 else
8856 save_LIBS=$LIBS
8857 LIBS="$LIBS $LIBEXPAT"
8858 for ac_func in XML_StopParser
8859do :
8860 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8861if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8862 cat >>confdefs.h <<_ACEOF
81ecdfbb 8863#define HAVE_XML_STOPPARSER 1
bec39cab 8864_ACEOF
95ca63c4 8865
bec39cab 8866fi
bec39cab 8867done
95ca63c4 8868
81ecdfbb
RW
8869 LIBS=$save_LIBS
8870 fi
a9322a30
TT
8871fi
8872
d344e670
DE
8873# --------------------- #
8874# Check for libpython. #
8875# --------------------- #
8876
a9322a30 8877
a9322a30
TT
8878
8879
ec685c5e 8880
0c4a4063 8881
81ecdfbb
RW
8882# Check whether --with-python was given.
8883if test "${with_python+set}" = set; then :
8884 withval=$with_python;
bec39cab 8885else
81ecdfbb 8886 with_python=auto
bec39cab 8887fi
bec39cab 8888
81ecdfbb
RW
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8890$as_echo_n "checking whether to use python... " >&6; }
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8892$as_echo "$with_python" >&6; }
9a156167 8893
81ecdfbb
RW
8894if test "${with_python}" = no; then
8895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8896$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8897 have_libpython=no
bec39cab 8898else
81ecdfbb 8899 case "${with_python}" in
8c85a4e2 8900 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8901 if test -d ${with_python}; then
8902 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8903 python_prog="${with_python}/bin/python"
0c4a4063 8904 python_prefix=
9c4ea6c5
JB
8905 # If python does not exit ${with_python}/bin, then try in
8906 # ${with_python}. On Windows/MinGW, this is where the Python
8907 # executable is.
8908 if test ! -x "${python_prog}"; then
8909 python_prog="${with_python}/python"
8910 python_prefix=
8911 fi
e7a30f46 8912 if test ! -x "${python_prog}"; then
ec685c5e
DE
8913 # Fall back to gdb 7.0/7.1 behaviour.
8914 python_prog=missing
0c4a4063 8915 python_prefix=${with_python}
ec685c5e 8916 fi
e7a30f46 8917 elif test -x "${with_python}"; then
ec685c5e
DE
8918 # While we can't run python compiled for $host (unless host == build),
8919 # the user could write a script that provides the needed information,
8920 # so we support that.
ec685c5e 8921 python_prog=${with_python}
0c4a4063 8922 python_prefix=
ec685c5e
DE
8923 else
8924 as_fn_error "invalid value for --with-python" "$LINENO" 5
8925 fi
81ecdfbb 8926 ;;
ec685c5e
DE
8927 */*)
8928 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8929 as_fn_error "invalid value for --with-python" "$LINENO" 5
8930 ;;
ec685c5e
DE
8931 *)
8932 # The user has either specified auto, yes, or the name of the python
8933 # program assumed to be in $PATH.
8934 python_prefix=
8935 case "${with_python}" in
8936 yes | auto)
8937 if test ${build} = ${host}; then
8938 # Extract the first word of "python", so it can be a program name with args.
8939set dummy python; ac_word=$2
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8941$as_echo_n "checking for $ac_word... " >&6; }
8942if test "${ac_cv_path_python_prog_path+set}" = set; then :
8943 $as_echo_n "(cached) " >&6
8944else
8945 case $python_prog_path in
8946 [\\/]* | ?:[\\/]*)
8947 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8948 ;;
8949 *)
8950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8951for as_dir in $PATH
8952do
8953 IFS=$as_save_IFS
8954 test -z "$as_dir" && as_dir=.
8955 for ac_exec_ext in '' $ac_executable_extensions; do
8956 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8957 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8959 break 2
8960 fi
8961done
8962 done
8963IFS=$as_save_IFS
8964
8965 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8966 ;;
8967esac
8968fi
8969python_prog_path=$ac_cv_path_python_prog_path
8970if test -n "$python_prog_path"; then
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8972$as_echo "$python_prog_path" >&6; }
8973else
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
8976fi
8977
8978
8979 if test "${python_prog_path}" = missing; then
8980 python_prog=missing
8981 else
8982 python_prog=${python_prog_path}
8983 fi
8984 else
8985 # Not much we can do except assume the cross-compiler will find the
8986 # right files.
8987 python_prog=missing
8988 fi
8989 ;;
8990 *)
8991 # While we can't run python compiled for $host (unless host == build),
8992 # the user could write a script that provides the needed information,
8993 # so we support that.
8994 python_prog="${with_python}"
8995 # Extract the first word of "${python_prog}", so it can be a program name with args.
8996set dummy ${python_prog}; ac_word=$2
8997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8998$as_echo_n "checking for $ac_word... " >&6; }
8999if test "${ac_cv_path_python_prog_path+set}" = set; then :
9000 $as_echo_n "(cached) " >&6
9001else
9002 case $python_prog_path in
9003 [\\/]* | ?:[\\/]*)
9004 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9005 ;;
9006 *)
9007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9008for as_dir in $PATH
9009do
9010 IFS=$as_save_IFS
9011 test -z "$as_dir" && as_dir=.
9012 for ac_exec_ext in '' $ac_executable_extensions; do
9013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9014 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9016 break 2
9017 fi
9018done
9019 done
9020IFS=$as_save_IFS
9021
9022 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9023 ;;
9024esac
9025fi
9026python_prog_path=$ac_cv_path_python_prog_path
9027if test -n "$python_prog_path"; then
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9029$as_echo "$python_prog_path" >&6; }
9030else
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
9033fi
9034
9035
9036 if test "${python_prog_path}" = missing; then
9037 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9038 fi
9039 ;;
9040 esac
81ecdfbb
RW
9041 esac
9042
ec685c5e 9043 if test "${python_prog}" != missing; then
e7a30f46
DE
9044 # We have a python program to use, but it may be too old.
9045 # Don't flag an error for --with-python=auto (the default).
9046 have_python_config=yes
ec685c5e
DE
9047 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9048 if test $? != 0; then
e7a30f46
DE
9049 have_python_config=failed
9050 if test "${with_python}" != auto; then
9051 as_fn_error "failure running python-config --includes" "$LINENO" 5
9052 fi
ec685c5e
DE
9053 fi
9054 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9055 if test $? != 0; then
e7a30f46
DE
9056 have_python_config=failed
9057 if test "${with_python}" != auto; then
9058 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9059 fi
ec685c5e 9060 fi
0c4a4063
DE
9061 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9062 if test $? != 0; then
e7a30f46
DE
9063 have_python_config=failed
9064 if test "${with_python}" != auto; then
9065 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9066 fi
0c4a4063 9067 fi
ec685c5e 9068 else
ac534cba
JB
9069 # We do not have a python executable we can use to determine where
9070 # to find the Python headers and libs. We cannot guess the include
9071 # path from the python_prefix either, because that include path
9072 # depends on the Python version. So, there is nothing much we can
9073 # do except assume that the compiler will be able to find those files.
9074 python_includes=
9075 python_libs=
0c4a4063 9076 have_python_config=no
ec685c5e 9077 fi
bec39cab 9078
ec685c5e
DE
9079 # If we have python-config, only try the configuration it provides.
9080 # Otherwise fallback on the old way of trying different versions of
9081 # python in turn.
81ecdfbb 9082
ec685c5e
DE
9083 have_libpython=no
9084 if test "${have_python_config}" = yes; then
c1039e3c
JB
9085 # Determine the Python version by extracting "-lpython<version>"
9086 # part of the python_libs. <version> is usually X.Y with X and Y
9087 # being decimal numbers, but can also be XY (seen on Windows).
9088 #
9089 # The extraction is performed using sed with a regular expression.
9090 # Initially, the regexp used was using the '?' quantifier to make
9091 # the dot in the version number optional. Unfortunately, this
9092 # does not work with non-GNU versions of sed because, because of
9093 # what looks like a limitation (the '?' quantifier does not work
9094 # with back-references). We work around this limitation by using
9095 # the '*' quantifier instead. It means that, in theory, we might
9096 # match unexpected version strings such as "-lpython2..7", but
9097 # this seems unlikely in practice. And even if that happens,
9098 # an error will be triggered later on, when checking that version
9099 # number.
ec685c5e 9100 python_version=`echo " ${python_libs} " \
c1039e3c 9101 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9102 case "${python_version}" in
9103 python*)
ec685c5e
DE
9104
9105 version=${python_version}
9106
9107 new_CPPFLAGS=${python_includes}
9108 new_LIBS=${python_libs}
81ecdfbb
RW
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9110$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9111 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9112 save_LIBS=$LIBS
ec685c5e
DE
9113 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9114 LIBS="$LIBS $new_LIBS"
9115 found_usable_python=no
81ecdfbb 9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9117/* end confdefs.h. */
ac534cba 9118#include "Python.h"
81ecdfbb
RW
9119int
9120main ()
9121{
9122Py_Initialize ();
9123 ;
9124 return 0;
9125}
bec39cab 9126_ACEOF
81ecdfbb 9127if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9128 have_libpython=${version}
9129 found_usable_python=yes
ac534cba
JB
9130 PYTHON_CPPFLAGS=$new_CPPFLAGS
9131 PYTHON_LIBS=$new_LIBS
9a156167 9132fi
81ecdfbb
RW
9133rm -f core conftest.err conftest.$ac_objext \
9134 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9135 CPPFLAGS=$save_CPPFLAGS
9136 LIBS=$save_LIBS
ec685c5e
DE
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9138$as_echo "${found_usable_python}" >&6; }
9a156167 9139
0c4a4063
DE
9140 ;;
9141 *)
ec685c5e 9142 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9143 ;;
9144 esac
e7a30f46 9145 elif test "${have_python_config}" != failed; then
ec685c5e 9146 if test "${have_libpython}" = no; then
9a156167 9147
420697bb
TT
9148 version=python2.7
9149
9150 new_CPPFLAGS=${python_includes}
9151 new_LIBS="${python_libs} -lpython2.7"
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9153$as_echo_n "checking for ${version}... " >&6; }
9154 save_CPPFLAGS=$CPPFLAGS
9155 save_LIBS=$LIBS
9156 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9157 LIBS="$LIBS $new_LIBS"
9158 found_usable_python=no
9159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9160/* end confdefs.h. */
ac534cba 9161#include "Python.h"
420697bb
TT
9162int
9163main ()
9164{
9165Py_Initialize ();
9166 ;
9167 return 0;
9168}
9169_ACEOF
9170if ac_fn_c_try_link "$LINENO"; then :
9171 have_libpython=${version}
9172 found_usable_python=yes
ac534cba
JB
9173 PYTHON_CPPFLAGS=$new_CPPFLAGS
9174 PYTHON_LIBS=$new_LIBS
420697bb
TT
9175fi
9176rm -f core conftest.err conftest.$ac_objext \
9177 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9178 CPPFLAGS=$save_CPPFLAGS
9179 LIBS=$save_LIBS
420697bb
TT
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9181$as_echo "${found_usable_python}" >&6; }
9182
9183 fi
9184 if test "${have_libpython}" = no; then
9185
ec685c5e
DE
9186 version=python2.6
9187
9188 new_CPPFLAGS=${python_includes}
9189 new_LIBS="${python_libs} -lpython2.6"
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9191$as_echo_n "checking for ${version}... " >&6; }
9192 save_CPPFLAGS=$CPPFLAGS
9193 save_LIBS=$LIBS
9194 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9195 LIBS="$LIBS $new_LIBS"
9196 found_usable_python=no
9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9198/* end confdefs.h. */
ac534cba 9199#include "Python.h"
ec685c5e
DE
9200int
9201main ()
9202{
9203Py_Initialize ();
9204 ;
9205 return 0;
9206}
9207_ACEOF
9208if ac_fn_c_try_link "$LINENO"; then :
9209 have_libpython=${version}
9210 found_usable_python=yes
ac534cba
JB
9211 PYTHON_CPPFLAGS=$new_CPPFLAGS
9212 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9213fi
9214rm -f core conftest.err conftest.$ac_objext \
9215 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9216 CPPFLAGS=$save_CPPFLAGS
9217 LIBS=$save_LIBS
ec685c5e
DE
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9219$as_echo "${found_usable_python}" >&6; }
9a156167 9220
81ecdfbb 9221 fi
ec685c5e 9222 if test ${have_libpython} = no; then
9a156167 9223
81ecdfbb 9224 version=python2.5
9a156167 9225
ec685c5e
DE
9226 new_CPPFLAGS=${python_includes}
9227 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9229$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9230 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9231 save_LIBS=$LIBS
ec685c5e
DE
9232 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9233 LIBS="$LIBS $new_LIBS"
9234 found_usable_python=no
81ecdfbb 9235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9236/* end confdefs.h. */
ac534cba 9237#include "Python.h"
81ecdfbb
RW
9238int
9239main ()
9240{
9241Py_Initialize ();
9242 ;
9243 return 0;
9244}
436868fb 9245_ACEOF
81ecdfbb 9246if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9247 have_libpython=${version}
9248 found_usable_python=yes
ac534cba
JB
9249 PYTHON_CPPFLAGS=$new_CPPFLAGS
9250 PYTHON_LIBS=$new_LIBS
436868fb 9251fi
81ecdfbb
RW
9252rm -f core conftest.err conftest.$ac_objext \
9253 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9254 CPPFLAGS=$save_CPPFLAGS
9255 LIBS=$save_LIBS
ec685c5e
DE
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9257$as_echo "${found_usable_python}" >&6; }
a9322a30 9258
81ecdfbb 9259 fi
ec685c5e 9260 if test ${have_libpython} = no; then
a9322a30 9261
81ecdfbb 9262 version=python2.4
a9322a30 9263
ec685c5e
DE
9264 new_CPPFLAGS=${python_includes}
9265 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9267$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9268 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9269 save_LIBS=$LIBS
ec685c5e
DE
9270 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9271 LIBS="$LIBS $new_LIBS"
9272 found_usable_python=no
81ecdfbb 9273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9274/* end confdefs.h. */
ac534cba 9275#include "Python.h"
a9322a30
TT
9276int
9277main ()
9278{
81ecdfbb 9279Py_Initialize ();
a9322a30
TT
9280 ;
9281 return 0;
9282}
436868fb 9283_ACEOF
81ecdfbb 9284if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9285 have_libpython=${version}
9286 found_usable_python=yes
ac534cba
JB
9287 PYTHON_CPPFLAGS=$new_CPPFLAGS
9288 PYTHON_LIBS=$new_LIBS
436868fb 9289fi
81ecdfbb
RW
9290rm -f core conftest.err conftest.$ac_objext \
9291 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9292 CPPFLAGS=$save_CPPFLAGS
9293 LIBS=$save_LIBS
ec685c5e
DE
9294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9295$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9296
ec685c5e
DE
9297 fi
9298 fi
9c4ea6c5 9299 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9300
9301$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9302
9c4ea6c5 9303 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9304
9305$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9306
9c4ea6c5 9307 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9308
9309$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9310
9c4ea6c5 9311 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9312
9313$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9314
81ecdfbb 9315 fi
ec685c5e
DE
9316
9317 if test "${have_libpython}" = no; then
81ecdfbb
RW
9318 case "${with_python}" in
9319 yes)
9320 as_fn_error "python is missing or unusable" "$LINENO" 5
9321 ;;
9322 auto)
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9324$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9325 ;;
9326 *)
9327 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9328 ;;
9329 esac
0c4a4063
DE
9330 else
9331 if test -n "${python_prefix}"; then
9332
9333cat >>confdefs.h <<_ACEOF
9334#define WITH_PYTHON_PATH "${python_prefix}"
9335_ACEOF
9336
9337
9338 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9339 if test "x$prefix" = xNONE; then
9340 test_prefix=/usr/local
9341 else
9342 test_prefix=$prefix
9343 fi
9344 else
9345 test_prefix=$exec_prefix
9346 fi
9347 value=0
9348 case ${python_prefix} in
9349 "${test_prefix}"|"${test_prefix}/"*|\
9350 '${exec_prefix}'|'${exec_prefix}/'*)
9351 value=1
9352 ;;
9353 esac
9354
9355cat >>confdefs.h <<_ACEOF
9356#define PYTHON_PATH_RELOCATABLE $value
9357_ACEOF
9358
9359
9360 fi
81ecdfbb 9361 fi
436868fb 9362fi
436868fb 9363
ec685c5e 9364if test "${have_libpython}" != no; then
436868fb 9365
81ecdfbb 9366$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9367
81ecdfbb
RW
9368 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9369 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9370 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9371 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9372 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9373
81ecdfbb
RW
9374 # Flags needed to compile Python code (taken from python-config --cflags).
9375 # We cannot call python-config directly because it will output whatever was
9376 # used when compiling the Python interpreter itself, including flags which
9377 # would make the python-related objects be compiled differently from the
9378 # rest of GDB (e.g., -O2 and -fPIC).
9379 if test "${GCC}" = yes; then
9380 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9381 fi
436868fb 9382
81ecdfbb
RW
9383 if test "x${tentative_python_cflags}" != x; then
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9385$as_echo_n "checking compiler flags for python code... " >&6; }
9386 for flag in ${tentative_python_cflags}; do
9387 # Check that the compiler accepts it
9388 saved_CFLAGS="$CFLAGS"
9389 CFLAGS="$CFLAGS $flag"
9390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9391/* end confdefs.h. */
81ecdfbb 9392
a9322a30
TT
9393int
9394main ()
9395{
a9322a30
TT
9396
9397 ;
9398 return 0;
9399}
bec39cab 9400_ACEOF
81ecdfbb
RW
9401if ac_fn_c_try_compile "$LINENO"; then :
9402 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9403fi
81ecdfbb
RW
9404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9405 CFLAGS="$saved_CFLAGS"
9406 done
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9408$as_echo "${PYTHON_CFLAGS}" >&6; }
9409 fi
043b6510 9410
c83393b9
JB
9411 # On x64 Windows, Python's include headers, and pyconfig.h in
9412 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9413 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9414 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9415 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9416 # The issue was reported to the Python community, but still isn't
9417 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9418
043b6510 9419 case "$gdb_host" in
c83393b9
JB
9420 mingw64)
9421 if test "${GCC}" = yes; then
9422 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9423 fi
9424 ;;
043b6510 9425 esac
a8db4212
YPK
9426
9427 # Note that "python -m threading" cannot be used to check for
9428 # threading support due to a bug in Python 2.7.3
9429 # (http://bugs.python.org/issue15567).
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9431$as_echo_n "checking whether python supports threads... " >&6; }
9432 saved_CPPFLAGS="${CPPFLAGS}"
9433 CPPFLAGS="${PYTHON_CPPFLAGS}"
9434 # Note that the test is reversed so that python_has_threads=yes on
9435 # unexpected failures.
9436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9437/* end confdefs.h. */
9438
9439#include <Python.h>
9440#ifdef WITH_THREAD
9441# error
9442#endif
9443
9444_ACEOF
9445if ac_fn_c_try_cpp "$LINENO"; then :
9446 python_has_threads=no
9447else
9448 python_has_threads=yes
9449fi
9450rm -f conftest.err conftest.$ac_ext
9451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9452$as_echo "${python_has_threads}" >&6; }
9453 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9454else
6dddc817
DE
9455 # Even if Python support is not compiled in, we need to have this file
9456 # included so that the "python" command, et.al., still exists.
9457 CONFIG_OBS="$CONFIG_OBS python.o"
9458 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9459fi
9a156167 9460
ed3ef339
DE
9461
9462
4df42755
DE
9463 if test "${have_libpython}" != no; then
9464 HAVE_PYTHON_TRUE=
9465 HAVE_PYTHON_FALSE='#'
9466else
9467 HAVE_PYTHON_TRUE='#'
9468 HAVE_PYTHON_FALSE=
9469fi
9470
ed3ef339
DE
9471
9472# -------------------- #
9473# Check for libguile. #
9474# -------------------- #
9475
9476
e1402065
DE
9477
9478
9479
9480
9481# Check whether --with-guile was given.
9482if test "${with_guile+set}" = set; then :
9483 withval=$with_guile;
9484else
9485 with_guile=auto
9486fi
9487
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9489$as_echo_n "checking whether to use guile... " >&6; }
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9491$as_echo "$with_guile" >&6; }
9492
ed3ef339
DE
9493# Extract the first word of "pkg-config", so it can be a program name with args.
9494set dummy pkg-config; ac_word=$2
9495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496$as_echo_n "checking for $ac_word... " >&6; }
9497if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9498 $as_echo_n "(cached) " >&6
9499else
9500 case $pkg_config_prog_path in
9501 [\\/]* | ?:[\\/]*)
9502 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9503 ;;
9504 *)
9505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9506for as_dir in $PATH
9507do
9508 IFS=$as_save_IFS
9509 test -z "$as_dir" && as_dir=.
9510 for ac_exec_ext in '' $ac_executable_extensions; do
9511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9512 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9514 break 2
9515 fi
9516done
9517 done
9518IFS=$as_save_IFS
9519
9520 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9521 ;;
9522esac
9523fi
9524pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9525if test -n "$pkg_config_prog_path"; then
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9527$as_echo "$pkg_config_prog_path" >&6; }
9528else
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9530$as_echo "no" >&6; }
9531fi
9532
9533
9534
214ab2da 9535try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9536have_libguile=no
9537case "${with_guile}" in
9538no)
9539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9540$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9541 ;;
9542auto)
e1402065
DE
9543 if test "${pkg_config_prog_path}" = "missing"; then
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9545$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9546 else
ed3ef339
DE
9547
9548 pkg_config=${pkg_config_prog_path}
9549 guile_version_list=${try_guile_versions}
9550 flag_errors=no
9551
ed3ef339
DE
9552 found_usable_guile=checking
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9554$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9555 for guile_version in ${guile_version_list}; do
9556 ${pkg_config} --exists ${guile_version} 2>/dev/null
9557 if test $? != 0; then
9558 continue
9559 fi
9560 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9561 if test $? != 0; then
9562 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9563 fi
9564 new_LIBS=`${pkg_config} --libs ${guile_version}`
9565 if test $? != 0; then
9566 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9567 fi
9568 found_usable_guile=${guile_version}
9569 break
9570 done
9571 if test "${found_usable_guile}" = "checking"; then
9572 if test "${flag_errors}" = "yes"; then
9573 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9574 else
9575 found_usable_guile=no
9576 fi
9577 fi
9578 if test "${found_usable_guile}" != no; then
9579 save_CPPFLAGS=$CPPFLAGS
9580 save_LIBS=$LIBS
9581 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9582 LIBS="$LIBS $new_LIBS"
9583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9584/* end confdefs.h. */
9585#include "libguile.h"
9586int
9587main ()
9588{
9589scm_init_guile ();
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594if ac_fn_c_try_link "$LINENO"; then :
9595 have_libguile=yes
9596 GUILE_CPPFLAGS=$new_CPPFLAGS
9597 GUILE_LIBS=$new_LIBS
9598else
9599 found_usable_guile=no
9600fi
9601rm -f core conftest.err conftest.$ac_objext \
9602 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9603 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9604if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9605
9606$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9607
9608
9609fi
9610
ed3ef339
DE
9611 CPPFLAGS=$save_CPPFLAGS
9612 LIBS=$save_LIBS
9613 if test "${found_usable_guile}" = no; then
9614 if test "${flag_errors}" = yes; then
9615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9617as_fn_error "linking guile version ${guile_version} test program failed
9618See \`config.log' for more details." "$LINENO" 5; }
9619 fi
9620 fi
9621 fi
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9623$as_echo "${found_usable_guile}" >&6; }
9624
e1402065 9625 fi
ed3ef339
DE
9626 ;;
9627yes)
e1402065
DE
9628 if test "${pkg_config_prog_path}" = "missing"; then
9629 as_fn_error "pkg-config not found" "$LINENO" 5
9630 fi
ed3ef339
DE
9631
9632 pkg_config=${pkg_config_prog_path}
9633 guile_version_list=${try_guile_versions}
9634 flag_errors=yes
9635
ed3ef339
DE
9636 found_usable_guile=checking
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9638$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9639 for guile_version in ${guile_version_list}; do
9640 ${pkg_config} --exists ${guile_version} 2>/dev/null
9641 if test $? != 0; then
9642 continue
9643 fi
9644 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9645 if test $? != 0; then
9646 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9647 fi
9648 new_LIBS=`${pkg_config} --libs ${guile_version}`
9649 if test $? != 0; then
9650 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9651 fi
9652 found_usable_guile=${guile_version}
9653 break
9654 done
9655 if test "${found_usable_guile}" = "checking"; then
9656 if test "${flag_errors}" = "yes"; then
9657 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9658 else
9659 found_usable_guile=no
9660 fi
9661 fi
9662 if test "${found_usable_guile}" != no; then
9663 save_CPPFLAGS=$CPPFLAGS
9664 save_LIBS=$LIBS
9665 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9666 LIBS="$LIBS $new_LIBS"
9667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9668/* end confdefs.h. */
9669#include "libguile.h"
9670int
9671main ()
9672{
9673scm_init_guile ();
9674 ;
9675 return 0;
9676}
9677_ACEOF
9678if ac_fn_c_try_link "$LINENO"; then :
9679 have_libguile=yes
9680 GUILE_CPPFLAGS=$new_CPPFLAGS
9681 GUILE_LIBS=$new_LIBS
9682else
9683 found_usable_guile=no
9684fi
9685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9687 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9688if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9689
9690$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9691
9692
9693fi
9694
ed3ef339
DE
9695 CPPFLAGS=$save_CPPFLAGS
9696 LIBS=$save_LIBS
9697 if test "${found_usable_guile}" = no; then
9698 if test "${flag_errors}" = yes; then
9699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9701as_fn_error "linking guile version ${guile_version} test program failed
9702See \`config.log' for more details." "$LINENO" 5; }
9703 fi
9704 fi
9705 fi
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9707$as_echo "${found_usable_guile}" >&6; }
9708
9709 ;;
9710[\\/]* | ?:[\\/]*)
e1402065 9711 if test -x "${with_guile}"; then
ed3ef339
DE
9712
9713 pkg_config=${with_guile}
9714 guile_version_list=${try_guile_versions}
9715 flag_errors=yes
9716
ed3ef339
DE
9717 found_usable_guile=checking
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9719$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9720 for guile_version in ${guile_version_list}; do
9721 ${pkg_config} --exists ${guile_version} 2>/dev/null
9722 if test $? != 0; then
9723 continue
9724 fi
9725 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9726 if test $? != 0; then
9727 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9728 fi
9729 new_LIBS=`${pkg_config} --libs ${guile_version}`
9730 if test $? != 0; then
9731 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9732 fi
9733 found_usable_guile=${guile_version}
9734 break
9735 done
9736 if test "${found_usable_guile}" = "checking"; then
9737 if test "${flag_errors}" = "yes"; then
9738 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9739 else
9740 found_usable_guile=no
9741 fi
9742 fi
9743 if test "${found_usable_guile}" != no; then
9744 save_CPPFLAGS=$CPPFLAGS
9745 save_LIBS=$LIBS
9746 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9747 LIBS="$LIBS $new_LIBS"
9748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9749/* end confdefs.h. */
9750#include "libguile.h"
9751int
9752main ()
9753{
9754scm_init_guile ();
9755 ;
9756 return 0;
9757}
9758_ACEOF
9759if ac_fn_c_try_link "$LINENO"; then :
9760 have_libguile=yes
9761 GUILE_CPPFLAGS=$new_CPPFLAGS
9762 GUILE_LIBS=$new_LIBS
9763else
9764 found_usable_guile=no
9765fi
9766rm -f core conftest.err conftest.$ac_objext \
9767 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9768 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9769if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9770
9771$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9772
9773
9774fi
9775
ed3ef339
DE
9776 CPPFLAGS=$save_CPPFLAGS
9777 LIBS=$save_LIBS
9778 if test "${found_usable_guile}" = no; then
9779 if test "${flag_errors}" = yes; then
9780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9782as_fn_error "linking guile version ${guile_version} test program failed
9783See \`config.log' for more details." "$LINENO" 5; }
9784 fi
9785 fi
9786 fi
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9788$as_echo "${found_usable_guile}" >&6; }
9789
e1402065
DE
9790 else
9791 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9792 fi
ed3ef339
DE
9793 ;;
9794"" | */*)
9795 # Disallow --with=guile="" and --with-guile=foo/bar.
9796 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9797 ;;
9798*)
9799 # A space separate list of guile versions to try, in order.
e1402065
DE
9800 if test "${pkg_config_prog_path}" = "missing"; then
9801 as_fn_error "pkg-config not found" "$LINENO" 5
9802 fi
ed3ef339
DE
9803
9804 pkg_config=${pkg_config_prog_path}
9805 guile_version_list=${with_guile}
9806 flag_errors=yes
9807
ed3ef339
DE
9808 found_usable_guile=checking
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9810$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9811 for guile_version in ${guile_version_list}; do
9812 ${pkg_config} --exists ${guile_version} 2>/dev/null
9813 if test $? != 0; then
9814 continue
9815 fi
9816 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9817 if test $? != 0; then
9818 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9819 fi
9820 new_LIBS=`${pkg_config} --libs ${guile_version}`
9821 if test $? != 0; then
9822 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9823 fi
9824 found_usable_guile=${guile_version}
9825 break
9826 done
9827 if test "${found_usable_guile}" = "checking"; then
9828 if test "${flag_errors}" = "yes"; then
9829 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9830 else
9831 found_usable_guile=no
9832 fi
9833 fi
9834 if test "${found_usable_guile}" != no; then
9835 save_CPPFLAGS=$CPPFLAGS
9836 save_LIBS=$LIBS
9837 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9838 LIBS="$LIBS $new_LIBS"
9839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9840/* end confdefs.h. */
9841#include "libguile.h"
9842int
9843main ()
9844{
9845scm_init_guile ();
9846 ;
9847 return 0;
9848}
9849_ACEOF
9850if ac_fn_c_try_link "$LINENO"; then :
9851 have_libguile=yes
9852 GUILE_CPPFLAGS=$new_CPPFLAGS
9853 GUILE_LIBS=$new_LIBS
9854else
9855 found_usable_guile=no
9856fi
9857rm -f core conftest.err conftest.$ac_objext \
9858 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9859 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9860if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9861
9862$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9863
9864
9865fi
9866
ed3ef339
DE
9867 CPPFLAGS=$save_CPPFLAGS
9868 LIBS=$save_LIBS
9869 if test "${found_usable_guile}" = no; then
9870 if test "${flag_errors}" = yes; then
9871 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9873as_fn_error "linking guile version ${guile_version} test program failed
9874See \`config.log' for more details." "$LINENO" 5; }
9875 fi
9876 fi
9877 fi
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9879$as_echo "${found_usable_guile}" >&6; }
9880
9881 ;;
9882esac
9883
e76c5d17 9884if test "${have_libguile}" != no; then
d342a0da
DE
9885 case "${with_guile}" in
9886 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9887
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9889$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9890if test "${ac_cv_guild_program_name+set}" = set; then :
9891 $as_echo_n "(cached) " >&6
9892else
d342a0da 9893 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9894
9895 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9896 # the 'guild' and 'bindir' variables. In that case, try to guess
9897 # what the program name is, at the risk of getting it wrong if
9898 # Guile was configured with '--program-suffix' or similar.
9899 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9900 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9901 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9902 fi
9903
9904fi
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9906$as_echo "$ac_cv_guild_program_name" >&6; }
9907
9908 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9909 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9910 fi
9911
9912 GUILD="$ac_cv_guild_program_name"
9913
9914
d342a0da
DE
9915 ;;
9916 *)
9917
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9919$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9920if test "${ac_cv_guild_program_name+set}" = set; then :
9921 $as_echo_n "(cached) " >&6
9922else
9923 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9924
9925 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9926 # the 'guild' and 'bindir' variables. In that case, try to guess
9927 # what the program name is, at the risk of getting it wrong if
9928 # Guile was configured with '--program-suffix' or similar.
9929 if test "x$ac_cv_guild_program_name" = "x"; then
9930 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9931 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9932 fi
9933
9934fi
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9936$as_echo "$ac_cv_guild_program_name" >&6; }
9937
9938 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9939 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9940 fi
9941
9942 GUILD="$ac_cv_guild_program_name"
9943
9944
9945 ;;
9946 esac
e76c5d17
DE
9947
9948
9949 if test "$cross_compiling" = no; then
9950 GUILD_TARGET_FLAG=
9951 else
9952 GUILD_TARGET_FLAG="--target=$host"
9953 fi
9954
9955
9956
9957
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9959$as_echo_n "checking whether guild supports this host... " >&6; }
9960if test "${ac_cv_guild_ok+set}" = set; then :
9961 $as_echo_n "(cached) " >&6
9962else
9963 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9964 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9965 ac_cv_guild_ok=yes
9966 else
9967 ac_cv_guild_ok=no
9968 fi
9969fi
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9971$as_echo "$ac_cv_guild_ok" >&6; }
9972
9973 if test "$ac_cv_guild_ok" = no; then
9974 have_libguile=no
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9976$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9977 fi
9978fi
9979
ed3ef339
DE
9980if test "${have_libguile}" != no; then
9981
9982$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9983
9984 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9985 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9986 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9987 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9988 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9989
9990 save_LIBS="$LIBS"
9991 save_CPPFLAGS="$CPPFLAGS"
9992 LIBS="$GUILE_LIBS"
9993 CPPFLAGS="$GUILE_CPPFLAGS"
9994 for ac_func in scm_new_smob
9995do :
9996 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9997if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9998 cat >>confdefs.h <<_ACEOF
9999#define HAVE_SCM_NEW_SMOB 1
10000_ACEOF
10001
10002fi
10003done
10004
10005 LIBS="$save_LIBS"
10006 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10007else
10008 # Even if Guile support is not compiled in, we need to have these files
10009 # included.
10010 CONFIG_OBS="$CONFIG_OBS guile.o"
10011 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10012fi
9a156167 10013
ac534cba 10014
4df42755
DE
10015 if test "${have_libguile}" != no; then
10016 HAVE_GUILE_TRUE=
10017 HAVE_GUILE_FALSE='#'
10018else
10019 HAVE_GUILE_TRUE='#'
10020 HAVE_GUILE_FALSE=
10021fi
10022
ac534cba 10023
d344e670
DE
10024# --------------------- #
10025# Check for libmcheck. #
10026# --------------------- #
10027
a8db4212
YPK
10028# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10029# but turn it off if Python is enabled with threads, since -lmcheck is
10030# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10031# and for releases.
17ef446e
PA
10032if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10033 && $development; then
10034 libmcheck_default=yes
10035else
10036 libmcheck_default=no
a8db4212
YPK
10037fi
10038
17ef446e
PA
10039 # Check whether --enable-libmcheck was given.
10040if test "${enable_libmcheck+set}" = set; then :
10041 enableval=$enable_libmcheck; case "${enableval}" in
10042 yes | y) ENABLE_LIBMCHECK="yes" ;;
10043 no | n) ENABLE_LIBMCHECK="no" ;;
10044 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10045 esac
10046fi
10047
10048
10049 if test -z "${ENABLE_LIBMCHECK}"; then
10050 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10051 fi
17ef446e
PA
10052
10053 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10055$as_echo_n "checking for main in -lmcheck... " >&6; }
10056if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10057 $as_echo_n "(cached) " >&6
10058else
10059 ac_check_lib_save_LIBS=$LIBS
10060LIBS="-lmcheck $LIBS"
10061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10062/* end confdefs.h. */
10063
10064
10065int
10066main ()
10067{
10068return main ();
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073if ac_fn_c_try_link "$LINENO"; then :
10074 ac_cv_lib_mcheck_main=yes
10075else
10076 ac_cv_lib_mcheck_main=no
10077fi
10078rm -f core conftest.err conftest.$ac_objext \
10079 conftest$ac_exeext conftest.$ac_ext
10080LIBS=$ac_check_lib_save_LIBS
10081fi
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10083$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10084if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10085 cat >>confdefs.h <<_ACEOF
10086#define HAVE_LIBMCHECK 1
10087_ACEOF
10088
10089 LIBS="-lmcheck $LIBS"
10090
10091fi
10092
17ef446e
PA
10093 fi
10094
10095
10096if test "$ENABLE_LIBMCHECK" = "yes" \
10097 -a "${have_libpython}" != "no" \
10098 -a "${python_has_threads}" = "yes" ; then
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10100$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10101fi
10102
58bfce93
MM
10103
10104# Check whether --with-intel_pt was given.
10105if test "${with_intel_pt+set}" = set; then :
10106 withval=$with_intel_pt;
10107else
10108 with_intel_pt=auto
10109fi
10110
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10112$as_echo_n "checking whether to use intel pt... " >&6; }
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10114$as_echo "$with_intel_pt" >&6; }
10115
10116if test "${with_intel_pt}" = no; then
bc504a31
PA
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10118$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10119 HAVE_LIBIPT=no
10120else
5599c404
MM
10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10122/* end confdefs.h. */
10123
10124#include <linux/perf_event.h>
10125#ifndef PERF_ATTR_SIZE_VER5
10126# error
10127#endif
10128
10129_ACEOF
10130if ac_fn_c_try_cpp "$LINENO"; then :
10131 perf_event=yes
10132else
10133 perf_event=no
10134fi
10135rm -f conftest.err conftest.$ac_ext
10136 if test "$perf_event" != yes; then
10137 if test "$with_intel_pt" = yes; then
10138 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10139 else
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10141$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10142 fi
10143 fi
10144
58bfce93
MM
10145
10146
10147
10148
10149
10150
10151
10152
10153 use_additional=yes
10154
10155 acl_save_prefix="$prefix"
10156 prefix="$acl_final_prefix"
10157 acl_save_exec_prefix="$exec_prefix"
10158 exec_prefix="$acl_final_exec_prefix"
10159
10160 eval additional_includedir=\"$includedir\"
10161 eval additional_libdir=\"$libdir\"
10162
10163 exec_prefix="$acl_save_exec_prefix"
10164 prefix="$acl_save_prefix"
10165
10166
10167# Check whether --with-libipt-prefix was given.
10168if test "${with_libipt_prefix+set}" = set; then :
10169 withval=$with_libipt_prefix;
10170 if test "X$withval" = "Xno"; then
10171 use_additional=no
10172 else
10173 if test "X$withval" = "X"; then
10174
10175 acl_save_prefix="$prefix"
10176 prefix="$acl_final_prefix"
10177 acl_save_exec_prefix="$exec_prefix"
10178 exec_prefix="$acl_final_exec_prefix"
10179
10180 eval additional_includedir=\"$includedir\"
10181 eval additional_libdir=\"$libdir\"
10182
10183 exec_prefix="$acl_save_exec_prefix"
10184 prefix="$acl_save_prefix"
10185
10186 else
10187 additional_includedir="$withval/include"
10188 additional_libdir="$withval/lib"
10189 fi
10190 fi
10191
10192fi
10193
10194 LIBIPT=
10195 LTLIBIPT=
10196 INCIPT=
10197 rpathdirs=
10198 ltrpathdirs=
10199 names_already_handled=
10200 names_next_round='ipt '
10201 while test -n "$names_next_round"; do
10202 names_this_round="$names_next_round"
10203 names_next_round=
10204 for name in $names_this_round; do
10205 already_handled=
10206 for n in $names_already_handled; do
10207 if test "$n" = "$name"; then
10208 already_handled=yes
10209 break
10210 fi
10211 done
10212 if test -z "$already_handled"; then
10213 names_already_handled="$names_already_handled $name"
10214 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10215 eval value=\"\$HAVE_LIB$uppername\"
10216 if test -n "$value"; then
10217 if test "$value" = yes; then
10218 eval value=\"\$LIB$uppername\"
10219 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10220 eval value=\"\$LTLIB$uppername\"
10221 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10222 else
10223 :
10224 fi
10225 else
10226 found_dir=
10227 found_la=
10228 found_so=
10229 found_a=
10230 if test $use_additional = yes; then
10231 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10232 found_dir="$additional_libdir"
10233 found_so="$additional_libdir/lib$name.$shlibext"
10234 if test -f "$additional_libdir/lib$name.la"; then
10235 found_la="$additional_libdir/lib$name.la"
10236 fi
10237 else
10238 if test -f "$additional_libdir/lib$name.$libext"; then
10239 found_dir="$additional_libdir"
10240 found_a="$additional_libdir/lib$name.$libext"
10241 if test -f "$additional_libdir/lib$name.la"; then
10242 found_la="$additional_libdir/lib$name.la"
10243 fi
10244 fi
10245 fi
10246 fi
10247 if test "X$found_dir" = "X"; then
10248 for x in $LDFLAGS $LTLIBIPT; do
10249
10250 acl_save_prefix="$prefix"
10251 prefix="$acl_final_prefix"
10252 acl_save_exec_prefix="$exec_prefix"
10253 exec_prefix="$acl_final_exec_prefix"
10254 eval x=\"$x\"
10255 exec_prefix="$acl_save_exec_prefix"
10256 prefix="$acl_save_prefix"
10257
10258 case "$x" in
10259 -L*)
10260 dir=`echo "X$x" | sed -e 's/^X-L//'`
10261 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10262 found_dir="$dir"
10263 found_so="$dir/lib$name.$shlibext"
10264 if test -f "$dir/lib$name.la"; then
10265 found_la="$dir/lib$name.la"
10266 fi
10267 else
10268 if test -f "$dir/lib$name.$libext"; then
10269 found_dir="$dir"
10270 found_a="$dir/lib$name.$libext"
10271 if test -f "$dir/lib$name.la"; then
10272 found_la="$dir/lib$name.la"
10273 fi
10274 fi
10275 fi
10276 ;;
10277 esac
10278 if test "X$found_dir" != "X"; then
10279 break
10280 fi
10281 done
10282 fi
10283 if test "X$found_dir" != "X"; then
10284 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10285 if test "X$found_so" != "X"; then
10286 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10287 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10288 else
10289 haveit=
10290 for x in $ltrpathdirs; do
10291 if test "X$x" = "X$found_dir"; then
10292 haveit=yes
10293 break
10294 fi
10295 done
10296 if test -z "$haveit"; then
10297 ltrpathdirs="$ltrpathdirs $found_dir"
10298 fi
10299 if test "$hardcode_direct" = yes; then
10300 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10301 else
10302 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10303 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10304 haveit=
10305 for x in $rpathdirs; do
10306 if test "X$x" = "X$found_dir"; then
10307 haveit=yes
10308 break
10309 fi
10310 done
10311 if test -z "$haveit"; then
10312 rpathdirs="$rpathdirs $found_dir"
10313 fi
10314 else
10315 haveit=
10316 for x in $LDFLAGS $LIBIPT; do
10317
10318 acl_save_prefix="$prefix"
10319 prefix="$acl_final_prefix"
10320 acl_save_exec_prefix="$exec_prefix"
10321 exec_prefix="$acl_final_exec_prefix"
10322 eval x=\"$x\"
10323 exec_prefix="$acl_save_exec_prefix"
10324 prefix="$acl_save_prefix"
10325
10326 if test "X$x" = "X-L$found_dir"; then
10327 haveit=yes
10328 break
10329 fi
10330 done
10331 if test -z "$haveit"; then
10332 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10333 fi
10334 if test "$hardcode_minus_L" != no; then
10335 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10336 else
10337 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10338 fi
10339 fi
10340 fi
10341 fi
10342 else
10343 if test "X$found_a" != "X"; then
10344 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10345 else
10346 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10347 fi
10348 fi
10349 additional_includedir=
10350 case "$found_dir" in
10351 */lib | */lib/)
10352 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10353 additional_includedir="$basedir/include"
10354 ;;
10355 esac
10356 if test "X$additional_includedir" != "X"; then
10357 if test "X$additional_includedir" != "X/usr/include"; then
10358 haveit=
10359 if test "X$additional_includedir" = "X/usr/local/include"; then
10360 if test -n "$GCC"; then
10361 case $host_os in
10362 linux*) haveit=yes;;
10363 esac
10364 fi
10365 fi
10366 if test -z "$haveit"; then
10367 for x in $CPPFLAGS $INCIPT; do
10368
10369 acl_save_prefix="$prefix"
10370 prefix="$acl_final_prefix"
10371 acl_save_exec_prefix="$exec_prefix"
10372 exec_prefix="$acl_final_exec_prefix"
10373 eval x=\"$x\"
10374 exec_prefix="$acl_save_exec_prefix"
10375 prefix="$acl_save_prefix"
10376
10377 if test "X$x" = "X-I$additional_includedir"; then
10378 haveit=yes
10379 break
10380 fi
10381 done
10382 if test -z "$haveit"; then
10383 if test -d "$additional_includedir"; then
10384 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10385 fi
10386 fi
10387 fi
10388 fi
10389 fi
10390 if test -n "$found_la"; then
10391 save_libdir="$libdir"
10392 case "$found_la" in
10393 */* | *\\*) . "$found_la" ;;
10394 *) . "./$found_la" ;;
10395 esac
10396 libdir="$save_libdir"
10397 for dep in $dependency_libs; do
10398 case "$dep" in
10399 -L*)
10400 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10401 if test "X$additional_libdir" != "X/usr/lib"; then
10402 haveit=
10403 if test "X$additional_libdir" = "X/usr/local/lib"; then
10404 if test -n "$GCC"; then
10405 case $host_os in
10406 linux*) haveit=yes;;
10407 esac
10408 fi
10409 fi
10410 if test -z "$haveit"; then
10411 haveit=
10412 for x in $LDFLAGS $LIBIPT; do
10413
10414 acl_save_prefix="$prefix"
10415 prefix="$acl_final_prefix"
10416 acl_save_exec_prefix="$exec_prefix"
10417 exec_prefix="$acl_final_exec_prefix"
10418 eval x=\"$x\"
10419 exec_prefix="$acl_save_exec_prefix"
10420 prefix="$acl_save_prefix"
10421
10422 if test "X$x" = "X-L$additional_libdir"; then
10423 haveit=yes
10424 break
10425 fi
10426 done
10427 if test -z "$haveit"; then
10428 if test -d "$additional_libdir"; then
10429 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10430 fi
10431 fi
10432 haveit=
10433 for x in $LDFLAGS $LTLIBIPT; do
10434
10435 acl_save_prefix="$prefix"
10436 prefix="$acl_final_prefix"
10437 acl_save_exec_prefix="$exec_prefix"
10438 exec_prefix="$acl_final_exec_prefix"
10439 eval x=\"$x\"
10440 exec_prefix="$acl_save_exec_prefix"
10441 prefix="$acl_save_prefix"
10442
10443 if test "X$x" = "X-L$additional_libdir"; then
10444 haveit=yes
10445 break
10446 fi
10447 done
10448 if test -z "$haveit"; then
10449 if test -d "$additional_libdir"; then
10450 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10451 fi
10452 fi
10453 fi
10454 fi
10455 ;;
10456 -R*)
10457 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10458 if test "$enable_rpath" != no; then
10459 haveit=
10460 for x in $rpathdirs; do
10461 if test "X$x" = "X$dir"; then
10462 haveit=yes
10463 break
10464 fi
10465 done
10466 if test -z "$haveit"; then
10467 rpathdirs="$rpathdirs $dir"
10468 fi
10469 haveit=
10470 for x in $ltrpathdirs; do
10471 if test "X$x" = "X$dir"; then
10472 haveit=yes
10473 break
10474 fi
10475 done
10476 if test -z "$haveit"; then
10477 ltrpathdirs="$ltrpathdirs $dir"
10478 fi
10479 fi
10480 ;;
10481 -l*)
10482 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10483 ;;
10484 *.la)
10485 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10486 ;;
10487 *)
10488 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10489 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10490 ;;
10491 esac
10492 done
10493 fi
10494 else
10495 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10496 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10497 fi
10498 fi
10499 fi
10500 done
10501 done
10502 if test "X$rpathdirs" != "X"; then
10503 if test -n "$hardcode_libdir_separator"; then
10504 alldirs=
10505 for found_dir in $rpathdirs; do
10506 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10507 done
10508 acl_save_libdir="$libdir"
10509 libdir="$alldirs"
10510 eval flag=\"$hardcode_libdir_flag_spec\"
10511 libdir="$acl_save_libdir"
10512 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10513 else
10514 for found_dir in $rpathdirs; do
10515 acl_save_libdir="$libdir"
10516 libdir="$found_dir"
10517 eval flag=\"$hardcode_libdir_flag_spec\"
10518 libdir="$acl_save_libdir"
10519 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10520 done
10521 fi
10522 fi
10523 if test "X$ltrpathdirs" != "X"; then
10524 for found_dir in $ltrpathdirs; do
10525 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10526 done
10527 fi
10528
10529
10530 ac_save_CPPFLAGS="$CPPFLAGS"
10531
10532 for element in $INCIPT; do
10533 haveit=
10534 for x in $CPPFLAGS; do
10535
10536 acl_save_prefix="$prefix"
10537 prefix="$acl_final_prefix"
10538 acl_save_exec_prefix="$exec_prefix"
10539 exec_prefix="$acl_final_exec_prefix"
10540 eval x=\"$x\"
10541 exec_prefix="$acl_save_exec_prefix"
10542 prefix="$acl_save_prefix"
10543
10544 if test "X$x" = "X$element"; then
10545 haveit=yes
10546 break
10547 fi
10548 done
10549 if test -z "$haveit"; then
10550 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10551 fi
10552 done
10553
10554
10555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10556$as_echo_n "checking for libipt... " >&6; }
10557if test "${ac_cv_libipt+set}" = set; then :
10558 $as_echo_n "(cached) " >&6
10559else
10560
10561 ac_save_LIBS="$LIBS"
10562 LIBS="$LIBS $LIBIPT"
10563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10564/* end confdefs.h. */
10565#include "intel-pt.h"
10566int
10567main ()
10568{
10569pt_insn_alloc_decoder (0);
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574if ac_fn_c_try_link "$LINENO"; then :
10575 ac_cv_libipt=yes
10576else
10577 ac_cv_libipt=no
10578fi
10579rm -f core conftest.err conftest.$ac_objext \
10580 conftest$ac_exeext conftest.$ac_ext
10581 LIBS="$ac_save_LIBS"
10582
10583fi
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10585$as_echo "$ac_cv_libipt" >&6; }
10586 if test "$ac_cv_libipt" = yes; then
10587 HAVE_LIBIPT=yes
10588
10589$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10590
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10592$as_echo_n "checking how to link with libipt... " >&6; }
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10594$as_echo "$LIBIPT" >&6; }
10595 else
10596 HAVE_LIBIPT=no
10597 CPPFLAGS="$ac_save_CPPFLAGS"
10598 LIBIPT=
10599 LTLIBIPT=
10600 fi
10601
10602
10603
10604
10605
10606
10607 if test "$HAVE_LIBIPT" != yes; then
10608 if test "$with_intel_pt" = yes; then
10609 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10610 else
10611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10612$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10613 fi
10614 fi
10615fi
10616
81ecdfbb
RW
10617# ------------------------- #
10618# Checks for header files. #
10619# ------------------------- #
c890192f 10620
81ecdfbb
RW
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10622$as_echo_n "checking for ANSI C header files... " >&6; }
10623if test "${ac_cv_header_stdc+set}" = set; then :
10624 $as_echo_n "(cached) " >&6
bec39cab 10625else
81ecdfbb 10626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10627/* end confdefs.h. */
81ecdfbb
RW
10628#include <stdlib.h>
10629#include <stdarg.h>
10630#include <string.h>
10631#include <float.h>
10632
a9322a30
TT
10633int
10634main ()
10635{
a9322a30
TT
10636
10637 ;
10638 return 0;
10639}
bec39cab 10640_ACEOF
81ecdfbb
RW
10641if ac_fn_c_try_compile "$LINENO"; then :
10642 ac_cv_header_stdc=yes
bec39cab 10643else
81ecdfbb 10644 ac_cv_header_stdc=no
a9322a30 10645fi
81ecdfbb 10646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10647
81ecdfbb
RW
10648if test $ac_cv_header_stdc = yes; then
10649 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651/* end confdefs.h. */
10652#include <string.h>
bec39cab 10653
81ecdfbb
RW
10654_ACEOF
10655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10656 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10657
bec39cab 10658else
81ecdfbb
RW
10659 ac_cv_header_stdc=no
10660fi
10661rm -f conftest*
10662
10663fi
10664
10665if test $ac_cv_header_stdc = yes; then
10666 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668/* end confdefs.h. */
10669#include <stdlib.h>
10670
bec39cab 10671_ACEOF
81ecdfbb
RW
10672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10673 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10674
81ecdfbb
RW
10675else
10676 ac_cv_header_stdc=no
10677fi
10678rm -f conftest*
bec39cab 10679
bec39cab 10680fi
81ecdfbb
RW
10681
10682if test $ac_cv_header_stdc = yes; then
10683 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10684 if test "$cross_compiling" = yes; then :
10685 :
bec39cab 10686else
81ecdfbb 10687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10688/* end confdefs.h. */
81ecdfbb
RW
10689#include <ctype.h>
10690#include <stdlib.h>
10691#if ((' ' & 0x0FF) == 0x020)
10692# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10693# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10694#else
10695# define ISLOWER(c) \
10696 (('a' <= (c) && (c) <= 'i') \
10697 || ('j' <= (c) && (c) <= 'r') \
10698 || ('s' <= (c) && (c) <= 'z'))
10699# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10700#endif
10701
10702#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10703int
10704main ()
10705{
81ecdfbb
RW
10706 int i;
10707 for (i = 0; i < 256; i++)
10708 if (XOR (islower (i), ISLOWER (i))
10709 || toupper (i) != TOUPPER (i))
10710 return 2;
a9322a30
TT
10711 return 0;
10712}
bec39cab 10713_ACEOF
81ecdfbb
RW
10714if ac_fn_c_try_run "$LINENO"; then :
10715
bec39cab 10716else
81ecdfbb
RW
10717 ac_cv_header_stdc=no
10718fi
10719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10720 conftest.$ac_objext conftest.beam conftest.$ac_ext
10721fi
bec39cab 10722
bec39cab 10723fi
a9322a30 10724fi
81ecdfbb
RW
10725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10726$as_echo "$ac_cv_header_stdc" >&6; }
10727if test $ac_cv_header_stdc = yes; then
bec39cab 10728
81ecdfbb 10729$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10730
81ecdfbb 10731fi
bec39cab 10732
81ecdfbb 10733# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10734for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10735 thread_db.h \
0080a2f6 10736 sys/fault.h \
81ecdfbb
RW
10737 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10738 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10739 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10740 termios.h termio.h \
3447c057 10741 sgtty.h elf_hp.h \
9467110b 10742 dlfcn.h
81ecdfbb
RW
10743do :
10744 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10745ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10746eval as_val=\$$as_ac_Header
10747 if test "x$as_val" = x""yes; then :
bec39cab 10748 cat >>confdefs.h <<_ACEOF
81ecdfbb 10749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10750_ACEOF
c906108c 10751
bec39cab 10752fi
81ecdfbb
RW
10753
10754done
10755
81ecdfbb
RW
10756for ac_header in sys/proc.h
10757do :
10758 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10759# include <sys/param.h>
10760#endif
c906108c 10761
81ecdfbb
RW
10762"
10763if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10764 cat >>confdefs.h <<_ACEOF
81ecdfbb 10765#define HAVE_SYS_PROC_H 1
bec39cab 10766_ACEOF
5ee754fc 10767
bec39cab 10768fi
81ecdfbb
RW
10769
10770done
10771
10772for ac_header in sys/user.h
10773do :
10774 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10775# include <sys/param.h>
a9322a30
TT
10776#endif
10777
81ecdfbb
RW
10778"
10779if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10780 cat >>confdefs.h <<_ACEOF
10781#define HAVE_SYS_USER_H 1
bec39cab 10782_ACEOF
bec39cab 10783
a9322a30 10784fi
bec39cab 10785
81ecdfbb 10786done
5ee754fc 10787
5ee754fc 10788
81ecdfbb
RW
10789# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10790# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10791# think that we don't have <curses.h> if we're using GCC.
10792case $host_os in
10793 solaris2.[789])
10794 if test "$GCC" = yes; then
10795
10796$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10797
10798 fi ;;
10799esac
10800for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10801do :
10802 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10803ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10804eval as_val=\$$as_ac_Header
10805 if test "x$as_val" = x""yes; then :
bec39cab 10806 cat >>confdefs.h <<_ACEOF
81ecdfbb 10807#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10808_ACEOF
5ee754fc
MK
10809
10810fi
10811
81ecdfbb 10812done
bec39cab 10813
81ecdfbb
RW
10814for ac_header in term.h
10815do :
10816 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10817# include <curses.h>
10818#endif
bec39cab 10819
81ecdfbb
RW
10820"
10821if test "x$ac_cv_header_term_h" = x""yes; then :
10822 cat >>confdefs.h <<_ACEOF
10823#define HAVE_TERM_H 1
a8111142 10824_ACEOF
a8111142 10825
a8111142 10826fi
a8111142 10827
81ecdfbb 10828done
a8111142
TT
10829
10830
81ecdfbb
RW
10831# ------------------------- #
10832# Checks for declarations. #
10833# ------------------------- #
a9322a30 10834
07697489
PA
10835
10836 # Check for presence and size of long long.
10837 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10838if test "x$ac_cv_type_long_long" = x""yes; then :
10839
10840cat >>confdefs.h <<_ACEOF
10841#define HAVE_LONG_LONG 1
10842_ACEOF
10843
10844# The cast to long int works around a bug in the HP C Compiler
10845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10847# This bug is HP SR number 8606223364.
10848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10849$as_echo_n "checking size of long long... " >&6; }
10850if test "${ac_cv_sizeof_long_long+set}" = set; then :
10851 $as_echo_n "(cached) " >&6
10852else
10853 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10854
10855else
10856 if test "$ac_cv_type_long_long" = yes; then
10857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10859{ as_fn_set_status 77
10860as_fn_error "cannot compute sizeof (long long)
10861See \`config.log' for more details." "$LINENO" 5; }; }
10862 else
10863 ac_cv_sizeof_long_long=0
10864 fi
10865fi
10866
10867fi
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10869$as_echo "$ac_cv_sizeof_long_long" >&6; }
10870
10871
10872
10873cat >>confdefs.h <<_ACEOF
10874#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10875_ACEOF
10876
10877
10878fi
10879
10880
10881 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10882if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10883 ac_have_decl=1
10884else
10885 ac_have_decl=0
10886fi
10887
10888cat >>confdefs.h <<_ACEOF
10889#define HAVE_DECL_BASENAME $ac_have_decl
10890_ACEOF
10891ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10892if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10893 ac_have_decl=1
10894else
10895 ac_have_decl=0
10896fi
10897
10898cat >>confdefs.h <<_ACEOF
10899#define HAVE_DECL_FFS $ac_have_decl
10900_ACEOF
10901ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10902if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10903 ac_have_decl=1
10904else
10905 ac_have_decl=0
10906fi
10907
10908cat >>confdefs.h <<_ACEOF
10909#define HAVE_DECL_ASPRINTF $ac_have_decl
10910_ACEOF
10911ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10912if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10913 ac_have_decl=1
10914else
10915 ac_have_decl=0
10916fi
10917
10918cat >>confdefs.h <<_ACEOF
10919#define HAVE_DECL_VASPRINTF $ac_have_decl
10920_ACEOF
10921ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10922if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10923 ac_have_decl=1
10924else
10925 ac_have_decl=0
10926fi
10927
10928cat >>confdefs.h <<_ACEOF
10929#define HAVE_DECL_SNPRINTF $ac_have_decl
10930_ACEOF
10931ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10932if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10933 ac_have_decl=1
10934else
10935 ac_have_decl=0
10936fi
10937
10938cat >>confdefs.h <<_ACEOF
10939#define HAVE_DECL_VSNPRINTF $ac_have_decl
10940_ACEOF
10941
10942 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10943if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10944 ac_have_decl=1
10945else
10946 ac_have_decl=0
10947fi
10948
10949cat >>confdefs.h <<_ACEOF
10950#define HAVE_DECL_STRTOL $ac_have_decl
10951_ACEOF
10952ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10953if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10954 ac_have_decl=1
10955else
10956 ac_have_decl=0
10957fi
10958
10959cat >>confdefs.h <<_ACEOF
10960#define HAVE_DECL_STRTOUL $ac_have_decl
10961_ACEOF
10962ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10963if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10964 ac_have_decl=1
10965else
10966 ac_have_decl=0
10967fi
10968
10969cat >>confdefs.h <<_ACEOF
10970#define HAVE_DECL_STRTOLL $ac_have_decl
10971_ACEOF
10972ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10973if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10974 ac_have_decl=1
10975else
10976 ac_have_decl=0
10977fi
10978
10979cat >>confdefs.h <<_ACEOF
10980#define HAVE_DECL_STRTOULL $ac_have_decl
10981_ACEOF
10982
10983 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10984if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10985 ac_have_decl=1
10986else
10987 ac_have_decl=0
10988fi
10989
10990cat >>confdefs.h <<_ACEOF
10991#define HAVE_DECL_STRVERSCMP $ac_have_decl
10992_ACEOF
10993
10994
10995
81ecdfbb
RW
10996ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10997if test "x$ac_cv_have_decl_free" = x""yes; then :
10998 ac_have_decl=1
bec39cab 10999else
81ecdfbb
RW
11000 ac_have_decl=0
11001fi
11002
11003cat >>confdefs.h <<_ACEOF
11004#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11005_ACEOF
81ecdfbb
RW
11006ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11007if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11008 ac_have_decl=1
11009else
11010 ac_have_decl=0
11011fi
11012
11013cat >>confdefs.h <<_ACEOF
11014#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11015_ACEOF
81ecdfbb
RW
11016ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11017if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11018 ac_have_decl=1
bec39cab 11019else
81ecdfbb
RW
11020 ac_have_decl=0
11021fi
bec39cab 11022
81ecdfbb
RW
11023cat >>confdefs.h <<_ACEOF
11024#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11025_ACEOF
81ecdfbb
RW
11026ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11027if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11028 ac_have_decl=1
11029else
11030 ac_have_decl=0
5ee754fc 11031fi
81ecdfbb
RW
11032
11033cat >>confdefs.h <<_ACEOF
11034#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11035_ACEOF
5ee754fc 11036
5ee754fc 11037
81ecdfbb
RW
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11039$as_echo_n "checking for LC_MESSAGES... " >&6; }
11040if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11041 $as_echo_n "(cached) " >&6
bec39cab 11042else
81ecdfbb 11043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11044/* end confdefs.h. */
81ecdfbb 11045#include <locale.h>
a9322a30
TT
11046int
11047main ()
11048{
81ecdfbb 11049return LC_MESSAGES
a9322a30
TT
11050 ;
11051 return 0;
11052}
bec39cab 11053_ACEOF
81ecdfbb
RW
11054if ac_fn_c_try_link "$LINENO"; then :
11055 am_cv_val_LC_MESSAGES=yes
bec39cab 11056else
81ecdfbb
RW
11057 am_cv_val_LC_MESSAGES=no
11058fi
11059rm -f core conftest.err conftest.$ac_objext \
11060 conftest$ac_exeext conftest.$ac_ext
11061fi
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11063$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11064 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11065
81ecdfbb
RW
11066$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11067
11068 fi
11069
11070
11071# ----------------------- #
11072# Checks for structures. #
11073# ----------------------- #
11074
11075ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11076if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11077
11078cat >>confdefs.h <<_ACEOF
11079#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11080_ACEOF
7eb368b3 11081
81ecdfbb 11082
7eb368b3 11083fi
81ecdfbb
RW
11084ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11085if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11086
a9322a30
TT
11087cat >>confdefs.h <<_ACEOF
11088#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11089_ACEOF
11090
a9322a30 11091
7eb368b3
NR
11092fi
11093
7eb368b3 11094
a9322a30
TT
11095# ------------------ #
11096# Checks for types. #
11097# ------------------ #
7eb368b3 11098
81ecdfbb 11099ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11100#include <sys/socket.h>
11101
81ecdfbb
RW
11102"
11103if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11104
a9322a30
TT
11105cat >>confdefs.h <<_ACEOF
11106#define HAVE_SOCKLEN_T 1
11107_ACEOF
11108
11109
11110fi
11111
11112
11113# ------------------------------------- #
11114# Checks for compiler characteristics. #
11115# ------------------------------------- #
11116
81ecdfbb
RW
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11118$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11119if test "${ac_cv_c_const+set}" = set; then :
11120 $as_echo_n "(cached) " >&6
a9322a30 11121else
81ecdfbb 11122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11123/* end confdefs.h. */
a9322a30
TT
11124
11125int
11126main ()
11127{
11128/* FIXME: Include the comments suggested by Paul. */
11129#ifndef __cplusplus
11130 /* Ultrix mips cc rejects this. */
11131 typedef int charset[2];
81ecdfbb 11132 const charset cs;
a9322a30 11133 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11134 char const *const *pcpcc;
11135 char **ppc;
a9322a30
TT
11136 /* NEC SVR4.0.2 mips cc rejects this. */
11137 struct point {int x, y;};
11138 static struct point const zero = {0,0};
11139 /* AIX XL C 1.02.0.0 rejects this.
11140 It does not let you subtract one const X* pointer from another in
11141 an arm of an if-expression whose if-part is not a constant
11142 expression */
11143 const char *g = "string";
81ecdfbb 11144 pcpcc = &g + (g ? g-g : 0);
a9322a30 11145 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11146 ++pcpcc;
11147 ppc = (char**) pcpcc;
11148 pcpcc = (char const *const *) ppc;
a9322a30
TT
11149 { /* SCO 3.2v4 cc rejects this. */
11150 char *t;
11151 char const *s = 0 ? (char *) 0 : (char const *) 0;
11152
11153 *t++ = 0;
81ecdfbb 11154 if (s) return 0;
a9322a30
TT
11155 }
11156 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11157 int x[] = {25, 17};
11158 const int *foo = &x[0];
11159 ++foo;
11160 }
11161 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11162 typedef const int *iptr;
11163 iptr p = 0;
11164 ++p;
11165 }
11166 { /* AIX XL C 1.02.0.0 rejects this saying
11167 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11168 struct s { int j; const int *ap[3]; };
11169 struct s *b; b->j = 5;
11170 }
11171 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11172 const int foo = 10;
81ecdfbb 11173 if (!foo) return 0;
a9322a30 11174 }
81ecdfbb 11175 return !cs[0] && !zero.x;
a9322a30
TT
11176#endif
11177
11178 ;
11179 return 0;
11180}
bec39cab 11181_ACEOF
81ecdfbb 11182if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11183 ac_cv_c_const=yes
5ee754fc 11184else
81ecdfbb 11185 ac_cv_c_const=no
5ee754fc 11186fi
81ecdfbb 11187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11188fi
81ecdfbb
RW
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11190$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11191if test $ac_cv_c_const = no; then
bec39cab 11192
81ecdfbb 11193$as_echo "#define const /**/" >>confdefs.h
bec39cab 11194
5ee754fc 11195fi
bec39cab 11196
81ecdfbb
RW
11197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11198$as_echo_n "checking for inline... " >&6; }
11199if test "${ac_cv_c_inline+set}" = set; then :
11200 $as_echo_n "(cached) " >&6
bec39cab 11201else
a9322a30
TT
11202 ac_cv_c_inline=no
11203for ac_kw in inline __inline__ __inline; do
81ecdfbb 11204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11205/* end confdefs.h. */
a9322a30
TT
11206#ifndef __cplusplus
11207typedef int foo_t;
11208static $ac_kw foo_t static_foo () {return 0; }
11209$ac_kw foo_t foo () {return 0; }
11210#endif
11211
bec39cab 11212_ACEOF
81ecdfbb
RW
11213if ac_fn_c_try_compile "$LINENO"; then :
11214 ac_cv_c_inline=$ac_kw
bec39cab 11215fi
81ecdfbb
RW
11216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11217 test "$ac_cv_c_inline" != no && break
a9322a30 11218done
bec39cab 11219
5ee754fc 11220fi
81ecdfbb
RW
11221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11222$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11223
a9322a30
TT
11224case $ac_cv_c_inline in
11225 inline | yes) ;;
11226 *)
11227 case $ac_cv_c_inline in
11228 no) ac_val=;;
11229 *) ac_val=$ac_cv_c_inline;;
11230 esac
11231 cat >>confdefs.h <<_ACEOF
11232#ifndef __cplusplus
11233#define inline $ac_val
11234#endif
11235_ACEOF
bec39cab
AC
11236 ;;
11237esac
bec39cab 11238
81ecdfbb
RW
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11240$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11241if test "${ac_cv_c_bigendian+set}" = set; then :
11242 $as_echo_n "(cached) " >&6
bec39cab 11243else
81ecdfbb
RW
11244 ac_cv_c_bigendian=unknown
11245 # See if we're dealing with a universal compiler.
11246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11247/* end confdefs.h. */
11248#ifndef __APPLE_CC__
11249 not a universal capable compiler
11250 #endif
11251 typedef int dummy;
11252
11253_ACEOF
11254if ac_fn_c_try_compile "$LINENO"; then :
11255
11256 # Check for potential -arch flags. It is not universal unless
11257 # there are at least two -arch flags with different values.
11258 ac_arch=
11259 ac_prev=
11260 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11261 if test -n "$ac_prev"; then
11262 case $ac_word in
11263 i?86 | x86_64 | ppc | ppc64)
11264 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11265 ac_arch=$ac_word
11266 else
11267 ac_cv_c_bigendian=universal
11268 break
11269 fi
11270 ;;
11271 esac
11272 ac_prev=
11273 elif test "x$ac_word" = "x-arch"; then
11274 ac_prev=arch
11275 fi
11276 done
11277fi
11278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11279 if test $ac_cv_c_bigendian = unknown; then
11280 # See if sys/param.h defines the BYTE_ORDER macro.
11281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11282/* end confdefs.h. */
a9322a30 11283#include <sys/types.h>
81ecdfbb 11284 #include <sys/param.h>
a9322a30
TT
11285
11286int
11287main ()
11288{
81ecdfbb
RW
11289#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11290 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11291 && LITTLE_ENDIAN)
11292 bogus endian macros
11293 #endif
a9322a30
TT
11294
11295 ;
11296 return 0;
11297}
bec39cab 11298_ACEOF
81ecdfbb 11299if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11300 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11302/* end confdefs.h. */
a9322a30 11303#include <sys/types.h>
81ecdfbb 11304 #include <sys/param.h>
a9322a30
TT
11305
11306int
11307main ()
11308{
11309#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11310 not big endian
11311 #endif
a9322a30
TT
11312
11313 ;
11314 return 0;
11315}
bec39cab 11316_ACEOF
81ecdfbb 11317if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11318 ac_cv_c_bigendian=yes
5ee754fc 11319else
81ecdfbb 11320 ac_cv_c_bigendian=no
5ee754fc 11321fi
81ecdfbb
RW
11322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11323fi
11324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11325 fi
11326 if test $ac_cv_c_bigendian = unknown; then
11327 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11329/* end confdefs.h. */
11330#include <limits.h>
bec39cab 11331
81ecdfbb
RW
11332int
11333main ()
11334{
11335#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11336 bogus endian macros
11337 #endif
11338
11339 ;
11340 return 0;
11341}
7eb368b3 11342_ACEOF
81ecdfbb
RW
11343if ac_fn_c_try_compile "$LINENO"; then :
11344 # It does; now see whether it defined to _BIG_ENDIAN or not.
11345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11346/* end confdefs.h. */
81ecdfbb
RW
11347#include <limits.h>
11348
7eb368b3
NR
11349int
11350main ()
11351{
81ecdfbb
RW
11352#ifndef _BIG_ENDIAN
11353 not big endian
11354 #endif
11355
7eb368b3
NR
11356 ;
11357 return 0;
11358}
11359_ACEOF
81ecdfbb 11360if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11361 ac_cv_c_bigendian=yes
81ecdfbb
RW
11362else
11363 ac_cv_c_bigendian=no
a9322a30 11364fi
81ecdfbb 11365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11366fi
81ecdfbb
RW
11367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11368 fi
11369 if test $ac_cv_c_bigendian = unknown; then
11370 # Compile a test program.
11371 if test "$cross_compiling" = yes; then :
11372 # Try to guess by grepping values from an object file.
11373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374/* end confdefs.h. */
11375short int ascii_mm[] =
11376 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11377 short int ascii_ii[] =
11378 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11379 int use_ascii (int i) {
11380 return ascii_mm[i] + ascii_ii[i];
11381 }
11382 short int ebcdic_ii[] =
11383 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11384 short int ebcdic_mm[] =
11385 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11386 int use_ebcdic (int i) {
11387 return ebcdic_mm[i] + ebcdic_ii[i];
11388 }
11389 extern int foo;
7eb368b3 11390
81ecdfbb
RW
11391int
11392main ()
11393{
11394return use_ascii (foo) == use_ebcdic (foo);
11395 ;
11396 return 0;
11397}
11398_ACEOF
11399if ac_fn_c_try_compile "$LINENO"; then :
11400 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11401 ac_cv_c_bigendian=yes
11402 fi
11403 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11404 if test "$ac_cv_c_bigendian" = unknown; then
11405 ac_cv_c_bigendian=no
11406 else
11407 # finding both strings is unlikely to happen, but who knows?
11408 ac_cv_c_bigendian=unknown
11409 fi
11410 fi
7eb368b3 11411fi
81ecdfbb 11412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11413else
81ecdfbb 11414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11415/* end confdefs.h. */
81ecdfbb 11416$ac_includes_default
d3ea6809
MM
11417int
11418main ()
11419{
81ecdfbb
RW
11420
11421 /* Are we little or big endian? From Harbison&Steele. */
11422 union
11423 {
11424 long int l;
11425 char c[sizeof (long int)];
11426 } u;
11427 u.l = 1;
11428 return u.c[sizeof (long int) - 1] == 1;
11429
11430 ;
11431 return 0;
d3ea6809
MM
11432}
11433_ACEOF
81ecdfbb 11434if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11435 ac_cv_c_bigendian=no
d3ea6809 11436else
81ecdfbb 11437 ac_cv_c_bigendian=yes
d3ea6809 11438fi
81ecdfbb
RW
11439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11440 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11441fi
a9322a30 11442
81ecdfbb
RW
11443 fi
11444fi
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11446$as_echo "$ac_cv_c_bigendian" >&6; }
11447 case $ac_cv_c_bigendian in #(
11448 yes)
11449 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11450;; #(
11451 no)
11452 ;; #(
11453 universal)
11454
11455$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11456
11457 ;; #(
11458 *)
11459 as_fn_error "unknown endianness
11460 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11461 esac
d3ea6809
MM
11462
11463
a9322a30
TT
11464# ------------------------------ #
11465# Checks for library functions. #
11466# ------------------------------ #
d3ea6809 11467
a9322a30 11468for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11469do :
11470 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11471ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11472eval as_val=\$$as_ac_Header
11473 if test "x$as_val" = x""yes; then :
bec39cab 11474 cat >>confdefs.h <<_ACEOF
81ecdfbb 11475#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11476_ACEOF
b757528f 11477
b757528f 11478fi
bec39cab 11479
a9322a30 11480done
a3828db0 11481
a9322a30 11482for ac_func in getpagesize
81ecdfbb
RW
11483do :
11484 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11485if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11486 cat >>confdefs.h <<_ACEOF
81ecdfbb 11487#define HAVE_GETPAGESIZE 1
bec39cab 11488_ACEOF
bcb3dc3d 11489
bcb3dc3d
MK
11490fi
11491done
11492
81ecdfbb
RW
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11494$as_echo_n "checking for working mmap... " >&6; }
11495if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11496 $as_echo_n "(cached) " >&6
a9322a30 11497else
81ecdfbb 11498 if test "$cross_compiling" = yes; then :
a9322a30 11499 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11500else
81ecdfbb 11501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11502/* end confdefs.h. */
a9322a30
TT
11503$ac_includes_default
11504/* malloc might have been renamed as rpl_malloc. */
11505#undef malloc
bec39cab 11506
a9322a30
TT
11507/* Thanks to Mike Haertel and Jim Avera for this test.
11508 Here is a matrix of mmap possibilities:
11509 mmap private not fixed
11510 mmap private fixed at somewhere currently unmapped
11511 mmap private fixed at somewhere already mapped
11512 mmap shared not fixed
11513 mmap shared fixed at somewhere currently unmapped
11514 mmap shared fixed at somewhere already mapped
11515 For private mappings, we should verify that changes cannot be read()
11516 back from the file, nor mmap's back from the file at a different
11517 address. (There have been systems where private was not correctly
11518 implemented like the infamous i386 svr4.0, and systems where the
11519 VM page cache was not coherent with the file system buffer cache
11520 like early versions of FreeBSD and possibly contemporary NetBSD.)
11521 For shared mappings, we should conversely verify that changes get
11522 propagated back to all the places they're supposed to be.
bec39cab 11523
a9322a30
TT
11524 Grep wants private fixed already mapped.
11525 The main things grep needs to know about mmap are:
11526 * does it exist and is it safe to write into the mmap'd area
11527 * how to use it (BSD variants) */
8b9cf735 11528
a9322a30
TT
11529#include <fcntl.h>
11530#include <sys/mman.h>
8b9cf735 11531
81ecdfbb 11532#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11533char *malloc ();
a3828db0
MK
11534#endif
11535
a9322a30 11536/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11537#ifndef HAVE_GETPAGESIZE
a9322a30 11538/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11539# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11540# define HAVE_SYS_PARAM_H 1
11541# endif
11542
11543# ifdef _SC_PAGESIZE
11544# define getpagesize() sysconf(_SC_PAGESIZE)
11545# else /* no _SC_PAGESIZE */
81ecdfbb 11546# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11547# include <sys/param.h>
11548# ifdef EXEC_PAGESIZE
11549# define getpagesize() EXEC_PAGESIZE
11550# else /* no EXEC_PAGESIZE */
11551# ifdef NBPG
11552# define getpagesize() NBPG * CLSIZE
11553# ifndef CLSIZE
11554# define CLSIZE 1
11555# endif /* no CLSIZE */
11556# else /* no NBPG */
11557# ifdef NBPC
11558# define getpagesize() NBPC
11559# else /* no NBPC */
11560# ifdef PAGESIZE
11561# define getpagesize() PAGESIZE
11562# endif /* PAGESIZE */
11563# endif /* no NBPC */
11564# endif /* no NBPG */
11565# endif /* no EXEC_PAGESIZE */
11566# else /* no HAVE_SYS_PARAM_H */
11567# define getpagesize() 8192 /* punt totally */
11568# endif /* no HAVE_SYS_PARAM_H */
11569# endif /* no _SC_PAGESIZE */
11570
11571#endif /* no HAVE_GETPAGESIZE */
11572
bec39cab
AC
11573int
11574main ()
11575{
a9322a30
TT
11576 char *data, *data2, *data3;
11577 int i, pagesize;
11578 int fd;
11579
11580 pagesize = getpagesize ();
11581
11582 /* First, make a file with some known garbage in it. */
11583 data = (char *) malloc (pagesize);
11584 if (!data)
81ecdfbb 11585 return 1;
a9322a30
TT
11586 for (i = 0; i < pagesize; ++i)
11587 *(data + i) = rand ();
11588 umask (0);
11589 fd = creat ("conftest.mmap", 0600);
11590 if (fd < 0)
81ecdfbb 11591 return 1;
a9322a30 11592 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11593 return 1;
a9322a30
TT
11594 close (fd);
11595
11596 /* Next, try to mmap the file at a fixed address which already has
11597 something else allocated at it. If we can, also make sure that
11598 we see the same garbage. */
11599 fd = open ("conftest.mmap", O_RDWR);
11600 if (fd < 0)
81ecdfbb 11601 return 1;
a9322a30
TT
11602 data2 = (char *) malloc (2 * pagesize);
11603 if (!data2)
81ecdfbb
RW
11604 return 1;
11605 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11606 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11607 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11608 return 1;
a9322a30
TT
11609 for (i = 0; i < pagesize; ++i)
11610 if (*(data + i) != *(data2 + i))
81ecdfbb 11611 return 1;
a9322a30
TT
11612
11613 /* Finally, make sure that changes to the mapped area do not
11614 percolate back to the file as seen by read(). (This is a bug on
11615 some variants of i386 svr4.0.) */
11616 for (i = 0; i < pagesize; ++i)
11617 *(data2 + i) = *(data2 + i) + 1;
11618 data3 = (char *) malloc (pagesize);
11619 if (!data3)
81ecdfbb 11620 return 1;
a9322a30 11621 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11622 return 1;
a9322a30
TT
11623 for (i = 0; i < pagesize; ++i)
11624 if (*(data + i) != *(data3 + i))
81ecdfbb 11625 return 1;
a9322a30 11626 close (fd);
81ecdfbb 11627 return 0;
bec39cab
AC
11628}
11629_ACEOF
81ecdfbb 11630if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11631 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11632else
81ecdfbb 11633 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11634fi
81ecdfbb
RW
11635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11636 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11637fi
81ecdfbb 11638
a9322a30 11639fi
81ecdfbb
RW
11640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11641$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11642if test $ac_cv_func_mmap_fixed_mapped = yes; then
11643
81ecdfbb 11644$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11645
086ec9eb 11646fi
a9322a30 11647rm -f conftest.mmap
a3828db0 11648
81ecdfbb
RW
11649ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11650if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11651
a9322a30
TT
11652else
11653
11654cat >>confdefs.h <<_ACEOF
11655#define pid_t int
bec39cab 11656_ACEOF
086ec9eb
MK
11657
11658fi
11659
81ecdfbb
RW
11660for ac_header in vfork.h
11661do :
11662 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11663if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11664 cat >>confdefs.h <<_ACEOF
81ecdfbb 11665#define HAVE_VFORK_H 1
bec39cab 11666_ACEOF
c906108c
SS
11667
11668fi
a9322a30 11669
a3828db0 11670done
c906108c 11671
a9322a30 11672for ac_func in fork vfork
81ecdfbb
RW
11673do :
11674 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11675ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11676eval as_val=\$$as_ac_var
11677 if test "x$as_val" = x""yes; then :
a3828db0 11678 cat >>confdefs.h <<_ACEOF
81ecdfbb 11679#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11680_ACEOF
b83266a0 11681
97bf5e38 11682fi
a3828db0 11683done
b83266a0 11684
a9322a30 11685if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11687$as_echo_n "checking for working fork... " >&6; }
11688if test "${ac_cv_func_fork_works+set}" = set; then :
11689 $as_echo_n "(cached) " >&6
a9322a30 11690else
81ecdfbb 11691 if test "$cross_compiling" = yes; then :
a9322a30
TT
11692 ac_cv_func_fork_works=cross
11693else
81ecdfbb
RW
11694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11695/* end confdefs.h. */
11696$ac_includes_default
11697int
11698main ()
11699{
11700
11701 /* By Ruediger Kuhlmann. */
11702 return fork () < 0;
11703
11704 ;
11705 return 0;
11706}
a9322a30 11707_ACEOF
81ecdfbb 11708if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11709 ac_cv_func_fork_works=yes
11710else
81ecdfbb 11711 ac_cv_func_fork_works=no
a9322a30 11712fi
81ecdfbb
RW
11713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11714 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11715fi
81ecdfbb 11716
a9322a30 11717fi
81ecdfbb
RW
11718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11719$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11720
11721else
11722 ac_cv_func_fork_works=$ac_cv_func_fork
11723fi
11724if test "x$ac_cv_func_fork_works" = xcross; then
11725 case $host in
11726 *-*-amigaos* | *-*-msdosdjgpp*)
11727 # Override, as these systems have only a dummy fork() stub
11728 ac_cv_func_fork_works=no
11729 ;;
11730 *)
11731 ac_cv_func_fork_works=yes
11732 ;;
11733 esac
81ecdfbb
RW
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11735$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11736fi
11737ac_cv_func_vfork_works=$ac_cv_func_vfork
11738if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11740$as_echo_n "checking for working vfork... " >&6; }
11741if test "${ac_cv_func_vfork_works+set}" = set; then :
11742 $as_echo_n "(cached) " >&6
a9322a30 11743else
81ecdfbb 11744 if test "$cross_compiling" = yes; then :
a9322a30
TT
11745 ac_cv_func_vfork_works=cross
11746else
81ecdfbb 11747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11748/* end confdefs.h. */
11749/* Thanks to Paul Eggert for this test. */
81ecdfbb 11750$ac_includes_default
a9322a30 11751#include <sys/wait.h>
81ecdfbb 11752#ifdef HAVE_VFORK_H
a9322a30
TT
11753# include <vfork.h>
11754#endif
11755/* On some sparc systems, changes by the child to local and incoming
11756 argument registers are propagated back to the parent. The compiler
11757 is told about this with #include <vfork.h>, but some compilers
11758 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11759 static variable whose address is put into a register that is
11760 clobbered by the vfork. */
11761static void
11762#ifdef __cplusplus
11763sparc_address_test (int arg)
11764# else
11765sparc_address_test (arg) int arg;
11766#endif
11767{
11768 static pid_t child;
11769 if (!child) {
11770 child = vfork ();
11771 if (child < 0) {
11772 perror ("vfork");
11773 _exit(2);
11774 }
11775 if (!child) {
11776 arg = getpid();
11777 write(-1, "", 0);
11778 _exit (arg);
11779 }
11780 }
11781}
11782
11783int
11784main ()
11785{
11786 pid_t parent = getpid ();
11787 pid_t child;
11788
11789 sparc_address_test (0);
11790
11791 child = vfork ();
11792
11793 if (child == 0) {
11794 /* Here is another test for sparc vfork register problems. This
11795 test uses lots of local variables, at least as many local
11796 variables as main has allocated so far including compiler
11797 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11798 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11799 reuse the register of parent for one of the local variables,
11800 since it will think that parent can't possibly be used any more
11801 in this routine. Assigning to the local variable will thus
11802 munge parent in the parent process. */
11803 pid_t
11804 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11805 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11806 /* Convince the compiler that p..p7 are live; otherwise, it might
11807 use the same hardware register for all 8 local variables. */
11808 if (p != p1 || p != p2 || p != p3 || p != p4
11809 || p != p5 || p != p6 || p != p7)
11810 _exit(1);
11811
11812 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11813 from child file descriptors. If the child closes a descriptor
11814 before it execs or exits, this munges the parent's descriptor
11815 as well. Test for this by closing stdout in the child. */
11816 _exit(close(fileno(stdout)) != 0);
11817 } else {
11818 int status;
11819 struct stat st;
11820
11821 while (wait(&status) != child)
11822 ;
81ecdfbb 11823 return (
a9322a30
TT
11824 /* Was there some problem with vforking? */
11825 child < 0
11826
11827 /* Did the child fail? (This shouldn't happen.) */
11828 || status
11829
11830 /* Did the vfork/compiler bug occur? */
11831 || parent != getpid()
11832
11833 /* Did the file descriptor bug occur? */
11834 || fstat(fileno(stdout), &st) != 0
11835 );
11836 }
11837}
11838_ACEOF
81ecdfbb 11839if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11840 ac_cv_func_vfork_works=yes
11841else
81ecdfbb 11842 ac_cv_func_vfork_works=no
a9322a30 11843fi
81ecdfbb
RW
11844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11845 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11846fi
81ecdfbb 11847
a9322a30 11848fi
81ecdfbb
RW
11849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11850$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11851
11852fi;
11853if test "x$ac_cv_func_fork_works" = xcross; then
11854 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11856$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11857fi
11858
11859if test "x$ac_cv_func_vfork_works" = xyes; then
11860
81ecdfbb 11861$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11862
11863else
11864
81ecdfbb 11865$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11866
11867fi
11868if test "x$ac_cv_func_fork_works" = xyes; then
11869
81ecdfbb 11870$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11871
11872fi
11873
cdf43629 11874for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11875 pipe poll pread pread64 pwrite resize_term \
7313baad 11876 sbrk setpgid setpgrp setsid \
9467110b 11877 sigaction sigprocmask sigsetmask socketpair \
110ed339 11878 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11879 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11880 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11881do :
11882 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11883ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11884eval as_val=\$$as_ac_var
11885 if test "x$as_val" = x""yes; then :
6c7a06a3 11886 cat >>confdefs.h <<_ACEOF
81ecdfbb 11887#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11888_ACEOF
11889
11890fi
11891done
11892
11893
81ecdfbb
RW
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11895$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11896if test "${am_cv_langinfo_codeset+set}" = set; then :
11897 $as_echo_n "(cached) " >&6
6c7a06a3 11898else
81ecdfbb 11899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11900/* end confdefs.h. */
11901#include <langinfo.h>
11902int
11903main ()
11904{
11905char* cs = nl_langinfo(CODESET);
bec39cab
AC
11906 ;
11907 return 0;
11908}
11909_ACEOF
81ecdfbb 11910if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11911 am_cv_langinfo_codeset=yes
a4db0f07 11912else
81ecdfbb 11913 am_cv_langinfo_codeset=no
a4db0f07 11914fi
81ecdfbb
RW
11915rm -f core conftest.err conftest.$ac_objext \
11916 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11917
a4db0f07 11918fi
81ecdfbb
RW
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11920$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11921 if test $am_cv_langinfo_codeset = yes; then
11922
81ecdfbb 11923$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11924
6c7a06a3 11925 fi
c906108c 11926
06825bd1 11927
3266f10b
TT
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11929$as_echo_n "checking for ANSI C header files... " >&6; }
11930if test "${ac_cv_header_stdc+set}" = set; then :
11931 $as_echo_n "(cached) " >&6
11932else
11933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11934/* end confdefs.h. */
11935#include <stdlib.h>
11936#include <stdarg.h>
11937#include <string.h>
11938#include <float.h>
11939
11940int
11941main ()
11942{
11943
11944 ;
11945 return 0;
11946}
11947_ACEOF
11948if ac_fn_c_try_compile "$LINENO"; then :
11949 ac_cv_header_stdc=yes
11950else
11951 ac_cv_header_stdc=no
11952fi
11953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11954
11955if test $ac_cv_header_stdc = yes; then
11956 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11958/* end confdefs.h. */
11959#include <string.h>
11960
11961_ACEOF
11962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11963 $EGREP "memchr" >/dev/null 2>&1; then :
11964
11965else
11966 ac_cv_header_stdc=no
11967fi
11968rm -f conftest*
11969
11970fi
11971
11972if test $ac_cv_header_stdc = yes; then
11973 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11975/* end confdefs.h. */
11976#include <stdlib.h>
11977
11978_ACEOF
11979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11980 $EGREP "free" >/dev/null 2>&1; then :
11981
11982else
11983 ac_cv_header_stdc=no
11984fi
11985rm -f conftest*
11986
11987fi
11988
11989if test $ac_cv_header_stdc = yes; then
11990 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11991 if test "$cross_compiling" = yes; then :
11992 :
11993else
11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995/* end confdefs.h. */
11996#include <ctype.h>
11997#include <stdlib.h>
11998#if ((' ' & 0x0FF) == 0x020)
11999# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12000# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12001#else
12002# define ISLOWER(c) \
12003 (('a' <= (c) && (c) <= 'i') \
12004 || ('j' <= (c) && (c) <= 'r') \
12005 || ('s' <= (c) && (c) <= 'z'))
12006# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12007#endif
12008
12009#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12010int
12011main ()
12012{
12013 int i;
12014 for (i = 0; i < 256; i++)
12015 if (XOR (islower (i), ISLOWER (i))
12016 || toupper (i) != TOUPPER (i))
12017 return 2;
12018 return 0;
12019}
12020_ACEOF
12021if ac_fn_c_try_run "$LINENO"; then :
12022
12023else
12024 ac_cv_header_stdc=no
12025fi
12026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12027 conftest.$ac_objext conftest.beam conftest.$ac_ext
12028fi
12029
12030fi
12031fi
12032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12033$as_echo "$ac_cv_header_stdc" >&6; }
12034if test $ac_cv_header_stdc = yes; then
12035
12036$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12037
3266f10b
TT
12038fi
12039
12040 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12041# for constant arguments. Useless!
12042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12043$as_echo_n "checking for working alloca.h... " >&6; }
12044if test "${ac_cv_working_alloca_h+set}" = set; then :
12045 $as_echo_n "(cached) " >&6
12046else
12047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048/* end confdefs.h. */
12049#include <alloca.h>
12050int
12051main ()
12052{
12053char *p = (char *) alloca (2 * sizeof (int));
12054 if (p) return 0;
12055 ;
12056 return 0;
12057}
12058_ACEOF
12059if ac_fn_c_try_link "$LINENO"; then :
12060 ac_cv_working_alloca_h=yes
12061else
12062 ac_cv_working_alloca_h=no
12063fi
12064rm -f core conftest.err conftest.$ac_objext \
12065 conftest$ac_exeext conftest.$ac_ext
12066fi
12067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12068$as_echo "$ac_cv_working_alloca_h" >&6; }
12069if test $ac_cv_working_alloca_h = yes; then
12070
12071$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12072
12073fi
12074
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12076$as_echo_n "checking for alloca... " >&6; }
12077if test "${ac_cv_func_alloca_works+set}" = set; then :
12078 $as_echo_n "(cached) " >&6
12079else
12080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12081/* end confdefs.h. */
12082#ifdef __GNUC__
12083# define alloca __builtin_alloca
12084#else
12085# ifdef _MSC_VER
12086# include <malloc.h>
12087# define alloca _alloca
12088# else
12089# ifdef HAVE_ALLOCA_H
12090# include <alloca.h>
12091# else
12092# ifdef _AIX
12093 #pragma alloca
12094# else
12095# ifndef alloca /* predefined by HP cc +Olibcalls */
12096char *alloca ();
12097# endif
12098# endif
12099# endif
12100# endif
12101#endif
12102
12103int
12104main ()
12105{
12106char *p = (char *) alloca (1);
12107 if (p) return 0;
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112if ac_fn_c_try_link "$LINENO"; then :
12113 ac_cv_func_alloca_works=yes
12114else
12115 ac_cv_func_alloca_works=no
12116fi
12117rm -f core conftest.err conftest.$ac_objext \
12118 conftest$ac_exeext conftest.$ac_ext
12119fi
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12121$as_echo "$ac_cv_func_alloca_works" >&6; }
12122
12123if test $ac_cv_func_alloca_works = yes; then
12124
12125$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12126
12127else
12128 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12129# that cause trouble. Some versions do not even contain alloca or
12130# contain a buggy version. If you still want to use their alloca,
12131# use ar to extract alloca.o from them instead of compiling alloca.c.
12132
12133ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12134
12135$as_echo "#define C_ALLOCA 1" >>confdefs.h
12136
12137
12138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12139$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12140if test "${ac_cv_os_cray+set}" = set; then :
12141 $as_echo_n "(cached) " >&6
12142else
12143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144/* end confdefs.h. */
12145#if defined CRAY && ! defined CRAY2
12146webecray
12147#else
12148wenotbecray
12149#endif
12150
12151_ACEOF
12152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12153 $EGREP "webecray" >/dev/null 2>&1; then :
12154 ac_cv_os_cray=yes
12155else
12156 ac_cv_os_cray=no
12157fi
12158rm -f conftest*
12159
12160fi
12161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12162$as_echo "$ac_cv_os_cray" >&6; }
12163if test $ac_cv_os_cray = yes; then
12164 for ac_func in _getb67 GETB67 getb67; do
12165 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12166ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12167eval as_val=\$$as_ac_var
12168 if test "x$as_val" = x""yes; then :
12169
12170cat >>confdefs.h <<_ACEOF
12171#define CRAY_STACKSEG_END $ac_func
12172_ACEOF
12173
12174 break
12175fi
12176
12177 done
12178fi
12179
12180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12181$as_echo_n "checking stack direction for C alloca... " >&6; }
12182if test "${ac_cv_c_stack_direction+set}" = set; then :
12183 $as_echo_n "(cached) " >&6
12184else
12185 if test "$cross_compiling" = yes; then :
12186 ac_cv_c_stack_direction=0
12187else
12188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12189/* end confdefs.h. */
12190$ac_includes_default
12191int
12192find_stack_direction ()
12193{
12194 static char *addr = 0;
12195 auto char dummy;
12196 if (addr == 0)
12197 {
12198 addr = &dummy;
12199 return find_stack_direction ();
12200 }
12201 else
12202 return (&dummy > addr) ? 1 : -1;
12203}
12204
12205int
12206main ()
12207{
12208 return find_stack_direction () < 0;
12209}
12210_ACEOF
12211if ac_fn_c_try_run "$LINENO"; then :
12212 ac_cv_c_stack_direction=1
12213else
12214 ac_cv_c_stack_direction=-1
12215fi
12216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12217 conftest.$ac_objext conftest.beam conftest.$ac_ext
12218fi
12219
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12222$as_echo "$ac_cv_c_stack_direction" >&6; }
12223cat >>confdefs.h <<_ACEOF
12224#define STACK_DIRECTION $ac_cv_c_stack_direction
12225_ACEOF
12226
12227
12228fi
12229
12230
12231
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12233$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12234if test "${am_cv_langinfo_codeset+set}" = set; then :
12235 $as_echo_n "(cached) " >&6
12236else
12237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238/* end confdefs.h. */
12239#include <langinfo.h>
12240int
12241main ()
12242{
12243char* cs = nl_langinfo(CODESET);
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248if ac_fn_c_try_link "$LINENO"; then :
12249 am_cv_langinfo_codeset=yes
12250else
12251 am_cv_langinfo_codeset=no
12252fi
12253rm -f core conftest.err conftest.$ac_objext \
12254 conftest$ac_exeext conftest.$ac_ext
12255
12256fi
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12258$as_echo "$am_cv_langinfo_codeset" >&6; }
12259 if test $am_cv_langinfo_codeset = yes; then
12260
12261$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12262
12263 fi
12264
12265
a3d08894 12266 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
3266f10b
TT
12267do :
12268 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12269ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12270eval as_val=\$$as_ac_Header
12271 if test "x$as_val" = x""yes; then :
12272 cat >>confdefs.h <<_ACEOF
12273#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12274_ACEOF
12275
12276fi
12277
12278done
12279
12280
12281 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12282do :
12283 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12284ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12285eval as_val=\$$as_ac_var
12286 if test "x$as_val" = x""yes; then :
12287 cat >>confdefs.h <<_ACEOF
12288#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12289_ACEOF
12290
12291fi
12292done
12293
12294
12295 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12296if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12297 ac_have_decl=1
12298else
12299 ac_have_decl=0
12300fi
12301
12302cat >>confdefs.h <<_ACEOF
12303#define HAVE_DECL_STRERROR $ac_have_decl
12304_ACEOF
12305ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12306if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12307 ac_have_decl=1
12308else
12309 ac_have_decl=0
12310fi
12311
12312cat >>confdefs.h <<_ACEOF
12313#define HAVE_DECL_STRSTR $ac_have_decl
12314_ACEOF
12315
12316
e9bcb658
GB
12317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12318$as_echo_n "checking for sigsetjmp... " >&6; }
12319if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12320 $as_echo_n "(cached) " >&6
12321else
12322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12323/* end confdefs.h. */
12324
12325#include <setjmp.h>
12326
12327int
12328main ()
12329{
12330sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12331 ;
12332 return 0;
12333}
12334_ACEOF
12335if ac_fn_c_try_compile "$LINENO"; then :
12336 gdb_cv_func_sigsetjmp=yes
12337else
12338 gdb_cv_func_sigsetjmp=no
12339fi
12340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12341fi
12342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12343$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12344if test $gdb_cv_func_sigsetjmp = yes; then
12345
12346$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12347
12348fi
12349
3266f10b 12350
54019719
PA
12351# Check the return and argument types of ptrace.
12352
12353
12354
12355for ac_header in sys/ptrace.h ptrace.h
12356do :
12357 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12358ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12359eval as_val=\$$as_ac_Header
12360 if test "x$as_val" = x""yes; then :
12361 cat >>confdefs.h <<_ACEOF
12362#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12363_ACEOF
12364
12365fi
12366
12367done
12368
12369
12370# Needs to be tested in C++ mode, to detect whether we need to cast
12371# the first argument to enum __ptrace_request.
12372if test "$enable_build_with_cxx" = "yes"; then
12373 ac_ext=cpp
12374ac_cpp='$CXXCPP $CPPFLAGS'
12375ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12376ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12377ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12378
12379fi
12380
a3828db0 12381gdb_ptrace_headers='
4ff70b84 12382#include <sys/types.h>
a3828db0
MK
12383#if HAVE_SYS_PTRACE_H
12384# include <sys/ptrace.h>
12385#endif
12386#if HAVE_UNISTD_H
12387# include <unistd.h>
12388#endif
12389'
12390# There is no point in checking if we don't have a prototype.
54019719 12391ac_fn_cxx_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12392"
12393if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12394 ac_have_decl=1
06825bd1 12395else
81ecdfbb 12396 ac_have_decl=0
06825bd1 12397fi
06825bd1 12398
a3828db0 12399cat >>confdefs.h <<_ACEOF
81ecdfbb 12400#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12401_ACEOF
81ecdfbb 12402if test $ac_have_decl = 1; then :
bec39cab 12403
a3828db0 12404else
a3828db0
MK
12405
12406 : ${gdb_cv_func_ptrace_ret='int'}
12407 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12408
06825bd1
MK
12409fi
12410
064ef605
DJ
12411# Check return type. Varargs (used on GNU/Linux) conflict with the
12412# empty argument list, so check for that explicitly.
81ecdfbb
RW
12413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12414$as_echo_n "checking return type of ptrace... " >&6; }
12415if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12416 $as_echo_n "(cached) " >&6
bec39cab 12417else
81ecdfbb 12418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12419/* end confdefs.h. */
a3828db0 12420$gdb_ptrace_headers
bec39cab
AC
12421int
12422main ()
12423{
064ef605
DJ
12424extern long ptrace (enum __ptrace_request, ...);
12425 ;
12426 return 0;
12427}
12428_ACEOF
54019719 12429if ac_fn_cxx_try_compile "$LINENO"; then :
064ef605
DJ
12430 gdb_cv_func_ptrace_ret='long'
12431else
81ecdfbb 12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12433/* end confdefs.h. */
12434$gdb_ptrace_headers
12435int
12436main ()
12437{
a3828db0 12438extern int ptrace ();
bec39cab
AC
12439 ;
12440 return 0;
12441}
12442_ACEOF
54019719 12443if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0 12444 gdb_cv_func_ptrace_ret='int'
70f9f479 12445else
81ecdfbb 12446 gdb_cv_func_ptrace_ret='long'
70f9f479 12447fi
81ecdfbb 12448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12449fi
81ecdfbb 12450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12451fi
81ecdfbb
RW
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12453$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12454
a3828db0
MK
12455cat >>confdefs.h <<_ACEOF
12456#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12457_ACEOF
70f9f479 12458
a3828db0 12459# Check argument types.
81ecdfbb
RW
12460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12461$as_echo_n "checking types of arguments for ptrace... " >&6; }
12462if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12463 $as_echo_n "(cached) " >&6
bec39cab 12464else
a3828db0 12465
81ecdfbb 12466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12467/* end confdefs.h. */
12468$gdb_ptrace_headers
12469int
12470main ()
12471{
12472extern long ptrace (enum __ptrace_request, ...);
12473 ;
12474 return 0;
12475}
12476_ACEOF
54019719
PA
12477if ac_fn_cxx_try_compile "$LINENO"; then :
12478 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12479else
064ef605 12480
a3828db0
MK
12481for gdb_arg1 in 'int' 'long'; do
12482 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12483 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12484 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12486/* end confdefs.h. */
a3828db0 12487$gdb_ptrace_headers
bec39cab
AC
12488int
12489main ()
12490{
a3828db0
MK
12491
12492extern $gdb_cv_func_ptrace_ret
12493 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12494
bec39cab
AC
12495 ;
12496 return 0;
12497}
12498_ACEOF
54019719 12499if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12500 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12501 break 4;
5c7f2947 12502fi
81ecdfbb 12503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12504 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12506/* end confdefs.h. */
a3828db0 12507$gdb_ptrace_headers
bec39cab
AC
12508int
12509main ()
12510{
a3828db0
MK
12511
12512extern $gdb_cv_func_ptrace_ret
12513 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12514
bec39cab
AC
12515 ;
12516 return 0;
12517}
12518_ACEOF
54019719 12519if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12520
12521gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12522 break 5;
78434e59 12523fi
81ecdfbb 12524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12525 done
12526 done
12527 done
12528 done
12529done
12530# Provide a safe default value.
12531: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12532
064ef605 12533fi
81ecdfbb 12534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12535fi
81ecdfbb
RW
12536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12537$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12538ac_save_IFS=$IFS; IFS=','
12539set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12540IFS=$ac_save_IFS
12541shift
bec39cab 12542
54019719
PA
12543cat >>confdefs.h <<_ACEOF
12544#define PTRACE_TYPE_ARG1 $1
12545_ACEOF
12546
12547
a3828db0
MK
12548cat >>confdefs.h <<_ACEOF
12549#define PTRACE_TYPE_ARG3 $3
12550_ACEOF
12551
96d7229d
LM
12552
12553cat >>confdefs.h <<_ACEOF
12554#define PTRACE_TYPE_ARG4 $4
12555_ACEOF
12556
a3828db0
MK
12557if test -n "$5"; then
12558
12559cat >>confdefs.h <<_ACEOF
12560#define PTRACE_TYPE_ARG5 $5
bec39cab 12561_ACEOF
78434e59
MK
12562
12563fi
12564
54019719
PA
12565if test "$enable_build_with_cxx" = "yes"; then
12566 ac_ext=c
12567ac_cpp='$CPP $CPPFLAGS'
12568ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12569ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12570ac_compiler_gnu=$ac_cv_c_compiler_gnu
12571
12572fi
12573
12574
a3828db0 12575if test "$cross_compiling" = no; then
81ecdfbb
RW
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12577$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12578if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12579 $as_echo_n "(cached) " >&6
a3828db0 12580else
81ecdfbb
RW
12581 if test "$cross_compiling" = yes; then :
12582 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12583else
81ecdfbb 12584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12585/* end confdefs.h. */
81ecdfbb 12586$ac_includes_default
bec39cab
AC
12587int
12588main ()
12589{
a3828db0
MK
12590/* If this system has a BSD-style setpgrp which takes arguments,
12591 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12592 exit successfully. */
81ecdfbb 12593 return setpgrp (1,1) != -1;
bec39cab
AC
12594 ;
12595 return 0;
12596}
12597_ACEOF
81ecdfbb 12598if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12599 ac_cv_func_setpgrp_void=no
c906108c 12600else
81ecdfbb 12601 ac_cv_func_setpgrp_void=yes
c906108c 12602fi
81ecdfbb
RW
12603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12604 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12605fi
81ecdfbb 12606
a3828db0 12607fi
81ecdfbb
RW
12608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12609$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12610if test $ac_cv_func_setpgrp_void = yes; then
12611
81ecdfbb 12612$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12613
12614fi
a3828db0
MK
12615
12616else
81ecdfbb
RW
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12618$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12619if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12620 $as_echo_n "(cached) " >&6
97bf5e38 12621else
81ecdfbb 12622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12623/* end confdefs.h. */
a3828db0
MK
12624
12625#include <unistd.h>
12626
bec39cab
AC
12627int
12628main ()
12629{
a3828db0
MK
12630
12631 if (setpgrp(1,1) == -1)
12632 exit (0);
12633 else
12634 exit (1);
12635
bec39cab
AC
12636 ;
12637 return 0;
12638}
12639_ACEOF
81ecdfbb 12640if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12641 ac_cv_func_setpgrp_void=no
c906108c 12642else
81ecdfbb 12643 ac_cv_func_setpgrp_void=yes
c906108c 12644fi
81ecdfbb 12645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12646fi
81ecdfbb
RW
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12648$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12649if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12650 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12651
a3828db0 12652fi
c906108c
SS
12653fi
12654
db1ff28b
JK
12655# Assume we'll default to using the included libiberty regex.
12656gdb_use_included_regex=yes
12657
12658# However, if the system regex is GNU regex, then default to *not*
12659# using the included regex.
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12661$as_echo_n "checking for GNU regex... " >&6; }
12662if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12663 $as_echo_n "(cached) " >&6
12664else
12665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666/* end confdefs.h. */
12667#include <gnu-versions.h>
12668int
12669main ()
12670{
12671#define REGEX_INTERFACE_VERSION 1
12672#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12673# error "Version mismatch"
12674#endif
12675 ;
12676 return 0;
12677}
12678_ACEOF
12679if ac_fn_c_try_compile "$LINENO"; then :
12680 gdb_cv_have_gnu_regex=yes
12681else
12682 gdb_cv_have_gnu_regex=no
12683fi
12684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12685fi
12686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12687$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12688if test $gdb_cv_have_gnu_regex = yes; then
12689 gdb_use_included_regex=no
12690fi
12691
12692
12693# Check whether --with-included-regex was given.
12694if test "${with_included_regex+set}" = set; then :
12695 withval=$with_included_regex; gdb_with_regex=$withval
12696else
12697 gdb_with_regex=$gdb_use_included_regex
12698fi
12699
12700if test "$gdb_with_regex" = yes; then
12701
12702$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12703
12704fi
12705
81ecdfbb
RW
12706# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12707ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12708#include <sys/proc.h>
12709
12710"
12711if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12712
5c45e068 12713cat >>confdefs.h <<_ACEOF
a3828db0 12714#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12715_ACEOF
c906108c 12716
5c45e068 12717
97bf5e38 12718fi
c906108c 12719
5c45e068 12720
a3828db0 12721# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12723$as_echo_n "checking for struct lwp... " >&6; }
12724if test "${gdb_cv_struct_lwp+set}" = set; then :
12725 $as_echo_n "(cached) " >&6
bec39cab 12726else
81ecdfbb 12727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12728/* end confdefs.h. */
a3828db0
MK
12729#include <sys/param.h>
12730#include <sys/lwp.h>
bec39cab
AC
12731int
12732main ()
12733{
a3828db0 12734struct lwp l;
bec39cab
AC
12735 ;
12736 return 0;
12737}
12738_ACEOF
81ecdfbb 12739if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12740 gdb_cv_struct_lwp=yes
c906108c 12741else
81ecdfbb 12742 gdb_cv_struct_lwp=no
c906108c 12743fi
81ecdfbb 12744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12745fi
81ecdfbb
RW
12746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12747$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12748if test $gdb_cv_struct_lwp = yes; then
c906108c 12749
81ecdfbb 12750$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12751
97bf5e38 12752fi
c906108c 12753
a3828db0 12754# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12756$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12757if test "${gdb_cv_struct_reg+set}" = set; then :
12758 $as_echo_n "(cached) " >&6
bec39cab 12759else
81ecdfbb 12760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12761/* end confdefs.h. */
a3828db0
MK
12762#include <sys/types.h>
12763#include <machine/reg.h>
bec39cab
AC
12764int
12765main ()
12766{
a3828db0 12767struct reg r;
bec39cab
AC
12768 ;
12769 return 0;
12770}
12771_ACEOF
81ecdfbb 12772if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12773 gdb_cv_struct_reg=yes
27ca5dad 12774else
81ecdfbb 12775 gdb_cv_struct_reg=no
27ca5dad 12776fi
81ecdfbb 12777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12778fi
81ecdfbb
RW
12779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12780$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12781if test $gdb_cv_struct_reg = yes; then
bec39cab 12782
81ecdfbb 12783$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12784
12785fi
97bf5e38 12786
a3828db0
MK
12787# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12788# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12789ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12790#include <machine/reg.h>
81ecdfbb
RW
12791"
12792if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12793
12794cat >>confdefs.h <<_ACEOF
a3828db0 12795#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12796_ACEOF
3862412b 12797
5c45e068 12798
97bf5e38 12799fi
a6e69c1f
JB
12800ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12801#include <machine/reg.h>
81ecdfbb
RW
12802"
12803if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12804
12805cat >>confdefs.h <<_ACEOF
a3828db0 12806#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12807_ACEOF
3862412b 12808
5c45e068 12809
97bf5e38 12810fi
3862412b 12811
5c45e068 12812
6fea9e18
L
12813# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12814# Older amd64 Linux's don't have the fs_base and gs_base members of
12815# `struct user_regs_struct'.
12816ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12817"
12818if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12819
12820cat >>confdefs.h <<_ACEOF
12821#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12822_ACEOF
12823
12824
12825fi
12826ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12827"
12828if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12829
12830cat >>confdefs.h <<_ACEOF
12831#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12832_ACEOF
12833
12834
12835fi
12836
12837
a3828db0 12838# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12840$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12841if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12842 $as_echo_n "(cached) " >&6
451928c5 12843else
81ecdfbb 12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12845/* end confdefs.h. */
a3828db0 12846#include <sys/ptrace.h>
bec39cab
AC
12847int
12848main ()
12849{
a3828db0 12850PTRACE_GETREGS;
bec39cab
AC
12851 ;
12852 return 0;
12853}
12854_ACEOF
81ecdfbb 12855if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12856 gdb_cv_have_ptrace_getregs=yes
451928c5 12857else
81ecdfbb 12858 gdb_cv_have_ptrace_getregs=no
451928c5 12859fi
81ecdfbb 12860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12861fi
12862
81ecdfbb
RW
12863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12864$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12865if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12866
81ecdfbb 12867$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12868
97bf5e38 12869fi
451928c5 12870
a3828db0 12871# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12873$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12874if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12875 $as_echo_n "(cached) " >&6
451928c5 12876else
81ecdfbb 12877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12878/* end confdefs.h. */
a3828db0 12879#include <sys/ptrace.h>
bec39cab
AC
12880int
12881main ()
12882{
a3828db0 12883PTRACE_GETFPXREGS;
bec39cab
AC
12884 ;
12885 return 0;
12886}
12887_ACEOF
81ecdfbb 12888if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12889 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12890else
81ecdfbb 12891 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12892fi
81ecdfbb 12893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12894fi
12895
81ecdfbb
RW
12896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12897$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12898if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12899
81ecdfbb 12900$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12901
97bf5e38 12902fi
451928c5 12903
a3828db0 12904# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12906$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12907if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12908 $as_echo_n "(cached) " >&6
3862412b 12909else
81ecdfbb 12910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12911/* end confdefs.h. */
a3828db0
MK
12912#include <sys/types.h>
12913#include <sys/ptrace.h>
bec39cab
AC
12914int
12915main ()
12916{
a3828db0 12917PT_GETDBREGS;
bec39cab
AC
12918 ;
12919 return 0;
12920}
12921_ACEOF
81ecdfbb 12922if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12923 gdb_cv_have_pt_getdbregs=yes
3862412b 12924else
81ecdfbb 12925 gdb_cv_have_pt_getdbregs=no
3862412b 12926fi
81ecdfbb 12927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12928fi
12929
81ecdfbb
RW
12930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12931$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12932if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12933
81ecdfbb 12934$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12935
97bf5e38 12936fi
3862412b 12937
a3828db0 12938# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12940$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12941if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12942 $as_echo_n "(cached) " >&6
3862412b 12943else
81ecdfbb 12944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12945/* end confdefs.h. */
a3828db0
MK
12946#include <sys/types.h>
12947#include <sys/ptrace.h>
bec39cab
AC
12948int
12949main ()
12950{
a3828db0 12951PT_GETXMMREGS;
bec39cab
AC
12952 ;
12953 return 0;
12954}
12955_ACEOF
81ecdfbb 12956if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12957 gdb_cv_have_pt_getxmmregs=yes
3862412b 12958else
81ecdfbb 12959 gdb_cv_have_pt_getxmmregs=no
3862412b 12960fi
81ecdfbb 12961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12962fi
12963
81ecdfbb
RW
12964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12965$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12966if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12967
81ecdfbb 12968$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12969
97bf5e38 12970fi
3862412b 12971
6e9567fe
JB
12972# See if <sys/ptrace.h> supports LWP names on FreeBSD
12973# Older FreeBSD versions don't have the pl_tdname member of
12974# `struct ptrace_lwpinfo'.
12975ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12976"
12977if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12978
12979cat >>confdefs.h <<_ACEOF
12980#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12981_ACEOF
12982
12983
12984fi
12985
12986
12987
05b4bd79 12988# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12989
12990if test "${target}" = "${host}"; then
12991 case "${host}" in
7b00db47 12992 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12993
81ecdfbb 12994$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12995
12996 ;;
c162e8c9 12997 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12998
81ecdfbb 12999$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
13000
13001 ;;
13002 mips-sgi-irix5*)
13003 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 13004
81ecdfbb 13005$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
13006
13007 ;;
13008 esac
13009fi
13010
13011if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13013$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13014 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13015 $as_echo_n "(cached) " >&6
596c9d4b 13016else
81ecdfbb 13017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13018/* end confdefs.h. */
596c9d4b
KB
13019
13020#define _SYSCALL32
d30c5336
JK
13021/* Needed for new procfs interface on sparc-solaris. */
13022#define _STRUCTURED_PROC 1
596c9d4b 13023#include <sys/procfs.h>
bec39cab
AC
13024int
13025main ()
13026{
97bf5e38 13027gregset_t avar
bec39cab
AC
13028 ;
13029 return 0;
13030}
13031_ACEOF
81ecdfbb 13032if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13033 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13034else
81ecdfbb 13035 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13036
596c9d4b 13037fi
81ecdfbb 13038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13039fi
13040
97bf5e38 13041 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13042
81ecdfbb 13043$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13044
13045 fi
81ecdfbb
RW
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13047$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13048
81ecdfbb
RW
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13050$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13051 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13052 $as_echo_n "(cached) " >&6
d84dd0c5 13053else
81ecdfbb 13054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13055/* end confdefs.h. */
97bf5e38
MK
13056
13057#define _SYSCALL32
d30c5336
JK
13058/* Needed for new procfs interface on sparc-solaris. */
13059#define _STRUCTURED_PROC 1
d84dd0c5 13060#include <sys/procfs.h>
bec39cab
AC
13061int
13062main ()
13063{
97bf5e38 13064fpregset_t avar
bec39cab
AC
13065 ;
13066 return 0;
13067}
13068_ACEOF
81ecdfbb 13069if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13070 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13071else
81ecdfbb 13072 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13073
d84dd0c5 13074fi
81ecdfbb 13075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13076fi
13077
97bf5e38 13078 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13079
81ecdfbb 13080$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13081
97bf5e38 13082 fi
81ecdfbb
RW
13083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13084$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13085
81ecdfbb
RW
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13087$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13088 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13089 $as_echo_n "(cached) " >&6
c906108c 13090else
81ecdfbb 13091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13092/* end confdefs.h. */
c906108c 13093
97bf5e38 13094#define _SYSCALL32
d30c5336
JK
13095/* Needed for new procfs interface on sparc-solaris. */
13096#define _STRUCTURED_PROC 1
97bf5e38 13097#include <sys/procfs.h>
bec39cab
AC
13098int
13099main ()
13100{
97bf5e38 13101prgregset_t avar
bec39cab
AC
13102 ;
13103 return 0;
13104}
13105_ACEOF
81ecdfbb 13106if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13107 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13108else
81ecdfbb 13109 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13110
c906108c 13111fi
81ecdfbb 13112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13113fi
13114
97bf5e38 13115 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13116
81ecdfbb 13117$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13118
97bf5e38 13119 fi
81ecdfbb
RW
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13121$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13122
81ecdfbb
RW
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13124$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13125 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13126 $as_echo_n "(cached) " >&6
d45fe813 13127else
81ecdfbb 13128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13129/* end confdefs.h. */
97bf5e38
MK
13130
13131#define _SYSCALL32
d30c5336
JK
13132/* Needed for new procfs interface on sparc-solaris. */
13133#define _STRUCTURED_PROC 1
97bf5e38 13134#include <sys/procfs.h>
bec39cab
AC
13135int
13136main ()
13137{
97bf5e38 13138prfpregset_t avar
bec39cab
AC
13139 ;
13140 return 0;
13141}
13142_ACEOF
81ecdfbb 13143if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13144 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13145else
81ecdfbb 13146 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13147
d45fe813 13148fi
81ecdfbb 13149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13150fi
13151
97bf5e38 13152 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13153
81ecdfbb 13154$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13155
97bf5e38 13156 fi
81ecdfbb
RW
13157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13158$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13159
81ecdfbb
RW
13160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13161$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13162 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13163 $as_echo_n "(cached) " >&6
d45fe813 13164else
81ecdfbb 13165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13166/* end confdefs.h. */
97bf5e38
MK
13167
13168#define _SYSCALL32
d30c5336
JK
13169/* Needed for new procfs interface on sparc-solaris. */
13170#define _STRUCTURED_PROC 1
97bf5e38 13171#include <sys/procfs.h>
bec39cab
AC
13172int
13173main ()
13174{
97bf5e38 13175prgregset32_t avar
bec39cab
AC
13176 ;
13177 return 0;
13178}
13179_ACEOF
81ecdfbb 13180if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13181 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13182else
81ecdfbb 13183 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13184
d45fe813 13185fi
81ecdfbb 13186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13187fi
13188
97bf5e38 13189 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13190
81ecdfbb 13191$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13192
97bf5e38 13193 fi
81ecdfbb
RW
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13195$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13196
81ecdfbb
RW
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13198$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13199 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13200 $as_echo_n "(cached) " >&6
d45fe813 13201else
81ecdfbb 13202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13203/* end confdefs.h. */
97bf5e38 13204
d45fe813 13205#define _SYSCALL32
d30c5336
JK
13206/* Needed for new procfs interface on sparc-solaris. */
13207#define _STRUCTURED_PROC 1
97bf5e38 13208#include <sys/procfs.h>
bec39cab
AC
13209int
13210main ()
13211{
97bf5e38 13212lwpid_t avar
bec39cab
AC
13213 ;
13214 return 0;
13215}
13216_ACEOF
81ecdfbb 13217if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13218 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13219else
81ecdfbb 13220 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13221
d45fe813 13222fi
81ecdfbb 13223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13224fi
13225
97bf5e38 13226 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13227
81ecdfbb 13228$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13229
97bf5e38 13230 fi
81ecdfbb
RW
13231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13232$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13233
81ecdfbb
RW
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13235$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13236 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13237 $as_echo_n "(cached) " >&6
c906108c 13238else
81ecdfbb 13239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13240/* end confdefs.h. */
c906108c 13241
97bf5e38 13242#define _SYSCALL32
d30c5336
JK
13243/* Needed for new procfs interface on sparc-solaris. */
13244#define _STRUCTURED_PROC 1
97bf5e38 13245#include <sys/procfs.h>
bec39cab
AC
13246int
13247main ()
13248{
97bf5e38 13249psaddr_t avar
bec39cab
AC
13250 ;
13251 return 0;
13252}
13253_ACEOF
81ecdfbb 13254if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13255 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13256else
81ecdfbb 13257 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13258
c906108c 13259fi
81ecdfbb 13260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13261fi
13262
97bf5e38 13263 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13264
81ecdfbb 13265$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13266
97bf5e38 13267 fi
81ecdfbb
RW
13268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13269$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13270
81ecdfbb
RW
13271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13272$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13273 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13274 $as_echo_n "(cached) " >&6
c906108c 13275else
81ecdfbb 13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13277/* end confdefs.h. */
c906108c 13278
97bf5e38 13279#define _SYSCALL32
d30c5336
JK
13280/* Needed for new procfs interface on sparc-solaris. */
13281#define _STRUCTURED_PROC 1
97bf5e38 13282#include <sys/procfs.h>
bec39cab
AC
13283int
13284main ()
13285{
97bf5e38 13286prsysent_t avar
bec39cab
AC
13287 ;
13288 return 0;
13289}
13290_ACEOF
81ecdfbb 13291if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13292 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13293else
81ecdfbb 13294 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13295
c906108c 13296fi
81ecdfbb 13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13298fi
13299
97bf5e38 13300 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13301
81ecdfbb 13302$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13303
97bf5e38 13304 fi
81ecdfbb
RW
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13306$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13307
81ecdfbb
RW
13308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13309$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13310 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13311 $as_echo_n "(cached) " >&6
c906108c 13312else
81ecdfbb 13313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13314/* end confdefs.h. */
c906108c 13315
97bf5e38 13316#define _SYSCALL32
d30c5336
JK
13317/* Needed for new procfs interface on sparc-solaris. */
13318#define _STRUCTURED_PROC 1
97bf5e38 13319#include <sys/procfs.h>
bec39cab
AC
13320int
13321main ()
13322{
97bf5e38 13323pr_sigset_t avar
bec39cab
AC
13324 ;
13325 return 0;
13326}
13327_ACEOF
81ecdfbb 13328if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13329 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13330else
81ecdfbb 13331 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13332
c906108c 13333fi
81ecdfbb 13334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13335fi
13336
97bf5e38 13337 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13338
81ecdfbb 13339$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13340
97bf5e38 13341 fi
81ecdfbb
RW
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13343$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13344
81ecdfbb
RW
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13346$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13347 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13348 $as_echo_n "(cached) " >&6
c906108c 13349else
81ecdfbb 13350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13351/* end confdefs.h. */
c906108c 13352
97bf5e38 13353#define _SYSCALL32
d30c5336
JK
13354/* Needed for new procfs interface on sparc-solaris. */
13355#define _STRUCTURED_PROC 1
97bf5e38 13356#include <sys/procfs.h>
bec39cab
AC
13357int
13358main ()
13359{
97bf5e38 13360pr_sigaction64_t avar
bec39cab
AC
13361 ;
13362 return 0;
13363}
13364_ACEOF
81ecdfbb 13365if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13366 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13367else
81ecdfbb 13368 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13369
c906108c 13370fi
81ecdfbb 13371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13372fi
13373
97bf5e38 13374 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13375
81ecdfbb 13376$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13377
97bf5e38 13378 fi
81ecdfbb
RW
13379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13380$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13381
81ecdfbb
RW
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13383$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13384 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13385 $as_echo_n "(cached) " >&6
97bf5e38 13386else
81ecdfbb 13387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13388/* end confdefs.h. */
97bf5e38
MK
13389
13390#define _SYSCALL32
d30c5336
JK
13391/* Needed for new procfs interface on sparc-solaris. */
13392#define _STRUCTURED_PROC 1
97bf5e38 13393#include <sys/procfs.h>
bec39cab
AC
13394int
13395main ()
13396{
97bf5e38 13397pr_siginfo64_t avar
bec39cab
AC
13398 ;
13399 return 0;
13400}
13401_ACEOF
81ecdfbb 13402if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13403 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13404else
81ecdfbb 13405 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13406
97bf5e38 13407fi
81ecdfbb 13408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13409fi
c906108c 13410
97bf5e38 13411 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13412
81ecdfbb 13413$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13414
97bf5e38 13415 fi
81ecdfbb
RW
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13417$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13418
13419
97bf5e38
MK
13420
13421
13422
97bf5e38 13423 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13425$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13426 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13427 $as_echo_n "(cached) " >&6
c906108c 13428else
81ecdfbb 13429 if test "$cross_compiling" = yes; then :
97bf5e38 13430 gdb_cv_prfpregset_t_broken=yes
c906108c 13431else
81ecdfbb 13432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13433/* end confdefs.h. */
97bf5e38
MK
13434#include <sys/procfs.h>
13435 int main ()
13436 {
13437 if (sizeof (prfpregset_t) == sizeof (void *))
13438 return 1;
13439 return 0;
13440 }
bec39cab 13441_ACEOF
81ecdfbb 13442if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13443 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13444else
13445 gdb_cv_prfpregset_t_broken=yes
c906108c 13446fi
81ecdfbb
RW
13447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13448 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13449fi
81ecdfbb 13450
c906108c
SS
13451fi
13452
81ecdfbb
RW
13453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13454$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13455 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13456
81ecdfbb 13457$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13458
97bf5e38
MK
13459 fi
13460 fi
c906108c 13461fi
c906108c 13462
bc8bcb4b 13463# Check if the compiler supports the `long long' type.
c906108c 13464
81ecdfbb
RW
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13466$as_echo_n "checking for long long support in compiler... " >&6; }
13467if test "${gdb_cv_c_long_long+set}" = set; then :
13468 $as_echo_n "(cached) " >&6
97bf5e38 13469else
81ecdfbb 13470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13471/* end confdefs.h. */
bc8bcb4b 13472extern long long foo;
bec39cab
AC
13473int
13474main ()
13475{
bc8bcb4b 13476switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13477 ;
13478 return 0;
13479}
13480_ACEOF
81ecdfbb 13481if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13482 gdb_cv_c_long_long=yes
13483else
81ecdfbb 13484 gdb_cv_c_long_long=no
97bf5e38 13485fi
81ecdfbb 13486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13487fi
81ecdfbb
RW
13488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13489$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13490if test $gdb_cv_c_long_long != yes; then
13491 # libdecnumber requires long long.
13492 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13493fi
13494
bc8bcb4b 13495# Check if the compiler and runtime support printing long longs.
97bf5e38 13496
81ecdfbb
RW
13497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13498$as_echo_n "checking for long long support in printf... " >&6; }
13499if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13500 $as_echo_n "(cached) " >&6
97bf5e38 13501else
81ecdfbb 13502 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13503 gdb_cv_printf_has_long_long=no
13504else
81ecdfbb 13505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13506/* end confdefs.h. */
bc8bcb4b
MK
13507$ac_includes_default
13508int
13509main ()
13510{
13511char buf[32];
97bf5e38
MK
13512 long long l = 0;
13513 l = (l << 16) + 0x0123;
13514 l = (l << 16) + 0x4567;
13515 l = (l << 16) + 0x89ab;
13516 l = (l << 16) + 0xcdef;
13517 sprintf (buf, "0x%016llx", l);
13518 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13519 ;
13520 return 0;
c906108c 13521}
bec39cab 13522_ACEOF
81ecdfbb 13523if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13524 gdb_cv_printf_has_long_long=yes
13525else
81ecdfbb 13526 gdb_cv_printf_has_long_long=no
97bf5e38 13527fi
81ecdfbb
RW
13528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13529 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13530fi
81ecdfbb 13531
97bf5e38 13532fi
81ecdfbb
RW
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13534$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13535if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13536
81ecdfbb 13537$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13538
13539fi
97bf5e38 13540
1a619819
LM
13541# Check if the compiler and runtime support printing decfloats.
13542
81ecdfbb
RW
13543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13544$as_echo_n "checking for decfloat support in printf... " >&6; }
13545if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13546 $as_echo_n "(cached) " >&6
1a619819 13547else
81ecdfbb 13548 if test "$cross_compiling" = yes; then :
1a619819
LM
13549 gdb_cv_printf_has_decfloat=no
13550else
81ecdfbb 13551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13552/* end confdefs.h. */
13553$ac_includes_default
13554int
13555main ()
13556{
13557char buf[64];
13558 _Decimal32 d32 = 1.2345df;
13559 _Decimal64 d64 = 1.2345dd;
13560 _Decimal128 d128 = 1.2345dl;
13561 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13562 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13563 ;
13564 return 0;
13565}
13566_ACEOF
81ecdfbb 13567if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13568 gdb_cv_printf_has_decfloat=yes
13569else
81ecdfbb 13570 gdb_cv_printf_has_decfloat=no
1a619819 13571fi
81ecdfbb
RW
13572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13573 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13574fi
81ecdfbb 13575
1a619819 13576fi
81ecdfbb
RW
13577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13578$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13579if test $gdb_cv_printf_has_decfloat = yes; then
13580
81ecdfbb 13581$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13582
13583fi
13584
bc8bcb4b
MK
13585# Check if the compiler supports the `long double' type. We can't use
13586# AC_C_LONG_DOUBLE because that one does additional checks on the
13587# constants defined in <float.h> that fail on some systems,
13588# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13589
81ecdfbb
RW
13590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13591$as_echo_n "checking for long double support in compiler... " >&6; }
13592if test "${gdb_cv_c_long_double+set}" = set; then :
13593 $as_echo_n "(cached) " >&6
97bf5e38 13594else
81ecdfbb 13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13596/* end confdefs.h. */
97bf5e38 13597long double foo;
bec39cab 13598_ACEOF
81ecdfbb 13599if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13600 gdb_cv_c_long_double=yes
97bf5e38 13601else
81ecdfbb 13602 gdb_cv_c_long_double=no
97bf5e38 13603fi
81ecdfbb 13604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13605fi
81ecdfbb
RW
13606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13607$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13608if test $gdb_cv_c_long_double = yes; then
c906108c 13609
81ecdfbb 13610$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13611
13612fi
13613
bc8bcb4b 13614# Check if the compiler and runtime support printing long doubles.
97bf5e38 13615
81ecdfbb
RW
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13617$as_echo_n "checking for long double support in printf... " >&6; }
13618if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13619 $as_echo_n "(cached) " >&6
97bf5e38 13620else
81ecdfbb 13621 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13622 gdb_cv_printf_has_long_double=no
13623else
81ecdfbb 13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13625/* end confdefs.h. */
bc8bcb4b
MK
13626$ac_includes_default
13627int
13628main ()
13629{
13630char buf[16];
97bf5e38
MK
13631 long double f = 3.141592653;
13632 sprintf (buf, "%Lg", f);
13633 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13634 ;
13635 return 0;
97bf5e38 13636}
bec39cab 13637_ACEOF
81ecdfbb 13638if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13639 gdb_cv_printf_has_long_double=yes
c906108c 13640else
81ecdfbb 13641 gdb_cv_printf_has_long_double=no
c906108c 13642fi
81ecdfbb
RW
13643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13644 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13645fi
81ecdfbb 13646
c906108c 13647fi
81ecdfbb
RW
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13649$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13650if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13651
81ecdfbb 13652$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13653
13654fi
97bf5e38 13655
bc8bcb4b 13656# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13657
81ecdfbb
RW
13658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13659$as_echo_n "checking for long double support in scanf... " >&6; }
13660if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13661 $as_echo_n "(cached) " >&6
97bf5e38 13662else
81ecdfbb 13663 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13664 gdb_cv_scanf_has_long_double=no
13665else
81ecdfbb 13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13667/* end confdefs.h. */
bc8bcb4b
MK
13668#include <stdio.h>
13669int
13670main ()
13671{
13672char *buf = "3.141592653";
97bf5e38
MK
13673 long double f = 0;
13674 sscanf (buf, "%Lg", &f);
13675 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13676 ;
13677 return 0;
97bf5e38 13678}
bec39cab 13679_ACEOF
81ecdfbb 13680if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13681 gdb_cv_scanf_has_long_double=yes
13682else
81ecdfbb 13683 gdb_cv_scanf_has_long_double=no
97bf5e38 13684fi
81ecdfbb
RW
13685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13686 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13687fi
81ecdfbb 13688
c906108c 13689fi
81ecdfbb
RW
13690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13691$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13692if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13693
81ecdfbb 13694$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13695
13696fi
c906108c 13697
438013df
AO
13698case ${host_os} in
13699aix*)
81ecdfbb
RW
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13701$as_echo_n "checking for -bbigtoc option... " >&6; }
13702if test "${gdb_cv_bigtoc+set}" = set; then :
13703 $as_echo_n "(cached) " >&6
438013df 13704else
bec39cab 13705
438013df
AO
13706 SAVE_LDFLAGS=$LDFLAGS
13707
13708 case $GCC in
13709 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13710 *) gdb_cv_bigtoc=-bbigtoc ;;
13711 esac
13712
13713 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13715/* end confdefs.h. */
438013df 13716
bec39cab
AC
13717int
13718main ()
13719{
438013df 13720int i;
bec39cab
AC
13721 ;
13722 return 0;
13723}
13724_ACEOF
81ecdfbb 13725if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13726
81ecdfbb
RW
13727else
13728 gdb_cv_bigtoc=
438013df 13729fi
81ecdfbb
RW
13730rm -f core conftest.err conftest.$ac_objext \
13731 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13732 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13733
bec39cab 13734fi
81ecdfbb
RW
13735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13736$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13737 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13738 ;;
13739esac
13740
38f6b338 13741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13742$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13743dynamic_list=false
13744if test "${gdb_native}" = yes; then
13745 # The dynamically loaded libthread_db needs access to symbols in the gdb
13746 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13747 # may not be supported there.
13748 old_LDFLAGS="$LDFLAGS"
13749 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13750 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13751 LDFLAGS="$LDFLAGS $RDYNAMIC"
13752 if test "${have_libpython}" = no; then
13753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13754/* end confdefs.h. */
13755
13756int
13757main ()
13758{
13759
13760 ;
13761 return 0;
13762}
13763_ACEOF
13764if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13765 dynamic_list=true
13766fi
13767rm -f core conftest.err conftest.$ac_objext \
13768 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13769 else
13770 # Workaround http://bugs.python.org/issue4434 where static
13771 # libpythonX.Y.a would get its symbols required for
13772 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13773 # Problem does not happen for the recommended libpythonX.Y.so linkage.
13774 old_CFLAGS="$CFLAGS"
13775 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13776 old_LIBS="$LIBS"
13777 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 13778 if test "$cross_compiling" = yes; then :
3bebe2f2 13779 true
f6528abd 13780else
3bebe2f2
JK
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782/* end confdefs.h. */
13783#include "${have_libpython}/Python.h"
13784int
13785main ()
13786{
13787int err;
38f6b338
JK
13788 Py_Initialize ();
13789 err = PyRun_SimpleString ("import itertools\n");
13790 Py_Finalize ();
13791 return err == 0 ? 0 : 1;
3bebe2f2
JK
13792 ;
13793 return 0;
13794}
13795_ACEOF
13796if ac_fn_c_try_run "$LINENO"; then :
13797 dynamic_list=true
13798fi
13799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13800 conftest.$ac_objext conftest.beam conftest.$ac_ext
13801fi
13802
8c1fb155 13803 LIBS="$old_LIBS"
38f6b338
JK
13804 CFLAGS="$old_CFLAGS"
13805 fi
13806 LDFLAGS="$old_LDFLAGS"
13807fi
13808if $dynamic_list; then
13809 found="-Wl,--dynamic-list"
13810 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13811else
38f6b338
JK
13812 found="-rdynamic"
13813 RDYNAMIC="-rdynamic"
f6528abd 13814fi
f6528abd 13815
38f6b338 13816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13817$as_echo "$found" >&6; }
0407b3f1 13818
f6528abd 13819
0407b3f1 13820if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13821 case ${host_os} in
c906108c 13822 solaris*)
d92419e5
JB
13823 # See if thread_db library is around for Solaris thread debugging.
13824 # Note that we must explicitly test for version 1 of the library
13825 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13826 # the same API.
81ecdfbb
RW
13827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13828$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13829 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13831$as_echo "yes" >&6; }
60ca704f 13832
81ecdfbb 13833$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13834
3483b318 13835 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13836 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13838$as_echo_n "checking for dlopen in -ldl... " >&6; }
13839if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13840 $as_echo_n "(cached) " >&6
c906108c 13841else
bec39cab 13842 ac_check_lib_save_LIBS=$LIBS
c906108c 13843LIBS="-ldl $LIBS"
81ecdfbb 13844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13845/* end confdefs.h. */
13846
81ecdfbb
RW
13847/* Override any GCC internal prototype to avoid an error.
13848 Use char because int might match the return type of a GCC
13849 builtin and then its argument prototype would still apply. */
bec39cab
AC
13850#ifdef __cplusplus
13851extern "C"
13852#endif
bec39cab
AC
13853char dlopen ();
13854int
13855main ()
13856{
81ecdfbb 13857return dlopen ();
bec39cab
AC
13858 ;
13859 return 0;
13860}
13861_ACEOF
81ecdfbb 13862if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13863 ac_cv_lib_dl_dlopen=yes
13864else
81ecdfbb 13865 ac_cv_lib_dl_dlopen=no
bec39cab 13866fi
81ecdfbb
RW
13867rm -f core conftest.err conftest.$ac_objext \
13868 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13869LIBS=$ac_check_lib_save_LIBS
13870fi
81ecdfbb
RW
13871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13872$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13873if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13874 cat >>confdefs.h <<_ACEOF
13875#define HAVE_LIBDL 1
13876_ACEOF
c906108c
SS
13877
13878 LIBS="-ldl $LIBS"
13879
c906108c
SS
13880fi
13881
f6528abd 13882 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13883 # Sun randomly tweaked the prototypes in <proc_service.h>
13884 # at one point.
81ecdfbb
RW
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13886$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13887 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13888 $as_echo_n "(cached) " >&6
c906108c 13889else
bec39cab 13890
81ecdfbb 13891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13892/* end confdefs.h. */
c906108c
SS
13893
13894 #include <proc_service.h>
13895 ps_err_e ps_pdwrite
13896 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13897
bec39cab
AC
13898int
13899main ()
13900{
13901
13902 ;
13903 return 0;
13904}
13905_ACEOF
81ecdfbb 13906if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13907 gdb_cv_proc_service_is_old=no
13908else
81ecdfbb 13909 gdb_cv_proc_service_is_old=yes
c906108c 13910fi
81ecdfbb 13911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13912
c906108c
SS
13913fi
13914
81ecdfbb
RW
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13916$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13917 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13918
81ecdfbb 13919$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13920
13921 fi
13922 else
81ecdfbb
RW
13923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13924$as_echo "no" >&6; }
c906108c
SS
13925 fi
13926 ;;
d92419e5 13927 aix*)
81ecdfbb
RW
13928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13929$as_echo_n "checking for AiX thread debugging library... " >&6; }
13930 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13931 $as_echo_n "(cached) " >&6
bec39cab 13932else
81ecdfbb 13933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13934/* end confdefs.h. */
d92419e5 13935#include <sys/pthdebug.h>
bec39cab
AC
13936int
13937main ()
13938{
d92419e5
JB
13939#ifndef PTHDB_VERSION_3
13940 #error
13941 #endif
bec39cab
AC
13942 ;
13943 return 0;
13944}
13945_ACEOF
81ecdfbb 13946if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13947 gdb_cv_have_aix_thread_debug=yes
13948else
81ecdfbb 13949 gdb_cv_have_aix_thread_debug=no
d92419e5 13950fi
81ecdfbb 13951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13952fi
13953
81ecdfbb
RW
13954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13955$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13956 if test $gdb_cv_have_aix_thread_debug = yes; then
13957 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13958 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13959 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13960
13961 # Older versions of AIX do not provide the declaration for
13962 # the getthrds function (it appears that it was introduced
13963 # with AIX 6.x).
13964 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13965"
13966if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13967 ac_have_decl=1
13968else
13969 ac_have_decl=0
13970fi
13971
13972cat >>confdefs.h <<_ACEOF
13973#define HAVE_DECL_GETTHRDS $ac_have_decl
13974_ACEOF
13975
d92419e5
JB
13976 fi
13977 ;;
c906108c 13978 esac
bec39cab 13979
c906108c
SS
13980fi
13981
3f47be5c 13982if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13984$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13985if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13986 $as_echo_n "(cached) " >&6
bec39cab 13987else
81ecdfbb 13988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13989/* end confdefs.h. */
3f47be5c 13990#include <thread_db.h>
bec39cab
AC
13991int
13992main ()
13993{
3f47be5c 13994int i = TD_NOTALLOC;
bec39cab
AC
13995 ;
13996 return 0;
13997}
13998_ACEOF
81ecdfbb 13999if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14000 gdb_cv_thread_db_h_has_td_notalloc=yes
14001else
81ecdfbb 14002 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14003
3f47be5c 14004fi
81ecdfbb 14005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14006
bec39cab 14007fi
81ecdfbb
RW
14008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14009$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14011$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14012if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14013 $as_echo_n "(cached) " >&6
59f80f10 14014else
81ecdfbb 14015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14016/* end confdefs.h. */
14017#include <thread_db.h>
14018int
14019main ()
14020{
14021int i = TD_VERSION;
14022 ;
14023 return 0;
14024}
14025_ACEOF
81ecdfbb 14026if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14027 gdb_cv_thread_db_h_has_td_version=yes
14028else
81ecdfbb 14029 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14030
14031fi
81ecdfbb 14032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14033
14034fi
81ecdfbb
RW
14035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14036$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14038$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14039if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14040 $as_echo_n "(cached) " >&6
59f80f10 14041else
81ecdfbb 14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14043/* end confdefs.h. */
14044#include <thread_db.h>
14045int
14046main ()
14047{
14048int i = TD_NOTLS;
14049 ;
14050 return 0;
14051}
14052_ACEOF
81ecdfbb 14053if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14054 gdb_cv_thread_db_h_has_td_notls=yes
14055else
81ecdfbb 14056 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14057
14058fi
81ecdfbb 14059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14060
14061fi
81ecdfbb
RW
14062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14063$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14064fi
14065if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14066
81ecdfbb 14067$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14068
59f80f10
DJ
14069fi
14070if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14071
81ecdfbb 14072$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14073
14074fi
14075if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14076
81ecdfbb 14077$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14078
3f47be5c
EZ
14079fi
14080
81ecdfbb
RW
14081ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14082"
14083if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14084 ac_have_decl=1
10568435 14085else
81ecdfbb 14086 ac_have_decl=0
10568435 14087fi
10568435
JK
14088
14089cat >>confdefs.h <<_ACEOF
81ecdfbb 14090#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14091_ACEOF
14092
14093
81ecdfbb
RW
14094if test "$cross_compiling" = yes; then :
14095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14096/* end confdefs.h. */
14097#include <sys/personality.h>
14098int
14099main ()
14100{
14101
14102# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14103# define ADDR_NO_RANDOMIZE 0x0040000
14104# endif
14105 /* Test the flag could be set and stays set. */
14106 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14107 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14108 return 1
14109 ;
14110 return 0;
14111}
14112_ACEOF
81ecdfbb 14113if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14114 have_personality=true
14115else
81ecdfbb 14116 have_personality=false
10568435 14117fi
81ecdfbb
RW
14118rm -f core conftest.err conftest.$ac_objext \
14119 conftest$ac_exeext conftest.$ac_ext
10568435 14120else
81ecdfbb 14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14122/* end confdefs.h. */
14123#include <sys/personality.h>
14124int
14125main ()
14126{
14127
14128# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14129# define ADDR_NO_RANDOMIZE 0x0040000
14130# endif
14131 /* Test the flag could be set and stays set. */
14132 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14133 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14134 return 1
14135 ;
14136 return 0;
14137}
14138_ACEOF
81ecdfbb 14139if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14140 have_personality=true
14141else
81ecdfbb 14142 have_personality=false
10568435 14143fi
81ecdfbb
RW
14144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14145 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14146fi
81ecdfbb 14147
10568435
JK
14148if $have_personality
14149then
14150
81ecdfbb 14151$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14152
14153fi
14154
e655c1a2
PA
14155case $host_os in
14156 go32* | *djgpp*)
14157 gdbinit=gdb.ini
14158 ;;
14159 *)
14160 gdbinit=.gdbinit
14161 ;;
14162esac
14163
14164cat >>confdefs.h <<_ACEOF
14165#define GDBINIT "$gdbinit"
14166_ACEOF
14167
14168
fb40c209 14169
f83d8a90
DE
14170# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14171# except that the argument to --with-sysroot is optional.
14172# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14173if test "x$with_sysroot" = xyes; then
14174 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14175fi
bec39cab 14176
81ecdfbb
RW
14177# Check whether --with-sysroot was given.
14178if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14179 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14180else
14181 TARGET_SYSTEM_ROOT=
14182fi
030292b7 14183
030292b7 14184
f83d8a90
DE
14185 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14186 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14187 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14188 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14189
f83d8a90
DE
14190cat >>confdefs.h <<_ACEOF
14191#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14192_ACEOF
bec39cab 14193
030292b7 14194
b14b1491 14195
f83d8a90
DE
14196
14197 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14198 if test "x$prefix" = xNONE; then
14199 test_prefix=/usr/local
14200 else
14201 test_prefix=$prefix
14202 fi
14203 else
14204 test_prefix=$exec_prefix
14205 fi
14206 value=0
14207 case ${ac_define_dir} in
14208 "${test_prefix}"|"${test_prefix}/"*|\
14209 '${exec_prefix}'|'${exec_prefix}/'*)
14210 value=1
14211 ;;
14212 esac
14213
14214cat >>confdefs.h <<_ACEOF
14215#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14216_ACEOF
030292b7
DJ
14217
14218
14219
16e7150e 14220
16e7150e 14221
81ecdfbb
RW
14222# Check whether --with-system-gdbinit was given.
14223if test "${with_system_gdbinit+set}" = set; then :
14224 withval=$with_system_gdbinit;
b14b1491
TT
14225 SYSTEM_GDBINIT=$withval
14226else
14227 SYSTEM_GDBINIT=
81ecdfbb
RW
14228fi
14229
16e7150e
JG
14230
14231 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14232 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14233 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14234 ac_define_dir=`eval echo $ac_define_dir`
14235
14236cat >>confdefs.h <<_ACEOF
14237#define SYSTEM_GDBINIT "$ac_define_dir"
14238_ACEOF
14239
14240
14241
0c4a4063 14242
b14b1491
TT
14243 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14244 if test "x$prefix" = xNONE; then
14245 test_prefix=/usr/local
14246 else
14247 test_prefix=$prefix
14248 fi
14249 else
14250 test_prefix=$exec_prefix
14251 fi
14252 value=0
14253 case ${ac_define_dir} in
14254 "${test_prefix}"|"${test_prefix}/"*|\
14255 '${exec_prefix}'|'${exec_prefix}/'*)
14256 value=1
14257 ;;
14258 esac
16e7150e 14259
b14b1491
TT
14260cat >>confdefs.h <<_ACEOF
14261#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14262_ACEOF
14263
b14b1491 14264
16e7150e 14265
0c4a4063 14266
b835bb52 14267
81ecdfbb
RW
14268# Check whether --enable-werror was given.
14269if test "${enable_werror+set}" = set; then :
14270 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14271 yes | y) ERROR_ON_WARNING="yes" ;;
14272 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14273 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14274 esac
81ecdfbb
RW
14275fi
14276
094a342e 14277
9a084706
PA
14278# Enable -Werror by default when using gcc. Turn it off for releases.
14279if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14280 ERROR_ON_WARNING=yes
14281fi
14282
14283WERROR_CFLAGS=""
14284if test "${ERROR_ON_WARNING}" = yes ; then
14285 WERROR_CFLAGS="-Werror"
14286fi
14287
3bc3d82a 14288# These options work in either C or C++ modes.
aac331e4 14289build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14290-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14291-Wno-switch -Wno-char-subscripts \
14292-Wempty-body"
a3b362c4 14293
3bc3d82a
PA
14294# Now add in C and C++ specific options, depending on mode.
14295if test "$enable_build_with_cxx" = "yes"; then
14296 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14297-Wno-narrowing"
14298else
aac331e4
PA
14299 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14300-Wdeclaration-after-statement -Wmissing-parameter-type \
14301-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14302fi
14303
3526781e
DJ
14304# Enable -Wno-format by default when using gcc on mingw since many
14305# GCC versions complain about %I64.
14306case "${host}" in
14307 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14308 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14309esac
14310
81ecdfbb
RW
14311# Check whether --enable-build-warnings was given.
14312if test "${enable_build_warnings+set}" = set; then :
14313 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14314 yes) ;;
14315 no) build_warnings="-w";;
14316 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14317 build_warnings="${build_warnings} ${t}";;
14318 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14319 build_warnings="${t} ${build_warnings}";;
14320 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14321esac
d4f3574e 14322if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14323 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14324fi
81ecdfbb
RW
14325fi
14326# Check whether --enable-gdb-build-warnings was given.
14327if test "${enable_gdb_build_warnings+set}" = set; then :
14328 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14329 yes) ;;
14330 no) build_warnings="-w";;
14331 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14332 build_warnings="${build_warnings} ${t}";;
14333 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14334 build_warnings="${t} ${build_warnings}";;
14335 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14336esac
14337if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14338 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14339fi
81ecdfbb 14340fi
3bc3d82a
PA
14341
14342# The set of warnings supported by a C++ compiler is not the same as
14343# of the C compiler.
14344if test "$enable_build_with_cxx" = "yes"; then
14345 ac_ext=cpp
14346ac_cpp='$CXXCPP $CPPFLAGS'
14347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14350
14351fi
14352
81ecdfbb 14353WARN_CFLAGS=""
c906108c
SS
14354if test "x${build_warnings}" != x -a "x$GCC" = xyes
14355then
81ecdfbb
RW
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14357$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14358 # Separate out the -Werror flag as some files just cannot be
14359 # compiled with it enabled.
14360 for w in ${build_warnings}; do
7544db95
PA
14361 # GCC does not complain about -Wno-unknown-warning. Invert
14362 # and test -Wunknown-warning instead.
14363 case $w in
14364 -Wno-*)
14365 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14366 *)
14367 wtest=$w ;;
14368 esac
14369
746a987d
AC
14370 case $w in
14371 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14372 *)
14373 # Check whether GCC accepts it.
4536bbc6 14374 saved_CFLAGS="$CFLAGS"
7544db95 14375 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14376 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14377 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14379/* end confdefs.h. */
4536bbc6 14380
bec39cab
AC
14381int
14382main ()
14383{
4536bbc6 14384
bec39cab
AC
14385 ;
14386 return 0;
14387}
14388_ACEOF
3bc3d82a 14389if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14390 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14391fi
81ecdfbb 14392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14393 CFLAGS="$saved_CFLAGS"
3bc3d82a 14394 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14395 esac
14396 done
81ecdfbb
RW
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14398$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14399fi
14400
14401
104c1213 14402
3bc3d82a
PA
14403if test "$enable_build_with_cxx" = "yes"; then
14404 ac_ext=c
14405ac_cpp='$CPP $CPPFLAGS'
14406ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14407ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14408ac_compiler_gnu=$ac_cv_c_compiler_gnu
14409
14410fi
14411
b835bb52 14412
7a292a7a 14413# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14415$as_echo_n "checking for cygwin... " >&6; }
14416if test "${gdb_cv_os_cygwin+set}" = set; then :
14417 $as_echo_n "(cached) " >&6
bec39cab 14418else
81ecdfbb 14419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14420/* end confdefs.h. */
7a292a7a
SS
14421
14422#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14423lose
14424#endif
bec39cab 14425_ACEOF
7a292a7a 14426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14427 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14428 gdb_cv_os_cygwin=yes
14429else
7a292a7a
SS
14430 gdb_cv_os_cygwin=no
14431fi
14432rm -f conftest*
14433
14434fi
81ecdfbb
RW
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14436$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14437
aff38e61 14438
3eb25fda 14439SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14440case ${host} in
95cbc983
AC
14441 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14442 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14443 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14444esac
14445
14446
cd0fc7c3
SS
14447# libreadline needs libuser32.a in a cygwin environment
14448WIN32LIBS=
14449if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14450 WIN32LIBS="-luser32"
14451 case "${target}" in
14452 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14453 ;;
14454 esac
cd0fc7c3 14455fi
c906108c 14456
b4505029
MM
14457# The ser-tcp.c module requires sockets.
14458case ${host} in
14459 *mingw32*)
14460
81ecdfbb 14461$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14462
14463 WIN32LIBS="$WIN32LIBS -lws2_32"
14464 ;;
14465esac
14466
7a292a7a 14467
31d99776 14468# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14469
14470 OLD_CFLAGS=$CFLAGS
14471 OLD_LDFLAGS=$LDFLAGS
14472 OLD_LIBS=$LIBS
14473 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14474 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14475 # always want our bfd.
14476 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14477 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14478 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14479 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14480 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14482$as_echo_n "checking for ELF support in BFD... " >&6; }
14483if test "${gdb_cv_var_elf+set}" = set; then :
14484 $as_echo_n "(cached) " >&6
31d99776 14485else
81ecdfbb 14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14487/* end confdefs.h. */
14488#include <stdlib.h>
def63ff0
TT
14489 #include "bfd.h"
14490 #include "elf-bfd.h"
31d99776
DJ
14491
14492int
14493main ()
14494{
def63ff0 14495return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14496 ;
14497 return 0;
14498}
14499_ACEOF
81ecdfbb 14500if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14501 gdb_cv_var_elf=yes
14502else
81ecdfbb 14503 gdb_cv_var_elf=no
31d99776 14504fi
81ecdfbb
RW
14505rm -f core conftest.err conftest.$ac_objext \
14506 conftest$ac_exeext conftest.$ac_ext
31d99776 14507fi
81ecdfbb
RW
14508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14509$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14510 CFLAGS=$OLD_CFLAGS
14511 LDFLAGS=$OLD_LDFLAGS
14512 LIBS=$OLD_LIBS
31d99776 14513if test $gdb_cv_var_elf = yes; then
d4777acb 14514 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14515
81ecdfbb 14516$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14517
075ff26d
JK
14518 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14519 if test "$plugins" = "yes"; then
a48b32c0
L
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14521$as_echo_n "checking for library containing dlopen... " >&6; }
14522if test "${ac_cv_search_dlopen+set}" = set; then :
14523 $as_echo_n "(cached) " >&6
14524else
14525 ac_func_search_save_LIBS=$LIBS
14526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527/* end confdefs.h. */
14528
14529/* Override any GCC internal prototype to avoid an error.
14530 Use char because int might match the return type of a GCC
14531 builtin and then its argument prototype would still apply. */
14532#ifdef __cplusplus
14533extern "C"
14534#endif
14535char dlopen ();
14536int
14537main ()
14538{
14539return dlopen ();
14540 ;
14541 return 0;
14542}
14543_ACEOF
14544for ac_lib in '' dl; do
14545 if test -z "$ac_lib"; then
14546 ac_res="none required"
14547 else
14548 ac_res=-l$ac_lib
14549 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14550 fi
14551 if ac_fn_c_try_link "$LINENO"; then :
14552 ac_cv_search_dlopen=$ac_res
14553fi
14554rm -f core conftest.err conftest.$ac_objext \
14555 conftest$ac_exeext
14556 if test "${ac_cv_search_dlopen+set}" = set; then :
14557 break
14558fi
14559done
14560if test "${ac_cv_search_dlopen+set}" = set; then :
14561
14562else
14563 ac_cv_search_dlopen=no
14564fi
14565rm conftest.$ac_ext
14566LIBS=$ac_func_search_save_LIBS
14567fi
14568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14569$as_echo "$ac_cv_search_dlopen" >&6; }
14570ac_res=$ac_cv_search_dlopen
14571if test "$ac_res" != no; then :
14572 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14573
14574fi
14575
075ff26d 14576 fi
31d99776 14577fi
31d99776 14578
4f05add4
TT
14579# Add macho support to GDB, but only if BFD includes it.
14580
14581 OLD_CFLAGS=$CFLAGS
14582 OLD_LDFLAGS=$LDFLAGS
14583 OLD_LIBS=$LIBS
14584 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14585 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14586 # always want our bfd.
14587 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14588 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14589 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14590 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14591 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14593$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14594if test "${gdb_cv_var_macho+set}" = set; then :
14595 $as_echo_n "(cached) " >&6
14596else
14597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14598/* end confdefs.h. */
14599#include <stdlib.h>
14600 #include "bfd.h"
14601 #include "mach-o.h"
14602
14603int
14604main ()
14605{
14606return bfd_mach_o_lookup_command (NULL, 0, NULL);
14607 ;
14608 return 0;
14609}
14610_ACEOF
14611if ac_fn_c_try_link "$LINENO"; then :
14612 gdb_cv_var_macho=yes
14613else
14614 gdb_cv_var_macho=no
14615fi
14616rm -f core conftest.err conftest.$ac_objext \
14617 conftest$ac_exeext conftest.$ac_ext
14618fi
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14620$as_echo "$gdb_cv_var_macho" >&6; }
14621 CFLAGS=$OLD_CFLAGS
14622 LDFLAGS=$OLD_LDFLAGS
14623 LIBS=$OLD_LIBS
14624if test $gdb_cv_var_macho = yes; then
14625 CONFIG_OBS="$CONFIG_OBS machoread.o"
14626fi
14627
121ce6e5
DJ
14628# Add any host-specific objects to GDB.
14629CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14630
608e2dbb
TT
14631# If building on ELF, look for lzma support for embedded compressed debug info.
14632if test $gdb_cv_var_elf = yes; then
14633
14634# Check whether --with-lzma was given.
14635if test "${with_lzma+set}" = set; then :
14636 withval=$with_lzma;
14637else
14638 with_lzma=auto
14639fi
14640
14641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14642$as_echo_n "checking whether to use lzma... " >&6; }
14643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14644$as_echo "$with_lzma" >&6; }
14645
14646 if test "${with_lzma}" != no; then
14647
14648
14649
14650
14651
14652
14653
14654
14655 use_additional=yes
14656
14657 acl_save_prefix="$prefix"
14658 prefix="$acl_final_prefix"
14659 acl_save_exec_prefix="$exec_prefix"
14660 exec_prefix="$acl_final_exec_prefix"
14661
14662 eval additional_includedir=\"$includedir\"
14663 eval additional_libdir=\"$libdir\"
14664
14665 exec_prefix="$acl_save_exec_prefix"
14666 prefix="$acl_save_prefix"
14667
14668
14669# Check whether --with-liblzma-prefix was given.
14670if test "${with_liblzma_prefix+set}" = set; then :
14671 withval=$with_liblzma_prefix;
14672 if test "X$withval" = "Xno"; then
14673 use_additional=no
14674 else
14675 if test "X$withval" = "X"; then
14676
14677 acl_save_prefix="$prefix"
14678 prefix="$acl_final_prefix"
14679 acl_save_exec_prefix="$exec_prefix"
14680 exec_prefix="$acl_final_exec_prefix"
14681
14682 eval additional_includedir=\"$includedir\"
14683 eval additional_libdir=\"$libdir\"
14684
14685 exec_prefix="$acl_save_exec_prefix"
14686 prefix="$acl_save_prefix"
14687
14688 else
14689 additional_includedir="$withval/include"
14690 additional_libdir="$withval/lib"
14691 fi
14692 fi
14693
14694fi
14695
14696 LIBLZMA=
14697 LTLIBLZMA=
14698 INCLZMA=
14699 rpathdirs=
14700 ltrpathdirs=
14701 names_already_handled=
14702 names_next_round='lzma '
14703 while test -n "$names_next_round"; do
14704 names_this_round="$names_next_round"
14705 names_next_round=
14706 for name in $names_this_round; do
14707 already_handled=
14708 for n in $names_already_handled; do
14709 if test "$n" = "$name"; then
14710 already_handled=yes
14711 break
14712 fi
14713 done
14714 if test -z "$already_handled"; then
14715 names_already_handled="$names_already_handled $name"
14716 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14717 eval value=\"\$HAVE_LIB$uppername\"
14718 if test -n "$value"; then
14719 if test "$value" = yes; then
14720 eval value=\"\$LIB$uppername\"
14721 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14722 eval value=\"\$LTLIB$uppername\"
14723 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14724 else
14725 :
14726 fi
14727 else
14728 found_dir=
14729 found_la=
14730 found_so=
14731 found_a=
14732 if test $use_additional = yes; then
14733 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14734 found_dir="$additional_libdir"
14735 found_so="$additional_libdir/lib$name.$shlibext"
14736 if test -f "$additional_libdir/lib$name.la"; then
14737 found_la="$additional_libdir/lib$name.la"
14738 fi
14739 else
14740 if test -f "$additional_libdir/lib$name.$libext"; then
14741 found_dir="$additional_libdir"
14742 found_a="$additional_libdir/lib$name.$libext"
14743 if test -f "$additional_libdir/lib$name.la"; then
14744 found_la="$additional_libdir/lib$name.la"
14745 fi
14746 fi
14747 fi
14748 fi
14749 if test "X$found_dir" = "X"; then
14750 for x in $LDFLAGS $LTLIBLZMA; do
14751
14752 acl_save_prefix="$prefix"
14753 prefix="$acl_final_prefix"
14754 acl_save_exec_prefix="$exec_prefix"
14755 exec_prefix="$acl_final_exec_prefix"
14756 eval x=\"$x\"
14757 exec_prefix="$acl_save_exec_prefix"
14758 prefix="$acl_save_prefix"
14759
14760 case "$x" in
14761 -L*)
14762 dir=`echo "X$x" | sed -e 's/^X-L//'`
14763 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14764 found_dir="$dir"
14765 found_so="$dir/lib$name.$shlibext"
14766 if test -f "$dir/lib$name.la"; then
14767 found_la="$dir/lib$name.la"
14768 fi
14769 else
14770 if test -f "$dir/lib$name.$libext"; then
14771 found_dir="$dir"
14772 found_a="$dir/lib$name.$libext"
14773 if test -f "$dir/lib$name.la"; then
14774 found_la="$dir/lib$name.la"
14775 fi
14776 fi
14777 fi
14778 ;;
14779 esac
14780 if test "X$found_dir" != "X"; then
14781 break
14782 fi
14783 done
14784 fi
14785 if test "X$found_dir" != "X"; then
14786 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14787 if test "X$found_so" != "X"; then
14788 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14789 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14790 else
14791 haveit=
14792 for x in $ltrpathdirs; do
14793 if test "X$x" = "X$found_dir"; then
14794 haveit=yes
14795 break
14796 fi
14797 done
14798 if test -z "$haveit"; then
14799 ltrpathdirs="$ltrpathdirs $found_dir"
14800 fi
14801 if test "$hardcode_direct" = yes; then
14802 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14803 else
14804 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14805 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14806 haveit=
14807 for x in $rpathdirs; do
14808 if test "X$x" = "X$found_dir"; then
14809 haveit=yes
14810 break
14811 fi
14812 done
14813 if test -z "$haveit"; then
14814 rpathdirs="$rpathdirs $found_dir"
14815 fi
14816 else
14817 haveit=
14818 for x in $LDFLAGS $LIBLZMA; do
14819
14820 acl_save_prefix="$prefix"
14821 prefix="$acl_final_prefix"
14822 acl_save_exec_prefix="$exec_prefix"
14823 exec_prefix="$acl_final_exec_prefix"
14824 eval x=\"$x\"
14825 exec_prefix="$acl_save_exec_prefix"
14826 prefix="$acl_save_prefix"
14827
14828 if test "X$x" = "X-L$found_dir"; then
14829 haveit=yes
14830 break
14831 fi
14832 done
14833 if test -z "$haveit"; then
14834 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14835 fi
14836 if test "$hardcode_minus_L" != no; then
14837 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14838 else
14839 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14840 fi
14841 fi
14842 fi
14843 fi
14844 else
14845 if test "X$found_a" != "X"; then
14846 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14847 else
14848 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14849 fi
14850 fi
14851 additional_includedir=
14852 case "$found_dir" in
14853 */lib | */lib/)
14854 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14855 additional_includedir="$basedir/include"
14856 ;;
14857 esac
14858 if test "X$additional_includedir" != "X"; then
14859 if test "X$additional_includedir" != "X/usr/include"; then
14860 haveit=
14861 if test "X$additional_includedir" = "X/usr/local/include"; then
14862 if test -n "$GCC"; then
14863 case $host_os in
14864 linux*) haveit=yes;;
14865 esac
14866 fi
14867 fi
14868 if test -z "$haveit"; then
14869 for x in $CPPFLAGS $INCLZMA; do
14870
14871 acl_save_prefix="$prefix"
14872 prefix="$acl_final_prefix"
14873 acl_save_exec_prefix="$exec_prefix"
14874 exec_prefix="$acl_final_exec_prefix"
14875 eval x=\"$x\"
14876 exec_prefix="$acl_save_exec_prefix"
14877 prefix="$acl_save_prefix"
14878
14879 if test "X$x" = "X-I$additional_includedir"; then
14880 haveit=yes
14881 break
14882 fi
14883 done
14884 if test -z "$haveit"; then
14885 if test -d "$additional_includedir"; then
14886 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14887 fi
14888 fi
14889 fi
14890 fi
14891 fi
14892 if test -n "$found_la"; then
14893 save_libdir="$libdir"
14894 case "$found_la" in
14895 */* | *\\*) . "$found_la" ;;
14896 *) . "./$found_la" ;;
14897 esac
14898 libdir="$save_libdir"
14899 for dep in $dependency_libs; do
14900 case "$dep" in
14901 -L*)
14902 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14903 if test "X$additional_libdir" != "X/usr/lib"; then
14904 haveit=
14905 if test "X$additional_libdir" = "X/usr/local/lib"; then
14906 if test -n "$GCC"; then
14907 case $host_os in
14908 linux*) haveit=yes;;
14909 esac
14910 fi
14911 fi
14912 if test -z "$haveit"; then
14913 haveit=
14914 for x in $LDFLAGS $LIBLZMA; do
14915
14916 acl_save_prefix="$prefix"
14917 prefix="$acl_final_prefix"
14918 acl_save_exec_prefix="$exec_prefix"
14919 exec_prefix="$acl_final_exec_prefix"
14920 eval x=\"$x\"
14921 exec_prefix="$acl_save_exec_prefix"
14922 prefix="$acl_save_prefix"
14923
14924 if test "X$x" = "X-L$additional_libdir"; then
14925 haveit=yes
14926 break
14927 fi
14928 done
14929 if test -z "$haveit"; then
14930 if test -d "$additional_libdir"; then
14931 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14932 fi
14933 fi
14934 haveit=
14935 for x in $LDFLAGS $LTLIBLZMA; do
14936
14937 acl_save_prefix="$prefix"
14938 prefix="$acl_final_prefix"
14939 acl_save_exec_prefix="$exec_prefix"
14940 exec_prefix="$acl_final_exec_prefix"
14941 eval x=\"$x\"
14942 exec_prefix="$acl_save_exec_prefix"
14943 prefix="$acl_save_prefix"
14944
14945 if test "X$x" = "X-L$additional_libdir"; then
14946 haveit=yes
14947 break
14948 fi
14949 done
14950 if test -z "$haveit"; then
14951 if test -d "$additional_libdir"; then
14952 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14953 fi
14954 fi
14955 fi
14956 fi
14957 ;;
14958 -R*)
14959 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14960 if test "$enable_rpath" != no; then
14961 haveit=
14962 for x in $rpathdirs; do
14963 if test "X$x" = "X$dir"; then
14964 haveit=yes
14965 break
14966 fi
14967 done
14968 if test -z "$haveit"; then
14969 rpathdirs="$rpathdirs $dir"
14970 fi
14971 haveit=
14972 for x in $ltrpathdirs; do
14973 if test "X$x" = "X$dir"; then
14974 haveit=yes
14975 break
14976 fi
14977 done
14978 if test -z "$haveit"; then
14979 ltrpathdirs="$ltrpathdirs $dir"
14980 fi
14981 fi
14982 ;;
14983 -l*)
14984 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14985 ;;
14986 *.la)
14987 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14988 ;;
14989 *)
14990 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14991 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14992 ;;
14993 esac
14994 done
14995 fi
14996 else
14997 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14998 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14999 fi
15000 fi
15001 fi
15002 done
15003 done
15004 if test "X$rpathdirs" != "X"; then
15005 if test -n "$hardcode_libdir_separator"; then
15006 alldirs=
15007 for found_dir in $rpathdirs; do
15008 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15009 done
15010 acl_save_libdir="$libdir"
15011 libdir="$alldirs"
15012 eval flag=\"$hardcode_libdir_flag_spec\"
15013 libdir="$acl_save_libdir"
15014 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15015 else
15016 for found_dir in $rpathdirs; do
15017 acl_save_libdir="$libdir"
15018 libdir="$found_dir"
15019 eval flag=\"$hardcode_libdir_flag_spec\"
15020 libdir="$acl_save_libdir"
15021 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15022 done
15023 fi
15024 fi
15025 if test "X$ltrpathdirs" != "X"; then
15026 for found_dir in $ltrpathdirs; do
15027 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15028 done
15029 fi
15030
15031
15032 ac_save_CPPFLAGS="$CPPFLAGS"
15033
15034 for element in $INCLZMA; do
15035 haveit=
15036 for x in $CPPFLAGS; do
15037
15038 acl_save_prefix="$prefix"
15039 prefix="$acl_final_prefix"
15040 acl_save_exec_prefix="$exec_prefix"
15041 exec_prefix="$acl_final_exec_prefix"
15042 eval x=\"$x\"
15043 exec_prefix="$acl_save_exec_prefix"
15044 prefix="$acl_save_prefix"
15045
15046 if test "X$x" = "X$element"; then
15047 haveit=yes
15048 break
15049 fi
15050 done
15051 if test -z "$haveit"; then
15052 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15053 fi
15054 done
15055
15056
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15058$as_echo_n "checking for liblzma... " >&6; }
15059if test "${ac_cv_liblzma+set}" = set; then :
15060 $as_echo_n "(cached) " >&6
15061else
15062
15063 ac_save_LIBS="$LIBS"
15064 LIBS="$LIBS $LIBLZMA"
15065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15066/* end confdefs.h. */
15067#include "lzma.h"
15068int
15069main ()
15070{
15071lzma_index_iter iter;
15072 lzma_index_iter_init (&iter, 0);
15073 lzma_mf_is_supported (LZMA_MF_HC3);
15074 ;
15075 return 0;
15076}
15077_ACEOF
15078if ac_fn_c_try_link "$LINENO"; then :
15079 ac_cv_liblzma=yes
15080else
15081 ac_cv_liblzma=no
15082fi
15083rm -f core conftest.err conftest.$ac_objext \
15084 conftest$ac_exeext conftest.$ac_ext
15085 LIBS="$ac_save_LIBS"
15086
15087fi
15088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15089$as_echo "$ac_cv_liblzma" >&6; }
15090 if test "$ac_cv_liblzma" = yes; then
15091 HAVE_LIBLZMA=yes
15092
15093$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15094
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15096$as_echo_n "checking how to link with liblzma... " >&6; }
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15098$as_echo "$LIBLZMA" >&6; }
15099 else
15100 HAVE_LIBLZMA=no
15101 CPPFLAGS="$ac_save_CPPFLAGS"
15102 LIBLZMA=
15103 LTLIBLZMA=
15104 fi
15105
15106
15107
15108
15109
15110
15111 if test "$HAVE_LIBLZMA" != yes; then
15112 if test "$with_lzma" = yes; then
15113 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15114 fi
15115 fi
15116 fi
15117fi
15118
3fc11d3e
JM
15119LIBGUI="../libgui/src/libgui.a"
15120GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15121
15122
7a292a7a 15123
3fc11d3e
JM
15124WIN32LDAPP=
15125
15126
15127
d91670b9 15128case "${host}" in
686a5eed 15129*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15130 configdir="win"
15131 ;;
15132*)
15133 configdir="unix"
15134 ;;
15135esac
3fc11d3e
JM
15136
15137GDBTKLIBS=
15138if test "${enable_gdbtk}" = "yes"; then
15139
d1c3b63a
KS
15140 # Gdbtk must have an absolute path to srcdir in order to run
15141 # properly when not installed.
15142 here=`pwd`
15143 cd ${srcdir}
15144 GDBTK_SRC_DIR=`pwd`
15145 cd $here
15146
bec39cab 15147
5062cc19
KS
15148 #
15149 # Ok, lets find the tcl configuration
15150 # First, look for one uninstalled.
15151 # the alternative search directory is invoked by --with-tcl
15152 #
3fc11d3e 15153
5062cc19
KS
15154 if test x"${no_tcl}" = x ; then
15155 # we reset no_tcl in case something fails here
15156 no_tcl=true
bec39cab 15157
81ecdfbb
RW
15158# Check whether --with-tcl was given.
15159if test "${with_tcl+set}" = set; then :
15160 withval=$with_tcl; with_tclconfig=${withval}
15161fi
15162
15163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15164$as_echo_n "checking for Tcl configuration... " >&6; }
15165 if test "${ac_cv_c_tclconfig+set}" = set; then :
15166 $as_echo_n "(cached) " >&6
3fc11d3e 15167else
bec39cab 15168
3fc11d3e 15169
5062cc19
KS
15170 # First check to see if --with-tcl was specified.
15171 case "${host}" in
15172 *-*-cygwin*) platDir="win" ;;
15173 *) platDir="unix" ;;
15174 esac
15175 if test x"${with_tclconfig}" != x ; then
15176 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15177 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15178 else
81ecdfbb 15179 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15180 fi
15181 fi
15182
15183 # then check for a private Tcl installation
15184 if test x"${ac_cv_c_tclconfig}" = x ; then
15185 for i in \
15186 ../tcl \
15187 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15188 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15189 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15190 ../../tcl \
15191 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15192 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15193 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15194 ../../../tcl \
15195 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15196 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15197 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15198 if test -f "$i/$platDir/tclConfig.sh" ; then
15199 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15200 break
15201 fi
15202 done
15203 fi
15204
15205 # on Darwin, check in Framework installation locations
15206 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15207 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15208 `ls -d /Library/Frameworks 2>/dev/null` \
15209 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15210 `ls -d /System/Library/Frameworks 2>/dev/null` \
15211 ; do
15212 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15213 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15214 break
15215 fi
15216 done
15217 fi
15218
15219 # check in a few common install locations
15220 if test x"${ac_cv_c_tclconfig}" = x ; then
15221 for i in `ls -d ${libdir} 2>/dev/null` \
15222 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15223 `ls -d ${prefix}/lib 2>/dev/null` \
15224 `ls -d /usr/local/lib 2>/dev/null` \
15225 `ls -d /usr/contrib/lib 2>/dev/null` \
15226 `ls -d /usr/lib 2>/dev/null` \
15227 ; do
15228 if test -f "$i/tclConfig.sh" ; then
15229 ac_cv_c_tclconfig=`(cd $i; pwd)`
15230 break
15231 fi
15232 done
15233 fi
3fc11d3e 15234
5062cc19
KS
15235 # check in a few other private locations
15236 if test x"${ac_cv_c_tclconfig}" = x ; then
15237 for i in \
15238 ${srcdir}/../tcl \
15239 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15240 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15241 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15242 if test -f "$i/$platDir/tclConfig.sh" ; then
15243 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15244 break
15245 fi
15246 done
15247 fi
bec39cab 15248
3fc11d3e
JM
15249fi
15250
5062cc19
KS
15251
15252 if test x"${ac_cv_c_tclconfig}" = x ; then
15253 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15255$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15256 else
15257 no_tcl=
15258 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15260$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15261 fi
15262 fi
3fc11d3e 15263
bec39cab 15264
85541719
DE
15265 # If $no_tk is nonempty, then we can't do Tk, and there is no
15266 # point to doing Tcl.
bec39cab 15267
5062cc19
KS
15268 #
15269 # Ok, lets find the tk configuration
15270 # First, look for one uninstalled.
15271 # the alternative search directory is invoked by --with-tk
15272 #
3fc11d3e 15273
5062cc19
KS
15274 if test x"${no_tk}" = x ; then
15275 # we reset no_tk in case something fails here
15276 no_tk=true
bec39cab 15277
81ecdfbb
RW
15278# Check whether --with-tk was given.
15279if test "${with_tk+set}" = set; then :
15280 withval=$with_tk; with_tkconfig=${withval}
15281fi
15282
15283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15284$as_echo_n "checking for Tk configuration... " >&6; }
15285 if test "${ac_cv_c_tkconfig+set}" = set; then :
15286 $as_echo_n "(cached) " >&6
bec39cab 15287else
3fc11d3e
JM
15288
15289
5062cc19
KS
15290 # First check to see if --with-tkconfig was specified.
15291 if test x"${with_tkconfig}" != x ; then
15292 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15293 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15294 else
81ecdfbb 15295 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15296 fi
15297 fi
3fc11d3e 15298
5062cc19
KS
15299 # then check for a private Tk library
15300 case "${host}" in
15301 *-*-cygwin*) platDir="win" ;;
15302 *) platDir="unix" ;;
15303 esac
15304 if test x"${ac_cv_c_tkconfig}" = x ; then
15305 for i in \
15306 ../tk \
15307 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15308 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15309 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15310 ../../tk \
15311 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15312 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15313 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15314 ../../../tk \
15315 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15316 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15317 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15318 if test -f "$i/$platDir/tkConfig.sh" ; then
15319 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15320 break
15321 fi
15322 done
15323 fi
15324
15325 # on Darwin, check in Framework installation locations
15326 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15327 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15328 `ls -d /Library/Frameworks 2>/dev/null` \
15329 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15330 `ls -d /System/Library/Frameworks 2>/dev/null` \
15331 ; do
15332 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15333 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15334 break
15335 fi
15336 done
15337 fi
15338
15339 # check in a few common install locations
15340 if test x"${ac_cv_c_tkconfig}" = x ; then
15341 for i in `ls -d ${libdir} 2>/dev/null` \
15342 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15343 `ls -d ${prefix}/lib 2>/dev/null` \
15344 `ls -d /usr/local/lib 2>/dev/null` \
15345 `ls -d /usr/contrib/lib 2>/dev/null` \
15346 `ls -d /usr/lib 2>/dev/null` \
15347 ; do
15348 if test -f "$i/tkConfig.sh" ; then
15349 ac_cv_c_tkconfig=`(cd $i; pwd)`
15350 break
15351 fi
15352 done
15353 fi
15354 # check in a few other private locations
15355 if test x"${ac_cv_c_tkconfig}" = x ; then
15356 for i in \
15357 ${srcdir}/../tk \
15358 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15359 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15360 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15361 if test -f "$i/$platDir/tkConfig.sh" ; then
15362 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15363 break
15364 fi
15365 done
15366 fi
3fc11d3e 15367
3fc11d3e
JM
15368fi
15369
15370
5062cc19
KS
15371 if test x"${ac_cv_c_tkconfig}" = x ; then
15372 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15374$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15375 else
15376 no_tk=
15377 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15379$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15380 fi
3fc11d3e 15381 fi
dd2504ab 15382
dd2504ab 15383
85541719
DE
15384 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15385
81ecdfbb
RW
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15387$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15388
15389 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15391$as_echo "loading" >&6; }
85541719
DE
15392 . ${TCL_BIN_DIR}/tclConfig.sh
15393 else
81ecdfbb
RW
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15395$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15396 fi
15397
15398 # eval is required to do the TCL_DBGX substitution
15399 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15400 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15401
15402 # If the TCL_BIN_DIR is the build directory (not the install directory),
15403 # then set the common variable name to the value of the build variables.
15404 # For example, the variable TCL_LIB_SPEC will be set to the value
15405 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15406 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15407 # installed and uninstalled version of Tcl.
15408 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15409 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15410 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15411 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15412 elif test "`uname -s`" = "Darwin"; then
15413 # If Tcl was built as a framework, attempt to use the libraries
15414 # from the framework at the given location so that linking works
a68ffae9 15415 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15416 case ${TCL_DEFS} in
15417 *TCL_FRAMEWORK*)
15418 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15419 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15420 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15421 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15422 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15423 break
15424 fi
15425 done
15426 fi
15427 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15428 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15429 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15430 fi
15431 ;;
15432 esac
15433 fi
15434
15435 # eval is required to do the TCL_DBGX substitution
15436 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15437 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15438 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15439 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455 # Check for in-tree tcl
15456 here=`pwd`
15457 cd ${srcdir}/..
15458 topdir=`pwd`
15459 cd ${here}
15460
15461 intree="no"
15462 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15463 intree="yes"
15464 fi
15465
15466 # Find Tcl private headers
15467 if test x"${intree}" = xno; then
15468
81ecdfbb
RW
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15470$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15471 private_dir=""
15472 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15473 if test -f ${dir}/tclInt.h ; then
15474 private_dir=${dir}
15475 fi
15476
15477 if test x"${private_dir}" = x; then
81ecdfbb 15478 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15479 else
15480 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15482$as_echo "${private_dir}" >&6; }
85541719
DE
15483 fi
15484
15485 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15486 TCL_LIBRARY="${TCL_LIB_SPEC}"
15487 TCL_DEPS=""
15488 else
15489 # If building tcl in the same src tree, private headers
15490 # are not needed, but we need to be sure to use the right
15491 # headers library
15492 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15493 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15494 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15495 fi
15496
15497
15498
15499
15500
81ecdfbb
RW
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15502$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15503
5062cc19 15504 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15506$as_echo "loading" >&6; }
5062cc19 15507 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15508 else
81ecdfbb
RW
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15510$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15511 fi
bec39cab 15512
5062cc19
KS
15513 # eval is required to do the TK_DBGX substitution
15514 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15515 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15516
15517 # If the TK_BIN_DIR is the build directory (not the install directory),
15518 # then set the common variable name to the value of the build variables.
15519 # For example, the variable TK_LIB_SPEC will be set to the value
15520 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15521 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15522 # installed and uninstalled version of Tcl.
85541719 15523 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15524 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15525 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15526 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15527 elif test "`uname -s`" = "Darwin"; then
15528 # If Tk was built as a framework, attempt to use the libraries
15529 # from the framework at the given location so that linking works
a68ffae9 15530 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15531 case ${TK_DEFS} in
15532 *TK_FRAMEWORK*)
85541719 15533 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15534 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15535 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15536 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15537 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15538 break
15539 fi
15540 done
15541 fi
85541719 15542 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15543 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15544 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15545 fi
15546 ;;
15547 esac
3fc11d3e
JM
15548 fi
15549
5062cc19
KS
15550 # eval is required to do the TK_DBGX substitution
15551 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15552 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15553 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15554 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15555
3fc11d3e
JM
15556
15557
bec39cab
AC
15558
15559
15560
15561
15562
15563
15564
3fc11d3e 15565
3fc11d3e 15566
bec39cab 15567
bec39cab 15568
85541719
DE
15569 # Check for in-tree Tk
15570 intree="no"
15571 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15572 intree="yes"
15573 fi
3fc11d3e 15574
85541719
DE
15575 # Find Tk private headers
15576 if test x"${intree}" = xno; then
3fc11d3e 15577
81ecdfbb
RW
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15579$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15580 private_dir=""
15581 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15582 if test -f ${dir}/tkInt.h; then
15583 private_dir=${dir}
3fc11d3e 15584 fi
bec39cab 15585
5062cc19 15586 if test x"${private_dir}" = x; then
81ecdfbb 15587 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15588 else
5062cc19 15589 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15591$as_echo "${private_dir}" >&6; }
3fc11d3e 15592 fi
3fc11d3e 15593
85541719
DE
15594 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15595 TK_LIBRARY=${TK_LIB_SPEC}
15596 TK_DEPS=""
15597 else
15598 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15599 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15600 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15601 fi
3fc11d3e
JM
15602
15603
3fc11d3e
JM
15604
15605
3fc11d3e 15606
85541719 15607 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15608
85541719
DE
15609 # Include some libraries that Tcl and Tk want.
15610 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15611 # Yes, the ordering seems wrong here. But it isn't.
15612 # TK_LIBS is the list of libraries that need to be linked
15613 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15614 # were in LIBS then any link tests after this point would
15615 # try to include things like `$(LIBGUI)', which wouldn't work.
15616 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15617
85541719
DE
15618 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15619 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15620 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15621 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15622 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15623 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15624 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15625
85541719
DE
15626 if test x$gdb_cv_os_cygwin = xyes; then
15627 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15628 WIN32LDAPP="-Wl,--subsystem,console"
15629 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15630 fi
ffc6a242 15631
81ecdfbb 15632 subdirs="$subdirs gdbtk"
3ace7edb 15633
85541719 15634 fi
3fc11d3e
JM
15635fi
15636
15637
15638
15639
15640
15641
15642
15643
81ecdfbb
RW
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15645$as_echo_n "checking for X... " >&6; }
bec39cab 15646
c906108c 15647
81ecdfbb
RW
15648# Check whether --with-x was given.
15649if test "${with_x+set}" = set; then :
15650 withval=$with_x;
15651fi
c906108c
SS
15652
15653# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15654if test "x$with_x" = xno; then
15655 # The user explicitly disabled X.
15656 have_x=disabled
15657else
81ecdfbb
RW
15658 case $x_includes,$x_libraries in #(
15659 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15660 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15661 $as_echo_n "(cached) " >&6
c906108c
SS
15662else
15663 # One or both of the vars are not set, and there is no cached value.
bec39cab 15664ac_x_includes=no ac_x_libraries=no
81ecdfbb 15665rm -f -r conftest.dir
bec39cab
AC
15666if mkdir conftest.dir; then
15667 cd conftest.dir
bec39cab 15668 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15669incroot:
15670 @echo incroot='${INCROOT}'
15671usrlibdir:
15672 @echo usrlibdir='${USRLIBDIR}'
15673libdir:
15674 @echo libdir='${LIBDIR}'
15675_ACEOF
15676 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15677 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15678 for ac_var in incroot usrlibdir libdir; do
15679 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15680 done
c906108c 15681 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15682 for ac_extension in a so sl dylib la dll; do
15683 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15684 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15685 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15686 fi
15687 done
15688 # Screen out bogus values from the imake configuration. They are
15689 # bogus both because they are the default anyway, and because
15690 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15691 case $ac_im_incroot in
81ecdfbb 15692 /usr/include) ac_x_includes= ;;
bec39cab 15693 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15694 esac
bec39cab 15695 case $ac_im_usrlibdir in
81ecdfbb 15696 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15697 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15698 esac
15699 fi
15700 cd ..
81ecdfbb 15701 rm -f -r conftest.dir
c906108c
SS
15702fi
15703
bec39cab
AC
15704# Standard set of common directories for X headers.
15705# Check X11 before X11Rn because it is often a symlink to the current release.
15706ac_x_header_dirs='
15707/usr/X11/include
81ecdfbb 15708/usr/X11R7/include
bec39cab
AC
15709/usr/X11R6/include
15710/usr/X11R5/include
15711/usr/X11R4/include
15712
15713/usr/include/X11
81ecdfbb 15714/usr/include/X11R7
bec39cab
AC
15715/usr/include/X11R6
15716/usr/include/X11R5
15717/usr/include/X11R4
15718
15719/usr/local/X11/include
81ecdfbb 15720/usr/local/X11R7/include
bec39cab
AC
15721/usr/local/X11R6/include
15722/usr/local/X11R5/include
15723/usr/local/X11R4/include
15724
15725/usr/local/include/X11
81ecdfbb 15726/usr/local/include/X11R7
bec39cab
AC
15727/usr/local/include/X11R6
15728/usr/local/include/X11R5
15729/usr/local/include/X11R4
15730
15731/usr/X386/include
15732/usr/x386/include
15733/usr/XFree86/include/X11
15734
15735/usr/include
15736/usr/local/include
15737/usr/unsupported/include
15738/usr/athena/include
15739/usr/local/x11r5/include
15740/usr/lpp/Xamples/include
15741
15742/usr/openwin/include
15743/usr/openwin/share/include'
15744
15745if test "$ac_x_includes" = no; then
81ecdfbb 15746 # Guess where to find include files, by looking for Xlib.h.
c906108c 15747 # First, try using that file with no special directory specified.
81ecdfbb 15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15749/* end confdefs.h. */
81ecdfbb 15750#include <X11/Xlib.h>
bec39cab 15751_ACEOF
81ecdfbb 15752if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15753 # We can compile using X headers with no special include directory.
15754ac_x_includes=
15755else
bec39cab 15756 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15757 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15758 ac_x_includes=$ac_dir
15759 break
15760 fi
15761done
c906108c 15762fi
bec39cab
AC
15763rm -f conftest.err conftest.$ac_ext
15764fi # $ac_x_includes = no
c906108c 15765
bec39cab 15766if test "$ac_x_libraries" = no; then
c906108c 15767 # Check for the libraries.
c906108c
SS
15768 # See if we find them without any special options.
15769 # Don't add to $LIBS permanently.
bec39cab 15770 ac_save_LIBS=$LIBS
81ecdfbb
RW
15771 LIBS="-lX11 $LIBS"
15772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15773/* end confdefs.h. */
81ecdfbb 15774#include <X11/Xlib.h>
bec39cab
AC
15775int
15776main ()
15777{
81ecdfbb 15778XrmInitialize ()
bec39cab
AC
15779 ;
15780 return 0;
15781}
15782_ACEOF
81ecdfbb 15783if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15784 LIBS=$ac_save_LIBS
c906108c
SS
15785# We can link X programs with no special library path.
15786ac_x_libraries=
15787else
81ecdfbb
RW
15788 LIBS=$ac_save_LIBS
15789for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15790do
bec39cab 15791 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15792 for ac_extension in a so sl dylib la dll; do
15793 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15794 ac_x_libraries=$ac_dir
15795 break 2
15796 fi
15797 done
15798done
15799fi
81ecdfbb
RW
15800rm -f core conftest.err conftest.$ac_objext \
15801 conftest$ac_exeext conftest.$ac_ext
bec39cab 15802fi # $ac_x_libraries = no
c906108c 15803
81ecdfbb
RW
15804case $ac_x_includes,$ac_x_libraries in #(
15805 no,* | *,no | *\'*)
15806 # Didn't find X, or a directory has "'" in its name.
15807 ac_cv_have_x="have_x=no";; #(
15808 *)
15809 # Record where we found X for the cache.
15810 ac_cv_have_x="have_x=yes\
15811 ac_x_includes='$ac_x_includes'\
15812 ac_x_libraries='$ac_x_libraries'"
15813esac
c906108c 15814fi
81ecdfbb
RW
15815;; #(
15816 *) have_x=yes;;
15817 esac
c906108c
SS
15818 eval "$ac_cv_have_x"
15819fi # $with_x != no
15820
15821if test "$have_x" != yes; then
81ecdfbb
RW
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15823$as_echo "$have_x" >&6; }
c906108c
SS
15824 no_x=yes
15825else
15826 # If each of the values was on the command line, it overrides each guess.
15827 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15828 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15829 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15830 ac_cv_have_x="have_x=yes\
15831 ac_x_includes='$x_includes'\
15832 ac_x_libraries='$x_libraries'"
15833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15834$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15835fi
15836
15837
bec39cab 15838# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15839# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15840# This code just checks for a few cases where we'd like to ignore those
15841# definitions, even when they're present in the '.mt' file. These cases
15842# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15843# not part of the source tree.
7a292a7a 15844#
81ecdfbb
RW
15845# Check whether --enable-sim was given.
15846if test "${enable_sim+set}" = set; then :
15847 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15848 echo "enableval = ${enableval}";
15849 case "${enableval}" in
15850 yes) ignore_sim=false ;;
15851 no) ignore_sim=true ;;
15852 *) ignore_sim=false ;;
15853 esac
15854else
15855 ignore_sim=false
81ecdfbb
RW
15856fi
15857
7a292a7a
SS
15858
15859if test ! -d "${srcdir}/../sim"; then
15860 ignore_sim=true
15861fi
15862
9b624dbe
UW
15863SIM=
15864SIM_OBS=
15865if test "${ignore_sim}" = "false"; then
15866 if test x"${gdb_sim}" != x ; then
15867 SIM="${gdb_sim}"
15868 SIM_OBS="remote-sim.o"
60ca704f 15869
81ecdfbb 15870$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15871
976102cd
PA
15872
15873 # Some tdep code should only be compiled in when the ppc sim is
15874 # built. PR sim/13418.
15875 case $target in
15876 powerpc*-*-*)
15877
15878$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15879
15880 ;;
15881 esac
9b624dbe 15882 fi
7a292a7a
SS
15883fi
15884
15885
15886
c906108c
SS
15887
15888
15889
15890
15891
15892
dfcd3bfb 15893
e56ac5c3
AC
15894
15895
b3a90332
AC
15896
15897
c35f4ffc 15898# List of host floatformats.
bec39cab
AC
15899
15900cat >>confdefs.h <<_ACEOF
c35f4ffc 15901#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15902_ACEOF
c35f4ffc 15903
bec39cab
AC
15904
15905cat >>confdefs.h <<_ACEOF
c35f4ffc 15906#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15907_ACEOF
15908
c35f4ffc 15909
bec39cab 15910cat >>confdefs.h <<_ACEOF
c35f4ffc 15911#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15912_ACEOF
c35f4ffc
AC
15913
15914
c906108c
SS
15915# target_subdir is used by the testsuite to find the target libraries.
15916target_subdir=
15917if test "${host}" != "${target}"; then
15918 target_subdir="${target_alias}/"
15919fi
15920
15921
15922frags=
771b4502 15923if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15924 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15925 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15926 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15927 fi
15928 frags="$frags $host_makefile_frag"
15929else
15930 host_makefile_frag=/dev/null
c906108c 15931fi
c906108c 15932
c906108c
SS
15933
15934
15935
771b4502 15936if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15937# We pick this up from the host configuration file (.mh) because we
15938# do not have a native configuration Makefile fragment.
c906108c
SS
15939nativefile=`sed -n '
15940s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15941' ${host_makefile_frag}`
c906108c
SS
15942fi
15943
15944
b00a8037 15945if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15946
15947cat >>confdefs.h <<_ACEOF
b00a8037 15948#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15949_ACEOF
b00a8037
DJ
15950
15951fi
15952
8dcde887 15953# Enable multi-ice-gdb-server.
81ecdfbb
RW
15954# Check whether --enable-multi-ice was given.
15955if test "${enable_multi_ice+set}" = set; then :
15956 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15957 yes | no)
15958 ;;
81ecdfbb 15959 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15960 esac
81ecdfbb 15961fi
b4e70030 15962
81ecdfbb
RW
15963if test "x$enable_multi_ice" = xyes; then
15964 subdirs="$subdirs multi-ice"
3ace7edb 15965
a85f51e7
DJ
15966fi
15967
496c0e1b
JB
15968# Check whether --enable-gdbserver was given.
15969if test "${enable_gdbserver+set}" = set; then :
15970 enableval=$enable_gdbserver; case "${enableval}" in
15971 yes| no|auto) ;;
15972 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15973esac
15974else
15975 enable_gdbserver=auto
15976fi
15977
15978
15979# We only build gdbserver automatically in a native configuration, and
15980# only if the user did not explicitly disable its build.
15981if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15983$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15984 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15986$as_echo "yes" >&6; }
15987 subdirs="$subdirs gdbserver"
3ace7edb 15988
496c0e1b 15989 gdbserver_build_enabled=yes
8dcde887 15990 else
81ecdfbb
RW
15991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15992$as_echo "no" >&6; }
8dcde887
MK
15993 fi
15994fi
15995
496c0e1b
JB
15996# If the user explicitly request the gdbserver to be built, verify that
15997# we were in fact able to enable it.
15998if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15999 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16000fi
16001
393fd4c3
YQ
16002# Check for babeltrace and babeltrace-ctf
16003
16004# Check whether --with-babeltrace was given.
16005if test "${with_babeltrace+set}" = set; then :
16006 withval=$with_babeltrace;
16007else
16008 with_babeltrace=auto
16009fi
16010
16011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16012$as_echo_n "checking whether to use babeltrace... " >&6; }
16013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16014$as_echo "$with_babeltrace" >&6; }
16015
16016if test "x$with_babeltrace" = "xno"; then
16017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16018$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16019else
16020 # Append -Werror to CFLAGS so that configure can catch the warning
16021 # "assignment from incompatible pointer type", which is related to
16022 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16023 # in GDB, while babeltrace 1.0.3 is broken.
16024 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16025 # safe to save and restore CFLAGS here.
16026 saved_CFLAGS=$CFLAGS
16027 CFLAGS="$CFLAGS -Werror"
16028
16029
16030
16031
16032
16033
16034
16035
16036 use_additional=yes
16037
16038 acl_save_prefix="$prefix"
16039 prefix="$acl_final_prefix"
16040 acl_save_exec_prefix="$exec_prefix"
16041 exec_prefix="$acl_final_exec_prefix"
16042
16043 eval additional_includedir=\"$includedir\"
16044 eval additional_libdir=\"$libdir\"
16045
16046 exec_prefix="$acl_save_exec_prefix"
16047 prefix="$acl_save_prefix"
16048
16049
16050# Check whether --with-libbabeltrace-prefix was given.
16051if test "${with_libbabeltrace_prefix+set}" = set; then :
16052 withval=$with_libbabeltrace_prefix;
16053 if test "X$withval" = "Xno"; then
16054 use_additional=no
16055 else
16056 if test "X$withval" = "X"; then
16057
16058 acl_save_prefix="$prefix"
16059 prefix="$acl_final_prefix"
16060 acl_save_exec_prefix="$exec_prefix"
16061 exec_prefix="$acl_final_exec_prefix"
16062
16063 eval additional_includedir=\"$includedir\"
16064 eval additional_libdir=\"$libdir\"
16065
16066 exec_prefix="$acl_save_exec_prefix"
16067 prefix="$acl_save_prefix"
16068
16069 else
16070 additional_includedir="$withval/include"
16071 additional_libdir="$withval/lib"
16072 fi
16073 fi
16074
16075fi
16076
16077 LIBBABELTRACE=
16078 LTLIBBABELTRACE=
16079 INCBABELTRACE=
16080 rpathdirs=
16081 ltrpathdirs=
16082 names_already_handled=
16083 names_next_round='babeltrace babeltrace-ctf'
16084 while test -n "$names_next_round"; do
16085 names_this_round="$names_next_round"
16086 names_next_round=
16087 for name in $names_this_round; do
16088 already_handled=
16089 for n in $names_already_handled; do
16090 if test "$n" = "$name"; then
16091 already_handled=yes
16092 break
16093 fi
16094 done
16095 if test -z "$already_handled"; then
16096 names_already_handled="$names_already_handled $name"
16097 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16098 eval value=\"\$HAVE_LIB$uppername\"
16099 if test -n "$value"; then
16100 if test "$value" = yes; then
16101 eval value=\"\$LIB$uppername\"
16102 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16103 eval value=\"\$LTLIB$uppername\"
16104 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16105 else
16106 :
16107 fi
16108 else
16109 found_dir=
16110 found_la=
16111 found_so=
16112 found_a=
16113 if test $use_additional = yes; then
16114 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16115 found_dir="$additional_libdir"
16116 found_so="$additional_libdir/lib$name.$shlibext"
16117 if test -f "$additional_libdir/lib$name.la"; then
16118 found_la="$additional_libdir/lib$name.la"
16119 fi
16120 else
16121 if test -f "$additional_libdir/lib$name.$libext"; then
16122 found_dir="$additional_libdir"
16123 found_a="$additional_libdir/lib$name.$libext"
16124 if test -f "$additional_libdir/lib$name.la"; then
16125 found_la="$additional_libdir/lib$name.la"
16126 fi
16127 fi
16128 fi
16129 fi
16130 if test "X$found_dir" = "X"; then
16131 for x in $LDFLAGS $LTLIBBABELTRACE; do
16132
16133 acl_save_prefix="$prefix"
16134 prefix="$acl_final_prefix"
16135 acl_save_exec_prefix="$exec_prefix"
16136 exec_prefix="$acl_final_exec_prefix"
16137 eval x=\"$x\"
16138 exec_prefix="$acl_save_exec_prefix"
16139 prefix="$acl_save_prefix"
16140
16141 case "$x" in
16142 -L*)
16143 dir=`echo "X$x" | sed -e 's/^X-L//'`
16144 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16145 found_dir="$dir"
16146 found_so="$dir/lib$name.$shlibext"
16147 if test -f "$dir/lib$name.la"; then
16148 found_la="$dir/lib$name.la"
16149 fi
16150 else
16151 if test -f "$dir/lib$name.$libext"; then
16152 found_dir="$dir"
16153 found_a="$dir/lib$name.$libext"
16154 if test -f "$dir/lib$name.la"; then
16155 found_la="$dir/lib$name.la"
16156 fi
16157 fi
16158 fi
16159 ;;
16160 esac
16161 if test "X$found_dir" != "X"; then
16162 break
16163 fi
16164 done
16165 fi
16166 if test "X$found_dir" != "X"; then
16167 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16168 if test "X$found_so" != "X"; then
16169 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16170 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16171 else
16172 haveit=
16173 for x in $ltrpathdirs; do
16174 if test "X$x" = "X$found_dir"; then
16175 haveit=yes
16176 break
16177 fi
16178 done
16179 if test -z "$haveit"; then
16180 ltrpathdirs="$ltrpathdirs $found_dir"
16181 fi
16182 if test "$hardcode_direct" = yes; then
16183 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16184 else
16185 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16186 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16187 haveit=
16188 for x in $rpathdirs; do
16189 if test "X$x" = "X$found_dir"; then
16190 haveit=yes
16191 break
16192 fi
16193 done
16194 if test -z "$haveit"; then
16195 rpathdirs="$rpathdirs $found_dir"
16196 fi
16197 else
16198 haveit=
16199 for x in $LDFLAGS $LIBBABELTRACE; do
16200
16201 acl_save_prefix="$prefix"
16202 prefix="$acl_final_prefix"
16203 acl_save_exec_prefix="$exec_prefix"
16204 exec_prefix="$acl_final_exec_prefix"
16205 eval x=\"$x\"
16206 exec_prefix="$acl_save_exec_prefix"
16207 prefix="$acl_save_prefix"
16208
16209 if test "X$x" = "X-L$found_dir"; then
16210 haveit=yes
16211 break
16212 fi
16213 done
16214 if test -z "$haveit"; then
16215 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16216 fi
16217 if test "$hardcode_minus_L" != no; then
16218 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16219 else
16220 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16221 fi
16222 fi
16223 fi
16224 fi
16225 else
16226 if test "X$found_a" != "X"; then
16227 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16228 else
16229 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16230 fi
16231 fi
16232 additional_includedir=
16233 case "$found_dir" in
16234 */lib | */lib/)
16235 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16236 additional_includedir="$basedir/include"
16237 ;;
16238 esac
16239 if test "X$additional_includedir" != "X"; then
16240 if test "X$additional_includedir" != "X/usr/include"; then
16241 haveit=
16242 if test "X$additional_includedir" = "X/usr/local/include"; then
16243 if test -n "$GCC"; then
16244 case $host_os in
16245 linux*) haveit=yes;;
16246 esac
16247 fi
16248 fi
16249 if test -z "$haveit"; then
16250 for x in $CPPFLAGS $INCBABELTRACE; do
16251
16252 acl_save_prefix="$prefix"
16253 prefix="$acl_final_prefix"
16254 acl_save_exec_prefix="$exec_prefix"
16255 exec_prefix="$acl_final_exec_prefix"
16256 eval x=\"$x\"
16257 exec_prefix="$acl_save_exec_prefix"
16258 prefix="$acl_save_prefix"
16259
16260 if test "X$x" = "X-I$additional_includedir"; then
16261 haveit=yes
16262 break
16263 fi
16264 done
16265 if test -z "$haveit"; then
16266 if test -d "$additional_includedir"; then
16267 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16268 fi
16269 fi
16270 fi
16271 fi
16272 fi
16273 if test -n "$found_la"; then
16274 save_libdir="$libdir"
16275 case "$found_la" in
16276 */* | *\\*) . "$found_la" ;;
16277 *) . "./$found_la" ;;
16278 esac
16279 libdir="$save_libdir"
16280 for dep in $dependency_libs; do
16281 case "$dep" in
16282 -L*)
16283 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16284 if test "X$additional_libdir" != "X/usr/lib"; then
16285 haveit=
16286 if test "X$additional_libdir" = "X/usr/local/lib"; then
16287 if test -n "$GCC"; then
16288 case $host_os in
16289 linux*) haveit=yes;;
16290 esac
16291 fi
16292 fi
16293 if test -z "$haveit"; then
16294 haveit=
16295 for x in $LDFLAGS $LIBBABELTRACE; do
16296
16297 acl_save_prefix="$prefix"
16298 prefix="$acl_final_prefix"
16299 acl_save_exec_prefix="$exec_prefix"
16300 exec_prefix="$acl_final_exec_prefix"
16301 eval x=\"$x\"
16302 exec_prefix="$acl_save_exec_prefix"
16303 prefix="$acl_save_prefix"
16304
16305 if test "X$x" = "X-L$additional_libdir"; then
16306 haveit=yes
16307 break
16308 fi
16309 done
16310 if test -z "$haveit"; then
16311 if test -d "$additional_libdir"; then
16312 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16313 fi
16314 fi
16315 haveit=
16316 for x in $LDFLAGS $LTLIBBABELTRACE; do
16317
16318 acl_save_prefix="$prefix"
16319 prefix="$acl_final_prefix"
16320 acl_save_exec_prefix="$exec_prefix"
16321 exec_prefix="$acl_final_exec_prefix"
16322 eval x=\"$x\"
16323 exec_prefix="$acl_save_exec_prefix"
16324 prefix="$acl_save_prefix"
16325
16326 if test "X$x" = "X-L$additional_libdir"; then
16327 haveit=yes
16328 break
16329 fi
16330 done
16331 if test -z "$haveit"; then
16332 if test -d "$additional_libdir"; then
16333 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16334 fi
16335 fi
16336 fi
16337 fi
16338 ;;
16339 -R*)
16340 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16341 if test "$enable_rpath" != no; then
16342 haveit=
16343 for x in $rpathdirs; do
16344 if test "X$x" = "X$dir"; then
16345 haveit=yes
16346 break
16347 fi
16348 done
16349 if test -z "$haveit"; then
16350 rpathdirs="$rpathdirs $dir"
16351 fi
16352 haveit=
16353 for x in $ltrpathdirs; do
16354 if test "X$x" = "X$dir"; then
16355 haveit=yes
16356 break
16357 fi
16358 done
16359 if test -z "$haveit"; then
16360 ltrpathdirs="$ltrpathdirs $dir"
16361 fi
16362 fi
16363 ;;
16364 -l*)
16365 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16366 ;;
16367 *.la)
16368 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16369 ;;
16370 *)
16371 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16372 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16373 ;;
16374 esac
16375 done
16376 fi
16377 else
16378 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16379 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16380 fi
16381 fi
16382 fi
16383 done
16384 done
16385 if test "X$rpathdirs" != "X"; then
16386 if test -n "$hardcode_libdir_separator"; then
16387 alldirs=
16388 for found_dir in $rpathdirs; do
16389 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16390 done
16391 acl_save_libdir="$libdir"
16392 libdir="$alldirs"
16393 eval flag=\"$hardcode_libdir_flag_spec\"
16394 libdir="$acl_save_libdir"
16395 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16396 else
16397 for found_dir in $rpathdirs; do
16398 acl_save_libdir="$libdir"
16399 libdir="$found_dir"
16400 eval flag=\"$hardcode_libdir_flag_spec\"
16401 libdir="$acl_save_libdir"
16402 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16403 done
16404 fi
16405 fi
16406 if test "X$ltrpathdirs" != "X"; then
16407 for found_dir in $ltrpathdirs; do
16408 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16409 done
16410 fi
16411
16412
16413 ac_save_CPPFLAGS="$CPPFLAGS"
16414
16415 for element in $INCBABELTRACE; do
16416 haveit=
16417 for x in $CPPFLAGS; do
16418
16419 acl_save_prefix="$prefix"
16420 prefix="$acl_final_prefix"
16421 acl_save_exec_prefix="$exec_prefix"
16422 exec_prefix="$acl_final_exec_prefix"
16423 eval x=\"$x\"
16424 exec_prefix="$acl_save_exec_prefix"
16425 prefix="$acl_save_prefix"
16426
16427 if test "X$x" = "X$element"; then
16428 haveit=yes
16429 break
16430 fi
16431 done
16432 if test -z "$haveit"; then
16433 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16434 fi
16435 done
16436
16437
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16439$as_echo_n "checking for libbabeltrace... " >&6; }
16440if test "${ac_cv_libbabeltrace+set}" = set; then :
16441 $as_echo_n "(cached) " >&6
16442else
16443
16444 ac_save_LIBS="$LIBS"
16445 LIBS="$LIBS $LIBBABELTRACE"
16446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16447/* end confdefs.h. */
16448#include <babeltrace/babeltrace.h>
16449 #include <babeltrace/ctf/events.h>
16450 #include <babeltrace/ctf/iterator.h>
16451int
16452main ()
16453{
16454struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16455 struct bt_ctf_event *event = NULL;
16456 const struct bt_definition *scope;
16457
65c749e7 16458 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16459 scope = bt_ctf_get_top_level_scope (event,
16460 BT_STREAM_EVENT_HEADER);
16461 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16462
16463 ;
16464 return 0;
16465}
16466_ACEOF
16467if ac_fn_c_try_link "$LINENO"; then :
16468 ac_cv_libbabeltrace=yes
16469else
16470 ac_cv_libbabeltrace=no
16471fi
16472rm -f core conftest.err conftest.$ac_objext \
16473 conftest$ac_exeext conftest.$ac_ext
16474 LIBS="$ac_save_LIBS"
16475
16476fi
16477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16478$as_echo "$ac_cv_libbabeltrace" >&6; }
16479 if test "$ac_cv_libbabeltrace" = yes; then
16480 HAVE_LIBBABELTRACE=yes
16481
16482$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16483
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16485$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16487$as_echo "$LIBBABELTRACE" >&6; }
16488 else
16489 HAVE_LIBBABELTRACE=no
16490 CPPFLAGS="$ac_save_CPPFLAGS"
16491 LIBBABELTRACE=
16492 LTLIBBABELTRACE=
16493 fi
16494
16495
16496
16497
16498
16499
16500 CFLAGS=$saved_CFLAGS
16501
16502 if test "$HAVE_LIBBABELTRACE" != yes; then
16503 if test "$with_babeltrace" = yes; then
16504 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16505 else
16506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16507$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16508 fi
16509 fi
16510fi
16511
db985757 16512# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16513# to an empty version.
c906108c
SS
16514
16515files=
16516links=
5a2402b8 16517
c906108c
SS
16518rm -f nm.h
16519if test "${nativefile}" != ""; then
0f475e27
AC
16520 case "${nativefile}" in
16521 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16522 * ) GDB_NM_FILE="${nativefile}"
16523 esac
5a2402b8
AC
16524 files="${files} ${GDB_NM_FILE}"
16525 links="${links} nm.h"
60ca704f
SE
16526
16527cat >>confdefs.h <<_ACEOF
b78960be 16528#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16529_ACEOF
5a2402b8 16530
c906108c 16531fi
5a2402b8
AC
16532
16533
bec39cab
AC
16534ac_sources="$files"
16535ac_dests="$links"
16536while test -n "$ac_sources"; do
16537 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16538 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16539 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16540done
81ecdfbb 16541ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16542
16543
c906108c
SS
16544
16545
c906108c 16546
81ecdfbb 16547$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16548
bec39cab 16549
b292c783 16550
f6a88844
JM
16551 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16552 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16553 if test "x$GDB_TRANSFORM_NAME" = x; then
16554 GDB_TRANSFORM_NAME=gdb
16555 fi
16556
16557
16558
16559 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16560 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16561 if test "x$GCORE_TRANSFORM_NAME" = x; then
16562 GCORE_TRANSFORM_NAME=gcore
16563 fi
16564
b292c783
JK
16565
16566ac_config_files="$ac_config_files gcore"
16567
c971b7fa 16568ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 16569
89a34d1b 16570
bec39cab
AC
16571cat >confcache <<\_ACEOF
16572# This file is a shell script that caches the results of configure
16573# tests run on this system so they can be shared between configure
16574# scripts and configure runs, see configure's option --config-cache.
16575# It is not useful on other systems. If it contains results you don't
16576# want to keep, you may remove or edit it.
16577#
16578# config.status only pays attention to the cache file if you give it
16579# the --recheck option to rerun configure.
16580#
16581# `ac_cv_env_foo' variables (set or unset) will be overridden when
16582# loading this file, other *unset* `ac_cv_foo' will be assigned the
16583# following values.
16584
16585_ACEOF
16586
16587# The following way of writing the cache mishandles newlines in values,
16588# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16589# So, we kill variables containing newlines.
bec39cab
AC
16590# Ultrix sh set writes to stderr and can't be redirected directly,
16591# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16592(
16593 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16594 eval ac_val=\$$ac_var
16595 case $ac_val in #(
16596 *${as_nl}*)
16597 case $ac_var in #(
16598 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16600 esac
16601 case $ac_var in #(
16602 _ | IFS | as_nl) ;; #(
16603 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16604 *) { eval $ac_var=; unset $ac_var;} ;;
16605 esac ;;
16606 esac
16607 done
16608
bec39cab 16609 (set) 2>&1 |
81ecdfbb
RW
16610 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16611 *${as_nl}ac_space=\ *)
16612 # `set' does not quote correctly, so add quotes: double-quote
16613 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16614 sed -n \
16615 "s/'/'\\\\''/g;
16616 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16617 ;; #(
bec39cab
AC
16618 *)
16619 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16620 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16621 ;;
81ecdfbb
RW
16622 esac |
16623 sort
16624) |
bec39cab 16625 sed '
81ecdfbb 16626 /^ac_cv_env_/b end
bec39cab 16627 t clear
81ecdfbb 16628 :clear
bec39cab
AC
16629 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16630 t end
81ecdfbb
RW
16631 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16632 :end' >>confcache
16633if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16634 if test -w "$cache_file"; then
16635 test "x$cache_file" != "x/dev/null" &&
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16637$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16638 cat confcache >$cache_file
16639 else
81ecdfbb
RW
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16641$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16642 fi
16643fi
16644rm -f confcache
16645
16646test "x$prefix" = xNONE && prefix=$ac_default_prefix
16647# Let make expand exec_prefix.
16648test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16649
bec39cab
AC
16650DEFS=-DHAVE_CONFIG_H
16651
16652ac_libobjs=
16653ac_ltlibobjs=
16654for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16655 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16656 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16657 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16658 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16659 # will be set to the directory where LIBOBJS objects are built.
16660 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16661 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16662done
16663LIBOBJS=$ac_libobjs
16664
16665LTLIBOBJS=$ac_ltlibobjs
16666
16667
85981d60 16668if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16669 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16670Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16671fi
a417dc56 16672if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16673 as_fn_error "conditional \"GMAKE\" was never defined.
16674Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16675fi
4df42755
DE
16676if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16677 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16678Usually this means the macro was only invoked conditionally." "$LINENO" 5
16679fi
16680if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16681 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16682Usually this means the macro was only invoked conditionally." "$LINENO" 5
16683fi
81ecdfbb
RW
16684
16685
bec39cab 16686: ${CONFIG_STATUS=./config.status}
81ecdfbb 16687ac_write_fail=0
bec39cab
AC
16688ac_clean_files_save=$ac_clean_files
16689ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16690{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16691$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16692as_write_fail=0
16693cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16694#! $SHELL
16695# Generated by $as_me.
16696# Run this file to recreate the current configuration.
16697# Compiler output produced by configure, useful for debugging
16698# configure, is in config.log if it exists.
16699
16700debug=false
16701ac_cs_recheck=false
16702ac_cs_silent=false
bec39cab 16703
81ecdfbb
RW
16704SHELL=\${CONFIG_SHELL-$SHELL}
16705export SHELL
16706_ASEOF
16707cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16708## -------------------- ##
16709## M4sh Initialization. ##
16710## -------------------- ##
16711
16712# Be more Bourne compatible
16713DUALCASE=1; export DUALCASE # for MKS sh
16714if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16715 emulate sh
16716 NULLCMD=:
81ecdfbb 16717 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16718 # is contrary to our usage. Disable this feature.
16719 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16720 setopt NO_GLOB_SUBST
16721else
16722 case `(set -o) 2>/dev/null` in #(
16723 *posix*) :
16724 set -o posix ;; #(
16725 *) :
16726 ;;
16727esac
bec39cab 16728fi
bec39cab 16729
81ecdfbb
RW
16730
16731as_nl='
16732'
16733export as_nl
16734# Printing a long string crashes Solaris 7 /usr/bin/printf.
16735as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16736as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16737as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16738# Prefer a ksh shell builtin over an external printf program on Solaris,
16739# but without wasting forks for bash or zsh.
16740if test -z "$BASH_VERSION$ZSH_VERSION" \
16741 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16742 as_echo='print -r --'
16743 as_echo_n='print -rn --'
16744elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16745 as_echo='printf %s\n'
16746 as_echo_n='printf %s'
16747else
16748 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16749 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16750 as_echo_n='/usr/ucb/echo -n'
16751 else
16752 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16753 as_echo_n_body='eval
16754 arg=$1;
16755 case $arg in #(
16756 *"$as_nl"*)
16757 expr "X$arg" : "X\\(.*\\)$as_nl";
16758 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16759 esac;
16760 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16761 '
16762 export as_echo_n_body
16763 as_echo_n='sh -c $as_echo_n_body as_echo'
16764 fi
16765 export as_echo_body
16766 as_echo='sh -c $as_echo_body as_echo'
16767fi
16768
16769# The user is always right.
16770if test "${PATH_SEPARATOR+set}" != set; then
16771 PATH_SEPARATOR=:
16772 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16773 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16774 PATH_SEPARATOR=';'
16775 }
bec39cab
AC
16776fi
16777
16778
81ecdfbb
RW
16779# IFS
16780# We need space, tab and new line, in precisely that order. Quoting is
16781# there to prevent editors from complaining about space-tab.
16782# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16783# splitting by setting IFS to empty value.)
16784IFS=" "" $as_nl"
16785
16786# Find who we are. Look in the path if we contain no directory separator.
16787case $0 in #((
16788 *[\\/]* ) as_myself=$0 ;;
16789 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16790for as_dir in $PATH
16791do
16792 IFS=$as_save_IFS
16793 test -z "$as_dir" && as_dir=.
16794 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16795 done
16796IFS=$as_save_IFS
16797
16798 ;;
16799esac
16800# We did not find ourselves, most probably we were run as `sh COMMAND'
16801# in which case we are not to be found in the path.
16802if test "x$as_myself" = x; then
16803 as_myself=$0
16804fi
16805if test ! -f "$as_myself"; then
16806 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16807 exit 1
16808fi
16809
16810# Unset variables that we do not need and which cause bugs (e.g. in
16811# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16812# suppresses any "Segmentation fault" message there. '((' could
16813# trigger a bug in pdksh 5.2.14.
16814for as_var in BASH_ENV ENV MAIL MAILPATH
16815do eval test x\${$as_var+set} = xset \
16816 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16817done
bec39cab
AC
16818PS1='$ '
16819PS2='> '
16820PS4='+ '
16821
16822# NLS nuisances.
81ecdfbb
RW
16823LC_ALL=C
16824export LC_ALL
16825LANGUAGE=C
16826export LANGUAGE
16827
16828# CDPATH.
16829(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16830
16831
16832# as_fn_error ERROR [LINENO LOG_FD]
16833# ---------------------------------
16834# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16835# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16836# script with status $?, using 1 if that was 0.
16837as_fn_error ()
16838{
16839 as_status=$?; test $as_status -eq 0 && as_status=1
16840 if test "$3"; then
16841 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16842 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16843 fi
16844 $as_echo "$as_me: error: $1" >&2
16845 as_fn_exit $as_status
16846} # as_fn_error
16847
16848
16849# as_fn_set_status STATUS
16850# -----------------------
16851# Set $? to STATUS, without forking.
16852as_fn_set_status ()
16853{
16854 return $1
16855} # as_fn_set_status
16856
16857# as_fn_exit STATUS
16858# -----------------
16859# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16860as_fn_exit ()
16861{
16862 set +e
16863 as_fn_set_status $1
16864 exit $1
16865} # as_fn_exit
16866
16867# as_fn_unset VAR
16868# ---------------
16869# Portably unset VAR.
16870as_fn_unset ()
16871{
16872 { eval $1=; unset $1;}
16873}
16874as_unset=as_fn_unset
16875# as_fn_append VAR VALUE
16876# ----------------------
16877# Append the text in VALUE to the end of the definition contained in VAR. Take
16878# advantage of any shell optimizations that allow amortized linear growth over
16879# repeated appends, instead of the typical quadratic growth present in naive
16880# implementations.
16881if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16882 eval 'as_fn_append ()
16883 {
16884 eval $1+=\$2
16885 }'
16886else
16887 as_fn_append ()
16888 {
16889 eval $1=\$$1\$2
16890 }
16891fi # as_fn_append
16892
16893# as_fn_arith ARG...
16894# ------------------
16895# Perform arithmetic evaluation on the ARGs, and store the result in the
16896# global $as_val. Take advantage of shells that can avoid forks. The arguments
16897# must be portable across $(()) and expr.
16898if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16899 eval 'as_fn_arith ()
16900 {
16901 as_val=$(( $* ))
16902 }'
16903else
16904 as_fn_arith ()
16905 {
16906 as_val=`expr "$@" || test $? -eq 1`
16907 }
16908fi # as_fn_arith
bec39cab 16909
81ecdfbb
RW
16910
16911if expr a : '\(a\)' >/dev/null 2>&1 &&
16912 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16913 as_expr=expr
16914else
16915 as_expr=false
16916fi
16917
81ecdfbb 16918if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16919 as_basename=basename
16920else
16921 as_basename=false
16922fi
16923
81ecdfbb
RW
16924if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16925 as_dirname=dirname
16926else
16927 as_dirname=false
16928fi
bec39cab 16929
81ecdfbb 16930as_me=`$as_basename -- "$0" ||
bec39cab
AC
16931$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16932 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16933 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16934$as_echo X/"$0" |
16935 sed '/^.*\/\([^/][^/]*\)\/*$/{
16936 s//\1/
16937 q
16938 }
16939 /^X\/\(\/\/\)$/{
16940 s//\1/
16941 q
16942 }
16943 /^X\/\(\/\).*/{
16944 s//\1/
16945 q
16946 }
16947 s/.*/./; q'`
b4e70030 16948
b4e70030
JB
16949# Avoid depending upon Character Ranges.
16950as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16951as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16952as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16953as_cr_digits='0123456789'
16954as_cr_alnum=$as_cr_Letters$as_cr_digits
16955
81ecdfbb
RW
16956ECHO_C= ECHO_N= ECHO_T=
16957case `echo -n x` in #(((((
16958-n*)
16959 case `echo 'xy\c'` in
16960 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16961 xy) ECHO_C='\c';;
16962 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16963 ECHO_T=' ';;
16964 esac;;
16965*)
16966 ECHO_N='-n';;
bec39cab
AC
16967esac
16968
81ecdfbb
RW
16969rm -f conf$$ conf$$.exe conf$$.file
16970if test -d conf$$.dir; then
16971 rm -f conf$$.dir/conf$$.file
bec39cab 16972else
81ecdfbb
RW
16973 rm -f conf$$.dir
16974 mkdir conf$$.dir 2>/dev/null
bec39cab 16975fi
81ecdfbb
RW
16976if (echo >conf$$.file) 2>/dev/null; then
16977 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16978 as_ln_s='ln -s'
81ecdfbb
RW
16979 # ... but there are two gotchas:
16980 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16981 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16982 # In both cases, we have to default to `cp -p'.
16983 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16984 as_ln_s='cp -p'
16985 elif ln conf$$.file conf$$ 2>/dev/null; then
16986 as_ln_s=ln
16987 else
16988 as_ln_s='cp -p'
b4e70030 16989 fi
bec39cab
AC
16990else
16991 as_ln_s='cp -p'
16992fi
81ecdfbb
RW
16993rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16994rmdir conf$$.dir 2>/dev/null
16995
16996
16997# as_fn_mkdir_p
16998# -------------
16999# Create "$as_dir" as a directory, including parents if necessary.
17000as_fn_mkdir_p ()
17001{
17002
17003 case $as_dir in #(
17004 -*) as_dir=./$as_dir;;
17005 esac
17006 test -d "$as_dir" || eval $as_mkdir_p || {
17007 as_dirs=
17008 while :; do
17009 case $as_dir in #(
17010 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17011 *) as_qdir=$as_dir;;
17012 esac
17013 as_dirs="'$as_qdir' $as_dirs"
17014 as_dir=`$as_dirname -- "$as_dir" ||
17015$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17016 X"$as_dir" : 'X\(//\)[^/]' \| \
17017 X"$as_dir" : 'X\(//\)$' \| \
17018 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17019$as_echo X"$as_dir" |
17020 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17021 s//\1/
17022 q
17023 }
17024 /^X\(\/\/\)[^/].*/{
17025 s//\1/
17026 q
17027 }
17028 /^X\(\/\/\)$/{
17029 s//\1/
17030 q
17031 }
17032 /^X\(\/\).*/{
17033 s//\1/
17034 q
17035 }
17036 s/.*/./; q'`
17037 test -d "$as_dir" && break
17038 done
17039 test -z "$as_dirs" || eval "mkdir $as_dirs"
17040 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17041
bec39cab 17042
81ecdfbb 17043} # as_fn_mkdir_p
bec39cab 17044if mkdir -p . 2>/dev/null; then
81ecdfbb 17045 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17046else
17047 test -d ./-p && rmdir ./-p
17048 as_mkdir_p=false
17049fi
17050
81ecdfbb
RW
17051if test -x / >/dev/null 2>&1; then
17052 as_test_x='test -x'
17053else
17054 if ls -dL / >/dev/null 2>&1; then
17055 as_ls_L_option=L
17056 else
17057 as_ls_L_option=
17058 fi
17059 as_test_x='
17060 eval sh -c '\''
17061 if test -d "$1"; then
17062 test -d "$1/.";
17063 else
17064 case $1 in #(
17065 -*)set "./$1";;
17066 esac;
17067 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17068 ???[sx]*):;;*)false;;esac;fi
17069 '\'' sh
17070 '
17071fi
17072as_executable_p=$as_test_x
bec39cab
AC
17073
17074# Sed expression to map a string onto a valid CPP name.
17075as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17076
17077# Sed expression to map a string onto a valid variable name.
17078as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17079
17080
bec39cab 17081exec 6>&1
81ecdfbb
RW
17082## ----------------------------------- ##
17083## Main body of $CONFIG_STATUS script. ##
17084## ----------------------------------- ##
17085_ASEOF
17086test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17087
17088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17089# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17090# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17091# values after options handling.
17092ac_log="
bec39cab 17093This file was extended by $as_me, which was
81ecdfbb 17094generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17095
17096 CONFIG_FILES = $CONFIG_FILES
17097 CONFIG_HEADERS = $CONFIG_HEADERS
17098 CONFIG_LINKS = $CONFIG_LINKS
17099 CONFIG_COMMANDS = $CONFIG_COMMANDS
17100 $ $0 $@
17101
81ecdfbb
RW
17102on `(hostname || uname -n) 2>/dev/null | sed 1q`
17103"
17104
bec39cab
AC
17105_ACEOF
17106
81ecdfbb
RW
17107case $ac_config_files in *"
17108"*) set x $ac_config_files; shift; ac_config_files=$*;;
17109esac
234b45d4 17110
81ecdfbb
RW
17111case $ac_config_headers in *"
17112"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17113esac
b4e70030 17114
b4e70030 17115
81ecdfbb
RW
17116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17117# Files that config.status was made for.
17118config_files="$ac_config_files"
17119config_headers="$ac_config_headers"
17120config_links="$ac_config_links"
17121config_commands="$ac_config_commands"
234b45d4 17122
81ecdfbb 17123_ACEOF
b4e70030 17124
81ecdfbb 17125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17126ac_cs_usage="\
81ecdfbb
RW
17127\`$as_me' instantiates files and other configuration actions
17128from templates according to the current configuration. Unless the files
17129and actions are specified as TAGs, all are instantiated by default.
234b45d4 17130
81ecdfbb 17131Usage: $0 [OPTION]... [TAG]...
234b45d4 17132
bec39cab 17133 -h, --help print this help, then exit
81ecdfbb
RW
17134 -V, --version print version number and configuration settings, then exit
17135 -q, --quiet, --silent
17136 do not print progress messages
bec39cab
AC
17137 -d, --debug don't remove temporary files
17138 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17139 --file=FILE[:TEMPLATE]
17140 instantiate the configuration file FILE
17141 --header=FILE[:TEMPLATE]
17142 instantiate the configuration header FILE
234b45d4 17143
bec39cab
AC
17144Configuration files:
17145$config_files
234b45d4 17146
bec39cab
AC
17147Configuration headers:
17148$config_headers
234b45d4 17149
bec39cab
AC
17150Configuration links:
17151$config_links
234b45d4 17152
bec39cab
AC
17153Configuration commands:
17154$config_commands
17155
81ecdfbb 17156Report bugs to the package provider."
b4e70030 17157
81ecdfbb
RW
17158_ACEOF
17159cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17160ac_cs_version="\\
17161config.status
81ecdfbb
RW
17162configured by $0, generated by GNU Autoconf 2.64,
17163 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17164
81ecdfbb 17165Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17166This config.status script is free software; the Free Software Foundation
17167gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17168
17169ac_pwd='$ac_pwd'
17170srcdir='$srcdir'
17171INSTALL='$INSTALL'
81ecdfbb
RW
17172AWK='$AWK'
17173test -n "\$AWK" || AWK=awk
bec39cab
AC
17174_ACEOF
17175
81ecdfbb
RW
17176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17177# The default lists apply if the user does not specify any file.
bec39cab
AC
17178ac_need_defaults=:
17179while test $# != 0
17180do
17181 case $1 in
17182 --*=*)
81ecdfbb
RW
17183 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17184 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17185 ac_shift=:
c906108c 17186 ;;
81ecdfbb 17187 *)
bec39cab
AC
17188 ac_option=$1
17189 ac_optarg=$2
17190 ac_shift=shift
c906108c 17191 ;;
bec39cab 17192 esac
c906108c 17193
bec39cab
AC
17194 case $ac_option in
17195 # Handling of the options.
bec39cab
AC
17196 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17197 ac_cs_recheck=: ;;
81ecdfbb
RW
17198 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17199 $as_echo "$ac_cs_version"; exit ;;
17200 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17201 debug=: ;;
17202 --file | --fil | --fi | --f )
17203 $ac_shift
81ecdfbb
RW
17204 case $ac_optarg in
17205 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17206 esac
17207 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17208 ac_need_defaults=false;;
17209 --header | --heade | --head | --hea )
17210 $ac_shift
81ecdfbb
RW
17211 case $ac_optarg in
17212 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17213 esac
17214 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17215 ac_need_defaults=false;;
81ecdfbb
RW
17216 --he | --h)
17217 # Conflict between --help and --header
17218 as_fn_error "ambiguous option: \`$1'
17219Try \`$0 --help' for more information.";;
17220 --help | --hel | -h )
17221 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17222 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17223 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17224 ac_cs_silent=: ;;
c906108c 17225
bec39cab 17226 # This is an error.
81ecdfbb
RW
17227 -*) as_fn_error "unrecognized option: \`$1'
17228Try \`$0 --help' for more information." ;;
c906108c 17229
81ecdfbb
RW
17230 *) as_fn_append ac_config_targets " $1"
17231 ac_need_defaults=false ;;
c906108c 17232
bec39cab
AC
17233 esac
17234 shift
17235done
c906108c 17236
bec39cab 17237ac_configure_extra_args=
c906108c 17238
bec39cab
AC
17239if $ac_cs_silent; then
17240 exec 6>/dev/null
17241 ac_configure_extra_args="$ac_configure_extra_args --silent"
17242fi
c906108c 17243
bec39cab 17244_ACEOF
81ecdfbb 17245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17246if \$ac_cs_recheck; then
81ecdfbb
RW
17247 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17248 shift
17249 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17250 CONFIG_SHELL='$SHELL'
17251 export CONFIG_SHELL
17252 exec "\$@"
bec39cab
AC
17253fi
17254
17255_ACEOF
81ecdfbb
RW
17256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17257exec 5>>config.log
17258{
17259 echo
17260 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17261## Running $as_me. ##
17262_ASBOX
17263 $as_echo "$ac_log"
17264} >&5
bec39cab 17265
81ecdfbb
RW
17266_ACEOF
17267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17268#
81ecdfbb 17269# INIT-COMMANDS
c906108c 17270#
a417dc56 17271ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17272
bec39cab
AC
17273_ACEOF
17274
81ecdfbb 17275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17276
81ecdfbb 17277# Handling of arguments.
bec39cab 17278for ac_config_target in $ac_config_targets
c906108c 17279do
81ecdfbb
RW
17280 case $ac_config_target in
17281 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17282 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17283 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17284 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17285 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17286 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17287 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17288 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17289 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17290
17291 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17292 esac
17293done
17294
81ecdfbb 17295
bec39cab
AC
17296# If the user did not use the arguments to specify the items to instantiate,
17297# then the envvar interface is used. Set only those that are not.
17298# We use the long form for the default assignment because of an extremely
17299# bizarre bug on SunOS 4.1.3.
17300if $ac_need_defaults; then
17301 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17302 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17303 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17304 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17305fi
17306
b4e70030 17307# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17308# simply because there is no reason against having it here, and in addition,
b4e70030 17309# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17310# Hook for its removal unless debugging.
17311# Note that there is a small window in which the directory will not be cleaned:
17312# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17313$debug ||
17314{
81ecdfbb
RW
17315 tmp=
17316 trap 'exit_status=$?
17317 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17318' 0
17319 trap 'as_fn_exit 1' 1 2 13 15
17320}
17321# Create a (secure) tmp directory for tmp files.
17322
17323{
17324 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17325 test -n "$tmp" && test -d "$tmp"
17326} ||
17327{
17328 tmp=./conf$$-$RANDOM
17329 (umask 077 && mkdir "$tmp")
17330} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17331
17332# Set up the scripts for CONFIG_FILES section.
17333# No need to generate them if there are no CONFIG_FILES.
17334# This happens for instance with `./config.status config.h'.
17335if test -n "$CONFIG_FILES"; then
17336
17337if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17338 ac_cs_awk_getline=:
17339 ac_cs_awk_pipe_init=
17340 ac_cs_awk_read_file='
17341 while ((getline aline < (F[key])) > 0)
17342 print(aline)
17343 close(F[key])'
17344 ac_cs_awk_pipe_fini=
17345else
17346 ac_cs_awk_getline=false
17347 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17348 ac_cs_awk_read_file='
17349 print "|#_!!_#|"
17350 print "cat " F[key] " &&"
17351 '$ac_cs_awk_pipe_init
17352 # The final `:' finishes the AND list.
17353 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17354fi
17355ac_cr=`echo X | tr X '\015'`
17356# On cygwin, bash can eat \r inside `` if the user requested igncr.
17357# But we know of no other shell where ac_cr would be empty at this
17358# point, so we can use a bashism as a fallback.
17359if test "x$ac_cr" = x; then
17360 eval ac_cr=\$\'\\r\'
17361fi
17362ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17363if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17364 ac_cs_awk_cr='\r'
17365else
17366 ac_cs_awk_cr=$ac_cr
17367fi
17368
17369echo 'BEGIN {' >"$tmp/subs1.awk" &&
17370_ACEOF
17371
17372# Create commands to substitute file output variables.
17373{
17374 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17375 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17376 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17377 echo "_ACAWK" &&
17378 echo "_ACEOF"
17379} >conf$$files.sh &&
17380. ./conf$$files.sh ||
17381 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17382rm -f conf$$files.sh
17383
17384{
17385 echo "cat >conf$$subs.awk <<_ACEOF" &&
17386 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17387 echo "_ACEOF"
17388} >conf$$subs.sh ||
17389 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17390ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17391ac_delim='%!_!# '
17392for ac_last_try in false false false false false :; do
17393 . ./conf$$subs.sh ||
17394 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17395
17396 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17397 if test $ac_delim_n = $ac_delim_num; then
17398 break
17399 elif $ac_last_try; then
17400 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17401 else
17402 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17403 fi
17404done
17405rm -f conf$$subs.sh
17406
17407cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17408cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17409_ACEOF
17410sed -n '
17411h
17412s/^/S["/; s/!.*/"]=/
17413p
17414g
17415s/^[^!]*!//
17416:repl
17417t repl
17418s/'"$ac_delim"'$//
17419t delim
17420:nl
17421h
17422s/\(.\{148\}\).*/\1/
17423t more1
17424s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17425p
17426n
17427b repl
17428:more1
17429s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17430p
17431g
17432s/.\{148\}//
17433t nl
17434:delim
17435h
17436s/\(.\{148\}\).*/\1/
17437t more2
17438s/["\\]/\\&/g; s/^/"/; s/$/"/
17439p
17440b
17441:more2
17442s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17443p
17444g
17445s/.\{148\}//
17446t delim
17447' <conf$$subs.awk | sed '
17448/^[^""]/{
17449 N
17450 s/\n//
17451}
17452' >>$CONFIG_STATUS || ac_write_fail=1
17453rm -f conf$$subs.awk
17454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17455_ACAWK
17456cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17457 for (key in S) S_is_set[key] = 1
17458 FS = "\a"
17459 \$ac_cs_awk_pipe_init
17460}
17461{
17462 line = $ 0
17463 nfields = split(line, field, "@")
17464 substed = 0
17465 len = length(field[1])
17466 for (i = 2; i < nfields; i++) {
17467 key = field[i]
17468 keylen = length(key)
17469 if (S_is_set[key]) {
17470 value = S[key]
17471 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17472 len += length(value) + length(field[++i])
17473 substed = 1
17474 } else
17475 len += 1 + keylen
17476 }
17477 if (nfields == 3 && !substed) {
17478 key = field[2]
17479 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17480 \$ac_cs_awk_read_file
17481 next
17482 }
17483 }
17484 print line
b4e70030 17485}
81ecdfbb
RW
17486\$ac_cs_awk_pipe_fini
17487_ACAWK
17488_ACEOF
17489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17490if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17491 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17492else
17493 cat
17494fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17495 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17496_ACEOF
17497
17498# VPATH may cause trouble with some makes, so we remove $(srcdir),
17499# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17500# trailing colons and then remove the whole line if VPATH becomes empty
17501# (actually we leave an empty line to preserve line numbers).
17502if test "x$srcdir" = x.; then
17503 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17504s/:*\$(srcdir):*/:/
17505s/:*\${srcdir}:*/:/
17506s/:*@srcdir@:*/:/
17507s/^\([^=]*=[ ]*\):*/\1/
17508s/:*$//
17509s/^[^=]*=[ ]*$//
17510}'
17511fi
17512
17513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17514fi # test -n "$CONFIG_FILES"
17515
17516# Set up the scripts for CONFIG_HEADERS section.
17517# No need to generate them if there are no CONFIG_HEADERS.
17518# This happens for instance with `./config.status Makefile'.
17519if test -n "$CONFIG_HEADERS"; then
17520cat >"$tmp/defines.awk" <<\_ACAWK ||
17521BEGIN {
17522_ACEOF
17523
17524# Transform confdefs.h into an awk script `defines.awk', embedded as
17525# here-document in config.status, that substitutes the proper values into
17526# config.h.in to produce config.h.
4e8d927d 17527
81ecdfbb
RW
17528# Create a delimiter string that does not exist in confdefs.h, to ease
17529# handling of long lines.
17530ac_delim='%!_!# '
17531for ac_last_try in false false :; do
17532 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17533 if test -z "$ac_t"; then
17534 break
17535 elif $ac_last_try; then
17536 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17537 else
17538 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17539 fi
17540done
4e8d927d 17541
81ecdfbb
RW
17542# For the awk script, D is an array of macro values keyed by name,
17543# likewise P contains macro parameters if any. Preserve backslash
17544# newline sequences.
17545
17546ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17547sed -n '
17548s/.\{148\}/&'"$ac_delim"'/g
17549t rset
17550:rset
17551s/^[ ]*#[ ]*define[ ][ ]*/ /
17552t def
17553d
17554:def
17555s/\\$//
17556t bsnl
17557s/["\\]/\\&/g
17558s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17559D["\1"]=" \3"/p
17560s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17561d
17562:bsnl
17563s/["\\]/\\&/g
17564s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17565D["\1"]=" \3\\\\\\n"\\/p
17566t cont
17567s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17568t cont
17569d
17570:cont
17571n
17572s/.\{148\}/&'"$ac_delim"'/g
17573t clear
17574:clear
17575s/\\$//
17576t bsnlc
17577s/["\\]/\\&/g; s/^/"/; s/$/"/p
17578d
17579:bsnlc
17580s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17581b cont
17582' <confdefs.h | sed '
17583s/'"$ac_delim"'/"\\\
17584"/g' >>$CONFIG_STATUS || ac_write_fail=1
17585
17586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17587 for (key in D) D_is_set[key] = 1
17588 FS = "\a"
17589}
17590/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17591 line = \$ 0
17592 split(line, arg, " ")
17593 if (arg[1] == "#") {
17594 defundef = arg[2]
17595 mac1 = arg[3]
17596 } else {
17597 defundef = substr(arg[1], 2)
17598 mac1 = arg[2]
17599 }
17600 split(mac1, mac2, "(") #)
17601 macro = mac2[1]
17602 prefix = substr(line, 1, index(line, defundef) - 1)
17603 if (D_is_set[macro]) {
17604 # Preserve the white space surrounding the "#".
17605 print prefix "define", macro P[macro] D[macro]
17606 next
17607 } else {
17608 # Replace #undef with comments. This is necessary, for example,
17609 # in the case of _POSIX_SOURCE, which is predefined and required
17610 # on some systems where configure will not decide to define it.
17611 if (defundef == "undef") {
17612 print "/*", prefix defundef, macro, "*/"
17613 next
17614 }
17615 }
b4e70030 17616}
81ecdfbb
RW
17617{ print }
17618_ACAWK
b4e70030 17619_ACEOF
81ecdfbb
RW
17620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17621 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17622fi # test -n "$CONFIG_HEADERS"
4e8d927d 17623
4e8d927d 17624
81ecdfbb
RW
17625eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17626shift
17627for ac_tag
17628do
17629 case $ac_tag in
17630 :[FHLC]) ac_mode=$ac_tag; continue;;
17631 esac
17632 case $ac_mode$ac_tag in
17633 :[FHL]*:*);;
17634 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17635 :[FH]-) ac_tag=-:-;;
17636 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17637 esac
17638 ac_save_IFS=$IFS
17639 IFS=:
17640 set x $ac_tag
17641 IFS=$ac_save_IFS
17642 shift
17643 ac_file=$1
17644 shift
4e8d927d 17645
81ecdfbb
RW
17646 case $ac_mode in
17647 :L) ac_source=$1;;
17648 :[FH])
17649 ac_file_inputs=
17650 for ac_f
17651 do
17652 case $ac_f in
17653 -) ac_f="$tmp/stdin";;
17654 *) # Look for the file first in the build tree, then in the source tree
17655 # (if the path is not absolute). The absolute path cannot be DOS-style,
17656 # because $ac_f cannot contain `:'.
17657 test -f "$ac_f" ||
17658 case $ac_f in
17659 [\\/$]*) false;;
17660 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17661 esac ||
17662 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17663 esac
17664 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17665 as_fn_append ac_file_inputs " '$ac_f'"
17666 done
17667
17668 # Let's still pretend it is `configure' which instantiates (i.e., don't
17669 # use $as_me), people would be surprised to read:
17670 # /* config.h. Generated by config.status. */
17671 configure_input='Generated from '`
17672 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17673 `' by configure.'
17674 if test x"$ac_file" != x-; then
17675 configure_input="$ac_file. $configure_input"
17676 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17677$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17678 fi
81ecdfbb
RW
17679 # Neutralize special characters interpreted by sed in replacement strings.
17680 case $configure_input in #(
17681 *\&* | *\|* | *\\* )
17682 ac_sed_conf_input=`$as_echo "$configure_input" |
17683 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17684 *) ac_sed_conf_input=$configure_input;;
17685 esac
4e8d927d 17686
81ecdfbb
RW
17687 case $ac_tag in
17688 *:-:* | *:-) cat >"$tmp/stdin" \
17689 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17690 esac
17691 ;;
c906108c
SS
17692 esac
17693
81ecdfbb 17694 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17695$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17696 X"$ac_file" : 'X\(//\)[^/]' \| \
17697 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17698 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17699$as_echo X"$ac_file" |
17700 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17701 s//\1/
17702 q
17703 }
17704 /^X\(\/\/\)[^/].*/{
17705 s//\1/
17706 q
17707 }
17708 /^X\(\/\/\)$/{
17709 s//\1/
17710 q
17711 }
17712 /^X\(\/\).*/{
17713 s//\1/
17714 q
17715 }
17716 s/.*/./; q'`
17717 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17718 ac_builddir=.
17719
81ecdfbb
RW
17720case "$ac_dir" in
17721.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17722*)
17723 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17724 # A ".." for each directory in $ac_dir_suffix.
17725 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17726 case $ac_top_builddir_sub in
17727 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17728 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17729 esac ;;
17730esac
17731ac_abs_top_builddir=$ac_pwd
17732ac_abs_builddir=$ac_pwd$ac_dir_suffix
17733# for backward compatibility:
17734ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17735
17736case $srcdir in
81ecdfbb 17737 .) # We are building in place.
bec39cab 17738 ac_srcdir=.
81ecdfbb
RW
17739 ac_top_srcdir=$ac_top_builddir_sub
17740 ac_abs_top_srcdir=$ac_pwd ;;
17741 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17742 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17743 ac_top_srcdir=$srcdir
17744 ac_abs_top_srcdir=$srcdir ;;
17745 *) # Relative name.
17746 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17747 ac_top_srcdir=$ac_top_build_prefix$srcdir
17748 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17749esac
81ecdfbb 17750ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17751
c906108c 17752
81ecdfbb
RW
17753 case $ac_mode in
17754 :F)
17755 #
17756 # CONFIG_FILE
17757 #
c906108c 17758
bec39cab
AC
17759 case $INSTALL in
17760 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17761 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17762 esac
81ecdfbb 17763_ACEOF
121ce6e5 17764
81ecdfbb
RW
17765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17766# If the template does not know about datarootdir, expand it.
17767# FIXME: This hack should be removed a few years after 2.60.
17768ac_datarootdir_hack=; ac_datarootdir_seen=
17769ac_sed_dataroot='
17770/datarootdir/ {
17771 p
17772 q
17773}
17774/@datadir@/p
17775/@docdir@/p
17776/@infodir@/p
17777/@localedir@/p
17778/@mandir@/p'
17779case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17780*datarootdir*) ac_datarootdir_seen=yes;;
17781*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17783$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17784_ACEOF
17785cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17786 ac_datarootdir_hack='
17787 s&@datadir@&$datadir&g
17788 s&@docdir@&$docdir&g
17789 s&@infodir@&$infodir&g
17790 s&@localedir@&$localedir&g
17791 s&@mandir@&$mandir&g
17792 s&\\\${datarootdir}&$datarootdir&g' ;;
17793esac
4e8d927d 17794_ACEOF
81ecdfbb
RW
17795
17796# Neutralize VPATH when `$srcdir' = `.'.
17797# Shell code in configure.ac might set extrasub.
17798# FIXME: do we really want to maintain this feature?
17799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17800ac_sed_extra="$ac_vpsub
bec39cab
AC
17801$extrasub
17802_ACEOF
81ecdfbb 17803cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17804:t
17805/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17806s|@configure_input@|$ac_sed_conf_input|;t t
17807s&@top_builddir@&$ac_top_builddir_sub&;t t
17808s&@top_build_prefix@&$ac_top_build_prefix&;t t
17809s&@srcdir@&$ac_srcdir&;t t
17810s&@abs_srcdir@&$ac_abs_srcdir&;t t
17811s&@top_srcdir@&$ac_top_srcdir&;t t
17812s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17813s&@builddir@&$ac_builddir&;t t
17814s&@abs_builddir@&$ac_abs_builddir&;t t
17815s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17816s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17817$ac_datarootdir_hack
17818"
17819eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17820if $ac_cs_awk_getline; then
17821 $AWK -f "$tmp/subs.awk"
17822else
17823 $AWK -f "$tmp/subs.awk" | $SHELL
17824fi >$tmp/out \
17825 || as_fn_error "could not create $ac_file" "$LINENO" 5
17826
17827test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17828 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17829 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17831which seems to be undefined. Please make sure it is defined." >&5
17832$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17833which seems to be undefined. Please make sure it is defined." >&2;}
17834
17835 rm -f "$tmp/stdin"
bec39cab 17836 case $ac_file in
81ecdfbb
RW
17837 -) cat "$tmp/out" && rm -f "$tmp/out";;
17838 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17839 esac \
17840 || as_fn_error "could not create $ac_file" "$LINENO" 5
17841 ;;
17842 :H)
17843 #
17844 # CONFIG_HEADER
17845 #
bec39cab 17846 if test x"$ac_file" != x-; then
81ecdfbb
RW
17847 {
17848 $as_echo "/* $configure_input */" \
17849 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17850 } >"$tmp/config.h" \
17851 || as_fn_error "could not create $ac_file" "$LINENO" 5
17852 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17854$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17855 else
81ecdfbb
RW
17856 rm -f "$ac_file"
17857 mv "$tmp/config.h" "$ac_file" \
17858 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17859 fi
17860 else
81ecdfbb
RW
17861 $as_echo "/* $configure_input */" \
17862 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17863 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17864 fi
81ecdfbb
RW
17865 ;;
17866 :L)
17867 #
17868 # CONFIG_LINK
17869 #
c906108c 17870
81ecdfbb
RW
17871 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17872 :
b4e70030 17873 else
81ecdfbb
RW
17874 # Prefer the file from the source tree if names are identical.
17875 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17876 ac_source=$srcdir/$ac_source
17877 fi
b4e70030 17878
81ecdfbb
RW
17879 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17880$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17881
81ecdfbb
RW
17882 if test ! -r "$ac_source"; then
17883 as_fn_error "$ac_source: file not found" "$LINENO" 5
17884 fi
17885 rm -f "$ac_file"
bec39cab 17886
81ecdfbb
RW
17887 # Try a relative symlink, then a hard link, then a copy.
17888 case $srcdir in
17889 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17890 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17891 esac
17892 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17893 ln "$ac_source" "$ac_file" 2>/dev/null ||
17894 cp -p "$ac_source" "$ac_file" ||
17895 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17896 fi
17897 ;;
17898 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17899$as_echo "$as_me: executing $ac_file commands" >&6;}
17900 ;;
c906108c 17901 esac
b4e70030 17902
bec39cab 17903
81ecdfbb
RW
17904 case $ac_file$ac_mode in
17905 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17906 "gcore":F) chmod +x gcore ;;
1e94266c
SM
17907 "Makefile":F)
17908case x$CONFIG_HEADERS in
17909xconfig.h:config.in)
17910echo > stamp-h ;;
17911esac
17912 ;;
17913 "gdb-gdb.gdb":F)
17914case x$CONFIG_HEADERS in
17915xconfig.h:config.in)
17916echo > stamp-h ;;
17917esac
17918 ;;
17919 "doc/Makefile":F)
17920case x$CONFIG_HEADERS in
17921xconfig.h:config.in)
17922echo > stamp-h ;;
17923esac
17924 ;;
17925 "data-directory/Makefile":F)
c906108c
SS
17926case x$CONFIG_HEADERS in
17927xconfig.h:config.in)
17928echo > stamp-h ;;
17929esac
bec39cab 17930 ;;
81ecdfbb 17931
bec39cab 17932 esac
81ecdfbb 17933done # for ac_tag
c906108c 17934
bec39cab 17935
81ecdfbb 17936as_fn_exit 0
bec39cab 17937_ACEOF
bec39cab
AC
17938ac_clean_files=$ac_clean_files_save
17939
81ecdfbb
RW
17940test $ac_write_fail = 0 ||
17941 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17942
bec39cab
AC
17943
17944# configure is writing to config.log, and then calls config.status.
17945# config.status does its own redirection, appending to config.log.
17946# Unfortunately, on DOS this fails, as config.log is still kept open
17947# by configure, so config.status won't be able to write to it; its
17948# output is simply discarded. So we exec the FD to /dev/null,
17949# effectively closing config.log, so it can be properly (re)opened and
17950# appended to by config.status. When coming back to configure, we
17951# need to make the FD available again.
17952if test "$no_create" != yes; then
17953 ac_cs_success=:
17954 ac_config_status_args=
17955 test "$silent" = yes &&
17956 ac_config_status_args="$ac_config_status_args --quiet"
17957 exec 5>/dev/null
17958 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17959 exec 5>>config.log
17960 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17961 # would make configure fail if this is the last instruction.
81ecdfbb 17962 $ac_cs_success || as_fn_exit $?
bec39cab 17963fi
c906108c 17964
bec39cab 17965#
81ecdfbb 17966# CONFIG_SUBDIRS section.
bec39cab 17967#
c906108c
SS
17968if test "$no_recursion" != yes; then
17969
81ecdfbb
RW
17970 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17971 # so they do not pile up.
c906108c
SS
17972 ac_sub_configure_args=
17973 ac_prev=
fdc59709
PB
17974 eval "set x $ac_configure_args"
17975 shift
17976 for ac_arg
17977 do
c906108c
SS
17978 if test -n "$ac_prev"; then
17979 ac_prev=
17980 continue
17981 fi
bec39cab 17982 case $ac_arg in
c906108c
SS
17983 -cache-file | --cache-file | --cache-fil | --cache-fi \
17984 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17985 ac_prev=cache_file ;;
17986 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17987 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17988 | --c=*)
17989 ;;
17990 --config-cache | -C)
c906108c
SS
17991 ;;
17992 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17993 ac_prev=srcdir ;;
17994 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17995 ;;
bec39cab
AC
17996 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17997 ac_prev=prefix ;;
17998 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17999 ;;
81ecdfbb
RW
18000 --disable-option-checking)
18001 ;;
fdc59709
PB
18002 *)
18003 case $ac_arg in
81ecdfbb 18004 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18005 esac
81ecdfbb 18006 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18007 esac
18008 done
18009
bec39cab
AC
18010 # Always prepend --prefix to ensure using the same prefix
18011 # in subdir configurations.
fdc59709
PB
18012 ac_arg="--prefix=$prefix"
18013 case $ac_arg in
81ecdfbb 18014 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18015 esac
81ecdfbb
RW
18016 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18017
18018 # Pass --silent
18019 if test "$silent" = yes; then
18020 ac_sub_configure_args="--silent $ac_sub_configure_args"
18021 fi
18022
18023 # Always prepend --disable-option-checking to silence warnings, since
18024 # different subdirs can have different --enable and --with options.
18025 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18026
b4e70030 18027 ac_popdir=`pwd`
bec39cab 18028 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18029
18030 # Do not complain, so a configure script can configure whichever
18031 # parts of a large source tree are present.
fdc59709 18032 test -d "$srcdir/$ac_dir" || continue
c906108c 18033
81ecdfbb
RW
18034 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18035 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18036 $as_echo "$ac_msg" >&6
18037 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18038 ac_builddir=.
18039
81ecdfbb
RW
18040case "$ac_dir" in
18041.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18042*)
18043 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18044 # A ".." for each directory in $ac_dir_suffix.
18045 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18046 case $ac_top_builddir_sub in
18047 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18048 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18049 esac ;;
18050esac
18051ac_abs_top_builddir=$ac_pwd
18052ac_abs_builddir=$ac_pwd$ac_dir_suffix
18053# for backward compatibility:
18054ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18055
18056case $srcdir in
81ecdfbb 18057 .) # We are building in place.
bec39cab 18058 ac_srcdir=.
81ecdfbb
RW
18059 ac_top_srcdir=$ac_top_builddir_sub
18060 ac_abs_top_srcdir=$ac_pwd ;;
18061 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18062 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18063 ac_top_srcdir=$srcdir
18064 ac_abs_top_srcdir=$srcdir ;;
18065 *) # Relative name.
18066 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18067 ac_top_srcdir=$ac_top_build_prefix$srcdir
18068 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18069esac
81ecdfbb 18070ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18071
c906108c 18072
fdc59709 18073 cd "$ac_dir"
c906108c
SS
18074
18075 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18076 if test -f "$ac_srcdir/configure.gnu"; then
18077 ac_sub_configure=$ac_srcdir/configure.gnu
18078 elif test -f "$ac_srcdir/configure"; then
18079 ac_sub_configure=$ac_srcdir/configure
18080 elif test -f "$ac_srcdir/configure.in"; then
18081 # This should be Cygnus configure.
18082 ac_sub_configure=$ac_aux_dir/configure
c906108c 18083 else
81ecdfbb
RW
18084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18085$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18086 ac_sub_configure=
18087 fi
18088
18089 # The recursion is here.
18090 if test -n "$ac_sub_configure"; then
c906108c 18091 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18092 case $cache_file in
18093 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18094 *) # Relative name.
18095 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18096 esac
c906108c 18097
81ecdfbb
RW
18098 { $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
18099$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18100 # The eval makes quoting arguments work.
fdc59709
PB
18101 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18102 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18103 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18104 fi
18105
fdc59709 18106 cd "$ac_popdir"
c906108c
SS
18107 done
18108fi
81ecdfbb
RW
18109if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18111$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18112fi
c906108c 18113