]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
[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
ac534cba
JB
661PYTHON_LIBS
662PYTHON_CPPFLAGS
81ecdfbb 663PYTHON_CFLAGS
ec685c5e 664python_prog_path
81ecdfbb
RW
665LTLIBEXPAT
666LIBEXPAT
667HAVE_LIBEXPAT
b8e0a31c 668JIT_READER_DIR
f997c383 669TARGET_PTR
39037522 670READLINE_TEXI_INCFLAG
81ecdfbb
RW
671READLINE_CFLAGS
672READLINE_DEPS
673READLINE
674MIG
675WINDRES
676DLLTOOL
c971b7fa 677AR
81ecdfbb
RW
678YFLAGS
679YACC
c971b7fa 680RANLIB
81ecdfbb 681LN_S
c971b7fa
PA
682INSTALL_DATA
683INSTALL_SCRIPT
684INSTALL_PROGRAM
685AWK
81ecdfbb
RW
686REPORT_BUGS_TEXI
687REPORT_BUGS_TO
688PKGVERSION
b292c783 689HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
690TARGET_OBS
691subdirs
692GDB_DATADIR
693DEBUGDIR
5048e516
JK
694MAKEINFO_EXTRA_FLAGS
695MAKEINFOFLAGS
696MAKEINFO
81ecdfbb
RW
697PACKAGE
698GNULIB_STDINT_H
81ecdfbb
RW
699CATOBJEXT
700GENCAT
701INSTOBJEXT
702DATADIRNAME
703CATALOGS
704POSUB
705GMSGFMT
706XGETTEXT
707INCINTL
708LIBINTL_DEP
709LIBINTL
710USE_NLS
711SET_MAKE
712GMAKE_FALSE
713GMAKE_TRUE
714MAKE
715CCDEPMODE
716DEPDIR
717am__leading_dot
718target_os
719target_vendor
720target_cpu
721target
722host_os
723host_vendor
724host_cpu
725host
726build_os
727build_vendor
728build_cpu
729build
c971b7fa
PA
730EGREP
731GREP
732CPP
81ecdfbb
RW
733OBJEXT
734EXEEXT
735ac_ct_CC
736CPPFLAGS
737LDFLAGS
738CFLAGS
739CC
740MAINT
741MAINTAINER_MODE_FALSE
742MAINTAINER_MODE_TRUE
743target_alias
744host_alias
745build_alias
746LIBS
747ECHO_T
748ECHO_N
749ECHO_C
750DEFS
751mandir
752localedir
753libdir
754psdir
755pdfdir
756dvidir
757htmldir
758infodir
759docdir
760oldincludedir
761includedir
762localstatedir
763sharedstatedir
764sysconfdir
765datadir
766datarootdir
767libexecdir
768sbindir
769bindir
770program_transform_name
771prefix
772exec_prefix
773PACKAGE_URL
774PACKAGE_BUGREPORT
775PACKAGE_STRING
776PACKAGE_VERSION
777PACKAGE_TARNAME
778PACKAGE_NAME
779PATH_SEPARATOR
780SHELL'
a4ce5b0d 781ac_subst_files='host_makefile_frag'
81ecdfbb
RW
782ac_user_opts='
783enable_option_checking
784enable_maintainer_mode
da2f07f1
JK
785enable_plugins
786enable_largefile
81ecdfbb
RW
787with_separate_debug_dir
788with_gdb_datadir
789with_relocated_sources
7349ff92 790with_auto_load_dir
bccbefd2 791with_auto_load_safe_path
81ecdfbb
RW
792enable_targets
793enable_64_bit_bfd
794enable_gdbcli
795enable_gdbmi
796enable_tui
797enable_gdbtk
05e7c244 798with_libunwind_ia64
81ecdfbb
RW
799with_curses
800enable_profiling
801with_pkgversion
802with_bugurl
b040ad30 803with_zlib
81ecdfbb 804with_libiconv_prefix
478aac75 805with_iconv_bin
81ecdfbb 806with_system_readline
b8e0a31c 807with_jit_reader_dir
81ecdfbb
RW
808with_expat
809with_gnu_ld
810enable_rpath
811with_libexpat_prefix
812with_python
a8db4212 813enable_libmcheck
81ecdfbb
RW
814with_included_regex
815with_sysroot
816with_system_gdbinit
817enable_werror
818enable_build_warnings
819enable_gdb_build_warnings
608e2dbb
TT
820with_lzma
821with_liblzma_prefix
81ecdfbb
RW
822with_tcl
823with_tk
824with_x
825enable_sim
826enable_multi_ice
496c0e1b 827enable_gdbserver
393fd4c3
YQ
828with_babeltrace
829with_libbabeltrace_prefix
81ecdfbb
RW
830'
831 ac_precious_vars='build_alias
832host_alias
833target_alias
834CC
835CFLAGS
836LDFLAGS
837LIBS
838CPPFLAGS
839CPP
f06e05e0
JK
840MAKEINFO
841MAKEINFOFLAGS
81ecdfbb
RW
842YACC
843YFLAGS
844XMKMF'
5ae98d25 845ac_subdirs_all='testsuite
81ecdfbb
RW
846gdbtk
847multi-ice
848gdbserver'
c906108c
SS
849
850# Initialize some variables set by options.
bec39cab
AC
851ac_init_help=
852ac_init_version=false
81ecdfbb
RW
853ac_unrecognized_opts=
854ac_unrecognized_sep=
c906108c
SS
855# The variables have the same names as the options, with
856# dashes changed to underlines.
bec39cab 857cache_file=/dev/null
c906108c 858exec_prefix=NONE
c906108c 859no_create=
c906108c
SS
860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
865silent=
866site=
867srcdir=
c906108c
SS
868verbose=
869x_includes=NONE
870x_libraries=NONE
bec39cab
AC
871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 877# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
c906108c
SS
883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
c906108c
SS
886includedir='${prefix}/include'
887oldincludedir='/usr/include'
81ecdfbb
RW
888docdir='${datarootdir}/doc/${PACKAGE}'
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
c906108c 897
c906108c 898ac_prev=
81ecdfbb 899ac_dashdash=
c906108c
SS
900for ac_option
901do
c906108c
SS
902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
81ecdfbb 904 eval $ac_prev=\$ac_option
c906108c
SS
905 ac_prev=
906 continue
907 fi
908
81ecdfbb
RW
909 case $ac_option in
910 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *) ac_optarg=yes ;;
912 esac
c906108c
SS
913
914 # Accept the important Cygnus configure options, so we can diagnose typos.
915
81ecdfbb
RW
916 case $ac_dashdash$ac_option in
917 --)
918 ac_dashdash=yes ;;
c906108c
SS
919
920 -bindir | --bindir | --bindi | --bind | --bin | --bi)
921 ac_prev=bindir ;;
922 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 923 bindir=$ac_optarg ;;
c906108c
SS
924
925 -build | --build | --buil | --bui | --bu)
bec39cab 926 ac_prev=build_alias ;;
c906108c 927 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 928 build_alias=$ac_optarg ;;
c906108c
SS
929
930 -cache-file | --cache-file | --cache-fil | --cache-fi \
931 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932 ac_prev=cache_file ;;
933 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
935 cache_file=$ac_optarg ;;
936
937 --config-cache | -C)
938 cache_file=config.cache ;;
c906108c 939
81ecdfbb 940 -datadir | --datadir | --datadi | --datad)
c906108c 941 ac_prev=datadir ;;
81ecdfbb 942 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 943 datadir=$ac_optarg ;;
c906108c 944
81ecdfbb
RW
945 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946 | --dataroo | --dataro | --datar)
947 ac_prev=datarootdir ;;
948 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950 datarootdir=$ac_optarg ;;
951
c906108c 952 -disable-* | --disable-*)
81ecdfbb 953 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 954 # Reject names that are not valid shell variable names.
81ecdfbb
RW
955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
956 as_fn_error "invalid feature name: $ac_useropt"
957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=no ;;
967
968 -docdir | --docdir | --docdi | --doc | --do)
969 ac_prev=docdir ;;
970 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971 docdir=$ac_optarg ;;
972
973 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974 ac_prev=dvidir ;;
975 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976 dvidir=$ac_optarg ;;
c906108c
SS
977
978 -enable-* | --enable-*)
81ecdfbb 979 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 980 # Reject names that are not valid shell variable names.
81ecdfbb
RW
981 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
982 as_fn_error "invalid feature name: $ac_useropt"
983 ac_useropt_orig=$ac_useropt
984 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985 case $ac_user_opts in
986 *"
987"enable_$ac_useropt"
988"*) ;;
989 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990 ac_unrecognized_sep=', ';;
b4e70030 991 esac
81ecdfbb 992 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
993
994 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996 | --exec | --exe | --ex)
997 ac_prev=exec_prefix ;;
998 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000 | --exec=* | --exe=* | --ex=*)
bec39cab 1001 exec_prefix=$ac_optarg ;;
c906108c
SS
1002
1003 -gas | --gas | --ga | --g)
1004 # Obsolete; use --with-gas.
1005 with_gas=yes ;;
1006
bec39cab
AC
1007 -help | --help | --hel | --he | -h)
1008 ac_init_help=long ;;
1009 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010 ac_init_help=recursive ;;
1011 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012 ac_init_help=short ;;
c906108c
SS
1013
1014 -host | --host | --hos | --ho)
bec39cab 1015 ac_prev=host_alias ;;
c906108c 1016 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1017 host_alias=$ac_optarg ;;
c906108c 1018
81ecdfbb
RW
1019 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020 ac_prev=htmldir ;;
1021 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022 | --ht=*)
1023 htmldir=$ac_optarg ;;
1024
c906108c
SS
1025 -includedir | --includedir | --includedi | --included | --include \
1026 | --includ | --inclu | --incl | --inc)
1027 ac_prev=includedir ;;
1028 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1030 includedir=$ac_optarg ;;
c906108c
SS
1031
1032 -infodir | --infodir | --infodi | --infod | --info | --inf)
1033 ac_prev=infodir ;;
1034 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1035 infodir=$ac_optarg ;;
c906108c
SS
1036
1037 -libdir | --libdir | --libdi | --libd)
1038 ac_prev=libdir ;;
1039 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1040 libdir=$ac_optarg ;;
c906108c
SS
1041
1042 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043 | --libexe | --libex | --libe)
1044 ac_prev=libexecdir ;;
1045 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046 | --libexe=* | --libex=* | --libe=*)
bec39cab 1047 libexecdir=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -localedir | --localedir | --localedi | --localed | --locale)
1050 ac_prev=localedir ;;
1051 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052 localedir=$ac_optarg ;;
1053
c906108c 1054 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1055 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1056 ac_prev=localstatedir ;;
1057 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1058 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1059 localstatedir=$ac_optarg ;;
c906108c
SS
1060
1061 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062 ac_prev=mandir ;;
1063 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1064 mandir=$ac_optarg ;;
c906108c
SS
1065
1066 -nfp | --nfp | --nf)
1067 # Obsolete; use --without-fp.
1068 with_fp=no ;;
1069
1070 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1071 | --no-cr | --no-c | -n)
c906108c
SS
1072 no_create=yes ;;
1073
1074 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076 no_recursion=yes ;;
1077
1078 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080 | --oldin | --oldi | --old | --ol | --o)
1081 ac_prev=oldincludedir ;;
1082 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1085 oldincludedir=$ac_optarg ;;
c906108c
SS
1086
1087 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088 ac_prev=prefix ;;
1089 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1090 prefix=$ac_optarg ;;
c906108c
SS
1091
1092 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093 | --program-pre | --program-pr | --program-p)
1094 ac_prev=program_prefix ;;
1095 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1097 program_prefix=$ac_optarg ;;
c906108c
SS
1098
1099 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100 | --program-suf | --program-su | --program-s)
1101 ac_prev=program_suffix ;;
1102 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1104 program_suffix=$ac_optarg ;;
c906108c
SS
1105
1106 -program-transform-name | --program-transform-name \
1107 | --program-transform-nam | --program-transform-na \
1108 | --program-transform-n | --program-transform- \
1109 | --program-transform | --program-transfor \
1110 | --program-transfo | --program-transf \
1111 | --program-trans | --program-tran \
1112 | --progr-tra | --program-tr | --program-t)
1113 ac_prev=program_transform_name ;;
1114 -program-transform-name=* | --program-transform-name=* \
1115 | --program-transform-nam=* | --program-transform-na=* \
1116 | --program-transform-n=* | --program-transform-=* \
1117 | --program-transform=* | --program-transfor=* \
1118 | --program-transfo=* | --program-transf=* \
1119 | --program-trans=* | --program-tran=* \
1120 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1121 program_transform_name=$ac_optarg ;;
c906108c 1122
81ecdfbb
RW
1123 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124 ac_prev=pdfdir ;;
1125 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126 pdfdir=$ac_optarg ;;
1127
1128 -psdir | --psdir | --psdi | --psd | --ps)
1129 ac_prev=psdir ;;
1130 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131 psdir=$ac_optarg ;;
1132
c906108c
SS
1133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 silent=yes ;;
1136
1137 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1138 ac_prev=sbindir ;;
1139 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1140 | --sbi=* | --sb=*)
bec39cab 1141 sbindir=$ac_optarg ;;
c906108c
SS
1142
1143 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1144 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1145 | --sharedst | --shareds | --shared | --share | --shar \
1146 | --sha | --sh)
1147 ac_prev=sharedstatedir ;;
1148 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1149 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1150 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1151 | --sha=* | --sh=*)
bec39cab 1152 sharedstatedir=$ac_optarg ;;
c906108c
SS
1153
1154 -site | --site | --sit)
1155 ac_prev=site ;;
1156 -site=* | --site=* | --sit=*)
bec39cab 1157 site=$ac_optarg ;;
3ace7edb 1158
c906108c
SS
1159 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1160 ac_prev=srcdir ;;
1161 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1162 srcdir=$ac_optarg ;;
c906108c
SS
1163
1164 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1165 | --syscon | --sysco | --sysc | --sys | --sy)
1166 ac_prev=sysconfdir ;;
1167 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1168 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1169 sysconfdir=$ac_optarg ;;
c906108c
SS
1170
1171 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1172 ac_prev=target_alias ;;
c906108c 1173 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1174 target_alias=$ac_optarg ;;
c906108c
SS
1175
1176 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1177 verbose=yes ;;
1178
bec39cab
AC
1179 -version | --version | --versio | --versi | --vers | -V)
1180 ac_init_version=: ;;
c906108c
SS
1181
1182 -with-* | --with-*)
81ecdfbb 1183 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1184 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1186 as_fn_error "invalid package name: $ac_useropt"
1187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
b4e70030 1195 esac
81ecdfbb 1196 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1197
1198 -without-* | --without-*)
81ecdfbb 1199 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1200 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202 as_fn_error "invalid package name: $ac_useropt"
1203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=no ;;
c906108c
SS
1213
1214 --x)
1215 # Obsolete; use --with-x.
1216 with_x=yes ;;
1217
1218 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1219 | --x-incl | --x-inc | --x-in | --x-i)
1220 ac_prev=x_includes ;;
1221 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1222 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1223 x_includes=$ac_optarg ;;
c906108c
SS
1224
1225 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1226 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1227 ac_prev=x_libraries ;;
1228 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1229 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1230 x_libraries=$ac_optarg ;;
c906108c 1231
81ecdfbb
RW
1232 -*) as_fn_error "unrecognized option: \`$ac_option'
1233Try \`$0 --help' for more information."
c906108c
SS
1234 ;;
1235
bec39cab
AC
1236 *=*)
1237 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1238 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1239 case $ac_envvar in #(
1240 '' | [0-9]* | *[!_$as_cr_alnum]* )
1241 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1242 esac
1243 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1244 export $ac_envvar ;;
1245
c906108c 1246 *)
bec39cab 1247 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1248 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1249 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1250 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1251 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1252 ;;
1253
1254 esac
1255done
1256
1257if test -n "$ac_prev"; then
bec39cab 1258 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1259 as_fn_error "missing argument to $ac_option"
c906108c 1260fi
c906108c 1261
81ecdfbb
RW
1262if test -n "$ac_unrecognized_opts"; then
1263 case $enable_option_checking in
1264 no) ;;
1265 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1266 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1267 esac
81ecdfbb 1268fi
b4e70030 1269
81ecdfbb
RW
1270# Check all directory arguments for consistency.
1271for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1272 datadir sysconfdir sharedstatedir localstatedir includedir \
1273 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1274 libdir localedir mandir
b4e70030 1275do
81ecdfbb
RW
1276 eval ac_val=\$$ac_var
1277 # Remove trailing slashes.
1278 case $ac_val in
1279 */ )
1280 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1281 eval $ac_var=\$ac_val;;
1282 esac
1283 # Be sure to have absolute directory names.
b4e70030 1284 case $ac_val in
81ecdfbb
RW
1285 [\\/$]* | ?:[\\/]* ) continue;;
1286 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1287 esac
81ecdfbb 1288 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1289done
1290
bec39cab
AC
1291# There might be people who depend on the old broken behavior: `$host'
1292# used to hold the argument of --host etc.
1293# FIXME: To remove some day.
1294build=$build_alias
1295host=$host_alias
1296target=$target_alias
1297
1298# FIXME: To remove some day.
1299if test "x$host_alias" != x; then
1300 if test "x$build_alias" = x; then
1301 cross_compiling=maybe
81ecdfbb 1302 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1303 If a cross compiler is detected then cross compile mode will be used." >&2
1304 elif test "x$build_alias" != "x$host_alias"; then
1305 cross_compiling=yes
1306 fi
1307fi
c906108c 1308
bec39cab
AC
1309ac_tool_prefix=
1310test -n "$host_alias" && ac_tool_prefix=$host_alias-
1311
1312test "$silent" = yes && exec 6>/dev/null
c906108c 1313
c906108c 1314
81ecdfbb
RW
1315ac_pwd=`pwd` && test -n "$ac_pwd" &&
1316ac_ls_di=`ls -di .` &&
1317ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1318 as_fn_error "working directory cannot be determined"
1319test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1320 as_fn_error "pwd does not report name of working directory"
1321
1322
c906108c
SS
1323# Find the source files, if location was not specified.
1324if test -z "$srcdir"; then
1325 ac_srcdir_defaulted=yes
81ecdfbb
RW
1326 # Try the directory containing this script, then the parent directory.
1327 ac_confdir=`$as_dirname -- "$as_myself" ||
1328$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1329 X"$as_myself" : 'X\(//\)[^/]' \| \
1330 X"$as_myself" : 'X\(//\)$' \| \
1331 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1332$as_echo X"$as_myself" |
1333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)[^/].*/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\).*/{
1346 s//\1/
1347 q
1348 }
1349 s/.*/./; q'`
c906108c 1350 srcdir=$ac_confdir
81ecdfbb 1351 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1352 srcdir=..
1353 fi
1354else
1355 ac_srcdir_defaulted=no
1356fi
81ecdfbb
RW
1357if test ! -r "$srcdir/$ac_unique_file"; then
1358 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1359 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1360fi
1361ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1362ac_abs_confdir=`(
1363 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1364 pwd)`
1365# When building in place, set srcdir=.
1366if test "$ac_abs_confdir" = "$ac_pwd"; then
1367 srcdir=.
1368fi
1369# Remove unnecessary trailing slashes from srcdir.
1370# Double slashes in file names in object file debugging info
1371# mess up M-x gdb in Emacs.
1372case $srcdir in
1373*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1374esac
1375for ac_var in $ac_precious_vars; do
1376 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1377 eval ac_env_${ac_var}_value=\$${ac_var}
1378 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1380done
c906108c 1381
bec39cab
AC
1382#
1383# Report the --help message.
1384#
1385if test "$ac_init_help" = "long"; then
1386 # Omit some internal or obsolete options to make the list less imposing.
1387 # This message is too long to be a string in the A/UX 3.1 sh.
1388 cat <<_ACEOF
1389\`configure' configures this package to adapt to many kinds of systems.
1390
1391Usage: $0 [OPTION]... [VAR=VALUE]...
1392
1393To assign environment variables (e.g., CC, CFLAGS...), specify them as
1394VAR=VALUE. See below for descriptions of some of the useful variables.
1395
1396Defaults for the options are specified in brackets.
1397
1398Configuration:
1399 -h, --help display this help and exit
1400 --help=short display options specific to this package
1401 --help=recursive display the short help of all the included packages
1402 -V, --version display version information and exit
1403 -q, --quiet, --silent do not print \`checking...' messages
1404 --cache-file=FILE cache test results in FILE [disabled]
1405 -C, --config-cache alias for \`--cache-file=config.cache'
1406 -n, --no-create do not create output files
1407 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1408
bec39cab
AC
1409Installation directories:
1410 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1411 [$ac_default_prefix]
bec39cab 1412 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1413 [PREFIX]
bec39cab
AC
1414
1415By default, \`make install' will install all the files in
1416\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1417an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1418for instance \`--prefix=\$HOME'.
1419
1420For better control, use the options below.
1421
1422Fine tuning of the installation directories:
81ecdfbb
RW
1423 --bindir=DIR user executables [EPREFIX/bin]
1424 --sbindir=DIR system admin executables [EPREFIX/sbin]
1425 --libexecdir=DIR program executables [EPREFIX/libexec]
1426 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1427 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1428 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1429 --libdir=DIR object code libraries [EPREFIX/lib]
1430 --includedir=DIR C header files [PREFIX/include]
1431 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1432 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1433 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1434 --infodir=DIR info documentation [DATAROOTDIR/info]
1435 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1436 --mandir=DIR man documentation [DATAROOTDIR/man]
1437 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1438 --htmldir=DIR html documentation [DOCDIR]
1439 --dvidir=DIR dvi documentation [DOCDIR]
1440 --pdfdir=DIR pdf documentation [DOCDIR]
1441 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1442_ACEOF
1443
1444 cat <<\_ACEOF
1445
9009e1ae
MR
1446Program names:
1447 --program-prefix=PREFIX prepend PREFIX to installed program names
1448 --program-suffix=SUFFIX append SUFFIX to installed program names
1449 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1450
bec39cab
AC
1451X features:
1452 --x-includes=DIR X include files are in DIR
1453 --x-libraries=DIR X library files are in DIR
1454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1458 --target=TARGET configure for building compilers for TARGET [HOST]
1459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
1463
1464 cat <<\_ACEOF
1465
1466Optional Features:
81ecdfbb 1467 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1468 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1469 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1470 --enable-maintainer-mode enable make rules and dependencies not useful
1471 (and sometimes confusing) to the casual installer
da2f07f1
JK
1472 --enable-plugins Enable support for plugins (defaults no)
1473 --disable-largefile omit support for large files
a1220294
TT
1474 --enable-targets=TARGETS
1475 alternative target configurations
c0993dbe 1476 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1477 --disable-gdbcli disable command-line interface (CLI)
1478 --disable-gdbmi disable machine-interface (MI)
1479 --enable-tui enable full-screen terminal user interface (TUI)
1480 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1481 --enable-profiling enable profiling of GDB
3841debe 1482 --disable-rpath do not hardcode runtime library paths
a8db4212 1483 --enable-libmcheck Try building GDB with -lmcheck if available
a1220294 1484 --enable-werror treat compile warnings as errors
32c1c914 1485 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1486 --enable-gdb-build-warnings
32c1c914 1487 enable GDB specific build-time compiler warnings if
a1220294 1488 gcc is used
32c1c914 1489 --enable-sim link gdb with simulator
bec39cab 1490 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1491 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1492 is auto)
bec39cab
AC
1493
1494Optional Packages:
1495 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1496 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1497 --with-separate-debug-dir=PATH
32c1c914 1498 look for global separate debug info in this path
62e4f60c 1499 [LIBDIR/debug]
b14b1491
TT
1500 --with-gdb-datadir=PATH look for global separate data files in this path
1501 [DATADIR/gdb]
29b0e8a2 1502 --with-relocated-sources=PATH
32c1c914 1503 automatically relocate this path for source files
7349ff92 1504 --with-auto-load-dir=PATH
aff139ff 1505 directories from which to load auto-loaded scripts
1564a261 1506 [$debugdir:$datadir/auto-load]
bccbefd2 1507 --with-auto-load-safe-path=PATH
aff139ff 1508 directories safe to hold auto-loaded files
7349ff92 1509 [--with-auto-load-dir]
bccbefd2
JK
1510 --without-auto-load-safe-path
1511 do not restrict auto-loaded files locations
05e7c244 1512 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1513 --with-curses use the curses library instead of the termcap
1514 library
c16158bc
JM
1515 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1516 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1517 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1518 --with-libiconv-prefix=DIR
1519 search for libiconv in DIR/include and DIR/lib
478aac75 1520 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1521 --with-system-readline use installed readline library
b8e0a31c
SD
1522 --with-jit-reader-dir=PATH
1523 directory to load the JIT readers from
5c39566f 1524 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1525 --with-gnu-ld assume the C compiler uses GNU ld default=no
1526 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1527 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1528 --with-python[=PYTHON] include python support
1529 (auto/yes/no/<python-program>)
a1220294
TT
1530 --without-included-regex
1531 don't use included regex; this is the default on
1532 systems with version 2 of the GNU C library (use
1533 with caution on other system)
81ecdfbb 1534 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1535 --with-system-gdbinit=PATH
32c1c914 1536 automatically load a system-wide gdbinit file
608e2dbb
TT
1537 --with-lzma support lzma compression (auto/yes/no)
1538 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1539 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1540 --with-tcl directory containing tcl configuration (tclConfig.sh)
1541 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1542 --with-x use the X Window System
393fd4c3
YQ
1543 --with-babeltrace include babeltrace support (auto/yes/no)
1544 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1545 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1546
1547Some influential environment variables:
1548 CC C compiler command
1549 CFLAGS C compiler flags
1550 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1551 nonstandard directory <lib dir>
81ecdfbb
RW
1552 LIBS libraries to pass to the linker, e.g. -l<library>
1553 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1554 you have headers in a nonstandard directory <include dir>
bec39cab 1555 CPP C preprocessor
f06e05e0
JK
1556 MAKEINFO Parent configure detects if it is of sufficient version.
1557 MAKEINFOFLAGS
1558 Parameters for MAKEINFO.
81ecdfbb
RW
1559 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1560 the first program found out of: `bison -y', `byacc', `yacc'.
1561 YFLAGS The list of arguments that will be passed by default to $YACC.
1562 This script will default YFLAGS to the empty string to avoid a
1563 default value of `-d' given by some make applications.
1564 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1565
1566Use these variables to override the choices made by `configure' or to help
1567it to find libraries and programs with nonstandard names/locations.
1568
81ecdfbb 1569Report bugs to the package provider.
bec39cab 1570_ACEOF
81ecdfbb 1571ac_status=$?
bec39cab
AC
1572fi
1573
1574if test "$ac_init_help" = "recursive"; then
1575 # If there are subdirs, report their specific --help.
bec39cab 1576 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1577 test -d "$ac_dir" ||
1578 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1579 continue
bec39cab
AC
1580 ac_builddir=.
1581
81ecdfbb
RW
1582case "$ac_dir" in
1583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584*)
1585 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1586 # A ".." for each directory in $ac_dir_suffix.
1587 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1588 case $ac_top_builddir_sub in
1589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1591 esac ;;
1592esac
1593ac_abs_top_builddir=$ac_pwd
1594ac_abs_builddir=$ac_pwd$ac_dir_suffix
1595# for backward compatibility:
1596ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1597
1598case $srcdir in
81ecdfbb 1599 .) # We are building in place.
bec39cab 1600 ac_srcdir=.
81ecdfbb
RW
1601 ac_top_srcdir=$ac_top_builddir_sub
1602 ac_abs_top_srcdir=$ac_pwd ;;
1603 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1604 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1605 ac_top_srcdir=$srcdir
1606 ac_abs_top_srcdir=$srcdir ;;
1607 *) # Relative name.
1608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1609 ac_top_srcdir=$ac_top_build_prefix$srcdir
1610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1611esac
81ecdfbb 1612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1613
81ecdfbb
RW
1614 cd "$ac_dir" || { ac_status=$?; continue; }
1615 # Check for guested configure.
1616 if test -f "$ac_srcdir/configure.gnu"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1619 elif test -f "$ac_srcdir/configure"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1622 else
81ecdfbb
RW
1623 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1624 fi || ac_status=$?
1625 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1626 done
1627fi
1628
81ecdfbb 1629test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1630if $ac_init_version; then
1631 cat <<\_ACEOF
81ecdfbb
RW
1632configure
1633generated by GNU Autoconf 2.64
bec39cab 1634
81ecdfbb 1635Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1636This configure script is free software; the Free Software Foundation
1637gives unlimited permission to copy, distribute and modify it.
1638_ACEOF
81ecdfbb 1639 exit
bec39cab 1640fi
bec39cab 1641
81ecdfbb
RW
1642## ------------------------ ##
1643## Autoconf initialization. ##
1644## ------------------------ ##
bec39cab 1645
81ecdfbb
RW
1646# ac_fn_c_try_compile LINENO
1647# --------------------------
1648# Try to compile conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_compile ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext
1653 if { { ac_try="$ac_compile"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_compile") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest.$ac_objext; then :
1672 ac_retval=0
1673else
1674 $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1676
81ecdfbb
RW
1677 ac_retval=1
1678fi
1679 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1680 return $ac_retval
1681
1682} # ac_fn_c_try_compile
1683
1684# ac_fn_c_try_cpp LINENO
1685# ----------------------
1686# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_cpp ()
bec39cab 1688{
81ecdfbb
RW
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 if { { ac_try="$ac_cpp conftest.$ac_ext"
1691case "(($ac_try" in
1692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693 *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1698 ac_status=$?
1699 if test -s conftest.err; then
1700 grep -v '^ *+' conftest.err >conftest.er1
1701 cat conftest.er1 >&5
1702 mv -f conftest.er1 conftest.err
1703 fi
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } >/dev/null && {
1706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1707 test ! -s conftest.err
1708 }; then :
1709 ac_retval=0
1710else
1711 $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1713
81ecdfbb
RW
1714 ac_retval=1
1715fi
1716 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1717 return $ac_retval
bec39cab 1718
81ecdfbb 1719} # ac_fn_c_try_cpp
bec39cab 1720
81ecdfbb
RW
1721# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1722# -------------------------------------------------------
1723# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1724# the include files in INCLUDES and setting the cache variable VAR
1725# accordingly.
1726ac_fn_c_check_header_mongrel ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1731$as_echo_n "checking for $2... " >&6; }
1732if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1733 $as_echo_n "(cached) " >&6
1734fi
1735eval ac_res=\$$3
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1737$as_echo "$ac_res" >&6; }
1738else
1739 # Is the header compilable?
1740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1741$as_echo_n "checking $2 usability... " >&6; }
1742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1743/* end confdefs.h. */
1744$4
1745#include <$2>
1746_ACEOF
1747if ac_fn_c_try_compile "$LINENO"; then :
1748 ac_header_compiler=yes
1749else
1750 ac_header_compiler=no
1751fi
1752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1754$as_echo "$ac_header_compiler" >&6; }
bec39cab 1755
81ecdfbb
RW
1756# Is the header present?
1757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1758$as_echo_n "checking $2 presence... " >&6; }
1759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1760/* end confdefs.h. */
1761#include <$2>
1762_ACEOF
1763if ac_fn_c_try_cpp "$LINENO"; then :
1764 ac_header_preproc=yes
1765else
1766 ac_header_preproc=no
1767fi
1768rm -f conftest.err conftest.$ac_ext
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1770$as_echo "$ac_header_preproc" >&6; }
bec39cab 1771
81ecdfbb
RW
1772# So? What about this header?
1773case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1774 yes:no: )
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1776$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1778$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1779 ;;
1780 no:yes:* )
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1782$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1784$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1786$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1788$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1790$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1791 ;;
1792esac
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1794$as_echo_n "checking for $2... " >&6; }
1795if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1796 $as_echo_n "(cached) " >&6
1797else
1798 eval "$3=\$ac_header_compiler"
1799fi
1800eval ac_res=\$$3
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1802$as_echo "$ac_res" >&6; }
1803fi
1804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1805
81ecdfbb 1806} # ac_fn_c_check_header_mongrel
bec39cab 1807
81ecdfbb
RW
1808# ac_fn_c_try_run LINENO
1809# ----------------------
1810# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1811# that executables *can* be run.
1812ac_fn_c_try_run ()
1813{
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_link"
1816case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819esac
1820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821$as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_link") 2>&5
1823 ac_status=$?
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1825 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1826 { { case "(($ac_try" in
1827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1828 *) ac_try_echo=$ac_try;;
1829esac
1830eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1831$as_echo "$ac_try_echo"; } >&5
1832 (eval "$ac_try") 2>&5
1833 ac_status=$?
1834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1835 test $ac_status = 0; }; }; then :
1836 ac_retval=0
1837else
1838 $as_echo "$as_me: program exited with status $ac_status" >&5
1839 $as_echo "$as_me: failed program was:" >&5
1840sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1841
81ecdfbb
RW
1842 ac_retval=$ac_status
1843fi
1844 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1845 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1846 return $ac_retval
bec39cab 1847
81ecdfbb 1848} # ac_fn_c_try_run
bec39cab 1849
81ecdfbb
RW
1850# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1851# -------------------------------------------------------
1852# Tests whether HEADER exists and can be compiled using the include files in
1853# INCLUDES, setting the cache variable VAR accordingly.
1854ac_fn_c_check_header_compile ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863/* end confdefs.h. */
1864$4
1865#include <$2>
bec39cab 1866_ACEOF
81ecdfbb
RW
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 eval "$3=yes"
1869else
1870 eval "$3=no"
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
1877 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1878
81ecdfbb 1879} # ac_fn_c_check_header_compile
bec39cab 1880
81ecdfbb
RW
1881# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1882# --------------------------------------------
1883# Tries to find the compile-time value of EXPR in a program that includes
1884# INCLUDES, setting VAR accordingly. Returns whether the value could be
1885# computed
1886ac_fn_c_compute_int ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if test "$cross_compiling" = yes; then
1890 # Depending upon the size, compute the lo and hi bounds.
1891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !(($2) >= 0)];
1898test_array [0] = 0
bec39cab 1899
81ecdfbb
RW
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 ac_lo=0 ac_mid=0
1906 while :; do
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1914test_array [0] = 0
bec39cab 1915
81ecdfbb
RW
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 ac_hi=$ac_mid; break
1922else
1923 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1924 if test $ac_lo -le $ac_mid; then
1925 ac_lo= ac_hi=
1926 break
1927 fi
1928 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1929fi
81ecdfbb
RW
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931 done
c906108c 1932else
81ecdfbb
RW
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939static int test_array [1 - 2 * !(($2) < 0)];
1940test_array [0] = 0
bec39cab 1941
81ecdfbb
RW
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 ac_hi=-1 ac_mid=-1
1948 while :; do
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1956test_array [0] = 0
bec39cab 1957
81ecdfbb
RW
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 ac_lo=$ac_mid; break
1964else
1965 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1966 if test $ac_mid -le $ac_hi; then
1967 ac_lo= ac_hi=
1968 break
1969 fi
1970 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973 done
1974else
1975 ac_lo= ac_hi=
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980# Binary search between lo and hi bounds.
1981while test "x$ac_lo" != "x$ac_hi"; do
1982 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986int
1987main ()
1988{
1989static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1990test_array [0] = 0
bec39cab 1991
81ecdfbb
RW
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 ac_hi=$ac_mid
1998else
1999 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2002done
2003case $ac_lo in #((
2004?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2005'') ac_retval=1 ;;
2006esac
2007 else
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011static long int longval () { return $2; }
2012static unsigned long int ulongval () { return $2; }
2013#include <stdio.h>
2014#include <stdlib.h>
2015int
2016main ()
2017{
bec39cab 2018
81ecdfbb
RW
2019 FILE *f = fopen ("conftest.val", "w");
2020 if (! f)
2021 return 1;
2022 if (($2) < 0)
2023 {
2024 long int i = longval ();
2025 if (i != ($2))
2026 return 1;
2027 fprintf (f, "%ld", i);
2028 }
2029 else
2030 {
2031 unsigned long int i = ulongval ();
2032 if (i != ($2))
2033 return 1;
2034 fprintf (f, "%lu", i);
2035 }
2036 /* Do not output a trailing newline, as this causes \r\n confusion
2037 on some platforms. */
2038 return ferror (f) || fclose (f) != 0;
bec39cab 2039
81ecdfbb
RW
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_run "$LINENO"; then :
2045 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2046else
2047 ac_retval=1
2048fi
2049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2050 conftest.$ac_objext conftest.beam conftest.$ac_ext
2051rm -f conftest.val
bec39cab 2052
81ecdfbb
RW
2053 fi
2054 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2055 return $ac_retval
bec39cab 2056
81ecdfbb 2057} # ac_fn_c_compute_int
bec39cab 2058
c971b7fa
PA
2059# ac_fn_c_try_link LINENO
2060# -----------------------
2061# Try to link conftest.$ac_ext, and return whether this succeeded.
2062ac_fn_c_try_link ()
2063{
2064 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065 rm -f conftest.$ac_objext conftest$ac_exeext
2066 if { { ac_try="$ac_link"
2067case "(($ac_try" in
2068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2069 *) ac_try_echo=$ac_try;;
2070esac
2071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2072$as_echo "$ac_try_echo"; } >&5
2073 (eval "$ac_link") 2>conftest.err
2074 ac_status=$?
2075 if test -s conftest.err; then
2076 grep -v '^ *+' conftest.err >conftest.er1
2077 cat conftest.er1 >&5
2078 mv -f conftest.er1 conftest.err
2079 fi
2080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2081 test $ac_status = 0; } && {
2082 test -z "$ac_c_werror_flag" ||
2083 test ! -s conftest.err
2084 } && test -s conftest$ac_exeext && {
2085 test "$cross_compiling" = yes ||
2086 $as_test_x conftest$ac_exeext
2087 }; then :
2088 ac_retval=0
2089else
2090 $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093 ac_retval=1
2094fi
2095 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2096 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2097 # interfere with the next link command; also delete a directory that is
2098 # left behind by Apple's compiler. We do this before executing the actions.
2099 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2100 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2101 return $ac_retval
2102
2103} # ac_fn_c_try_link
2104
55a8c076
YQ
2105# ac_fn_c_check_func LINENO FUNC VAR
2106# ----------------------------------
2107# Tests whether FUNC exists, setting the cache variable VAR accordingly
2108ac_fn_c_check_func ()
81ecdfbb
RW
2109{
2110 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2112$as_echo_n "checking for $2... " >&6; }
2113if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2114 $as_echo_n "(cached) " >&6
2115else
81ecdfbb
RW
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
55a8c076
YQ
2118/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2119 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2120#define $2 innocuous_$2
2121
2122/* System header to define __stub macros and hopefully few prototypes,
2123 which can conflict with char $2 (); below.
2124 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2125 <limits.h> exists even on freestanding compilers. */
2126
2127#ifdef __STDC__
2128# include <limits.h>
2129#else
2130# include <assert.h>
2131#endif
2132
2133#undef $2
2134
2135/* Override any GCC internal prototype to avoid an error.
2136 Use char because int might match the return type of a GCC
2137 builtin and then its argument prototype would still apply. */
2138#ifdef __cplusplus
2139extern "C"
2140#endif
2141char $2 ();
2142/* The GNU C library defines this for functions which it implements
2143 to always fail with ENOSYS. Some functions are actually named
2144 something starting with __ and the normal name is an alias. */
2145#if defined __stub_$2 || defined __stub___$2
2146choke me
2147#endif
2148
2149int
2150main ()
2151{
2152return $2 ();
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_link "$LINENO"; then :
2158 eval "$3=yes"
2159else
2160 eval "$3=no"
2161fi
2162rm -f core conftest.err conftest.$ac_objext \
2163 conftest$ac_exeext conftest.$ac_ext
2164fi
2165eval ac_res=\$$3
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2167$as_echo "$ac_res" >&6; }
2168 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2169
2170} # ac_fn_c_check_func
2171
770d76d7
PA
2172# ac_fn_c_check_decl LINENO SYMBOL VAR
2173# ------------------------------------
2174# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2175ac_fn_c_check_decl ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 as_decl_name=`echo $2|sed 's/ *(.*//'`
2179 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2181$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2182if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2183 $as_echo_n "(cached) " >&6
2184else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187$4
2188int
2189main ()
2190{
2191#ifndef $as_decl_name
2192#ifdef __cplusplus
2193 (void) $as_decl_use;
2194#else
2195 (void) $as_decl_name;
2196#endif
2197#endif
2198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 eval "$3=yes"
2205else
2206 eval "$3=no"
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209fi
2210eval ac_res=\$$3
2211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2212$as_echo "$ac_res" >&6; }
2213 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2214
2215} # ac_fn_c_check_decl
2216
55a8c076
YQ
2217# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2218# ----------------------------------------------------
2219# Tries to find if the field MEMBER exists in type AGGR, after including
2220# INCLUDES, setting cache variable VAR accordingly.
2221ac_fn_c_check_member ()
2222{
2223 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2225$as_echo_n "checking for $2.$3... " >&6; }
2226if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2227 $as_echo_n "(cached) " >&6
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231$5
2232int
2233main ()
2234{
2235static $2 ac_aggr;
2236if (ac_aggr.$3)
2237return 0;
2238 ;
2239 return 0;
2240}
2241_ACEOF
2242if ac_fn_c_try_compile "$LINENO"; then :
2243 eval "$4=yes"
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (sizeof ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 eval "$4=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266fi
2267eval ac_res=\$$4
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
2270 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2271
2272} # ac_fn_c_check_member
2273
2274# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2275# -------------------------------------------
2276# Tests whether TYPE exists after having included INCLUDES, setting cache
2277# variable VAR accordingly.
2278ac_fn_c_check_type ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2282$as_echo_n "checking for $2... " >&6; }
2283if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2284 $as_echo_n "(cached) " >&6
2285else
2286 eval "$3=no"
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$4
2290int
2291main ()
2292{
2293if (sizeof ($2))
2294 return 0;
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_compile "$LINENO"; then :
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306if (sizeof (($2)))
2307 return 0;
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2313
81ecdfbb
RW
2314else
2315 eval "$3=yes"
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2325
81ecdfbb
RW
2326} # ac_fn_c_check_type
2327cat >config.log <<_ACEOF
2328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
d5af19ba 2330
81ecdfbb
RW
2331It was created by $as_me, which was
2332generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2333
81ecdfbb 2334 $ $0 $@
413ccac7 2335
81ecdfbb
RW
2336_ACEOF
2337exec 5>>config.log
2338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
413ccac7 2343
81ecdfbb
RW
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2349
81ecdfbb
RW
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2352
81ecdfbb
RW
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2360
81ecdfbb 2361_ASUNAME
bec39cab 2362
bec39cab
AC
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2368 $as_echo "PATH: $as_dir"
2369 done
2370IFS=$as_save_IFS
bec39cab 2371
81ecdfbb 2372} >&5
bec39cab 2373
81ecdfbb 2374cat >&5 <<_ACEOF
bec39cab 2375
bec39cab 2376
81ecdfbb
RW
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
2386# Strip out --silent because we don't want to record it for future runs.
2387# Also quote any args containing shell meta-characters.
2388# Make two passes to allow for proper duplicate-argument suppression.
2389ac_configure_args=
2390ac_configure_args0=
2391ac_configure_args1=
2392ac_must_keep_next=false
2393for ac_pass in 1 2
2394do
2395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
2402 *\'*)
2403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2404 esac
2405 case $ac_pass in
2406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2407 2)
2408 as_fn_append ac_configure_args1 " '$ac_arg'"
2409 if test $ac_must_keep_next = true; then
2410 ac_must_keep_next=false # Got value, back to normal.
2411 else
2412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
2423 fi
2424 as_fn_append ac_configure_args " '$ac_arg'"
2425 ;;
2426 esac
2427 done
2428done
2429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
2431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
2435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
2441
2442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
2449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
2455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
2460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
2462 esac ;;
2463 esac
2464 done
2465 (set) 2>&1 |
2466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
2468 sed -n \
2469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
2472 *)
2473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2474 ;;
2475 esac |
2476 sort
2477)
2478 echo
2479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
2488 eval ac_val=\$$ac_var
2489 case $ac_val in
2490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2491 esac
2492 $as_echo "$ac_var='\''$ac_val'\''"
2493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
2498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
2501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
2505 eval ac_val=\$$ac_var
2506 case $ac_val in
2507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2508 esac
2509 $as_echo "$ac_var='\''$ac_val'\''"
2510 done | sort
2511 echo
2512 fi
2513
2514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
2521 cat confdefs.h
2522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
2525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
2527 } >&5
2528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2530 exit $exit_status
2531' 0
2532for ac_signal in 1 2 13 15; do
2533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
2538rm -f -r conftest* confdefs.h
2539
2540$as_echo "/* confdefs.h */" > confdefs.h
2541
2542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
2568
2569# Let the site file select an alternate cache file if it wants to.
2570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
2573if test -n "$CONFIG_SITE"; then
2574 ac_site_file1=$CONFIG_SITE
2575elif test "x$prefix" != xNONE; then
2576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
2578else
2579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
2581fi
2582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2583do
2584 test "x$ac_site_file" = xNONE && continue
2585 if test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2588 sed 's/^/| /' "$ac_site_file" >&5
2589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
2594 # Some versions of bash will fail to source /dev/null (special
2595 # files actually), so we avoid doing that.
2596 if test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
2599 case $cache_file in
2600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
2602 esac
2603 fi
2604else
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
2607 >$cache_file
bec39cab
AC
2608fi
2609
81ecdfbb
RW
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
2613for ac_var in $ac_precious_vars; do
2614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
2616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
2618 case $ac_old_set,$ac_new_set in
2619 set,)
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2622 ac_cache_corrupted=: ;;
2623 ,set)
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
2630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
2651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2666fi
2667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
2670
2671ac_ext=c
2672ac_cpp='$CPP $CPPFLAGS'
2673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
2676
2677
2678
2679
2680
2681ac_config_headers="$ac_config_headers config.h:config.in"
2682
2683
2684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2685$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2686 # Check whether --enable-maintainer-mode was given.
2687if test "${enable_maintainer_mode+set}" = set; then :
2688 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2689else
2690 USE_MAINTAINER_MODE=no
2691fi
2692
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2694$as_echo "$USE_MAINTAINER_MODE" >&6; }
2695 if test $USE_MAINTAINER_MODE = yes; then
2696 MAINTAINER_MODE_TRUE=
2697 MAINTAINER_MODE_FALSE='#'
2698else
2699 MAINTAINER_MODE_TRUE='#'
2700 MAINTAINER_MODE_FALSE=
2701fi
2702
2703 MAINT=$MAINTAINER_MODE_TRUE
2704
2705
2706
f5f1cdb6
JK
2707# Provide more thorough testing by -lmcheck.
2708# Set it to 'true' for development snapshots, 'false' for releases or
2709# pre-releases.
2710development=true
2711
81ecdfbb
RW
2712ac_ext=c
2713ac_cpp='$CPP $CPPFLAGS'
2714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2716ac_compiler_gnu=$ac_cv_c_compiler_gnu
2717if test -n "$ac_tool_prefix"; then
2718 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2719set dummy ${ac_tool_prefix}gcc; ac_word=$2
2720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2721$as_echo_n "checking for $ac_word... " >&6; }
2722if test "${ac_cv_prog_CC+set}" = set; then :
2723 $as_echo_n "(cached) " >&6
c906108c
SS
2724else
2725 if test -n "$CC"; then
2726 ac_cv_prog_CC="$CC" # Let the user override the test.
2727else
bec39cab
AC
2728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2729for as_dir in $PATH
2730do
2731 IFS=$as_save_IFS
2732 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2733 for ac_exec_ext in '' $ac_executable_extensions; do
2734 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2735 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2737 break 2
2738 fi
2739done
81ecdfbb
RW
2740 done
2741IFS=$as_save_IFS
bec39cab 2742
c906108c
SS
2743fi
2744fi
bec39cab 2745CC=$ac_cv_prog_CC
c906108c 2746if test -n "$CC"; then
81ecdfbb
RW
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2748$as_echo "$CC" >&6; }
c906108c 2749else
81ecdfbb
RW
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2751$as_echo "no" >&6; }
c906108c
SS
2752fi
2753
81ecdfbb 2754
b4e70030
JB
2755fi
2756if test -z "$ac_cv_prog_CC"; then
2757 ac_ct_CC=$CC
81ecdfbb
RW
2758 # Extract the first word of "gcc", so it can be a program name with args.
2759set dummy gcc; ac_word=$2
2760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2761$as_echo_n "checking for $ac_word... " >&6; }
2762if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2763 $as_echo_n "(cached) " >&6
b4e70030
JB
2764else
2765 if test -n "$ac_ct_CC"; then
2766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2767else
2768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2769for as_dir in $PATH
2770do
2771 IFS=$as_save_IFS
2772 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2773 for ac_exec_ext in '' $ac_executable_extensions; do
2774 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2775 ac_cv_prog_ac_ct_CC="gcc"
2776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2777 break 2
4e8d927d 2778 fi
b4e70030 2779done
81ecdfbb
RW
2780 done
2781IFS=$as_save_IFS
b4e70030
JB
2782
2783fi
2784fi
2785ac_ct_CC=$ac_cv_prog_ac_ct_CC
2786if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2788$as_echo "$ac_ct_CC" >&6; }
b4e70030 2789else
81ecdfbb
RW
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2791$as_echo "no" >&6; }
b4e70030
JB
2792fi
2793
81ecdfbb
RW
2794 if test "x$ac_ct_CC" = x; then
2795 CC=""
2796 else
2797 case $cross_compiling:$ac_tool_warned in
2798yes:)
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2801ac_tool_warned=yes ;;
2802esac
2803 CC=$ac_ct_CC
2804 fi
b4e70030
JB
2805else
2806 CC="$ac_cv_prog_CC"
2807fi
2808
c906108c 2809if test -z "$CC"; then
81ecdfbb
RW
2810 if test -n "$ac_tool_prefix"; then
2811 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2812set dummy ${ac_tool_prefix}cc; ac_word=$2
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2814$as_echo_n "checking for $ac_word... " >&6; }
2815if test "${ac_cv_prog_CC+set}" = set; then :
2816 $as_echo_n "(cached) " >&6
c906108c
SS
2817else
2818 if test -n "$CC"; then
2819 ac_cv_prog_CC="$CC" # Let the user override the test.
2820else
bec39cab
AC
2821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2822for as_dir in $PATH
2823do
2824 IFS=$as_save_IFS
2825 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2826 for ac_exec_ext in '' $ac_executable_extensions; do
2827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2828 ac_cv_prog_CC="${ac_tool_prefix}cc"
2829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2830 break 2
2831 fi
2832done
81ecdfbb
RW
2833 done
2834IFS=$as_save_IFS
2835
2836fi
2837fi
2838CC=$ac_cv_prog_CC
2839if test -n "$CC"; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2841$as_echo "$CC" >&6; }
2842else
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848 fi
2849fi
2850if test -z "$CC"; then
2851 # Extract the first word of "cc", so it can be a program name with args.
2852set dummy cc; ac_word=$2
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2854$as_echo_n "checking for $ac_word... " >&6; }
2855if test "${ac_cv_prog_CC+set}" = set; then :
2856 $as_echo_n "(cached) " >&6
2857else
2858 if test -n "$CC"; then
2859 ac_cv_prog_CC="$CC" # Let the user override the test.
2860else
2861 ac_prog_rejected=no
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
2867 for ac_exec_ext in '' $ac_executable_extensions; do
2868 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2869 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2870 ac_prog_rejected=yes
2871 continue
2872 fi
2873 ac_cv_prog_CC="cc"
2874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877done
2878 done
2879IFS=$as_save_IFS
bec39cab 2880
c906108c
SS
2881if test $ac_prog_rejected = yes; then
2882 # We found a bogon in the path, so make sure we never use it.
2883 set dummy $ac_cv_prog_CC
2884 shift
bec39cab 2885 if test $# != 0; then
c906108c
SS
2886 # We chose a different compiler from the bogus one.
2887 # However, it has the same basename, so the bogon will be chosen
2888 # first if we set CC to just the basename; use the full file name.
2889 shift
bec39cab 2890 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2891 fi
2892fi
2893fi
2894fi
bec39cab 2895CC=$ac_cv_prog_CC
c906108c 2896if test -n "$CC"; then
81ecdfbb
RW
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2898$as_echo "$CC" >&6; }
c906108c 2899else
81ecdfbb
RW
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
c906108c
SS
2902fi
2903
81ecdfbb 2904
bec39cab
AC
2905fi
2906if test -z "$CC"; then
2907 if test -n "$ac_tool_prefix"; then
81ecdfbb 2908 for ac_prog in cl.exe
bec39cab
AC
2909 do
2910 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2911set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2913$as_echo_n "checking for $ac_word... " >&6; }
2914if test "${ac_cv_prog_CC+set}" = set; then :
2915 $as_echo_n "(cached) " >&6
c906108c
SS
2916else
2917 if test -n "$CC"; then
2918 ac_cv_prog_CC="$CC" # Let the user override the test.
2919else
bec39cab
AC
2920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2921for as_dir in $PATH
2922do
2923 IFS=$as_save_IFS
2924 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2925 for ac_exec_ext in '' $ac_executable_extensions; do
2926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2927 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2929 break 2
2930 fi
2931done
81ecdfbb
RW
2932 done
2933IFS=$as_save_IFS
bec39cab 2934
c906108c
SS
2935fi
2936fi
bec39cab 2937CC=$ac_cv_prog_CC
c906108c 2938if test -n "$CC"; then
81ecdfbb
RW
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2940$as_echo "$CC" >&6; }
c906108c 2941else
81ecdfbb
RW
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2943$as_echo "no" >&6; }
c906108c 2944fi
bec39cab 2945
81ecdfbb 2946
bec39cab
AC
2947 test -n "$CC" && break
2948 done
2949fi
2950if test -z "$CC"; then
2951 ac_ct_CC=$CC
81ecdfbb 2952 for ac_prog in cl.exe
bec39cab
AC
2953do
2954 # Extract the first word of "$ac_prog", so it can be a program name with args.
2955set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2957$as_echo_n "checking for $ac_word... " >&6; }
2958if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2959 $as_echo_n "(cached) " >&6
bec39cab
AC
2960else
2961 if test -n "$ac_ct_CC"; then
2962 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2963else
2964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2965for as_dir in $PATH
2966do
2967 IFS=$as_save_IFS
2968 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2969 for ac_exec_ext in '' $ac_executable_extensions; do
2970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2971 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2973 break 2
c906108c 2974 fi
bec39cab 2975done
81ecdfbb
RW
2976 done
2977IFS=$as_save_IFS
bec39cab
AC
2978
2979fi
2980fi
2981ac_ct_CC=$ac_cv_prog_ac_ct_CC
2982if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2984$as_echo "$ac_ct_CC" >&6; }
bec39cab 2985else
81ecdfbb
RW
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2987$as_echo "no" >&6; }
c906108c
SS
2988fi
2989
81ecdfbb 2990
bec39cab
AC
2991 test -n "$ac_ct_CC" && break
2992done
c906108c 2993
81ecdfbb
RW
2994 if test "x$ac_ct_CC" = x; then
2995 CC=""
2996 else
2997 case $cross_compiling:$ac_tool_warned in
2998yes:)
2999{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3000$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3001ac_tool_warned=yes ;;
3002esac
3003 CC=$ac_ct_CC
3004 fi
bec39cab
AC
3005fi
3006
3007fi
3008
3009
81ecdfbb
RW
3010test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3012as_fn_error "no acceptable C compiler found in \$PATH
3013See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3014
3015# Provide some information about the compiler.
81ecdfbb
RW
3016$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3017set X $ac_compile
3018ac_compiler=$2
3019for ac_option in --version -v -V -qversion; do
3020 { { ac_try="$ac_compiler $ac_option >&5"
3021case "(($ac_try" in
3022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023 *) ac_try_echo=$ac_try;;
3024esac
3025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3026$as_echo "$ac_try_echo"; } >&5
3027 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3028 ac_status=$?
81ecdfbb
RW
3029 if test -s conftest.err; then
3030 sed '10a\
3031... rest of stderr output deleted ...
3032 10q' conftest.err >conftest.er1
3033 cat conftest.er1 >&5
3034 rm -f conftest.er1 conftest.err
3035 fi
3036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3037 test $ac_status = 0; }
3038done
bec39cab 3039
81ecdfbb 3040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3041/* end confdefs.h. */
3042
3043int
3044main ()
3045{
3046
3047 ;
3048 return 0;
3049}
3050_ACEOF
3051ac_clean_files_save=$ac_clean_files
81ecdfbb 3052ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3053# Try to create an executable without -o first, disregard a.out.
3054# It will help us diagnose broken compilers, and finding out an intuition
3055# of exeext.
81ecdfbb
RW
3056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3057$as_echo_n "checking for C compiler default output file name... " >&6; }
3058ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3059
3060# The possible output files:
3061ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3062
3063ac_rmfiles=
3064for ac_file in $ac_files
3065do
3066 case $ac_file in
3067 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3068 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3069 esac
3070done
3071rm -f $ac_rmfiles
3072
3073if { { ac_try="$ac_link_default"
3074case "(($ac_try" in
3075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3076 *) ac_try_echo=$ac_try;;
3077esac
3078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3079$as_echo "$ac_try_echo"; } >&5
3080 (eval "$ac_link_default") 2>&5
3081 ac_status=$?
3082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3083 test $ac_status = 0; }; then :
3084 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3085# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3086# in a Makefile. We should not override ac_cv_exeext if it was cached,
3087# so that the user can short-circuit this test for compilers unknown to
3088# Autoconf.
3089for ac_file in $ac_files ''
bec39cab
AC
3090do
3091 test -f "$ac_file" || continue
3092 case $ac_file in
81ecdfbb 3093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3094 ;;
3095 [ab].out )
3096 # We found the default executable, but exeext='' is most
3097 # certainly right.
3098 break;;
3099 *.* )
81ecdfbb
RW
3100 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3101 then :; else
3102 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3103 fi
3104 # We set ac_cv_exeext here because the later test for it is not
3105 # safe: cross compilers may not add the suffix if given an `-o'
3106 # argument, so we may need to know it at that point already.
3107 # Even if this section looks crufty: it has the advantage of
3108 # actually working.
b4e70030
JB
3109 break;;
3110 * )
3111 break;;
bec39cab
AC
3112 esac
3113done
81ecdfbb
RW
3114test "$ac_cv_exeext" = no && ac_cv_exeext=
3115
bec39cab 3116else
81ecdfbb
RW
3117 ac_file=''
3118fi
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3120$as_echo "$ac_file" >&6; }
3121if test -z "$ac_file"; then :
3122 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3123sed 's/^/| /' conftest.$ac_ext >&5
3124
81ecdfbb
RW
3125{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3127{ as_fn_set_status 77
3128as_fn_error "C compiler cannot create executables
3129See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3130fi
b4e70030 3131ac_exeext=$ac_cv_exeext
b4e70030 3132
81ecdfbb 3133# Check that the compiler produces executables we can run. If not, either
bec39cab 3134# the compiler is broken, or we cross compile.
81ecdfbb
RW
3135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3136$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3137# If not cross compiling, check that we can run a simple program.
3138if test "$cross_compiling" != yes; then
3139 if { ac_try='./$ac_file'
81ecdfbb
RW
3140 { { case "(($ac_try" in
3141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3142 *) ac_try_echo=$ac_try;;
3143esac
3144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3145$as_echo "$ac_try_echo"; } >&5
3146 (eval "$ac_try") 2>&5
bec39cab 3147 ac_status=$?
81ecdfbb
RW
3148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3149 test $ac_status = 0; }; }; then
bec39cab 3150 cross_compiling=no
c906108c 3151 else
bec39cab
AC
3152 if test "$cross_compiling" = maybe; then
3153 cross_compiling=yes
3154 else
81ecdfbb
RW
3155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3157as_fn_error "cannot run C compiled programs.
bec39cab 3158If you meant to cross compile, use \`--host'.
81ecdfbb 3159See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3160 fi
c906108c 3161 fi
bec39cab 3162fi
81ecdfbb
RW
3163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3164$as_echo "yes" >&6; }
bec39cab 3165
81ecdfbb 3166rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3167ac_clean_files=$ac_clean_files_save
81ecdfbb 3168# Check that the compiler produces executables we can run. If not, either
b4e70030 3169# the compiler is broken, or we cross compile.
81ecdfbb
RW
3170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3171$as_echo_n "checking whether we are cross compiling... " >&6; }
3172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3173$as_echo "$cross_compiling" >&6; }
3174
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3176$as_echo_n "checking for suffix of executables... " >&6; }
3177if { { ac_try="$ac_link"
3178case "(($ac_try" in
3179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3180 *) ac_try_echo=$ac_try;;
3181esac
3182eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3183$as_echo "$ac_try_echo"; } >&5
3184 (eval "$ac_link") 2>&5
bec39cab 3185 ac_status=$?
81ecdfbb
RW
3186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3187 test $ac_status = 0; }; then :
b4e70030
JB
3188 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3189# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3190# work properly (i.e., refer to `conftest.exe'), while it won't with
3191# `rm'.
3192for ac_file in conftest.exe conftest conftest.*; do
3193 test -f "$ac_file" || continue
3194 case $ac_file in
81ecdfbb 3195 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3196 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3197 break;;
3198 * ) break;;
3199 esac
3200done
c906108c 3201else
81ecdfbb
RW
3202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3204as_fn_error "cannot compute suffix of executables: cannot compile and link
3205See \`config.log' for more details." "$LINENO" 5; }
c906108c 3206fi
b4e70030 3207rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3209$as_echo "$ac_cv_exeext" >&6; }
c906108c 3210
b4e70030 3211rm -f conftest.$ac_ext
bec39cab
AC
3212EXEEXT=$ac_cv_exeext
3213ac_exeext=$EXEEXT
81ecdfbb
RW
3214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3215$as_echo_n "checking for suffix of object files... " >&6; }
3216if test "${ac_cv_objext+set}" = set; then :
3217 $as_echo_n "(cached) " >&6
bec39cab 3218else
81ecdfbb 3219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3220/* end confdefs.h. */
3221
3222int
3223main ()
3224{
3225
3226 ;
3227 return 0;
3228}
3229_ACEOF
3230rm -f conftest.o conftest.obj
81ecdfbb
RW
3231if { { ac_try="$ac_compile"
3232case "(($ac_try" in
3233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3234 *) ac_try_echo=$ac_try;;
3235esac
3236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3237$as_echo "$ac_try_echo"; } >&5
3238 (eval "$ac_compile") 2>&5
3239 ac_status=$?
3240 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3241 test $ac_status = 0; }; then :
3242 for ac_file in conftest.o conftest.obj conftest.*; do
3243 test -f "$ac_file" || continue;
bec39cab 3244 case $ac_file in
81ecdfbb 3245 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3246 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3247 break;;
3248 esac
3249done
c906108c 3250else
81ecdfbb 3251 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3252sed 's/^/| /' conftest.$ac_ext >&5
3253
81ecdfbb
RW
3254{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3256as_fn_error "cannot compute suffix of object files: cannot compile
3257See \`config.log' for more details." "$LINENO" 5; }
c906108c 3258fi
b4e70030 3259rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3260fi
81ecdfbb
RW
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3262$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3263OBJEXT=$ac_cv_objext
3264ac_objext=$OBJEXT
81ecdfbb
RW
3265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3266$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3267if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3268 $as_echo_n "(cached) " >&6
c906108c 3269else
81ecdfbb 3270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3271/* end confdefs.h. */
3272
3273int
3274main ()
3275{
3276#ifndef __GNUC__
3277 choke me
3278#endif
3279
3280 ;
3281 return 0;
3282}
3283_ACEOF
81ecdfbb 3284if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3285 ac_compiler_gnu=yes
3286else
81ecdfbb 3287 ac_compiler_gnu=no
bec39cab 3288fi
81ecdfbb 3289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3290ac_cv_c_compiler_gnu=$ac_compiler_gnu
3291
3292fi
81ecdfbb
RW
3293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3294$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3295if test $ac_compiler_gnu = yes; then
3296 GCC=yes
3297else
3298 GCC=
3299fi
bec39cab
AC
3300ac_test_CFLAGS=${CFLAGS+set}
3301ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3303$as_echo_n "checking whether $CC accepts -g... " >&6; }
3304if test "${ac_cv_prog_cc_g+set}" = set; then :
3305 $as_echo_n "(cached) " >&6
bec39cab 3306else
81ecdfbb
RW
3307 ac_save_c_werror_flag=$ac_c_werror_flag
3308 ac_c_werror_flag=yes
3309 ac_cv_prog_cc_g=no
3310 CFLAGS="-g"
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3312/* end confdefs.h. */
3313
3314int
3315main ()
3316{
3317
3318 ;
3319 return 0;
3320}
3321_ACEOF
81ecdfbb 3322if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3323 ac_cv_prog_cc_g=yes
3324else
81ecdfbb
RW
3325 CFLAGS=""
3326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3327/* end confdefs.h. */
3328
3329int
3330main ()
3331{
3332
3333 ;
3334 return 0;
3335}
3336_ACEOF
3337if ac_fn_c_try_compile "$LINENO"; then :
3338
3339else
3340 ac_c_werror_flag=$ac_save_c_werror_flag
3341 CFLAGS="-g"
3342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3343/* end confdefs.h. */
3344
3345int
3346main ()
3347{
c906108c 3348
81ecdfbb
RW
3349 ;
3350 return 0;
3351}
3352_ACEOF
3353if ac_fn_c_try_compile "$LINENO"; then :
3354 ac_cv_prog_cc_g=yes
3355fi
3356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3357fi
3358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3359fi
81ecdfbb
RW
3360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3361 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3362fi
81ecdfbb
RW
3363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3364$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3365if test "$ac_test_CFLAGS" = set; then
bec39cab 3366 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3367elif test $ac_cv_prog_cc_g = yes; then
3368 if test "$GCC" = yes; then
3369 CFLAGS="-g -O2"
3370 else
3371 CFLAGS="-g"
3372 fi
3373else
3374 if test "$GCC" = yes; then
3375 CFLAGS="-O2"
3376 else
3377 CFLAGS=
3378 fi
3379fi
81ecdfbb
RW
3380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3381$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3382if test "${ac_cv_prog_cc_c89+set}" = set; then :
3383 $as_echo_n "(cached) " >&6
bec39cab 3384else
81ecdfbb 3385 ac_cv_prog_cc_c89=no
bec39cab 3386ac_save_CC=$CC
81ecdfbb 3387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3388/* end confdefs.h. */
c906108c
SS
3389#include <stdarg.h>
3390#include <stdio.h>
3391#include <sys/types.h>
3392#include <sys/stat.h>
3393/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3394struct buf { int x; };
3395FILE * (*rcsopen) (struct buf *, struct stat *, int);
3396static char *e (p, i)
3397 char **p;
3398 int i;
3399{
3400 return p[i];
3401}
3402static char *f (char * (*g) (char **, int), char **p, ...)
3403{
3404 char *s;
3405 va_list v;
3406 va_start (v,p);
3407 s = g (p, va_arg (v,int));
3408 va_end (v);
3409 return s;
3410}
bec39cab
AC
3411
3412/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3413 function prototypes and stuff, but not '\xHH' hex character constants.
3414 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3415 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3416 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3417 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3418 that's true only with -std. */
bec39cab
AC
3419int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3420
81ecdfbb
RW
3421/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3422 inside strings and character constants. */
3423#define FOO(x) 'x'
3424int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3425
c906108c
SS
3426int test (int i, double x);
3427struct s1 {int (*f) (int a);};
3428struct s2 {int (*f) (double a);};
3429int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3430int argc;
3431char **argv;
bec39cab
AC
3432int
3433main ()
3434{
c906108c 3435return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3436 ;
3437 return 0;
3438}
3439_ACEOF
81ecdfbb
RW
3440for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3441 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3442do
3443 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3444 if ac_fn_c_try_compile "$LINENO"; then :
3445 ac_cv_prog_cc_c89=$ac_arg
c906108c 3446fi
81ecdfbb
RW
3447rm -f core conftest.err conftest.$ac_objext
3448 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3449done
81ecdfbb 3450rm -f conftest.$ac_ext
bec39cab 3451CC=$ac_save_CC
c906108c
SS
3452
3453fi
81ecdfbb
RW
3454# AC_CACHE_VAL
3455case "x$ac_cv_prog_cc_c89" in
3456 x)
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3458$as_echo "none needed" >&6; } ;;
3459 xno)
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3461$as_echo "unsupported" >&6; } ;;
bec39cab 3462 *)
81ecdfbb
RW
3463 CC="$CC $ac_cv_prog_cc_c89"
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3465$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3466esac
81ecdfbb 3467if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3468
b4e70030
JB
3469fi
3470
bec39cab
AC
3471ac_ext=c
3472ac_cpp='$CPP $CPPFLAGS'
3473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3475ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3476
60ca704f 3477
bec39cab
AC
3478ac_ext=c
3479ac_cpp='$CPP $CPPFLAGS'
3480ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3481ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3482ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3484$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3485# On Suns, sometimes $CPP names a directory.
3486if test -n "$CPP" && test -d "$CPP"; then
3487 CPP=
8bb2c122 3488fi
bec39cab 3489if test -z "$CPP"; then
81ecdfbb
RW
3490 if test "${ac_cv_prog_CPP+set}" = set; then :
3491 $as_echo_n "(cached) " >&6
bec39cab
AC
3492else
3493 # Double quotes because CPP needs to be expanded
3494 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3495 do
3496 ac_preproc_ok=false
3497for ac_c_preproc_warn_flag in '' yes
3498do
3499 # Use a header file that comes with gcc, so configuring glibc
3500 # with a fresh cross-compiler works.
3501 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3502 # <limits.h> exists even on freestanding compilers.
3503 # On the NeXT, cc -E runs the code through the compiler's parser,
3504 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3506/* end confdefs.h. */
3507#ifdef __STDC__
3508# include <limits.h>
3509#else
3510# include <assert.h>
3511#endif
3512 Syntax error
3513_ACEOF
81ecdfbb 3514if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3515
81ecdfbb 3516else
bec39cab
AC
3517 # Broken: fails on valid input.
3518continue
3519fi
3520rm -f conftest.err conftest.$ac_ext
3521
81ecdfbb 3522 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3523 # can be detected and how.
81ecdfbb 3524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3525/* end confdefs.h. */
3526#include <ac_nonexistent.h>
3527_ACEOF
81ecdfbb 3528if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3529 # Broken: success on invalid input.
3530continue
8bb2c122 3531else
bec39cab
AC
3532 # Passes both tests.
3533ac_preproc_ok=:
3534break
8bb2c122 3535fi
bec39cab 3536rm -f conftest.err conftest.$ac_ext
8bb2c122 3537
bec39cab
AC
3538done
3539# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3540rm -f conftest.err conftest.$ac_ext
81ecdfbb 3541if $ac_preproc_ok; then :
bec39cab
AC
3542 break
3543fi
8bb2c122 3544
bec39cab
AC
3545 done
3546 ac_cv_prog_CPP=$CPP
ddc9cd0f 3547
c906108c 3548fi
bec39cab
AC
3549 CPP=$ac_cv_prog_CPP
3550else
3551 ac_cv_prog_CPP=$CPP
c906108c 3552fi
81ecdfbb
RW
3553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3554$as_echo "$CPP" >&6; }
bec39cab
AC
3555ac_preproc_ok=false
3556for ac_c_preproc_warn_flag in '' yes
3557do
3558 # Use a header file that comes with gcc, so configuring glibc
3559 # with a fresh cross-compiler works.
3560 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3561 # <limits.h> exists even on freestanding compilers.
3562 # On the NeXT, cc -E runs the code through the compiler's parser,
3563 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3565/* end confdefs.h. */
3566#ifdef __STDC__
3567# include <limits.h>
3568#else
3569# include <assert.h>
3570#endif
3571 Syntax error
3572_ACEOF
81ecdfbb 3573if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3574
81ecdfbb 3575else
bec39cab
AC
3576 # Broken: fails on valid input.
3577continue
3578fi
3579rm -f conftest.err conftest.$ac_ext
3580
81ecdfbb 3581 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3582 # can be detected and how.
81ecdfbb 3583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3584/* end confdefs.h. */
3585#include <ac_nonexistent.h>
3586_ACEOF
81ecdfbb 3587if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3588 # Broken: success on invalid input.
3589continue
c906108c 3590else
bec39cab
AC
3591 # Passes both tests.
3592ac_preproc_ok=:
3593break
c906108c 3594fi
bec39cab 3595rm -f conftest.err conftest.$ac_ext
c906108c 3596
bec39cab
AC
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3600if $ac_preproc_ok; then :
3601
c906108c 3602else
81ecdfbb
RW
3603 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3605as_fn_error "C preprocessor \"$CPP\" fails sanity check
3606See \`config.log' for more details." "$LINENO" 5; }
c906108c 3607fi
c906108c 3608
bec39cab
AC
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
3614
3615
81ecdfbb
RW
3616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3617$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3618if test "${ac_cv_path_GREP+set}" = set; then :
3619 $as_echo_n "(cached) " >&6
4e8d927d 3620else
81ecdfbb
RW
3621 if test -z "$GREP"; then
3622 ac_path_GREP_found=false
3623 # Loop through the user's path and test for each of PROGNAME-LIST
3624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3625for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
3629 for ac_prog in grep ggrep; do
3630 for ac_exec_ext in '' $ac_executable_extensions; do
3631 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3632 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3633# Check for GNU ac_path_GREP and select it if it is found.
3634 # Check for GNU $ac_path_GREP
3635case `"$ac_path_GREP" --version 2>&1` in
3636*GNU*)
3637 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3638*)
3639 ac_count=0
3640 $as_echo_n 0123456789 >"conftest.in"
3641 while :
3642 do
3643 cat "conftest.in" "conftest.in" >"conftest.tmp"
3644 mv "conftest.tmp" "conftest.in"
3645 cp "conftest.in" "conftest.nl"
3646 $as_echo 'GREP' >> "conftest.nl"
3647 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3648 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3649 as_fn_arith $ac_count + 1 && ac_count=$as_val
3650 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3651 # Best one so far, save it but keep looking for a better one
3652 ac_cv_path_GREP="$ac_path_GREP"
3653 ac_path_GREP_max=$ac_count
bec39cab 3654 fi
81ecdfbb
RW
3655 # 10*(2^10) chars as input seems more than enough
3656 test $ac_count -gt 10 && break
3657 done
3658 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3659esac
bec39cab 3660
81ecdfbb
RW
3661 $ac_path_GREP_found && break 3
3662 done
3663 done
3664 done
3665IFS=$as_save_IFS
3666 if test -z "$ac_cv_path_GREP"; then
3667 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3668 fi
c906108c 3669else
81ecdfbb 3670 ac_cv_path_GREP=$GREP
c906108c 3671fi
c906108c 3672
81ecdfbb
RW
3673fi
3674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3675$as_echo "$ac_cv_path_GREP" >&6; }
3676 GREP="$ac_cv_path_GREP"
c906108c 3677
c906108c 3678
81ecdfbb
RW
3679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3680$as_echo_n "checking for egrep... " >&6; }
3681if test "${ac_cv_path_EGREP+set}" = set; then :
3682 $as_echo_n "(cached) " >&6
783e057b 3683else
81ecdfbb
RW
3684 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3685 then ac_cv_path_EGREP="$GREP -E"
3686 else
3687 if test -z "$EGREP"; then
3688 ac_path_EGREP_found=false
3689 # Loop through the user's path and test for each of PROGNAME-LIST
3690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3692do
3693 IFS=$as_save_IFS
3694 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3695 for ac_prog in egrep; do
3696 for ac_exec_ext in '' $ac_executable_extensions; do
3697 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3698 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3699# Check for GNU ac_path_EGREP and select it if it is found.
3700 # Check for GNU $ac_path_EGREP
3701case `"$ac_path_EGREP" --version 2>&1` in
3702*GNU*)
3703 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3704*)
3705 ac_count=0
3706 $as_echo_n 0123456789 >"conftest.in"
3707 while :
3708 do
3709 cat "conftest.in" "conftest.in" >"conftest.tmp"
3710 mv "conftest.tmp" "conftest.in"
3711 cp "conftest.in" "conftest.nl"
3712 $as_echo 'EGREP' >> "conftest.nl"
3713 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3714 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3715 as_fn_arith $ac_count + 1 && ac_count=$as_val
3716 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3717 # Best one so far, save it but keep looking for a better one
3718 ac_cv_path_EGREP="$ac_path_EGREP"
3719 ac_path_EGREP_max=$ac_count
3720 fi
3721 # 10*(2^10) chars as input seems more than enough
3722 test $ac_count -gt 10 && break
3723 done
3724 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3725esac
bec39cab 3726
81ecdfbb
RW
3727 $ac_path_EGREP_found && break 3
3728 done
3729 done
3730 done
3731IFS=$as_save_IFS
3732 if test -z "$ac_cv_path_EGREP"; then
3733 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3734 fi
783e057b 3735else
81ecdfbb 3736 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3737fi
3738
81ecdfbb 3739 fi
783e057b 3740fi
81ecdfbb
RW
3741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3742$as_echo "$ac_cv_path_EGREP" >&6; }
3743 EGREP="$ac_cv_path_EGREP"
3744
783e057b 3745
81ecdfbb
RW
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3747$as_echo_n "checking for ANSI C header files... " >&6; }
3748if test "${ac_cv_header_stdc+set}" = set; then :
3749 $as_echo_n "(cached) " >&6
783e057b 3750else
81ecdfbb 3751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3752/* end confdefs.h. */
783e057b 3753#include <stdlib.h>
bec39cab 3754#include <stdarg.h>
783e057b
DJ
3755#include <string.h>
3756#include <float.h>
c906108c 3757
bec39cab
AC
3758int
3759main ()
3760{
c906108c 3761
bec39cab
AC
3762 ;
3763 return 0;
3764}
3765_ACEOF
81ecdfbb 3766if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3767 ac_cv_header_stdc=yes
c906108c 3768else
81ecdfbb 3769 ac_cv_header_stdc=no
c906108c 3770fi
81ecdfbb 3771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3772
783e057b
DJ
3773if test $ac_cv_header_stdc = yes; then
3774 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3776/* end confdefs.h. */
3777#include <string.h>
c906108c 3778
783e057b
DJ
3779_ACEOF
3780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3781 $EGREP "memchr" >/dev/null 2>&1; then :
3782
c906108c 3783else
783e057b 3784 ac_cv_header_stdc=no
c906108c 3785fi
783e057b 3786rm -f conftest*
c906108c
SS
3787
3788fi
3789
783e057b
DJ
3790if test $ac_cv_header_stdc = yes; then
3791 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3793/* end confdefs.h. */
3794#include <stdlib.h>
bec39cab 3795
783e057b
DJ
3796_ACEOF
3797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3798 $EGREP "free" >/dev/null 2>&1; then :
3799
bec39cab 3800else
783e057b 3801 ac_cv_header_stdc=no
bec39cab 3802fi
783e057b 3803rm -f conftest*
bec39cab
AC
3804
3805fi
bec39cab 3806
783e057b
DJ
3807if test $ac_cv_header_stdc = yes; then
3808 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3809 if test "$cross_compiling" = yes; then :
783e057b 3810 :
bec39cab 3811else
81ecdfbb 3812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3813/* end confdefs.h. */
3814#include <ctype.h>
81ecdfbb 3815#include <stdlib.h>
783e057b
DJ
3816#if ((' ' & 0x0FF) == 0x020)
3817# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3818# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3819#else
3820# define ISLOWER(c) \
3821 (('a' <= (c) && (c) <= 'i') \
3822 || ('j' <= (c) && (c) <= 'r') \
3823 || ('s' <= (c) && (c) <= 'z'))
3824# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3825#endif
3826
3827#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3828int
3829main ()
3830{
3831 int i;
3832 for (i = 0; i < 256; i++)
3833 if (XOR (islower (i), ISLOWER (i))
3834 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3835 return 2;
3836 return 0;
783e057b
DJ
3837}
3838_ACEOF
81ecdfbb 3839if ac_fn_c_try_run "$LINENO"; then :
783e057b 3840
81ecdfbb
RW
3841else
3842 ac_cv_header_stdc=no
783e057b 3843fi
81ecdfbb
RW
3844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3845 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3846fi
81ecdfbb 3847
783e057b
DJ
3848fi
3849fi
81ecdfbb
RW
3850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3851$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3852if test $ac_cv_header_stdc = yes; then
3853
81ecdfbb 3854$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3855
3856fi
3857
3858# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3859for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3860 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3861do :
3862 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3863ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3864"
3865eval as_val=\$$as_ac_Header
3866 if test "x$as_val" = x""yes; then :
783e057b 3867 cat >>confdefs.h <<_ACEOF
81ecdfbb 3868#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3869_ACEOF
3870
3871fi
3872
3873done
3874
3875
3876
81ecdfbb
RW
3877 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3878if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3879 MINIX=yes
3880else
3881 MINIX=
3882fi
3883
3884
3885 if test "$MINIX" = yes; then
3886
81ecdfbb 3887$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3888
3889
81ecdfbb 3890$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3891
3892
81ecdfbb 3893$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3894
3895 fi
3896
3897
81ecdfbb
RW
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3899$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3900if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3901 $as_echo_n "(cached) " >&6
783e057b 3902else
81ecdfbb 3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3904/* end confdefs.h. */
3905
c971b7fa
PA
3906# define __EXTENSIONS__ 1
3907 $ac_includes_default
783e057b
DJ
3908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
81ecdfbb 3916if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3917 ac_cv_safe_to_define___extensions__=yes
3918else
81ecdfbb 3919 ac_cv_safe_to_define___extensions__=no
783e057b 3920fi
81ecdfbb 3921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3922fi
81ecdfbb
RW
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3924$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3925 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3926 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3927
81ecdfbb 3928 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3929
81ecdfbb 3930 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3931
81ecdfbb 3932 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3933
81ecdfbb 3934 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3935
3936
c971b7fa
PA
3937ac_aux_dir=
3938for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3939 for ac_t in install-sh install.sh shtool; do
3940 if test -f "$ac_dir/$ac_t"; then
3941 ac_aux_dir=$ac_dir
3942 ac_install_sh="$ac_aux_dir/$ac_t -c"
3943 break 2
3944 fi
3945 done
3946done
3947if test -z "$ac_aux_dir"; then
3948 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3949fi
770d76d7 3950
c971b7fa
PA
3951# These three variables are undocumented and unsupported,
3952# and are intended to be withdrawn in a future Autoconf release.
3953# They can cause serious problems if a builder's source tree is in a directory
3954# whose full name contains unusual characters.
3955ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3956ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3957ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3958
770d76d7 3959
c971b7fa
PA
3960# Make sure we can run config.sub.
3961$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3962 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3963
c971b7fa
PA
3964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3965$as_echo_n "checking build system type... " >&6; }
3966if test "${ac_cv_build+set}" = set; then :
3967 $as_echo_n "(cached) " >&6
770d76d7 3968else
c971b7fa
PA
3969 ac_build_alias=$build_alias
3970test "x$ac_build_alias" = x &&
3971 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3972test "x$ac_build_alias" = x &&
3973 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3974ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3975 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3976
770d76d7 3977fi
c971b7fa
PA
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3979$as_echo "$ac_cv_build" >&6; }
3980case $ac_cv_build in
3981*-*-*) ;;
3982*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3983esac
c971b7fa
PA
3984build=$ac_cv_build
3985ac_save_IFS=$IFS; IFS='-'
3986set x $ac_cv_build
3987shift
3988build_cpu=$1
3989build_vendor=$2
3990shift; shift
3991# Remember, the first character of IFS is used to create $*,
3992# except with old shells:
3993build_os=$*
3994IFS=$ac_save_IFS
3995case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3996
3997
c971b7fa
PA
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3999$as_echo_n "checking host system type... " >&6; }
4000if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4001 $as_echo_n "(cached) " >&6
4002else
c971b7fa
PA
4003 if test "x$host_alias" = x; then
4004 ac_cv_host=$ac_cv_build
81ecdfbb 4005else
c971b7fa
PA
4006 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4007 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4008fi
81ecdfbb
RW
4009
4010fi
c971b7fa
PA
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4012$as_echo "$ac_cv_host" >&6; }
4013case $ac_cv_host in
4014*-*-*) ;;
4015*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4016esac
c971b7fa
PA
4017host=$ac_cv_host
4018ac_save_IFS=$IFS; IFS='-'
4019set x $ac_cv_host
4020shift
4021host_cpu=$1
4022host_vendor=$2
4023shift; shift
4024# Remember, the first character of IFS is used to create $*,
4025# except with old shells:
4026host_os=$*
4027IFS=$ac_save_IFS
4028case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4029
4030
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4032$as_echo_n "checking target system type... " >&6; }
4033if test "${ac_cv_target+set}" = set; then :
4034 $as_echo_n "(cached) " >&6
4035else
4036 if test "x$target_alias" = x; then
4037 ac_cv_target=$ac_cv_host
4038else
4039 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4040 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4041fi
4042
4043fi
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4045$as_echo "$ac_cv_target" >&6; }
4046case $ac_cv_target in
4047*-*-*) ;;
4048*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4049esac
4050target=$ac_cv_target
4051ac_save_IFS=$IFS; IFS='-'
4052set x $ac_cv_target
4053shift
4054target_cpu=$1
4055target_vendor=$2
4056shift; shift
4057# Remember, the first character of IFS is used to create $*,
4058# except with old shells:
4059target_os=$*
4060IFS=$ac_save_IFS
4061case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4062
4063
4064# The aliases save the names the user supplied, while $host etc.
4065# will get canonicalized.
4066test -n "$target_alias" &&
4067 test "$program_prefix$program_suffix$program_transform_name" = \
4068 NONENONEs,x,x, &&
4069 program_prefix=${target_alias}-
4070
4071# The tests for host and target for $enable_largefile require
4072# canonical names.
4073
4074
81ecdfbb 4075
da2f07f1
JK
4076# As the $enable_largefile decision depends on --enable-plugins we must set it
4077# even in directories otherwise not depending on the $plugins option.
4078
4079
4080# Check whether --enable-plugins was given.
4081if test "${enable_plugins+set}" = set; then :
4082 enableval=$enable_plugins; case "${enableval}" in
4083 yes | "") plugins=yes ;;
4084 no) plugins=no ;;
4085 *) plugins=yes ;;
4086 esac
4087else
4088 plugins=no
4089fi
4090
4091
4092
4093case "${host}" in
4094 sparc-*-solaris*|i[3-7]86-*-solaris*)
4095 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4096 # are mutually exclusive; and without procfs support, the bfd/ elf module
4097 # cannot provide certain routines such as elfcore_write_prpsinfo
4098 # or elfcore_write_prstatus. So unless the user explicitly requested
4099 # large-file support through the --enable-largefile switch, disable
4100 # large-file support in favor of procfs support.
4101 test "${target}" = "${host}" -a "x$plugins" = xno \
4102 && : ${enable_largefile="no"}
4103 ;;
4104esac
4105
4106# Check whether --enable-largefile was given.
4107if test "${enable_largefile+set}" = set; then :
4108 enableval=$enable_largefile;
4109fi
4110
4111if test "$enable_largefile" != no; then
4112
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4114$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4115if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4116 $as_echo_n "(cached) " >&6
4117else
4118 ac_cv_sys_largefile_CC=no
4119 if test "$GCC" != yes; then
4120 ac_save_CC=$CC
4121 while :; do
4122 # IRIX 6.2 and later do not support large files by default,
4123 # so use the C compiler's -n32 option if that helps.
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125/* end confdefs.h. */
4126#include <sys/types.h>
4127 /* Check that off_t can represent 2**63 - 1 correctly.
4128 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4129 since some C++ compilers masquerading as C compilers
4130 incorrectly reject 9223372036854775807. */
4131#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4132 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4133 && LARGE_OFF_T % 2147483647 == 1)
4134 ? 1 : -1];
4135int
4136main ()
4137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143 if ac_fn_c_try_compile "$LINENO"; then :
4144 break
4145fi
4146rm -f core conftest.err conftest.$ac_objext
4147 CC="$CC -n32"
4148 if ac_fn_c_try_compile "$LINENO"; then :
4149 ac_cv_sys_largefile_CC=' -n32'; break
4150fi
4151rm -f core conftest.err conftest.$ac_objext
4152 break
4153 done
4154 CC=$ac_save_CC
4155 rm -f conftest.$ac_ext
4156 fi
4157fi
4158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4159$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4160 if test "$ac_cv_sys_largefile_CC" != no; then
4161 CC=$CC$ac_cv_sys_largefile_CC
4162 fi
4163
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4165$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4166if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4167 $as_echo_n "(cached) " >&6
4168else
4169 while :; do
4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4171/* end confdefs.h. */
4172#include <sys/types.h>
4173 /* Check that off_t can represent 2**63 - 1 correctly.
4174 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4175 since some C++ compilers masquerading as C compilers
4176 incorrectly reject 9223372036854775807. */
4177#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4178 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4179 && LARGE_OFF_T % 2147483647 == 1)
4180 ? 1 : -1];
4181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
4189if ac_fn_c_try_compile "$LINENO"; then :
4190 ac_cv_sys_file_offset_bits=no; break
4191fi
4192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4194/* end confdefs.h. */
4195#define _FILE_OFFSET_BITS 64
4196#include <sys/types.h>
4197 /* Check that off_t can represent 2**63 - 1 correctly.
4198 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4199 since some C++ compilers masquerading as C compilers
4200 incorrectly reject 9223372036854775807. */
4201#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4202 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4203 && LARGE_OFF_T % 2147483647 == 1)
4204 ? 1 : -1];
4205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213if ac_fn_c_try_compile "$LINENO"; then :
4214 ac_cv_sys_file_offset_bits=64; break
4215fi
4216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4217 ac_cv_sys_file_offset_bits=unknown
4218 break
4219done
4220fi
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4222$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4223case $ac_cv_sys_file_offset_bits in #(
4224 no | unknown) ;;
4225 *)
4226cat >>confdefs.h <<_ACEOF
4227#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4228_ACEOF
4229;;
4230esac
4231rm -rf conftest*
4232 if test $ac_cv_sys_file_offset_bits = unknown; then
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4234$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4235if test "${ac_cv_sys_large_files+set}" = set; then :
4236 $as_echo_n "(cached) " >&6
4237else
4238 while :; do
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4240/* end confdefs.h. */
4241#include <sys/types.h>
4242 /* Check that off_t can represent 2**63 - 1 correctly.
4243 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4244 since some C++ compilers masquerading as C compilers
4245 incorrectly reject 9223372036854775807. */
4246#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4247 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4248 && LARGE_OFF_T % 2147483647 == 1)
4249 ? 1 : -1];
4250int
4251main ()
4252{
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
4258if ac_fn_c_try_compile "$LINENO"; then :
4259 ac_cv_sys_large_files=no; break
4260fi
4261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4263/* end confdefs.h. */
4264#define _LARGE_FILES 1
4265#include <sys/types.h>
4266 /* Check that off_t can represent 2**63 - 1 correctly.
4267 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4268 since some C++ compilers masquerading as C compilers
4269 incorrectly reject 9223372036854775807. */
4270#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4271 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4272 && LARGE_OFF_T % 2147483647 == 1)
4273 ? 1 : -1];
4274int
4275main ()
4276{
4277
4278 ;
4279 return 0;
4280}
4281_ACEOF
4282if ac_fn_c_try_compile "$LINENO"; then :
4283 ac_cv_sys_large_files=1; break
4284fi
4285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4286 ac_cv_sys_large_files=unknown
4287 break
4288done
4289fi
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4291$as_echo "$ac_cv_sys_large_files" >&6; }
4292case $ac_cv_sys_large_files in #(
4293 no | unknown) ;;
4294 *)
4295cat >>confdefs.h <<_ACEOF
4296#define _LARGE_FILES $ac_cv_sys_large_files
4297_ACEOF
4298;;
4299esac
4300rm -rf conftest*
4301 fi
4302fi
4303
4304
4305
81ecdfbb
RW
4306
4307
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4309$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4310if test "${am_cv_prog_cc_stdc+set}" = set; then :
4311 $as_echo_n "(cached) " >&6
4312else
4313 am_cv_prog_cc_stdc=no
4314ac_save_CC="$CC"
4315# Don't try gcc -ansi; that turns off useful extensions and
4316# breaks some systems' header files.
4317# AIX -qlanglvl=ansi
4318# Ultrix and OSF/1 -std1
4319# HP-UX 10.20 and later -Ae
4320# HP-UX older versions -Aa -D_HPUX_SOURCE
4321# SVR4 -Xc -D__EXTENSIONS__
4322for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4323do
783e057b 4324 CC="$ac_save_CC $ac_arg"
81ecdfbb 4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4326/* end confdefs.h. */
4327#include <stdarg.h>
4328#include <stdio.h>
4329#include <sys/types.h>
4330#include <sys/stat.h>
4331/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4332struct buf { int x; };
4333FILE * (*rcsopen) (struct buf *, struct stat *, int);
4334static char *e (p, i)
4335 char **p;
4336 int i;
4337{
4338 return p[i];
4339}
4340static char *f (char * (*g) (char **, int), char **p, ...)
4341{
4342 char *s;
4343 va_list v;
4344 va_start (v,p);
4345 s = g (p, va_arg (v,int));
4346 va_end (v);
4347 return s;
4348}
4349int test (int i, double x);
4350struct s1 {int (*f) (int a);};
4351struct s2 {int (*f) (double a);};
4352int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4353int argc;
4354char **argv;
4355
4356int
4357main ()
4358{
4359
4360return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4361
4362 ;
4363 return 0;
4364}
4365_ACEOF
81ecdfbb 4366if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4367 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4368fi
81ecdfbb 4369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4370done
4371CC="$ac_save_CC"
4372
4373fi
4374
4375if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4377$as_echo "none needed" >&6; }
783e057b 4378else
81ecdfbb
RW
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4380$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4381fi
4382case "x$am_cv_prog_cc_stdc" in
4383 x|xno) ;;
4384 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4385esac
4386
4387
4388ac_aux_dir=
81ecdfbb
RW
4389for ac_dir in .. "$srcdir"/..; do
4390 for ac_t in install-sh install.sh shtool; do
4391 if test -f "$ac_dir/$ac_t"; then
4392 ac_aux_dir=$ac_dir
4393 ac_install_sh="$ac_aux_dir/$ac_t -c"
4394 break 2
4395 fi
4396 done
783e057b
DJ
4397done
4398if test -z "$ac_aux_dir"; then
81ecdfbb 4399 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4400fi
81ecdfbb
RW
4401
4402# These three variables are undocumented and unsupported,
4403# and are intended to be withdrawn in a future Autoconf release.
4404# They can cause serious problems if a builder's source tree is in a directory
4405# whose full name contains unusual characters.
4406ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4407ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4408ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4409
783e057b 4410
783e057b 4411
9009e1ae
MR
4412test "$program_prefix" != NONE &&
4413 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4414# Use a double $ so make ignores it.
4415test "$program_suffix" != NONE &&
4416 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4417# Double any \ or $.
4418# By default was `s,x,x', remove it if useless.
4419ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4420program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4421
81ecdfbb 4422
a417dc56
RW
4423# Dependency checking.
4424rm -rf .tst 2>/dev/null
4425mkdir .tst 2>/dev/null
4426if test -d .tst; then
4427 am__leading_dot=.
4428else
4429 am__leading_dot=_
4430fi
4431rmdir .tst 2>/dev/null
4432
4433DEPDIR="${am__leading_dot}deps"
4434
81ecdfbb 4435ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4436
4437
4438depcc="$CC" am_compiler_list=
4439
4440am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4442$as_echo_n "checking dependency style of $depcc... " >&6; }
4443if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4444 $as_echo_n "(cached) " >&6
a417dc56
RW
4445else
4446 if test -f "$am_depcomp"; then
4447 # We make a subdir and do the tests there. Otherwise we can end up
4448 # making bogus files that we don't know about and never remove. For
4449 # instance it was reported that on HP-UX the gcc test will end up
4450 # making a dummy file named `D' -- because `-MD' means `put the output
4451 # in D'.
4452 mkdir conftest.dir
4453 # Copy depcomp to subdir because otherwise we won't find it if we're
4454 # using a relative directory.
4455 cp "$am_depcomp" conftest.dir
4456 cd conftest.dir
4457 # We will build objects and dependencies in a subdirectory because
4458 # it helps to detect inapplicable dependency modes. For instance
4459 # both Tru64's cc and ICC support -MD to output dependencies as a
4460 # side effect of compilation, but ICC will put the dependencies in
4461 # the current directory while Tru64 will put them in the object
4462 # directory.
4463 mkdir sub
4464
4465 am_cv_CC_dependencies_compiler_type=none
4466 if test "$am_compiler_list" = ""; then
4467 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4468 fi
4469 for depmode in $am_compiler_list; do
4470 if test $depmode = none; then break; fi
4471
81ecdfbb 4472 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4473 # Setup a source with many dependencies, because some compilers
4474 # like to wrap large dependency lists on column 80 (with \), and
4475 # we should not choose a depcomp mode which is confused by this.
4476 #
4477 # We need to recreate these files for each test, as the compiler may
4478 # overwrite some of them when testing with obscure command lines.
4479 # This happens at least with the AIX C compiler.
4480 : > sub/conftest.c
4481 for i in 1 2 3 4 5 6; do
4482 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4483 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4484 # Solaris 8's {/usr,}/bin/sh.
4485 touch sub/conftst$i.h
4486 done
4487 echo "include sub/conftest.Po" > confmf
4488
4489 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4490 # mode. It turns out that the SunPro C++ compiler does not properly
4491 # handle `-M -o', and we need to detect this.
4492 depcmd="depmode=$depmode \
4493 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4494 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4495 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4496 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4497 if env $depcmd > conftest.err 2>&1 &&
4498 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4499 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4500 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4501 # icc doesn't choke on unknown options, it will just issue warnings
4502 # or remarks (even with -Werror). So we grep stderr for any message
4503 # that says an option was ignored or not supported.
4504 # When given -MP, icc 7.0 and 7.1 complain thusly:
4505 # icc: Command line warning: ignoring option '-M'; no argument required
4506 # The diagnosis changed in icc 8.0:
4507 # icc: Command line remark: option '-MP' not supported
4508 if (grep 'ignoring option' conftest.err ||
4509 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4510 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4511 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4512 break
4513 fi
4514 fi
81ecdfbb 4515 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4516 sed -e 's/^/| /' < conftest.err >&5
4517 done
4518
4519 cd ..
4520 rm -rf conftest.dir
4521else
4522 am_cv_CC_dependencies_compiler_type=none
4523fi
4524
4525fi
81ecdfbb
RW
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4527$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4528if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4529then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4530else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4531
4532fi
4533
4534
4535# Check for the 'make' the user wants to use.
4536for ac_prog in make
4537do
4538 # Extract the first word of "$ac_prog", so it can be a program name with args.
4539set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4541$as_echo_n "checking for $ac_word... " >&6; }
4542if test "${ac_cv_prog_MAKE+set}" = set; then :
4543 $as_echo_n "(cached) " >&6
a417dc56
RW
4544else
4545 if test -n "$MAKE"; then
4546 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4547else
4548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4549for as_dir in $PATH
4550do
4551 IFS=$as_save_IFS
4552 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4553 for ac_exec_ext in '' $ac_executable_extensions; do
4554 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4555 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4556 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4557 break 2
4558 fi
4559done
81ecdfbb
RW
4560 done
4561IFS=$as_save_IFS
a417dc56
RW
4562
4563fi
4564fi
4565MAKE=$ac_cv_prog_MAKE
4566if test -n "$MAKE"; then
81ecdfbb
RW
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4568$as_echo "$MAKE" >&6; }
a417dc56 4569else
81ecdfbb
RW
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
a417dc56
RW
4572fi
4573
81ecdfbb 4574
a417dc56
RW
4575 test -n "$MAKE" && break
4576done
4577
4578MAKE_IS_GNU=
4579case "`$MAKE --version 2>&1 | sed 1q`" in
4580 *GNU*)
4581 MAKE_IS_GNU=yes
4582 ;;
4583esac
81ecdfbb 4584 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4585 GMAKE_TRUE=
4586 GMAKE_FALSE='#'
4587else
4588 GMAKE_TRUE='#'
4589 GMAKE_FALSE=
4590fi
4591
81ecdfbb
RW
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4593$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4594set x ${MAKE-make}
4595ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4596if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4597 $as_echo_n "(cached) " >&6
a417dc56
RW
4598else
4599 cat >conftest.make <<\_ACEOF
81ecdfbb 4600SHELL = /bin/sh
a417dc56 4601all:
81ecdfbb 4602 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4603_ACEOF
4604# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4605case `${MAKE-make} -f conftest.make 2>/dev/null` in
4606 *@@@%%%=?*=@@@%%%*)
4607 eval ac_cv_prog_make_${ac_make}_set=yes;;
4608 *)
4609 eval ac_cv_prog_make_${ac_make}_set=no;;
4610esac
a417dc56
RW
4611rm -f conftest.make
4612fi
81ecdfbb
RW
4613if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4615$as_echo "yes" >&6; }
a417dc56
RW
4616 SET_MAKE=
4617else
81ecdfbb
RW
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
a417dc56
RW
4620 SET_MAKE="MAKE=${MAKE-make}"
4621fi
4622
4623
c971b7fa
PA
4624# Configure gnulib. We need to build gnulib under some other
4625# directory not "gnulib", to avoid the problem of both GDB and
4626# GDBserver wanting to build it in the same directory, when building
4627# in the source dir.
783e057b 4628
c971b7fa
PA
4629 in_src="gnulib"
4630 in_build="build-gnulib"
4631
4632 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4633 # so they do not pile up.
4634 ac_sub_configure_args=
4635 ac_prev=
4636 eval "set x $ac_configure_args"
4637 shift
4638 for ac_arg
4639 do
4640 if test -n "$ac_prev"; then
4641 ac_prev=
4642 continue
4643 fi
4644 case $ac_arg in
4645 -cache-file | --cache-file | --cache-fil | --cache-fi \
4646 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4647 ac_prev=cache_file ;;
4648 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4649 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4650 | --c=*)
4651 ;;
4652 --config-cache | -C)
4653 ;;
4654 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4655 ac_prev=srcdir ;;
4656 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4657 ;;
4658 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4659 ac_prev=prefix ;;
4660 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4661 ;;
4662 --disable-option-checking)
4663 ;;
4664 *)
4665 case $ac_arg in
4666 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4667 esac
4668 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4669 esac
4670 done
4671
4672 # Always prepend --prefix to ensure using the same prefix
4673 # in subdir configurations.
4674 ac_arg="--prefix=$prefix"
4675 case $ac_arg in
4676 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4677 esac
4678 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4679
4680 # Pass --silent
4681 if test "$silent" = yes; then
4682 ac_sub_configure_args="--silent $ac_sub_configure_args"
4683 fi
4684
4685 # Always prepend --disable-option-checking to silence warnings, since
4686 # different subdirs can have different --enable and --with options.
4687 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4688
4689 ac_popdir=`pwd`
4690 ac_dir=$in_build
4691
4692 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4694 $as_echo "$ac_msg" >&6
4695 as_dir="$ac_dir"; as_fn_mkdir_p
4696
38ea300a
PA
4697 case $srcdir in
4698 [\\/]* | ?:[\\/]* )
4699 ac_srcdir=$srcdir/$in_src ;;
4700 *) # Relative name.
4701 ac_srcdir=../$srcdir/$in_src ;;
4702 esac
c971b7fa
PA
4703
4704 cd "$ac_dir"
4705
4706 ac_sub_configure=$ac_srcdir/configure
4707
4708 # Make the cache file name correct relative to the subdirectory.
4709 case $cache_file in
4710 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4711 *) # Relative name.
4712 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4713 esac
4714
4715 { $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
4716$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4717 # The eval makes quoting arguments work.
4718 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4719 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4720 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4721
4722 cd "$ac_popdir"
783e057b 4723
c971b7fa
PA
4724
4725
4726CONFIG_OBS=
4727CONFIG_DEPS=
4728CONFIG_SRCS=
4729ENABLE_CFLAGS=
4730
4731CONFIG_ALL=
4732CONFIG_CLEAN=
4733CONFIG_INSTALL=
4734CONFIG_UNINSTALL=
4735
4736# If we haven't got the data from the intl directory,
4737# assume NLS is disabled.
4738USE_NLS=no
4739LIBINTL=
4740LIBINTL_DEP=
4741INCINTL=
4742XGETTEXT=
4743GMSGFMT=
4744POSUB=
783e057b
DJ
4745
4746if test -f ../intl/config.intl; then
4747 . ../intl/config.intl
4748fi
81ecdfbb
RW
4749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4750$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4751if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
783e057b 4754else
81ecdfbb
RW
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4756$as_echo "yes" >&6; }
783e057b 4757
81ecdfbb 4758$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4759
4760
81ecdfbb
RW
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4762$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4763 # Look for .po and .gmo files in the source directory.
4764 CATALOGS=
4765 XLINGUAS=
4766 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4767 # If there aren't any .gmo files the shell will give us the
4768 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4769 # weeded out.
4770 case "$cat" in *\**)
4771 continue;;
4772 esac
4773 # The quadruple backslash is collapsed to a double backslash
4774 # by the backticks, then collapsed again by the double quotes,
4775 # leaving us with one backslash in the sed expression (right
4776 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4777 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4778 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4779 # The user is allowed to set LINGUAS to a list of languages to
4780 # install catalogs for. If it's empty that means "all of them."
4781 if test "x$LINGUAS" = x; then
4782 CATALOGS="$CATALOGS $cat"
4783 XLINGUAS="$XLINGUAS $lang"
4784 else
4785 case "$LINGUAS" in *$lang*)
4786 CATALOGS="$CATALOGS $cat"
4787 XLINGUAS="$XLINGUAS $lang"
4788 ;;
4789 esac
e28b3332
DJ
4790 fi
4791 done
c971b7fa
PA
4792 LINGUAS="$XLINGUAS"
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4794$as_echo "$LINGUAS" >&6; }
4795
4796
4797 DATADIRNAME=share
4798
4799 INSTOBJEXT=.mo
4800
4801 GENCAT=gencat
4802
4803 CATOBJEXT=.gmo
e28b3332 4804
e28b3332
DJ
4805fi
4806
c971b7fa
PA
4807localedir='${datadir}/locale'
4808
4809
4810if test x"$USE_NLS" = xyes; then
4811 CONFIG_ALL="$CONFIG_ALL all-po"
4812 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4813 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4814 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4815fi
e28b3332 4816
c971b7fa
PA
4817GNULIB=build-gnulib/import
4818
4819# For Makefile dependencies.
4820GNULIB_STDINT_H=
4821if test x"$STDINT_H" != x; then
4822 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4823fi
4824
4825
c971b7fa
PA
4826PACKAGE=gdb
4827
4828cat >>confdefs.h <<_ACEOF
4829#define PACKAGE "$PACKAGE"
4830_ACEOF
4831
4832
4833
4834# We never need to detect it in this sub-configure.
4835# But preserve it for config.status --recheck.
4836
4837
4838
4839MAKEINFO_EXTRA_FLAGS=""
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4841$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4842if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4843 $as_echo_n "(cached) " >&6
4844else
4845 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4846 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4847 gdb_cv_have_makeinfo_click=yes
4848 else
4849 gdb_cv_have_makeinfo_click=no
4850 fi
4851fi
4852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4853$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4854if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4855 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4856fi
e28b3332
DJ
4857
4858
bec39cab
AC
4859
4860
81ecdfbb
RW
4861# Check whether --with-separate-debug-dir was given.
4862if test "${with_separate_debug_dir+set}" = set; then :
4863 withval=$with_separate_debug_dir;
b14b1491
TT
4864 DEBUGDIR=$withval
4865else
4866 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4867fi
4868
20e95c23 4869
783e057b
DJ
4870 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4871 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4872 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4873 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4874
783e057b
DJ
4875cat >>confdefs.h <<_ACEOF
4876#define DEBUGDIR "$ac_define_dir"
20e95c23 4877_ACEOF
20e95c23 4878
20e95c23 4879
20e95c23 4880
0c4a4063 4881
b14b1491
TT
4882 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4883 if test "x$prefix" = xNONE; then
4884 test_prefix=/usr/local
4885 else
4886 test_prefix=$prefix
4887 fi
783e057b 4888 else
b14b1491 4889 test_prefix=$exec_prefix
783e057b 4890 fi
b14b1491
TT
4891 value=0
4892 case ${ac_define_dir} in
4893 "${test_prefix}"|"${test_prefix}/"*|\
4894 '${exec_prefix}'|'${exec_prefix}/'*)
4895 value=1
4896 ;;
4897 esac
4898
4899cat >>confdefs.h <<_ACEOF
4900#define DEBUGDIR_RELOCATABLE $value
4901_ACEOF
4902
4903
4904
0c4a4063 4905
f83d8a90
DE
4906# We can't pass paths as command line arguments.
4907# Mingw32 tries to be clever and will convert the paths for us.
4908# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4909# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4910# This breaks GDB's relocatable path conversions since paths passed in
4911# config.h would not get so translated, the path prefixes no longer match.
4912
4913 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4914 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4915 ac_define_dir=`eval echo $bindir`
4916 ac_define_dir=`eval echo $ac_define_dir`
4917
4918cat >>confdefs.h <<_ACEOF
4919#define BINDIR "$ac_define_dir"
4920_ACEOF
4921
4922
4923
b14b1491
TT
4924# GDB's datadir relocation
4925
4926
4927
81ecdfbb
RW
4928# Check whether --with-gdb-datadir was given.
4929if test "${with_gdb_datadir+set}" = set; then :
4930 withval=$with_gdb_datadir;
b14b1491 4931 GDB_DATADIR=$withval
20e95c23 4932else
b14b1491 4933 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4934fi
4935
20e95c23 4936
b14b1491
TT
4937 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4938 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4939 ac_define_dir=`eval echo $GDB_DATADIR`
4940 ac_define_dir=`eval echo $ac_define_dir`
4941
4942cat >>confdefs.h <<_ACEOF
4943#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4944_ACEOF
4945
b14b1491
TT
4946
4947
0c4a4063 4948
b14b1491
TT
4949 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4950 if test "x$prefix" = xNONE; then
4951 test_prefix=/usr/local
4952 else
4953 test_prefix=$prefix
4954 fi
4955 else
4956 test_prefix=$exec_prefix
4957 fi
4958 value=0
4959 case ${ac_define_dir} in
4960 "${test_prefix}"|"${test_prefix}/"*|\
4961 '${exec_prefix}'|'${exec_prefix}/'*)
4962 value=1
4963 ;;
4964 esac
4965
4966cat >>confdefs.h <<_ACEOF
4967#define GDB_DATADIR_RELOCATABLE $value
4968_ACEOF
4969
4970
783e057b 4971
20e95c23 4972
0c4a4063 4973
81ecdfbb
RW
4974# Check whether --with-relocated-sources was given.
4975if test "${with_relocated_sources+set}" = set; then :
4976 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4977
4978 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4979 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4980 ac_define_dir=`eval echo $reloc_srcdir`
4981 ac_define_dir=`eval echo $ac_define_dir`
4982
4983cat >>confdefs.h <<_ACEOF
4984#define RELOC_SRCDIR "$ac_define_dir"
4985_ACEOF
4986
4987
4988
81ecdfbb
RW
4989fi
4990
29b0e8a2 4991
7349ff92
JK
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
4993$as_echo_n "checking for default auto-load directory... " >&6; }
4994
4995# Check whether --with-auto-load-dir was given.
4996if test "${with_auto_load_dir+set}" = set; then :
4997 withval=$with_auto_load_dir;
4998else
1564a261 4999 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5000fi
5001
1564a261 5002escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5003
5004 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5005 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5006 ac_define_dir=`eval echo $escape_dir`
5007 ac_define_dir=`eval echo $ac_define_dir`
5008
5009cat >>confdefs.h <<_ACEOF
5010#define AUTO_LOAD_DIR "$ac_define_dir"
5011_ACEOF
5012
5013
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5015$as_echo "$with_auto_load_dir" >&6; }
5016
bccbefd2
JK
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5018$as_echo_n "checking for default auto-load safe-path... " >&6; }
5019
5020# Check whether --with-auto-load-safe-path was given.
5021if test "${with_auto_load_safe_path+set}" = set; then :
5022 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5023 with_auto_load_safe_path="/"
5024 fi
bccbefd2 5025else
7349ff92 5026 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5027fi
5028
1564a261 5029escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5030
5031 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5033 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5034 ac_define_dir=`eval echo $ac_define_dir`
5035
5036cat >>confdefs.h <<_ACEOF
6dea1fbd 5037#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5038_ACEOF
5039
5040
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5042$as_echo "$with_auto_load_safe_path" >&6; }
5043
29b0e8a2 5044
20e95c23 5045
5ae98d25 5046subdirs="$subdirs testsuite"
20e95c23
DJ
5047
5048
783e057b 5049# Check whether to support alternative target configurations
81ecdfbb
RW
5050# Check whether --enable-targets was given.
5051if test "${enable_targets+set}" = set; then :
5052 enableval=$enable_targets; case "${enableval}" in
5053 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5054 ;;
5055 no) enable_targets= ;;
5056 *) enable_targets=$enableval ;;
5057esac
81ecdfbb
RW
5058fi
5059
20e95c23 5060
783e057b 5061# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5062# Check whether --enable-64-bit-bfd was given.
5063if test "${enable_64_bit_bfd+set}" = set; then :
5064 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5065 yes) want64=true ;;
5066 no) want64=false ;;
81ecdfbb 5067 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5068esac
5069else
5070 want64=false
81ecdfbb
RW
5071fi
5072
783e057b
DJ
5073# Provide defaults for some variables set by the per-host and per-target
5074# configuration.
5075gdb_host_obs=posix-hdep.o
20e95c23 5076
783e057b
DJ
5077if test "${target}" = "${host}"; then
5078 gdb_native=yes
5079else
5080 gdb_native=no
5081fi
20e95c23 5082
783e057b 5083. $srcdir/configure.host
20e95c23 5084
783e057b 5085# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5086
783e057b
DJ
5087TARGET_OBS=
5088all_targets=
b292c783 5089HAVE_NATIVE_GCORE_TARGET=
20e95c23 5090
783e057b 5091for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5092do
783e057b
DJ
5093 if test "$targ_alias" = "all"; then
5094 all_targets=true
5095 else
5096 # Canonicalize the secondary target names.
5097 result=`$ac_config_sub $targ_alias 2>/dev/null`
5098 if test -n "$result"; then
5099 targ=$result
5100 else
5101 targ=$targ_alias
5102 fi
20e95c23 5103
783e057b 5104 . ${srcdir}/configure.tgt
20e95c23 5105
bf307134
JB
5106 if test -z "${gdb_target_obs}"; then :
5107 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5108fi
5109
783e057b
DJ
5110 # Target-specific object files
5111 for i in ${gdb_target_obs}; do
5112 case " $TARGET_OBS " in
5113 *" ${i} "*) ;;
5114 *)
5115 TARGET_OBS="$TARGET_OBS ${i}"
5116 ;;
5117 esac
5118 done
20e95c23 5119
783e057b
DJ
5120 # Check whether this target needs 64-bit CORE_ADDR
5121 if test x${want64} = xfalse; then
5122 . ${srcdir}/../bfd/config.bfd
5123 fi
b292c783
JK
5124
5125 # Check whether this target is native and supports gcore.
5126 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5127 && $gdb_have_gcore; then
5128 HAVE_NATIVE_GCORE_TARGET=1
5129 fi
783e057b 5130 fi
20e95c23
DJ
5131done
5132
783e057b
DJ
5133if test x${all_targets} = xtrue; then
5134
5135 # We want all 64-bit targets if we either:
5136 # - run on a 64-bit host or
5137 # - already require 64-bit support for some other target or
5138 # - the --enable-64-bit-bfd option was supplied
5139 # Otherwise we only support all 32-bit targets.
5140 #
5141 # NOTE: This test must be in sync with the corresponding
5142 # tests in BFD!
20e95c23 5143
783e057b 5144 if test x${want64} = xfalse; then
81ecdfbb
RW
5145 # The cast to long int works around a bug in the HP C Compiler
5146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5148# This bug is HP SR number 8606223364.
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5150$as_echo_n "checking size of long... " >&6; }
5151if test "${ac_cv_sizeof_long+set}" = set; then :
5152 $as_echo_n "(cached) " >&6
c0993dbe 5153else
81ecdfbb 5154 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5155
81ecdfbb
RW
5156else
5157 if test "$ac_cv_type_long" = yes; then
5158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5160{ as_fn_set_status 77
5161as_fn_error "cannot compute sizeof (long)
5162See \`config.log' for more details." "$LINENO" 5; }; }
5163 else
5164 ac_cv_sizeof_long=0
5165 fi
c0993dbe 5166fi
81ecdfbb 5167
c0993dbe 5168fi
81ecdfbb
RW
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5170$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5171
c0993dbe 5172
c0993dbe 5173
c0993dbe
UW
5174cat >>confdefs.h <<_ACEOF
5175#define SIZEOF_LONG $ac_cv_sizeof_long
5176_ACEOF
5177
5178
5179 if test "x${ac_cv_sizeof_long}" = "x8"; then
5180 want64=true
5181 fi
5182 fi
5183 if test x${want64} = xtrue; then
5184 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5185 else
5186 TARGET_OBS='$(ALL_TARGET_OBS)'
5187 fi
5188fi
5189
5190
5191
b292c783 5192
c0993dbe
UW
5193# For other settings, only the main target counts.
5194gdb_sim=
5195gdb_osabi=
5196build_gdbserver=
5197targ=$target; . ${srcdir}/configure.tgt
5198
5199# Fetch the default architecture and default target vector from BFD.
5200targ=$target; . $srcdir/../bfd/config.bfd
5201
5202# We only want the first architecture, so strip off the others if
5203# there is more than one.
5204targ_archs=`echo $targ_archs | sed 's/ .*//'`
5205
5206if test "x$targ_archs" != x; then
5207
5208cat >>confdefs.h <<_ACEOF
5209#define DEFAULT_BFD_ARCH $targ_archs
5210_ACEOF
5211
5212fi
5213if test "x$targ_defvec" != x; then
5214
5215cat >>confdefs.h <<_ACEOF
5216#define DEFAULT_BFD_VEC $targ_defvec
5217_ACEOF
5218
5219fi
5220
c0993dbe
UW
5221# The CLI cannot be disabled yet, but may be in the future.
5222
5223# Enable CLI.
81ecdfbb
RW
5224# Check whether --enable-gdbcli was given.
5225if test "${enable_gdbcli+set}" = set; then :
5226 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5227 yes)
5228 ;;
5229 no)
81ecdfbb 5230 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5231 *)
81ecdfbb 5232 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5233 esac
5234else
5235 enable_gdbcli=yes
81ecdfbb
RW
5236fi
5237
c0993dbe
UW
5238if test x"$enable_gdbcli" = xyes; then
5239 if test -d $srcdir/cli; then
5240 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5241 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5242 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5243 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5244 fi
5245fi
5246
5247# Enable MI.
81ecdfbb
RW
5248# Check whether --enable-gdbmi was given.
5249if test "${enable_gdbmi+set}" = set; then :
5250 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5251 yes | no)
5252 ;;
5253 *)
81ecdfbb 5254 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5255 esac
5256else
5257 enable_gdbmi=yes
81ecdfbb
RW
5258fi
5259
c0993dbe
UW
5260if test x"$enable_gdbmi" = xyes; then
5261 if test -d $srcdir/mi; then
5262 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5263 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5264 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5265 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5266 fi
5267fi
5268
5269# Enable TUI.
81ecdfbb
RW
5270# Check whether --enable-tui was given.
5271if test "${enable_tui+set}" = set; then :
5272 enableval=$enable_tui; case $enableval in
3ca64bd3 5273 yes | no | auto)
c0993dbe
UW
5274 ;;
5275 *)
81ecdfbb 5276 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5277 esac
5278else
3ca64bd3 5279 enable_tui=auto
81ecdfbb
RW
5280fi
5281
c0993dbe
UW
5282
5283# Enable gdbtk.
81ecdfbb
RW
5284# Check whether --enable-gdbtk was given.
5285if test "${enable_gdbtk+set}" = set; then :
5286 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5287 yes | no)
5288 ;;
5289 *)
81ecdfbb 5290 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5291 esac
5292else
5062cc19 5293 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5294 enable_gdbtk=yes
5295 else
5296 enable_gdbtk=no
5297 fi
81ecdfbb
RW
5298fi
5299
c0993dbe
UW
5300# We unconditionally disable gdbtk tests on selected platforms.
5301case $host_os in
5302 go32* | windows*)
81ecdfbb
RW
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5304$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5305 enable_gdbtk=no ;;
5306esac
5307
05e7c244 5308# Libunwind support for ia64.
bec39cab 5309
05e7c244
JK
5310
5311# Check whether --with-libunwind-ia64 was given.
5312if test "${with_libunwind_ia64+set}" = set; then :
5313 withval=$with_libunwind_ia64;
bec39cab 5314else
05e7c244
JK
5315 with_libunwind_ia64=auto
5316fi
bec39cab 5317
05e7c244
JK
5318
5319# Backward compatibility option.
5320if test "${with_libunwind+set}" = set; then
5321 if test x"$with_libunwind_ia64" != xauto; then
5322 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5323 fi
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5325$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5326 with_libunwind_ia64="$with_libunwind"
5327fi
5328
5329case "$with_libunwind_ia64" in
5330 yes | no)
5331 ;;
5332 auto)
5333 for ac_header in libunwind-ia64.h
81ecdfbb 5334do :
b54a8fd7
PA
5335 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5336if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5337 cat >>confdefs.h <<_ACEOF
b54a8fd7 5338#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5339_ACEOF
5340
5341fi
5342
5343done
5344
05e7c244
JK
5345 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5346 ;;
5347 *)
5348 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5349 ;;
5350esac
bec39cab 5351
05e7c244 5352if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5353 for ac_header in libunwind-ia64.h
81ecdfbb 5354do :
b54a8fd7
PA
5355 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5356if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5357 cat >>confdefs.h <<_ACEOF
b54a8fd7 5358#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5359_ACEOF
5360
5361fi
5362
5363done
5364
05e7c244
JK
5365 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5366 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5367 fi
5368 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5369 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5370 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5371fi
5372
cb01cfba
JB
5373opt_curses=no
5374
81ecdfbb
RW
5375# Check whether --with-curses was given.
5376if test "${with_curses+set}" = set; then :
5377 withval=$with_curses; opt_curses=$withval
5378fi
5379
cb01cfba 5380
76a39ba7 5381prefer_curses=no
cb01cfba 5382if test "$opt_curses" = "yes"; then
76a39ba7 5383 prefer_curses=yes
cb01cfba
JB
5384fi
5385
a9322a30 5386# Profiling support.
81ecdfbb
RW
5387# Check whether --enable-profiling was given.
5388if test "${enable_profiling+set}" = set; then :
5389 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5390 yes | no)
5391 ;;
5392 *)
81ecdfbb 5393 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5394 esac
5395else
5396 enable_profiling=no
81ecdfbb 5397fi
bec39cab 5398
a9322a30
TT
5399
5400for ac_func in monstartup _mcleanup
81ecdfbb
RW
5401do :
5402 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5403ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5404eval as_val=\$$as_ac_var
5405 if test "x$as_val" = x""yes; then :
5406 cat >>confdefs.h <<_ACEOF
5407#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5408_ACEOF
a9322a30 5409
81ecdfbb
RW
5410fi
5411done
a9322a30 5412
81ecdfbb
RW
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5414$as_echo_n "checking for _etext... " >&6; }
5415if test "${ac_cv_var__etext+set}" = set; then :
5416 $as_echo_n "(cached) " >&6
5417else
5418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5419/* end confdefs.h. */
5420#include <stdlib.h>
5421extern char _etext;
a9322a30
TT
5422
5423int
5424main ()
5425{
5426free (&_etext);
5427 ;
5428 return 0;
5429}
bec39cab 5430_ACEOF
81ecdfbb 5431if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5432 ac_cv_var__etext=yes
bec39cab 5433else
81ecdfbb 5434 ac_cv_var__etext=no
bec39cab 5435fi
81ecdfbb
RW
5436rm -f core conftest.err conftest.$ac_objext \
5437 conftest$ac_exeext conftest.$ac_ext
bec39cab 5438fi
81ecdfbb
RW
5439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5440$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5441if test $ac_cv_var__etext = yes; then
60ca704f 5442
81ecdfbb 5443$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5444
bec39cab 5445fi
81ecdfbb
RW
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5447$as_echo_n "checking for etext... " >&6; }
5448if test "${ac_cv_var_etext+set}" = set; then :
5449 $as_echo_n "(cached) " >&6
bec39cab 5450else
81ecdfbb 5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5452/* end confdefs.h. */
a9322a30
TT
5453#include <stdlib.h>
5454extern char etext;
bec39cab
AC
5455
5456int
5457main ()
5458{
a9322a30 5459free (&etext);
bec39cab
AC
5460 ;
5461 return 0;
5462}
5463_ACEOF
81ecdfbb 5464if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5465 ac_cv_var_etext=yes
bec39cab 5466else
81ecdfbb 5467 ac_cv_var_etext=no
bec39cab 5468fi
81ecdfbb
RW
5469rm -f core conftest.err conftest.$ac_objext \
5470 conftest$ac_exeext conftest.$ac_ext
bec39cab 5471fi
81ecdfbb
RW
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5473$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5474if test $ac_cv_var_etext = yes; then
5475
81ecdfbb 5476$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5477
5478fi
a9322a30
TT
5479if test "$enable_profiling" = yes ; then
5480 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5481 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5482 fi
5483 PROFILE_CFLAGS=-pg
5484 OLD_CFLAGS="$CFLAGS"
5485 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5486
81ecdfbb
RW
5487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5488$as_echo_n "checking whether $CC supports -pg... " >&6; }
5489if test "${ac_cv_cc_supports_pg+set}" = set; then :
5490 $as_echo_n "(cached) " >&6
bec39cab 5491else
81ecdfbb 5492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5493/* end confdefs.h. */
bec39cab
AC
5494
5495int
5496main ()
5497{
a9322a30 5498int x;
bec39cab
AC
5499 ;
5500 return 0;
5501}
5502_ACEOF
81ecdfbb 5503if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5504 ac_cv_cc_supports_pg=yes
bec39cab 5505else
81ecdfbb 5506 ac_cv_cc_supports_pg=no
bec39cab 5507fi
81ecdfbb 5508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5509fi
81ecdfbb
RW
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5511$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5512
a9322a30 5513 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5514 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5515 fi
bec39cab 5516
a9322a30 5517 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5518fi
5519
c16158bc
JM
5520
5521
81ecdfbb
RW
5522# Check whether --with-pkgversion was given.
5523if test "${with_pkgversion+set}" = set; then :
5524 withval=$with_pkgversion; case "$withval" in
5525 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5526 no) PKGVERSION= ;;
5527 *) PKGVERSION="($withval) " ;;
5528 esac
5529else
5530 PKGVERSION="(GDB) "
5531
81ecdfbb 5532fi
c16158bc
JM
5533
5534
5535
5536
81ecdfbb
RW
5537
5538# Check whether --with-bugurl was given.
5539if test "${with_bugurl+set}" = set; then :
5540 withval=$with_bugurl; case "$withval" in
5541 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5542 no) BUGURL=
5543 ;;
5544 *) BUGURL="$withval"
5545 ;;
5546 esac
5547else
5548 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5549
81ecdfbb
RW
5550fi
5551
c16158bc
JM
5552 case ${BUGURL} in
5553 "")
5554 REPORT_BUGS_TO=
5555 REPORT_BUGS_TEXI=
5556 ;;
5557 *)
5558 REPORT_BUGS_TO="<$BUGURL>"
5559 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5560 ;;
5561 esac;
5562
5563
5564
5565
5566cat >>confdefs.h <<_ACEOF
5567#define PKGVERSION "$PKGVERSION"
5568_ACEOF
5569
5570
5571cat >>confdefs.h <<_ACEOF
5572#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5573_ACEOF
5574
5575
bec39cab
AC
5576# --------------------- #
5577# Checks for programs. #
5578# --------------------- #
5579
5580for ac_prog in gawk mawk nawk awk
5581do
5582 # Extract the first word of "$ac_prog", so it can be a program name with args.
5583set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585$as_echo_n "checking for $ac_word... " >&6; }
5586if test "${ac_cv_prog_AWK+set}" = set; then :
5587 $as_echo_n "(cached) " >&6
bec39cab
AC
5588else
5589 if test -n "$AWK"; then
5590 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5591else
5592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593for as_dir in $PATH
5594do
5595 IFS=$as_save_IFS
5596 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5597 for ac_exec_ext in '' $ac_executable_extensions; do
5598 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5599 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5601 break 2
5602 fi
5603done
81ecdfbb
RW
5604 done
5605IFS=$as_save_IFS
bec39cab
AC
5606
5607fi
5608fi
5609AWK=$ac_cv_prog_AWK
5610if test -n "$AWK"; then
81ecdfbb
RW
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5612$as_echo "$AWK" >&6; }
bec39cab 5613else
81ecdfbb
RW
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5615$as_echo "no" >&6; }
bec39cab
AC
5616fi
5617
bec39cab 5618
81ecdfbb 5619 test -n "$AWK" && break
bec39cab
AC
5620done
5621
c971b7fa
PA
5622# Find a good install program. We prefer a C program (faster),
5623# so one script is as good as another. But avoid the broken or
5624# incompatible versions:
5625# SysV /etc/install, /usr/sbin/install
5626# SunOS /usr/etc/install
5627# IRIX /sbin/install
5628# AIX /bin/install
5629# AmigaOS /C/install, which installs bootblocks on floppy discs
5630# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5631# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5632# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5633# OS/2's system install, which has a completely different semantic
5634# ./install, which can be erroneously created by make from ./install.sh.
5635# Reject install programs that cannot install multiple files.
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5637$as_echo_n "checking for a BSD-compatible install... " >&6; }
5638if test -z "$INSTALL"; then
5639if test "${ac_cv_path_install+set}" = set; then :
5640 $as_echo_n "(cached) " >&6
5641else
5642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645 IFS=$as_save_IFS
5646 test -z "$as_dir" && as_dir=.
5647 # Account for people who put trailing slashes in PATH elements.
5648case $as_dir/ in #((
5649 ./ | .// | /[cC]/* | \
5650 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5651 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5652 /usr/ucb/* ) ;;
5653 *)
5654 # OSF1 and SCO ODT 3.0 have their own names for install.
5655 # Don't use installbsd from OSF since it installs stuff as root
5656 # by default.
5657 for ac_prog in ginstall scoinst install; do
5658 for ac_exec_ext in '' $ac_executable_extensions; do
5659 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5660 if test $ac_prog = install &&
5661 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5662 # AIX install. It has an incompatible calling convention.
5663 :
5664 elif test $ac_prog = install &&
5665 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5666 # program-specific install script used by HP pwplus--don't use.
5667 :
5668 else
5669 rm -rf conftest.one conftest.two conftest.dir
5670 echo one > conftest.one
5671 echo two > conftest.two
5672 mkdir conftest.dir
5673 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5674 test -s conftest.one && test -s conftest.two &&
5675 test -s conftest.dir/conftest.one &&
5676 test -s conftest.dir/conftest.two
5677 then
5678 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5679 break 3
5680 fi
5681 fi
5682 fi
5683 done
5684 done
5685 ;;
5686esac
5687
5688 done
5689IFS=$as_save_IFS
5690
5691rm -rf conftest.one conftest.two conftest.dir
5692
5693fi
5694 if test "${ac_cv_path_install+set}" = set; then
5695 INSTALL=$ac_cv_path_install
5696 else
5697 # As a last resort, use the slow shell script. Don't cache a
5698 # value for INSTALL within a source directory, because that will
5699 # break other packages using the cache if that directory is
5700 # removed, or if the value is a relative name.
5701 INSTALL=$ac_install_sh
5702 fi
5703fi
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5705$as_echo "$INSTALL" >&6; }
5706
5707# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5708# It thinks the first close brace ends the variable substitution.
5709test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5710
5711test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5712
5713test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5714
81ecdfbb
RW
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5716$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5717LN_S=$as_ln_s
5718if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5720$as_echo "yes" >&6; }
bec39cab 5721else
81ecdfbb
RW
5722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5723$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5724fi
5725
5726if test -n "$ac_tool_prefix"; then
5727 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5728set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5730$as_echo_n "checking for $ac_word... " >&6; }
5731if test "${ac_cv_prog_RANLIB+set}" = set; then :
5732 $as_echo_n "(cached) " >&6
bec39cab
AC
5733else
5734 if test -n "$RANLIB"; then
5735 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5736else
5737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738for as_dir in $PATH
5739do
5740 IFS=$as_save_IFS
5741 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5742 for ac_exec_ext in '' $ac_executable_extensions; do
5743 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5744 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5746 break 2
5747 fi
5748done
81ecdfbb
RW
5749 done
5750IFS=$as_save_IFS
bec39cab
AC
5751
5752fi
5753fi
5754RANLIB=$ac_cv_prog_RANLIB
5755if test -n "$RANLIB"; then
81ecdfbb
RW
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5757$as_echo "$RANLIB" >&6; }
bec39cab 5758else
81ecdfbb
RW
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5760$as_echo "no" >&6; }
bec39cab
AC
5761fi
5762
81ecdfbb 5763
bec39cab
AC
5764fi
5765if test -z "$ac_cv_prog_RANLIB"; then
5766 ac_ct_RANLIB=$RANLIB
5767 # Extract the first word of "ranlib", so it can be a program name with args.
5768set dummy ranlib; ac_word=$2
81ecdfbb
RW
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
5771if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5772 $as_echo_n "(cached) " >&6
bec39cab
AC
5773else
5774 if test -n "$ac_ct_RANLIB"; then
5775 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5776else
5777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780 IFS=$as_save_IFS
5781 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5782 for ac_exec_ext in '' $ac_executable_extensions; do
5783 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5784 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5786 break 2
5787 fi
5788done
81ecdfbb
RW
5789 done
5790IFS=$as_save_IFS
bec39cab 5791
bec39cab
AC
5792fi
5793fi
5794ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5795if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5797$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5798else
81ecdfbb
RW
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800$as_echo "no" >&6; }
bec39cab
AC
5801fi
5802
81ecdfbb
RW
5803 if test "x$ac_ct_RANLIB" = x; then
5804 RANLIB=":"
5805 else
5806 case $cross_compiling:$ac_tool_warned in
5807yes:)
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5809$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5810ac_tool_warned=yes ;;
5811esac
5812 RANLIB=$ac_ct_RANLIB
5813 fi
bec39cab
AC
5814else
5815 RANLIB="$ac_cv_prog_RANLIB"
5816fi
5817
5818for ac_prog in 'bison -y' byacc
5819do
5820 # Extract the first word of "$ac_prog", so it can be a program name with args.
5821set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5823$as_echo_n "checking for $ac_word... " >&6; }
5824if test "${ac_cv_prog_YACC+set}" = set; then :
5825 $as_echo_n "(cached) " >&6
bec39cab
AC
5826else
5827 if test -n "$YACC"; then
5828 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5829else
5830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831for as_dir in $PATH
5832do
5833 IFS=$as_save_IFS
5834 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5835 for ac_exec_ext in '' $ac_executable_extensions; do
5836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5837 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5839 break 2
5840 fi
5841done
81ecdfbb
RW
5842 done
5843IFS=$as_save_IFS
bec39cab
AC
5844
5845fi
5846fi
5847YACC=$ac_cv_prog_YACC
5848if test -n "$YACC"; then
81ecdfbb
RW
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5850$as_echo "$YACC" >&6; }
bec39cab 5851else
81ecdfbb
RW
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853$as_echo "no" >&6; }
bec39cab
AC
5854fi
5855
81ecdfbb 5856
bec39cab
AC
5857 test -n "$YACC" && break
5858done
5859test -n "$YACC" || YACC="yacc"
5860
5861
5862if test -n "$ac_tool_prefix"; then
5863 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5864set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if test "${ac_cv_prog_AR+set}" = set; then :
5868 $as_echo_n "(cached) " >&6
bec39cab
AC
5869else
5870 if test -n "$AR"; then
5871 ac_cv_prog_AR="$AR" # Let the user override the test.
5872else
5873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876 IFS=$as_save_IFS
5877 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5878 for ac_exec_ext in '' $ac_executable_extensions; do
5879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5880 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5882 break 2
5883 fi
5884done
81ecdfbb
RW
5885 done
5886IFS=$as_save_IFS
bec39cab
AC
5887
5888fi
5889fi
5890AR=$ac_cv_prog_AR
5891if test -n "$AR"; then
81ecdfbb
RW
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5893$as_echo "$AR" >&6; }
bec39cab 5894else
81ecdfbb
RW
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
bec39cab
AC
5897fi
5898
81ecdfbb 5899
bec39cab
AC
5900fi
5901if test -z "$ac_cv_prog_AR"; then
5902 ac_ct_AR=$AR
5903 # Extract the first word of "ar", so it can be a program name with args.
5904set dummy ar; ac_word=$2
81ecdfbb
RW
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906$as_echo_n "checking for $ac_word... " >&6; }
5907if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5908 $as_echo_n "(cached) " >&6
bec39cab
AC
5909else
5910 if test -n "$ac_ct_AR"; then
5911 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5912else
5913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916 IFS=$as_save_IFS
5917 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5918 for ac_exec_ext in '' $ac_executable_extensions; do
5919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5920 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5922 break 2
5923 fi
5924done
81ecdfbb
RW
5925 done
5926IFS=$as_save_IFS
bec39cab
AC
5927
5928fi
5929fi
5930ac_ct_AR=$ac_cv_prog_ac_ct_AR
5931if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5933$as_echo "$ac_ct_AR" >&6; }
bec39cab 5934else
81ecdfbb
RW
5935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936$as_echo "no" >&6; }
bec39cab
AC
5937fi
5938
81ecdfbb
RW
5939 if test "x$ac_ct_AR" = x; then
5940 AR=""
5941 else
5942 case $cross_compiling:$ac_tool_warned in
5943yes:)
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5946ac_tool_warned=yes ;;
5947esac
5948 AR=$ac_ct_AR
5949 fi
bec39cab
AC
5950else
5951 AR="$ac_cv_prog_AR"
5952fi
5953
5954if test -n "$ac_tool_prefix"; then
5955 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5956set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
5959if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5960 $as_echo_n "(cached) " >&6
bec39cab
AC
5961else
5962 if test -n "$DLLTOOL"; then
5963 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5970 for ac_exec_ext in '' $ac_executable_extensions; do
5971 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5972 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5974 break 2
5975 fi
5976done
81ecdfbb
RW
5977 done
5978IFS=$as_save_IFS
bec39cab
AC
5979
5980fi
5981fi
5982DLLTOOL=$ac_cv_prog_DLLTOOL
5983if test -n "$DLLTOOL"; then
81ecdfbb
RW
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5985$as_echo "$DLLTOOL" >&6; }
bec39cab 5986else
81ecdfbb
RW
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
bec39cab
AC
5989fi
5990
81ecdfbb 5991
bec39cab
AC
5992fi
5993if test -z "$ac_cv_prog_DLLTOOL"; then
5994 ac_ct_DLLTOOL=$DLLTOOL
5995 # Extract the first word of "dlltool", so it can be a program name with args.
5996set dummy dlltool; ac_word=$2
81ecdfbb
RW
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
5999if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6000 $as_echo_n "(cached) " >&6
bec39cab
AC
6001else
6002 if test -n "$ac_ct_DLLTOOL"; then
6003 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6004else
6005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
6009 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6010 for ac_exec_ext in '' $ac_executable_extensions; do
6011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6012 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6014 break 2
6015 fi
6016done
81ecdfbb
RW
6017 done
6018IFS=$as_save_IFS
bec39cab
AC
6019
6020fi
6021fi
6022ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6023if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6025$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6026else
81ecdfbb
RW
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
bec39cab
AC
6029fi
6030
81ecdfbb
RW
6031 if test "x$ac_ct_DLLTOOL" = x; then
6032 DLLTOOL=""
6033 else
6034 case $cross_compiling:$ac_tool_warned in
6035yes:)
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6038ac_tool_warned=yes ;;
6039esac
6040 DLLTOOL=$ac_ct_DLLTOOL
6041 fi
bec39cab
AC
6042else
6043 DLLTOOL="$ac_cv_prog_DLLTOOL"
6044fi
6045
6046if test -n "$ac_tool_prefix"; then
6047 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6048set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if test "${ac_cv_prog_WINDRES+set}" = set; then :
6052 $as_echo_n "(cached) " >&6
bec39cab
AC
6053else
6054 if test -n "$WINDRES"; then
6055 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6062 for ac_exec_ext in '' $ac_executable_extensions; do
6063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6064 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6066 break 2
6067 fi
6068done
81ecdfbb
RW
6069 done
6070IFS=$as_save_IFS
bec39cab
AC
6071
6072fi
6073fi
6074WINDRES=$ac_cv_prog_WINDRES
6075if test -n "$WINDRES"; then
81ecdfbb
RW
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6077$as_echo "$WINDRES" >&6; }
bec39cab 6078else
81ecdfbb
RW
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
bec39cab
AC
6081fi
6082
81ecdfbb 6083
bec39cab
AC
6084fi
6085if test -z "$ac_cv_prog_WINDRES"; then
6086 ac_ct_WINDRES=$WINDRES
6087 # Extract the first word of "windres", so it can be a program name with args.
6088set dummy windres; ac_word=$2
81ecdfbb
RW
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6092 $as_echo_n "(cached) " >&6
bec39cab
AC
6093else
6094 if test -n "$ac_ct_WINDRES"; then
6095 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6096else
6097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098for as_dir in $PATH
6099do
6100 IFS=$as_save_IFS
6101 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6102 for ac_exec_ext in '' $ac_executable_extensions; do
6103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6104 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6106 break 2
6107 fi
6108done
81ecdfbb
RW
6109 done
6110IFS=$as_save_IFS
bec39cab
AC
6111
6112fi
6113fi
6114ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6115if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6117$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6118else
81ecdfbb
RW
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
c906108c 6121fi
bec39cab 6122
81ecdfbb
RW
6123 if test "x$ac_ct_WINDRES" = x; then
6124 WINDRES=""
6125 else
6126 case $cross_compiling:$ac_tool_warned in
6127yes:)
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6130ac_tool_warned=yes ;;
6131esac
6132 WINDRES=$ac_ct_WINDRES
6133 fi
c906108c 6134else
bec39cab 6135 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6136fi
6137
bec39cab 6138
036c3acb
TS
6139case $host_os in
6140 gnu*)
6141 # Needed for GNU Hurd hosts.
6142 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6143 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6144set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6146$as_echo_n "checking for $ac_word... " >&6; }
6147if test "${ac_cv_prog_MIG+set}" = set; then :
6148 $as_echo_n "(cached) " >&6
c906108c 6149else
bec39cab
AC
6150 if test -n "$MIG"; then
6151 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6152else
6153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6154for as_dir in $PATH
6155do
6156 IFS=$as_save_IFS
6157 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6158 for ac_exec_ext in '' $ac_executable_extensions; do
6159 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6160 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6162 break 2
6163 fi
6164done
81ecdfbb
RW
6165 done
6166IFS=$as_save_IFS
bec39cab 6167
c906108c 6168fi
bec39cab
AC
6169fi
6170MIG=$ac_cv_prog_MIG
6171if test -n "$MIG"; then
81ecdfbb
RW
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6173$as_echo "$MIG" >&6; }
c906108c 6174else
81ecdfbb
RW
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6176$as_echo "no" >&6; }
c906108c
SS
6177fi
6178
81ecdfbb 6179
bec39cab
AC
6180fi
6181if test -z "$ac_cv_prog_MIG"; then
6182 ac_ct_MIG=$MIG
6183 # Extract the first word of "mig", so it can be a program name with args.
6184set dummy mig; ac_word=$2
81ecdfbb
RW
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6186$as_echo_n "checking for $ac_word... " >&6; }
6187if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6188 $as_echo_n "(cached) " >&6
bec39cab
AC
6189else
6190 if test -n "$ac_ct_MIG"; then
6191 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6192else
6193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6194for as_dir in $PATH
6195do
6196 IFS=$as_save_IFS
6197 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6198 for ac_exec_ext in '' $ac_executable_extensions; do
6199 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6200 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6202 break 2
6203 fi
6204done
81ecdfbb
RW
6205 done
6206IFS=$as_save_IFS
c906108c 6207
bec39cab
AC
6208fi
6209fi
6210ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6211if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6213$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6214else
81ecdfbb
RW
6215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6216$as_echo "no" >&6; }
bec39cab 6217fi
c906108c 6218
81ecdfbb
RW
6219 if test "x$ac_ct_MIG" = x; then
6220 MIG=""
6221 else
6222 case $cross_compiling:$ac_tool_warned in
6223yes:)
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6226ac_tool_warned=yes ;;
6227esac
6228 MIG=$ac_ct_MIG
6229 fi
bec39cab
AC
6230else
6231 MIG="$ac_cv_prog_MIG"
6232fi
c906108c 6233
036c3acb
TS
6234 if test x"$MIG" = x; then
6235 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6236 fi
6237 ;;
6238esac
c906108c 6239
bec39cab
AC
6240# ---------------------- #
6241# Checks for libraries. #
6242# ---------------------- #
c906108c 6243
bec39cab 6244# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6246$as_echo_n "checking for main in -lm... " >&6; }
6247if test "${ac_cv_lib_m_main+set}" = set; then :
6248 $as_echo_n "(cached) " >&6
bec39cab
AC
6249else
6250 ac_check_lib_save_LIBS=$LIBS
6251LIBS="-lm $LIBS"
81ecdfbb 6252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6253/* end confdefs.h. */
c906108c 6254
c906108c 6255
bec39cab
AC
6256int
6257main ()
6258{
81ecdfbb 6259return main ();
bec39cab
AC
6260 ;
6261 return 0;
6262}
6263_ACEOF
81ecdfbb 6264if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6265 ac_cv_lib_m_main=yes
6266else
81ecdfbb 6267 ac_cv_lib_m_main=no
bec39cab 6268fi
81ecdfbb
RW
6269rm -f core conftest.err conftest.$ac_objext \
6270 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6271LIBS=$ac_check_lib_save_LIBS
6272fi
81ecdfbb
RW
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6274$as_echo "$ac_cv_lib_m_main" >&6; }
6275if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6276 cat >>confdefs.h <<_ACEOF
6277#define HAVE_LIBM 1
6278_ACEOF
6279
6280 LIBS="-lm $LIBS"
c906108c 6281
c906108c 6282fi
bec39cab
AC
6283
6284
6285# We need to link with -lw to get `wctype' on Solaris before Solaris
6286# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6287# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6288# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6289ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6290if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6291
c906108c 6292else
81ecdfbb
RW
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6294$as_echo_n "checking for wctype in -lw... " >&6; }
6295if test "${ac_cv_lib_w_wctype+set}" = set; then :
6296 $as_echo_n "(cached) " >&6
bec39cab
AC
6297else
6298 ac_check_lib_save_LIBS=$LIBS
6299LIBS="-lw $LIBS"
81ecdfbb 6300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6301/* end confdefs.h. */
c906108c 6302
81ecdfbb
RW
6303/* Override any GCC internal prototype to avoid an error.
6304 Use char because int might match the return type of a GCC
6305 builtin and then its argument prototype would still apply. */
bec39cab
AC
6306#ifdef __cplusplus
6307extern "C"
6308#endif
bec39cab
AC
6309char wctype ();
6310int
6311main ()
6312{
81ecdfbb 6313return wctype ();
bec39cab
AC
6314 ;
6315 return 0;
6316}
6317_ACEOF
81ecdfbb 6318if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6319 ac_cv_lib_w_wctype=yes
6320else
81ecdfbb 6321 ac_cv_lib_w_wctype=no
bec39cab 6322fi
81ecdfbb
RW
6323rm -f core conftest.err conftest.$ac_objext \
6324 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6325LIBS=$ac_check_lib_save_LIBS
6326fi
81ecdfbb
RW
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6328$as_echo "$ac_cv_lib_w_wctype" >&6; }
6329if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6330 cat >>confdefs.h <<_ACEOF
6331#define HAVE_LIBW 1
6332_ACEOF
c906108c 6333
bec39cab 6334 LIBS="-lw $LIBS"
c906108c 6335
bec39cab 6336fi
c906108c 6337
bec39cab 6338fi
c906108c 6339
ddc9cd0f 6340
bec39cab 6341# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6343$as_echo_n "checking for library containing gethostbyname... " >&6; }
6344if test "${ac_cv_search_gethostbyname+set}" = set; then :
6345 $as_echo_n "(cached) " >&6
bec39cab
AC
6346else
6347 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6349/* end confdefs.h. */
ddc9cd0f 6350
81ecdfbb
RW
6351/* Override any GCC internal prototype to avoid an error.
6352 Use char because int might match the return type of a GCC
6353 builtin and then its argument prototype would still apply. */
bec39cab
AC
6354#ifdef __cplusplus
6355extern "C"
6356#endif
bec39cab
AC
6357char gethostbyname ();
6358int
6359main ()
6360{
81ecdfbb 6361return gethostbyname ();
bec39cab
AC
6362 ;
6363 return 0;
6364}
6365_ACEOF
81ecdfbb
RW
6366for ac_lib in '' nsl; do
6367 if test -z "$ac_lib"; then
6368 ac_res="none required"
6369 else
6370 ac_res=-l$ac_lib
b4e70030 6371 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6372 fi
6373 if ac_fn_c_try_link "$LINENO"; then :
6374 ac_cv_search_gethostbyname=$ac_res
6375fi
6376rm -f core conftest.err conftest.$ac_objext \
6377 conftest$ac_exeext
6378 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6379 break
6380fi
6381done
6382if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6383
bec39cab 6384else
81ecdfbb 6385 ac_cv_search_gethostbyname=no
bec39cab 6386fi
81ecdfbb 6387rm conftest.$ac_ext
bec39cab
AC
6388LIBS=$ac_func_search_save_LIBS
6389fi
81ecdfbb
RW
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6391$as_echo "$ac_cv_search_gethostbyname" >&6; }
6392ac_res=$ac_cv_search_gethostbyname
6393if test "$ac_res" != no; then :
6394 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6395
bec39cab 6396fi
96baa820 6397
c906108c 6398
b4e70030 6399# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6401$as_echo_n "checking for library containing socketpair... " >&6; }
6402if test "${ac_cv_search_socketpair+set}" = set; then :
6403 $as_echo_n "(cached) " >&6
b4e70030
JB
6404else
6405 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6407/* end confdefs.h. */
6408
81ecdfbb
RW
6409/* Override any GCC internal prototype to avoid an error.
6410 Use char because int might match the return type of a GCC
6411 builtin and then its argument prototype would still apply. */
b4e70030
JB
6412#ifdef __cplusplus
6413extern "C"
6414#endif
b4e70030
JB
6415char socketpair ();
6416int
6417main ()
6418{
81ecdfbb 6419return socketpair ();
b4e70030
JB
6420 ;
6421 return 0;
6422}
6423_ACEOF
81ecdfbb
RW
6424for ac_lib in '' socket; do
6425 if test -z "$ac_lib"; then
6426 ac_res="none required"
6427 else
6428 ac_res=-l$ac_lib
b4e70030 6429 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6430 fi
6431 if ac_fn_c_try_link "$LINENO"; then :
6432 ac_cv_search_socketpair=$ac_res
6433fi
6434rm -f core conftest.err conftest.$ac_objext \
6435 conftest$ac_exeext
6436 if test "${ac_cv_search_socketpair+set}" = set; then :
6437 break
6438fi
6439done
6440if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6441
b4e70030 6442else
81ecdfbb 6443 ac_cv_search_socketpair=no
b4e70030 6444fi
81ecdfbb 6445rm conftest.$ac_ext
b4e70030
JB
6446LIBS=$ac_func_search_save_LIBS
6447fi
81ecdfbb
RW
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6449$as_echo "$ac_cv_search_socketpair" >&6; }
6450ac_res=$ac_cv_search_socketpair
6451if test "$ac_res" != no; then :
6452 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6453
6454fi
6455
6456
233a11ab 6457# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6458
6459 # See if the user specified whether he wants zlib support or not.
6460
6461# Check whether --with-zlib was given.
6462if test "${with_zlib+set}" = set; then :
6463 withval=$with_zlib;
6464else
6465 with_zlib=auto
6466fi
6467
6468
6469 if test "$with_zlib" != "no"; then
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6471$as_echo_n "checking for library containing zlibVersion... " >&6; }
6472if test "${ac_cv_search_zlibVersion+set}" = set; then :
6473 $as_echo_n "(cached) " >&6
233a11ab
CS
6474else
6475 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6477/* end confdefs.h. */
6478
81ecdfbb
RW
6479/* Override any GCC internal prototype to avoid an error.
6480 Use char because int might match the return type of a GCC
233a11ab 6481 builtin and then its argument prototype would still apply. */
233a11ab
CS
6482#ifdef __cplusplus
6483extern "C"
6484#endif
233a11ab
CS
6485char zlibVersion ();
6486int
6487main ()
6488{
81ecdfbb 6489return zlibVersion ();
233a11ab
CS
6490 ;
6491 return 0;
6492}
6493_ACEOF
81ecdfbb
RW
6494for ac_lib in '' z; do
6495 if test -z "$ac_lib"; then
6496 ac_res="none required"
233a11ab 6497 else
81ecdfbb
RW
6498 ac_res=-l$ac_lib
6499 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6500 fi
81ecdfbb
RW
6501 if ac_fn_c_try_link "$LINENO"; then :
6502 ac_cv_search_zlibVersion=$ac_res
233a11ab 6503fi
81ecdfbb
RW
6504rm -f core conftest.err conftest.$ac_objext \
6505 conftest$ac_exeext
6506 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6507 break
233a11ab 6508fi
81ecdfbb
RW
6509done
6510if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6511
233a11ab 6512else
81ecdfbb 6513 ac_cv_search_zlibVersion=no
233a11ab 6514fi
81ecdfbb
RW
6515rm conftest.$ac_ext
6516LIBS=$ac_func_search_save_LIBS
233a11ab 6517fi
81ecdfbb
RW
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6519$as_echo "$ac_cv_search_zlibVersion" >&6; }
6520ac_res=$ac_cv_search_zlibVersion
6521if test "$ac_res" != no; then :
6522 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6523 for ac_header in zlib.h
6524do :
6525 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6526if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6527 cat >>confdefs.h <<_ACEOF
81ecdfbb 6528#define HAVE_ZLIB_H 1
233a11ab
CS
6529_ACEOF
6530
6531fi
6532
6533done
6534
6535fi
6536
b040ad30
JB
6537 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6538 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6539 fi
6540 fi
6541
233a11ab 6542
77f120bf 6543# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6545$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6546if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6547 $as_echo_n "(cached) " >&6
bec39cab
AC
6548else
6549 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6551/* end confdefs.h. */
c906108c 6552
81ecdfbb
RW
6553/* Override any GCC internal prototype to avoid an error.
6554 Use char because int might match the return type of a GCC
6555 builtin and then its argument prototype would still apply. */
bec39cab
AC
6556#ifdef __cplusplus
6557extern "C"
6558#endif
77f120bf 6559char dlgetmodinfo ();
bec39cab
AC
6560int
6561main ()
6562{
81ecdfbb 6563return dlgetmodinfo ();
bec39cab
AC
6564 ;
6565 return 0;
6566}
6567_ACEOF
81ecdfbb
RW
6568for ac_lib in '' dl xpdl; do
6569 if test -z "$ac_lib"; then
6570 ac_res="none required"
6571 else
6572 ac_res=-l$ac_lib
b4e70030 6573 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6574 fi
6575 if ac_fn_c_try_link "$LINENO"; then :
6576 ac_cv_search_dlgetmodinfo=$ac_res
6577fi
6578rm -f core conftest.err conftest.$ac_objext \
6579 conftest$ac_exeext
6580 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6581 break
6582fi
6583done
6584if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6585
4e8d927d 6586else
81ecdfbb 6587 ac_cv_search_dlgetmodinfo=no
1ba607ad 6588fi
81ecdfbb 6589rm conftest.$ac_ext
bec39cab
AC
6590LIBS=$ac_func_search_save_LIBS
6591fi
81ecdfbb
RW
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6593$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6594ac_res=$ac_cv_search_dlgetmodinfo
6595if test "$ac_res" != no; then :
6596 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6597
8bb2c122 6598fi
8bb2c122 6599
8bb2c122 6600
77f120bf 6601
77f120bf 6602
6c7a06a3 6603
81ecdfbb
RW
6604# Check whether --with-libiconv-prefix was given.
6605if test "${with_libiconv_prefix+set}" = set; then :
6606 withval=$with_libiconv_prefix;
6c7a06a3 6607 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6608 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6609 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6610 done
6611
81ecdfbb
RW
6612fi
6613
6c7a06a3 6614
f18c4681 6615 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6616 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6617
81ecdfbb
RW
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6619$as_echo_n "checking for iconv... " >&6; }
6620if test "${am_cv_func_iconv+set}" = set; then :
6621 $as_echo_n "(cached) " >&6
d542061a 6622else
6c7a06a3
TT
6623
6624 am_cv_func_iconv="no, consider installing GNU libiconv"
6625 am_cv_lib_iconv=no
6626 am_cv_use_build_libiconv=no
f0f20949 6627 am_cv_build_libiconv_path=
4edb1e84
JB
6628
6629 # If libiconv is part of the build tree, then try using it over
6630 # any system iconv.
6631 if test -d ../libiconv; then
f18c4681
JB
6632 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6633 am_save_LIBS="$LIBS"
6634 am_save_CPPFLAGS="$CPPFLAGS"
6635 LIBS="$LIBS $lib_dir/libiconv.a"
6636 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6638/* end confdefs.h. */
6c7a06a3
TT
6639#include <stdlib.h>
6640#include <iconv.h>
d542061a
UW
6641int
6642main ()
6643{
6c7a06a3 6644iconv_t cd = iconv_open("","");
f18c4681
JB
6645 iconv(cd,NULL,NULL,NULL,NULL);
6646 iconv_close(cd);
d542061a
UW
6647 ;
6648 return 0;
6649}
6650_ACEOF
81ecdfbb 6651if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6652 am_cv_use_build_libiconv=yes
f0f20949 6653 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6654 am_cv_lib_iconv=yes
6655 am_cv_func_iconv=yes
d542061a 6656fi
81ecdfbb
RW
6657rm -f core conftest.err conftest.$ac_objext \
6658 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6659 LIBS="$am_save_LIBS"
6660 CPPFLAGS="$am_save_CPPFLAGS"
6661 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6662 break
6663 fi
6664 done
4edb1e84 6665 fi
94ae1714 6666
4edb1e84 6667 # Next, try to find iconv in libc.
6c7a06a3 6668 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6670/* end confdefs.h. */
6c7a06a3
TT
6671#include <stdlib.h>
6672#include <iconv.h>
d542061a
UW
6673int
6674main ()
6675{
6c7a06a3
TT
6676iconv_t cd = iconv_open("","");
6677 iconv(cd,NULL,NULL,NULL,NULL);
6678 iconv_close(cd);
d542061a
UW
6679 ;
6680 return 0;
6681}
6682_ACEOF
81ecdfbb 6683if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6684 am_cv_func_iconv=yes
d542061a 6685fi
81ecdfbb
RW
6686rm -f core conftest.err conftest.$ac_objext \
6687 conftest$ac_exeext conftest.$ac_ext
77f120bf 6688 fi
94ae1714 6689
4edb1e84
JB
6690 # If iconv was not in libc, try -liconv. In this case, arrange to
6691 # look in the libiconv prefix, if it was specified by the user.
6692 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6693 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6694 am_save_LIBS="$LIBS"
6695 if test -n "$LIBICONV_INCLUDE"; then
6696 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6697 LIBS="$LIBS $LIBICONV_LIBDIR"
6698 fi
6699 LIBS="$LIBS -liconv"
81ecdfbb 6700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6701/* end confdefs.h. */
6c7a06a3
TT
6702#include <stdlib.h>
6703#include <iconv.h>
bec39cab
AC
6704int
6705main ()
6706{
6c7a06a3
TT
6707iconv_t cd = iconv_open("","");
6708 iconv(cd,NULL,NULL,NULL,NULL);
6709 iconv_close(cd);
bec39cab
AC
6710 ;
6711 return 0;
6712}
6713_ACEOF
81ecdfbb 6714if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6715 am_cv_lib_iconv=yes
6c7a06a3 6716 am_cv_func_iconv=yes
627af7ea 6717fi
81ecdfbb
RW
6718rm -f core conftest.err conftest.$ac_objext \
6719 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6720 LIBS="$am_save_LIBS"
fc3b640d 6721 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6722 fi
6723
6724fi
81ecdfbb
RW
6725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6726$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6727
6728 # Set the various flags based on the cache variables. We can't rely
6729 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6730 LIBICONV=
6731 if test "$am_cv_lib_iconv" = yes; then
6732 LIBICONV="-liconv"
94ae1714
TT
6733 else
6734 LIBICONV_LIBDIR=
6735 LIBICONV_INCLUDE=
fc3b640d
TT
6736 fi
6737 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6738 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6739 LIBICONV_LIBDIR=""
fc3b640d
TT
6740 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6741 fi
6742 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6743 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6744
6c7a06a3
TT
6745 if test "$am_cv_func_iconv" = yes; then
6746
81ecdfbb 6747$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6748
81ecdfbb
RW
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6750$as_echo_n "checking for iconv declaration... " >&6; }
6751 if test "${am_cv_proto_iconv+set}" = set; then :
6752 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6753else
6754
81ecdfbb 6755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6756/* end confdefs.h. */
6757
6c7a06a3
TT
6758#include <stdlib.h>
6759#include <iconv.h>
6760extern
b4e70030 6761#ifdef __cplusplus
6c7a06a3 6762"C"
b4e70030 6763#endif
6c7a06a3
TT
6764#if defined(__STDC__) || defined(__cplusplus)
6765size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6766#else
6767size_t iconv();
6768#endif
6769
b4e70030
JB
6770int
6771main ()
6772{
6c7a06a3 6773
b4e70030
JB
6774 ;
6775 return 0;
6776}
6777_ACEOF
81ecdfbb 6778if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6779 am_cv_proto_iconv_arg1=""
4e8d927d 6780else
81ecdfbb 6781 am_cv_proto_iconv_arg1="const"
b4e70030 6782fi
81ecdfbb 6783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6784 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);"
6785fi
6786
6787 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6789 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6790$as_echo "${ac_t:-
6791 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6792
6793cat >>confdefs.h <<_ACEOF
6794#define ICONV_CONST $am_cv_proto_iconv_arg1
6795_ACEOF
6796
6797 fi
6c7a06a3
TT
6798
6799
478aac75
DE
6800# GDB may fork/exec the iconv program to get the list of supported character
6801# sets. Allow the user to specify where to find it.
6802# There are several factors affecting the choice of option name:
6803# - There is already --with-libiconv-prefix but we can't use it, it specifies
6804# the build-time location of libiconv files.
6805# - The program we need to find is iconv, which comes with glibc. The user
6806# doesn't necessarily have libiconv installed. Therefore naming this
6807# --with-libiconv-foo feels wrong.
6808# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6809# defined to work on directories not files (though it really doesn't know
6810# the difference).
6811# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6812# with --with-libiconv-prefix.
6813# Putting these together is why the option name is --with-iconv-bin.
6814
6815
6816# Check whether --with-iconv-bin was given.
6817if test "${with_iconv_bin+set}" = set; then :
6818 withval=$with_iconv_bin; iconv_bin="${withval}"
6819
6820cat >>confdefs.h <<_ACEOF
6821#define ICONV_BIN "${iconv_bin}"
6822_ACEOF
6823
6824
6825 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6826 if test "x$prefix" = xNONE; then
6827 test_prefix=/usr/local
6828 else
6829 test_prefix=$prefix
6830 fi
6831 else
6832 test_prefix=$exec_prefix
6833 fi
6834 value=0
6835 case ${iconv_bin} in
6836 "${test_prefix}"|"${test_prefix}/"*|\
6837 '${exec_prefix}'|'${exec_prefix}/'*)
6838 value=1
6839 ;;
6840 esac
6841
6842cat >>confdefs.h <<_ACEOF
6843#define ICONV_BIN_RELOCATABLE $value
6844_ACEOF
6845
6846
6847
6848fi
6849
6850
6c7a06a3
TT
6851# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6852# There is a very specific comment in /usr/include/curses.h explaining that
6853# termcap routines built into libcurses must not be used.
6854#
6855# The symptoms we observed so far is GDB unexpectedly changing
6856# the terminal settings when tgetent is called - this is particularly
6857# visible as the output is missing carriage returns, and so rapidly
6858# becomes very hard to read.
6859#
6860# The readline configure script has already decided that libtermcap
6861# was enough for its purposes, and so decided to build readline using
6862# libtermcap. Since the TUI mode requires curses, building GDB with
6863# TUI enabled results in both libraries to be used at the same time,
6864# which is not allowed. This basically means that GDB with TUI is
6865# broken on alpha-osf.
6866
6867case $host_os in
6bcc772d
RO
6868 osf* )
6869 if test x"$enable_tui" = xyes; then
81ecdfbb 6870 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6871 fi
6bcc772d 6872 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6873 enable_tui=no
6874 fi
6875 ;;
6876esac
6877
cb01cfba 6878# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6879if test x"$enable_tui" != xno; then
cb01cfba
JB
6880 prefer_curses=yes
6881fi
6882
6883curses_found=no
6884if test x"$prefer_curses" = xyes; then
6885 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6886 # curses library because the latter might not provide all the
6887 # functionality we need. However, this leads to problems on systems
6888 # where the linker searches /usr/local/lib, but the compiler doesn't
6889 # search /usr/local/include, if ncurses is installed in /usr/local. A
6890 # default installation of ncurses on alpha*-dec-osf* will lead to such
6891 # a situation.
81ecdfbb
RW
6892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6893$as_echo_n "checking for library containing waddstr... " >&6; }
6894if test "${ac_cv_search_waddstr+set}" = set; then :
6895 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6896else
6897 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6899/* end confdefs.h. */
6900
81ecdfbb
RW
6901/* Override any GCC internal prototype to avoid an error.
6902 Use char because int might match the return type of a GCC
6903 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6904#ifdef __cplusplus
6905extern "C"
6906#endif
6c7a06a3
TT
6907char waddstr ();
6908int
6909main ()
6910{
81ecdfbb 6911return waddstr ();
6c7a06a3
TT
6912 ;
6913 return 0;
6914}
6915_ACEOF
81ecdfbb
RW
6916for ac_lib in '' ncurses cursesX curses; do
6917 if test -z "$ac_lib"; then
6918 ac_res="none required"
6919 else
6920 ac_res=-l$ac_lib
6921 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6922 fi
6923 if ac_fn_c_try_link "$LINENO"; then :
6924 ac_cv_search_waddstr=$ac_res
6925fi
6926rm -f core conftest.err conftest.$ac_objext \
6927 conftest$ac_exeext
6928 if test "${ac_cv_search_waddstr+set}" = set; then :
6929 break
6930fi
6931done
6932if test "${ac_cv_search_waddstr+set}" = set; then :
6933
6c7a06a3 6934else
81ecdfbb
RW
6935 ac_cv_search_waddstr=no
6936fi
6937rm conftest.$ac_ext
6938LIBS=$ac_func_search_save_LIBS
6939fi
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6941$as_echo "$ac_cv_search_waddstr" >&6; }
6942ac_res=$ac_cv_search_waddstr
6943if test "$ac_res" != no; then :
6944 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6945
6946fi
6947
6948
cb01cfba
JB
6949 if test "$ac_cv_search_waddstr" != no; then
6950 curses_found=yes
6951 fi
6952fi
6953
6954# Check whether we should enable the TUI, but only do so if we really
6955# can.
6956if test x"$enable_tui" != xno; then
6957 if test -d $srcdir/tui; then
6958 if test "$curses_found" != no; then
6c7a06a3
TT
6959 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6960 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6961 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6962 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6963 else
6964 if test x"$enable_tui" = xyes; then
81ecdfbb 6965 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6966 else
81ecdfbb
RW
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6968$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6969 fi
6970 fi
6971 fi
6972fi
6973
6974# Since GDB uses Readline, we need termcap functionality. In many
6975# cases this will be provided by the curses library, but some systems
6976# have a seperate termcap library, or no curses library at all.
6977
6978case $host_os in
6979 cygwin*)
6980 if test -d $srcdir/libtermcap; then
6981 LIBS="../libtermcap/libtermcap.a $LIBS"
6982 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6983 fi ;;
6984 go32* | *djgpp*)
6985 ac_cv_search_tgetent="none required"
6986 ;;
6987 *mingw32*)
6988 ac_cv_search_tgetent="none required"
6989 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6990 ;;
6991esac
6992
6993# These are the libraries checked by Readline.
81ecdfbb
RW
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6995$as_echo_n "checking for library containing tgetent... " >&6; }
6996if test "${ac_cv_search_tgetent+set}" = set; then :
6997 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6998else
6999 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7001/* end confdefs.h. */
7002
81ecdfbb
RW
7003/* Override any GCC internal prototype to avoid an error.
7004 Use char because int might match the return type of a GCC
7005 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7006#ifdef __cplusplus
7007extern "C"
7008#endif
6c7a06a3
TT
7009char tgetent ();
7010int
7011main ()
7012{
81ecdfbb 7013return tgetent ();
6c7a06a3
TT
7014 ;
7015 return 0;
7016}
7017_ACEOF
81ecdfbb
RW
7018for ac_lib in '' termcap tinfo curses ncurses; do
7019 if test -z "$ac_lib"; then
7020 ac_res="none required"
7021 else
7022 ac_res=-l$ac_lib
6c7a06a3 7023 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7024 fi
7025 if ac_fn_c_try_link "$LINENO"; then :
7026 ac_cv_search_tgetent=$ac_res
7027fi
7028rm -f core conftest.err conftest.$ac_objext \
7029 conftest$ac_exeext
7030 if test "${ac_cv_search_tgetent+set}" = set; then :
7031 break
7032fi
7033done
7034if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7035
6c7a06a3 7036else
81ecdfbb 7037 ac_cv_search_tgetent=no
6c7a06a3 7038fi
81ecdfbb 7039rm conftest.$ac_ext
6c7a06a3
TT
7040LIBS=$ac_func_search_save_LIBS
7041fi
81ecdfbb
RW
7042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7043$as_echo "$ac_cv_search_tgetent" >&6; }
7044ac_res=$ac_cv_search_tgetent
7045if test "$ac_res" != no; then :
7046 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7047
06825bd1
MK
7048fi
7049
06825bd1 7050
bec39cab 7051if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7052 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7053fi
7054
3841debe 7055
81ecdfbb
RW
7056# Check whether --with-system-readline was given.
7057if test "${with_system_readline+set}" = set; then :
7058 withval=$with_system_readline;
7059fi
6a30b0a5 7060
6a30b0a5
AS
7061
7062if test "$with_system_readline" = yes; then
7063 READLINE=-lreadline
7064 READLINE_DEPS=
7065 READLINE_CFLAGS=
39037522 7066 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7067else
7068 READLINE='$(READLINE_DIR)/libreadline.a'
7069 READLINE_DEPS='$(READLINE)'
7070 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7071 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7072fi
7073
7074
7075
7076
7077
f997c383
SD
7078# Generate jit-reader.h
7079
7080# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7081TARGET_PTR=
7082
7083# The cast to long int works around a bug in the HP C Compiler
7084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7086# This bug is HP SR number 8606223364.
7087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7088$as_echo_n "checking size of unsigned long long... " >&6; }
7089if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7090 $as_echo_n "(cached) " >&6
7091else
7092 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7093
7094else
7095 if test "$ac_cv_type_unsigned_long_long" = yes; then
7096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7098{ as_fn_set_status 77
7099as_fn_error "cannot compute sizeof (unsigned long long)
7100See \`config.log' for more details." "$LINENO" 5; }; }
7101 else
7102 ac_cv_sizeof_unsigned_long_long=0
7103 fi
7104fi
7105
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7108$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7109
7110
7111
7112cat >>confdefs.h <<_ACEOF
7113#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7114_ACEOF
7115
7116
7117# The cast to long int works around a bug in the HP C Compiler
7118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7120# This bug is HP SR number 8606223364.
7121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7122$as_echo_n "checking size of unsigned long... " >&6; }
7123if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7124 $as_echo_n "(cached) " >&6
7125else
7126 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7127
7128else
7129 if test "$ac_cv_type_unsigned_long" = yes; then
7130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7132{ as_fn_set_status 77
7133as_fn_error "cannot compute sizeof (unsigned long)
7134See \`config.log' for more details." "$LINENO" 5; }; }
7135 else
7136 ac_cv_sizeof_unsigned_long=0
7137 fi
7138fi
7139
7140fi
7141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7142$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7143
7144
7145
7146cat >>confdefs.h <<_ACEOF
7147#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7148_ACEOF
7149
7150
7151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7156$as_echo_n "checking size of unsigned __int128... " >&6; }
7157if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7158 $as_echo_n "(cached) " >&6
7159else
7160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7161
7162else
7163 if test "$ac_cv_type_unsigned___int128" = yes; then
7164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7166{ as_fn_set_status 77
7167as_fn_error "cannot compute sizeof (unsigned __int128)
7168See \`config.log' for more details." "$LINENO" 5; }; }
7169 else
7170 ac_cv_sizeof_unsigned___int128=0
7171 fi
7172fi
7173
7174fi
7175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7176$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7177
7178
7179
7180cat >>confdefs.h <<_ACEOF
7181#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7182_ACEOF
7183
7184
7185
7186if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7187 TARGET_PTR="unsigned long"
7188elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7189 TARGET_PTR="unsigned long long"
7190elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7191 TARGET_PTR="unsigned __int128"
7192else
7193 TARGET_PTR="unsigned long"
7194fi
7195
7196
7197ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7198
7199
a2d08b9e
SD
7200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7201$as_echo_n "checking for library containing dlopen... " >&6; }
7202if test "${ac_cv_search_dlopen+set}" = set; then :
7203 $as_echo_n "(cached) " >&6
7204else
7205 ac_func_search_save_LIBS=$LIBS
7206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7207/* end confdefs.h. */
7208
7209/* Override any GCC internal prototype to avoid an error.
7210 Use char because int might match the return type of a GCC
7211 builtin and then its argument prototype would still apply. */
7212#ifdef __cplusplus
7213extern "C"
7214#endif
7215char dlopen ();
7216int
7217main ()
7218{
7219return dlopen ();
7220 ;
7221 return 0;
7222}
7223_ACEOF
7224for ac_lib in '' dl; do
7225 if test -z "$ac_lib"; then
7226 ac_res="none required"
7227 else
7228 ac_res=-l$ac_lib
7229 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7230 fi
7231 if ac_fn_c_try_link "$LINENO"; then :
7232 ac_cv_search_dlopen=$ac_res
7233fi
7234rm -f core conftest.err conftest.$ac_objext \
7235 conftest$ac_exeext
7236 if test "${ac_cv_search_dlopen+set}" = set; then :
7237 break
7238fi
7239done
7240if test "${ac_cv_search_dlopen+set}" = set; then :
7241
7242else
7243 ac_cv_search_dlopen=no
7244fi
7245rm conftest.$ac_ext
7246LIBS=$ac_func_search_save_LIBS
7247fi
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7249$as_echo "$ac_cv_search_dlopen" >&6; }
7250ac_res=$ac_cv_search_dlopen
7251if test "$ac_res" != no; then :
7252 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7253
7254fi
7255
7256
39037522 7257
b8e0a31c
SD
7258
7259# Check whether --with-jit-reader-dir was given.
7260if test "${with_jit_reader_dir+set}" = set; then :
7261 withval=$with_jit_reader_dir;
7262 JIT_READER_DIR=$withval
7263else
7264 JIT_READER_DIR=${libdir}/gdb
7265fi
7266
7267
7268 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7269 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7270 ac_define_dir=`eval echo $JIT_READER_DIR`
7271 ac_define_dir=`eval echo $ac_define_dir`
7272
7273cat >>confdefs.h <<_ACEOF
7274#define JIT_READER_DIR "$ac_define_dir"
7275_ACEOF
7276
7277
7278
7279
7280 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7281 if test "x$prefix" = xNONE; then
7282 test_prefix=/usr/local
7283 else
7284 test_prefix=$prefix
7285 fi
7286 else
7287 test_prefix=$exec_prefix
7288 fi
7289 value=0
7290 case ${ac_define_dir} in
7291 "${test_prefix}"|"${test_prefix}/"*|\
7292 '${exec_prefix}'|'${exec_prefix}/'*)
7293 value=1
7294 ;;
7295 esac
7296
7297cat >>confdefs.h <<_ACEOF
7298#define JIT_READER_DIR_RELOCATABLE $value
7299_ACEOF
7300
7301
7302
7303
7304
81ecdfbb
RW
7305# Check whether --with-expat was given.
7306if test "${with_expat+set}" = set; then :
7307 withval=$with_expat;
5c39566f
DJ
7308else
7309 with_expat=auto
81ecdfbb
RW
7310fi
7311
7312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7313$as_echo_n "checking whether to use expat... " >&6; }
7314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7315$as_echo "$with_expat" >&6; }
5c39566f
DJ
7316
7317if test "${with_expat}" = no; then
81ecdfbb
RW
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7319$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7320 HAVE_LIBEXPAT=no
7321else
7322
3841debe
DJ
7323 if test "X$prefix" = "XNONE"; then
7324 acl_final_prefix="$ac_default_prefix"
7325 else
7326 acl_final_prefix="$prefix"
7327 fi
7328 if test "X$exec_prefix" = "XNONE"; then
7329 acl_final_exec_prefix='${prefix}'
7330 else
7331 acl_final_exec_prefix="$exec_prefix"
7332 fi
7333 acl_save_prefix="$prefix"
7334 prefix="$acl_final_prefix"
7335 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7336 prefix="$acl_save_prefix"
7337
7338
81ecdfbb
RW
7339# Check whether --with-gnu-ld was given.
7340if test "${with_gnu_ld+set}" = set; then :
7341 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7342else
7343 with_gnu_ld=no
81ecdfbb
RW
7344fi
7345
3841debe
DJ
7346# Prepare PATH_SEPARATOR.
7347# The user is always right.
7348if test "${PATH_SEPARATOR+set}" != set; then
7349 echo "#! /bin/sh" >conf$$.sh
7350 echo "exit 0" >>conf$$.sh
7351 chmod +x conf$$.sh
7352 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7353 PATH_SEPARATOR=';'
7354 else
7355 PATH_SEPARATOR=:
7356 fi
7357 rm -f conf$$.sh
7358fi
7359ac_prog=ld
7360if test "$GCC" = yes; then
7361 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7363$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7364 case $host in
7365 *-*-mingw*)
7366 # gcc leaves a trailing carriage return which upsets mingw
7367 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7368 *)
7369 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7370 esac
7371 case $ac_prog in
7372 # Accept absolute paths.
7373 [\\/]* | [A-Za-z]:[\\/]*)
7374 re_direlt='/[^/][^/]*/\.\./'
7375 # Canonicalize the path of ld
7376 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7377 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7378 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7379 done
7380 test -z "$LD" && LD="$ac_prog"
7381 ;;
7382 "")
7383 # If it fails, then pretend we aren't using GCC.
7384 ac_prog=ld
7385 ;;
7386 *)
7387 # If it is relative, then search for the first ld in PATH.
7388 with_gnu_ld=unknown
7389 ;;
7390 esac
7391elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7393$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7394else
81ecdfbb
RW
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7396$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7397fi
81ecdfbb
RW
7398if test "${acl_cv_path_LD+set}" = set; then :
7399 $as_echo_n "(cached) " >&6
3841debe
DJ
7400else
7401 if test -z "$LD"; then
7402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7403 for ac_dir in $PATH; do
7404 test -z "$ac_dir" && ac_dir=.
7405 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7406 acl_cv_path_LD="$ac_dir/$ac_prog"
7407 # Check to see if the program is GNU ld. I'd rather use --version,
7408 # but apparently some GNU ld's only accept -v.
7409 # Break only if it was the GNU/non-GNU ld that we prefer.
7410 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7411 test "$with_gnu_ld" != no && break
7412 else
7413 test "$with_gnu_ld" != yes && break
7414 fi
7415 fi
7416 done
7417 IFS="$ac_save_ifs"
7418else
7419 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7420fi
7421fi
7422
7423LD="$acl_cv_path_LD"
7424if test -n "$LD"; then
81ecdfbb
RW
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7426$as_echo "$LD" >&6; }
3841debe 7427else
81ecdfbb
RW
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429$as_echo "no" >&6; }
3841debe 7430fi
81ecdfbb
RW
7431test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7433$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7434if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7435 $as_echo_n "(cached) " >&6
3841debe
DJ
7436else
7437 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7438if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7439 acl_cv_prog_gnu_ld=yes
7440else
7441 acl_cv_prog_gnu_ld=no
7442fi
7443fi
81ecdfbb
RW
7444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7445$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7446with_gnu_ld=$acl_cv_prog_gnu_ld
7447
7448
7449
81ecdfbb
RW
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7451$as_echo_n "checking for shared library run path origin... " >&6; }
7452if test "${acl_cv_rpath+set}" = set; then :
7453 $as_echo_n "(cached) " >&6
3841debe
DJ
7454else
7455
7456 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7457 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7458 . ./conftest.sh
7459 rm -f ./conftest.sh
7460 acl_cv_rpath=done
7461
7462fi
81ecdfbb
RW
7463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7464$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7465 wl="$acl_cv_wl"
7466 libext="$acl_cv_libext"
7467 shlibext="$acl_cv_shlibext"
7468 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7469 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7470 hardcode_direct="$acl_cv_hardcode_direct"
7471 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7472 # Check whether --enable-rpath was given.
7473if test "${enable_rpath+set}" = set; then :
7474 enableval=$enable_rpath; :
3841debe
DJ
7475else
7476 enable_rpath=yes
81ecdfbb
RW
7477fi
7478
3841debe
DJ
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488 use_additional=yes
7489
7490 acl_save_prefix="$prefix"
7491 prefix="$acl_final_prefix"
7492 acl_save_exec_prefix="$exec_prefix"
7493 exec_prefix="$acl_final_exec_prefix"
7494
7495 eval additional_includedir=\"$includedir\"
7496 eval additional_libdir=\"$libdir\"
7497
7498 exec_prefix="$acl_save_exec_prefix"
7499 prefix="$acl_save_prefix"
7500
7501
81ecdfbb
RW
7502# Check whether --with-libexpat-prefix was given.
7503if test "${with_libexpat_prefix+set}" = set; then :
7504 withval=$with_libexpat_prefix;
3841debe
DJ
7505 if test "X$withval" = "Xno"; then
7506 use_additional=no
7507 else
7508 if test "X$withval" = "X"; then
7509
7510 acl_save_prefix="$prefix"
7511 prefix="$acl_final_prefix"
7512 acl_save_exec_prefix="$exec_prefix"
7513 exec_prefix="$acl_final_exec_prefix"
7514
7515 eval additional_includedir=\"$includedir\"
7516 eval additional_libdir=\"$libdir\"
7517
7518 exec_prefix="$acl_save_exec_prefix"
7519 prefix="$acl_save_prefix"
7520
7521 else
7522 additional_includedir="$withval/include"
7523 additional_libdir="$withval/lib"
7524 fi
7525 fi
7526
81ecdfbb
RW
7527fi
7528
3841debe
DJ
7529 LIBEXPAT=
7530 LTLIBEXPAT=
7531 INCEXPAT=
7532 rpathdirs=
7533 ltrpathdirs=
7534 names_already_handled=
7535 names_next_round='expat '
7536 while test -n "$names_next_round"; do
7537 names_this_round="$names_next_round"
7538 names_next_round=
7539 for name in $names_this_round; do
7540 already_handled=
7541 for n in $names_already_handled; do
7542 if test "$n" = "$name"; then
7543 already_handled=yes
7544 break
7545 fi
7546 done
7547 if test -z "$already_handled"; then
7548 names_already_handled="$names_already_handled $name"
7549 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7550 eval value=\"\$HAVE_LIB$uppername\"
7551 if test -n "$value"; then
7552 if test "$value" = yes; then
7553 eval value=\"\$LIB$uppername\"
7554 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7555 eval value=\"\$LTLIB$uppername\"
7556 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7557 else
7558 :
7559 fi
7560 else
7561 found_dir=
7562 found_la=
7563 found_so=
7564 found_a=
7565 if test $use_additional = yes; then
7566 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7567 found_dir="$additional_libdir"
7568 found_so="$additional_libdir/lib$name.$shlibext"
7569 if test -f "$additional_libdir/lib$name.la"; then
7570 found_la="$additional_libdir/lib$name.la"
7571 fi
7572 else
7573 if test -f "$additional_libdir/lib$name.$libext"; then
7574 found_dir="$additional_libdir"
7575 found_a="$additional_libdir/lib$name.$libext"
7576 if test -f "$additional_libdir/lib$name.la"; then
7577 found_la="$additional_libdir/lib$name.la"
7578 fi
7579 fi
7580 fi
7581 fi
7582 if test "X$found_dir" = "X"; then
7583 for x in $LDFLAGS $LTLIBEXPAT; do
7584
7585 acl_save_prefix="$prefix"
7586 prefix="$acl_final_prefix"
7587 acl_save_exec_prefix="$exec_prefix"
7588 exec_prefix="$acl_final_exec_prefix"
7589 eval x=\"$x\"
7590 exec_prefix="$acl_save_exec_prefix"
7591 prefix="$acl_save_prefix"
7592
7593 case "$x" in
7594 -L*)
7595 dir=`echo "X$x" | sed -e 's/^X-L//'`
7596 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7597 found_dir="$dir"
7598 found_so="$dir/lib$name.$shlibext"
7599 if test -f "$dir/lib$name.la"; then
7600 found_la="$dir/lib$name.la"
7601 fi
7602 else
7603 if test -f "$dir/lib$name.$libext"; then
7604 found_dir="$dir"
7605 found_a="$dir/lib$name.$libext"
7606 if test -f "$dir/lib$name.la"; then
7607 found_la="$dir/lib$name.la"
7608 fi
7609 fi
7610 fi
7611 ;;
7612 esac
7613 if test "X$found_dir" != "X"; then
7614 break
7615 fi
7616 done
7617 fi
7618 if test "X$found_dir" != "X"; then
7619 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7620 if test "X$found_so" != "X"; then
7621 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7622 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7623 else
7624 haveit=
7625 for x in $ltrpathdirs; do
7626 if test "X$x" = "X$found_dir"; then
7627 haveit=yes
7628 break
7629 fi
7630 done
7631 if test -z "$haveit"; then
7632 ltrpathdirs="$ltrpathdirs $found_dir"
7633 fi
7634 if test "$hardcode_direct" = yes; then
7635 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7636 else
7637 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7638 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7639 haveit=
7640 for x in $rpathdirs; do
7641 if test "X$x" = "X$found_dir"; then
7642 haveit=yes
7643 break
7644 fi
7645 done
7646 if test -z "$haveit"; then
7647 rpathdirs="$rpathdirs $found_dir"
7648 fi
7649 else
7650 haveit=
7651 for x in $LDFLAGS $LIBEXPAT; do
7652
7653 acl_save_prefix="$prefix"
7654 prefix="$acl_final_prefix"
7655 acl_save_exec_prefix="$exec_prefix"
7656 exec_prefix="$acl_final_exec_prefix"
7657 eval x=\"$x\"
7658 exec_prefix="$acl_save_exec_prefix"
7659 prefix="$acl_save_prefix"
7660
7661 if test "X$x" = "X-L$found_dir"; then
7662 haveit=yes
7663 break
7664 fi
7665 done
7666 if test -z "$haveit"; then
7667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7668 fi
7669 if test "$hardcode_minus_L" != no; then
7670 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7671 else
7672 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7673 fi
7674 fi
7675 fi
7676 fi
7677 else
7678 if test "X$found_a" != "X"; then
7679 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7680 else
7681 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7682 fi
7683 fi
7684 additional_includedir=
7685 case "$found_dir" in
7686 */lib | */lib/)
7687 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7688 additional_includedir="$basedir/include"
7689 ;;
7690 esac
7691 if test "X$additional_includedir" != "X"; then
7692 if test "X$additional_includedir" != "X/usr/include"; then
7693 haveit=
7694 if test "X$additional_includedir" = "X/usr/local/include"; then
7695 if test -n "$GCC"; then
7696 case $host_os in
7697 linux*) haveit=yes;;
7698 esac
7699 fi
7700 fi
7701 if test -z "$haveit"; then
7702 for x in $CPPFLAGS $INCEXPAT; do
7703
7704 acl_save_prefix="$prefix"
7705 prefix="$acl_final_prefix"
7706 acl_save_exec_prefix="$exec_prefix"
7707 exec_prefix="$acl_final_exec_prefix"
7708 eval x=\"$x\"
7709 exec_prefix="$acl_save_exec_prefix"
7710 prefix="$acl_save_prefix"
7711
7712 if test "X$x" = "X-I$additional_includedir"; then
7713 haveit=yes
7714 break
7715 fi
7716 done
7717 if test -z "$haveit"; then
7718 if test -d "$additional_includedir"; then
7719 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7720 fi
7721 fi
7722 fi
7723 fi
7724 fi
7725 if test -n "$found_la"; then
7726 save_libdir="$libdir"
7727 case "$found_la" in
7728 */* | *\\*) . "$found_la" ;;
7729 *) . "./$found_la" ;;
7730 esac
7731 libdir="$save_libdir"
7732 for dep in $dependency_libs; do
7733 case "$dep" in
7734 -L*)
7735 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7736 if test "X$additional_libdir" != "X/usr/lib"; then
7737 haveit=
7738 if test "X$additional_libdir" = "X/usr/local/lib"; then
7739 if test -n "$GCC"; then
7740 case $host_os in
7741 linux*) haveit=yes;;
7742 esac
7743 fi
7744 fi
7745 if test -z "$haveit"; then
7746 haveit=
7747 for x in $LDFLAGS $LIBEXPAT; do
7748
7749 acl_save_prefix="$prefix"
7750 prefix="$acl_final_prefix"
7751 acl_save_exec_prefix="$exec_prefix"
7752 exec_prefix="$acl_final_exec_prefix"
7753 eval x=\"$x\"
7754 exec_prefix="$acl_save_exec_prefix"
7755 prefix="$acl_save_prefix"
7756
7757 if test "X$x" = "X-L$additional_libdir"; then
7758 haveit=yes
7759 break
7760 fi
7761 done
7762 if test -z "$haveit"; then
7763 if test -d "$additional_libdir"; then
7764 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7765 fi
7766 fi
7767 haveit=
7768 for x in $LDFLAGS $LTLIBEXPAT; do
7769
7770 acl_save_prefix="$prefix"
7771 prefix="$acl_final_prefix"
7772 acl_save_exec_prefix="$exec_prefix"
7773 exec_prefix="$acl_final_exec_prefix"
7774 eval x=\"$x\"
7775 exec_prefix="$acl_save_exec_prefix"
7776 prefix="$acl_save_prefix"
7777
7778 if test "X$x" = "X-L$additional_libdir"; then
7779 haveit=yes
7780 break
7781 fi
7782 done
7783 if test -z "$haveit"; then
7784 if test -d "$additional_libdir"; then
7785 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7786 fi
7787 fi
7788 fi
7789 fi
7790 ;;
7791 -R*)
7792 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7793 if test "$enable_rpath" != no; then
7794 haveit=
7795 for x in $rpathdirs; do
7796 if test "X$x" = "X$dir"; then
7797 haveit=yes
7798 break
7799 fi
7800 done
7801 if test -z "$haveit"; then
7802 rpathdirs="$rpathdirs $dir"
7803 fi
7804 haveit=
7805 for x in $ltrpathdirs; do
7806 if test "X$x" = "X$dir"; then
7807 haveit=yes
7808 break
7809 fi
7810 done
7811 if test -z "$haveit"; then
7812 ltrpathdirs="$ltrpathdirs $dir"
7813 fi
7814 fi
7815 ;;
7816 -l*)
7817 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7818 ;;
7819 *.la)
7820 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7821 ;;
7822 *)
7823 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7824 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7825 ;;
81ecdfbb
RW
7826 esac
7827 done
7828 fi
7829 else
7830 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7831 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7832 fi
7833 fi
7834 fi
7835 done
7836 done
7837 if test "X$rpathdirs" != "X"; then
7838 if test -n "$hardcode_libdir_separator"; then
7839 alldirs=
7840 for found_dir in $rpathdirs; do
7841 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7842 done
7843 acl_save_libdir="$libdir"
7844 libdir="$alldirs"
7845 eval flag=\"$hardcode_libdir_flag_spec\"
7846 libdir="$acl_save_libdir"
7847 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7848 else
7849 for found_dir in $rpathdirs; do
7850 acl_save_libdir="$libdir"
7851 libdir="$found_dir"
7852 eval flag=\"$hardcode_libdir_flag_spec\"
7853 libdir="$acl_save_libdir"
7854 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7855 done
7856 fi
7857 fi
7858 if test "X$ltrpathdirs" != "X"; then
7859 for found_dir in $ltrpathdirs; do
7860 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7861 done
7862 fi
a9322a30
TT
7863
7864
81ecdfbb 7865 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7866
81ecdfbb
RW
7867 for element in $INCEXPAT; do
7868 haveit=
7869 for x in $CPPFLAGS; do
a9322a30 7870
81ecdfbb
RW
7871 acl_save_prefix="$prefix"
7872 prefix="$acl_final_prefix"
7873 acl_save_exec_prefix="$exec_prefix"
7874 exec_prefix="$acl_final_exec_prefix"
7875 eval x=\"$x\"
7876 exec_prefix="$acl_save_exec_prefix"
7877 prefix="$acl_save_prefix"
a8111142 7878
81ecdfbb
RW
7879 if test "X$x" = "X$element"; then
7880 haveit=yes
7881 break
7882 fi
7883 done
7884 if test -z "$haveit"; then
7885 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7886 fi
7887 done
a9322a30
TT
7888
7889
81ecdfbb
RW
7890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7891$as_echo_n "checking for libexpat... " >&6; }
7892if test "${ac_cv_libexpat+set}" = set; then :
7893 $as_echo_n "(cached) " >&6
bec39cab 7894else
bec39cab 7895
81ecdfbb
RW
7896 ac_save_LIBS="$LIBS"
7897 LIBS="$LIBS $LIBEXPAT"
7898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7899/* end confdefs.h. */
81ecdfbb
RW
7900#include "expat.h"
7901int
7902main ()
7903{
7904XML_Parser p = XML_ParserCreate (0);
7905 ;
7906 return 0;
7907}
bec39cab 7908_ACEOF
81ecdfbb
RW
7909if ac_fn_c_try_link "$LINENO"; then :
7910 ac_cv_libexpat=yes
c906108c 7911else
81ecdfbb 7912 ac_cv_libexpat=no
bec39cab 7913fi
81ecdfbb
RW
7914rm -f core conftest.err conftest.$ac_objext \
7915 conftest$ac_exeext conftest.$ac_ext
7916 LIBS="$ac_save_LIBS"
c906108c 7917
95ca63c4 7918fi
81ecdfbb
RW
7919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7920$as_echo "$ac_cv_libexpat" >&6; }
7921 if test "$ac_cv_libexpat" = yes; then
7922 HAVE_LIBEXPAT=yes
bec39cab 7923
81ecdfbb 7924$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7925
81ecdfbb
RW
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7927$as_echo_n "checking how to link with libexpat... " >&6; }
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7929$as_echo "$LIBEXPAT" >&6; }
7930 else
7931 HAVE_LIBEXPAT=no
7932 CPPFLAGS="$ac_save_CPPFLAGS"
7933 LIBEXPAT=
7934 LTLIBEXPAT=
7935 fi
95ca63c4
CF
7936
7937
7938
7cb9022a
MK
7939
7940
bec39cab 7941
81ecdfbb
RW
7942 if test "$HAVE_LIBEXPAT" != yes; then
7943 if test "$with_expat" = yes; then
7944 as_fn_error "expat is missing or unusable" "$LINENO" 5
7945 else
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7947$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7948 fi
7949 else
7950 save_LIBS=$LIBS
7951 LIBS="$LIBS $LIBEXPAT"
7952 for ac_func in XML_StopParser
7953do :
7954 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7955if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7956 cat >>confdefs.h <<_ACEOF
81ecdfbb 7957#define HAVE_XML_STOPPARSER 1
bec39cab 7958_ACEOF
95ca63c4 7959
bec39cab 7960fi
bec39cab 7961done
95ca63c4 7962
81ecdfbb
RW
7963 LIBS=$save_LIBS
7964 fi
a9322a30
TT
7965fi
7966
a9322a30 7967
a9322a30
TT
7968
7969
ec685c5e 7970
0c4a4063 7971
81ecdfbb
RW
7972# Check whether --with-python was given.
7973if test "${with_python+set}" = set; then :
7974 withval=$with_python;
bec39cab 7975else
81ecdfbb 7976 with_python=auto
bec39cab 7977fi
bec39cab 7978
81ecdfbb
RW
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7980$as_echo_n "checking whether to use python... " >&6; }
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7982$as_echo "$with_python" >&6; }
9a156167 7983
81ecdfbb
RW
7984if test "${with_python}" = no; then
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7986$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7987 have_libpython=no
bec39cab 7988else
81ecdfbb 7989 case "${with_python}" in
8c85a4e2 7990 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7991 if test -d ${with_python}; then
7992 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7993 python_prog="${with_python}/bin/python"
0c4a4063 7994 python_prefix=
9c4ea6c5
JB
7995 # If python does not exit ${with_python}/bin, then try in
7996 # ${with_python}. On Windows/MinGW, this is where the Python
7997 # executable is.
7998 if test ! -x "${python_prog}"; then
7999 python_prog="${with_python}/python"
8000 python_prefix=
8001 fi
e7a30f46 8002 if test ! -x "${python_prog}"; then
ec685c5e
DE
8003 # Fall back to gdb 7.0/7.1 behaviour.
8004 python_prog=missing
0c4a4063 8005 python_prefix=${with_python}
ec685c5e 8006 fi
e7a30f46 8007 elif test -x "${with_python}"; then
ec685c5e
DE
8008 # While we can't run python compiled for $host (unless host == build),
8009 # the user could write a script that provides the needed information,
8010 # so we support that.
ec685c5e 8011 python_prog=${with_python}
0c4a4063 8012 python_prefix=
ec685c5e
DE
8013 else
8014 as_fn_error "invalid value for --with-python" "$LINENO" 5
8015 fi
81ecdfbb 8016 ;;
ec685c5e
DE
8017 */*)
8018 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8019 as_fn_error "invalid value for --with-python" "$LINENO" 5
8020 ;;
ec685c5e
DE
8021 *)
8022 # The user has either specified auto, yes, or the name of the python
8023 # program assumed to be in $PATH.
8024 python_prefix=
8025 case "${with_python}" in
8026 yes | auto)
8027 if test ${build} = ${host}; then
8028 # Extract the first word of "python", so it can be a program name with args.
8029set dummy python; ac_word=$2
8030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8031$as_echo_n "checking for $ac_word... " >&6; }
8032if test "${ac_cv_path_python_prog_path+set}" = set; then :
8033 $as_echo_n "(cached) " >&6
8034else
8035 case $python_prog_path in
8036 [\\/]* | ?:[\\/]*)
8037 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8038 ;;
8039 *)
8040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8041for as_dir in $PATH
8042do
8043 IFS=$as_save_IFS
8044 test -z "$as_dir" && as_dir=.
8045 for ac_exec_ext in '' $ac_executable_extensions; do
8046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8047 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8049 break 2
8050 fi
8051done
8052 done
8053IFS=$as_save_IFS
8054
8055 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8056 ;;
8057esac
8058fi
8059python_prog_path=$ac_cv_path_python_prog_path
8060if test -n "$python_prog_path"; then
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8062$as_echo "$python_prog_path" >&6; }
8063else
8064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069 if test "${python_prog_path}" = missing; then
8070 python_prog=missing
8071 else
8072 python_prog=${python_prog_path}
8073 fi
8074 else
8075 # Not much we can do except assume the cross-compiler will find the
8076 # right files.
8077 python_prog=missing
8078 fi
8079 ;;
8080 *)
8081 # While we can't run python compiled for $host (unless host == build),
8082 # the user could write a script that provides the needed information,
8083 # so we support that.
8084 python_prog="${with_python}"
8085 # Extract the first word of "${python_prog}", so it can be a program name with args.
8086set dummy ${python_prog}; ac_word=$2
8087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8088$as_echo_n "checking for $ac_word... " >&6; }
8089if test "${ac_cv_path_python_prog_path+set}" = set; then :
8090 $as_echo_n "(cached) " >&6
8091else
8092 case $python_prog_path in
8093 [\\/]* | ?:[\\/]*)
8094 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8095 ;;
8096 *)
8097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098for as_dir in $PATH
8099do
8100 IFS=$as_save_IFS
8101 test -z "$as_dir" && as_dir=.
8102 for ac_exec_ext in '' $ac_executable_extensions; do
8103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8104 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106 break 2
8107 fi
8108done
8109 done
8110IFS=$as_save_IFS
8111
8112 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8113 ;;
8114esac
8115fi
8116python_prog_path=$ac_cv_path_python_prog_path
8117if test -n "$python_prog_path"; then
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8119$as_echo "$python_prog_path" >&6; }
8120else
8121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8122$as_echo "no" >&6; }
8123fi
8124
8125
8126 if test "${python_prog_path}" = missing; then
8127 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8128 fi
8129 ;;
8130 esac
81ecdfbb
RW
8131 esac
8132
ec685c5e 8133 if test "${python_prog}" != missing; then
e7a30f46
DE
8134 # We have a python program to use, but it may be too old.
8135 # Don't flag an error for --with-python=auto (the default).
8136 have_python_config=yes
ec685c5e
DE
8137 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8138 if test $? != 0; then
e7a30f46
DE
8139 have_python_config=failed
8140 if test "${with_python}" != auto; then
8141 as_fn_error "failure running python-config --includes" "$LINENO" 5
8142 fi
ec685c5e
DE
8143 fi
8144 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8145 if test $? != 0; then
e7a30f46
DE
8146 have_python_config=failed
8147 if test "${with_python}" != auto; then
8148 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8149 fi
ec685c5e 8150 fi
0c4a4063
DE
8151 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8152 if test $? != 0; then
e7a30f46
DE
8153 have_python_config=failed
8154 if test "${with_python}" != auto; then
8155 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8156 fi
0c4a4063 8157 fi
ec685c5e 8158 else
ac534cba
JB
8159 # We do not have a python executable we can use to determine where
8160 # to find the Python headers and libs. We cannot guess the include
8161 # path from the python_prefix either, because that include path
8162 # depends on the Python version. So, there is nothing much we can
8163 # do except assume that the compiler will be able to find those files.
8164 python_includes=
8165 python_libs=
0c4a4063 8166 have_python_config=no
ec685c5e 8167 fi
bec39cab 8168
ec685c5e
DE
8169 # If we have python-config, only try the configuration it provides.
8170 # Otherwise fallback on the old way of trying different versions of
8171 # python in turn.
81ecdfbb 8172
ec685c5e
DE
8173 have_libpython=no
8174 if test "${have_python_config}" = yes; then
c1039e3c
JB
8175 # Determine the Python version by extracting "-lpython<version>"
8176 # part of the python_libs. <version> is usually X.Y with X and Y
8177 # being decimal numbers, but can also be XY (seen on Windows).
8178 #
8179 # The extraction is performed using sed with a regular expression.
8180 # Initially, the regexp used was using the '?' quantifier to make
8181 # the dot in the version number optional. Unfortunately, this
8182 # does not work with non-GNU versions of sed because, because of
8183 # what looks like a limitation (the '?' quantifier does not work
8184 # with back-references). We work around this limitation by using
8185 # the '*' quantifier instead. It means that, in theory, we might
8186 # match unexpected version strings such as "-lpython2..7", but
8187 # this seems unlikely in practice. And even if that happens,
8188 # an error will be triggered later on, when checking that version
8189 # number.
ec685c5e 8190 python_version=`echo " ${python_libs} " \
c1039e3c 8191 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8192 case "${python_version}" in
8193 python*)
ec685c5e
DE
8194
8195 version=${python_version}
8196
8197 new_CPPFLAGS=${python_includes}
8198 new_LIBS=${python_libs}
81ecdfbb
RW
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8200$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8201 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8202 save_LIBS=$LIBS
ec685c5e
DE
8203 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8204 LIBS="$LIBS $new_LIBS"
8205 found_usable_python=no
81ecdfbb 8206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8207/* end confdefs.h. */
ac534cba 8208#include "Python.h"
81ecdfbb
RW
8209int
8210main ()
8211{
8212Py_Initialize ();
8213 ;
8214 return 0;
8215}
bec39cab 8216_ACEOF
81ecdfbb 8217if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8218 have_libpython=${version}
8219 found_usable_python=yes
ac534cba
JB
8220 PYTHON_CPPFLAGS=$new_CPPFLAGS
8221 PYTHON_LIBS=$new_LIBS
9a156167 8222fi
81ecdfbb
RW
8223rm -f core conftest.err conftest.$ac_objext \
8224 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8225 CPPFLAGS=$save_CPPFLAGS
8226 LIBS=$save_LIBS
ec685c5e
DE
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8228$as_echo "${found_usable_python}" >&6; }
9a156167 8229
0c4a4063
DE
8230 ;;
8231 *)
ec685c5e 8232 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8233 ;;
8234 esac
e7a30f46 8235 elif test "${have_python_config}" != failed; then
ec685c5e 8236 if test "${have_libpython}" = no; then
9a156167 8237
420697bb
TT
8238 version=python2.7
8239
8240 new_CPPFLAGS=${python_includes}
8241 new_LIBS="${python_libs} -lpython2.7"
8242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8243$as_echo_n "checking for ${version}... " >&6; }
8244 save_CPPFLAGS=$CPPFLAGS
8245 save_LIBS=$LIBS
8246 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8247 LIBS="$LIBS $new_LIBS"
8248 found_usable_python=no
8249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8250/* end confdefs.h. */
ac534cba 8251#include "Python.h"
420697bb
TT
8252int
8253main ()
8254{
8255Py_Initialize ();
8256 ;
8257 return 0;
8258}
8259_ACEOF
8260if ac_fn_c_try_link "$LINENO"; then :
8261 have_libpython=${version}
8262 found_usable_python=yes
ac534cba
JB
8263 PYTHON_CPPFLAGS=$new_CPPFLAGS
8264 PYTHON_LIBS=$new_LIBS
420697bb
TT
8265fi
8266rm -f core conftest.err conftest.$ac_objext \
8267 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8268 CPPFLAGS=$save_CPPFLAGS
8269 LIBS=$save_LIBS
420697bb
TT
8270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8271$as_echo "${found_usable_python}" >&6; }
8272
8273 fi
8274 if test "${have_libpython}" = no; then
8275
ec685c5e
DE
8276 version=python2.6
8277
8278 new_CPPFLAGS=${python_includes}
8279 new_LIBS="${python_libs} -lpython2.6"
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8281$as_echo_n "checking for ${version}... " >&6; }
8282 save_CPPFLAGS=$CPPFLAGS
8283 save_LIBS=$LIBS
8284 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8285 LIBS="$LIBS $new_LIBS"
8286 found_usable_python=no
8287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8288/* end confdefs.h. */
ac534cba 8289#include "Python.h"
ec685c5e
DE
8290int
8291main ()
8292{
8293Py_Initialize ();
8294 ;
8295 return 0;
8296}
8297_ACEOF
8298if ac_fn_c_try_link "$LINENO"; then :
8299 have_libpython=${version}
8300 found_usable_python=yes
ac534cba
JB
8301 PYTHON_CPPFLAGS=$new_CPPFLAGS
8302 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8303fi
8304rm -f core conftest.err conftest.$ac_objext \
8305 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8306 CPPFLAGS=$save_CPPFLAGS
8307 LIBS=$save_LIBS
ec685c5e
DE
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8309$as_echo "${found_usable_python}" >&6; }
9a156167 8310
81ecdfbb 8311 fi
ec685c5e 8312 if test ${have_libpython} = no; then
9a156167 8313
81ecdfbb 8314 version=python2.5
9a156167 8315
ec685c5e
DE
8316 new_CPPFLAGS=${python_includes}
8317 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8319$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8320 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8321 save_LIBS=$LIBS
ec685c5e
DE
8322 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8323 LIBS="$LIBS $new_LIBS"
8324 found_usable_python=no
81ecdfbb 8325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8326/* end confdefs.h. */
ac534cba 8327#include "Python.h"
81ecdfbb
RW
8328int
8329main ()
8330{
8331Py_Initialize ();
8332 ;
8333 return 0;
8334}
436868fb 8335_ACEOF
81ecdfbb 8336if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8337 have_libpython=${version}
8338 found_usable_python=yes
ac534cba
JB
8339 PYTHON_CPPFLAGS=$new_CPPFLAGS
8340 PYTHON_LIBS=$new_LIBS
436868fb 8341fi
81ecdfbb
RW
8342rm -f core conftest.err conftest.$ac_objext \
8343 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8344 CPPFLAGS=$save_CPPFLAGS
8345 LIBS=$save_LIBS
ec685c5e
DE
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8347$as_echo "${found_usable_python}" >&6; }
a9322a30 8348
81ecdfbb 8349 fi
ec685c5e 8350 if test ${have_libpython} = no; then
a9322a30 8351
81ecdfbb 8352 version=python2.4
a9322a30 8353
ec685c5e
DE
8354 new_CPPFLAGS=${python_includes}
8355 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8357$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8358 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8359 save_LIBS=$LIBS
ec685c5e
DE
8360 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8361 LIBS="$LIBS $new_LIBS"
8362 found_usable_python=no
81ecdfbb 8363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8364/* end confdefs.h. */
ac534cba 8365#include "Python.h"
a9322a30
TT
8366int
8367main ()
8368{
81ecdfbb 8369Py_Initialize ();
a9322a30
TT
8370 ;
8371 return 0;
8372}
436868fb 8373_ACEOF
81ecdfbb 8374if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8375 have_libpython=${version}
8376 found_usable_python=yes
ac534cba
JB
8377 PYTHON_CPPFLAGS=$new_CPPFLAGS
8378 PYTHON_LIBS=$new_LIBS
436868fb 8379fi
81ecdfbb
RW
8380rm -f core conftest.err conftest.$ac_objext \
8381 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8382 CPPFLAGS=$save_CPPFLAGS
8383 LIBS=$save_LIBS
ec685c5e
DE
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8385$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8386
ec685c5e
DE
8387 fi
8388 fi
9c4ea6c5 8389 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8390
8391$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8392
9c4ea6c5 8393 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8394
8395$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8396
9c4ea6c5 8397 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8398
8399$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8400
9c4ea6c5 8401 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8402
8403$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8404
81ecdfbb 8405 fi
ec685c5e
DE
8406
8407 if test "${have_libpython}" = no; then
81ecdfbb
RW
8408 case "${with_python}" in
8409 yes)
8410 as_fn_error "python is missing or unusable" "$LINENO" 5
8411 ;;
8412 auto)
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8414$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8415 ;;
8416 *)
8417 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8418 ;;
8419 esac
0c4a4063
DE
8420 else
8421 if test -n "${python_prefix}"; then
8422
8423cat >>confdefs.h <<_ACEOF
8424#define WITH_PYTHON_PATH "${python_prefix}"
8425_ACEOF
8426
8427
8428 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8429 if test "x$prefix" = xNONE; then
8430 test_prefix=/usr/local
8431 else
8432 test_prefix=$prefix
8433 fi
8434 else
8435 test_prefix=$exec_prefix
8436 fi
8437 value=0
8438 case ${python_prefix} in
8439 "${test_prefix}"|"${test_prefix}/"*|\
8440 '${exec_prefix}'|'${exec_prefix}/'*)
8441 value=1
8442 ;;
8443 esac
8444
8445cat >>confdefs.h <<_ACEOF
8446#define PYTHON_PATH_RELOCATABLE $value
8447_ACEOF
8448
8449
8450 fi
81ecdfbb 8451 fi
436868fb 8452fi
436868fb 8453
ec685c5e 8454if test "${have_libpython}" != no; then
436868fb 8455
81ecdfbb 8456$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8457
81ecdfbb
RW
8458 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8459 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8460 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8461 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8462 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8463
81ecdfbb
RW
8464 # Flags needed to compile Python code (taken from python-config --cflags).
8465 # We cannot call python-config directly because it will output whatever was
8466 # used when compiling the Python interpreter itself, including flags which
8467 # would make the python-related objects be compiled differently from the
8468 # rest of GDB (e.g., -O2 and -fPIC).
8469 if test "${GCC}" = yes; then
8470 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8471 fi
436868fb 8472
81ecdfbb
RW
8473 if test "x${tentative_python_cflags}" != x; then
8474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8475$as_echo_n "checking compiler flags for python code... " >&6; }
8476 for flag in ${tentative_python_cflags}; do
8477 # Check that the compiler accepts it
8478 saved_CFLAGS="$CFLAGS"
8479 CFLAGS="$CFLAGS $flag"
8480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8481/* end confdefs.h. */
81ecdfbb 8482
a9322a30
TT
8483int
8484main ()
8485{
a9322a30
TT
8486
8487 ;
8488 return 0;
8489}
bec39cab 8490_ACEOF
81ecdfbb
RW
8491if ac_fn_c_try_compile "$LINENO"; then :
8492 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8493fi
81ecdfbb
RW
8494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8495 CFLAGS="$saved_CFLAGS"
8496 done
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8498$as_echo "${PYTHON_CFLAGS}" >&6; }
8499 fi
043b6510
JB
8500
8501 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8502 # #if _SGIAPI
8503 # #define siginfo __siginfo
8504 # #endif
8505 # The problem is that including Python causes some XOPEN macros to be
8506 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8507 # to false. So, we work around this issue by defining siginfo ourself
8508 # though the command-line.
c83393b9
JB
8509 #
8510 # On x64 Windows, Python's include headers, and pyconfig.h in
8511 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8512 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8513 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8514 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8515 # The issue was reported to the Python community, but still isn't
8516 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8517
043b6510
JB
8518 case "$gdb_host" in
8519 irix*) if test "${GCC}" = yes; then
8520 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8521 fi
8522 ;;
c83393b9
JB
8523 mingw64)
8524 if test "${GCC}" = yes; then
8525 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8526 fi
8527 ;;
043b6510 8528 esac
a8db4212
YPK
8529
8530 # Note that "python -m threading" cannot be used to check for
8531 # threading support due to a bug in Python 2.7.3
8532 # (http://bugs.python.org/issue15567).
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8534$as_echo_n "checking whether python supports threads... " >&6; }
8535 saved_CPPFLAGS="${CPPFLAGS}"
8536 CPPFLAGS="${PYTHON_CPPFLAGS}"
8537 # Note that the test is reversed so that python_has_threads=yes on
8538 # unexpected failures.
8539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8540/* end confdefs.h. */
8541
8542#include <Python.h>
8543#ifdef WITH_THREAD
8544# error
8545#endif
8546
8547_ACEOF
8548if ac_fn_c_try_cpp "$LINENO"; then :
8549 python_has_threads=no
8550else
8551 python_has_threads=yes
8552fi
8553rm -f conftest.err conftest.$ac_ext
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8555$as_echo "${python_has_threads}" >&6; }
8556 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb
RW
8557else
8558 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8559 # included.
8560 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8561 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8562 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8563fi
9a156167 8564
9a156167 8565
ac534cba
JB
8566
8567
a8db4212
YPK
8568# Provide a --enable-libmcheck/--disable-libmcheck set of options
8569# allowing a user to enable this option even when building releases,
8570# or to disable it when building a snapshot.
8571# Check whether --enable-libmcheck was given.
8572if test "${enable_libmcheck+set}" = set; then :
8573 enableval=$enable_libmcheck; case "${enableval}" in
8574 yes | y) ENABLE_LIBMCHECK="yes" ;;
8575 no | n) ENABLE_LIBMCHECK="no" ;;
8576 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
8577 esac
8578fi
8579
8580
8581# Enable -lmcheck by default (it provides cheap-enough memory mangling),
8582# but turn it off if Python is enabled with threads, since -lmcheck is
8583# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
8584# and for releases.
8585if test -z "${ENABLE_LIBMCHECK}" \
8586 -a \( "${have_libpython}" = "no" \
8587 -o "${python_has_threads}" = "no" \) \
8588 && $development; then
8589 ENABLE_LIBMCHECK=yes
8590fi
8591
8592if test "$ENABLE_LIBMCHECK" = "yes" ; then
8593 if test "${have_libpython}" != "no" -a "${python_has_threads}" = "yes" ; then
8594 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
8595$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
8596 fi
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
8598$as_echo_n "checking for main in -lmcheck... " >&6; }
8599if test "${ac_cv_lib_mcheck_main+set}" = set; then :
8600 $as_echo_n "(cached) " >&6
8601else
8602 ac_check_lib_save_LIBS=$LIBS
8603LIBS="-lmcheck $LIBS"
8604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8605/* end confdefs.h. */
8606
8607
8608int
8609main ()
8610{
8611return main ();
8612 ;
8613 return 0;
8614}
8615_ACEOF
8616if ac_fn_c_try_link "$LINENO"; then :
8617 ac_cv_lib_mcheck_main=yes
8618else
8619 ac_cv_lib_mcheck_main=no
8620fi
8621rm -f core conftest.err conftest.$ac_objext \
8622 conftest$ac_exeext conftest.$ac_ext
8623LIBS=$ac_check_lib_save_LIBS
8624fi
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
8626$as_echo "$ac_cv_lib_mcheck_main" >&6; }
8627if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
8628 cat >>confdefs.h <<_ACEOF
8629#define HAVE_LIBMCHECK 1
8630_ACEOF
8631
8632 LIBS="-lmcheck $LIBS"
8633
8634fi
8635
8636fi
8637
81ecdfbb
RW
8638# ------------------------- #
8639# Checks for header files. #
8640# ------------------------- #
c890192f 8641
81ecdfbb
RW
8642ac_header_dirent=no
8643for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8644 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8646$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8647if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8648 $as_echo_n "(cached) " >&6
bec39cab 8649else
81ecdfbb 8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8651/* end confdefs.h. */
81ecdfbb
RW
8652#include <sys/types.h>
8653#include <$ac_hdr>
8654
a9322a30
TT
8655int
8656main ()
8657{
81ecdfbb
RW
8658if ((DIR *) 0)
8659return 0;
a9322a30
TT
8660 ;
8661 return 0;
8662}
bec39cab 8663_ACEOF
81ecdfbb
RW
8664if ac_fn_c_try_compile "$LINENO"; then :
8665 eval "$as_ac_Header=yes"
bec39cab 8666else
81ecdfbb 8667 eval "$as_ac_Header=no"
bec39cab 8668fi
81ecdfbb 8669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8670fi
81ecdfbb
RW
8671eval ac_res=\$$as_ac_Header
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8673$as_echo "$ac_res" >&6; }
8674eval as_val=\$$as_ac_Header
8675 if test "x$as_val" = x""yes; then :
8676 cat >>confdefs.h <<_ACEOF
8677#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8678_ACEOF
bec39cab 8679
81ecdfbb
RW
8680ac_header_dirent=$ac_hdr; break
8681fi
bec39cab 8682
81ecdfbb
RW
8683done
8684# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8685if test $ac_header_dirent = dirent.h; then
8686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8687$as_echo_n "checking for library containing opendir... " >&6; }
8688if test "${ac_cv_search_opendir+set}" = set; then :
8689 $as_echo_n "(cached) " >&6
c890192f 8690else
81ecdfbb
RW
8691 ac_func_search_save_LIBS=$LIBS
8692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8693/* end confdefs.h. */
8694
8695/* Override any GCC internal prototype to avoid an error.
8696 Use char because int might match the return type of a GCC
8697 builtin and then its argument prototype would still apply. */
8698#ifdef __cplusplus
8699extern "C"
8700#endif
8701char opendir ();
8702int
8703main ()
8704{
8705return opendir ();
8706 ;
8707 return 0;
8708}
bec39cab 8709_ACEOF
81ecdfbb
RW
8710for ac_lib in '' dir; do
8711 if test -z "$ac_lib"; then
8712 ac_res="none required"
8713 else
8714 ac_res=-l$ac_lib
8715 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8716 fi
8717 if ac_fn_c_try_link "$LINENO"; then :
8718 ac_cv_search_opendir=$ac_res
8719fi
8720rm -f core conftest.err conftest.$ac_objext \
8721 conftest$ac_exeext
8722 if test "${ac_cv_search_opendir+set}" = set; then :
8723 break
8724fi
8725done
8726if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8727
81ecdfbb
RW
8728else
8729 ac_cv_search_opendir=no
8730fi
8731rm conftest.$ac_ext
8732LIBS=$ac_func_search_save_LIBS
8733fi
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8735$as_echo "$ac_cv_search_opendir" >&6; }
8736ac_res=$ac_cv_search_opendir
8737if test "$ac_res" != no; then :
8738 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8739
bec39cab 8740fi
81ecdfbb 8741
bec39cab 8742else
81ecdfbb
RW
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8744$as_echo_n "checking for library containing opendir... " >&6; }
8745if test "${ac_cv_search_opendir+set}" = set; then :
8746 $as_echo_n "(cached) " >&6
8747else
8748 ac_func_search_save_LIBS=$LIBS
8749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8750/* end confdefs.h. */
81ecdfbb
RW
8751
8752/* Override any GCC internal prototype to avoid an error.
8753 Use char because int might match the return type of a GCC
8754 builtin and then its argument prototype would still apply. */
8755#ifdef __cplusplus
8756extern "C"
8757#endif
8758char opendir ();
a9322a30
TT
8759int
8760main ()
8761{
81ecdfbb 8762return opendir ();
a9322a30
TT
8763 ;
8764 return 0;
8765}
bec39cab 8766_ACEOF
81ecdfbb
RW
8767for ac_lib in '' x; do
8768 if test -z "$ac_lib"; then
8769 ac_res="none required"
8770 else
8771 ac_res=-l$ac_lib
8772 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8773 fi
8774 if ac_fn_c_try_link "$LINENO"; then :
8775 ac_cv_search_opendir=$ac_res
8776fi
8777rm -f core conftest.err conftest.$ac_objext \
8778 conftest$ac_exeext
8779 if test "${ac_cv_search_opendir+set}" = set; then :
8780 break
8781fi
8782done
8783if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8784
81ecdfbb
RW
8785else
8786 ac_cv_search_opendir=no
bec39cab 8787fi
81ecdfbb
RW
8788rm conftest.$ac_ext
8789LIBS=$ac_func_search_save_LIBS
a9322a30 8790fi
81ecdfbb
RW
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8792$as_echo "$ac_cv_search_opendir" >&6; }
8793ac_res=$ac_cv_search_opendir
8794if test "$ac_res" != no; then :
8795 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8796
81ecdfbb 8797fi
bec39cab 8798
81ecdfbb 8799fi
bec39cab 8800
81ecdfbb
RW
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8802$as_echo_n "checking for ANSI C header files... " >&6; }
8803if test "${ac_cv_header_stdc+set}" = set; then :
8804 $as_echo_n "(cached) " >&6
bec39cab 8805else
81ecdfbb 8806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8807/* end confdefs.h. */
81ecdfbb
RW
8808#include <stdlib.h>
8809#include <stdarg.h>
8810#include <string.h>
8811#include <float.h>
8812
a9322a30
TT
8813int
8814main ()
8815{
a9322a30
TT
8816
8817 ;
8818 return 0;
8819}
bec39cab 8820_ACEOF
81ecdfbb
RW
8821if ac_fn_c_try_compile "$LINENO"; then :
8822 ac_cv_header_stdc=yes
bec39cab 8823else
81ecdfbb 8824 ac_cv_header_stdc=no
a9322a30 8825fi
81ecdfbb 8826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8827
81ecdfbb
RW
8828if test $ac_cv_header_stdc = yes; then
8829 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8831/* end confdefs.h. */
8832#include <string.h>
bec39cab 8833
81ecdfbb
RW
8834_ACEOF
8835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8836 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8837
bec39cab 8838else
81ecdfbb
RW
8839 ac_cv_header_stdc=no
8840fi
8841rm -f conftest*
8842
8843fi
8844
8845if test $ac_cv_header_stdc = yes; then
8846 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8848/* end confdefs.h. */
8849#include <stdlib.h>
8850
bec39cab 8851_ACEOF
81ecdfbb
RW
8852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8853 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8854
81ecdfbb
RW
8855else
8856 ac_cv_header_stdc=no
8857fi
8858rm -f conftest*
bec39cab 8859
bec39cab 8860fi
81ecdfbb
RW
8861
8862if test $ac_cv_header_stdc = yes; then
8863 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8864 if test "$cross_compiling" = yes; then :
8865 :
bec39cab 8866else
81ecdfbb 8867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8868/* end confdefs.h. */
81ecdfbb
RW
8869#include <ctype.h>
8870#include <stdlib.h>
8871#if ((' ' & 0x0FF) == 0x020)
8872# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8873# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8874#else
8875# define ISLOWER(c) \
8876 (('a' <= (c) && (c) <= 'i') \
8877 || ('j' <= (c) && (c) <= 'r') \
8878 || ('s' <= (c) && (c) <= 'z'))
8879# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8880#endif
8881
8882#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8883int
8884main ()
8885{
81ecdfbb
RW
8886 int i;
8887 for (i = 0; i < 256; i++)
8888 if (XOR (islower (i), ISLOWER (i))
8889 || toupper (i) != TOUPPER (i))
8890 return 2;
a9322a30
TT
8891 return 0;
8892}
bec39cab 8893_ACEOF
81ecdfbb
RW
8894if ac_fn_c_try_run "$LINENO"; then :
8895
bec39cab 8896else
81ecdfbb
RW
8897 ac_cv_header_stdc=no
8898fi
8899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8900 conftest.$ac_objext conftest.beam conftest.$ac_ext
8901fi
bec39cab 8902
bec39cab 8903fi
a9322a30 8904fi
81ecdfbb
RW
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8906$as_echo "$ac_cv_header_stdc" >&6; }
8907if test $ac_cv_header_stdc = yes; then
bec39cab 8908
81ecdfbb 8909$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8910
81ecdfbb 8911fi
bec39cab 8912
81ecdfbb 8913# elf_hp.h is for HP/UX 64-bit shared library support.
8658d16d 8914for ac_header in nlist.h machine/reg.h poll.h sys/poll.h sys/socket.h proc_service.h \
8775fd2d 8915 thread_db.h signal.h stddef.h \
81ecdfbb
RW
8916 stdlib.h string.h memory.h strings.h sys/fault.h \
8917 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8918 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8919 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8920 sys/types.h sys/wait.h wait.h termios.h termio.h \
e68227b9 8921 sgtty.h unistd.h elf_hp.h locale.h \
614c279d 8922 dlfcn.h sys/un.h linux/perf_event.h
81ecdfbb
RW
8923do :
8924 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8925ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8926eval as_val=\$$as_ac_Header
8927 if test "x$as_val" = x""yes; then :
bec39cab 8928 cat >>confdefs.h <<_ACEOF
81ecdfbb 8929#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8930_ACEOF
c906108c 8931
bec39cab 8932fi
81ecdfbb
RW
8933
8934done
8935
8936for ac_header in link.h
8937do :
8938 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8939# include <sys/types.h>
8940#endif
8941#if HAVE_NLIST_H
8942# include <nlist.h>
a9322a30
TT
8943#endif
8944
81ecdfbb
RW
8945"
8946if test "x$ac_cv_header_link_h" = x""yes; then :
8947 cat >>confdefs.h <<_ACEOF
8948#define HAVE_LINK_H 1
bec39cab 8949_ACEOF
bec39cab 8950
a9322a30 8951fi
bec39cab 8952
81ecdfbb 8953done
c906108c 8954
81ecdfbb
RW
8955for ac_header in sys/proc.h
8956do :
8957 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8958# include <sys/param.h>
8959#endif
c906108c 8960
81ecdfbb
RW
8961"
8962if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8963 cat >>confdefs.h <<_ACEOF
81ecdfbb 8964#define HAVE_SYS_PROC_H 1
bec39cab 8965_ACEOF
5ee754fc 8966
bec39cab 8967fi
81ecdfbb
RW
8968
8969done
8970
8971for ac_header in sys/user.h
8972do :
8973 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8974# include <sys/param.h>
a9322a30
TT
8975#endif
8976
81ecdfbb
RW
8977"
8978if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8979 cat >>confdefs.h <<_ACEOF
8980#define HAVE_SYS_USER_H 1
bec39cab 8981_ACEOF
bec39cab 8982
a9322a30 8983fi
bec39cab 8984
81ecdfbb 8985done
5ee754fc 8986
5ee754fc 8987
81ecdfbb
RW
8988# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8989# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8990# think that we don't have <curses.h> if we're using GCC.
8991case $host_os in
8992 solaris2.[789])
8993 if test "$GCC" = yes; then
8994
8995$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8996
8997 fi ;;
8998esac
8999for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9000do :
9001 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9002ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9003eval as_val=\$$as_ac_Header
9004 if test "x$as_val" = x""yes; then :
bec39cab 9005 cat >>confdefs.h <<_ACEOF
81ecdfbb 9006#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9007_ACEOF
5ee754fc
MK
9008
9009fi
9010
81ecdfbb 9011done
bec39cab 9012
81ecdfbb
RW
9013for ac_header in term.h
9014do :
9015 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9016# include <curses.h>
9017#endif
bec39cab 9018
81ecdfbb
RW
9019"
9020if test "x$ac_cv_header_term_h" = x""yes; then :
9021 cat >>confdefs.h <<_ACEOF
9022#define HAVE_TERM_H 1
a8111142 9023_ACEOF
a8111142 9024
a8111142 9025fi
a8111142 9026
81ecdfbb 9027done
a8111142
TT
9028
9029
81ecdfbb
RW
9030# ------------------------- #
9031# Checks for declarations. #
9032# ------------------------- #
a9322a30 9033
81ecdfbb
RW
9034ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9035if test "x$ac_cv_have_decl_free" = x""yes; then :
9036 ac_have_decl=1
bec39cab 9037else
81ecdfbb
RW
9038 ac_have_decl=0
9039fi
9040
9041cat >>confdefs.h <<_ACEOF
9042#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9043_ACEOF
81ecdfbb
RW
9044ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9045if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9046 ac_have_decl=1
9047else
9048 ac_have_decl=0
9049fi
9050
9051cat >>confdefs.h <<_ACEOF
9052#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9053_ACEOF
81ecdfbb
RW
9054ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9055if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9056 ac_have_decl=1
bec39cab 9057else
81ecdfbb
RW
9058 ac_have_decl=0
9059fi
bec39cab 9060
81ecdfbb
RW
9061cat >>confdefs.h <<_ACEOF
9062#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9063_ACEOF
81ecdfbb
RW
9064ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
9065if test "x$ac_cv_have_decl_strerror" = x""yes; then :
9066 ac_have_decl=1
9067else
9068 ac_have_decl=0
9069fi
9070
9071cat >>confdefs.h <<_ACEOF
9072#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 9073_ACEOF
81ecdfbb
RW
9074ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
9075if test "x$ac_cv_have_decl_strstr" = x""yes; then :
9076 ac_have_decl=1
bec39cab 9077else
81ecdfbb
RW
9078 ac_have_decl=0
9079fi
5ee754fc 9080
81ecdfbb
RW
9081cat >>confdefs.h <<_ACEOF
9082#define HAVE_DECL_STRSTR $ac_have_decl
9083_ACEOF
9084ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
9085if test "x$ac_cv_have_decl_getopt" = x""yes; then :
9086 ac_have_decl=1
9087else
9088 ac_have_decl=0
5ee754fc 9089fi
81ecdfbb
RW
9090
9091cat >>confdefs.h <<_ACEOF
9092#define HAVE_DECL_GETOPT $ac_have_decl
9093_ACEOF
9094ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9095if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9096 ac_have_decl=1
9097else
9098 ac_have_decl=0
5ee754fc 9099fi
81ecdfbb
RW
9100
9101cat >>confdefs.h <<_ACEOF
9102#define HAVE_DECL_SNPRINTF $ac_have_decl
9103_ACEOF
9104ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9105if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
9106 ac_have_decl=1
9107else
9108 ac_have_decl=0
5ee754fc
MK
9109fi
9110
a9322a30 9111cat >>confdefs.h <<_ACEOF
81ecdfbb 9112#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 9113_ACEOF
5ee754fc 9114
5ee754fc 9115
81ecdfbb
RW
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9117$as_echo_n "checking for LC_MESSAGES... " >&6; }
9118if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9119 $as_echo_n "(cached) " >&6
bec39cab 9120else
81ecdfbb 9121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9122/* end confdefs.h. */
81ecdfbb 9123#include <locale.h>
a9322a30
TT
9124int
9125main ()
9126{
81ecdfbb 9127return LC_MESSAGES
a9322a30
TT
9128 ;
9129 return 0;
9130}
bec39cab 9131_ACEOF
81ecdfbb
RW
9132if ac_fn_c_try_link "$LINENO"; then :
9133 am_cv_val_LC_MESSAGES=yes
bec39cab 9134else
81ecdfbb
RW
9135 am_cv_val_LC_MESSAGES=no
9136fi
9137rm -f core conftest.err conftest.$ac_objext \
9138 conftest$ac_exeext conftest.$ac_ext
9139fi
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9141$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9142 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9143
81ecdfbb
RW
9144$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9145
9146 fi
9147
9148
9149# ----------------------- #
9150# Checks for structures. #
9151# ----------------------- #
9152
9153ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9154if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9155
9156cat >>confdefs.h <<_ACEOF
9157#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9158_ACEOF
7eb368b3 9159
81ecdfbb 9160
7eb368b3 9161fi
81ecdfbb
RW
9162ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9163if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9164
a9322a30
TT
9165cat >>confdefs.h <<_ACEOF
9166#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9167_ACEOF
9168
a9322a30 9169
7eb368b3
NR
9170fi
9171
7eb368b3 9172
a9322a30
TT
9173# ------------------ #
9174# Checks for types. #
9175# ------------------ #
7eb368b3 9176
81ecdfbb
RW
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9178$as_echo_n "checking return type of signal handlers... " >&6; }
9179if test "${ac_cv_type_signal+set}" = set; then :
9180 $as_echo_n "(cached) " >&6
bec39cab 9181else
81ecdfbb 9182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9183/* end confdefs.h. */
a9322a30
TT
9184#include <sys/types.h>
9185#include <signal.h>
7cb9022a 9186
a9322a30
TT
9187int
9188main ()
9189{
81ecdfbb 9190return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9191 ;
9192 return 0;
9193}
bec39cab 9194_ACEOF
81ecdfbb
RW
9195if ac_fn_c_try_compile "$LINENO"; then :
9196 ac_cv_type_signal=int
bec39cab 9197else
81ecdfbb 9198 ac_cv_type_signal=void
bec39cab 9199fi
81ecdfbb 9200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9201fi
81ecdfbb
RW
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9203$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9204
a9322a30
TT
9205cat >>confdefs.h <<_ACEOF
9206#define RETSIGTYPE $ac_cv_type_signal
9207_ACEOF
5ee754fc 9208
bec39cab 9209
81ecdfbb 9210ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9211#include <sys/socket.h>
9212
81ecdfbb
RW
9213"
9214if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9215
a9322a30
TT
9216cat >>confdefs.h <<_ACEOF
9217#define HAVE_SOCKLEN_T 1
9218_ACEOF
9219
9220
9221fi
9222
9223
9224# ------------------------------------- #
9225# Checks for compiler characteristics. #
9226# ------------------------------------- #
9227
81ecdfbb
RW
9228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9229$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9230if test "${ac_cv_c_const+set}" = set; then :
9231 $as_echo_n "(cached) " >&6
a9322a30 9232else
81ecdfbb 9233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9234/* end confdefs.h. */
a9322a30
TT
9235
9236int
9237main ()
9238{
9239/* FIXME: Include the comments suggested by Paul. */
9240#ifndef __cplusplus
9241 /* Ultrix mips cc rejects this. */
9242 typedef int charset[2];
81ecdfbb 9243 const charset cs;
a9322a30 9244 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9245 char const *const *pcpcc;
9246 char **ppc;
a9322a30
TT
9247 /* NEC SVR4.0.2 mips cc rejects this. */
9248 struct point {int x, y;};
9249 static struct point const zero = {0,0};
9250 /* AIX XL C 1.02.0.0 rejects this.
9251 It does not let you subtract one const X* pointer from another in
9252 an arm of an if-expression whose if-part is not a constant
9253 expression */
9254 const char *g = "string";
81ecdfbb 9255 pcpcc = &g + (g ? g-g : 0);
a9322a30 9256 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9257 ++pcpcc;
9258 ppc = (char**) pcpcc;
9259 pcpcc = (char const *const *) ppc;
a9322a30
TT
9260 { /* SCO 3.2v4 cc rejects this. */
9261 char *t;
9262 char const *s = 0 ? (char *) 0 : (char const *) 0;
9263
9264 *t++ = 0;
81ecdfbb 9265 if (s) return 0;
a9322a30
TT
9266 }
9267 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9268 int x[] = {25, 17};
9269 const int *foo = &x[0];
9270 ++foo;
9271 }
9272 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9273 typedef const int *iptr;
9274 iptr p = 0;
9275 ++p;
9276 }
9277 { /* AIX XL C 1.02.0.0 rejects this saying
9278 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9279 struct s { int j; const int *ap[3]; };
9280 struct s *b; b->j = 5;
9281 }
9282 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9283 const int foo = 10;
81ecdfbb 9284 if (!foo) return 0;
a9322a30 9285 }
81ecdfbb 9286 return !cs[0] && !zero.x;
a9322a30
TT
9287#endif
9288
9289 ;
9290 return 0;
9291}
bec39cab 9292_ACEOF
81ecdfbb 9293if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9294 ac_cv_c_const=yes
5ee754fc 9295else
81ecdfbb 9296 ac_cv_c_const=no
5ee754fc 9297fi
81ecdfbb 9298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9299fi
81ecdfbb
RW
9300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9301$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9302if test $ac_cv_c_const = no; then
bec39cab 9303
81ecdfbb 9304$as_echo "#define const /**/" >>confdefs.h
bec39cab 9305
5ee754fc 9306fi
bec39cab 9307
81ecdfbb
RW
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9309$as_echo_n "checking for inline... " >&6; }
9310if test "${ac_cv_c_inline+set}" = set; then :
9311 $as_echo_n "(cached) " >&6
bec39cab 9312else
a9322a30
TT
9313 ac_cv_c_inline=no
9314for ac_kw in inline __inline__ __inline; do
81ecdfbb 9315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9316/* end confdefs.h. */
a9322a30
TT
9317#ifndef __cplusplus
9318typedef int foo_t;
9319static $ac_kw foo_t static_foo () {return 0; }
9320$ac_kw foo_t foo () {return 0; }
9321#endif
9322
bec39cab 9323_ACEOF
81ecdfbb
RW
9324if ac_fn_c_try_compile "$LINENO"; then :
9325 ac_cv_c_inline=$ac_kw
bec39cab 9326fi
81ecdfbb
RW
9327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9328 test "$ac_cv_c_inline" != no && break
a9322a30 9329done
bec39cab 9330
5ee754fc 9331fi
81ecdfbb
RW
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9333$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9334
a9322a30
TT
9335case $ac_cv_c_inline in
9336 inline | yes) ;;
9337 *)
9338 case $ac_cv_c_inline in
9339 no) ac_val=;;
9340 *) ac_val=$ac_cv_c_inline;;
9341 esac
9342 cat >>confdefs.h <<_ACEOF
9343#ifndef __cplusplus
9344#define inline $ac_val
9345#endif
9346_ACEOF
bec39cab
AC
9347 ;;
9348esac
bec39cab 9349
81ecdfbb
RW
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9351$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9352if test "${ac_cv_c_bigendian+set}" = set; then :
9353 $as_echo_n "(cached) " >&6
bec39cab 9354else
81ecdfbb
RW
9355 ac_cv_c_bigendian=unknown
9356 # See if we're dealing with a universal compiler.
9357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9358/* end confdefs.h. */
9359#ifndef __APPLE_CC__
9360 not a universal capable compiler
9361 #endif
9362 typedef int dummy;
9363
9364_ACEOF
9365if ac_fn_c_try_compile "$LINENO"; then :
9366
9367 # Check for potential -arch flags. It is not universal unless
9368 # there are at least two -arch flags with different values.
9369 ac_arch=
9370 ac_prev=
9371 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9372 if test -n "$ac_prev"; then
9373 case $ac_word in
9374 i?86 | x86_64 | ppc | ppc64)
9375 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9376 ac_arch=$ac_word
9377 else
9378 ac_cv_c_bigendian=universal
9379 break
9380 fi
9381 ;;
9382 esac
9383 ac_prev=
9384 elif test "x$ac_word" = "x-arch"; then
9385 ac_prev=arch
9386 fi
9387 done
9388fi
9389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9390 if test $ac_cv_c_bigendian = unknown; then
9391 # See if sys/param.h defines the BYTE_ORDER macro.
9392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9393/* end confdefs.h. */
a9322a30 9394#include <sys/types.h>
81ecdfbb 9395 #include <sys/param.h>
a9322a30
TT
9396
9397int
9398main ()
9399{
81ecdfbb
RW
9400#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9401 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9402 && LITTLE_ENDIAN)
9403 bogus endian macros
9404 #endif
a9322a30
TT
9405
9406 ;
9407 return 0;
9408}
bec39cab 9409_ACEOF
81ecdfbb 9410if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9411 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9413/* end confdefs.h. */
a9322a30 9414#include <sys/types.h>
81ecdfbb 9415 #include <sys/param.h>
a9322a30
TT
9416
9417int
9418main ()
9419{
9420#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9421 not big endian
9422 #endif
a9322a30
TT
9423
9424 ;
9425 return 0;
9426}
bec39cab 9427_ACEOF
81ecdfbb 9428if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9429 ac_cv_c_bigendian=yes
5ee754fc 9430else
81ecdfbb 9431 ac_cv_c_bigendian=no
5ee754fc 9432fi
81ecdfbb
RW
9433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9434fi
9435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9436 fi
9437 if test $ac_cv_c_bigendian = unknown; then
9438 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9440/* end confdefs.h. */
9441#include <limits.h>
bec39cab 9442
81ecdfbb
RW
9443int
9444main ()
9445{
9446#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9447 bogus endian macros
9448 #endif
9449
9450 ;
9451 return 0;
9452}
7eb368b3 9453_ACEOF
81ecdfbb
RW
9454if ac_fn_c_try_compile "$LINENO"; then :
9455 # It does; now see whether it defined to _BIG_ENDIAN or not.
9456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9457/* end confdefs.h. */
81ecdfbb
RW
9458#include <limits.h>
9459
7eb368b3
NR
9460int
9461main ()
9462{
81ecdfbb
RW
9463#ifndef _BIG_ENDIAN
9464 not big endian
9465 #endif
9466
7eb368b3
NR
9467 ;
9468 return 0;
9469}
9470_ACEOF
81ecdfbb 9471if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9472 ac_cv_c_bigendian=yes
81ecdfbb
RW
9473else
9474 ac_cv_c_bigendian=no
a9322a30 9475fi
81ecdfbb 9476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9477fi
81ecdfbb
RW
9478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9479 fi
9480 if test $ac_cv_c_bigendian = unknown; then
9481 # Compile a test program.
9482 if test "$cross_compiling" = yes; then :
9483 # Try to guess by grepping values from an object file.
9484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9485/* end confdefs.h. */
9486short int ascii_mm[] =
9487 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9488 short int ascii_ii[] =
9489 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9490 int use_ascii (int i) {
9491 return ascii_mm[i] + ascii_ii[i];
9492 }
9493 short int ebcdic_ii[] =
9494 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9495 short int ebcdic_mm[] =
9496 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9497 int use_ebcdic (int i) {
9498 return ebcdic_mm[i] + ebcdic_ii[i];
9499 }
9500 extern int foo;
7eb368b3 9501
81ecdfbb
RW
9502int
9503main ()
9504{
9505return use_ascii (foo) == use_ebcdic (foo);
9506 ;
9507 return 0;
9508}
9509_ACEOF
9510if ac_fn_c_try_compile "$LINENO"; then :
9511 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9512 ac_cv_c_bigendian=yes
9513 fi
9514 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9515 if test "$ac_cv_c_bigendian" = unknown; then
9516 ac_cv_c_bigendian=no
9517 else
9518 # finding both strings is unlikely to happen, but who knows?
9519 ac_cv_c_bigendian=unknown
9520 fi
9521 fi
7eb368b3 9522fi
81ecdfbb 9523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9524else
81ecdfbb 9525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9526/* end confdefs.h. */
81ecdfbb 9527$ac_includes_default
d3ea6809
MM
9528int
9529main ()
9530{
81ecdfbb
RW
9531
9532 /* Are we little or big endian? From Harbison&Steele. */
9533 union
9534 {
9535 long int l;
9536 char c[sizeof (long int)];
9537 } u;
9538 u.l = 1;
9539 return u.c[sizeof (long int) - 1] == 1;
9540
9541 ;
9542 return 0;
d3ea6809
MM
9543}
9544_ACEOF
81ecdfbb 9545if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9546 ac_cv_c_bigendian=no
d3ea6809 9547else
81ecdfbb 9548 ac_cv_c_bigendian=yes
d3ea6809 9549fi
81ecdfbb
RW
9550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9551 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9552fi
a9322a30 9553
81ecdfbb
RW
9554 fi
9555fi
9556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9557$as_echo "$ac_cv_c_bigendian" >&6; }
9558 case $ac_cv_c_bigendian in #(
9559 yes)
9560 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9561;; #(
9562 no)
9563 ;; #(
9564 universal)
9565
9566$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9567
9568 ;; #(
9569 *)
9570 as_fn_error "unknown endianness
9571 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9572 esac
d3ea6809
MM
9573
9574
a9322a30
TT
9575# ------------------------------ #
9576# Checks for library functions. #
9577# ------------------------------ #
d3ea6809 9578
a9322a30
TT
9579# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9580# for constant arguments. Useless!
81ecdfbb
RW
9581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9582$as_echo_n "checking for working alloca.h... " >&6; }
9583if test "${ac_cv_working_alloca_h+set}" = set; then :
9584 $as_echo_n "(cached) " >&6
d3ea6809 9585else
81ecdfbb 9586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9587/* end confdefs.h. */
a9322a30 9588#include <alloca.h>
bec39cab
AC
9589int
9590main ()
9591{
a9322a30 9592char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9593 if (p) return 0;
bec39cab
AC
9594 ;
9595 return 0;
9596}
9597_ACEOF
81ecdfbb 9598if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9599 ac_cv_working_alloca_h=yes
bec39cab 9600else
81ecdfbb 9601 ac_cv_working_alloca_h=no
bec39cab 9602fi
81ecdfbb
RW
9603rm -f core conftest.err conftest.$ac_objext \
9604 conftest$ac_exeext conftest.$ac_ext
bec39cab 9605fi
81ecdfbb
RW
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9607$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9608if test $ac_cv_working_alloca_h = yes; then
9609
81ecdfbb 9610$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9611
c906108c 9612fi
bec39cab 9613
81ecdfbb
RW
9614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9615$as_echo_n "checking for alloca... " >&6; }
9616if test "${ac_cv_func_alloca_works+set}" = set; then :
9617 $as_echo_n "(cached) " >&6
bec39cab 9618else
81ecdfbb 9619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9620/* end confdefs.h. */
a9322a30
TT
9621#ifdef __GNUC__
9622# define alloca __builtin_alloca
b4e70030 9623#else
a9322a30
TT
9624# ifdef _MSC_VER
9625# include <malloc.h>
9626# define alloca _alloca
9627# else
81ecdfbb 9628# ifdef HAVE_ALLOCA_H
a9322a30
TT
9629# include <alloca.h>
9630# else
9631# ifdef _AIX
9632 #pragma alloca
9633# else
9634# ifndef alloca /* predefined by HP cc +Olibcalls */
9635char *alloca ();
9636# endif
9637# endif
9638# endif
9639# endif
c906108c 9640#endif
97bf5e38 9641
bec39cab
AC
9642int
9643main ()
9644{
a9322a30 9645char *p = (char *) alloca (1);
81ecdfbb 9646 if (p) return 0;
bec39cab
AC
9647 ;
9648 return 0;
9649}
9650_ACEOF
81ecdfbb 9651if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9652 ac_cv_func_alloca_works=yes
bec39cab 9653else
81ecdfbb 9654 ac_cv_func_alloca_works=no
bec39cab 9655fi
81ecdfbb
RW
9656rm -f core conftest.err conftest.$ac_objext \
9657 conftest$ac_exeext conftest.$ac_ext
bec39cab 9658fi
81ecdfbb
RW
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9660$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9661
9662if test $ac_cv_func_alloca_works = yes; then
9663
81ecdfbb 9664$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9665
a9322a30
TT
9666else
9667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9668# that cause trouble. Some versions do not even contain alloca or
9669# contain a buggy version. If you still want to use their alloca,
9670# use ar to extract alloca.o from them instead of compiling alloca.c.
9671
81ecdfbb 9672ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9673
81ecdfbb 9674$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9675
bec39cab 9676
81ecdfbb
RW
9677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9678$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9679if test "${ac_cv_os_cray+set}" = set; then :
9680 $as_echo_n "(cached) " >&6
a9322a30 9681else
81ecdfbb 9682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9683/* end confdefs.h. */
81ecdfbb 9684#if defined CRAY && ! defined CRAY2
a9322a30
TT
9685webecray
9686#else
9687wenotbecray
9688#endif
9689
9690_ACEOF
9691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9692 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9693 ac_cv_os_cray=yes
9694else
81ecdfbb 9695 ac_cv_os_cray=no
bec39cab 9696fi
81ecdfbb
RW
9697rm -f conftest*
9698
bec39cab 9699fi
81ecdfbb
RW
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9701$as_echo "$ac_cv_os_cray" >&6; }
9702if test $ac_cv_os_cray = yes; then
9703 for ac_func in _getb67 GETB67 getb67; do
9704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9705ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9706eval as_val=\$$as_ac_var
9707 if test "x$as_val" = x""yes; then :
a9322a30
TT
9708
9709cat >>confdefs.h <<_ACEOF
9710#define CRAY_STACKSEG_END $ac_func
bec39cab 9711_ACEOF
c906108c 9712
a9322a30 9713 break
c906108c
SS
9714fi
9715
a9322a30
TT
9716 done
9717fi
bec39cab 9718
81ecdfbb
RW
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9720$as_echo_n "checking stack direction for C alloca... " >&6; }
9721if test "${ac_cv_c_stack_direction+set}" = set; then :
9722 $as_echo_n "(cached) " >&6
a9322a30 9723else
81ecdfbb 9724 if test "$cross_compiling" = yes; then :
a9322a30 9725 ac_cv_c_stack_direction=0
bec39cab 9726else
81ecdfbb 9727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9728/* end confdefs.h. */
81ecdfbb 9729$ac_includes_default
a9322a30
TT
9730int
9731find_stack_direction ()
b4e70030 9732{
a9322a30
TT
9733 static char *addr = 0;
9734 auto char dummy;
9735 if (addr == 0)
9736 {
9737 addr = &dummy;
9738 return find_stack_direction ();
9739 }
9740 else
9741 return (&dummy > addr) ? 1 : -1;
b4e70030 9742}
b757528f 9743
bec39cab
AC
9744int
9745main ()
9746{
81ecdfbb 9747 return find_stack_direction () < 0;
bec39cab
AC
9748}
9749_ACEOF
81ecdfbb 9750if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9751 ac_cv_c_stack_direction=1
9752else
81ecdfbb 9753 ac_cv_c_stack_direction=-1
a9322a30 9754fi
81ecdfbb
RW
9755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9756 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9757fi
a9322a30 9758
81ecdfbb
RW
9759fi
9760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9761$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9762cat >>confdefs.h <<_ACEOF
9763#define STACK_DIRECTION $ac_cv_c_stack_direction
9764_ACEOF
9765
9766
9767fi
9768
a9322a30 9769for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9770do :
9771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9772ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9773eval as_val=\$$as_ac_Header
9774 if test "x$as_val" = x""yes; then :
bec39cab 9775 cat >>confdefs.h <<_ACEOF
81ecdfbb 9776#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9777_ACEOF
b757528f 9778
b757528f 9779fi
bec39cab 9780
a9322a30 9781done
a3828db0 9782
a9322a30 9783for ac_func in getpagesize
81ecdfbb
RW
9784do :
9785 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9786if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9787 cat >>confdefs.h <<_ACEOF
81ecdfbb 9788#define HAVE_GETPAGESIZE 1
bec39cab 9789_ACEOF
bcb3dc3d 9790
bcb3dc3d
MK
9791fi
9792done
9793
81ecdfbb
RW
9794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9795$as_echo_n "checking for working mmap... " >&6; }
9796if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9797 $as_echo_n "(cached) " >&6
a9322a30 9798else
81ecdfbb 9799 if test "$cross_compiling" = yes; then :
a9322a30 9800 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9801else
81ecdfbb 9802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9803/* end confdefs.h. */
a9322a30
TT
9804$ac_includes_default
9805/* malloc might have been renamed as rpl_malloc. */
9806#undef malloc
bec39cab 9807
a9322a30
TT
9808/* Thanks to Mike Haertel and Jim Avera for this test.
9809 Here is a matrix of mmap possibilities:
9810 mmap private not fixed
9811 mmap private fixed at somewhere currently unmapped
9812 mmap private fixed at somewhere already mapped
9813 mmap shared not fixed
9814 mmap shared fixed at somewhere currently unmapped
9815 mmap shared fixed at somewhere already mapped
9816 For private mappings, we should verify that changes cannot be read()
9817 back from the file, nor mmap's back from the file at a different
9818 address. (There have been systems where private was not correctly
9819 implemented like the infamous i386 svr4.0, and systems where the
9820 VM page cache was not coherent with the file system buffer cache
9821 like early versions of FreeBSD and possibly contemporary NetBSD.)
9822 For shared mappings, we should conversely verify that changes get
9823 propagated back to all the places they're supposed to be.
bec39cab 9824
a9322a30
TT
9825 Grep wants private fixed already mapped.
9826 The main things grep needs to know about mmap are:
9827 * does it exist and is it safe to write into the mmap'd area
9828 * how to use it (BSD variants) */
8b9cf735 9829
a9322a30
TT
9830#include <fcntl.h>
9831#include <sys/mman.h>
8b9cf735 9832
81ecdfbb 9833#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9834char *malloc ();
a3828db0
MK
9835#endif
9836
a9322a30 9837/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9838#ifndef HAVE_GETPAGESIZE
a9322a30 9839/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9840# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9841# define HAVE_SYS_PARAM_H 1
9842# endif
9843
9844# ifdef _SC_PAGESIZE
9845# define getpagesize() sysconf(_SC_PAGESIZE)
9846# else /* no _SC_PAGESIZE */
81ecdfbb 9847# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9848# include <sys/param.h>
9849# ifdef EXEC_PAGESIZE
9850# define getpagesize() EXEC_PAGESIZE
9851# else /* no EXEC_PAGESIZE */
9852# ifdef NBPG
9853# define getpagesize() NBPG * CLSIZE
9854# ifndef CLSIZE
9855# define CLSIZE 1
9856# endif /* no CLSIZE */
9857# else /* no NBPG */
9858# ifdef NBPC
9859# define getpagesize() NBPC
9860# else /* no NBPC */
9861# ifdef PAGESIZE
9862# define getpagesize() PAGESIZE
9863# endif /* PAGESIZE */
9864# endif /* no NBPC */
9865# endif /* no NBPG */
9866# endif /* no EXEC_PAGESIZE */
9867# else /* no HAVE_SYS_PARAM_H */
9868# define getpagesize() 8192 /* punt totally */
9869# endif /* no HAVE_SYS_PARAM_H */
9870# endif /* no _SC_PAGESIZE */
9871
9872#endif /* no HAVE_GETPAGESIZE */
9873
bec39cab
AC
9874int
9875main ()
9876{
a9322a30
TT
9877 char *data, *data2, *data3;
9878 int i, pagesize;
9879 int fd;
9880
9881 pagesize = getpagesize ();
9882
9883 /* First, make a file with some known garbage in it. */
9884 data = (char *) malloc (pagesize);
9885 if (!data)
81ecdfbb 9886 return 1;
a9322a30
TT
9887 for (i = 0; i < pagesize; ++i)
9888 *(data + i) = rand ();
9889 umask (0);
9890 fd = creat ("conftest.mmap", 0600);
9891 if (fd < 0)
81ecdfbb 9892 return 1;
a9322a30 9893 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9894 return 1;
a9322a30
TT
9895 close (fd);
9896
9897 /* Next, try to mmap the file at a fixed address which already has
9898 something else allocated at it. If we can, also make sure that
9899 we see the same garbage. */
9900 fd = open ("conftest.mmap", O_RDWR);
9901 if (fd < 0)
81ecdfbb 9902 return 1;
a9322a30
TT
9903 data2 = (char *) malloc (2 * pagesize);
9904 if (!data2)
81ecdfbb
RW
9905 return 1;
9906 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9907 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9908 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9909 return 1;
a9322a30
TT
9910 for (i = 0; i < pagesize; ++i)
9911 if (*(data + i) != *(data2 + i))
81ecdfbb 9912 return 1;
a9322a30
TT
9913
9914 /* Finally, make sure that changes to the mapped area do not
9915 percolate back to the file as seen by read(). (This is a bug on
9916 some variants of i386 svr4.0.) */
9917 for (i = 0; i < pagesize; ++i)
9918 *(data2 + i) = *(data2 + i) + 1;
9919 data3 = (char *) malloc (pagesize);
9920 if (!data3)
81ecdfbb 9921 return 1;
a9322a30 9922 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9923 return 1;
a9322a30
TT
9924 for (i = 0; i < pagesize; ++i)
9925 if (*(data + i) != *(data3 + i))
81ecdfbb 9926 return 1;
a9322a30 9927 close (fd);
81ecdfbb 9928 return 0;
bec39cab
AC
9929}
9930_ACEOF
81ecdfbb 9931if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9932 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9933else
81ecdfbb 9934 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9935fi
81ecdfbb
RW
9936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9937 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9938fi
81ecdfbb 9939
a9322a30 9940fi
81ecdfbb
RW
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9942$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9943if test $ac_cv_func_mmap_fixed_mapped = yes; then
9944
81ecdfbb 9945$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9946
086ec9eb 9947fi
a9322a30 9948rm -f conftest.mmap
a3828db0 9949
81ecdfbb
RW
9950ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9951if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9952
a9322a30
TT
9953else
9954
9955cat >>confdefs.h <<_ACEOF
9956#define pid_t int
bec39cab 9957_ACEOF
086ec9eb
MK
9958
9959fi
9960
81ecdfbb
RW
9961for ac_header in vfork.h
9962do :
9963 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9964if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9965 cat >>confdefs.h <<_ACEOF
81ecdfbb 9966#define HAVE_VFORK_H 1
bec39cab 9967_ACEOF
c906108c
SS
9968
9969fi
a9322a30 9970
a3828db0 9971done
c906108c 9972
a9322a30 9973for ac_func in fork vfork
81ecdfbb
RW
9974do :
9975 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9976ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9977eval as_val=\$$as_ac_var
9978 if test "x$as_val" = x""yes; then :
a3828db0 9979 cat >>confdefs.h <<_ACEOF
81ecdfbb 9980#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9981_ACEOF
b83266a0 9982
97bf5e38 9983fi
a3828db0 9984done
b83266a0 9985
a9322a30 9986if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9988$as_echo_n "checking for working fork... " >&6; }
9989if test "${ac_cv_func_fork_works+set}" = set; then :
9990 $as_echo_n "(cached) " >&6
a9322a30 9991else
81ecdfbb 9992 if test "$cross_compiling" = yes; then :
a9322a30
TT
9993 ac_cv_func_fork_works=cross
9994else
81ecdfbb
RW
9995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9996/* end confdefs.h. */
9997$ac_includes_default
9998int
9999main ()
10000{
10001
10002 /* By Ruediger Kuhlmann. */
10003 return fork () < 0;
10004
10005 ;
10006 return 0;
10007}
a9322a30 10008_ACEOF
81ecdfbb 10009if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10010 ac_cv_func_fork_works=yes
10011else
81ecdfbb 10012 ac_cv_func_fork_works=no
a9322a30 10013fi
81ecdfbb
RW
10014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10015 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10016fi
81ecdfbb 10017
a9322a30 10018fi
81ecdfbb
RW
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10020$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10021
10022else
10023 ac_cv_func_fork_works=$ac_cv_func_fork
10024fi
10025if test "x$ac_cv_func_fork_works" = xcross; then
10026 case $host in
10027 *-*-amigaos* | *-*-msdosdjgpp*)
10028 # Override, as these systems have only a dummy fork() stub
10029 ac_cv_func_fork_works=no
10030 ;;
10031 *)
10032 ac_cv_func_fork_works=yes
10033 ;;
10034 esac
81ecdfbb
RW
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10036$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10037fi
10038ac_cv_func_vfork_works=$ac_cv_func_vfork
10039if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10041$as_echo_n "checking for working vfork... " >&6; }
10042if test "${ac_cv_func_vfork_works+set}" = set; then :
10043 $as_echo_n "(cached) " >&6
a9322a30 10044else
81ecdfbb 10045 if test "$cross_compiling" = yes; then :
a9322a30
TT
10046 ac_cv_func_vfork_works=cross
10047else
81ecdfbb 10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10049/* end confdefs.h. */
10050/* Thanks to Paul Eggert for this test. */
81ecdfbb 10051$ac_includes_default
a9322a30 10052#include <sys/wait.h>
81ecdfbb 10053#ifdef HAVE_VFORK_H
a9322a30
TT
10054# include <vfork.h>
10055#endif
10056/* On some sparc systems, changes by the child to local and incoming
10057 argument registers are propagated back to the parent. The compiler
10058 is told about this with #include <vfork.h>, but some compilers
10059 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10060 static variable whose address is put into a register that is
10061 clobbered by the vfork. */
10062static void
10063#ifdef __cplusplus
10064sparc_address_test (int arg)
10065# else
10066sparc_address_test (arg) int arg;
10067#endif
10068{
10069 static pid_t child;
10070 if (!child) {
10071 child = vfork ();
10072 if (child < 0) {
10073 perror ("vfork");
10074 _exit(2);
10075 }
10076 if (!child) {
10077 arg = getpid();
10078 write(-1, "", 0);
10079 _exit (arg);
10080 }
10081 }
10082}
10083
10084int
10085main ()
10086{
10087 pid_t parent = getpid ();
10088 pid_t child;
10089
10090 sparc_address_test (0);
10091
10092 child = vfork ();
10093
10094 if (child == 0) {
10095 /* Here is another test for sparc vfork register problems. This
10096 test uses lots of local variables, at least as many local
10097 variables as main has allocated so far including compiler
10098 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10099 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10100 reuse the register of parent for one of the local variables,
10101 since it will think that parent can't possibly be used any more
10102 in this routine. Assigning to the local variable will thus
10103 munge parent in the parent process. */
10104 pid_t
10105 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10106 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10107 /* Convince the compiler that p..p7 are live; otherwise, it might
10108 use the same hardware register for all 8 local variables. */
10109 if (p != p1 || p != p2 || p != p3 || p != p4
10110 || p != p5 || p != p6 || p != p7)
10111 _exit(1);
10112
10113 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10114 from child file descriptors. If the child closes a descriptor
10115 before it execs or exits, this munges the parent's descriptor
10116 as well. Test for this by closing stdout in the child. */
10117 _exit(close(fileno(stdout)) != 0);
10118 } else {
10119 int status;
10120 struct stat st;
10121
10122 while (wait(&status) != child)
10123 ;
81ecdfbb 10124 return (
a9322a30
TT
10125 /* Was there some problem with vforking? */
10126 child < 0
10127
10128 /* Did the child fail? (This shouldn't happen.) */
10129 || status
10130
10131 /* Did the vfork/compiler bug occur? */
10132 || parent != getpid()
10133
10134 /* Did the file descriptor bug occur? */
10135 || fstat(fileno(stdout), &st) != 0
10136 );
10137 }
10138}
10139_ACEOF
81ecdfbb 10140if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10141 ac_cv_func_vfork_works=yes
10142else
81ecdfbb 10143 ac_cv_func_vfork_works=no
a9322a30 10144fi
81ecdfbb
RW
10145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10146 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10147fi
81ecdfbb 10148
a9322a30 10149fi
81ecdfbb
RW
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10151$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10152
10153fi;
10154if test "x$ac_cv_func_fork_works" = xcross; then
10155 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10157$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10158fi
10159
10160if test "x$ac_cv_func_vfork_works" = xyes; then
10161
81ecdfbb 10162$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10163
10164else
10165
81ecdfbb 10166$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10167
10168fi
10169if test "x$ac_cv_func_fork_works" = xyes; then
10170
81ecdfbb 10171$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10172
10173fi
10174
7313baad 10175for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10176 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10177 sbrk setpgid setpgrp setsid \
a9322a30 10178 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10179 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
614c279d
TT
10180 setrlimit getrlimit posix_madvise waitpid lstat \
10181 fdwalk pipe2
81ecdfbb
RW
10182do :
10183 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10184ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10185eval as_val=\$$as_ac_var
10186 if test "x$as_val" = x""yes; then :
6c7a06a3 10187 cat >>confdefs.h <<_ACEOF
81ecdfbb 10188#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10189_ACEOF
10190
10191fi
10192done
10193
10194
81ecdfbb
RW
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10196$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10197if test "${am_cv_langinfo_codeset+set}" = set; then :
10198 $as_echo_n "(cached) " >&6
6c7a06a3 10199else
81ecdfbb 10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10201/* end confdefs.h. */
10202#include <langinfo.h>
10203int
10204main ()
10205{
10206char* cs = nl_langinfo(CODESET);
bec39cab
AC
10207 ;
10208 return 0;
10209}
10210_ACEOF
81ecdfbb 10211if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10212 am_cv_langinfo_codeset=yes
a4db0f07 10213else
81ecdfbb 10214 am_cv_langinfo_codeset=no
a4db0f07 10215fi
81ecdfbb
RW
10216rm -f core conftest.err conftest.$ac_objext \
10217 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10218
a4db0f07 10219fi
81ecdfbb
RW
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10221$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10222 if test $am_cv_langinfo_codeset = yes; then
10223
81ecdfbb 10224$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10225
6c7a06a3 10226 fi
c906108c 10227
06825bd1 10228
a3828db0
MK
10229# Check the return and argument types of ptrace. No canned test for
10230# this, so roll our own.
10231gdb_ptrace_headers='
10232#if HAVE_SYS_TYPES_H
10233# include <sys/types.h>
10234#endif
10235#if HAVE_SYS_PTRACE_H
10236# include <sys/ptrace.h>
10237#endif
10238#if HAVE_UNISTD_H
10239# include <unistd.h>
10240#endif
10241'
10242# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10243ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10244"
10245if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10246 ac_have_decl=1
06825bd1 10247else
81ecdfbb 10248 ac_have_decl=0
06825bd1 10249fi
06825bd1 10250
a3828db0 10251cat >>confdefs.h <<_ACEOF
81ecdfbb 10252#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10253_ACEOF
81ecdfbb 10254if test $ac_have_decl = 1; then :
bec39cab 10255
a3828db0 10256else
a3828db0
MK
10257
10258 : ${gdb_cv_func_ptrace_ret='int'}
10259 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10260
06825bd1
MK
10261fi
10262
064ef605
DJ
10263# Check return type. Varargs (used on GNU/Linux) conflict with the
10264# empty argument list, so check for that explicitly.
81ecdfbb
RW
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10266$as_echo_n "checking return type of ptrace... " >&6; }
10267if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10268 $as_echo_n "(cached) " >&6
bec39cab 10269else
81ecdfbb 10270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10271/* end confdefs.h. */
a3828db0 10272$gdb_ptrace_headers
bec39cab
AC
10273int
10274main ()
10275{
064ef605
DJ
10276extern long ptrace (enum __ptrace_request, ...);
10277 ;
10278 return 0;
10279}
10280_ACEOF
81ecdfbb 10281if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10282 gdb_cv_func_ptrace_ret='long'
10283else
81ecdfbb 10284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10285/* end confdefs.h. */
10286$gdb_ptrace_headers
10287int
10288main ()
10289{
a3828db0 10290extern int ptrace ();
bec39cab
AC
10291 ;
10292 return 0;
10293}
10294_ACEOF
81ecdfbb 10295if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10296 gdb_cv_func_ptrace_ret='int'
70f9f479 10297else
81ecdfbb 10298 gdb_cv_func_ptrace_ret='long'
70f9f479 10299fi
81ecdfbb 10300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10301fi
81ecdfbb 10302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10303fi
81ecdfbb
RW
10304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10305$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10306
a3828db0
MK
10307cat >>confdefs.h <<_ACEOF
10308#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10309_ACEOF
70f9f479 10310
a3828db0 10311# Check argument types.
81ecdfbb
RW
10312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10313$as_echo_n "checking types of arguments for ptrace... " >&6; }
10314if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10315 $as_echo_n "(cached) " >&6
bec39cab 10316else
a3828db0 10317
81ecdfbb 10318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10319/* end confdefs.h. */
10320$gdb_ptrace_headers
10321int
10322main ()
10323{
10324extern long ptrace (enum __ptrace_request, ...);
10325 ;
10326 return 0;
10327}
10328_ACEOF
81ecdfbb 10329if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10330 gdb_cv_func_ptrace_args='int,int,long,long'
10331else
064ef605 10332
a3828db0
MK
10333for gdb_arg1 in 'int' 'long'; do
10334 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10335 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10336 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10338/* end confdefs.h. */
a3828db0 10339$gdb_ptrace_headers
bec39cab
AC
10340int
10341main ()
10342{
a3828db0
MK
10343
10344extern $gdb_cv_func_ptrace_ret
10345 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10346
bec39cab
AC
10347 ;
10348 return 0;
10349}
10350_ACEOF
81ecdfbb 10351if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10352 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10353 break 4;
5c7f2947 10354fi
81ecdfbb 10355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10356 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10358/* end confdefs.h. */
a3828db0 10359$gdb_ptrace_headers
bec39cab
AC
10360int
10361main ()
10362{
a3828db0
MK
10363
10364extern $gdb_cv_func_ptrace_ret
10365 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10366
bec39cab
AC
10367 ;
10368 return 0;
10369}
10370_ACEOF
81ecdfbb 10371if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10372
10373gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10374 break 5;
78434e59 10375fi
81ecdfbb 10376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10377 done
10378 done
10379 done
10380 done
10381done
10382# Provide a safe default value.
10383: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10384
064ef605 10385fi
81ecdfbb 10386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10387fi
81ecdfbb
RW
10388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10389$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10390ac_save_IFS=$IFS; IFS=','
10391set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10392IFS=$ac_save_IFS
10393shift
bec39cab 10394
a3828db0
MK
10395cat >>confdefs.h <<_ACEOF
10396#define PTRACE_TYPE_ARG3 $3
10397_ACEOF
10398
10399if test -n "$5"; then
10400
10401cat >>confdefs.h <<_ACEOF
10402#define PTRACE_TYPE_ARG5 $5
bec39cab 10403_ACEOF
78434e59
MK
10404
10405fi
10406
a3828db0 10407if test "$cross_compiling" = no; then
81ecdfbb
RW
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10409$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10410if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10411 $as_echo_n "(cached) " >&6
a3828db0 10412else
81ecdfbb
RW
10413 if test "$cross_compiling" = yes; then :
10414 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10415else
81ecdfbb 10416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10417/* end confdefs.h. */
81ecdfbb 10418$ac_includes_default
bec39cab
AC
10419int
10420main ()
10421{
a3828db0
MK
10422/* If this system has a BSD-style setpgrp which takes arguments,
10423 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10424 exit successfully. */
81ecdfbb 10425 return setpgrp (1,1) != -1;
bec39cab
AC
10426 ;
10427 return 0;
10428}
10429_ACEOF
81ecdfbb 10430if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10431 ac_cv_func_setpgrp_void=no
c906108c 10432else
81ecdfbb 10433 ac_cv_func_setpgrp_void=yes
c906108c 10434fi
81ecdfbb
RW
10435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10436 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10437fi
81ecdfbb 10438
a3828db0 10439fi
81ecdfbb
RW
10440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10441$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10442if test $ac_cv_func_setpgrp_void = yes; then
10443
81ecdfbb 10444$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10445
10446fi
a3828db0
MK
10447
10448else
81ecdfbb
RW
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10450$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10451if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10452 $as_echo_n "(cached) " >&6
97bf5e38 10453else
81ecdfbb 10454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10455/* end confdefs.h. */
a3828db0
MK
10456
10457#include <unistd.h>
10458
bec39cab
AC
10459int
10460main ()
10461{
a3828db0
MK
10462
10463 if (setpgrp(1,1) == -1)
10464 exit (0);
10465 else
10466 exit (1);
10467
bec39cab
AC
10468 ;
10469 return 0;
10470}
10471_ACEOF
81ecdfbb 10472if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10473 ac_cv_func_setpgrp_void=no
c906108c 10474else
81ecdfbb 10475 ac_cv_func_setpgrp_void=yes
c906108c 10476fi
81ecdfbb 10477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10478fi
81ecdfbb
RW
10479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10480$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10481if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10482 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10483
a3828db0 10484fi
c906108c
SS
10485fi
10486
a3828db0
MK
10487# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10488# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10490$as_echo_n "checking for sigsetjmp... " >&6; }
10491if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10492 $as_echo_n "(cached) " >&6
bec39cab 10493else
81ecdfbb 10494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10495/* end confdefs.h. */
a3828db0
MK
10496
10497#include <setjmp.h>
10498
bec39cab
AC
10499int
10500main ()
10501{
a3828db0 10502sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10503 ;
10504 return 0;
10505}
10506_ACEOF
81ecdfbb 10507if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10508 gdb_cv_func_sigsetjmp=yes
c906108c 10509else
81ecdfbb 10510 gdb_cv_func_sigsetjmp=no
c906108c 10511fi
81ecdfbb 10512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10513fi
81ecdfbb
RW
10514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10515$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10516if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10517
81ecdfbb 10518$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10519
97bf5e38 10520fi
c906108c 10521
a3828db0
MK
10522# Assume we'll default to using the included libiberty regex.
10523gdb_use_included_regex=yes
10524
10525# However, if the system regex is GNU regex, then default to *not*
10526# using the included regex.
81ecdfbb
RW
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10528$as_echo_n "checking for GNU regex... " >&6; }
10529if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10530 $as_echo_n "(cached) " >&6
bec39cab 10531else
81ecdfbb 10532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10533/* end confdefs.h. */
a3828db0 10534#include <gnu-versions.h>
bec39cab
AC
10535int
10536main ()
10537{
81ecdfbb
RW
10538#define REGEX_INTERFACE_VERSION 1
10539#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10540# error "Version mismatch"
10541#endif
5c45e068
MK
10542 ;
10543 return 0;
10544}
10545_ACEOF
81ecdfbb
RW
10546if ac_fn_c_try_compile "$LINENO"; then :
10547 gdb_cv_have_gnu_regex=yes
5c45e068 10548else
81ecdfbb
RW
10549 gdb_cv_have_gnu_regex=no
10550fi
10551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10552fi
10553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10554$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10555if test $gdb_cv_have_gnu_regex = yes; then
10556 gdb_use_included_regex=no
5c45e068 10557fi
81ecdfbb
RW
10558
10559
10560# Check whether --with-included-regex was given.
10561if test "${with_included_regex+set}" = set; then :
10562 withval=$with_included_regex; gdb_with_regex=$withval
10563else
10564 gdb_with_regex=$gdb_use_included_regex
c906108c 10565fi
81ecdfbb
RW
10566
10567if test "$gdb_with_regex" = yes; then
10568
10569$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10570
c906108c 10571fi
81ecdfbb
RW
10572
10573# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10574ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10575#include <sys/proc.h>
10576
10577"
10578if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10579
5c45e068 10580cat >>confdefs.h <<_ACEOF
a3828db0 10581#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10582_ACEOF
c906108c 10583
5c45e068 10584
97bf5e38 10585fi
c906108c 10586
5c45e068 10587
a3828db0 10588# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10590$as_echo_n "checking for struct lwp... " >&6; }
10591if test "${gdb_cv_struct_lwp+set}" = set; then :
10592 $as_echo_n "(cached) " >&6
bec39cab 10593else
81ecdfbb 10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10595/* end confdefs.h. */
a3828db0
MK
10596#include <sys/param.h>
10597#include <sys/lwp.h>
bec39cab
AC
10598int
10599main ()
10600{
a3828db0 10601struct lwp l;
bec39cab
AC
10602 ;
10603 return 0;
10604}
10605_ACEOF
81ecdfbb 10606if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10607 gdb_cv_struct_lwp=yes
c906108c 10608else
81ecdfbb 10609 gdb_cv_struct_lwp=no
c906108c 10610fi
81ecdfbb 10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10612fi
81ecdfbb
RW
10613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10614$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10615if test $gdb_cv_struct_lwp = yes; then
c906108c 10616
81ecdfbb 10617$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10618
97bf5e38 10619fi
c906108c 10620
a3828db0 10621# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10623$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10624if test "${gdb_cv_struct_reg+set}" = set; then :
10625 $as_echo_n "(cached) " >&6
bec39cab 10626else
81ecdfbb 10627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10628/* end confdefs.h. */
a3828db0
MK
10629#include <sys/types.h>
10630#include <machine/reg.h>
bec39cab
AC
10631int
10632main ()
10633{
a3828db0 10634struct reg r;
bec39cab
AC
10635 ;
10636 return 0;
10637}
10638_ACEOF
81ecdfbb 10639if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10640 gdb_cv_struct_reg=yes
27ca5dad 10641else
81ecdfbb 10642 gdb_cv_struct_reg=no
27ca5dad 10643fi
81ecdfbb 10644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10645fi
81ecdfbb
RW
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10647$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10648if test $gdb_cv_struct_reg = yes; then
bec39cab 10649
81ecdfbb 10650$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10651
10652fi
97bf5e38 10653
a3828db0
MK
10654# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10655# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10656ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10657"
10658if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10659
10660cat >>confdefs.h <<_ACEOF
a3828db0 10661#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10662_ACEOF
3862412b 10663
5c45e068 10664
97bf5e38 10665fi
81ecdfbb
RW
10666ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10667"
10668if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10669
10670cat >>confdefs.h <<_ACEOF
a3828db0 10671#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10672_ACEOF
3862412b 10673
5c45e068 10674
97bf5e38 10675fi
3862412b 10676
5c45e068 10677
6fea9e18
L
10678# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10679# Older amd64 Linux's don't have the fs_base and gs_base members of
10680# `struct user_regs_struct'.
10681ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
10682"
10683if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
10684
10685cat >>confdefs.h <<_ACEOF
10686#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10687_ACEOF
10688
10689
10690fi
10691ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
10692"
10693if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
10694
10695cat >>confdefs.h <<_ACEOF
10696#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10697_ACEOF
10698
10699
10700fi
10701
10702
a3828db0 10703# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10705$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10706if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10707 $as_echo_n "(cached) " >&6
451928c5 10708else
81ecdfbb 10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10710/* end confdefs.h. */
a3828db0 10711#include <sys/ptrace.h>
bec39cab
AC
10712int
10713main ()
10714{
a3828db0 10715PTRACE_GETREGS;
bec39cab
AC
10716 ;
10717 return 0;
10718}
10719_ACEOF
81ecdfbb 10720if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10721 gdb_cv_have_ptrace_getregs=yes
451928c5 10722else
81ecdfbb 10723 gdb_cv_have_ptrace_getregs=no
451928c5 10724fi
81ecdfbb 10725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10726fi
10727
81ecdfbb
RW
10728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10729$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10730if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10731
81ecdfbb 10732$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10733
97bf5e38 10734fi
451928c5 10735
a3828db0 10736# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10738$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10739if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10740 $as_echo_n "(cached) " >&6
451928c5 10741else
81ecdfbb 10742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10743/* end confdefs.h. */
a3828db0 10744#include <sys/ptrace.h>
bec39cab
AC
10745int
10746main ()
10747{
a3828db0 10748PTRACE_GETFPXREGS;
bec39cab
AC
10749 ;
10750 return 0;
10751}
10752_ACEOF
81ecdfbb 10753if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10754 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10755else
81ecdfbb 10756 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10757fi
81ecdfbb 10758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10759fi
10760
81ecdfbb
RW
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10762$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10763if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10764
81ecdfbb 10765$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10766
97bf5e38 10767fi
451928c5 10768
a3828db0 10769# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10771$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10772if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10773 $as_echo_n "(cached) " >&6
3862412b 10774else
81ecdfbb 10775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10776/* end confdefs.h. */
a3828db0
MK
10777#include <sys/types.h>
10778#include <sys/ptrace.h>
bec39cab
AC
10779int
10780main ()
10781{
a3828db0 10782PT_GETDBREGS;
bec39cab
AC
10783 ;
10784 return 0;
10785}
10786_ACEOF
81ecdfbb 10787if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10788 gdb_cv_have_pt_getdbregs=yes
3862412b 10789else
81ecdfbb 10790 gdb_cv_have_pt_getdbregs=no
3862412b 10791fi
81ecdfbb 10792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10793fi
10794
81ecdfbb
RW
10795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10796$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10797if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10798
81ecdfbb 10799$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10800
97bf5e38 10801fi
3862412b 10802
a3828db0 10803# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10805$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10806if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10807 $as_echo_n "(cached) " >&6
3862412b 10808else
81ecdfbb 10809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10810/* end confdefs.h. */
a3828db0
MK
10811#include <sys/types.h>
10812#include <sys/ptrace.h>
bec39cab
AC
10813int
10814main ()
10815{
a3828db0 10816PT_GETXMMREGS;
bec39cab
AC
10817 ;
10818 return 0;
10819}
10820_ACEOF
81ecdfbb 10821if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10822 gdb_cv_have_pt_getxmmregs=yes
3862412b 10823else
81ecdfbb 10824 gdb_cv_have_pt_getxmmregs=no
3862412b 10825fi
81ecdfbb 10826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10827fi
10828
81ecdfbb
RW
10829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10830$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10831if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10832
81ecdfbb 10833$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10834
97bf5e38 10835fi
3862412b 10836
05b4bd79 10837# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
10838
10839if test "${target}" = "${host}"; then
10840 case "${host}" in
05b4bd79 10841 *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10842
81ecdfbb 10843$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10844
10845 ;;
c162e8c9 10846 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10847
81ecdfbb 10848$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10849
10850 ;;
10851 mips-sgi-irix5*)
10852 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10853
81ecdfbb 10854$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10855
10856 ;;
10857 esac
10858fi
10859
10860if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10862$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10863 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10864 $as_echo_n "(cached) " >&6
bec39cab 10865else
81ecdfbb 10866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10867/* end confdefs.h. */
596c9d4b
KB
10868
10869#define _SYSCALL32
d30c5336
JK
10870/* Needed for new procfs interface on sparc-solaris. */
10871#define _STRUCTURED_PROC 1
596c9d4b 10872#include <sys/procfs.h>
bec39cab
AC
10873int
10874main ()
10875{
97bf5e38 10876pstatus_t avar
bec39cab
AC
10877 ;
10878 return 0;
10879}
10880_ACEOF
81ecdfbb 10881if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10882 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10883else
81ecdfbb 10884 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10885
596c9d4b 10886fi
81ecdfbb 10887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10888fi
10889
97bf5e38 10890 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10891
81ecdfbb 10892$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10893
10894 fi
81ecdfbb
RW
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10896$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10897
81ecdfbb
RW
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10899$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10900 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10901 $as_echo_n "(cached) " >&6
596c9d4b 10902else
81ecdfbb 10903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10904/* end confdefs.h. */
596c9d4b
KB
10905
10906#define _SYSCALL32
d30c5336
JK
10907/* Needed for new procfs interface on sparc-solaris. */
10908#define _STRUCTURED_PROC 1
596c9d4b 10909#include <sys/procfs.h>
bec39cab
AC
10910int
10911main ()
10912{
97bf5e38 10913prrun_t avar
bec39cab
AC
10914 ;
10915 return 0;
10916}
10917_ACEOF
81ecdfbb 10918if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10919 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10920else
81ecdfbb 10921 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10922
596c9d4b 10923fi
81ecdfbb 10924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10925fi
10926
97bf5e38 10927 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10928
81ecdfbb 10929$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10930
10931 fi
81ecdfbb
RW
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10933$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10934
81ecdfbb
RW
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10936$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10937 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10938 $as_echo_n "(cached) " >&6
596c9d4b 10939else
81ecdfbb 10940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10941/* end confdefs.h. */
596c9d4b
KB
10942
10943#define _SYSCALL32
d30c5336
JK
10944/* Needed for new procfs interface on sparc-solaris. */
10945#define _STRUCTURED_PROC 1
596c9d4b 10946#include <sys/procfs.h>
bec39cab
AC
10947int
10948main ()
10949{
97bf5e38 10950gregset_t avar
bec39cab
AC
10951 ;
10952 return 0;
10953}
10954_ACEOF
81ecdfbb 10955if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10956 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10957else
81ecdfbb 10958 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10959
596c9d4b 10960fi
81ecdfbb 10961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10962fi
10963
97bf5e38 10964 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10965
81ecdfbb 10966$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10967
10968 fi
81ecdfbb
RW
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10970$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10971
81ecdfbb
RW
10972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10973$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10974 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10975 $as_echo_n "(cached) " >&6
d84dd0c5 10976else
81ecdfbb 10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10978/* end confdefs.h. */
97bf5e38
MK
10979
10980#define _SYSCALL32
d30c5336
JK
10981/* Needed for new procfs interface on sparc-solaris. */
10982#define _STRUCTURED_PROC 1
d84dd0c5 10983#include <sys/procfs.h>
bec39cab
AC
10984int
10985main ()
10986{
97bf5e38 10987fpregset_t avar
bec39cab
AC
10988 ;
10989 return 0;
10990}
10991_ACEOF
81ecdfbb 10992if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10993 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10994else
81ecdfbb 10995 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10996
d84dd0c5 10997fi
81ecdfbb 10998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10999fi
11000
97bf5e38 11001 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11002
81ecdfbb 11003$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11004
97bf5e38 11005 fi
81ecdfbb
RW
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11007$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11008
81ecdfbb
RW
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11010$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11011 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11012 $as_echo_n "(cached) " >&6
c906108c 11013else
81ecdfbb 11014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11015/* end confdefs.h. */
c906108c 11016
97bf5e38 11017#define _SYSCALL32
d30c5336
JK
11018/* Needed for new procfs interface on sparc-solaris. */
11019#define _STRUCTURED_PROC 1
97bf5e38 11020#include <sys/procfs.h>
bec39cab
AC
11021int
11022main ()
11023{
97bf5e38 11024prgregset_t avar
bec39cab
AC
11025 ;
11026 return 0;
11027}
11028_ACEOF
81ecdfbb 11029if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11030 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11031else
81ecdfbb 11032 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11033
c906108c 11034fi
81ecdfbb 11035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11036fi
11037
97bf5e38 11038 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11039
81ecdfbb 11040$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11041
97bf5e38 11042 fi
81ecdfbb
RW
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11044$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11045
81ecdfbb
RW
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11047$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11048 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11049 $as_echo_n "(cached) " >&6
d45fe813 11050else
81ecdfbb 11051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11052/* end confdefs.h. */
97bf5e38
MK
11053
11054#define _SYSCALL32
d30c5336
JK
11055/* Needed for new procfs interface on sparc-solaris. */
11056#define _STRUCTURED_PROC 1
97bf5e38 11057#include <sys/procfs.h>
bec39cab
AC
11058int
11059main ()
11060{
97bf5e38 11061prfpregset_t avar
bec39cab
AC
11062 ;
11063 return 0;
11064}
11065_ACEOF
81ecdfbb 11066if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11067 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11068else
81ecdfbb 11069 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11070
d45fe813 11071fi
81ecdfbb 11072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11073fi
11074
97bf5e38 11075 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11076
81ecdfbb 11077$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11078
97bf5e38 11079 fi
81ecdfbb
RW
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11081$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11082
81ecdfbb
RW
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11084$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11085 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11086 $as_echo_n "(cached) " >&6
d45fe813 11087else
81ecdfbb 11088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11089/* end confdefs.h. */
97bf5e38
MK
11090
11091#define _SYSCALL32
d30c5336
JK
11092/* Needed for new procfs interface on sparc-solaris. */
11093#define _STRUCTURED_PROC 1
97bf5e38 11094#include <sys/procfs.h>
bec39cab
AC
11095int
11096main ()
11097{
97bf5e38 11098prgregset32_t avar
bec39cab
AC
11099 ;
11100 return 0;
11101}
11102_ACEOF
81ecdfbb 11103if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11104 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11105else
81ecdfbb 11106 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11107
d45fe813 11108fi
81ecdfbb 11109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11110fi
11111
97bf5e38 11112 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11113
81ecdfbb 11114$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11115
97bf5e38 11116 fi
81ecdfbb
RW
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11118$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11119
81ecdfbb
RW
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
11121$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
11122 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
11123 $as_echo_n "(cached) " >&6
d45fe813 11124else
81ecdfbb 11125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11126/* end confdefs.h. */
97bf5e38
MK
11127
11128#define _SYSCALL32
d30c5336
JK
11129/* Needed for new procfs interface on sparc-solaris. */
11130#define _STRUCTURED_PROC 1
97bf5e38 11131#include <sys/procfs.h>
bec39cab
AC
11132int
11133main ()
11134{
97bf5e38 11135prfpregset32_t avar
bec39cab
AC
11136 ;
11137 return 0;
11138}
11139_ACEOF
81ecdfbb 11140if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11141 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 11142else
81ecdfbb 11143 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 11144
d45fe813 11145fi
81ecdfbb 11146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11147fi
11148
97bf5e38 11149 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 11150
81ecdfbb 11151$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 11152
97bf5e38 11153 fi
81ecdfbb
RW
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
11155$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 11156
81ecdfbb
RW
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11158$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11159 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11160 $as_echo_n "(cached) " >&6
d45fe813 11161else
81ecdfbb 11162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11163/* end confdefs.h. */
97bf5e38 11164
d45fe813 11165#define _SYSCALL32
d30c5336
JK
11166/* Needed for new procfs interface on sparc-solaris. */
11167#define _STRUCTURED_PROC 1
97bf5e38 11168#include <sys/procfs.h>
bec39cab
AC
11169int
11170main ()
11171{
97bf5e38 11172lwpid_t avar
bec39cab
AC
11173 ;
11174 return 0;
11175}
11176_ACEOF
81ecdfbb 11177if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11178 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11179else
81ecdfbb 11180 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11181
d45fe813 11182fi
81ecdfbb 11183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11184fi
11185
97bf5e38 11186 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11187
81ecdfbb 11188$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11189
97bf5e38 11190 fi
81ecdfbb
RW
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11192$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11193
81ecdfbb
RW
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11195$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11196 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11197 $as_echo_n "(cached) " >&6
c906108c 11198else
81ecdfbb 11199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11200/* end confdefs.h. */
c906108c 11201
97bf5e38 11202#define _SYSCALL32
d30c5336
JK
11203/* Needed for new procfs interface on sparc-solaris. */
11204#define _STRUCTURED_PROC 1
97bf5e38 11205#include <sys/procfs.h>
bec39cab
AC
11206int
11207main ()
11208{
97bf5e38 11209psaddr_t avar
bec39cab
AC
11210 ;
11211 return 0;
11212}
11213_ACEOF
81ecdfbb 11214if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11215 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11216else
81ecdfbb 11217 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11218
c906108c 11219fi
81ecdfbb 11220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11221fi
11222
97bf5e38 11223 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11224
81ecdfbb 11225$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11226
97bf5e38 11227 fi
81ecdfbb
RW
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11229$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11230
81ecdfbb
RW
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11232$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11233 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11234 $as_echo_n "(cached) " >&6
c906108c 11235else
81ecdfbb 11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11237/* end confdefs.h. */
c906108c 11238
97bf5e38 11239#define _SYSCALL32
d30c5336
JK
11240/* Needed for new procfs interface on sparc-solaris. */
11241#define _STRUCTURED_PROC 1
97bf5e38 11242#include <sys/procfs.h>
bec39cab
AC
11243int
11244main ()
11245{
97bf5e38 11246prsysent_t avar
bec39cab
AC
11247 ;
11248 return 0;
11249}
11250_ACEOF
81ecdfbb 11251if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11252 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11253else
81ecdfbb 11254 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11255
c906108c 11256fi
81ecdfbb 11257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11258fi
11259
97bf5e38 11260 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11261
81ecdfbb 11262$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11263
97bf5e38 11264 fi
81ecdfbb
RW
11265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11266$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11267
81ecdfbb
RW
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11269$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11270 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11271 $as_echo_n "(cached) " >&6
c906108c 11272else
81ecdfbb 11273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11274/* end confdefs.h. */
c906108c 11275
97bf5e38 11276#define _SYSCALL32
d30c5336
JK
11277/* Needed for new procfs interface on sparc-solaris. */
11278#define _STRUCTURED_PROC 1
97bf5e38 11279#include <sys/procfs.h>
bec39cab
AC
11280int
11281main ()
11282{
97bf5e38 11283pr_sigset_t avar
bec39cab
AC
11284 ;
11285 return 0;
11286}
11287_ACEOF
81ecdfbb 11288if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11289 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11290else
81ecdfbb 11291 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11292
c906108c 11293fi
81ecdfbb 11294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11295fi
11296
97bf5e38 11297 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11298
81ecdfbb 11299$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11300
97bf5e38 11301 fi
81ecdfbb
RW
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11303$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11304
81ecdfbb
RW
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11306$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11307 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11308 $as_echo_n "(cached) " >&6
c906108c 11309else
81ecdfbb 11310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11311/* end confdefs.h. */
c906108c 11312
97bf5e38 11313#define _SYSCALL32
d30c5336
JK
11314/* Needed for new procfs interface on sparc-solaris. */
11315#define _STRUCTURED_PROC 1
97bf5e38 11316#include <sys/procfs.h>
bec39cab
AC
11317int
11318main ()
11319{
97bf5e38 11320pr_sigaction64_t avar
bec39cab
AC
11321 ;
11322 return 0;
11323}
11324_ACEOF
81ecdfbb 11325if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11326 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11327else
81ecdfbb 11328 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11329
c906108c 11330fi
81ecdfbb 11331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11332fi
11333
97bf5e38 11334 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11335
81ecdfbb 11336$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11337
97bf5e38 11338 fi
81ecdfbb
RW
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11340$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11341
81ecdfbb
RW
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11343$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11344 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11345 $as_echo_n "(cached) " >&6
97bf5e38 11346else
81ecdfbb 11347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11348/* end confdefs.h. */
97bf5e38
MK
11349
11350#define _SYSCALL32
d30c5336
JK
11351/* Needed for new procfs interface on sparc-solaris. */
11352#define _STRUCTURED_PROC 1
97bf5e38 11353#include <sys/procfs.h>
bec39cab
AC
11354int
11355main ()
11356{
97bf5e38 11357pr_siginfo64_t avar
bec39cab
AC
11358 ;
11359 return 0;
11360}
11361_ACEOF
81ecdfbb 11362if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11363 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11364else
81ecdfbb 11365 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11366
97bf5e38 11367fi
81ecdfbb 11368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11369fi
c906108c 11370
97bf5e38 11371 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11372
81ecdfbb 11373$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11374
97bf5e38 11375 fi
81ecdfbb
RW
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11377$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11378
11379
97bf5e38
MK
11380
11381
11382
97bf5e38 11383 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11385$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11386 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11387 $as_echo_n "(cached) " >&6
c906108c 11388else
81ecdfbb 11389 if test "$cross_compiling" = yes; then :
97bf5e38 11390 gdb_cv_prfpregset_t_broken=yes
c906108c 11391else
81ecdfbb 11392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11393/* end confdefs.h. */
97bf5e38
MK
11394#include <sys/procfs.h>
11395 int main ()
11396 {
11397 if (sizeof (prfpregset_t) == sizeof (void *))
11398 return 1;
11399 return 0;
11400 }
bec39cab 11401_ACEOF
81ecdfbb 11402if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11403 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11404else
11405 gdb_cv_prfpregset_t_broken=yes
c906108c 11406fi
81ecdfbb
RW
11407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11408 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11409fi
81ecdfbb 11410
c906108c
SS
11411fi
11412
81ecdfbb
RW
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11414$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11415 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11416
81ecdfbb 11417$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11418
97bf5e38
MK
11419 fi
11420 fi
c906108c 11421
bec39cab 11422
81ecdfbb
RW
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11424$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11425 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11426 $as_echo_n "(cached) " >&6
c906108c 11427else
81ecdfbb 11428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11429/* end confdefs.h. */
97bf5e38
MK
11430#include <unistd.h>
11431#include <sys/types.h>
11432#include <sys/procfs.h>
11433
bec39cab
AC
11434int
11435main ()
11436{
97bf5e38
MK
11437
11438 int dummy;;
11439 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11440
11441 ;
11442 return 0;
11443}
11444_ACEOF
81ecdfbb 11445if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11446 gdb_cv_have_procfs_piocset=yes
c906108c 11447else
81ecdfbb 11448 gdb_cv_have_procfs_piocset=no
c906108c 11449fi
81ecdfbb 11450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11451fi
97bf5e38 11452
81ecdfbb
RW
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11454$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11455 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11456
81ecdfbb 11457$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11458
11459 fi
c906108c 11460fi
c906108c 11461
97bf5e38 11462if test ${host} = ${target} ; then
bec39cab 11463
81ecdfbb
RW
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11465$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11466 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11467 $as_echo_n "(cached) " >&6
bec39cab 11468else
81ecdfbb 11469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11470/* end confdefs.h. */
97bf5e38 11471#include <link.h>
bec39cab
AC
11472int
11473main ()
11474{
97bf5e38 11475struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11476 ;
11477 return 0;
11478}
11479_ACEOF
81ecdfbb 11480if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11481 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11482else
81ecdfbb 11483 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11484fi
81ecdfbb 11485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11486fi
11487
81ecdfbb
RW
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11489$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11490 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11491
81ecdfbb 11492$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11493
11494 fi
11495
bec39cab 11496
81ecdfbb
RW
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11498$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11499 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11500 $as_echo_n "(cached) " >&6
c906108c 11501else
81ecdfbb 11502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11503/* end confdefs.h. */
97bf5e38
MK
11504#include <sys/types.h>
11505#include <link.h>
bec39cab
AC
11506int
11507main ()
11508{
97bf5e38 11509struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11510 ;
11511 return 0;
11512}
11513_ACEOF
81ecdfbb 11514if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11515 gdb_cv_have_struct_link_map_with_lm_members=yes
11516else
81ecdfbb 11517 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11518fi
81ecdfbb 11519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11520fi
c906108c 11521
81ecdfbb
RW
11522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11523$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11524 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11525
81ecdfbb 11526$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11527
11528 fi
11529
bec39cab 11530
81ecdfbb
RW
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11532$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11533 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11534 $as_echo_n "(cached) " >&6
c906108c 11535else
81ecdfbb 11536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11537/* end confdefs.h. */
97bf5e38
MK
11538#include <sys/types.h>
11539#ifdef HAVE_NLIST_H
11540#include <nlist.h>
11541#endif
11542#include <link.h>
bec39cab
AC
11543int
11544main ()
11545{
97bf5e38 11546struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11547 ;
11548 return 0;
11549}
11550_ACEOF
81ecdfbb 11551if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11552 gdb_cv_have_struct_so_map_with_som_members=yes
11553else
81ecdfbb 11554 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11555fi
81ecdfbb 11556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11557fi
c906108c 11558
81ecdfbb
RW
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11560$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11561 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11562
81ecdfbb 11563$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11564
97bf5e38 11565 fi
c906108c 11566
bec39cab 11567
81ecdfbb
RW
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11569$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11570 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11571 $as_echo_n "(cached) " >&6
97bf5e38 11572else
81ecdfbb 11573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11574/* end confdefs.h. */
97bf5e38
MK
11575#define _SYSCALL32
11576#include <sys/link.h>
bec39cab
AC
11577int
11578main ()
11579{
97bf5e38 11580struct link_map32 l;
bec39cab
AC
11581 ;
11582 return 0;
11583}
11584_ACEOF
81ecdfbb 11585if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11586 gdb_cv_have_struct_link_map32=yes
11587else
81ecdfbb 11588 gdb_cv_have_struct_link_map32=no
97bf5e38 11589fi
81ecdfbb 11590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11591fi
c906108c 11592
81ecdfbb
RW
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11594$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11595 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11596
81ecdfbb 11597$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11598
60ca704f 11599
81ecdfbb 11600$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11601
97bf5e38
MK
11602 fi
11603fi
c906108c 11604
bc8bcb4b 11605# Check if the compiler supports the `long long' type.
c906108c 11606
81ecdfbb
RW
11607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11608$as_echo_n "checking for long long support in compiler... " >&6; }
11609if test "${gdb_cv_c_long_long+set}" = set; then :
11610 $as_echo_n "(cached) " >&6
97bf5e38 11611else
81ecdfbb 11612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11613/* end confdefs.h. */
bc8bcb4b 11614extern long long foo;
bec39cab
AC
11615int
11616main ()
11617{
bc8bcb4b 11618switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11619 ;
11620 return 0;
11621}
11622_ACEOF
81ecdfbb 11623if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11624 gdb_cv_c_long_long=yes
11625else
81ecdfbb 11626 gdb_cv_c_long_long=no
97bf5e38 11627fi
81ecdfbb 11628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11629fi
81ecdfbb
RW
11630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11631$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
11632if test $gdb_cv_c_long_long != yes; then
11633 # libdecnumber requires long long.
11634 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
11635fi
11636
bc8bcb4b 11637# Check if the compiler and runtime support printing long longs.
97bf5e38 11638
81ecdfbb
RW
11639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11640$as_echo_n "checking for long long support in printf... " >&6; }
11641if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11642 $as_echo_n "(cached) " >&6
97bf5e38 11643else
81ecdfbb 11644 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11645 gdb_cv_printf_has_long_long=no
11646else
81ecdfbb 11647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11648/* end confdefs.h. */
bc8bcb4b
MK
11649$ac_includes_default
11650int
11651main ()
11652{
11653char buf[32];
97bf5e38
MK
11654 long long l = 0;
11655 l = (l << 16) + 0x0123;
11656 l = (l << 16) + 0x4567;
11657 l = (l << 16) + 0x89ab;
11658 l = (l << 16) + 0xcdef;
11659 sprintf (buf, "0x%016llx", l);
11660 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11661 ;
11662 return 0;
c906108c 11663}
bec39cab 11664_ACEOF
81ecdfbb 11665if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11666 gdb_cv_printf_has_long_long=yes
11667else
81ecdfbb 11668 gdb_cv_printf_has_long_long=no
97bf5e38 11669fi
81ecdfbb
RW
11670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11671 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11672fi
81ecdfbb 11673
97bf5e38 11674fi
81ecdfbb
RW
11675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11676$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11677if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11678
81ecdfbb 11679$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11680
11681fi
97bf5e38 11682
1a619819
LM
11683# Check if the compiler and runtime support printing decfloats.
11684
81ecdfbb
RW
11685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11686$as_echo_n "checking for decfloat support in printf... " >&6; }
11687if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11688 $as_echo_n "(cached) " >&6
1a619819 11689else
81ecdfbb 11690 if test "$cross_compiling" = yes; then :
1a619819
LM
11691 gdb_cv_printf_has_decfloat=no
11692else
81ecdfbb 11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11694/* end confdefs.h. */
11695$ac_includes_default
11696int
11697main ()
11698{
11699char buf[64];
11700 _Decimal32 d32 = 1.2345df;
11701 _Decimal64 d64 = 1.2345dd;
11702 _Decimal128 d128 = 1.2345dl;
11703 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11704 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11705 ;
11706 return 0;
11707}
11708_ACEOF
81ecdfbb 11709if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11710 gdb_cv_printf_has_decfloat=yes
11711else
81ecdfbb 11712 gdb_cv_printf_has_decfloat=no
1a619819 11713fi
81ecdfbb
RW
11714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11715 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11716fi
81ecdfbb 11717
1a619819 11718fi
81ecdfbb
RW
11719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11720$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11721if test $gdb_cv_printf_has_decfloat = yes; then
11722
81ecdfbb 11723$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11724
11725fi
11726
bc8bcb4b
MK
11727# Check if the compiler supports the `long double' type. We can't use
11728# AC_C_LONG_DOUBLE because that one does additional checks on the
11729# constants defined in <float.h> that fail on some systems,
11730# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11731
81ecdfbb
RW
11732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11733$as_echo_n "checking for long double support in compiler... " >&6; }
11734if test "${gdb_cv_c_long_double+set}" = set; then :
11735 $as_echo_n "(cached) " >&6
97bf5e38 11736else
81ecdfbb 11737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11738/* end confdefs.h. */
97bf5e38 11739long double foo;
bec39cab 11740_ACEOF
81ecdfbb 11741if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11742 gdb_cv_c_long_double=yes
97bf5e38 11743else
81ecdfbb 11744 gdb_cv_c_long_double=no
97bf5e38 11745fi
81ecdfbb 11746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11747fi
81ecdfbb
RW
11748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11749$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11750if test $gdb_cv_c_long_double = yes; then
c906108c 11751
81ecdfbb 11752$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11753
11754fi
11755
bc8bcb4b 11756# Check if the compiler and runtime support printing long doubles.
97bf5e38 11757
81ecdfbb
RW
11758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11759$as_echo_n "checking for long double support in printf... " >&6; }
11760if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11761 $as_echo_n "(cached) " >&6
97bf5e38 11762else
81ecdfbb 11763 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11764 gdb_cv_printf_has_long_double=no
11765else
81ecdfbb 11766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11767/* end confdefs.h. */
bc8bcb4b
MK
11768$ac_includes_default
11769int
11770main ()
11771{
11772char buf[16];
97bf5e38
MK
11773 long double f = 3.141592653;
11774 sprintf (buf, "%Lg", f);
11775 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11776 ;
11777 return 0;
97bf5e38 11778}
bec39cab 11779_ACEOF
81ecdfbb 11780if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11781 gdb_cv_printf_has_long_double=yes
c906108c 11782else
81ecdfbb 11783 gdb_cv_printf_has_long_double=no
c906108c 11784fi
81ecdfbb
RW
11785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11786 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11787fi
81ecdfbb 11788
c906108c 11789fi
81ecdfbb
RW
11790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11791$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11792if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11793
81ecdfbb 11794$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11795
11796fi
97bf5e38 11797
bc8bcb4b 11798# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11799
81ecdfbb
RW
11800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11801$as_echo_n "checking for long double support in scanf... " >&6; }
11802if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11803 $as_echo_n "(cached) " >&6
97bf5e38 11804else
81ecdfbb 11805 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11806 gdb_cv_scanf_has_long_double=no
11807else
81ecdfbb 11808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11809/* end confdefs.h. */
bc8bcb4b
MK
11810#include <stdio.h>
11811int
11812main ()
11813{
11814char *buf = "3.141592653";
97bf5e38
MK
11815 long double f = 0;
11816 sscanf (buf, "%Lg", &f);
11817 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11818 ;
11819 return 0;
97bf5e38 11820}
bec39cab 11821_ACEOF
81ecdfbb 11822if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11823 gdb_cv_scanf_has_long_double=yes
11824else
81ecdfbb 11825 gdb_cv_scanf_has_long_double=no
97bf5e38 11826fi
81ecdfbb
RW
11827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11828 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11829fi
81ecdfbb 11830
c906108c 11831fi
81ecdfbb
RW
11832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11833$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11834if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11835
81ecdfbb 11836$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11837
11838fi
c906108c 11839
438013df
AO
11840case ${host_os} in
11841aix*)
81ecdfbb
RW
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11843$as_echo_n "checking for -bbigtoc option... " >&6; }
11844if test "${gdb_cv_bigtoc+set}" = set; then :
11845 $as_echo_n "(cached) " >&6
438013df 11846else
bec39cab 11847
438013df
AO
11848 SAVE_LDFLAGS=$LDFLAGS
11849
11850 case $GCC in
11851 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11852 *) gdb_cv_bigtoc=-bbigtoc ;;
11853 esac
11854
11855 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11857/* end confdefs.h. */
438013df 11858
bec39cab
AC
11859int
11860main ()
11861{
438013df 11862int i;
bec39cab
AC
11863 ;
11864 return 0;
11865}
11866_ACEOF
81ecdfbb 11867if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11868
81ecdfbb
RW
11869else
11870 gdb_cv_bigtoc=
438013df 11871fi
81ecdfbb
RW
11872rm -f core conftest.err conftest.$ac_objext \
11873 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11874 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11875
bec39cab 11876fi
81ecdfbb
RW
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11878$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11879 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11880 ;;
11881esac
11882
38f6b338 11883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11884$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11885dynamic_list=false
11886if test "${gdb_native}" = yes; then
11887 # The dynamically loaded libthread_db needs access to symbols in the gdb
11888 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11889 # may not be supported there.
11890 old_LDFLAGS="$LDFLAGS"
11891 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11892 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11893 LDFLAGS="$LDFLAGS $RDYNAMIC"
11894 if test "${have_libpython}" = no; then
11895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11896/* end confdefs.h. */
11897
11898int
11899main ()
11900{
11901
11902 ;
11903 return 0;
11904}
11905_ACEOF
11906if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11907 dynamic_list=true
11908fi
11909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11911 else
11912 # Workaround http://bugs.python.org/issue4434 where static
11913 # libpythonX.Y.a would get its symbols required for
11914 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11915 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11916 old_CFLAGS="$CFLAGS"
11917 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
11918 old_LIBS="$LIBS"
11919 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 11920 if test "$cross_compiling" = yes; then :
3bebe2f2 11921 true
f6528abd 11922else
3bebe2f2
JK
11923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11924/* end confdefs.h. */
11925#include "${have_libpython}/Python.h"
11926int
11927main ()
11928{
11929int err;
38f6b338
JK
11930 Py_Initialize ();
11931 err = PyRun_SimpleString ("import itertools\n");
11932 Py_Finalize ();
11933 return err == 0 ? 0 : 1;
3bebe2f2
JK
11934 ;
11935 return 0;
11936}
11937_ACEOF
11938if ac_fn_c_try_run "$LINENO"; then :
11939 dynamic_list=true
11940fi
11941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11942 conftest.$ac_objext conftest.beam conftest.$ac_ext
11943fi
11944
8c1fb155 11945 LIBS="$old_LIBS"
38f6b338
JK
11946 CFLAGS="$old_CFLAGS"
11947 fi
11948 LDFLAGS="$old_LDFLAGS"
11949fi
11950if $dynamic_list; then
11951 found="-Wl,--dynamic-list"
11952 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11953else
38f6b338
JK
11954 found="-rdynamic"
11955 RDYNAMIC="-rdynamic"
f6528abd 11956fi
f6528abd 11957
38f6b338 11958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11959$as_echo "$found" >&6; }
0407b3f1 11960
f6528abd 11961
0407b3f1 11962if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11963 case ${host_os} in
c906108c 11964 solaris*)
d92419e5
JB
11965 # See if thread_db library is around for Solaris thread debugging.
11966 # Note that we must explicitly test for version 1 of the library
11967 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11968 # the same API.
81ecdfbb
RW
11969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11970$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11971 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11973$as_echo "yes" >&6; }
60ca704f 11974
81ecdfbb 11975$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11976
3483b318 11977 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11978 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11980$as_echo_n "checking for dlopen in -ldl... " >&6; }
11981if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11982 $as_echo_n "(cached) " >&6
c906108c 11983else
bec39cab 11984 ac_check_lib_save_LIBS=$LIBS
c906108c 11985LIBS="-ldl $LIBS"
81ecdfbb 11986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11987/* end confdefs.h. */
11988
81ecdfbb
RW
11989/* Override any GCC internal prototype to avoid an error.
11990 Use char because int might match the return type of a GCC
11991 builtin and then its argument prototype would still apply. */
bec39cab
AC
11992#ifdef __cplusplus
11993extern "C"
11994#endif
bec39cab
AC
11995char dlopen ();
11996int
11997main ()
11998{
81ecdfbb 11999return dlopen ();
bec39cab
AC
12000 ;
12001 return 0;
12002}
12003_ACEOF
81ecdfbb 12004if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12005 ac_cv_lib_dl_dlopen=yes
12006else
81ecdfbb 12007 ac_cv_lib_dl_dlopen=no
bec39cab 12008fi
81ecdfbb
RW
12009rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12011LIBS=$ac_check_lib_save_LIBS
12012fi
81ecdfbb
RW
12013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12014$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12015if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12016 cat >>confdefs.h <<_ACEOF
12017#define HAVE_LIBDL 1
12018_ACEOF
c906108c
SS
12019
12020 LIBS="-ldl $LIBS"
12021
c906108c
SS
12022fi
12023
f6528abd 12024 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12025 # Sun randomly tweaked the prototypes in <proc_service.h>
12026 # at one point.
81ecdfbb
RW
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12028$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12029 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12030 $as_echo_n "(cached) " >&6
c906108c 12031else
bec39cab 12032
81ecdfbb 12033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12034/* end confdefs.h. */
c906108c
SS
12035
12036 #include <proc_service.h>
12037 ps_err_e ps_pdwrite
12038 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12039
bec39cab
AC
12040int
12041main ()
12042{
12043
12044 ;
12045 return 0;
12046}
12047_ACEOF
81ecdfbb 12048if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12049 gdb_cv_proc_service_is_old=no
12050else
81ecdfbb 12051 gdb_cv_proc_service_is_old=yes
c906108c 12052fi
81ecdfbb 12053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12054
c906108c
SS
12055fi
12056
81ecdfbb
RW
12057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12058$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12059 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12060
81ecdfbb 12061$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12062
12063 fi
12064 else
81ecdfbb
RW
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12066$as_echo "no" >&6; }
c906108c
SS
12067 fi
12068 ;;
d92419e5 12069 aix*)
81ecdfbb
RW
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12071$as_echo_n "checking for AiX thread debugging library... " >&6; }
12072 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12073 $as_echo_n "(cached) " >&6
bec39cab 12074else
81ecdfbb 12075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12076/* end confdefs.h. */
d92419e5 12077#include <sys/pthdebug.h>
bec39cab
AC
12078int
12079main ()
12080{
d92419e5
JB
12081#ifndef PTHDB_VERSION_3
12082 #error
12083 #endif
bec39cab
AC
12084 ;
12085 return 0;
12086}
12087_ACEOF
81ecdfbb 12088if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12089 gdb_cv_have_aix_thread_debug=yes
12090else
81ecdfbb 12091 gdb_cv_have_aix_thread_debug=no
d92419e5 12092fi
81ecdfbb 12093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12094fi
12095
81ecdfbb
RW
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12097$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12098 if test $gdb_cv_have_aix_thread_debug = yes; then
12099 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12100 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12101 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12102
12103 # Older versions of AIX do not provide the declaration for
12104 # the getthrds function (it appears that it was introduced
12105 # with AIX 6.x).
12106 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12107"
12108if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12109 ac_have_decl=1
12110else
12111 ac_have_decl=0
12112fi
12113
12114cat >>confdefs.h <<_ACEOF
12115#define HAVE_DECL_GETTHRDS $ac_have_decl
12116_ACEOF
12117
d92419e5
JB
12118 fi
12119 ;;
c906108c 12120 esac
bec39cab 12121
c906108c
SS
12122fi
12123
3f47be5c 12124if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12126$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12127if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12128 $as_echo_n "(cached) " >&6
bec39cab 12129else
81ecdfbb 12130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12131/* end confdefs.h. */
3f47be5c 12132#include <thread_db.h>
bec39cab
AC
12133int
12134main ()
12135{
3f47be5c 12136int i = TD_NOTALLOC;
bec39cab
AC
12137 ;
12138 return 0;
12139}
12140_ACEOF
81ecdfbb 12141if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12142 gdb_cv_thread_db_h_has_td_notalloc=yes
12143else
81ecdfbb 12144 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12145
3f47be5c 12146fi
81ecdfbb 12147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12148
bec39cab 12149fi
81ecdfbb
RW
12150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12151$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12153$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12154if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12155 $as_echo_n "(cached) " >&6
59f80f10 12156else
81ecdfbb 12157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12158/* end confdefs.h. */
12159#include <thread_db.h>
12160int
12161main ()
12162{
12163int i = TD_VERSION;
12164 ;
12165 return 0;
12166}
12167_ACEOF
81ecdfbb 12168if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12169 gdb_cv_thread_db_h_has_td_version=yes
12170else
81ecdfbb 12171 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12172
12173fi
81ecdfbb 12174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12175
12176fi
81ecdfbb
RW
12177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12178$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12180$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12181if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12182 $as_echo_n "(cached) " >&6
59f80f10 12183else
81ecdfbb 12184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12185/* end confdefs.h. */
12186#include <thread_db.h>
12187int
12188main ()
12189{
12190int i = TD_NOTLS;
12191 ;
12192 return 0;
12193}
12194_ACEOF
81ecdfbb 12195if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12196 gdb_cv_thread_db_h_has_td_notls=yes
12197else
81ecdfbb 12198 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12199
12200fi
81ecdfbb 12201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12202
12203fi
81ecdfbb
RW
12204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12205$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12206fi
12207if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12208
81ecdfbb 12209$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12210
59f80f10
DJ
12211fi
12212if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12213
81ecdfbb 12214$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12215
12216fi
12217if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12218
81ecdfbb 12219$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12220
3f47be5c
EZ
12221fi
12222
b757528f 12223if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12225$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12226if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12227 $as_echo_n "(cached) " >&6
bec39cab 12228else
81ecdfbb 12229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12230/* end confdefs.h. */
b757528f 12231#include <sys/syscall.h>
bec39cab
AC
12232int
12233main ()
12234{
b757528f 12235int i = __NR_tkill;
bec39cab
AC
12236 ;
12237 return 0;
12238}
12239_ACEOF
81ecdfbb 12240if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12241 gdb_cv_sys_syscall_h_has_tkill=yes
12242else
81ecdfbb 12243 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12244
b757528f 12245fi
81ecdfbb 12246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12247
bec39cab 12248fi
81ecdfbb
RW
12249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12250$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12251fi
12252if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12253
81ecdfbb 12254$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12255
12256fi
12257
81ecdfbb
RW
12258ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12259"
12260if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12261 ac_have_decl=1
10568435 12262else
81ecdfbb 12263 ac_have_decl=0
10568435 12264fi
10568435
JK
12265
12266cat >>confdefs.h <<_ACEOF
81ecdfbb 12267#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12268_ACEOF
12269
12270
81ecdfbb
RW
12271if test "$cross_compiling" = yes; then :
12272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12273/* end confdefs.h. */
12274#include <sys/personality.h>
12275int
12276main ()
12277{
12278
12279# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12280# define ADDR_NO_RANDOMIZE 0x0040000
12281# endif
12282 /* Test the flag could be set and stays set. */
12283 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12284 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12285 return 1
12286 ;
12287 return 0;
12288}
12289_ACEOF
81ecdfbb 12290if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12291 have_personality=true
12292else
81ecdfbb 12293 have_personality=false
10568435 12294fi
81ecdfbb
RW
12295rm -f core conftest.err conftest.$ac_objext \
12296 conftest$ac_exeext conftest.$ac_ext
10568435 12297else
81ecdfbb 12298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12299/* end confdefs.h. */
12300#include <sys/personality.h>
12301int
12302main ()
12303{
12304
12305# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12306# define ADDR_NO_RANDOMIZE 0x0040000
12307# endif
12308 /* Test the flag could be set and stays set. */
12309 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12310 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12311 return 1
12312 ;
12313 return 0;
12314}
12315_ACEOF
81ecdfbb 12316if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12317 have_personality=true
12318else
81ecdfbb 12319 have_personality=false
10568435 12320fi
81ecdfbb
RW
12321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12322 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12323fi
81ecdfbb 12324
10568435
JK
12325if $have_personality
12326then
12327
81ecdfbb 12328$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12329
12330fi
12331
e655c1a2
PA
12332case $host_os in
12333 go32* | *djgpp*)
12334 gdbinit=gdb.ini
12335 ;;
12336 *)
12337 gdbinit=.gdbinit
12338 ;;
12339esac
12340
12341cat >>confdefs.h <<_ACEOF
12342#define GDBINIT "$gdbinit"
12343_ACEOF
12344
12345
fb40c209 12346
f83d8a90
DE
12347# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12348# except that the argument to --with-sysroot is optional.
12349# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12350if test "x$with_sysroot" = xyes; then
12351 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12352fi
bec39cab 12353
81ecdfbb
RW
12354# Check whether --with-sysroot was given.
12355if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12356 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12357else
12358 TARGET_SYSTEM_ROOT=
12359fi
030292b7 12360
030292b7 12361
f83d8a90
DE
12362 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12363 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12364 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12365 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12366
f83d8a90
DE
12367cat >>confdefs.h <<_ACEOF
12368#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12369_ACEOF
bec39cab 12370
030292b7 12371
b14b1491 12372
f83d8a90
DE
12373
12374 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12375 if test "x$prefix" = xNONE; then
12376 test_prefix=/usr/local
12377 else
12378 test_prefix=$prefix
12379 fi
12380 else
12381 test_prefix=$exec_prefix
12382 fi
12383 value=0
12384 case ${ac_define_dir} in
12385 "${test_prefix}"|"${test_prefix}/"*|\
12386 '${exec_prefix}'|'${exec_prefix}/'*)
12387 value=1
12388 ;;
12389 esac
12390
12391cat >>confdefs.h <<_ACEOF
12392#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12393_ACEOF
030292b7
DJ
12394
12395
12396
16e7150e 12397
16e7150e 12398
81ecdfbb
RW
12399# Check whether --with-system-gdbinit was given.
12400if test "${with_system_gdbinit+set}" = set; then :
12401 withval=$with_system_gdbinit;
b14b1491
TT
12402 SYSTEM_GDBINIT=$withval
12403else
12404 SYSTEM_GDBINIT=
81ecdfbb
RW
12405fi
12406
16e7150e
JG
12407
12408 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12409 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12410 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12411 ac_define_dir=`eval echo $ac_define_dir`
12412
12413cat >>confdefs.h <<_ACEOF
12414#define SYSTEM_GDBINIT "$ac_define_dir"
12415_ACEOF
12416
12417
12418
0c4a4063 12419
b14b1491
TT
12420 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12421 if test "x$prefix" = xNONE; then
12422 test_prefix=/usr/local
12423 else
12424 test_prefix=$prefix
12425 fi
12426 else
12427 test_prefix=$exec_prefix
12428 fi
12429 value=0
12430 case ${ac_define_dir} in
12431 "${test_prefix}"|"${test_prefix}/"*|\
12432 '${exec_prefix}'|'${exec_prefix}/'*)
12433 value=1
12434 ;;
12435 esac
16e7150e 12436
b14b1491
TT
12437cat >>confdefs.h <<_ACEOF
12438#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12439_ACEOF
12440
b14b1491 12441
16e7150e 12442
0c4a4063 12443
81ecdfbb
RW
12444# Check whether --enable-werror was given.
12445if test "${enable_werror+set}" = set; then :
12446 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12447 yes | y) ERROR_ON_WARNING="yes" ;;
12448 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12449 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12450 esac
81ecdfbb
RW
12451fi
12452
094a342e 12453
a68ffae9
JK
12454# Enable -Werror by default when using gcc. Turn it off for releases.
12455if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12456 ERROR_ON_WARNING=yes
12457fi
12458
12459WERROR_CFLAGS=""
12460if test "${ERROR_ON_WARNING}" = yes ; then
12461 WERROR_CFLAGS="-Werror"
12462fi
12463
aa79a185
DJ
12464# The entries after -Wno-pointer-sign are disabled warnings which may
12465# be enabled in the future, which can not currently be used to build
12466# GDB.
12467# NOTE: If you change this list, remember to update
3b851bce 12468# gdb/doc/gdbint.texinfo.
aa79a185 12469build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 12470-Wpointer-sign \
1cb5e2a4 12471-Wno-unused -Wunused-value -Wunused-function \
352b3eda 12472-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 12473-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 12474-Wold-style-declaration -Wold-style-definition"
a3b362c4 12475
3526781e
DJ
12476# Enable -Wno-format by default when using gcc on mingw since many
12477# GCC versions complain about %I64.
12478case "${host}" in
12479 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 12480 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
12481esac
12482
81ecdfbb
RW
12483# Check whether --enable-build-warnings was given.
12484if test "${enable_build_warnings+set}" = set; then :
12485 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12486 yes) ;;
12487 no) build_warnings="-w";;
12488 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12489 build_warnings="${build_warnings} ${t}";;
12490 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12491 build_warnings="${t} ${build_warnings}";;
12492 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12493esac
d4f3574e 12494if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12495 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12496fi
81ecdfbb
RW
12497fi
12498# Check whether --enable-gdb-build-warnings was given.
12499if test "${enable_gdb_build_warnings+set}" = set; then :
12500 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12501 yes) ;;
12502 no) build_warnings="-w";;
12503 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12504 build_warnings="${build_warnings} ${t}";;
12505 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12506 build_warnings="${t} ${build_warnings}";;
12507 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12508esac
12509if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12510 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12511fi
81ecdfbb
RW
12512fi
12513WARN_CFLAGS=""
c906108c
SS
12514if test "x${build_warnings}" != x -a "x$GCC" = xyes
12515then
81ecdfbb
RW
12516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12517$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12518 # Separate out the -Werror flag as some files just cannot be
12519 # compiled with it enabled.
12520 for w in ${build_warnings}; do
12521 case $w in
12522 -Werr*) WERROR_CFLAGS=-Werror ;;
12523 *) # Check that GCC accepts it
4536bbc6
AC
12524 saved_CFLAGS="$CFLAGS"
12525 CFLAGS="$CFLAGS $w"
81ecdfbb 12526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12527/* end confdefs.h. */
4536bbc6 12528
bec39cab
AC
12529int
12530main ()
12531{
4536bbc6 12532
bec39cab
AC
12533 ;
12534 return 0;
12535}
12536_ACEOF
81ecdfbb 12537if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12538 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12539fi
81ecdfbb 12540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12541 CFLAGS="$saved_CFLAGS"
746a987d
AC
12542 esac
12543 done
81ecdfbb
RW
12544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12545$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12546fi
12547
12548
104c1213 12549
7a292a7a 12550# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12552$as_echo_n "checking for cygwin... " >&6; }
12553if test "${gdb_cv_os_cygwin+set}" = set; then :
12554 $as_echo_n "(cached) " >&6
bec39cab 12555else
81ecdfbb 12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12557/* end confdefs.h. */
7a292a7a
SS
12558
12559#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12560lose
12561#endif
bec39cab 12562_ACEOF
7a292a7a 12563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12564 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12565 gdb_cv_os_cygwin=yes
12566else
7a292a7a
SS
12567 gdb_cv_os_cygwin=no
12568fi
12569rm -f conftest*
12570
12571fi
81ecdfbb
RW
12572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12573$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12574
aff38e61 12575
3eb25fda 12576SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12577case ${host} in
95cbc983
AC
12578 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12579 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12580 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12581esac
12582
12583
cd0fc7c3
SS
12584# libreadline needs libuser32.a in a cygwin environment
12585WIN32LIBS=
12586if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12587 WIN32LIBS="-luser32"
12588 case "${target}" in
12589 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12590 ;;
12591 esac
cd0fc7c3 12592fi
c906108c 12593
b4505029
MM
12594# The ser-tcp.c module requires sockets.
12595case ${host} in
12596 *mingw32*)
12597
81ecdfbb 12598$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12599
12600 WIN32LIBS="$WIN32LIBS -lws2_32"
12601 ;;
12602esac
12603
7a292a7a 12604
31d99776 12605# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
12606
12607 OLD_CFLAGS=$CFLAGS
12608 OLD_LDFLAGS=$LDFLAGS
12609 OLD_LIBS=$LIBS
12610 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12611 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12612 # always want our bfd.
12613 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12614 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12615 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12616 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12617 if test "$plugins" = "yes"; then
a48b32c0
L
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12619$as_echo_n "checking for library containing dlopen... " >&6; }
12620if test "${ac_cv_search_dlopen+set}" = set; then :
12621 $as_echo_n "(cached) " >&6
12622else
12623 ac_func_search_save_LIBS=$LIBS
12624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12625/* end confdefs.h. */
12626
12627/* Override any GCC internal prototype to avoid an error.
12628 Use char because int might match the return type of a GCC
12629 builtin and then its argument prototype would still apply. */
12630#ifdef __cplusplus
12631extern "C"
12632#endif
12633char dlopen ();
12634int
12635main ()
12636{
12637return dlopen ();
12638 ;
12639 return 0;
12640}
12641_ACEOF
12642for ac_lib in '' dl; do
12643 if test -z "$ac_lib"; then
12644 ac_res="none required"
12645 else
12646 ac_res=-l$ac_lib
12647 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12648 fi
12649 if ac_fn_c_try_link "$LINENO"; then :
12650 ac_cv_search_dlopen=$ac_res
12651fi
12652rm -f core conftest.err conftest.$ac_objext \
12653 conftest$ac_exeext
12654 if test "${ac_cv_search_dlopen+set}" = set; then :
12655 break
12656fi
12657done
12658if test "${ac_cv_search_dlopen+set}" = set; then :
12659
12660else
12661 ac_cv_search_dlopen=no
12662fi
12663rm conftest.$ac_ext
12664LIBS=$ac_func_search_save_LIBS
12665fi
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12667$as_echo "$ac_cv_search_dlopen" >&6; }
12668ac_res=$ac_cv_search_dlopen
12669if test "$ac_res" != no; then :
12670 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12671
12672fi
12673
def63ff0
TT
12674 fi
12675 LIBS="-lbfd -liberty $intl $LIBS"
12676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
12677$as_echo_n "checking for ELF support in BFD... " >&6; }
12678if test "${gdb_cv_var_elf+set}" = set; then :
12679 $as_echo_n "(cached) " >&6
31d99776 12680else
81ecdfbb 12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12682/* end confdefs.h. */
12683#include <stdlib.h>
def63ff0
TT
12684 #include "bfd.h"
12685 #include "elf-bfd.h"
31d99776
DJ
12686
12687int
12688main ()
12689{
def63ff0 12690return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
12691 ;
12692 return 0;
12693}
12694_ACEOF
81ecdfbb 12695if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12696 gdb_cv_var_elf=yes
12697else
81ecdfbb 12698 gdb_cv_var_elf=no
31d99776 12699fi
81ecdfbb
RW
12700rm -f core conftest.err conftest.$ac_objext \
12701 conftest$ac_exeext conftest.$ac_ext
31d99776 12702fi
81ecdfbb
RW
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12704$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
12705 CFLAGS=$OLD_CFLAGS
12706 LDFLAGS=$OLD_LDFLAGS
12707 LIBS=$OLD_LIBS
31d99776 12708if test $gdb_cv_var_elf = yes; then
55aa24fb 12709 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12710
81ecdfbb 12711$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12712
075ff26d
JK
12713 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12714 if test "$plugins" = "yes"; then
a48b32c0
L
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12716$as_echo_n "checking for library containing dlopen... " >&6; }
12717if test "${ac_cv_search_dlopen+set}" = set; then :
12718 $as_echo_n "(cached) " >&6
12719else
12720 ac_func_search_save_LIBS=$LIBS
12721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722/* end confdefs.h. */
12723
12724/* Override any GCC internal prototype to avoid an error.
12725 Use char because int might match the return type of a GCC
12726 builtin and then its argument prototype would still apply. */
12727#ifdef __cplusplus
12728extern "C"
12729#endif
12730char dlopen ();
12731int
12732main ()
12733{
12734return dlopen ();
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739for ac_lib in '' dl; do
12740 if test -z "$ac_lib"; then
12741 ac_res="none required"
12742 else
12743 ac_res=-l$ac_lib
12744 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12745 fi
12746 if ac_fn_c_try_link "$LINENO"; then :
12747 ac_cv_search_dlopen=$ac_res
12748fi
12749rm -f core conftest.err conftest.$ac_objext \
12750 conftest$ac_exeext
12751 if test "${ac_cv_search_dlopen+set}" = set; then :
12752 break
12753fi
12754done
12755if test "${ac_cv_search_dlopen+set}" = set; then :
12756
12757else
12758 ac_cv_search_dlopen=no
12759fi
12760rm conftest.$ac_ext
12761LIBS=$ac_func_search_save_LIBS
12762fi
12763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12764$as_echo "$ac_cv_search_dlopen" >&6; }
12765ac_res=$ac_cv_search_dlopen
12766if test "$ac_res" != no; then :
12767 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12768
12769fi
12770
075ff26d 12771 fi
31d99776 12772fi
31d99776 12773
4f05add4
TT
12774# Add macho support to GDB, but only if BFD includes it.
12775
12776 OLD_CFLAGS=$CFLAGS
12777 OLD_LDFLAGS=$LDFLAGS
12778 OLD_LIBS=$LIBS
12779 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12780 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12781 # always want our bfd.
12782 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12783 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12784 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12785 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12786 if test "$plugins" = "yes"; then
a48b32c0
L
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12788$as_echo_n "checking for library containing dlopen... " >&6; }
12789if test "${ac_cv_search_dlopen+set}" = set; then :
12790 $as_echo_n "(cached) " >&6
12791else
12792 ac_func_search_save_LIBS=$LIBS
12793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794/* end confdefs.h. */
12795
12796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
12799#ifdef __cplusplus
12800extern "C"
12801#endif
12802char dlopen ();
12803int
12804main ()
12805{
12806return dlopen ();
12807 ;
12808 return 0;
12809}
12810_ACEOF
12811for ac_lib in '' dl; do
12812 if test -z "$ac_lib"; then
12813 ac_res="none required"
12814 else
12815 ac_res=-l$ac_lib
12816 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12817 fi
12818 if ac_fn_c_try_link "$LINENO"; then :
12819 ac_cv_search_dlopen=$ac_res
12820fi
12821rm -f core conftest.err conftest.$ac_objext \
12822 conftest$ac_exeext
12823 if test "${ac_cv_search_dlopen+set}" = set; then :
12824 break
12825fi
12826done
12827if test "${ac_cv_search_dlopen+set}" = set; then :
12828
12829else
12830 ac_cv_search_dlopen=no
12831fi
12832rm conftest.$ac_ext
12833LIBS=$ac_func_search_save_LIBS
12834fi
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12836$as_echo "$ac_cv_search_dlopen" >&6; }
12837ac_res=$ac_cv_search_dlopen
12838if test "$ac_res" != no; then :
12839 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12840
12841fi
12842
4f05add4
TT
12843 fi
12844 LIBS="-lbfd -liberty $intl $LIBS"
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
12846$as_echo_n "checking for Mach-O support in BFD... " >&6; }
12847if test "${gdb_cv_var_macho+set}" = set; then :
12848 $as_echo_n "(cached) " >&6
12849else
12850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851/* end confdefs.h. */
12852#include <stdlib.h>
12853 #include "bfd.h"
12854 #include "mach-o.h"
12855
12856int
12857main ()
12858{
12859return bfd_mach_o_lookup_command (NULL, 0, NULL);
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864if ac_fn_c_try_link "$LINENO"; then :
12865 gdb_cv_var_macho=yes
12866else
12867 gdb_cv_var_macho=no
12868fi
12869rm -f core conftest.err conftest.$ac_objext \
12870 conftest$ac_exeext conftest.$ac_ext
12871fi
12872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
12873$as_echo "$gdb_cv_var_macho" >&6; }
12874 CFLAGS=$OLD_CFLAGS
12875 LDFLAGS=$OLD_LDFLAGS
12876 LIBS=$OLD_LIBS
12877if test $gdb_cv_var_macho = yes; then
12878 CONFIG_OBS="$CONFIG_OBS machoread.o"
12879fi
12880
b2259038
TT
12881# Add SOM support to GDB, but only if BFD includes it.
12882
12883 OLD_CFLAGS=$CFLAGS
12884 OLD_LDFLAGS=$LDFLAGS
12885 OLD_LIBS=$LIBS
12886 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12887 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12888 # always want our bfd.
12889 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12890 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12891 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12892 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12893 if test "$plugins" = "yes"; then
a48b32c0
L
12894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12895$as_echo_n "checking for library containing dlopen... " >&6; }
12896if test "${ac_cv_search_dlopen+set}" = set; then :
12897 $as_echo_n "(cached) " >&6
12898else
12899 ac_func_search_save_LIBS=$LIBS
12900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12901/* end confdefs.h. */
12902
12903/* Override any GCC internal prototype to avoid an error.
12904 Use char because int might match the return type of a GCC
12905 builtin and then its argument prototype would still apply. */
12906#ifdef __cplusplus
12907extern "C"
12908#endif
12909char dlopen ();
12910int
12911main ()
12912{
12913return dlopen ();
12914 ;
12915 return 0;
12916}
12917_ACEOF
12918for ac_lib in '' dl; do
12919 if test -z "$ac_lib"; then
12920 ac_res="none required"
12921 else
12922 ac_res=-l$ac_lib
12923 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12924 fi
12925 if ac_fn_c_try_link "$LINENO"; then :
12926 ac_cv_search_dlopen=$ac_res
12927fi
12928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext
12930 if test "${ac_cv_search_dlopen+set}" = set; then :
12931 break
12932fi
12933done
12934if test "${ac_cv_search_dlopen+set}" = set; then :
12935
12936else
12937 ac_cv_search_dlopen=no
12938fi
12939rm conftest.$ac_ext
12940LIBS=$ac_func_search_save_LIBS
12941fi
12942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12943$as_echo "$ac_cv_search_dlopen" >&6; }
12944ac_res=$ac_cv_search_dlopen
12945if test "$ac_res" != no; then :
12946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12947
12948fi
12949
b2259038
TT
12950 fi
12951 LIBS="-lbfd -liberty $intl $LIBS"
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
12953$as_echo_n "checking for SOM support in BFD... " >&6; }
12954if test "${gdb_cv_var_som+set}" = set; then :
12955 $as_echo_n "(cached) " >&6
12956else
12957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12958/* end confdefs.h. */
12959#include <stdlib.h>
12960 #include "bfd.h"
12961 #include "som.h"
12962
12963int
12964main ()
12965{
12966return bfd_som_attach_aux_hdr (NULL, 0, NULL);
12967 ;
12968 return 0;
12969}
12970_ACEOF
12971if ac_fn_c_try_link "$LINENO"; then :
12972 gdb_cv_var_som=yes
12973else
12974 gdb_cv_var_som=no
12975fi
12976rm -f core conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
12978fi
12979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
12980$as_echo "$gdb_cv_var_som" >&6; }
12981 CFLAGS=$OLD_CFLAGS
12982 LDFLAGS=$OLD_LDFLAGS
12983 LIBS=$OLD_LIBS
12984if test $gdb_cv_var_som = yes; then
12985 CONFIG_OBS="$CONFIG_OBS somread.o"
12986fi
12987
121ce6e5
DJ
12988# Add any host-specific objects to GDB.
12989CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12990
608e2dbb
TT
12991# If building on ELF, look for lzma support for embedded compressed debug info.
12992if test $gdb_cv_var_elf = yes; then
12993
12994# Check whether --with-lzma was given.
12995if test "${with_lzma+set}" = set; then :
12996 withval=$with_lzma;
12997else
12998 with_lzma=auto
12999fi
13000
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13002$as_echo_n "checking whether to use lzma... " >&6; }
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13004$as_echo "$with_lzma" >&6; }
13005
13006 if test "${with_lzma}" != no; then
13007
13008
13009
13010
13011
13012
13013
13014
13015 use_additional=yes
13016
13017 acl_save_prefix="$prefix"
13018 prefix="$acl_final_prefix"
13019 acl_save_exec_prefix="$exec_prefix"
13020 exec_prefix="$acl_final_exec_prefix"
13021
13022 eval additional_includedir=\"$includedir\"
13023 eval additional_libdir=\"$libdir\"
13024
13025 exec_prefix="$acl_save_exec_prefix"
13026 prefix="$acl_save_prefix"
13027
13028
13029# Check whether --with-liblzma-prefix was given.
13030if test "${with_liblzma_prefix+set}" = set; then :
13031 withval=$with_liblzma_prefix;
13032 if test "X$withval" = "Xno"; then
13033 use_additional=no
13034 else
13035 if test "X$withval" = "X"; then
13036
13037 acl_save_prefix="$prefix"
13038 prefix="$acl_final_prefix"
13039 acl_save_exec_prefix="$exec_prefix"
13040 exec_prefix="$acl_final_exec_prefix"
13041
13042 eval additional_includedir=\"$includedir\"
13043 eval additional_libdir=\"$libdir\"
13044
13045 exec_prefix="$acl_save_exec_prefix"
13046 prefix="$acl_save_prefix"
13047
13048 else
13049 additional_includedir="$withval/include"
13050 additional_libdir="$withval/lib"
13051 fi
13052 fi
13053
13054fi
13055
13056 LIBLZMA=
13057 LTLIBLZMA=
13058 INCLZMA=
13059 rpathdirs=
13060 ltrpathdirs=
13061 names_already_handled=
13062 names_next_round='lzma '
13063 while test -n "$names_next_round"; do
13064 names_this_round="$names_next_round"
13065 names_next_round=
13066 for name in $names_this_round; do
13067 already_handled=
13068 for n in $names_already_handled; do
13069 if test "$n" = "$name"; then
13070 already_handled=yes
13071 break
13072 fi
13073 done
13074 if test -z "$already_handled"; then
13075 names_already_handled="$names_already_handled $name"
13076 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13077 eval value=\"\$HAVE_LIB$uppername\"
13078 if test -n "$value"; then
13079 if test "$value" = yes; then
13080 eval value=\"\$LIB$uppername\"
13081 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13082 eval value=\"\$LTLIB$uppername\"
13083 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13084 else
13085 :
13086 fi
13087 else
13088 found_dir=
13089 found_la=
13090 found_so=
13091 found_a=
13092 if test $use_additional = yes; then
13093 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13094 found_dir="$additional_libdir"
13095 found_so="$additional_libdir/lib$name.$shlibext"
13096 if test -f "$additional_libdir/lib$name.la"; then
13097 found_la="$additional_libdir/lib$name.la"
13098 fi
13099 else
13100 if test -f "$additional_libdir/lib$name.$libext"; then
13101 found_dir="$additional_libdir"
13102 found_a="$additional_libdir/lib$name.$libext"
13103 if test -f "$additional_libdir/lib$name.la"; then
13104 found_la="$additional_libdir/lib$name.la"
13105 fi
13106 fi
13107 fi
13108 fi
13109 if test "X$found_dir" = "X"; then
13110 for x in $LDFLAGS $LTLIBLZMA; do
13111
13112 acl_save_prefix="$prefix"
13113 prefix="$acl_final_prefix"
13114 acl_save_exec_prefix="$exec_prefix"
13115 exec_prefix="$acl_final_exec_prefix"
13116 eval x=\"$x\"
13117 exec_prefix="$acl_save_exec_prefix"
13118 prefix="$acl_save_prefix"
13119
13120 case "$x" in
13121 -L*)
13122 dir=`echo "X$x" | sed -e 's/^X-L//'`
13123 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13124 found_dir="$dir"
13125 found_so="$dir/lib$name.$shlibext"
13126 if test -f "$dir/lib$name.la"; then
13127 found_la="$dir/lib$name.la"
13128 fi
13129 else
13130 if test -f "$dir/lib$name.$libext"; then
13131 found_dir="$dir"
13132 found_a="$dir/lib$name.$libext"
13133 if test -f "$dir/lib$name.la"; then
13134 found_la="$dir/lib$name.la"
13135 fi
13136 fi
13137 fi
13138 ;;
13139 esac
13140 if test "X$found_dir" != "X"; then
13141 break
13142 fi
13143 done
13144 fi
13145 if test "X$found_dir" != "X"; then
13146 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13147 if test "X$found_so" != "X"; then
13148 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13149 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13150 else
13151 haveit=
13152 for x in $ltrpathdirs; do
13153 if test "X$x" = "X$found_dir"; then
13154 haveit=yes
13155 break
13156 fi
13157 done
13158 if test -z "$haveit"; then
13159 ltrpathdirs="$ltrpathdirs $found_dir"
13160 fi
13161 if test "$hardcode_direct" = yes; then
13162 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13163 else
13164 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13165 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13166 haveit=
13167 for x in $rpathdirs; do
13168 if test "X$x" = "X$found_dir"; then
13169 haveit=yes
13170 break
13171 fi
13172 done
13173 if test -z "$haveit"; then
13174 rpathdirs="$rpathdirs $found_dir"
13175 fi
13176 else
13177 haveit=
13178 for x in $LDFLAGS $LIBLZMA; do
13179
13180 acl_save_prefix="$prefix"
13181 prefix="$acl_final_prefix"
13182 acl_save_exec_prefix="$exec_prefix"
13183 exec_prefix="$acl_final_exec_prefix"
13184 eval x=\"$x\"
13185 exec_prefix="$acl_save_exec_prefix"
13186 prefix="$acl_save_prefix"
13187
13188 if test "X$x" = "X-L$found_dir"; then
13189 haveit=yes
13190 break
13191 fi
13192 done
13193 if test -z "$haveit"; then
13194 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13195 fi
13196 if test "$hardcode_minus_L" != no; then
13197 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13198 else
13199 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13200 fi
13201 fi
13202 fi
13203 fi
13204 else
13205 if test "X$found_a" != "X"; then
13206 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13207 else
13208 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13209 fi
13210 fi
13211 additional_includedir=
13212 case "$found_dir" in
13213 */lib | */lib/)
13214 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13215 additional_includedir="$basedir/include"
13216 ;;
13217 esac
13218 if test "X$additional_includedir" != "X"; then
13219 if test "X$additional_includedir" != "X/usr/include"; then
13220 haveit=
13221 if test "X$additional_includedir" = "X/usr/local/include"; then
13222 if test -n "$GCC"; then
13223 case $host_os in
13224 linux*) haveit=yes;;
13225 esac
13226 fi
13227 fi
13228 if test -z "$haveit"; then
13229 for x in $CPPFLAGS $INCLZMA; do
13230
13231 acl_save_prefix="$prefix"
13232 prefix="$acl_final_prefix"
13233 acl_save_exec_prefix="$exec_prefix"
13234 exec_prefix="$acl_final_exec_prefix"
13235 eval x=\"$x\"
13236 exec_prefix="$acl_save_exec_prefix"
13237 prefix="$acl_save_prefix"
13238
13239 if test "X$x" = "X-I$additional_includedir"; then
13240 haveit=yes
13241 break
13242 fi
13243 done
13244 if test -z "$haveit"; then
13245 if test -d "$additional_includedir"; then
13246 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13247 fi
13248 fi
13249 fi
13250 fi
13251 fi
13252 if test -n "$found_la"; then
13253 save_libdir="$libdir"
13254 case "$found_la" in
13255 */* | *\\*) . "$found_la" ;;
13256 *) . "./$found_la" ;;
13257 esac
13258 libdir="$save_libdir"
13259 for dep in $dependency_libs; do
13260 case "$dep" in
13261 -L*)
13262 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13263 if test "X$additional_libdir" != "X/usr/lib"; then
13264 haveit=
13265 if test "X$additional_libdir" = "X/usr/local/lib"; then
13266 if test -n "$GCC"; then
13267 case $host_os in
13268 linux*) haveit=yes;;
13269 esac
13270 fi
13271 fi
13272 if test -z "$haveit"; then
13273 haveit=
13274 for x in $LDFLAGS $LIBLZMA; do
13275
13276 acl_save_prefix="$prefix"
13277 prefix="$acl_final_prefix"
13278 acl_save_exec_prefix="$exec_prefix"
13279 exec_prefix="$acl_final_exec_prefix"
13280 eval x=\"$x\"
13281 exec_prefix="$acl_save_exec_prefix"
13282 prefix="$acl_save_prefix"
13283
13284 if test "X$x" = "X-L$additional_libdir"; then
13285 haveit=yes
13286 break
13287 fi
13288 done
13289 if test -z "$haveit"; then
13290 if test -d "$additional_libdir"; then
13291 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13292 fi
13293 fi
13294 haveit=
13295 for x in $LDFLAGS $LTLIBLZMA; do
13296
13297 acl_save_prefix="$prefix"
13298 prefix="$acl_final_prefix"
13299 acl_save_exec_prefix="$exec_prefix"
13300 exec_prefix="$acl_final_exec_prefix"
13301 eval x=\"$x\"
13302 exec_prefix="$acl_save_exec_prefix"
13303 prefix="$acl_save_prefix"
13304
13305 if test "X$x" = "X-L$additional_libdir"; then
13306 haveit=yes
13307 break
13308 fi
13309 done
13310 if test -z "$haveit"; then
13311 if test -d "$additional_libdir"; then
13312 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13313 fi
13314 fi
13315 fi
13316 fi
13317 ;;
13318 -R*)
13319 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13320 if test "$enable_rpath" != no; then
13321 haveit=
13322 for x in $rpathdirs; do
13323 if test "X$x" = "X$dir"; then
13324 haveit=yes
13325 break
13326 fi
13327 done
13328 if test -z "$haveit"; then
13329 rpathdirs="$rpathdirs $dir"
13330 fi
13331 haveit=
13332 for x in $ltrpathdirs; do
13333 if test "X$x" = "X$dir"; then
13334 haveit=yes
13335 break
13336 fi
13337 done
13338 if test -z "$haveit"; then
13339 ltrpathdirs="$ltrpathdirs $dir"
13340 fi
13341 fi
13342 ;;
13343 -l*)
13344 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13345 ;;
13346 *.la)
13347 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13348 ;;
13349 *)
13350 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13351 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13352 ;;
13353 esac
13354 done
13355 fi
13356 else
13357 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13358 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13359 fi
13360 fi
13361 fi
13362 done
13363 done
13364 if test "X$rpathdirs" != "X"; then
13365 if test -n "$hardcode_libdir_separator"; then
13366 alldirs=
13367 for found_dir in $rpathdirs; do
13368 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13369 done
13370 acl_save_libdir="$libdir"
13371 libdir="$alldirs"
13372 eval flag=\"$hardcode_libdir_flag_spec\"
13373 libdir="$acl_save_libdir"
13374 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13375 else
13376 for found_dir in $rpathdirs; do
13377 acl_save_libdir="$libdir"
13378 libdir="$found_dir"
13379 eval flag=\"$hardcode_libdir_flag_spec\"
13380 libdir="$acl_save_libdir"
13381 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13382 done
13383 fi
13384 fi
13385 if test "X$ltrpathdirs" != "X"; then
13386 for found_dir in $ltrpathdirs; do
13387 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13388 done
13389 fi
13390
13391
13392 ac_save_CPPFLAGS="$CPPFLAGS"
13393
13394 for element in $INCLZMA; do
13395 haveit=
13396 for x in $CPPFLAGS; do
13397
13398 acl_save_prefix="$prefix"
13399 prefix="$acl_final_prefix"
13400 acl_save_exec_prefix="$exec_prefix"
13401 exec_prefix="$acl_final_exec_prefix"
13402 eval x=\"$x\"
13403 exec_prefix="$acl_save_exec_prefix"
13404 prefix="$acl_save_prefix"
13405
13406 if test "X$x" = "X$element"; then
13407 haveit=yes
13408 break
13409 fi
13410 done
13411 if test -z "$haveit"; then
13412 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13413 fi
13414 done
13415
13416
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13418$as_echo_n "checking for liblzma... " >&6; }
13419if test "${ac_cv_liblzma+set}" = set; then :
13420 $as_echo_n "(cached) " >&6
13421else
13422
13423 ac_save_LIBS="$LIBS"
13424 LIBS="$LIBS $LIBLZMA"
13425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13426/* end confdefs.h. */
13427#include "lzma.h"
13428int
13429main ()
13430{
13431lzma_index_iter iter;
13432 lzma_index_iter_init (&iter, 0);
13433 lzma_mf_is_supported (LZMA_MF_HC3);
13434 ;
13435 return 0;
13436}
13437_ACEOF
13438if ac_fn_c_try_link "$LINENO"; then :
13439 ac_cv_liblzma=yes
13440else
13441 ac_cv_liblzma=no
13442fi
13443rm -f core conftest.err conftest.$ac_objext \
13444 conftest$ac_exeext conftest.$ac_ext
13445 LIBS="$ac_save_LIBS"
13446
13447fi
13448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13449$as_echo "$ac_cv_liblzma" >&6; }
13450 if test "$ac_cv_liblzma" = yes; then
13451 HAVE_LIBLZMA=yes
13452
13453$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13454
13455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13456$as_echo_n "checking how to link with liblzma... " >&6; }
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13458$as_echo "$LIBLZMA" >&6; }
13459 else
13460 HAVE_LIBLZMA=no
13461 CPPFLAGS="$ac_save_CPPFLAGS"
13462 LIBLZMA=
13463 LTLIBLZMA=
13464 fi
13465
13466
13467
13468
13469
13470
13471 if test "$HAVE_LIBLZMA" != yes; then
13472 if test "$with_lzma" = yes; then
13473 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13474 fi
13475 fi
13476 fi
13477fi
13478
3fc11d3e
JM
13479LIBGUI="../libgui/src/libgui.a"
13480GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13481
13482
7a292a7a 13483
3fc11d3e
JM
13484WIN32LDAPP=
13485
13486
13487
d91670b9 13488case "${host}" in
686a5eed 13489*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13490 configdir="win"
13491 ;;
13492*)
13493 configdir="unix"
13494 ;;
13495esac
3fc11d3e
JM
13496
13497GDBTKLIBS=
13498if test "${enable_gdbtk}" = "yes"; then
13499
d1c3b63a
KS
13500 # Gdbtk must have an absolute path to srcdir in order to run
13501 # properly when not installed.
13502 here=`pwd`
13503 cd ${srcdir}
13504 GDBTK_SRC_DIR=`pwd`
13505 cd $here
13506
bec39cab 13507
5062cc19
KS
13508 #
13509 # Ok, lets find the tcl configuration
13510 # First, look for one uninstalled.
13511 # the alternative search directory is invoked by --with-tcl
13512 #
3fc11d3e 13513
5062cc19
KS
13514 if test x"${no_tcl}" = x ; then
13515 # we reset no_tcl in case something fails here
13516 no_tcl=true
bec39cab 13517
81ecdfbb
RW
13518# Check whether --with-tcl was given.
13519if test "${with_tcl+set}" = set; then :
13520 withval=$with_tcl; with_tclconfig=${withval}
13521fi
13522
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13524$as_echo_n "checking for Tcl configuration... " >&6; }
13525 if test "${ac_cv_c_tclconfig+set}" = set; then :
13526 $as_echo_n "(cached) " >&6
3fc11d3e 13527else
bec39cab 13528
3fc11d3e 13529
5062cc19
KS
13530 # First check to see if --with-tcl was specified.
13531 case "${host}" in
13532 *-*-cygwin*) platDir="win" ;;
13533 *) platDir="unix" ;;
13534 esac
13535 if test x"${with_tclconfig}" != x ; then
13536 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13537 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13538 else
81ecdfbb 13539 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13540 fi
13541 fi
13542
13543 # then check for a private Tcl installation
13544 if test x"${ac_cv_c_tclconfig}" = x ; then
13545 for i in \
13546 ../tcl \
13547 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13548 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13549 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13550 ../../tcl \
13551 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13552 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13553 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13554 ../../../tcl \
13555 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13556 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13557 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13558 if test -f "$i/$platDir/tclConfig.sh" ; then
13559 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13560 break
13561 fi
13562 done
13563 fi
13564
13565 # on Darwin, check in Framework installation locations
13566 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13567 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13568 `ls -d /Library/Frameworks 2>/dev/null` \
13569 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13570 `ls -d /System/Library/Frameworks 2>/dev/null` \
13571 ; do
13572 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13573 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13574 break
13575 fi
13576 done
13577 fi
13578
13579 # check in a few common install locations
13580 if test x"${ac_cv_c_tclconfig}" = x ; then
13581 for i in `ls -d ${libdir} 2>/dev/null` \
13582 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13583 `ls -d ${prefix}/lib 2>/dev/null` \
13584 `ls -d /usr/local/lib 2>/dev/null` \
13585 `ls -d /usr/contrib/lib 2>/dev/null` \
13586 `ls -d /usr/lib 2>/dev/null` \
13587 ; do
13588 if test -f "$i/tclConfig.sh" ; then
13589 ac_cv_c_tclconfig=`(cd $i; pwd)`
13590 break
13591 fi
13592 done
13593 fi
3fc11d3e 13594
5062cc19
KS
13595 # check in a few other private locations
13596 if test x"${ac_cv_c_tclconfig}" = x ; then
13597 for i in \
13598 ${srcdir}/../tcl \
13599 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13600 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13601 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13602 if test -f "$i/$platDir/tclConfig.sh" ; then
13603 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13604 break
13605 fi
13606 done
13607 fi
bec39cab 13608
3fc11d3e
JM
13609fi
13610
5062cc19
KS
13611
13612 if test x"${ac_cv_c_tclconfig}" = x ; then
13613 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13615$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13616 else
13617 no_tcl=
13618 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13620$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13621 fi
13622 fi
3fc11d3e 13623
bec39cab 13624
85541719
DE
13625 # If $no_tk is nonempty, then we can't do Tk, and there is no
13626 # point to doing Tcl.
bec39cab 13627
5062cc19
KS
13628 #
13629 # Ok, lets find the tk configuration
13630 # First, look for one uninstalled.
13631 # the alternative search directory is invoked by --with-tk
13632 #
3fc11d3e 13633
5062cc19
KS
13634 if test x"${no_tk}" = x ; then
13635 # we reset no_tk in case something fails here
13636 no_tk=true
bec39cab 13637
81ecdfbb
RW
13638# Check whether --with-tk was given.
13639if test "${with_tk+set}" = set; then :
13640 withval=$with_tk; with_tkconfig=${withval}
13641fi
13642
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13644$as_echo_n "checking for Tk configuration... " >&6; }
13645 if test "${ac_cv_c_tkconfig+set}" = set; then :
13646 $as_echo_n "(cached) " >&6
bec39cab 13647else
3fc11d3e
JM
13648
13649
5062cc19
KS
13650 # First check to see if --with-tkconfig was specified.
13651 if test x"${with_tkconfig}" != x ; then
13652 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13653 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13654 else
81ecdfbb 13655 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13656 fi
13657 fi
3fc11d3e 13658
5062cc19
KS
13659 # then check for a private Tk library
13660 case "${host}" in
13661 *-*-cygwin*) platDir="win" ;;
13662 *) platDir="unix" ;;
13663 esac
13664 if test x"${ac_cv_c_tkconfig}" = x ; then
13665 for i in \
13666 ../tk \
13667 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13668 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13669 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13670 ../../tk \
13671 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13672 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13673 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13674 ../../../tk \
13675 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13676 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13677 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13678 if test -f "$i/$platDir/tkConfig.sh" ; then
13679 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13680 break
13681 fi
13682 done
13683 fi
13684
13685 # on Darwin, check in Framework installation locations
13686 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13687 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13688 `ls -d /Library/Frameworks 2>/dev/null` \
13689 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13690 `ls -d /System/Library/Frameworks 2>/dev/null` \
13691 ; do
13692 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13693 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13694 break
13695 fi
13696 done
13697 fi
13698
13699 # check in a few common install locations
13700 if test x"${ac_cv_c_tkconfig}" = x ; then
13701 for i in `ls -d ${libdir} 2>/dev/null` \
13702 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13703 `ls -d ${prefix}/lib 2>/dev/null` \
13704 `ls -d /usr/local/lib 2>/dev/null` \
13705 `ls -d /usr/contrib/lib 2>/dev/null` \
13706 `ls -d /usr/lib 2>/dev/null` \
13707 ; do
13708 if test -f "$i/tkConfig.sh" ; then
13709 ac_cv_c_tkconfig=`(cd $i; pwd)`
13710 break
13711 fi
13712 done
13713 fi
13714 # check in a few other private locations
13715 if test x"${ac_cv_c_tkconfig}" = x ; then
13716 for i in \
13717 ${srcdir}/../tk \
13718 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13719 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13720 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13721 if test -f "$i/$platDir/tkConfig.sh" ; then
13722 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13723 break
13724 fi
13725 done
13726 fi
3fc11d3e 13727
3fc11d3e
JM
13728fi
13729
13730
5062cc19
KS
13731 if test x"${ac_cv_c_tkconfig}" = x ; then
13732 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13734$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13735 else
13736 no_tk=
13737 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13739$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13740 fi
3fc11d3e 13741 fi
dd2504ab 13742
dd2504ab 13743
85541719
DE
13744 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13745
81ecdfbb
RW
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13747$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13748
13749 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13751$as_echo "loading" >&6; }
85541719
DE
13752 . ${TCL_BIN_DIR}/tclConfig.sh
13753 else
81ecdfbb
RW
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13755$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13756 fi
13757
13758 # eval is required to do the TCL_DBGX substitution
13759 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13760 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13761
13762 # If the TCL_BIN_DIR is the build directory (not the install directory),
13763 # then set the common variable name to the value of the build variables.
13764 # For example, the variable TCL_LIB_SPEC will be set to the value
13765 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13766 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13767 # installed and uninstalled version of Tcl.
13768 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13769 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13770 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13771 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13772 elif test "`uname -s`" = "Darwin"; then
13773 # If Tcl was built as a framework, attempt to use the libraries
13774 # from the framework at the given location so that linking works
a68ffae9 13775 # against Tcl.framework installed in an arbitrary location.
85541719
DE
13776 case ${TCL_DEFS} in
13777 *TCL_FRAMEWORK*)
13778 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13779 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13780 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13781 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13782 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13783 break
13784 fi
13785 done
13786 fi
13787 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13788 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13789 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13790 fi
13791 ;;
13792 esac
13793 fi
13794
13795 # eval is required to do the TCL_DBGX substitution
13796 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13797 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13798 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13799 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815 # Check for in-tree tcl
13816 here=`pwd`
13817 cd ${srcdir}/..
13818 topdir=`pwd`
13819 cd ${here}
13820
13821 intree="no"
13822 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13823 intree="yes"
13824 fi
13825
13826 # Find Tcl private headers
13827 if test x"${intree}" = xno; then
13828
81ecdfbb
RW
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13830$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13831 private_dir=""
13832 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13833 if test -f ${dir}/tclInt.h ; then
13834 private_dir=${dir}
13835 fi
13836
13837 if test x"${private_dir}" = x; then
81ecdfbb 13838 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13839 else
13840 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13842$as_echo "${private_dir}" >&6; }
85541719
DE
13843 fi
13844
13845 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13846 TCL_LIBRARY="${TCL_LIB_SPEC}"
13847 TCL_DEPS=""
13848 else
13849 # If building tcl in the same src tree, private headers
13850 # are not needed, but we need to be sure to use the right
13851 # headers library
13852 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13853 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13854 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13855 fi
13856
13857
13858
13859
13860
81ecdfbb
RW
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13862$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13863
5062cc19 13864 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13866$as_echo "loading" >&6; }
5062cc19 13867 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13868 else
81ecdfbb
RW
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13870$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13871 fi
bec39cab 13872
5062cc19
KS
13873 # eval is required to do the TK_DBGX substitution
13874 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13875 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13876
13877 # If the TK_BIN_DIR is the build directory (not the install directory),
13878 # then set the common variable name to the value of the build variables.
13879 # For example, the variable TK_LIB_SPEC will be set to the value
13880 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13881 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13882 # installed and uninstalled version of Tcl.
85541719 13883 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13884 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13885 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13886 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13887 elif test "`uname -s`" = "Darwin"; then
13888 # If Tk was built as a framework, attempt to use the libraries
13889 # from the framework at the given location so that linking works
a68ffae9 13890 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
13891 case ${TK_DEFS} in
13892 *TK_FRAMEWORK*)
85541719 13893 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13894 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13895 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13896 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13897 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13898 break
13899 fi
13900 done
13901 fi
85541719 13902 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13903 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13904 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13905 fi
13906 ;;
13907 esac
3fc11d3e
JM
13908 fi
13909
5062cc19
KS
13910 # eval is required to do the TK_DBGX substitution
13911 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13912 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13913 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13914 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13915
3fc11d3e
JM
13916
13917
bec39cab
AC
13918
13919
13920
13921
13922
13923
13924
3fc11d3e 13925
3fc11d3e 13926
bec39cab 13927
bec39cab 13928
85541719
DE
13929 # Check for in-tree Tk
13930 intree="no"
13931 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13932 intree="yes"
13933 fi
3fc11d3e 13934
85541719
DE
13935 # Find Tk private headers
13936 if test x"${intree}" = xno; then
3fc11d3e 13937
81ecdfbb
RW
13938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13939$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13940 private_dir=""
13941 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13942 if test -f ${dir}/tkInt.h; then
13943 private_dir=${dir}
3fc11d3e 13944 fi
bec39cab 13945
5062cc19 13946 if test x"${private_dir}" = x; then
81ecdfbb 13947 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 13948 else
5062cc19 13949 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13951$as_echo "${private_dir}" >&6; }
3fc11d3e 13952 fi
3fc11d3e 13953
85541719
DE
13954 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
13955 TK_LIBRARY=${TK_LIB_SPEC}
13956 TK_DEPS=""
13957 else
13958 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
13959 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
13960 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
13961 fi
3fc11d3e
JM
13962
13963
3fc11d3e
JM
13964
13965
3fc11d3e 13966
85541719 13967 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13968
85541719
DE
13969 # Include some libraries that Tcl and Tk want.
13970 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13971 # Yes, the ordering seems wrong here. But it isn't.
13972 # TK_LIBS is the list of libraries that need to be linked
13973 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13974 # were in LIBS then any link tests after this point would
13975 # try to include things like `$(LIBGUI)', which wouldn't work.
13976 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13977
85541719
DE
13978 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13979 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13980 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13981 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13982 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13983 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13984 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13985
85541719
DE
13986 if test x$gdb_cv_os_cygwin = xyes; then
13987 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13988 WIN32LDAPP="-Wl,--subsystem,console"
13989 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13990 fi
ffc6a242 13991
81ecdfbb 13992 subdirs="$subdirs gdbtk"
3ace7edb 13993
85541719 13994 fi
3fc11d3e
JM
13995fi
13996
13997
13998
13999
14000
14001
14002
14003
81ecdfbb
RW
14004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14005$as_echo_n "checking for X... " >&6; }
bec39cab 14006
c906108c 14007
81ecdfbb
RW
14008# Check whether --with-x was given.
14009if test "${with_x+set}" = set; then :
14010 withval=$with_x;
14011fi
c906108c
SS
14012
14013# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14014if test "x$with_x" = xno; then
14015 # The user explicitly disabled X.
14016 have_x=disabled
14017else
81ecdfbb
RW
14018 case $x_includes,$x_libraries in #(
14019 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14020 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14021 $as_echo_n "(cached) " >&6
c906108c
SS
14022else
14023 # One or both of the vars are not set, and there is no cached value.
bec39cab 14024ac_x_includes=no ac_x_libraries=no
81ecdfbb 14025rm -f -r conftest.dir
bec39cab
AC
14026if mkdir conftest.dir; then
14027 cd conftest.dir
bec39cab 14028 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14029incroot:
14030 @echo incroot='${INCROOT}'
14031usrlibdir:
14032 @echo usrlibdir='${USRLIBDIR}'
14033libdir:
14034 @echo libdir='${LIBDIR}'
14035_ACEOF
14036 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14037 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14038 for ac_var in incroot usrlibdir libdir; do
14039 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14040 done
c906108c 14041 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14042 for ac_extension in a so sl dylib la dll; do
14043 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14044 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14045 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14046 fi
14047 done
14048 # Screen out bogus values from the imake configuration. They are
14049 # bogus both because they are the default anyway, and because
14050 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14051 case $ac_im_incroot in
81ecdfbb 14052 /usr/include) ac_x_includes= ;;
bec39cab 14053 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14054 esac
bec39cab 14055 case $ac_im_usrlibdir in
81ecdfbb 14056 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14057 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14058 esac
14059 fi
14060 cd ..
81ecdfbb 14061 rm -f -r conftest.dir
c906108c
SS
14062fi
14063
bec39cab
AC
14064# Standard set of common directories for X headers.
14065# Check X11 before X11Rn because it is often a symlink to the current release.
14066ac_x_header_dirs='
14067/usr/X11/include
81ecdfbb 14068/usr/X11R7/include
bec39cab
AC
14069/usr/X11R6/include
14070/usr/X11R5/include
14071/usr/X11R4/include
14072
14073/usr/include/X11
81ecdfbb 14074/usr/include/X11R7
bec39cab
AC
14075/usr/include/X11R6
14076/usr/include/X11R5
14077/usr/include/X11R4
14078
14079/usr/local/X11/include
81ecdfbb 14080/usr/local/X11R7/include
bec39cab
AC
14081/usr/local/X11R6/include
14082/usr/local/X11R5/include
14083/usr/local/X11R4/include
14084
14085/usr/local/include/X11
81ecdfbb 14086/usr/local/include/X11R7
bec39cab
AC
14087/usr/local/include/X11R6
14088/usr/local/include/X11R5
14089/usr/local/include/X11R4
14090
14091/usr/X386/include
14092/usr/x386/include
14093/usr/XFree86/include/X11
14094
14095/usr/include
14096/usr/local/include
14097/usr/unsupported/include
14098/usr/athena/include
14099/usr/local/x11r5/include
14100/usr/lpp/Xamples/include
14101
14102/usr/openwin/include
14103/usr/openwin/share/include'
14104
14105if test "$ac_x_includes" = no; then
81ecdfbb 14106 # Guess where to find include files, by looking for Xlib.h.
c906108c 14107 # First, try using that file with no special directory specified.
81ecdfbb 14108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14109/* end confdefs.h. */
81ecdfbb 14110#include <X11/Xlib.h>
bec39cab 14111_ACEOF
81ecdfbb 14112if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14113 # We can compile using X headers with no special include directory.
14114ac_x_includes=
14115else
bec39cab 14116 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14117 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14118 ac_x_includes=$ac_dir
14119 break
14120 fi
14121done
c906108c 14122fi
bec39cab
AC
14123rm -f conftest.err conftest.$ac_ext
14124fi # $ac_x_includes = no
c906108c 14125
bec39cab 14126if test "$ac_x_libraries" = no; then
c906108c 14127 # Check for the libraries.
c906108c
SS
14128 # See if we find them without any special options.
14129 # Don't add to $LIBS permanently.
bec39cab 14130 ac_save_LIBS=$LIBS
81ecdfbb
RW
14131 LIBS="-lX11 $LIBS"
14132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14133/* end confdefs.h. */
81ecdfbb 14134#include <X11/Xlib.h>
bec39cab
AC
14135int
14136main ()
14137{
81ecdfbb 14138XrmInitialize ()
bec39cab
AC
14139 ;
14140 return 0;
14141}
14142_ACEOF
81ecdfbb 14143if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14144 LIBS=$ac_save_LIBS
c906108c
SS
14145# We can link X programs with no special library path.
14146ac_x_libraries=
14147else
81ecdfbb
RW
14148 LIBS=$ac_save_LIBS
14149for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14150do
bec39cab 14151 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14152 for ac_extension in a so sl dylib la dll; do
14153 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14154 ac_x_libraries=$ac_dir
14155 break 2
14156 fi
14157 done
14158done
14159fi
81ecdfbb
RW
14160rm -f core conftest.err conftest.$ac_objext \
14161 conftest$ac_exeext conftest.$ac_ext
bec39cab 14162fi # $ac_x_libraries = no
c906108c 14163
81ecdfbb
RW
14164case $ac_x_includes,$ac_x_libraries in #(
14165 no,* | *,no | *\'*)
14166 # Didn't find X, or a directory has "'" in its name.
14167 ac_cv_have_x="have_x=no";; #(
14168 *)
14169 # Record where we found X for the cache.
14170 ac_cv_have_x="have_x=yes\
14171 ac_x_includes='$ac_x_includes'\
14172 ac_x_libraries='$ac_x_libraries'"
14173esac
c906108c 14174fi
81ecdfbb
RW
14175;; #(
14176 *) have_x=yes;;
14177 esac
c906108c
SS
14178 eval "$ac_cv_have_x"
14179fi # $with_x != no
14180
14181if test "$have_x" != yes; then
81ecdfbb
RW
14182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14183$as_echo "$have_x" >&6; }
c906108c
SS
14184 no_x=yes
14185else
14186 # If each of the values was on the command line, it overrides each guess.
14187 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14188 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14189 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14190 ac_cv_have_x="have_x=yes\
14191 ac_x_includes='$x_includes'\
14192 ac_x_libraries='$x_libraries'"
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14194$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14195fi
14196
14197
bec39cab 14198# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14199# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14200# This code just checks for a few cases where we'd like to ignore those
14201# definitions, even when they're present in the '.mt' file. These cases
14202# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14203# not part of the source tree.
7a292a7a 14204#
81ecdfbb
RW
14205# Check whether --enable-sim was given.
14206if test "${enable_sim+set}" = set; then :
14207 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14208 echo "enableval = ${enableval}";
14209 case "${enableval}" in
14210 yes) ignore_sim=false ;;
14211 no) ignore_sim=true ;;
14212 *) ignore_sim=false ;;
14213 esac
14214else
14215 ignore_sim=false
81ecdfbb
RW
14216fi
14217
7a292a7a
SS
14218
14219if test ! -d "${srcdir}/../sim"; then
14220 ignore_sim=true
14221fi
14222
9b624dbe
UW
14223SIM=
14224SIM_OBS=
14225if test "${ignore_sim}" = "false"; then
14226 if test x"${gdb_sim}" != x ; then
14227 SIM="${gdb_sim}"
14228 SIM_OBS="remote-sim.o"
60ca704f 14229
81ecdfbb 14230$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14231
9b624dbe 14232 fi
7a292a7a
SS
14233fi
14234
14235
14236
c906108c
SS
14237
14238
14239
14240
14241
14242
dfcd3bfb 14243
e56ac5c3
AC
14244
14245
b3a90332
AC
14246
14247
c35f4ffc 14248# List of host floatformats.
bec39cab
AC
14249
14250cat >>confdefs.h <<_ACEOF
c35f4ffc 14251#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14252_ACEOF
c35f4ffc 14253
bec39cab
AC
14254
14255cat >>confdefs.h <<_ACEOF
c35f4ffc 14256#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14257_ACEOF
14258
c35f4ffc 14259
bec39cab 14260cat >>confdefs.h <<_ACEOF
c35f4ffc 14261#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14262_ACEOF
c35f4ffc
AC
14263
14264
c906108c
SS
14265# target_subdir is used by the testsuite to find the target libraries.
14266target_subdir=
14267if test "${host}" != "${target}"; then
14268 target_subdir="${target_alias}/"
14269fi
14270
14271
14272frags=
771b4502 14273if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14274 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14275 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14276 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14277 fi
14278 frags="$frags $host_makefile_frag"
14279else
14280 host_makefile_frag=/dev/null
c906108c 14281fi
c906108c 14282
c906108c
SS
14283
14284
14285
771b4502 14286if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14287# We pick this up from the host configuration file (.mh) because we
14288# do not have a native configuration Makefile fragment.
c906108c
SS
14289nativefile=`sed -n '
14290s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14291' ${host_makefile_frag}`
c906108c
SS
14292fi
14293
14294
b00a8037 14295if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14296
14297cat >>confdefs.h <<_ACEOF
b00a8037 14298#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14299_ACEOF
b00a8037
DJ
14300
14301fi
14302
8dcde887 14303# Enable multi-ice-gdb-server.
81ecdfbb
RW
14304# Check whether --enable-multi-ice was given.
14305if test "${enable_multi_ice+set}" = set; then :
14306 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14307 yes | no)
14308 ;;
81ecdfbb 14309 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14310 esac
81ecdfbb 14311fi
b4e70030 14312
81ecdfbb
RW
14313if test "x$enable_multi_ice" = xyes; then
14314 subdirs="$subdirs multi-ice"
3ace7edb 14315
a85f51e7
DJ
14316fi
14317
496c0e1b
JB
14318# Check whether --enable-gdbserver was given.
14319if test "${enable_gdbserver+set}" = set; then :
14320 enableval=$enable_gdbserver; case "${enableval}" in
14321 yes| no|auto) ;;
14322 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14323esac
14324else
14325 enable_gdbserver=auto
14326fi
14327
14328
14329# We only build gdbserver automatically in a native configuration, and
14330# only if the user did not explicitly disable its build.
14331if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14333$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14334 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14336$as_echo "yes" >&6; }
14337 subdirs="$subdirs gdbserver"
3ace7edb 14338
496c0e1b 14339 gdbserver_build_enabled=yes
8dcde887 14340 else
81ecdfbb
RW
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
8dcde887
MK
14343 fi
14344fi
14345
496c0e1b
JB
14346# If the user explicitly request the gdbserver to be built, verify that
14347# we were in fact able to enable it.
14348if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14349 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14350fi
14351
393fd4c3
YQ
14352# Check for babeltrace and babeltrace-ctf
14353
14354# Check whether --with-babeltrace was given.
14355if test "${with_babeltrace+set}" = set; then :
14356 withval=$with_babeltrace;
14357else
14358 with_babeltrace=auto
14359fi
14360
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14362$as_echo_n "checking whether to use babeltrace... " >&6; }
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14364$as_echo "$with_babeltrace" >&6; }
14365
14366if test "x$with_babeltrace" = "xno"; then
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14368$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14369else
14370 # Append -Werror to CFLAGS so that configure can catch the warning
14371 # "assignment from incompatible pointer type", which is related to
14372 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14373 # in GDB, while babeltrace 1.0.3 is broken.
14374 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14375 # safe to save and restore CFLAGS here.
14376 saved_CFLAGS=$CFLAGS
14377 CFLAGS="$CFLAGS -Werror"
14378
14379
14380
14381
14382
14383
14384
14385
14386 use_additional=yes
14387
14388 acl_save_prefix="$prefix"
14389 prefix="$acl_final_prefix"
14390 acl_save_exec_prefix="$exec_prefix"
14391 exec_prefix="$acl_final_exec_prefix"
14392
14393 eval additional_includedir=\"$includedir\"
14394 eval additional_libdir=\"$libdir\"
14395
14396 exec_prefix="$acl_save_exec_prefix"
14397 prefix="$acl_save_prefix"
14398
14399
14400# Check whether --with-libbabeltrace-prefix was given.
14401if test "${with_libbabeltrace_prefix+set}" = set; then :
14402 withval=$with_libbabeltrace_prefix;
14403 if test "X$withval" = "Xno"; then
14404 use_additional=no
14405 else
14406 if test "X$withval" = "X"; then
14407
14408 acl_save_prefix="$prefix"
14409 prefix="$acl_final_prefix"
14410 acl_save_exec_prefix="$exec_prefix"
14411 exec_prefix="$acl_final_exec_prefix"
14412
14413 eval additional_includedir=\"$includedir\"
14414 eval additional_libdir=\"$libdir\"
14415
14416 exec_prefix="$acl_save_exec_prefix"
14417 prefix="$acl_save_prefix"
14418
14419 else
14420 additional_includedir="$withval/include"
14421 additional_libdir="$withval/lib"
14422 fi
14423 fi
14424
14425fi
14426
14427 LIBBABELTRACE=
14428 LTLIBBABELTRACE=
14429 INCBABELTRACE=
14430 rpathdirs=
14431 ltrpathdirs=
14432 names_already_handled=
14433 names_next_round='babeltrace babeltrace-ctf'
14434 while test -n "$names_next_round"; do
14435 names_this_round="$names_next_round"
14436 names_next_round=
14437 for name in $names_this_round; do
14438 already_handled=
14439 for n in $names_already_handled; do
14440 if test "$n" = "$name"; then
14441 already_handled=yes
14442 break
14443 fi
14444 done
14445 if test -z "$already_handled"; then
14446 names_already_handled="$names_already_handled $name"
14447 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14448 eval value=\"\$HAVE_LIB$uppername\"
14449 if test -n "$value"; then
14450 if test "$value" = yes; then
14451 eval value=\"\$LIB$uppername\"
14452 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14453 eval value=\"\$LTLIB$uppername\"
14454 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14455 else
14456 :
14457 fi
14458 else
14459 found_dir=
14460 found_la=
14461 found_so=
14462 found_a=
14463 if test $use_additional = yes; then
14464 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14465 found_dir="$additional_libdir"
14466 found_so="$additional_libdir/lib$name.$shlibext"
14467 if test -f "$additional_libdir/lib$name.la"; then
14468 found_la="$additional_libdir/lib$name.la"
14469 fi
14470 else
14471 if test -f "$additional_libdir/lib$name.$libext"; then
14472 found_dir="$additional_libdir"
14473 found_a="$additional_libdir/lib$name.$libext"
14474 if test -f "$additional_libdir/lib$name.la"; then
14475 found_la="$additional_libdir/lib$name.la"
14476 fi
14477 fi
14478 fi
14479 fi
14480 if test "X$found_dir" = "X"; then
14481 for x in $LDFLAGS $LTLIBBABELTRACE; do
14482
14483 acl_save_prefix="$prefix"
14484 prefix="$acl_final_prefix"
14485 acl_save_exec_prefix="$exec_prefix"
14486 exec_prefix="$acl_final_exec_prefix"
14487 eval x=\"$x\"
14488 exec_prefix="$acl_save_exec_prefix"
14489 prefix="$acl_save_prefix"
14490
14491 case "$x" in
14492 -L*)
14493 dir=`echo "X$x" | sed -e 's/^X-L//'`
14494 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14495 found_dir="$dir"
14496 found_so="$dir/lib$name.$shlibext"
14497 if test -f "$dir/lib$name.la"; then
14498 found_la="$dir/lib$name.la"
14499 fi
14500 else
14501 if test -f "$dir/lib$name.$libext"; then
14502 found_dir="$dir"
14503 found_a="$dir/lib$name.$libext"
14504 if test -f "$dir/lib$name.la"; then
14505 found_la="$dir/lib$name.la"
14506 fi
14507 fi
14508 fi
14509 ;;
14510 esac
14511 if test "X$found_dir" != "X"; then
14512 break
14513 fi
14514 done
14515 fi
14516 if test "X$found_dir" != "X"; then
14517 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14518 if test "X$found_so" != "X"; then
14519 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14520 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14521 else
14522 haveit=
14523 for x in $ltrpathdirs; do
14524 if test "X$x" = "X$found_dir"; then
14525 haveit=yes
14526 break
14527 fi
14528 done
14529 if test -z "$haveit"; then
14530 ltrpathdirs="$ltrpathdirs $found_dir"
14531 fi
14532 if test "$hardcode_direct" = yes; then
14533 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14534 else
14535 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14536 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14537 haveit=
14538 for x in $rpathdirs; do
14539 if test "X$x" = "X$found_dir"; then
14540 haveit=yes
14541 break
14542 fi
14543 done
14544 if test -z "$haveit"; then
14545 rpathdirs="$rpathdirs $found_dir"
14546 fi
14547 else
14548 haveit=
14549 for x in $LDFLAGS $LIBBABELTRACE; do
14550
14551 acl_save_prefix="$prefix"
14552 prefix="$acl_final_prefix"
14553 acl_save_exec_prefix="$exec_prefix"
14554 exec_prefix="$acl_final_exec_prefix"
14555 eval x=\"$x\"
14556 exec_prefix="$acl_save_exec_prefix"
14557 prefix="$acl_save_prefix"
14558
14559 if test "X$x" = "X-L$found_dir"; then
14560 haveit=yes
14561 break
14562 fi
14563 done
14564 if test -z "$haveit"; then
14565 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14566 fi
14567 if test "$hardcode_minus_L" != no; then
14568 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14569 else
14570 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14571 fi
14572 fi
14573 fi
14574 fi
14575 else
14576 if test "X$found_a" != "X"; then
14577 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14578 else
14579 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14580 fi
14581 fi
14582 additional_includedir=
14583 case "$found_dir" in
14584 */lib | */lib/)
14585 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14586 additional_includedir="$basedir/include"
14587 ;;
14588 esac
14589 if test "X$additional_includedir" != "X"; then
14590 if test "X$additional_includedir" != "X/usr/include"; then
14591 haveit=
14592 if test "X$additional_includedir" = "X/usr/local/include"; then
14593 if test -n "$GCC"; then
14594 case $host_os in
14595 linux*) haveit=yes;;
14596 esac
14597 fi
14598 fi
14599 if test -z "$haveit"; then
14600 for x in $CPPFLAGS $INCBABELTRACE; do
14601
14602 acl_save_prefix="$prefix"
14603 prefix="$acl_final_prefix"
14604 acl_save_exec_prefix="$exec_prefix"
14605 exec_prefix="$acl_final_exec_prefix"
14606 eval x=\"$x\"
14607 exec_prefix="$acl_save_exec_prefix"
14608 prefix="$acl_save_prefix"
14609
14610 if test "X$x" = "X-I$additional_includedir"; then
14611 haveit=yes
14612 break
14613 fi
14614 done
14615 if test -z "$haveit"; then
14616 if test -d "$additional_includedir"; then
14617 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
14618 fi
14619 fi
14620 fi
14621 fi
14622 fi
14623 if test -n "$found_la"; then
14624 save_libdir="$libdir"
14625 case "$found_la" in
14626 */* | *\\*) . "$found_la" ;;
14627 *) . "./$found_la" ;;
14628 esac
14629 libdir="$save_libdir"
14630 for dep in $dependency_libs; do
14631 case "$dep" in
14632 -L*)
14633 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14634 if test "X$additional_libdir" != "X/usr/lib"; then
14635 haveit=
14636 if test "X$additional_libdir" = "X/usr/local/lib"; then
14637 if test -n "$GCC"; then
14638 case $host_os in
14639 linux*) haveit=yes;;
14640 esac
14641 fi
14642 fi
14643 if test -z "$haveit"; then
14644 haveit=
14645 for x in $LDFLAGS $LIBBABELTRACE; do
14646
14647 acl_save_prefix="$prefix"
14648 prefix="$acl_final_prefix"
14649 acl_save_exec_prefix="$exec_prefix"
14650 exec_prefix="$acl_final_exec_prefix"
14651 eval x=\"$x\"
14652 exec_prefix="$acl_save_exec_prefix"
14653 prefix="$acl_save_prefix"
14654
14655 if test "X$x" = "X-L$additional_libdir"; then
14656 haveit=yes
14657 break
14658 fi
14659 done
14660 if test -z "$haveit"; then
14661 if test -d "$additional_libdir"; then
14662 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
14663 fi
14664 fi
14665 haveit=
14666 for x in $LDFLAGS $LTLIBBABELTRACE; do
14667
14668 acl_save_prefix="$prefix"
14669 prefix="$acl_final_prefix"
14670 acl_save_exec_prefix="$exec_prefix"
14671 exec_prefix="$acl_final_exec_prefix"
14672 eval x=\"$x\"
14673 exec_prefix="$acl_save_exec_prefix"
14674 prefix="$acl_save_prefix"
14675
14676 if test "X$x" = "X-L$additional_libdir"; then
14677 haveit=yes
14678 break
14679 fi
14680 done
14681 if test -z "$haveit"; then
14682 if test -d "$additional_libdir"; then
14683 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
14684 fi
14685 fi
14686 fi
14687 fi
14688 ;;
14689 -R*)
14690 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14691 if test "$enable_rpath" != no; then
14692 haveit=
14693 for x in $rpathdirs; do
14694 if test "X$x" = "X$dir"; then
14695 haveit=yes
14696 break
14697 fi
14698 done
14699 if test -z "$haveit"; then
14700 rpathdirs="$rpathdirs $dir"
14701 fi
14702 haveit=
14703 for x in $ltrpathdirs; do
14704 if test "X$x" = "X$dir"; then
14705 haveit=yes
14706 break
14707 fi
14708 done
14709 if test -z "$haveit"; then
14710 ltrpathdirs="$ltrpathdirs $dir"
14711 fi
14712 fi
14713 ;;
14714 -l*)
14715 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14716 ;;
14717 *.la)
14718 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14719 ;;
14720 *)
14721 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
14722 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
14723 ;;
14724 esac
14725 done
14726 fi
14727 else
14728 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14729 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
14730 fi
14731 fi
14732 fi
14733 done
14734 done
14735 if test "X$rpathdirs" != "X"; then
14736 if test -n "$hardcode_libdir_separator"; then
14737 alldirs=
14738 for found_dir in $rpathdirs; do
14739 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14740 done
14741 acl_save_libdir="$libdir"
14742 libdir="$alldirs"
14743 eval flag=\"$hardcode_libdir_flag_spec\"
14744 libdir="$acl_save_libdir"
14745 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14746 else
14747 for found_dir in $rpathdirs; do
14748 acl_save_libdir="$libdir"
14749 libdir="$found_dir"
14750 eval flag=\"$hardcode_libdir_flag_spec\"
14751 libdir="$acl_save_libdir"
14752 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14753 done
14754 fi
14755 fi
14756 if test "X$ltrpathdirs" != "X"; then
14757 for found_dir in $ltrpathdirs; do
14758 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
14759 done
14760 fi
14761
14762
14763 ac_save_CPPFLAGS="$CPPFLAGS"
14764
14765 for element in $INCBABELTRACE; do
14766 haveit=
14767 for x in $CPPFLAGS; do
14768
14769 acl_save_prefix="$prefix"
14770 prefix="$acl_final_prefix"
14771 acl_save_exec_prefix="$exec_prefix"
14772 exec_prefix="$acl_final_exec_prefix"
14773 eval x=\"$x\"
14774 exec_prefix="$acl_save_exec_prefix"
14775 prefix="$acl_save_prefix"
14776
14777 if test "X$x" = "X$element"; then
14778 haveit=yes
14779 break
14780 fi
14781 done
14782 if test -z "$haveit"; then
14783 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14784 fi
14785 done
14786
14787
14788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
14789$as_echo_n "checking for libbabeltrace... " >&6; }
14790if test "${ac_cv_libbabeltrace+set}" = set; then :
14791 $as_echo_n "(cached) " >&6
14792else
14793
14794 ac_save_LIBS="$LIBS"
14795 LIBS="$LIBS $LIBBABELTRACE"
14796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14797/* end confdefs.h. */
14798#include <babeltrace/babeltrace.h>
14799 #include <babeltrace/ctf/events.h>
14800 #include <babeltrace/ctf/iterator.h>
14801int
14802main ()
14803{
14804struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
14805 struct bt_ctf_event *event = NULL;
14806 const struct bt_definition *scope;
14807
14808 scope = bt_ctf_get_top_level_scope (event,
14809 BT_STREAM_EVENT_HEADER);
14810 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
14811
14812 ;
14813 return 0;
14814}
14815_ACEOF
14816if ac_fn_c_try_link "$LINENO"; then :
14817 ac_cv_libbabeltrace=yes
14818else
14819 ac_cv_libbabeltrace=no
14820fi
14821rm -f core conftest.err conftest.$ac_objext \
14822 conftest$ac_exeext conftest.$ac_ext
14823 LIBS="$ac_save_LIBS"
14824
14825fi
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
14827$as_echo "$ac_cv_libbabeltrace" >&6; }
14828 if test "$ac_cv_libbabeltrace" = yes; then
14829 HAVE_LIBBABELTRACE=yes
14830
14831$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
14832
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
14834$as_echo_n "checking how to link with libbabeltrace... " >&6; }
14835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
14836$as_echo "$LIBBABELTRACE" >&6; }
14837 else
14838 HAVE_LIBBABELTRACE=no
14839 CPPFLAGS="$ac_save_CPPFLAGS"
14840 LIBBABELTRACE=
14841 LTLIBBABELTRACE=
14842 fi
14843
14844
14845
14846
14847
14848
14849 CFLAGS=$saved_CFLAGS
14850
14851 if test "$HAVE_LIBBABELTRACE" != yes; then
14852 if test "$with_babeltrace" = yes; then
14853 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
14854 else
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
14856$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
14857 fi
14858 fi
14859fi
14860
db985757 14861# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14862# to an empty version.
c906108c
SS
14863
14864files=
14865links=
5a2402b8 14866
c906108c
SS
14867rm -f nm.h
14868if test "${nativefile}" != ""; then
0f475e27
AC
14869 case "${nativefile}" in
14870 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14871 * ) GDB_NM_FILE="${nativefile}"
14872 esac
5a2402b8
AC
14873 files="${files} ${GDB_NM_FILE}"
14874 links="${links} nm.h"
60ca704f
SE
14875
14876cat >>confdefs.h <<_ACEOF
b78960be 14877#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14878_ACEOF
5a2402b8 14879
c906108c 14880fi
5a2402b8
AC
14881
14882
bec39cab
AC
14883ac_sources="$files"
14884ac_dests="$links"
14885while test -n "$ac_sources"; do
14886 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14887 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14888 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14889done
81ecdfbb 14890ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14891
14892
c906108c
SS
14893
14894
c906108c 14895
81ecdfbb 14896$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14897
bec39cab 14898
b292c783
JK
14899# Undo the $ec_script escaping suitable for Makefile.
14900transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
14901GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
14902if test "x$GDB_TRANSFORM_NAME" = x; then
14903 GDB_TRANSFORM_NAME=gdb
14904fi
14905
14906GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
14907if test "x$GCORE_TRANSFORM_NAME" = x; then
14908 GCORE_TRANSFORM_NAME=gcore
14909fi
14910
14911ac_config_files="$ac_config_files gcore"
14912
14913
c971b7fa 14914ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
14915
14916ac_config_commands="$ac_config_commands default"
89a34d1b 14917
bec39cab
AC
14918cat >confcache <<\_ACEOF
14919# This file is a shell script that caches the results of configure
14920# tests run on this system so they can be shared between configure
14921# scripts and configure runs, see configure's option --config-cache.
14922# It is not useful on other systems. If it contains results you don't
14923# want to keep, you may remove or edit it.
14924#
14925# config.status only pays attention to the cache file if you give it
14926# the --recheck option to rerun configure.
14927#
14928# `ac_cv_env_foo' variables (set or unset) will be overridden when
14929# loading this file, other *unset* `ac_cv_foo' will be assigned the
14930# following values.
14931
14932_ACEOF
14933
14934# The following way of writing the cache mishandles newlines in values,
14935# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14936# So, we kill variables containing newlines.
bec39cab
AC
14937# Ultrix sh set writes to stderr and can't be redirected directly,
14938# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14939(
14940 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14941 eval ac_val=\$$ac_var
14942 case $ac_val in #(
14943 *${as_nl}*)
14944 case $ac_var in #(
14945 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14946$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14947 esac
14948 case $ac_var in #(
14949 _ | IFS | as_nl) ;; #(
14950 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14951 *) { eval $ac_var=; unset $ac_var;} ;;
14952 esac ;;
14953 esac
14954 done
14955
bec39cab 14956 (set) 2>&1 |
81ecdfbb
RW
14957 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14958 *${as_nl}ac_space=\ *)
14959 # `set' does not quote correctly, so add quotes: double-quote
14960 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14961 sed -n \
14962 "s/'/'\\\\''/g;
14963 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14964 ;; #(
bec39cab
AC
14965 *)
14966 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14967 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14968 ;;
81ecdfbb
RW
14969 esac |
14970 sort
14971) |
bec39cab 14972 sed '
81ecdfbb 14973 /^ac_cv_env_/b end
bec39cab 14974 t clear
81ecdfbb 14975 :clear
bec39cab
AC
14976 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14977 t end
81ecdfbb
RW
14978 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14979 :end' >>confcache
14980if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14981 if test -w "$cache_file"; then
14982 test "x$cache_file" != "x/dev/null" &&
14983 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14984$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14985 cat confcache >$cache_file
14986 else
81ecdfbb
RW
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14988$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14989 fi
14990fi
14991rm -f confcache
14992
14993test "x$prefix" = xNONE && prefix=$ac_default_prefix
14994# Let make expand exec_prefix.
14995test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14996
bec39cab
AC
14997DEFS=-DHAVE_CONFIG_H
14998
14999ac_libobjs=
15000ac_ltlibobjs=
15001for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15002 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15003 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15004 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15005 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15006 # will be set to the directory where LIBOBJS objects are built.
15007 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15008 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15009done
15010LIBOBJS=$ac_libobjs
15011
15012LTLIBOBJS=$ac_ltlibobjs
15013
15014
85981d60 15015if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15016 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15017Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15018fi
a417dc56 15019if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15020 as_fn_error "conditional \"GMAKE\" was never defined.
15021Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15022fi
81ecdfbb
RW
15023
15024
bec39cab 15025: ${CONFIG_STATUS=./config.status}
81ecdfbb 15026ac_write_fail=0
bec39cab
AC
15027ac_clean_files_save=$ac_clean_files
15028ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15029{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15030$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15031as_write_fail=0
15032cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15033#! $SHELL
15034# Generated by $as_me.
15035# Run this file to recreate the current configuration.
15036# Compiler output produced by configure, useful for debugging
15037# configure, is in config.log if it exists.
15038
15039debug=false
15040ac_cs_recheck=false
15041ac_cs_silent=false
bec39cab 15042
81ecdfbb
RW
15043SHELL=\${CONFIG_SHELL-$SHELL}
15044export SHELL
15045_ASEOF
15046cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15047## -------------------- ##
15048## M4sh Initialization. ##
15049## -------------------- ##
15050
15051# Be more Bourne compatible
15052DUALCASE=1; export DUALCASE # for MKS sh
15053if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15054 emulate sh
15055 NULLCMD=:
81ecdfbb 15056 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15057 # is contrary to our usage. Disable this feature.
15058 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15059 setopt NO_GLOB_SUBST
15060else
15061 case `(set -o) 2>/dev/null` in #(
15062 *posix*) :
15063 set -o posix ;; #(
15064 *) :
15065 ;;
15066esac
bec39cab 15067fi
bec39cab 15068
81ecdfbb
RW
15069
15070as_nl='
15071'
15072export as_nl
15073# Printing a long string crashes Solaris 7 /usr/bin/printf.
15074as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15075as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15076as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15077# Prefer a ksh shell builtin over an external printf program on Solaris,
15078# but without wasting forks for bash or zsh.
15079if test -z "$BASH_VERSION$ZSH_VERSION" \
15080 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15081 as_echo='print -r --'
15082 as_echo_n='print -rn --'
15083elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15084 as_echo='printf %s\n'
15085 as_echo_n='printf %s'
15086else
15087 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15088 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15089 as_echo_n='/usr/ucb/echo -n'
15090 else
15091 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15092 as_echo_n_body='eval
15093 arg=$1;
15094 case $arg in #(
15095 *"$as_nl"*)
15096 expr "X$arg" : "X\\(.*\\)$as_nl";
15097 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15098 esac;
15099 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15100 '
15101 export as_echo_n_body
15102 as_echo_n='sh -c $as_echo_n_body as_echo'
15103 fi
15104 export as_echo_body
15105 as_echo='sh -c $as_echo_body as_echo'
15106fi
15107
15108# The user is always right.
15109if test "${PATH_SEPARATOR+set}" != set; then
15110 PATH_SEPARATOR=:
15111 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15112 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15113 PATH_SEPARATOR=';'
15114 }
bec39cab
AC
15115fi
15116
15117
81ecdfbb
RW
15118# IFS
15119# We need space, tab and new line, in precisely that order. Quoting is
15120# there to prevent editors from complaining about space-tab.
15121# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15122# splitting by setting IFS to empty value.)
15123IFS=" "" $as_nl"
15124
15125# Find who we are. Look in the path if we contain no directory separator.
15126case $0 in #((
15127 *[\\/]* ) as_myself=$0 ;;
15128 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15129for as_dir in $PATH
15130do
15131 IFS=$as_save_IFS
15132 test -z "$as_dir" && as_dir=.
15133 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15134 done
15135IFS=$as_save_IFS
15136
15137 ;;
15138esac
15139# We did not find ourselves, most probably we were run as `sh COMMAND'
15140# in which case we are not to be found in the path.
15141if test "x$as_myself" = x; then
15142 as_myself=$0
15143fi
15144if test ! -f "$as_myself"; then
15145 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15146 exit 1
15147fi
15148
15149# Unset variables that we do not need and which cause bugs (e.g. in
15150# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15151# suppresses any "Segmentation fault" message there. '((' could
15152# trigger a bug in pdksh 5.2.14.
15153for as_var in BASH_ENV ENV MAIL MAILPATH
15154do eval test x\${$as_var+set} = xset \
15155 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15156done
bec39cab
AC
15157PS1='$ '
15158PS2='> '
15159PS4='+ '
15160
15161# NLS nuisances.
81ecdfbb
RW
15162LC_ALL=C
15163export LC_ALL
15164LANGUAGE=C
15165export LANGUAGE
15166
15167# CDPATH.
15168(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15169
15170
15171# as_fn_error ERROR [LINENO LOG_FD]
15172# ---------------------------------
15173# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15174# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15175# script with status $?, using 1 if that was 0.
15176as_fn_error ()
15177{
15178 as_status=$?; test $as_status -eq 0 && as_status=1
15179 if test "$3"; then
15180 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15181 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15182 fi
15183 $as_echo "$as_me: error: $1" >&2
15184 as_fn_exit $as_status
15185} # as_fn_error
15186
15187
15188# as_fn_set_status STATUS
15189# -----------------------
15190# Set $? to STATUS, without forking.
15191as_fn_set_status ()
15192{
15193 return $1
15194} # as_fn_set_status
15195
15196# as_fn_exit STATUS
15197# -----------------
15198# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15199as_fn_exit ()
15200{
15201 set +e
15202 as_fn_set_status $1
15203 exit $1
15204} # as_fn_exit
15205
15206# as_fn_unset VAR
15207# ---------------
15208# Portably unset VAR.
15209as_fn_unset ()
15210{
15211 { eval $1=; unset $1;}
15212}
15213as_unset=as_fn_unset
15214# as_fn_append VAR VALUE
15215# ----------------------
15216# Append the text in VALUE to the end of the definition contained in VAR. Take
15217# advantage of any shell optimizations that allow amortized linear growth over
15218# repeated appends, instead of the typical quadratic growth present in naive
15219# implementations.
15220if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15221 eval 'as_fn_append ()
15222 {
15223 eval $1+=\$2
15224 }'
15225else
15226 as_fn_append ()
15227 {
15228 eval $1=\$$1\$2
15229 }
15230fi # as_fn_append
15231
15232# as_fn_arith ARG...
15233# ------------------
15234# Perform arithmetic evaluation on the ARGs, and store the result in the
15235# global $as_val. Take advantage of shells that can avoid forks. The arguments
15236# must be portable across $(()) and expr.
15237if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15238 eval 'as_fn_arith ()
15239 {
15240 as_val=$(( $* ))
15241 }'
15242else
15243 as_fn_arith ()
15244 {
15245 as_val=`expr "$@" || test $? -eq 1`
15246 }
15247fi # as_fn_arith
bec39cab 15248
81ecdfbb
RW
15249
15250if expr a : '\(a\)' >/dev/null 2>&1 &&
15251 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15252 as_expr=expr
15253else
15254 as_expr=false
15255fi
15256
81ecdfbb 15257if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15258 as_basename=basename
15259else
15260 as_basename=false
15261fi
15262
81ecdfbb
RW
15263if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15264 as_dirname=dirname
15265else
15266 as_dirname=false
15267fi
bec39cab 15268
81ecdfbb 15269as_me=`$as_basename -- "$0" ||
bec39cab
AC
15270$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15271 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15272 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15273$as_echo X/"$0" |
15274 sed '/^.*\/\([^/][^/]*\)\/*$/{
15275 s//\1/
15276 q
15277 }
15278 /^X\/\(\/\/\)$/{
15279 s//\1/
15280 q
15281 }
15282 /^X\/\(\/\).*/{
15283 s//\1/
15284 q
15285 }
15286 s/.*/./; q'`
b4e70030 15287
b4e70030
JB
15288# Avoid depending upon Character Ranges.
15289as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15290as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15291as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15292as_cr_digits='0123456789'
15293as_cr_alnum=$as_cr_Letters$as_cr_digits
15294
81ecdfbb
RW
15295ECHO_C= ECHO_N= ECHO_T=
15296case `echo -n x` in #(((((
15297-n*)
15298 case `echo 'xy\c'` in
15299 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15300 xy) ECHO_C='\c';;
15301 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15302 ECHO_T=' ';;
15303 esac;;
15304*)
15305 ECHO_N='-n';;
bec39cab
AC
15306esac
15307
81ecdfbb
RW
15308rm -f conf$$ conf$$.exe conf$$.file
15309if test -d conf$$.dir; then
15310 rm -f conf$$.dir/conf$$.file
bec39cab 15311else
81ecdfbb
RW
15312 rm -f conf$$.dir
15313 mkdir conf$$.dir 2>/dev/null
bec39cab 15314fi
81ecdfbb
RW
15315if (echo >conf$$.file) 2>/dev/null; then
15316 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15317 as_ln_s='ln -s'
81ecdfbb
RW
15318 # ... but there are two gotchas:
15319 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15320 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15321 # In both cases, we have to default to `cp -p'.
15322 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15323 as_ln_s='cp -p'
15324 elif ln conf$$.file conf$$ 2>/dev/null; then
15325 as_ln_s=ln
15326 else
15327 as_ln_s='cp -p'
b4e70030 15328 fi
bec39cab
AC
15329else
15330 as_ln_s='cp -p'
15331fi
81ecdfbb
RW
15332rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15333rmdir conf$$.dir 2>/dev/null
15334
15335
15336# as_fn_mkdir_p
15337# -------------
15338# Create "$as_dir" as a directory, including parents if necessary.
15339as_fn_mkdir_p ()
15340{
15341
15342 case $as_dir in #(
15343 -*) as_dir=./$as_dir;;
15344 esac
15345 test -d "$as_dir" || eval $as_mkdir_p || {
15346 as_dirs=
15347 while :; do
15348 case $as_dir in #(
15349 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15350 *) as_qdir=$as_dir;;
15351 esac
15352 as_dirs="'$as_qdir' $as_dirs"
15353 as_dir=`$as_dirname -- "$as_dir" ||
15354$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15355 X"$as_dir" : 'X\(//\)[^/]' \| \
15356 X"$as_dir" : 'X\(//\)$' \| \
15357 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15358$as_echo X"$as_dir" |
15359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15360 s//\1/
15361 q
15362 }
15363 /^X\(\/\/\)[^/].*/{
15364 s//\1/
15365 q
15366 }
15367 /^X\(\/\/\)$/{
15368 s//\1/
15369 q
15370 }
15371 /^X\(\/\).*/{
15372 s//\1/
15373 q
15374 }
15375 s/.*/./; q'`
15376 test -d "$as_dir" && break
15377 done
15378 test -z "$as_dirs" || eval "mkdir $as_dirs"
15379 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15380
bec39cab 15381
81ecdfbb 15382} # as_fn_mkdir_p
bec39cab 15383if mkdir -p . 2>/dev/null; then
81ecdfbb 15384 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15385else
15386 test -d ./-p && rmdir ./-p
15387 as_mkdir_p=false
15388fi
15389
81ecdfbb
RW
15390if test -x / >/dev/null 2>&1; then
15391 as_test_x='test -x'
15392else
15393 if ls -dL / >/dev/null 2>&1; then
15394 as_ls_L_option=L
15395 else
15396 as_ls_L_option=
15397 fi
15398 as_test_x='
15399 eval sh -c '\''
15400 if test -d "$1"; then
15401 test -d "$1/.";
15402 else
15403 case $1 in #(
15404 -*)set "./$1";;
15405 esac;
15406 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15407 ???[sx]*):;;*)false;;esac;fi
15408 '\'' sh
15409 '
15410fi
15411as_executable_p=$as_test_x
bec39cab
AC
15412
15413# Sed expression to map a string onto a valid CPP name.
15414as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15415
15416# Sed expression to map a string onto a valid variable name.
15417as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15418
15419
bec39cab 15420exec 6>&1
81ecdfbb
RW
15421## ----------------------------------- ##
15422## Main body of $CONFIG_STATUS script. ##
15423## ----------------------------------- ##
15424_ASEOF
15425test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15426
15427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15428# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15429# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15430# values after options handling.
15431ac_log="
bec39cab 15432This file was extended by $as_me, which was
81ecdfbb 15433generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15434
15435 CONFIG_FILES = $CONFIG_FILES
15436 CONFIG_HEADERS = $CONFIG_HEADERS
15437 CONFIG_LINKS = $CONFIG_LINKS
15438 CONFIG_COMMANDS = $CONFIG_COMMANDS
15439 $ $0 $@
15440
81ecdfbb
RW
15441on `(hostname || uname -n) 2>/dev/null | sed 1q`
15442"
15443
bec39cab
AC
15444_ACEOF
15445
81ecdfbb
RW
15446case $ac_config_files in *"
15447"*) set x $ac_config_files; shift; ac_config_files=$*;;
15448esac
234b45d4 15449
81ecdfbb
RW
15450case $ac_config_headers in *"
15451"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15452esac
b4e70030 15453
b4e70030 15454
81ecdfbb
RW
15455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15456# Files that config.status was made for.
15457config_files="$ac_config_files"
15458config_headers="$ac_config_headers"
15459config_links="$ac_config_links"
15460config_commands="$ac_config_commands"
234b45d4 15461
81ecdfbb 15462_ACEOF
b4e70030 15463
81ecdfbb 15464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15465ac_cs_usage="\
81ecdfbb
RW
15466\`$as_me' instantiates files and other configuration actions
15467from templates according to the current configuration. Unless the files
15468and actions are specified as TAGs, all are instantiated by default.
234b45d4 15469
81ecdfbb 15470Usage: $0 [OPTION]... [TAG]...
234b45d4 15471
bec39cab 15472 -h, --help print this help, then exit
81ecdfbb
RW
15473 -V, --version print version number and configuration settings, then exit
15474 -q, --quiet, --silent
15475 do not print progress messages
bec39cab
AC
15476 -d, --debug don't remove temporary files
15477 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15478 --file=FILE[:TEMPLATE]
15479 instantiate the configuration file FILE
15480 --header=FILE[:TEMPLATE]
15481 instantiate the configuration header FILE
234b45d4 15482
bec39cab
AC
15483Configuration files:
15484$config_files
234b45d4 15485
bec39cab
AC
15486Configuration headers:
15487$config_headers
234b45d4 15488
bec39cab
AC
15489Configuration links:
15490$config_links
234b45d4 15491
bec39cab
AC
15492Configuration commands:
15493$config_commands
15494
81ecdfbb 15495Report bugs to the package provider."
b4e70030 15496
81ecdfbb
RW
15497_ACEOF
15498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15499ac_cs_version="\\
15500config.status
81ecdfbb
RW
15501configured by $0, generated by GNU Autoconf 2.64,
15502 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15503
81ecdfbb 15504Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15505This config.status script is free software; the Free Software Foundation
15506gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15507
15508ac_pwd='$ac_pwd'
15509srcdir='$srcdir'
15510INSTALL='$INSTALL'
81ecdfbb
RW
15511AWK='$AWK'
15512test -n "\$AWK" || AWK=awk
bec39cab
AC
15513_ACEOF
15514
81ecdfbb
RW
15515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15516# The default lists apply if the user does not specify any file.
bec39cab
AC
15517ac_need_defaults=:
15518while test $# != 0
15519do
15520 case $1 in
15521 --*=*)
81ecdfbb
RW
15522 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15523 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15524 ac_shift=:
c906108c 15525 ;;
81ecdfbb 15526 *)
bec39cab
AC
15527 ac_option=$1
15528 ac_optarg=$2
15529 ac_shift=shift
c906108c 15530 ;;
bec39cab 15531 esac
c906108c 15532
bec39cab
AC
15533 case $ac_option in
15534 # Handling of the options.
bec39cab
AC
15535 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15536 ac_cs_recheck=: ;;
81ecdfbb
RW
15537 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15538 $as_echo "$ac_cs_version"; exit ;;
15539 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15540 debug=: ;;
15541 --file | --fil | --fi | --f )
15542 $ac_shift
81ecdfbb
RW
15543 case $ac_optarg in
15544 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15545 esac
15546 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15547 ac_need_defaults=false;;
15548 --header | --heade | --head | --hea )
15549 $ac_shift
81ecdfbb
RW
15550 case $ac_optarg in
15551 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15552 esac
15553 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15554 ac_need_defaults=false;;
81ecdfbb
RW
15555 --he | --h)
15556 # Conflict between --help and --header
15557 as_fn_error "ambiguous option: \`$1'
15558Try \`$0 --help' for more information.";;
15559 --help | --hel | -h )
15560 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15561 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15562 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15563 ac_cs_silent=: ;;
c906108c 15564
bec39cab 15565 # This is an error.
81ecdfbb
RW
15566 -*) as_fn_error "unrecognized option: \`$1'
15567Try \`$0 --help' for more information." ;;
c906108c 15568
81ecdfbb
RW
15569 *) as_fn_append ac_config_targets " $1"
15570 ac_need_defaults=false ;;
c906108c 15571
bec39cab
AC
15572 esac
15573 shift
15574done
c906108c 15575
bec39cab 15576ac_configure_extra_args=
c906108c 15577
bec39cab
AC
15578if $ac_cs_silent; then
15579 exec 6>/dev/null
15580 ac_configure_extra_args="$ac_configure_extra_args --silent"
15581fi
c906108c 15582
bec39cab 15583_ACEOF
81ecdfbb 15584cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15585if \$ac_cs_recheck; then
81ecdfbb
RW
15586 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15587 shift
15588 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15589 CONFIG_SHELL='$SHELL'
15590 export CONFIG_SHELL
15591 exec "\$@"
bec39cab
AC
15592fi
15593
15594_ACEOF
81ecdfbb
RW
15595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15596exec 5>>config.log
15597{
15598 echo
15599 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15600## Running $as_me. ##
15601_ASBOX
15602 $as_echo "$ac_log"
15603} >&5
bec39cab 15604
81ecdfbb
RW
15605_ACEOF
15606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15607#
81ecdfbb 15608# INIT-COMMANDS
c906108c 15609#
a417dc56 15610ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 15611
bec39cab
AC
15612_ACEOF
15613
81ecdfbb 15614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15615
81ecdfbb 15616# Handling of arguments.
bec39cab 15617for ac_config_target in $ac_config_targets
c906108c 15618do
81ecdfbb
RW
15619 case $ac_config_target in
15620 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15621 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 15622 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 15623 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 15624 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 15625 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 15626 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 15627 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 15628 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
15629 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15630
15631 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15632 esac
15633done
15634
81ecdfbb 15635
bec39cab
AC
15636# If the user did not use the arguments to specify the items to instantiate,
15637# then the envvar interface is used. Set only those that are not.
15638# We use the long form for the default assignment because of an extremely
15639# bizarre bug on SunOS 4.1.3.
15640if $ac_need_defaults; then
15641 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15642 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15643 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15644 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15645fi
15646
b4e70030 15647# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15648# simply because there is no reason against having it here, and in addition,
b4e70030 15649# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15650# Hook for its removal unless debugging.
15651# Note that there is a small window in which the directory will not be cleaned:
15652# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15653$debug ||
15654{
81ecdfbb
RW
15655 tmp=
15656 trap 'exit_status=$?
15657 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15658' 0
15659 trap 'as_fn_exit 1' 1 2 13 15
15660}
15661# Create a (secure) tmp directory for tmp files.
15662
15663{
15664 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15665 test -n "$tmp" && test -d "$tmp"
15666} ||
15667{
15668 tmp=./conf$$-$RANDOM
15669 (umask 077 && mkdir "$tmp")
15670} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15671
15672# Set up the scripts for CONFIG_FILES section.
15673# No need to generate them if there are no CONFIG_FILES.
15674# This happens for instance with `./config.status config.h'.
15675if test -n "$CONFIG_FILES"; then
15676
15677if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15678 ac_cs_awk_getline=:
15679 ac_cs_awk_pipe_init=
15680 ac_cs_awk_read_file='
15681 while ((getline aline < (F[key])) > 0)
15682 print(aline)
15683 close(F[key])'
15684 ac_cs_awk_pipe_fini=
15685else
15686 ac_cs_awk_getline=false
15687 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15688 ac_cs_awk_read_file='
15689 print "|#_!!_#|"
15690 print "cat " F[key] " &&"
15691 '$ac_cs_awk_pipe_init
15692 # The final `:' finishes the AND list.
15693 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15694fi
15695ac_cr=`echo X | tr X '\015'`
15696# On cygwin, bash can eat \r inside `` if the user requested igncr.
15697# But we know of no other shell where ac_cr would be empty at this
15698# point, so we can use a bashism as a fallback.
15699if test "x$ac_cr" = x; then
15700 eval ac_cr=\$\'\\r\'
15701fi
15702ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15703if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15704 ac_cs_awk_cr='\r'
15705else
15706 ac_cs_awk_cr=$ac_cr
15707fi
15708
15709echo 'BEGIN {' >"$tmp/subs1.awk" &&
15710_ACEOF
15711
15712# Create commands to substitute file output variables.
15713{
15714 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15715 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15716 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15717 echo "_ACAWK" &&
15718 echo "_ACEOF"
15719} >conf$$files.sh &&
15720. ./conf$$files.sh ||
15721 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15722rm -f conf$$files.sh
15723
15724{
15725 echo "cat >conf$$subs.awk <<_ACEOF" &&
15726 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15727 echo "_ACEOF"
15728} >conf$$subs.sh ||
15729 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15730ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15731ac_delim='%!_!# '
15732for ac_last_try in false false false false false :; do
15733 . ./conf$$subs.sh ||
15734 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15735
15736 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15737 if test $ac_delim_n = $ac_delim_num; then
15738 break
15739 elif $ac_last_try; then
15740 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15741 else
15742 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15743 fi
15744done
15745rm -f conf$$subs.sh
15746
15747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15748cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15749_ACEOF
15750sed -n '
15751h
15752s/^/S["/; s/!.*/"]=/
15753p
15754g
15755s/^[^!]*!//
15756:repl
15757t repl
15758s/'"$ac_delim"'$//
15759t delim
15760:nl
15761h
15762s/\(.\{148\}\).*/\1/
15763t more1
15764s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15765p
15766n
15767b repl
15768:more1
15769s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15770p
15771g
15772s/.\{148\}//
15773t nl
15774:delim
15775h
15776s/\(.\{148\}\).*/\1/
15777t more2
15778s/["\\]/\\&/g; s/^/"/; s/$/"/
15779p
15780b
15781:more2
15782s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15783p
15784g
15785s/.\{148\}//
15786t delim
15787' <conf$$subs.awk | sed '
15788/^[^""]/{
15789 N
15790 s/\n//
15791}
15792' >>$CONFIG_STATUS || ac_write_fail=1
15793rm -f conf$$subs.awk
15794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15795_ACAWK
15796cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15797 for (key in S) S_is_set[key] = 1
15798 FS = "\a"
15799 \$ac_cs_awk_pipe_init
15800}
15801{
15802 line = $ 0
15803 nfields = split(line, field, "@")
15804 substed = 0
15805 len = length(field[1])
15806 for (i = 2; i < nfields; i++) {
15807 key = field[i]
15808 keylen = length(key)
15809 if (S_is_set[key]) {
15810 value = S[key]
15811 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15812 len += length(value) + length(field[++i])
15813 substed = 1
15814 } else
15815 len += 1 + keylen
15816 }
15817 if (nfields == 3 && !substed) {
15818 key = field[2]
15819 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15820 \$ac_cs_awk_read_file
15821 next
15822 }
15823 }
15824 print line
b4e70030 15825}
81ecdfbb
RW
15826\$ac_cs_awk_pipe_fini
15827_ACAWK
15828_ACEOF
15829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15830if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15831 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15832else
15833 cat
15834fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15835 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15836_ACEOF
15837
15838# VPATH may cause trouble with some makes, so we remove $(srcdir),
15839# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15840# trailing colons and then remove the whole line if VPATH becomes empty
15841# (actually we leave an empty line to preserve line numbers).
15842if test "x$srcdir" = x.; then
15843 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15844s/:*\$(srcdir):*/:/
15845s/:*\${srcdir}:*/:/
15846s/:*@srcdir@:*/:/
15847s/^\([^=]*=[ ]*\):*/\1/
15848s/:*$//
15849s/^[^=]*=[ ]*$//
15850}'
15851fi
15852
15853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15854fi # test -n "$CONFIG_FILES"
15855
15856# Set up the scripts for CONFIG_HEADERS section.
15857# No need to generate them if there are no CONFIG_HEADERS.
15858# This happens for instance with `./config.status Makefile'.
15859if test -n "$CONFIG_HEADERS"; then
15860cat >"$tmp/defines.awk" <<\_ACAWK ||
15861BEGIN {
15862_ACEOF
15863
15864# Transform confdefs.h into an awk script `defines.awk', embedded as
15865# here-document in config.status, that substitutes the proper values into
15866# config.h.in to produce config.h.
4e8d927d 15867
81ecdfbb
RW
15868# Create a delimiter string that does not exist in confdefs.h, to ease
15869# handling of long lines.
15870ac_delim='%!_!# '
15871for ac_last_try in false false :; do
15872 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15873 if test -z "$ac_t"; then
15874 break
15875 elif $ac_last_try; then
15876 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15877 else
15878 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15879 fi
15880done
4e8d927d 15881
81ecdfbb
RW
15882# For the awk script, D is an array of macro values keyed by name,
15883# likewise P contains macro parameters if any. Preserve backslash
15884# newline sequences.
15885
15886ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15887sed -n '
15888s/.\{148\}/&'"$ac_delim"'/g
15889t rset
15890:rset
15891s/^[ ]*#[ ]*define[ ][ ]*/ /
15892t def
15893d
15894:def
15895s/\\$//
15896t bsnl
15897s/["\\]/\\&/g
15898s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15899D["\1"]=" \3"/p
15900s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15901d
15902:bsnl
15903s/["\\]/\\&/g
15904s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15905D["\1"]=" \3\\\\\\n"\\/p
15906t cont
15907s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15908t cont
15909d
15910:cont
15911n
15912s/.\{148\}/&'"$ac_delim"'/g
15913t clear
15914:clear
15915s/\\$//
15916t bsnlc
15917s/["\\]/\\&/g; s/^/"/; s/$/"/p
15918d
15919:bsnlc
15920s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15921b cont
15922' <confdefs.h | sed '
15923s/'"$ac_delim"'/"\\\
15924"/g' >>$CONFIG_STATUS || ac_write_fail=1
15925
15926cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15927 for (key in D) D_is_set[key] = 1
15928 FS = "\a"
15929}
15930/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15931 line = \$ 0
15932 split(line, arg, " ")
15933 if (arg[1] == "#") {
15934 defundef = arg[2]
15935 mac1 = arg[3]
15936 } else {
15937 defundef = substr(arg[1], 2)
15938 mac1 = arg[2]
15939 }
15940 split(mac1, mac2, "(") #)
15941 macro = mac2[1]
15942 prefix = substr(line, 1, index(line, defundef) - 1)
15943 if (D_is_set[macro]) {
15944 # Preserve the white space surrounding the "#".
15945 print prefix "define", macro P[macro] D[macro]
15946 next
15947 } else {
15948 # Replace #undef with comments. This is necessary, for example,
15949 # in the case of _POSIX_SOURCE, which is predefined and required
15950 # on some systems where configure will not decide to define it.
15951 if (defundef == "undef") {
15952 print "/*", prefix defundef, macro, "*/"
15953 next
15954 }
15955 }
b4e70030 15956}
81ecdfbb
RW
15957{ print }
15958_ACAWK
b4e70030 15959_ACEOF
81ecdfbb
RW
15960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15961 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15962fi # test -n "$CONFIG_HEADERS"
4e8d927d 15963
4e8d927d 15964
81ecdfbb
RW
15965eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15966shift
15967for ac_tag
15968do
15969 case $ac_tag in
15970 :[FHLC]) ac_mode=$ac_tag; continue;;
15971 esac
15972 case $ac_mode$ac_tag in
15973 :[FHL]*:*);;
15974 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15975 :[FH]-) ac_tag=-:-;;
15976 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15977 esac
15978 ac_save_IFS=$IFS
15979 IFS=:
15980 set x $ac_tag
15981 IFS=$ac_save_IFS
15982 shift
15983 ac_file=$1
15984 shift
4e8d927d 15985
81ecdfbb
RW
15986 case $ac_mode in
15987 :L) ac_source=$1;;
15988 :[FH])
15989 ac_file_inputs=
15990 for ac_f
15991 do
15992 case $ac_f in
15993 -) ac_f="$tmp/stdin";;
15994 *) # Look for the file first in the build tree, then in the source tree
15995 # (if the path is not absolute). The absolute path cannot be DOS-style,
15996 # because $ac_f cannot contain `:'.
15997 test -f "$ac_f" ||
15998 case $ac_f in
15999 [\\/$]*) false;;
16000 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16001 esac ||
16002 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16003 esac
16004 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16005 as_fn_append ac_file_inputs " '$ac_f'"
16006 done
16007
16008 # Let's still pretend it is `configure' which instantiates (i.e., don't
16009 # use $as_me), people would be surprised to read:
16010 # /* config.h. Generated by config.status. */
16011 configure_input='Generated from '`
16012 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16013 `' by configure.'
16014 if test x"$ac_file" != x-; then
16015 configure_input="$ac_file. $configure_input"
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16017$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16018 fi
81ecdfbb
RW
16019 # Neutralize special characters interpreted by sed in replacement strings.
16020 case $configure_input in #(
16021 *\&* | *\|* | *\\* )
16022 ac_sed_conf_input=`$as_echo "$configure_input" |
16023 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16024 *) ac_sed_conf_input=$configure_input;;
16025 esac
4e8d927d 16026
81ecdfbb
RW
16027 case $ac_tag in
16028 *:-:* | *:-) cat >"$tmp/stdin" \
16029 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16030 esac
16031 ;;
c906108c
SS
16032 esac
16033
81ecdfbb 16034 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16035$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16036 X"$ac_file" : 'X\(//\)[^/]' \| \
16037 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16038 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16039$as_echo X"$ac_file" |
16040 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16041 s//\1/
16042 q
16043 }
16044 /^X\(\/\/\)[^/].*/{
16045 s//\1/
16046 q
16047 }
16048 /^X\(\/\/\)$/{
16049 s//\1/
16050 q
16051 }
16052 /^X\(\/\).*/{
16053 s//\1/
16054 q
16055 }
16056 s/.*/./; q'`
16057 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16058 ac_builddir=.
16059
81ecdfbb
RW
16060case "$ac_dir" in
16061.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16062*)
16063 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16064 # A ".." for each directory in $ac_dir_suffix.
16065 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16066 case $ac_top_builddir_sub in
16067 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16068 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16069 esac ;;
16070esac
16071ac_abs_top_builddir=$ac_pwd
16072ac_abs_builddir=$ac_pwd$ac_dir_suffix
16073# for backward compatibility:
16074ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16075
16076case $srcdir in
81ecdfbb 16077 .) # We are building in place.
bec39cab 16078 ac_srcdir=.
81ecdfbb
RW
16079 ac_top_srcdir=$ac_top_builddir_sub
16080 ac_abs_top_srcdir=$ac_pwd ;;
16081 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16082 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16083 ac_top_srcdir=$srcdir
16084 ac_abs_top_srcdir=$srcdir ;;
16085 *) # Relative name.
16086 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16087 ac_top_srcdir=$ac_top_build_prefix$srcdir
16088 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16089esac
81ecdfbb 16090ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16091
c906108c 16092
81ecdfbb
RW
16093 case $ac_mode in
16094 :F)
16095 #
16096 # CONFIG_FILE
16097 #
c906108c 16098
bec39cab
AC
16099 case $INSTALL in
16100 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16101 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16102 esac
81ecdfbb 16103_ACEOF
121ce6e5 16104
81ecdfbb
RW
16105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16106# If the template does not know about datarootdir, expand it.
16107# FIXME: This hack should be removed a few years after 2.60.
16108ac_datarootdir_hack=; ac_datarootdir_seen=
16109ac_sed_dataroot='
16110/datarootdir/ {
16111 p
16112 q
16113}
16114/@datadir@/p
16115/@docdir@/p
16116/@infodir@/p
16117/@localedir@/p
16118/@mandir@/p'
16119case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16120*datarootdir*) ac_datarootdir_seen=yes;;
16121*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16123$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16124_ACEOF
16125cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16126 ac_datarootdir_hack='
16127 s&@datadir@&$datadir&g
16128 s&@docdir@&$docdir&g
16129 s&@infodir@&$infodir&g
16130 s&@localedir@&$localedir&g
16131 s&@mandir@&$mandir&g
16132 s&\\\${datarootdir}&$datarootdir&g' ;;
16133esac
4e8d927d 16134_ACEOF
81ecdfbb
RW
16135
16136# Neutralize VPATH when `$srcdir' = `.'.
16137# Shell code in configure.ac might set extrasub.
16138# FIXME: do we really want to maintain this feature?
16139cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16140ac_sed_extra="$ac_vpsub
bec39cab
AC
16141$extrasub
16142_ACEOF
81ecdfbb 16143cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16144:t
16145/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16146s|@configure_input@|$ac_sed_conf_input|;t t
16147s&@top_builddir@&$ac_top_builddir_sub&;t t
16148s&@top_build_prefix@&$ac_top_build_prefix&;t t
16149s&@srcdir@&$ac_srcdir&;t t
16150s&@abs_srcdir@&$ac_abs_srcdir&;t t
16151s&@top_srcdir@&$ac_top_srcdir&;t t
16152s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16153s&@builddir@&$ac_builddir&;t t
16154s&@abs_builddir@&$ac_abs_builddir&;t t
16155s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16156s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16157$ac_datarootdir_hack
16158"
16159eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16160if $ac_cs_awk_getline; then
16161 $AWK -f "$tmp/subs.awk"
16162else
16163 $AWK -f "$tmp/subs.awk" | $SHELL
16164fi >$tmp/out \
16165 || as_fn_error "could not create $ac_file" "$LINENO" 5
16166
16167test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16168 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16169 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16171which seems to be undefined. Please make sure it is defined." >&5
16172$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16173which seems to be undefined. Please make sure it is defined." >&2;}
16174
16175 rm -f "$tmp/stdin"
bec39cab 16176 case $ac_file in
81ecdfbb
RW
16177 -) cat "$tmp/out" && rm -f "$tmp/out";;
16178 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16179 esac \
16180 || as_fn_error "could not create $ac_file" "$LINENO" 5
16181 ;;
16182 :H)
16183 #
16184 # CONFIG_HEADER
16185 #
bec39cab 16186 if test x"$ac_file" != x-; then
81ecdfbb
RW
16187 {
16188 $as_echo "/* $configure_input */" \
16189 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16190 } >"$tmp/config.h" \
16191 || as_fn_error "could not create $ac_file" "$LINENO" 5
16192 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16194$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16195 else
81ecdfbb
RW
16196 rm -f "$ac_file"
16197 mv "$tmp/config.h" "$ac_file" \
16198 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16199 fi
16200 else
81ecdfbb
RW
16201 $as_echo "/* $configure_input */" \
16202 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16203 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16204 fi
81ecdfbb
RW
16205 ;;
16206 :L)
16207 #
16208 # CONFIG_LINK
16209 #
c906108c 16210
81ecdfbb
RW
16211 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16212 :
b4e70030 16213 else
81ecdfbb
RW
16214 # Prefer the file from the source tree if names are identical.
16215 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16216 ac_source=$srcdir/$ac_source
16217 fi
b4e70030 16218
81ecdfbb
RW
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16220$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16221
81ecdfbb
RW
16222 if test ! -r "$ac_source"; then
16223 as_fn_error "$ac_source: file not found" "$LINENO" 5
16224 fi
16225 rm -f "$ac_file"
bec39cab 16226
81ecdfbb
RW
16227 # Try a relative symlink, then a hard link, then a copy.
16228 case $srcdir in
16229 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16230 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16231 esac
16232 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16233 ln "$ac_source" "$ac_file" 2>/dev/null ||
16234 cp -p "$ac_source" "$ac_file" ||
16235 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16236 fi
16237 ;;
16238 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16239$as_echo "$as_me: executing $ac_file commands" >&6;}
16240 ;;
c906108c 16241 esac
b4e70030 16242
bec39cab 16243
81ecdfbb
RW
16244 case $ac_file$ac_mode in
16245 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16246 "gcore":F) chmod +x gcore ;;
81ecdfbb 16247 "default":C)
c906108c
SS
16248case x$CONFIG_HEADERS in
16249xconfig.h:config.in)
16250echo > stamp-h ;;
16251esac
bec39cab 16252 ;;
81ecdfbb 16253
bec39cab 16254 esac
81ecdfbb 16255done # for ac_tag
c906108c 16256
bec39cab 16257
81ecdfbb 16258as_fn_exit 0
bec39cab 16259_ACEOF
bec39cab
AC
16260ac_clean_files=$ac_clean_files_save
16261
81ecdfbb
RW
16262test $ac_write_fail = 0 ||
16263 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16264
bec39cab
AC
16265
16266# configure is writing to config.log, and then calls config.status.
16267# config.status does its own redirection, appending to config.log.
16268# Unfortunately, on DOS this fails, as config.log is still kept open
16269# by configure, so config.status won't be able to write to it; its
16270# output is simply discarded. So we exec the FD to /dev/null,
16271# effectively closing config.log, so it can be properly (re)opened and
16272# appended to by config.status. When coming back to configure, we
16273# need to make the FD available again.
16274if test "$no_create" != yes; then
16275 ac_cs_success=:
16276 ac_config_status_args=
16277 test "$silent" = yes &&
16278 ac_config_status_args="$ac_config_status_args --quiet"
16279 exec 5>/dev/null
16280 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16281 exec 5>>config.log
16282 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16283 # would make configure fail if this is the last instruction.
81ecdfbb 16284 $ac_cs_success || as_fn_exit $?
bec39cab 16285fi
c906108c 16286
bec39cab 16287#
81ecdfbb 16288# CONFIG_SUBDIRS section.
bec39cab 16289#
c906108c
SS
16290if test "$no_recursion" != yes; then
16291
81ecdfbb
RW
16292 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16293 # so they do not pile up.
c906108c
SS
16294 ac_sub_configure_args=
16295 ac_prev=
fdc59709
PB
16296 eval "set x $ac_configure_args"
16297 shift
16298 for ac_arg
16299 do
c906108c
SS
16300 if test -n "$ac_prev"; then
16301 ac_prev=
16302 continue
16303 fi
bec39cab 16304 case $ac_arg in
c906108c
SS
16305 -cache-file | --cache-file | --cache-fil | --cache-fi \
16306 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16307 ac_prev=cache_file ;;
16308 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16309 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16310 | --c=*)
16311 ;;
16312 --config-cache | -C)
c906108c
SS
16313 ;;
16314 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16315 ac_prev=srcdir ;;
16316 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16317 ;;
bec39cab
AC
16318 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16319 ac_prev=prefix ;;
16320 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16321 ;;
81ecdfbb
RW
16322 --disable-option-checking)
16323 ;;
fdc59709
PB
16324 *)
16325 case $ac_arg in
81ecdfbb 16326 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16327 esac
81ecdfbb 16328 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16329 esac
16330 done
16331
bec39cab
AC
16332 # Always prepend --prefix to ensure using the same prefix
16333 # in subdir configurations.
fdc59709
PB
16334 ac_arg="--prefix=$prefix"
16335 case $ac_arg in
81ecdfbb 16336 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16337 esac
81ecdfbb
RW
16338 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16339
16340 # Pass --silent
16341 if test "$silent" = yes; then
16342 ac_sub_configure_args="--silent $ac_sub_configure_args"
16343 fi
16344
16345 # Always prepend --disable-option-checking to silence warnings, since
16346 # different subdirs can have different --enable and --with options.
16347 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16348
b4e70030 16349 ac_popdir=`pwd`
bec39cab 16350 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16351
16352 # Do not complain, so a configure script can configure whichever
16353 # parts of a large source tree are present.
fdc59709 16354 test -d "$srcdir/$ac_dir" || continue
c906108c 16355
81ecdfbb
RW
16356 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16357 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16358 $as_echo "$ac_msg" >&6
16359 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16360 ac_builddir=.
16361
81ecdfbb
RW
16362case "$ac_dir" in
16363.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16364*)
16365 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16366 # A ".." for each directory in $ac_dir_suffix.
16367 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16368 case $ac_top_builddir_sub in
16369 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16370 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16371 esac ;;
16372esac
16373ac_abs_top_builddir=$ac_pwd
16374ac_abs_builddir=$ac_pwd$ac_dir_suffix
16375# for backward compatibility:
16376ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16377
16378case $srcdir in
81ecdfbb 16379 .) # We are building in place.
bec39cab 16380 ac_srcdir=.
81ecdfbb
RW
16381 ac_top_srcdir=$ac_top_builddir_sub
16382 ac_abs_top_srcdir=$ac_pwd ;;
16383 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16384 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16385 ac_top_srcdir=$srcdir
16386 ac_abs_top_srcdir=$srcdir ;;
16387 *) # Relative name.
16388 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16389 ac_top_srcdir=$ac_top_build_prefix$srcdir
16390 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16391esac
81ecdfbb 16392ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16393
c906108c 16394
fdc59709 16395 cd "$ac_dir"
c906108c
SS
16396
16397 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16398 if test -f "$ac_srcdir/configure.gnu"; then
16399 ac_sub_configure=$ac_srcdir/configure.gnu
16400 elif test -f "$ac_srcdir/configure"; then
16401 ac_sub_configure=$ac_srcdir/configure
16402 elif test -f "$ac_srcdir/configure.in"; then
16403 # This should be Cygnus configure.
16404 ac_sub_configure=$ac_aux_dir/configure
c906108c 16405 else
81ecdfbb
RW
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16407$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16408 ac_sub_configure=
16409 fi
16410
16411 # The recursion is here.
16412 if test -n "$ac_sub_configure"; then
c906108c 16413 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16414 case $cache_file in
16415 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16416 *) # Relative name.
16417 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16418 esac
c906108c 16419
81ecdfbb
RW
16420 { $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
16421$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16422 # The eval makes quoting arguments work.
fdc59709
PB
16423 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16424 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16425 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16426 fi
16427
fdc59709 16428 cd "$ac_popdir"
c906108c
SS
16429 done
16430fi
81ecdfbb
RW
16431if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16433$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16434fi
c906108c
SS
16435
16436
16437exit 0