]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
2012-04-20 Pedro Alves <palves@redhat.com>
[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
RW
593LIBOBJS
594GDB_NM_FILE
595frags
596target_subdir
597CONFIG_UNINSTALL
598CONFIG_INSTALL
599CONFIG_CLEAN
600CONFIG_ALL
601CONFIG_SRCS
602CONFIG_DEPS
603CONFIG_OBS
604PROFILE_CFLAGS
605ENABLE_CFLAGS
606SIM_OBS
607SIM
608XMKMF
609GDBTK_SRC_DIR
610GDBTK_CFLAGS
611GDBTKLIBS
612X_LIBS
613X_LDFLAGS
614X_CFLAGS
615TK_XINCLUDES
616TK_DEPS
617TK_LIBRARY
618TK_INCLUDE
619TK_STUB_LIB_SPEC
620TK_STUB_LIB_FLAG
621TK_STUB_LIB_FILE
622TK_LIB_SPEC
623TK_LIB_FLAG
624TK_LIB_FILE
625TK_SRC_DIR
626TK_BIN_DIR
627TK_VERSION
628TCL_DEPS
629TCL_LIBRARY
630TCL_INCLUDE
631TCL_STUB_LIB_SPEC
632TCL_STUB_LIB_FLAG
633TCL_STUB_LIB_FILE
634TCL_LIB_SPEC
635TCL_LIB_FLAG
636TCL_LIB_FILE
637TCL_SRC_DIR
638TCL_BIN_DIR
639TCL_PATCH_LEVEL
640TCL_VERSION
641WIN32LDAPP
642GUI_CFLAGS_X
643LIBGUI
644WIN32LIBS
645SER_HARDWIRE
646WERROR_CFLAGS
647WARN_CFLAGS
648SYSTEM_GDBINIT
81ecdfbb
RW
649TARGET_SYSTEM_ROOT
650CONFIG_LDFLAGS
f6528abd 651RDYNAMIC
81ecdfbb 652ALLOCA
ac534cba
JB
653PYTHON_LIBS
654PYTHON_CPPFLAGS
81ecdfbb 655PYTHON_CFLAGS
ec685c5e 656python_prog_path
81ecdfbb
RW
657LTLIBEXPAT
658LIBEXPAT
659HAVE_LIBEXPAT
b8e0a31c 660JIT_READER_DIR
f997c383 661TARGET_PTR
39037522 662READLINE_TEXI_INCFLAG
81ecdfbb
RW
663READLINE_CFLAGS
664READLINE_DEPS
665READLINE
666MIG
667WINDRES
668DLLTOOL
c971b7fa 669AR
81ecdfbb
RW
670YFLAGS
671YACC
c971b7fa 672RANLIB
81ecdfbb 673LN_S
c971b7fa
PA
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677AWK
81ecdfbb
RW
678REPORT_BUGS_TEXI
679REPORT_BUGS_TO
680PKGVERSION
681TARGET_OBS
682subdirs
683GDB_DATADIR
684DEBUGDIR
5048e516
JK
685MAKEINFO_EXTRA_FLAGS
686MAKEINFOFLAGS
687MAKEINFO
81ecdfbb
RW
688PACKAGE
689GNULIB_STDINT_H
81ecdfbb
RW
690CATOBJEXT
691GENCAT
692INSTOBJEXT
693DATADIRNAME
694CATALOGS
695POSUB
696GMSGFMT
697XGETTEXT
698INCINTL
699LIBINTL_DEP
700LIBINTL
701USE_NLS
702SET_MAKE
703GMAKE_FALSE
704GMAKE_TRUE
705MAKE
706CCDEPMODE
707DEPDIR
708am__leading_dot
709target_os
710target_vendor
711target_cpu
712target
713host_os
714host_vendor
715host_cpu
716host
717build_os
718build_vendor
719build_cpu
720build
c971b7fa
PA
721EGREP
722GREP
723CPP
81ecdfbb
RW
724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731MAINT
732MAINTAINER_MODE_FALSE
733MAINTAINER_MODE_TRUE
734target_alias
735host_alias
736build_alias
737LIBS
738ECHO_T
739ECHO_N
740ECHO_C
741DEFS
742mandir
743localedir
744libdir
745psdir
746pdfdir
747dvidir
748htmldir
749infodir
750docdir
751oldincludedir
752includedir
753localstatedir
754sharedstatedir
755sysconfdir
756datadir
757datarootdir
758libexecdir
759sbindir
760bindir
761program_transform_name
762prefix
763exec_prefix
764PACKAGE_URL
765PACKAGE_BUGREPORT
766PACKAGE_STRING
767PACKAGE_VERSION
768PACKAGE_TARNAME
769PACKAGE_NAME
770PATH_SEPARATOR
771SHELL'
a4ce5b0d 772ac_subst_files='host_makefile_frag'
81ecdfbb
RW
773ac_user_opts='
774enable_option_checking
775enable_maintainer_mode
da2f07f1
JK
776enable_plugins
777enable_largefile
81ecdfbb
RW
778with_separate_debug_dir
779with_gdb_datadir
780with_relocated_sources
bccbefd2 781with_auto_load_safe_path
81ecdfbb
RW
782enable_targets
783enable_64_bit_bfd
784enable_gdbcli
785enable_gdbmi
786enable_tui
787enable_gdbtk
05e7c244 788with_libunwind_ia64
81ecdfbb
RW
789with_curses
790enable_profiling
791with_pkgversion
792with_bugurl
b040ad30 793with_zlib
81ecdfbb 794with_libiconv_prefix
478aac75 795with_iconv_bin
81ecdfbb 796with_system_readline
b8e0a31c 797with_jit_reader_dir
81ecdfbb
RW
798with_expat
799with_gnu_ld
800enable_rpath
801with_libexpat_prefix
802with_python
803with_included_regex
804with_sysroot
805with_system_gdbinit
806enable_werror
807enable_build_warnings
808enable_gdb_build_warnings
809with_tcl
810with_tk
811with_x
812enable_sim
813enable_multi_ice
496c0e1b 814enable_gdbserver
81ecdfbb
RW
815'
816 ac_precious_vars='build_alias
817host_alias
818target_alias
819CC
820CFLAGS
821LDFLAGS
822LIBS
823CPPFLAGS
824CPP
f06e05e0
JK
825MAKEINFO
826MAKEINFOFLAGS
81ecdfbb
RW
827YACC
828YFLAGS
829XMKMF'
5ae98d25 830ac_subdirs_all='testsuite
81ecdfbb
RW
831gdbtk
832multi-ice
833gdbserver'
c906108c
SS
834
835# Initialize some variables set by options.
bec39cab
AC
836ac_init_help=
837ac_init_version=false
81ecdfbb
RW
838ac_unrecognized_opts=
839ac_unrecognized_sep=
c906108c
SS
840# The variables have the same names as the options, with
841# dashes changed to underlines.
bec39cab 842cache_file=/dev/null
c906108c 843exec_prefix=NONE
c906108c 844no_create=
c906108c
SS
845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
850silent=
851site=
852srcdir=
c906108c
SS
853verbose=
854x_includes=NONE
855x_libraries=NONE
bec39cab
AC
856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 862# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
c906108c
SS
868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
c906108c
SS
871includedir='${prefix}/include'
872oldincludedir='/usr/include'
81ecdfbb
RW
873docdir='${datarootdir}/doc/${PACKAGE}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
c906108c 882
c906108c 883ac_prev=
81ecdfbb 884ac_dashdash=
c906108c
SS
885for ac_option
886do
c906108c
SS
887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
81ecdfbb 889 eval $ac_prev=\$ac_option
c906108c
SS
890 ac_prev=
891 continue
892 fi
893
81ecdfbb
RW
894 case $ac_option in
895 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *) ac_optarg=yes ;;
897 esac
c906108c
SS
898
899 # Accept the important Cygnus configure options, so we can diagnose typos.
900
81ecdfbb
RW
901 case $ac_dashdash$ac_option in
902 --)
903 ac_dashdash=yes ;;
c906108c
SS
904
905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
906 ac_prev=bindir ;;
907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 908 bindir=$ac_optarg ;;
c906108c
SS
909
910 -build | --build | --buil | --bui | --bu)
bec39cab 911 ac_prev=build_alias ;;
c906108c 912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 913 build_alias=$ac_optarg ;;
c906108c
SS
914
915 -cache-file | --cache-file | --cache-fil | --cache-fi \
916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
917 ac_prev=cache_file ;;
918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
920 cache_file=$ac_optarg ;;
921
922 --config-cache | -C)
923 cache_file=config.cache ;;
c906108c 924
81ecdfbb 925 -datadir | --datadir | --datadi | --datad)
c906108c 926 ac_prev=datadir ;;
81ecdfbb 927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 928 datadir=$ac_optarg ;;
c906108c 929
81ecdfbb
RW
930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
931 | --dataroo | --dataro | --datar)
932 ac_prev=datarootdir ;;
933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
935 datarootdir=$ac_optarg ;;
936
c906108c 937 -disable-* | --disable-*)
81ecdfbb 938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 939 # Reject names that are not valid shell variable names.
81ecdfbb
RW
940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
941 as_fn_error "invalid feature name: $ac_useropt"
942 ac_useropt_orig=$ac_useropt
943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
944 case $ac_user_opts in
945 *"
946"enable_$ac_useropt"
947"*) ;;
948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
949 ac_unrecognized_sep=', ';;
950 esac
951 eval enable_$ac_useropt=no ;;
952
953 -docdir | --docdir | --docdi | --doc | --do)
954 ac_prev=docdir ;;
955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
956 docdir=$ac_optarg ;;
957
958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
959 ac_prev=dvidir ;;
960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
961 dvidir=$ac_optarg ;;
c906108c
SS
962
963 -enable-* | --enable-*)
81ecdfbb 964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 965 # Reject names that are not valid shell variable names.
81ecdfbb
RW
966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
967 as_fn_error "invalid feature name: $ac_useropt"
968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
b4e70030 976 esac
81ecdfbb 977 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
978
979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
981 | --exec | --exe | --ex)
982 ac_prev=exec_prefix ;;
983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
985 | --exec=* | --exe=* | --ex=*)
bec39cab 986 exec_prefix=$ac_optarg ;;
c906108c
SS
987
988 -gas | --gas | --ga | --g)
989 # Obsolete; use --with-gas.
990 with_gas=yes ;;
991
bec39cab
AC
992 -help | --help | --hel | --he | -h)
993 ac_init_help=long ;;
994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
995 ac_init_help=recursive ;;
996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
997 ac_init_help=short ;;
c906108c
SS
998
999 -host | --host | --hos | --ho)
bec39cab 1000 ac_prev=host_alias ;;
c906108c 1001 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1002 host_alias=$ac_optarg ;;
c906108c 1003
81ecdfbb
RW
1004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1005 ac_prev=htmldir ;;
1006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1007 | --ht=*)
1008 htmldir=$ac_optarg ;;
1009
c906108c
SS
1010 -includedir | --includedir | --includedi | --included | --include \
1011 | --includ | --inclu | --incl | --inc)
1012 ac_prev=includedir ;;
1013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1014 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1015 includedir=$ac_optarg ;;
c906108c
SS
1016
1017 -infodir | --infodir | --infodi | --infod | --info | --inf)
1018 ac_prev=infodir ;;
1019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1020 infodir=$ac_optarg ;;
c906108c
SS
1021
1022 -libdir | --libdir | --libdi | --libd)
1023 ac_prev=libdir ;;
1024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1025 libdir=$ac_optarg ;;
c906108c
SS
1026
1027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1028 | --libexe | --libex | --libe)
1029 ac_prev=libexecdir ;;
1030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1031 | --libexe=* | --libex=* | --libe=*)
bec39cab 1032 libexecdir=$ac_optarg ;;
c906108c 1033
81ecdfbb
RW
1034 -localedir | --localedir | --localedi | --localed | --locale)
1035 ac_prev=localedir ;;
1036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1037 localedir=$ac_optarg ;;
1038
c906108c 1039 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1040 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1041 ac_prev=localstatedir ;;
1042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1044 localstatedir=$ac_optarg ;;
c906108c
SS
1045
1046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1047 ac_prev=mandir ;;
1048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1049 mandir=$ac_optarg ;;
c906108c
SS
1050
1051 -nfp | --nfp | --nf)
1052 # Obsolete; use --without-fp.
1053 with_fp=no ;;
1054
1055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1056 | --no-cr | --no-c | -n)
c906108c
SS
1057 no_create=yes ;;
1058
1059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1061 no_recursion=yes ;;
1062
1063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1065 | --oldin | --oldi | --old | --ol | --o)
1066 ac_prev=oldincludedir ;;
1067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1070 oldincludedir=$ac_optarg ;;
c906108c
SS
1071
1072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1073 ac_prev=prefix ;;
1074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1075 prefix=$ac_optarg ;;
c906108c
SS
1076
1077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1078 | --program-pre | --program-pr | --program-p)
1079 ac_prev=program_prefix ;;
1080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1082 program_prefix=$ac_optarg ;;
c906108c
SS
1083
1084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1085 | --program-suf | --program-su | --program-s)
1086 ac_prev=program_suffix ;;
1087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1089 program_suffix=$ac_optarg ;;
c906108c
SS
1090
1091 -program-transform-name | --program-transform-name \
1092 | --program-transform-nam | --program-transform-na \
1093 | --program-transform-n | --program-transform- \
1094 | --program-transform | --program-transfor \
1095 | --program-transfo | --program-transf \
1096 | --program-trans | --program-tran \
1097 | --progr-tra | --program-tr | --program-t)
1098 ac_prev=program_transform_name ;;
1099 -program-transform-name=* | --program-transform-name=* \
1100 | --program-transform-nam=* | --program-transform-na=* \
1101 | --program-transform-n=* | --program-transform-=* \
1102 | --program-transform=* | --program-transfor=* \
1103 | --program-transfo=* | --program-transf=* \
1104 | --program-trans=* | --program-tran=* \
1105 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1106 program_transform_name=$ac_optarg ;;
c906108c 1107
81ecdfbb
RW
1108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1109 ac_prev=pdfdir ;;
1110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1111 pdfdir=$ac_optarg ;;
1112
1113 -psdir | --psdir | --psdi | --psd | --ps)
1114 ac_prev=psdir ;;
1115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1116 psdir=$ac_optarg ;;
1117
c906108c
SS
1118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 silent=yes ;;
1121
1122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1123 ac_prev=sbindir ;;
1124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1125 | --sbi=* | --sb=*)
bec39cab 1126 sbindir=$ac_optarg ;;
c906108c
SS
1127
1128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1130 | --sharedst | --shareds | --shared | --share | --shar \
1131 | --sha | --sh)
1132 ac_prev=sharedstatedir ;;
1133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1136 | --sha=* | --sh=*)
bec39cab 1137 sharedstatedir=$ac_optarg ;;
c906108c
SS
1138
1139 -site | --site | --sit)
1140 ac_prev=site ;;
1141 -site=* | --site=* | --sit=*)
bec39cab 1142 site=$ac_optarg ;;
3ace7edb 1143
c906108c
SS
1144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1145 ac_prev=srcdir ;;
1146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1147 srcdir=$ac_optarg ;;
c906108c
SS
1148
1149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1150 | --syscon | --sysco | --sysc | --sys | --sy)
1151 ac_prev=sysconfdir ;;
1152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1154 sysconfdir=$ac_optarg ;;
c906108c
SS
1155
1156 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1157 ac_prev=target_alias ;;
c906108c 1158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1159 target_alias=$ac_optarg ;;
c906108c
SS
1160
1161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1162 verbose=yes ;;
1163
bec39cab
AC
1164 -version | --version | --versio | --versi | --vers | -V)
1165 ac_init_version=: ;;
c906108c
SS
1166
1167 -with-* | --with-*)
81ecdfbb 1168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1169 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1171 as_fn_error "invalid package name: $ac_useropt"
1172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
b4e70030 1180 esac
81ecdfbb 1181 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1182
1183 -without-* | --without-*)
81ecdfbb 1184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1185 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1187 as_fn_error "invalid package name: $ac_useropt"
1188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=no ;;
c906108c
SS
1198
1199 --x)
1200 # Obsolete; use --with-x.
1201 with_x=yes ;;
1202
1203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1204 | --x-incl | --x-inc | --x-in | --x-i)
1205 ac_prev=x_includes ;;
1206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1208 x_includes=$ac_optarg ;;
c906108c
SS
1209
1210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1212 ac_prev=x_libraries ;;
1213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1215 x_libraries=$ac_optarg ;;
c906108c 1216
81ecdfbb
RW
1217 -*) as_fn_error "unrecognized option: \`$ac_option'
1218Try \`$0 --help' for more information."
c906108c
SS
1219 ;;
1220
bec39cab
AC
1221 *=*)
1222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1223 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1224 case $ac_envvar in #(
1225 '' | [0-9]* | *[!_$as_cr_alnum]* )
1226 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1227 esac
1228 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1229 export $ac_envvar ;;
1230
c906108c 1231 *)
bec39cab 1232 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1236 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1237 ;;
1238
1239 esac
1240done
1241
1242if test -n "$ac_prev"; then
bec39cab 1243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1244 as_fn_error "missing argument to $ac_option"
c906108c 1245fi
c906108c 1246
81ecdfbb
RW
1247if test -n "$ac_unrecognized_opts"; then
1248 case $enable_option_checking in
1249 no) ;;
1250 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1252 esac
81ecdfbb 1253fi
b4e70030 1254
81ecdfbb
RW
1255# Check all directory arguments for consistency.
1256for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1257 datadir sysconfdir sharedstatedir localstatedir includedir \
1258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1259 libdir localedir mandir
b4e70030 1260do
81ecdfbb
RW
1261 eval ac_val=\$$ac_var
1262 # Remove trailing slashes.
1263 case $ac_val in
1264 */ )
1265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1266 eval $ac_var=\$ac_val;;
1267 esac
1268 # Be sure to have absolute directory names.
b4e70030 1269 case $ac_val in
81ecdfbb
RW
1270 [\\/$]* | ?:[\\/]* ) continue;;
1271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1272 esac
81ecdfbb 1273 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1274done
1275
bec39cab
AC
1276# There might be people who depend on the old broken behavior: `$host'
1277# used to hold the argument of --host etc.
1278# FIXME: To remove some day.
1279build=$build_alias
1280host=$host_alias
1281target=$target_alias
1282
1283# FIXME: To remove some day.
1284if test "x$host_alias" != x; then
1285 if test "x$build_alias" = x; then
1286 cross_compiling=maybe
81ecdfbb 1287 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1288 If a cross compiler is detected then cross compile mode will be used." >&2
1289 elif test "x$build_alias" != "x$host_alias"; then
1290 cross_compiling=yes
1291 fi
1292fi
c906108c 1293
bec39cab
AC
1294ac_tool_prefix=
1295test -n "$host_alias" && ac_tool_prefix=$host_alias-
1296
1297test "$silent" = yes && exec 6>/dev/null
c906108c 1298
c906108c 1299
81ecdfbb
RW
1300ac_pwd=`pwd` && test -n "$ac_pwd" &&
1301ac_ls_di=`ls -di .` &&
1302ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1303 as_fn_error "working directory cannot be determined"
1304test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1305 as_fn_error "pwd does not report name of working directory"
1306
1307
c906108c
SS
1308# Find the source files, if location was not specified.
1309if test -z "$srcdir"; then
1310 ac_srcdir_defaulted=yes
81ecdfbb
RW
1311 # Try the directory containing this script, then the parent directory.
1312 ac_confdir=`$as_dirname -- "$as_myself" ||
1313$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1314 X"$as_myself" : 'X\(//\)[^/]' \| \
1315 X"$as_myself" : 'X\(//\)$' \| \
1316 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1317$as_echo X"$as_myself" |
1318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1319 s//\1/
1320 q
1321 }
1322 /^X\(\/\/\)[^/].*/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\).*/{
1331 s//\1/
1332 q
1333 }
1334 s/.*/./; q'`
c906108c 1335 srcdir=$ac_confdir
81ecdfbb 1336 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1337 srcdir=..
1338 fi
1339else
1340 ac_srcdir_defaulted=no
1341fi
81ecdfbb
RW
1342if test ! -r "$srcdir/$ac_unique_file"; then
1343 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1344 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1345fi
1346ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1347ac_abs_confdir=`(
1348 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1349 pwd)`
1350# When building in place, set srcdir=.
1351if test "$ac_abs_confdir" = "$ac_pwd"; then
1352 srcdir=.
1353fi
1354# Remove unnecessary trailing slashes from srcdir.
1355# Double slashes in file names in object file debugging info
1356# mess up M-x gdb in Emacs.
1357case $srcdir in
1358*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1359esac
1360for ac_var in $ac_precious_vars; do
1361 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_env_${ac_var}_value=\$${ac_var}
1363 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1365done
c906108c 1366
bec39cab
AC
1367#
1368# Report the --help message.
1369#
1370if test "$ac_init_help" = "long"; then
1371 # Omit some internal or obsolete options to make the list less imposing.
1372 # This message is too long to be a string in the A/UX 3.1 sh.
1373 cat <<_ACEOF
1374\`configure' configures this package to adapt to many kinds of systems.
1375
1376Usage: $0 [OPTION]... [VAR=VALUE]...
1377
1378To assign environment variables (e.g., CC, CFLAGS...), specify them as
1379VAR=VALUE. See below for descriptions of some of the useful variables.
1380
1381Defaults for the options are specified in brackets.
1382
1383Configuration:
1384 -h, --help display this help and exit
1385 --help=short display options specific to this package
1386 --help=recursive display the short help of all the included packages
1387 -V, --version display version information and exit
1388 -q, --quiet, --silent do not print \`checking...' messages
1389 --cache-file=FILE cache test results in FILE [disabled]
1390 -C, --config-cache alias for \`--cache-file=config.cache'
1391 -n, --no-create do not create output files
1392 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1393
bec39cab
AC
1394Installation directories:
1395 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1396 [$ac_default_prefix]
bec39cab 1397 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1398 [PREFIX]
bec39cab
AC
1399
1400By default, \`make install' will install all the files in
1401\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1402an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1403for instance \`--prefix=\$HOME'.
1404
1405For better control, use the options below.
1406
1407Fine tuning of the installation directories:
81ecdfbb
RW
1408 --bindir=DIR user executables [EPREFIX/bin]
1409 --sbindir=DIR system admin executables [EPREFIX/sbin]
1410 --libexecdir=DIR program executables [EPREFIX/libexec]
1411 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1412 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1413 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1414 --libdir=DIR object code libraries [EPREFIX/lib]
1415 --includedir=DIR C header files [PREFIX/include]
1416 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1417 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1418 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1419 --infodir=DIR info documentation [DATAROOTDIR/info]
1420 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1421 --mandir=DIR man documentation [DATAROOTDIR/man]
1422 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1423 --htmldir=DIR html documentation [DOCDIR]
1424 --dvidir=DIR dvi documentation [DOCDIR]
1425 --pdfdir=DIR pdf documentation [DOCDIR]
1426 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1427_ACEOF
1428
1429 cat <<\_ACEOF
1430
bec39cab
AC
1431X features:
1432 --x-includes=DIR X include files are in DIR
1433 --x-libraries=DIR X library files are in DIR
1434
1435System types:
1436 --build=BUILD configure for building on BUILD [guessed]
1437 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1438 --target=TARGET configure for building compilers for TARGET [HOST]
1439_ACEOF
1440fi
1441
1442if test -n "$ac_init_help"; then
1443
1444 cat <<\_ACEOF
1445
1446Optional Features:
81ecdfbb 1447 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1448 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1449 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1450 --enable-maintainer-mode enable make rules and dependencies not useful
1451 (and sometimes confusing) to the casual installer
da2f07f1
JK
1452 --enable-plugins Enable support for plugins (defaults no)
1453 --disable-largefile omit support for large files
a1220294
TT
1454 --enable-targets=TARGETS
1455 alternative target configurations
c0993dbe 1456 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1457 --disable-gdbcli disable command-line interface (CLI)
1458 --disable-gdbmi disable machine-interface (MI)
1459 --enable-tui enable full-screen terminal user interface (TUI)
1460 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1461 --enable-profiling enable profiling of GDB
3841debe 1462 --disable-rpath do not hardcode runtime library paths
a1220294 1463 --enable-werror treat compile warnings as errors
32c1c914 1464 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1465 --enable-gdb-build-warnings
32c1c914 1466 enable GDB specific build-time compiler warnings if
a1220294 1467 gcc is used
32c1c914 1468 --enable-sim link gdb with simulator
bec39cab 1469 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1470 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1471 is auto)
bec39cab
AC
1472
1473Optional Packages:
1474 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1475 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1476 --with-separate-debug-dir=PATH
32c1c914 1477 look for global separate debug info in this path
62e4f60c 1478 [LIBDIR/debug]
b14b1491
TT
1479 --with-gdb-datadir=PATH look for global separate data files in this path
1480 [DATADIR/gdb]
29b0e8a2 1481 --with-relocated-sources=PATH
32c1c914 1482 automatically relocate this path for source files
bccbefd2
JK
1483 --with-auto-load-safe-path=PATH
1484 directories safe to hold auto-loaded files
1485 --without-auto-load-safe-path
1486 do not restrict auto-loaded files locations
05e7c244 1487 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1488 --with-curses use the curses library instead of the termcap
1489 library
c16158bc
JM
1490 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1491 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1492 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1493 --with-libiconv-prefix=DIR
1494 search for libiconv in DIR/include and DIR/lib
478aac75 1495 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1496 --with-system-readline use installed readline library
b8e0a31c
SD
1497 --with-jit-reader-dir=PATH
1498 directory to load the JIT readers from
5c39566f 1499 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1500 --with-gnu-ld assume the C compiler uses GNU ld default=no
1501 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1502 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1503 --with-python[=PYTHON] include python support
1504 (auto/yes/no/<python-program>)
a1220294
TT
1505 --without-included-regex
1506 don't use included regex; this is the default on
1507 systems with version 2 of the GNU C library (use
1508 with caution on other system)
81ecdfbb 1509 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1510 --with-system-gdbinit=PATH
32c1c914 1511 automatically load a system-wide gdbinit file
5062cc19
KS
1512 --with-tcl directory containing tcl configuration (tclConfig.sh)
1513 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1514 --with-x use the X Window System
bec39cab
AC
1515
1516Some influential environment variables:
1517 CC C compiler command
1518 CFLAGS C compiler flags
1519 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1520 nonstandard directory <lib dir>
81ecdfbb
RW
1521 LIBS libraries to pass to the linker, e.g. -l<library>
1522 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1523 you have headers in a nonstandard directory <include dir>
bec39cab 1524 CPP C preprocessor
f06e05e0
JK
1525 MAKEINFO Parent configure detects if it is of sufficient version.
1526 MAKEINFOFLAGS
1527 Parameters for MAKEINFO.
81ecdfbb
RW
1528 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1529 the first program found out of: `bison -y', `byacc', `yacc'.
1530 YFLAGS The list of arguments that will be passed by default to $YACC.
1531 This script will default YFLAGS to the empty string to avoid a
1532 default value of `-d' given by some make applications.
1533 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1534
1535Use these variables to override the choices made by `configure' or to help
1536it to find libraries and programs with nonstandard names/locations.
1537
81ecdfbb 1538Report bugs to the package provider.
bec39cab 1539_ACEOF
81ecdfbb 1540ac_status=$?
bec39cab
AC
1541fi
1542
1543if test "$ac_init_help" = "recursive"; then
1544 # If there are subdirs, report their specific --help.
bec39cab 1545 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1546 test -d "$ac_dir" ||
1547 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1548 continue
bec39cab
AC
1549 ac_builddir=.
1550
81ecdfbb
RW
1551case "$ac_dir" in
1552.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1553*)
1554 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1555 # A ".." for each directory in $ac_dir_suffix.
1556 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1557 case $ac_top_builddir_sub in
1558 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1559 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1560 esac ;;
1561esac
1562ac_abs_top_builddir=$ac_pwd
1563ac_abs_builddir=$ac_pwd$ac_dir_suffix
1564# for backward compatibility:
1565ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1566
1567case $srcdir in
81ecdfbb 1568 .) # We are building in place.
bec39cab 1569 ac_srcdir=.
81ecdfbb
RW
1570 ac_top_srcdir=$ac_top_builddir_sub
1571 ac_abs_top_srcdir=$ac_pwd ;;
1572 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1573 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1574 ac_top_srcdir=$srcdir
1575 ac_abs_top_srcdir=$srcdir ;;
1576 *) # Relative name.
1577 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1578 ac_top_srcdir=$ac_top_build_prefix$srcdir
1579 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1580esac
81ecdfbb 1581ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1582
81ecdfbb
RW
1583 cd "$ac_dir" || { ac_status=$?; continue; }
1584 # Check for guested configure.
1585 if test -f "$ac_srcdir/configure.gnu"; then
1586 echo &&
1587 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1588 elif test -f "$ac_srcdir/configure"; then
1589 echo &&
1590 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1591 else
81ecdfbb
RW
1592 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1593 fi || ac_status=$?
1594 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1595 done
1596fi
1597
81ecdfbb 1598test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1599if $ac_init_version; then
1600 cat <<\_ACEOF
81ecdfbb
RW
1601configure
1602generated by GNU Autoconf 2.64
bec39cab 1603
81ecdfbb 1604Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1605This configure script is free software; the Free Software Foundation
1606gives unlimited permission to copy, distribute and modify it.
1607_ACEOF
81ecdfbb 1608 exit
bec39cab 1609fi
bec39cab 1610
81ecdfbb
RW
1611## ------------------------ ##
1612## Autoconf initialization. ##
1613## ------------------------ ##
bec39cab 1614
81ecdfbb
RW
1615# ac_fn_c_try_compile LINENO
1616# --------------------------
1617# Try to compile conftest.$ac_ext, and return whether this succeeded.
1618ac_fn_c_try_compile ()
1619{
1620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1621 rm -f conftest.$ac_objext
1622 if { { ac_try="$ac_compile"
1623case "(($ac_try" in
1624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1625 *) ac_try_echo=$ac_try;;
1626esac
1627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1628$as_echo "$ac_try_echo"; } >&5
1629 (eval "$ac_compile") 2>conftest.err
1630 ac_status=$?
1631 if test -s conftest.err; then
1632 grep -v '^ *+' conftest.err >conftest.er1
1633 cat conftest.er1 >&5
1634 mv -f conftest.er1 conftest.err
1635 fi
1636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1637 test $ac_status = 0; } && {
1638 test -z "$ac_c_werror_flag" ||
1639 test ! -s conftest.err
1640 } && test -s conftest.$ac_objext; then :
1641 ac_retval=0
1642else
1643 $as_echo "$as_me: failed program was:" >&5
1644sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1645
81ecdfbb
RW
1646 ac_retval=1
1647fi
1648 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1649 return $ac_retval
1650
1651} # ac_fn_c_try_compile
1652
1653# ac_fn_c_try_cpp LINENO
1654# ----------------------
1655# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1656ac_fn_c_try_cpp ()
bec39cab 1657{
81ecdfbb
RW
1658 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1659 if { { ac_try="$ac_cpp conftest.$ac_ext"
1660case "(($ac_try" in
1661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662 *) ac_try_echo=$ac_try;;
1663esac
1664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665$as_echo "$ac_try_echo"; } >&5
1666 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1667 ac_status=$?
1668 if test -s conftest.err; then
1669 grep -v '^ *+' conftest.err >conftest.er1
1670 cat conftest.er1 >&5
1671 mv -f conftest.er1 conftest.err
1672 fi
1673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674 test $ac_status = 0; } >/dev/null && {
1675 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1676 test ! -s conftest.err
1677 }; then :
1678 ac_retval=0
1679else
1680 $as_echo "$as_me: failed program was:" >&5
1681sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1682
81ecdfbb
RW
1683 ac_retval=1
1684fi
1685 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1686 return $ac_retval
bec39cab 1687
81ecdfbb 1688} # ac_fn_c_try_cpp
bec39cab 1689
81ecdfbb
RW
1690# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1691# -------------------------------------------------------
1692# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1693# the include files in INCLUDES and setting the cache variable VAR
1694# accordingly.
1695ac_fn_c_check_header_mongrel ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1700$as_echo_n "checking for $2... " >&6; }
1701if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1702 $as_echo_n "(cached) " >&6
1703fi
1704eval ac_res=\$$3
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1706$as_echo "$ac_res" >&6; }
1707else
1708 # Is the header compilable?
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1710$as_echo_n "checking $2 usability... " >&6; }
1711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1712/* end confdefs.h. */
1713$4
1714#include <$2>
1715_ACEOF
1716if ac_fn_c_try_compile "$LINENO"; then :
1717 ac_header_compiler=yes
1718else
1719 ac_header_compiler=no
1720fi
1721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1723$as_echo "$ac_header_compiler" >&6; }
bec39cab 1724
81ecdfbb
RW
1725# Is the header present?
1726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1727$as_echo_n "checking $2 presence... " >&6; }
1728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1729/* end confdefs.h. */
1730#include <$2>
1731_ACEOF
1732if ac_fn_c_try_cpp "$LINENO"; then :
1733 ac_header_preproc=yes
1734else
1735 ac_header_preproc=no
1736fi
1737rm -f conftest.err conftest.$ac_ext
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1739$as_echo "$ac_header_preproc" >&6; }
bec39cab 1740
81ecdfbb
RW
1741# So? What about this header?
1742case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1743 yes:no: )
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1745$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1747$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1748 ;;
1749 no:yes:* )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1751$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1753$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1755$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1757$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1759$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1760 ;;
1761esac
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1763$as_echo_n "checking for $2... " >&6; }
1764if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1765 $as_echo_n "(cached) " >&6
1766else
1767 eval "$3=\$ac_header_compiler"
1768fi
1769eval ac_res=\$$3
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1771$as_echo "$ac_res" >&6; }
1772fi
1773 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1774
81ecdfbb 1775} # ac_fn_c_check_header_mongrel
bec39cab 1776
81ecdfbb
RW
1777# ac_fn_c_try_run LINENO
1778# ----------------------
1779# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1780# that executables *can* be run.
1781ac_fn_c_try_run ()
1782{
1783 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1784 if { { ac_try="$ac_link"
1785case "(($ac_try" in
1786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787 *) ac_try_echo=$ac_try;;
1788esac
1789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790$as_echo "$ac_try_echo"; } >&5
1791 (eval "$ac_link") 2>&5
1792 ac_status=$?
1793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1795 { { case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_try") 2>&5
1802 ac_status=$?
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; }; }; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: program exited with status $ac_status" >&5
1808 $as_echo "$as_me: failed program was:" >&5
1809sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1810
81ecdfbb
RW
1811 ac_retval=$ac_status
1812fi
1813 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1814 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1815 return $ac_retval
bec39cab 1816
81ecdfbb 1817} # ac_fn_c_try_run
bec39cab 1818
81ecdfbb
RW
1819# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1820# -------------------------------------------------------
1821# Tests whether HEADER exists and can be compiled using the include files in
1822# INCLUDES, setting the cache variable VAR accordingly.
1823ac_fn_c_check_header_compile ()
1824{
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
1828if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1829 $as_echo_n "(cached) " >&6
1830else
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834#include <$2>
bec39cab 1835_ACEOF
81ecdfbb
RW
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 eval "$3=yes"
1838else
1839 eval "$3=no"
1840fi
1841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842fi
1843eval ac_res=\$$3
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1845$as_echo "$ac_res" >&6; }
1846 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1847
81ecdfbb 1848} # ac_fn_c_check_header_compile
bec39cab 1849
81ecdfbb
RW
1850# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1851# --------------------------------------------
1852# Tries to find the compile-time value of EXPR in a program that includes
1853# INCLUDES, setting VAR accordingly. Returns whether the value could be
1854# computed
1855ac_fn_c_compute_int ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 if test "$cross_compiling" = yes; then
1859 # Depending upon the size, compute the lo and hi bounds.
1860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862$4
1863int
1864main ()
1865{
1866static int test_array [1 - 2 * !(($2) >= 0)];
1867test_array [0] = 0
bec39cab 1868
81ecdfbb
RW
1869 ;
1870 return 0;
1871}
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874 ac_lo=0 ac_mid=0
1875 while :; do
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879int
1880main ()
1881{
1882static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1883test_array [0] = 0
bec39cab 1884
81ecdfbb
RW
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 ac_hi=$ac_mid; break
1891else
1892 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1893 if test $ac_lo -le $ac_mid; then
1894 ac_lo= ac_hi=
1895 break
1896 fi
1897 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1898fi
81ecdfbb
RW
1899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1900 done
c906108c 1901else
81ecdfbb
RW
1902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1903/* end confdefs.h. */
1904$4
1905int
1906main ()
1907{
1908static int test_array [1 - 2 * !(($2) < 0)];
1909test_array [0] = 0
bec39cab 1910
81ecdfbb
RW
1911 ;
1912 return 0;
1913}
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916 ac_hi=-1 ac_mid=-1
1917 while :; do
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920$4
1921int
1922main ()
1923{
1924static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1925test_array [0] = 0
bec39cab 1926
81ecdfbb
RW
1927 ;
1928 return 0;
1929}
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 ac_lo=$ac_mid; break
1933else
1934 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1935 if test $ac_mid -le $ac_hi; then
1936 ac_lo= ac_hi=
1937 break
1938 fi
1939 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1940fi
1941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1942 done
1943else
1944 ac_lo= ac_hi=
1945fi
1946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949# Binary search between lo and hi bounds.
1950while test "x$ac_lo" != "x$ac_hi"; do
1951 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1959test_array [0] = 0
bec39cab 1960
81ecdfbb
RW
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 ac_hi=$ac_mid
1967else
1968 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971done
1972case $ac_lo in #((
1973?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1974'') ac_retval=1 ;;
1975esac
1976 else
1977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1978/* end confdefs.h. */
1979$4
1980static long int longval () { return $2; }
1981static unsigned long int ulongval () { return $2; }
1982#include <stdio.h>
1983#include <stdlib.h>
1984int
1985main ()
1986{
bec39cab 1987
81ecdfbb
RW
1988 FILE *f = fopen ("conftest.val", "w");
1989 if (! f)
1990 return 1;
1991 if (($2) < 0)
1992 {
1993 long int i = longval ();
1994 if (i != ($2))
1995 return 1;
1996 fprintf (f, "%ld", i);
1997 }
1998 else
1999 {
2000 unsigned long int i = ulongval ();
2001 if (i != ($2))
2002 return 1;
2003 fprintf (f, "%lu", i);
2004 }
2005 /* Do not output a trailing newline, as this causes \r\n confusion
2006 on some platforms. */
2007 return ferror (f) || fclose (f) != 0;
bec39cab 2008
81ecdfbb
RW
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_run "$LINENO"; then :
2014 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2015else
2016 ac_retval=1
2017fi
2018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2019 conftest.$ac_objext conftest.beam conftest.$ac_ext
2020rm -f conftest.val
bec39cab 2021
81ecdfbb
RW
2022 fi
2023 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2024 return $ac_retval
bec39cab 2025
81ecdfbb 2026} # ac_fn_c_compute_int
bec39cab 2027
c971b7fa
PA
2028# ac_fn_c_try_link LINENO
2029# -----------------------
2030# Try to link conftest.$ac_ext, and return whether this succeeded.
2031ac_fn_c_try_link ()
2032{
2033 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2034 rm -f conftest.$ac_objext conftest$ac_exeext
2035 if { { ac_try="$ac_link"
2036case "(($ac_try" in
2037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2038 *) ac_try_echo=$ac_try;;
2039esac
2040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2041$as_echo "$ac_try_echo"; } >&5
2042 (eval "$ac_link") 2>conftest.err
2043 ac_status=$?
2044 if test -s conftest.err; then
2045 grep -v '^ *+' conftest.err >conftest.er1
2046 cat conftest.er1 >&5
2047 mv -f conftest.er1 conftest.err
2048 fi
2049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2050 test $ac_status = 0; } && {
2051 test -z "$ac_c_werror_flag" ||
2052 test ! -s conftest.err
2053 } && test -s conftest$ac_exeext && {
2054 test "$cross_compiling" = yes ||
2055 $as_test_x conftest$ac_exeext
2056 }; then :
2057 ac_retval=0
2058else
2059 $as_echo "$as_me: failed program was:" >&5
2060sed 's/^/| /' conftest.$ac_ext >&5
2061
2062 ac_retval=1
2063fi
2064 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2065 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2066 # interfere with the next link command; also delete a directory that is
2067 # left behind by Apple's compiler. We do this before executing the actions.
2068 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2069 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2070 return $ac_retval
2071
2072} # ac_fn_c_try_link
2073
55a8c076
YQ
2074# ac_fn_c_check_func LINENO FUNC VAR
2075# ----------------------------------
2076# Tests whether FUNC exists, setting the cache variable VAR accordingly
2077ac_fn_c_check_func ()
81ecdfbb
RW
2078{
2079 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2081$as_echo_n "checking for $2... " >&6; }
2082if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2083 $as_echo_n "(cached) " >&6
2084else
81ecdfbb
RW
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
55a8c076
YQ
2087/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2088 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2089#define $2 innocuous_$2
2090
2091/* System header to define __stub macros and hopefully few prototypes,
2092 which can conflict with char $2 (); below.
2093 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2094 <limits.h> exists even on freestanding compilers. */
2095
2096#ifdef __STDC__
2097# include <limits.h>
2098#else
2099# include <assert.h>
2100#endif
2101
2102#undef $2
2103
2104/* Override any GCC internal prototype to avoid an error.
2105 Use char because int might match the return type of a GCC
2106 builtin and then its argument prototype would still apply. */
2107#ifdef __cplusplus
2108extern "C"
2109#endif
2110char $2 ();
2111/* The GNU C library defines this for functions which it implements
2112 to always fail with ENOSYS. Some functions are actually named
2113 something starting with __ and the normal name is an alias. */
2114#if defined __stub_$2 || defined __stub___$2
2115choke me
2116#endif
2117
2118int
2119main ()
2120{
2121return $2 ();
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_link "$LINENO"; then :
2127 eval "$3=yes"
2128else
2129 eval "$3=no"
2130fi
2131rm -f core conftest.err conftest.$ac_objext \
2132 conftest$ac_exeext conftest.$ac_ext
2133fi
2134eval ac_res=\$$3
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2136$as_echo "$ac_res" >&6; }
2137 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2138
2139} # ac_fn_c_check_func
2140
770d76d7
PA
2141# ac_fn_c_check_decl LINENO SYMBOL VAR
2142# ------------------------------------
2143# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2144ac_fn_c_check_decl ()
2145{
2146 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2147 as_decl_name=`echo $2|sed 's/ *(.*//'`
2148 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2150$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2151if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2152 $as_echo_n "(cached) " >&6
2153else
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160#ifndef $as_decl_name
2161#ifdef __cplusplus
2162 (void) $as_decl_use;
2163#else
2164 (void) $as_decl_name;
2165#endif
2166#endif
2167
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 eval "$3=yes"
2174else
2175 eval "$3=no"
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178fi
2179eval ac_res=\$$3
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181$as_echo "$ac_res" >&6; }
2182 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2183
2184} # ac_fn_c_check_decl
2185
55a8c076
YQ
2186# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2187# ----------------------------------------------------
2188# Tries to find if the field MEMBER exists in type AGGR, after including
2189# INCLUDES, setting cache variable VAR accordingly.
2190ac_fn_c_check_member ()
2191{
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2194$as_echo_n "checking for $2.$3... " >&6; }
2195if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2196 $as_echo_n "(cached) " >&6
2197else
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$5
2201int
2202main ()
2203{
2204static $2 ac_aggr;
2205if (ac_aggr.$3)
2206return 0;
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 eval "$4=yes"
2213else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$5
2217int
2218main ()
2219{
2220static $2 ac_aggr;
2221if (sizeof ac_aggr.$3)
2222return 0;
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228 eval "$4=yes"
2229else
2230 eval "$4=no"
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235fi
2236eval ac_res=\$$4
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238$as_echo "$ac_res" >&6; }
2239 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2240
2241} # ac_fn_c_check_member
2242
2243# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2244# -------------------------------------------
2245# Tests whether TYPE exists after having included INCLUDES, setting cache
2246# variable VAR accordingly.
2247ac_fn_c_check_type ()
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2251$as_echo_n "checking for $2... " >&6; }
2252if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2253 $as_echo_n "(cached) " >&6
2254else
2255 eval "$3=no"
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258$4
2259int
2260main ()
2261{
2262if (sizeof ($2))
2263 return 0;
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2270/* end confdefs.h. */
2271$4
2272int
2273main ()
2274{
2275if (sizeof (($2)))
2276 return 0;
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2282
81ecdfbb
RW
2283else
2284 eval "$3=yes"
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
2293 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2294
81ecdfbb
RW
2295} # ac_fn_c_check_type
2296cat >config.log <<_ACEOF
2297This file contains any messages produced by compilers while
2298running configure, to aid debugging if configure makes a mistake.
d5af19ba 2299
81ecdfbb
RW
2300It was created by $as_me, which was
2301generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2302
81ecdfbb 2303 $ $0 $@
413ccac7 2304
81ecdfbb
RW
2305_ACEOF
2306exec 5>>config.log
2307{
2308cat <<_ASUNAME
2309## --------- ##
2310## Platform. ##
2311## --------- ##
413ccac7 2312
81ecdfbb
RW
2313hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2314uname -m = `(uname -m) 2>/dev/null || echo unknown`
2315uname -r = `(uname -r) 2>/dev/null || echo unknown`
2316uname -s = `(uname -s) 2>/dev/null || echo unknown`
2317uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2318
81ecdfbb
RW
2319/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2320/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2321
81ecdfbb
RW
2322/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2323/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2324/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2325/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2326/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2327/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2328/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2329
81ecdfbb 2330_ASUNAME
bec39cab 2331
bec39cab
AC
2332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2337 $as_echo "PATH: $as_dir"
2338 done
2339IFS=$as_save_IFS
bec39cab 2340
81ecdfbb 2341} >&5
bec39cab 2342
81ecdfbb 2343cat >&5 <<_ACEOF
bec39cab 2344
bec39cab 2345
81ecdfbb
RW
2346## ----------- ##
2347## Core tests. ##
2348## ----------- ##
2349
2350_ACEOF
2351
2352
2353# Keep a trace of the command line.
2354# Strip out --no-create and --no-recursion so they do not pile up.
2355# Strip out --silent because we don't want to record it for future runs.
2356# Also quote any args containing shell meta-characters.
2357# Make two passes to allow for proper duplicate-argument suppression.
2358ac_configure_args=
2359ac_configure_args0=
2360ac_configure_args1=
2361ac_must_keep_next=false
2362for ac_pass in 1 2
2363do
2364 for ac_arg
2365 do
2366 case $ac_arg in
2367 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2369 | -silent | --silent | --silen | --sile | --sil)
2370 continue ;;
2371 *\'*)
2372 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2373 esac
2374 case $ac_pass in
2375 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2376 2)
2377 as_fn_append ac_configure_args1 " '$ac_arg'"
2378 if test $ac_must_keep_next = true; then
2379 ac_must_keep_next=false # Got value, back to normal.
2380 else
2381 case $ac_arg in
2382 *=* | --config-cache | -C | -disable-* | --disable-* \
2383 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2384 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2385 | -with-* | --with-* | -without-* | --without-* | --x)
2386 case "$ac_configure_args0 " in
2387 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2388 esac
2389 ;;
2390 -* ) ac_must_keep_next=true ;;
2391 esac
2392 fi
2393 as_fn_append ac_configure_args " '$ac_arg'"
2394 ;;
2395 esac
2396 done
2397done
2398{ ac_configure_args0=; unset ac_configure_args0;}
2399{ ac_configure_args1=; unset ac_configure_args1;}
2400
2401# When interrupted or exit'd, cleanup temporary files, and complete
2402# config.log. We remove comments because anyway the quotes in there
2403# would cause problems or look ugly.
2404# WARNING: Use '\'' to represent an apostrophe within the trap.
2405# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2406trap 'exit_status=$?
2407 # Save into config.log some information that might help in debugging.
2408 {
2409 echo
2410
2411 cat <<\_ASBOX
2412## ---------------- ##
2413## Cache variables. ##
2414## ---------------- ##
2415_ASBOX
2416 echo
2417 # The following way of writing the cache mishandles newlines in values,
2418(
2419 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2420 eval ac_val=\$$ac_var
2421 case $ac_val in #(
2422 *${as_nl}*)
2423 case $ac_var in #(
2424 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2425$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2426 esac
2427 case $ac_var in #(
2428 _ | IFS | as_nl) ;; #(
2429 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2430 *) { eval $ac_var=; unset $ac_var;} ;;
2431 esac ;;
2432 esac
2433 done
2434 (set) 2>&1 |
2435 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2436 *${as_nl}ac_space=\ *)
2437 sed -n \
2438 "s/'\''/'\''\\\\'\'''\''/g;
2439 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2440 ;; #(
2441 *)
2442 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2443 ;;
2444 esac |
2445 sort
2446)
2447 echo
2448
2449 cat <<\_ASBOX
2450## ----------------- ##
2451## Output variables. ##
2452## ----------------- ##
2453_ASBOX
2454 echo
2455 for ac_var in $ac_subst_vars
2456 do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in
2459 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2460 esac
2461 $as_echo "$ac_var='\''$ac_val'\''"
2462 done | sort
2463 echo
2464
2465 if test -n "$ac_subst_files"; then
2466 cat <<\_ASBOX
2467## ------------------- ##
2468## File substitutions. ##
2469## ------------------- ##
2470_ASBOX
2471 echo
2472 for ac_var in $ac_subst_files
2473 do
2474 eval ac_val=\$$ac_var
2475 case $ac_val in
2476 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2477 esac
2478 $as_echo "$ac_var='\''$ac_val'\''"
2479 done | sort
2480 echo
2481 fi
2482
2483 if test -s confdefs.h; then
2484 cat <<\_ASBOX
2485## ----------- ##
2486## confdefs.h. ##
2487## ----------- ##
2488_ASBOX
2489 echo
2490 cat confdefs.h
2491 echo
2492 fi
2493 test "$ac_signal" != 0 &&
2494 $as_echo "$as_me: caught signal $ac_signal"
2495 $as_echo "$as_me: exit $exit_status"
2496 } >&5
2497 rm -f core *.core core.conftest.* &&
2498 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2499 exit $exit_status
2500' 0
2501for ac_signal in 1 2 13 15; do
2502 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2503done
2504ac_signal=0
2505
2506# confdefs.h avoids OS command line length limits that DEFS can exceed.
2507rm -f -r conftest* confdefs.h
2508
2509$as_echo "/* confdefs.h */" > confdefs.h
2510
2511# Predefined preprocessor variables.
2512
2513cat >>confdefs.h <<_ACEOF
2514#define PACKAGE_NAME "$PACKAGE_NAME"
2515_ACEOF
2516
2517cat >>confdefs.h <<_ACEOF
2518#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2519_ACEOF
2520
2521cat >>confdefs.h <<_ACEOF
2522#define PACKAGE_VERSION "$PACKAGE_VERSION"
2523_ACEOF
2524
2525cat >>confdefs.h <<_ACEOF
2526#define PACKAGE_STRING "$PACKAGE_STRING"
2527_ACEOF
2528
2529cat >>confdefs.h <<_ACEOF
2530#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2531_ACEOF
2532
2533cat >>confdefs.h <<_ACEOF
2534#define PACKAGE_URL "$PACKAGE_URL"
2535_ACEOF
2536
2537
2538# Let the site file select an alternate cache file if it wants to.
2539# Prefer an explicitly selected file to automatically selected ones.
2540ac_site_file1=NONE
2541ac_site_file2=NONE
2542if test -n "$CONFIG_SITE"; then
2543 ac_site_file1=$CONFIG_SITE
2544elif test "x$prefix" != xNONE; then
2545 ac_site_file1=$prefix/share/config.site
2546 ac_site_file2=$prefix/etc/config.site
2547else
2548 ac_site_file1=$ac_default_prefix/share/config.site
2549 ac_site_file2=$ac_default_prefix/etc/config.site
2550fi
2551for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2552do
2553 test "x$ac_site_file" = xNONE && continue
2554 if test -r "$ac_site_file"; then
2555 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2556$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2557 sed 's/^/| /' "$ac_site_file" >&5
2558 . "$ac_site_file"
2559 fi
2560done
2561
2562if test -r "$cache_file"; then
2563 # Some versions of bash will fail to source /dev/null (special
2564 # files actually), so we avoid doing that.
2565 if test -f "$cache_file"; then
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2567$as_echo "$as_me: loading cache $cache_file" >&6;}
2568 case $cache_file in
2569 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2570 *) . "./$cache_file";;
2571 esac
2572 fi
2573else
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2575$as_echo "$as_me: creating cache $cache_file" >&6;}
2576 >$cache_file
bec39cab
AC
2577fi
2578
81ecdfbb
RW
2579# Check that the precious variables saved in the cache have kept the same
2580# value.
2581ac_cache_corrupted=false
2582for ac_var in $ac_precious_vars; do
2583 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2584 eval ac_new_set=\$ac_env_${ac_var}_set
2585 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2586 eval ac_new_val=\$ac_env_${ac_var}_value
2587 case $ac_old_set,$ac_new_set in
2588 set,)
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2590$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2591 ac_cache_corrupted=: ;;
2592 ,set)
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2594$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2595 ac_cache_corrupted=: ;;
2596 ,);;
2597 *)
2598 if test "x$ac_old_val" != "x$ac_new_val"; then
2599 # differences in whitespace do not lead to failure.
2600 ac_old_val_w=`echo x $ac_old_val`
2601 ac_new_val_w=`echo x $ac_new_val`
2602 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2604$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2605 ac_cache_corrupted=:
2606 else
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2608$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2609 eval $ac_var=\$ac_old_val
2610 fi
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2612$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2614$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2615 fi;;
2616 esac
2617 # Pass precious variables to config.status.
2618 if test "$ac_new_set" = set; then
2619 case $ac_new_val in
2620 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2621 *) ac_arg=$ac_var=$ac_new_val ;;
2622 esac
2623 case " $ac_configure_args " in
2624 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2625 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2626 esac
2627 fi
2628done
2629if $ac_cache_corrupted; then
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2633$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2634 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2635fi
2636## -------------------- ##
2637## Main body of script. ##
2638## -------------------- ##
2639
2640ac_ext=c
2641ac_cpp='$CPP $CPPFLAGS'
2642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2644ac_compiler_gnu=$ac_cv_c_compiler_gnu
2645
2646
2647
2648
2649
2650ac_config_headers="$ac_config_headers config.h:config.in"
2651
2652
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2654$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2655 # Check whether --enable-maintainer-mode was given.
2656if test "${enable_maintainer_mode+set}" = set; then :
2657 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2658else
2659 USE_MAINTAINER_MODE=no
2660fi
2661
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2663$as_echo "$USE_MAINTAINER_MODE" >&6; }
2664 if test $USE_MAINTAINER_MODE = yes; then
2665 MAINTAINER_MODE_TRUE=
2666 MAINTAINER_MODE_FALSE='#'
2667else
2668 MAINTAINER_MODE_TRUE='#'
2669 MAINTAINER_MODE_FALSE=
2670fi
2671
2672 MAINT=$MAINTAINER_MODE_TRUE
2673
2674
2675
2676ac_ext=c
2677ac_cpp='$CPP $CPPFLAGS'
2678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2680ac_compiler_gnu=$ac_cv_c_compiler_gnu
2681if test -n "$ac_tool_prefix"; then
2682 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2683set dummy ${ac_tool_prefix}gcc; ac_word=$2
2684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2685$as_echo_n "checking for $ac_word... " >&6; }
2686if test "${ac_cv_prog_CC+set}" = set; then :
2687 $as_echo_n "(cached) " >&6
c906108c
SS
2688else
2689 if test -n "$CC"; then
2690 ac_cv_prog_CC="$CC" # Let the user override the test.
2691else
bec39cab
AC
2692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2693for as_dir in $PATH
2694do
2695 IFS=$as_save_IFS
2696 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2697 for ac_exec_ext in '' $ac_executable_extensions; do
2698 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2699 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2701 break 2
2702 fi
2703done
81ecdfbb
RW
2704 done
2705IFS=$as_save_IFS
bec39cab 2706
c906108c
SS
2707fi
2708fi
bec39cab 2709CC=$ac_cv_prog_CC
c906108c 2710if test -n "$CC"; then
81ecdfbb
RW
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2712$as_echo "$CC" >&6; }
c906108c 2713else
81ecdfbb
RW
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2715$as_echo "no" >&6; }
c906108c
SS
2716fi
2717
81ecdfbb 2718
b4e70030
JB
2719fi
2720if test -z "$ac_cv_prog_CC"; then
2721 ac_ct_CC=$CC
81ecdfbb
RW
2722 # Extract the first word of "gcc", so it can be a program name with args.
2723set dummy gcc; ac_word=$2
2724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2725$as_echo_n "checking for $ac_word... " >&6; }
2726if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2727 $as_echo_n "(cached) " >&6
b4e70030
JB
2728else
2729 if test -n "$ac_ct_CC"; then
2730 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2731else
2732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2733for as_dir in $PATH
2734do
2735 IFS=$as_save_IFS
2736 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2737 for ac_exec_ext in '' $ac_executable_extensions; do
2738 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2739 ac_cv_prog_ac_ct_CC="gcc"
2740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2741 break 2
4e8d927d 2742 fi
b4e70030 2743done
81ecdfbb
RW
2744 done
2745IFS=$as_save_IFS
b4e70030
JB
2746
2747fi
2748fi
2749ac_ct_CC=$ac_cv_prog_ac_ct_CC
2750if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2752$as_echo "$ac_ct_CC" >&6; }
b4e70030 2753else
81ecdfbb
RW
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2755$as_echo "no" >&6; }
b4e70030
JB
2756fi
2757
81ecdfbb
RW
2758 if test "x$ac_ct_CC" = x; then
2759 CC=""
2760 else
2761 case $cross_compiling:$ac_tool_warned in
2762yes:)
2763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2765ac_tool_warned=yes ;;
2766esac
2767 CC=$ac_ct_CC
2768 fi
b4e70030
JB
2769else
2770 CC="$ac_cv_prog_CC"
2771fi
2772
c906108c 2773if test -z "$CC"; then
81ecdfbb
RW
2774 if test -n "$ac_tool_prefix"; then
2775 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2776set dummy ${ac_tool_prefix}cc; ac_word=$2
2777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2778$as_echo_n "checking for $ac_word... " >&6; }
2779if test "${ac_cv_prog_CC+set}" = set; then :
2780 $as_echo_n "(cached) " >&6
c906108c
SS
2781else
2782 if test -n "$CC"; then
2783 ac_cv_prog_CC="$CC" # Let the user override the test.
2784else
bec39cab
AC
2785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2786for as_dir in $PATH
2787do
2788 IFS=$as_save_IFS
2789 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2790 for ac_exec_ext in '' $ac_executable_extensions; do
2791 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2792 ac_cv_prog_CC="${ac_tool_prefix}cc"
2793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2794 break 2
2795 fi
2796done
81ecdfbb
RW
2797 done
2798IFS=$as_save_IFS
2799
2800fi
2801fi
2802CC=$ac_cv_prog_CC
2803if test -n "$CC"; then
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2805$as_echo "$CC" >&6; }
2806else
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
2809fi
2810
2811
2812 fi
2813fi
2814if test -z "$CC"; then
2815 # Extract the first word of "cc", so it can be a program name with args.
2816set dummy cc; ac_word=$2
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2818$as_echo_n "checking for $ac_word... " >&6; }
2819if test "${ac_cv_prog_CC+set}" = set; then :
2820 $as_echo_n "(cached) " >&6
2821else
2822 if test -n "$CC"; then
2823 ac_cv_prog_CC="$CC" # Let the user override the test.
2824else
2825 ac_prog_rejected=no
2826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2827for as_dir in $PATH
2828do
2829 IFS=$as_save_IFS
2830 test -z "$as_dir" && as_dir=.
2831 for ac_exec_ext in '' $ac_executable_extensions; do
2832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2833 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2834 ac_prog_rejected=yes
2835 continue
2836 fi
2837 ac_cv_prog_CC="cc"
2838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2839 break 2
2840 fi
2841done
2842 done
2843IFS=$as_save_IFS
bec39cab 2844
c906108c
SS
2845if test $ac_prog_rejected = yes; then
2846 # We found a bogon in the path, so make sure we never use it.
2847 set dummy $ac_cv_prog_CC
2848 shift
bec39cab 2849 if test $# != 0; then
c906108c
SS
2850 # We chose a different compiler from the bogus one.
2851 # However, it has the same basename, so the bogon will be chosen
2852 # first if we set CC to just the basename; use the full file name.
2853 shift
bec39cab 2854 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2855 fi
2856fi
2857fi
2858fi
bec39cab 2859CC=$ac_cv_prog_CC
c906108c 2860if test -n "$CC"; then
81ecdfbb
RW
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2862$as_echo "$CC" >&6; }
c906108c 2863else
81ecdfbb
RW
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2865$as_echo "no" >&6; }
c906108c
SS
2866fi
2867
81ecdfbb 2868
bec39cab
AC
2869fi
2870if test -z "$CC"; then
2871 if test -n "$ac_tool_prefix"; then
81ecdfbb 2872 for ac_prog in cl.exe
bec39cab
AC
2873 do
2874 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2877$as_echo_n "checking for $ac_word... " >&6; }
2878if test "${ac_cv_prog_CC+set}" = set; then :
2879 $as_echo_n "(cached) " >&6
c906108c
SS
2880else
2881 if test -n "$CC"; then
2882 ac_cv_prog_CC="$CC" # Let the user override the test.
2883else
bec39cab
AC
2884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2885for as_dir in $PATH
2886do
2887 IFS=$as_save_IFS
2888 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2889 for ac_exec_ext in '' $ac_executable_extensions; do
2890 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2891 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2893 break 2
2894 fi
2895done
81ecdfbb
RW
2896 done
2897IFS=$as_save_IFS
bec39cab 2898
c906108c
SS
2899fi
2900fi
bec39cab 2901CC=$ac_cv_prog_CC
c906108c 2902if test -n "$CC"; then
81ecdfbb
RW
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2904$as_echo "$CC" >&6; }
c906108c 2905else
81ecdfbb
RW
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2907$as_echo "no" >&6; }
c906108c 2908fi
bec39cab 2909
81ecdfbb 2910
bec39cab
AC
2911 test -n "$CC" && break
2912 done
2913fi
2914if test -z "$CC"; then
2915 ac_ct_CC=$CC
81ecdfbb 2916 for ac_prog in cl.exe
bec39cab
AC
2917do
2918 # Extract the first word of "$ac_prog", so it can be a program name with args.
2919set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2921$as_echo_n "checking for $ac_word... " >&6; }
2922if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2923 $as_echo_n "(cached) " >&6
bec39cab
AC
2924else
2925 if test -n "$ac_ct_CC"; then
2926 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2927else
2928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2929for as_dir in $PATH
2930do
2931 IFS=$as_save_IFS
2932 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2933 for ac_exec_ext in '' $ac_executable_extensions; do
2934 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2935 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2937 break 2
c906108c 2938 fi
bec39cab 2939done
81ecdfbb
RW
2940 done
2941IFS=$as_save_IFS
bec39cab
AC
2942
2943fi
2944fi
2945ac_ct_CC=$ac_cv_prog_ac_ct_CC
2946if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2948$as_echo "$ac_ct_CC" >&6; }
bec39cab 2949else
81ecdfbb
RW
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2951$as_echo "no" >&6; }
c906108c
SS
2952fi
2953
81ecdfbb 2954
bec39cab
AC
2955 test -n "$ac_ct_CC" && break
2956done
c906108c 2957
81ecdfbb
RW
2958 if test "x$ac_ct_CC" = x; then
2959 CC=""
2960 else
2961 case $cross_compiling:$ac_tool_warned in
2962yes:)
2963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2965ac_tool_warned=yes ;;
2966esac
2967 CC=$ac_ct_CC
2968 fi
bec39cab
AC
2969fi
2970
2971fi
2972
2973
81ecdfbb
RW
2974test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2976as_fn_error "no acceptable C compiler found in \$PATH
2977See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
2978
2979# Provide some information about the compiler.
81ecdfbb
RW
2980$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2981set X $ac_compile
2982ac_compiler=$2
2983for ac_option in --version -v -V -qversion; do
2984 { { ac_try="$ac_compiler $ac_option >&5"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
2989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2990$as_echo "$ac_try_echo"; } >&5
2991 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 2992 ac_status=$?
81ecdfbb
RW
2993 if test -s conftest.err; then
2994 sed '10a\
2995... rest of stderr output deleted ...
2996 10q' conftest.err >conftest.er1
2997 cat conftest.er1 >&5
2998 rm -f conftest.er1 conftest.err
2999 fi
3000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3001 test $ac_status = 0; }
3002done
bec39cab 3003
81ecdfbb 3004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015ac_clean_files_save=$ac_clean_files
81ecdfbb 3016ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3017# Try to create an executable without -o first, disregard a.out.
3018# It will help us diagnose broken compilers, and finding out an intuition
3019# of exeext.
81ecdfbb
RW
3020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3021$as_echo_n "checking for C compiler default output file name... " >&6; }
3022ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3023
3024# The possible output files:
3025ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3026
3027ac_rmfiles=
3028for ac_file in $ac_files
3029do
3030 case $ac_file in
3031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3032 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3033 esac
3034done
3035rm -f $ac_rmfiles
3036
3037if { { ac_try="$ac_link_default"
3038case "(($ac_try" in
3039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3040 *) ac_try_echo=$ac_try;;
3041esac
3042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3043$as_echo "$ac_try_echo"; } >&5
3044 (eval "$ac_link_default") 2>&5
3045 ac_status=$?
3046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3047 test $ac_status = 0; }; then :
3048 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3049# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3050# in a Makefile. We should not override ac_cv_exeext if it was cached,
3051# so that the user can short-circuit this test for compilers unknown to
3052# Autoconf.
3053for ac_file in $ac_files ''
bec39cab
AC
3054do
3055 test -f "$ac_file" || continue
3056 case $ac_file in
81ecdfbb 3057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3058 ;;
3059 [ab].out )
3060 # We found the default executable, but exeext='' is most
3061 # certainly right.
3062 break;;
3063 *.* )
81ecdfbb
RW
3064 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3065 then :; else
3066 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3067 fi
3068 # We set ac_cv_exeext here because the later test for it is not
3069 # safe: cross compilers may not add the suffix if given an `-o'
3070 # argument, so we may need to know it at that point already.
3071 # Even if this section looks crufty: it has the advantage of
3072 # actually working.
b4e70030
JB
3073 break;;
3074 * )
3075 break;;
bec39cab
AC
3076 esac
3077done
81ecdfbb
RW
3078test "$ac_cv_exeext" = no && ac_cv_exeext=
3079
bec39cab 3080else
81ecdfbb
RW
3081 ac_file=''
3082fi
3083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3084$as_echo "$ac_file" >&6; }
3085if test -z "$ac_file"; then :
3086 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3087sed 's/^/| /' conftest.$ac_ext >&5
3088
81ecdfbb
RW
3089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3091{ as_fn_set_status 77
3092as_fn_error "C compiler cannot create executables
3093See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3094fi
b4e70030 3095ac_exeext=$ac_cv_exeext
b4e70030 3096
81ecdfbb 3097# Check that the compiler produces executables we can run. If not, either
bec39cab 3098# the compiler is broken, or we cross compile.
81ecdfbb
RW
3099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3100$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3101# If not cross compiling, check that we can run a simple program.
3102if test "$cross_compiling" != yes; then
3103 if { ac_try='./$ac_file'
81ecdfbb
RW
3104 { { case "(($ac_try" in
3105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106 *) ac_try_echo=$ac_try;;
3107esac
3108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3109$as_echo "$ac_try_echo"; } >&5
3110 (eval "$ac_try") 2>&5
bec39cab 3111 ac_status=$?
81ecdfbb
RW
3112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113 test $ac_status = 0; }; }; then
bec39cab 3114 cross_compiling=no
c906108c 3115 else
bec39cab
AC
3116 if test "$cross_compiling" = maybe; then
3117 cross_compiling=yes
3118 else
81ecdfbb
RW
3119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3121as_fn_error "cannot run C compiled programs.
bec39cab 3122If you meant to cross compile, use \`--host'.
81ecdfbb 3123See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3124 fi
c906108c 3125 fi
bec39cab 3126fi
81ecdfbb
RW
3127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3128$as_echo "yes" >&6; }
bec39cab 3129
81ecdfbb 3130rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3131ac_clean_files=$ac_clean_files_save
81ecdfbb 3132# Check that the compiler produces executables we can run. If not, either
b4e70030 3133# the compiler is broken, or we cross compile.
81ecdfbb
RW
3134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3135$as_echo_n "checking whether we are cross compiling... " >&6; }
3136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3137$as_echo "$cross_compiling" >&6; }
3138
3139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3140$as_echo_n "checking for suffix of executables... " >&6; }
3141if { { ac_try="$ac_link"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
3146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3147$as_echo "$ac_try_echo"; } >&5
3148 (eval "$ac_link") 2>&5
bec39cab 3149 ac_status=$?
81ecdfbb
RW
3150 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3151 test $ac_status = 0; }; then :
b4e70030
JB
3152 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3153# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3154# work properly (i.e., refer to `conftest.exe'), while it won't with
3155# `rm'.
3156for ac_file in conftest.exe conftest conftest.*; do
3157 test -f "$ac_file" || continue
3158 case $ac_file in
81ecdfbb 3159 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3160 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3161 break;;
3162 * ) break;;
3163 esac
3164done
c906108c 3165else
81ecdfbb
RW
3166 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168as_fn_error "cannot compute suffix of executables: cannot compile and link
3169See \`config.log' for more details." "$LINENO" 5; }
c906108c 3170fi
b4e70030 3171rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3173$as_echo "$ac_cv_exeext" >&6; }
c906108c 3174
b4e70030 3175rm -f conftest.$ac_ext
bec39cab
AC
3176EXEEXT=$ac_cv_exeext
3177ac_exeext=$EXEEXT
81ecdfbb
RW
3178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3179$as_echo_n "checking for suffix of object files... " >&6; }
3180if test "${ac_cv_objext+set}" = set; then :
3181 $as_echo_n "(cached) " >&6
bec39cab 3182else
81ecdfbb 3183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3184/* end confdefs.h. */
3185
3186int
3187main ()
3188{
3189
3190 ;
3191 return 0;
3192}
3193_ACEOF
3194rm -f conftest.o conftest.obj
81ecdfbb
RW
3195if { { ac_try="$ac_compile"
3196case "(($ac_try" in
3197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3198 *) ac_try_echo=$ac_try;;
3199esac
3200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3201$as_echo "$ac_try_echo"; } >&5
3202 (eval "$ac_compile") 2>&5
3203 ac_status=$?
3204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3205 test $ac_status = 0; }; then :
3206 for ac_file in conftest.o conftest.obj conftest.*; do
3207 test -f "$ac_file" || continue;
bec39cab 3208 case $ac_file in
81ecdfbb 3209 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3210 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3211 break;;
3212 esac
3213done
c906108c 3214else
81ecdfbb 3215 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3216sed 's/^/| /' conftest.$ac_ext >&5
3217
81ecdfbb
RW
3218{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error "cannot compute suffix of object files: cannot compile
3221See \`config.log' for more details." "$LINENO" 5; }
c906108c 3222fi
b4e70030 3223rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3224fi
81ecdfbb
RW
3225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3226$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3227OBJEXT=$ac_cv_objext
3228ac_objext=$OBJEXT
81ecdfbb
RW
3229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3230$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3231if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3232 $as_echo_n "(cached) " >&6
c906108c 3233else
81ecdfbb 3234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3235/* end confdefs.h. */
3236
3237int
3238main ()
3239{
3240#ifndef __GNUC__
3241 choke me
3242#endif
3243
3244 ;
3245 return 0;
3246}
3247_ACEOF
81ecdfbb 3248if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3249 ac_compiler_gnu=yes
3250else
81ecdfbb 3251 ac_compiler_gnu=no
bec39cab 3252fi
81ecdfbb 3253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3254ac_cv_c_compiler_gnu=$ac_compiler_gnu
3255
3256fi
81ecdfbb
RW
3257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3258$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3259if test $ac_compiler_gnu = yes; then
3260 GCC=yes
3261else
3262 GCC=
3263fi
bec39cab
AC
3264ac_test_CFLAGS=${CFLAGS+set}
3265ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3267$as_echo_n "checking whether $CC accepts -g... " >&6; }
3268if test "${ac_cv_prog_cc_g+set}" = set; then :
3269 $as_echo_n "(cached) " >&6
bec39cab 3270else
81ecdfbb
RW
3271 ac_save_c_werror_flag=$ac_c_werror_flag
3272 ac_c_werror_flag=yes
3273 ac_cv_prog_cc_g=no
3274 CFLAGS="-g"
3275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3276/* end confdefs.h. */
3277
3278int
3279main ()
3280{
3281
3282 ;
3283 return 0;
3284}
3285_ACEOF
81ecdfbb 3286if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3287 ac_cv_prog_cc_g=yes
3288else
81ecdfbb
RW
3289 CFLAGS=""
3290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3291/* end confdefs.h. */
3292
3293int
3294main ()
3295{
3296
3297 ;
3298 return 0;
3299}
3300_ACEOF
3301if ac_fn_c_try_compile "$LINENO"; then :
3302
3303else
3304 ac_c_werror_flag=$ac_save_c_werror_flag
3305 CFLAGS="-g"
3306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3307/* end confdefs.h. */
3308
3309int
3310main ()
3311{
c906108c 3312
81ecdfbb
RW
3313 ;
3314 return 0;
3315}
3316_ACEOF
3317if ac_fn_c_try_compile "$LINENO"; then :
3318 ac_cv_prog_cc_g=yes
3319fi
3320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3321fi
3322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3323fi
81ecdfbb
RW
3324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3325 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3326fi
81ecdfbb
RW
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3328$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3329if test "$ac_test_CFLAGS" = set; then
bec39cab 3330 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3331elif test $ac_cv_prog_cc_g = yes; then
3332 if test "$GCC" = yes; then
3333 CFLAGS="-g -O2"
3334 else
3335 CFLAGS="-g"
3336 fi
3337else
3338 if test "$GCC" = yes; then
3339 CFLAGS="-O2"
3340 else
3341 CFLAGS=
3342 fi
3343fi
81ecdfbb
RW
3344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3345$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3346if test "${ac_cv_prog_cc_c89+set}" = set; then :
3347 $as_echo_n "(cached) " >&6
bec39cab 3348else
81ecdfbb 3349 ac_cv_prog_cc_c89=no
bec39cab 3350ac_save_CC=$CC
81ecdfbb 3351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3352/* end confdefs.h. */
c906108c
SS
3353#include <stdarg.h>
3354#include <stdio.h>
3355#include <sys/types.h>
3356#include <sys/stat.h>
3357/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3358struct buf { int x; };
3359FILE * (*rcsopen) (struct buf *, struct stat *, int);
3360static char *e (p, i)
3361 char **p;
3362 int i;
3363{
3364 return p[i];
3365}
3366static char *f (char * (*g) (char **, int), char **p, ...)
3367{
3368 char *s;
3369 va_list v;
3370 va_start (v,p);
3371 s = g (p, va_arg (v,int));
3372 va_end (v);
3373 return s;
3374}
bec39cab
AC
3375
3376/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3377 function prototypes and stuff, but not '\xHH' hex character constants.
3378 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3379 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3380 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3381 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3382 that's true only with -std. */
bec39cab
AC
3383int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3384
81ecdfbb
RW
3385/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3386 inside strings and character constants. */
3387#define FOO(x) 'x'
3388int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3389
c906108c
SS
3390int test (int i, double x);
3391struct s1 {int (*f) (int a);};
3392struct s2 {int (*f) (double a);};
3393int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3394int argc;
3395char **argv;
bec39cab
AC
3396int
3397main ()
3398{
c906108c 3399return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3400 ;
3401 return 0;
3402}
3403_ACEOF
81ecdfbb
RW
3404for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3405 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3406do
3407 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3408 if ac_fn_c_try_compile "$LINENO"; then :
3409 ac_cv_prog_cc_c89=$ac_arg
c906108c 3410fi
81ecdfbb
RW
3411rm -f core conftest.err conftest.$ac_objext
3412 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3413done
81ecdfbb 3414rm -f conftest.$ac_ext
bec39cab 3415CC=$ac_save_CC
c906108c
SS
3416
3417fi
81ecdfbb
RW
3418# AC_CACHE_VAL
3419case "x$ac_cv_prog_cc_c89" in
3420 x)
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3422$as_echo "none needed" >&6; } ;;
3423 xno)
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3425$as_echo "unsupported" >&6; } ;;
bec39cab 3426 *)
81ecdfbb
RW
3427 CC="$CC $ac_cv_prog_cc_c89"
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3429$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3430esac
81ecdfbb 3431if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3432
b4e70030
JB
3433fi
3434
bec39cab
AC
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3440
60ca704f 3441
bec39cab
AC
3442ac_ext=c
3443ac_cpp='$CPP $CPPFLAGS'
3444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3446ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3448$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3449# On Suns, sometimes $CPP names a directory.
3450if test -n "$CPP" && test -d "$CPP"; then
3451 CPP=
8bb2c122 3452fi
bec39cab 3453if test -z "$CPP"; then
81ecdfbb
RW
3454 if test "${ac_cv_prog_CPP+set}" = set; then :
3455 $as_echo_n "(cached) " >&6
bec39cab
AC
3456else
3457 # Double quotes because CPP needs to be expanded
3458 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3459 do
3460 ac_preproc_ok=false
3461for ac_c_preproc_warn_flag in '' yes
3462do
3463 # Use a header file that comes with gcc, so configuring glibc
3464 # with a fresh cross-compiler works.
3465 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3466 # <limits.h> exists even on freestanding compilers.
3467 # On the NeXT, cc -E runs the code through the compiler's parser,
3468 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3470/* end confdefs.h. */
3471#ifdef __STDC__
3472# include <limits.h>
3473#else
3474# include <assert.h>
3475#endif
3476 Syntax error
3477_ACEOF
81ecdfbb 3478if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3479
81ecdfbb 3480else
bec39cab
AC
3481 # Broken: fails on valid input.
3482continue
3483fi
3484rm -f conftest.err conftest.$ac_ext
3485
81ecdfbb 3486 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3487 # can be detected and how.
81ecdfbb 3488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3489/* end confdefs.h. */
3490#include <ac_nonexistent.h>
3491_ACEOF
81ecdfbb 3492if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3493 # Broken: success on invalid input.
3494continue
8bb2c122 3495else
bec39cab
AC
3496 # Passes both tests.
3497ac_preproc_ok=:
3498break
8bb2c122 3499fi
bec39cab 3500rm -f conftest.err conftest.$ac_ext
8bb2c122 3501
bec39cab
AC
3502done
3503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3504rm -f conftest.err conftest.$ac_ext
81ecdfbb 3505if $ac_preproc_ok; then :
bec39cab
AC
3506 break
3507fi
8bb2c122 3508
bec39cab
AC
3509 done
3510 ac_cv_prog_CPP=$CPP
ddc9cd0f 3511
c906108c 3512fi
bec39cab
AC
3513 CPP=$ac_cv_prog_CPP
3514else
3515 ac_cv_prog_CPP=$CPP
c906108c 3516fi
81ecdfbb
RW
3517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3518$as_echo "$CPP" >&6; }
bec39cab
AC
3519ac_preproc_ok=false
3520for ac_c_preproc_warn_flag in '' yes
3521do
3522 # Use a header file that comes with gcc, so configuring glibc
3523 # with a fresh cross-compiler works.
3524 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3525 # <limits.h> exists even on freestanding compilers.
3526 # On the NeXT, cc -E runs the code through the compiler's parser,
3527 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3529/* end confdefs.h. */
3530#ifdef __STDC__
3531# include <limits.h>
3532#else
3533# include <assert.h>
3534#endif
3535 Syntax error
3536_ACEOF
81ecdfbb 3537if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3538
81ecdfbb 3539else
bec39cab
AC
3540 # Broken: fails on valid input.
3541continue
3542fi
3543rm -f conftest.err conftest.$ac_ext
3544
81ecdfbb 3545 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3546 # can be detected and how.
81ecdfbb 3547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3548/* end confdefs.h. */
3549#include <ac_nonexistent.h>
3550_ACEOF
81ecdfbb 3551if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3552 # Broken: success on invalid input.
3553continue
c906108c 3554else
bec39cab
AC
3555 # Passes both tests.
3556ac_preproc_ok=:
3557break
c906108c 3558fi
bec39cab 3559rm -f conftest.err conftest.$ac_ext
c906108c 3560
bec39cab
AC
3561done
3562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3563rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3564if $ac_preproc_ok; then :
3565
c906108c 3566else
81ecdfbb
RW
3567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3569as_fn_error "C preprocessor \"$CPP\" fails sanity check
3570See \`config.log' for more details." "$LINENO" 5; }
c906108c 3571fi
c906108c 3572
bec39cab
AC
3573ac_ext=c
3574ac_cpp='$CPP $CPPFLAGS'
3575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578
3579
81ecdfbb
RW
3580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3581$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3582if test "${ac_cv_path_GREP+set}" = set; then :
3583 $as_echo_n "(cached) " >&6
4e8d927d 3584else
81ecdfbb
RW
3585 if test -z "$GREP"; then
3586 ac_path_GREP_found=false
3587 # Loop through the user's path and test for each of PROGNAME-LIST
3588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
3593 for ac_prog in grep ggrep; do
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3596 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3597# Check for GNU ac_path_GREP and select it if it is found.
3598 # Check for GNU $ac_path_GREP
3599case `"$ac_path_GREP" --version 2>&1` in
3600*GNU*)
3601 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3602*)
3603 ac_count=0
3604 $as_echo_n 0123456789 >"conftest.in"
3605 while :
3606 do
3607 cat "conftest.in" "conftest.in" >"conftest.tmp"
3608 mv "conftest.tmp" "conftest.in"
3609 cp "conftest.in" "conftest.nl"
3610 $as_echo 'GREP' >> "conftest.nl"
3611 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3612 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3613 as_fn_arith $ac_count + 1 && ac_count=$as_val
3614 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3615 # Best one so far, save it but keep looking for a better one
3616 ac_cv_path_GREP="$ac_path_GREP"
3617 ac_path_GREP_max=$ac_count
bec39cab 3618 fi
81ecdfbb
RW
3619 # 10*(2^10) chars as input seems more than enough
3620 test $ac_count -gt 10 && break
3621 done
3622 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3623esac
bec39cab 3624
81ecdfbb
RW
3625 $ac_path_GREP_found && break 3
3626 done
3627 done
3628 done
3629IFS=$as_save_IFS
3630 if test -z "$ac_cv_path_GREP"; then
3631 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3632 fi
c906108c 3633else
81ecdfbb 3634 ac_cv_path_GREP=$GREP
c906108c 3635fi
c906108c 3636
81ecdfbb
RW
3637fi
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3639$as_echo "$ac_cv_path_GREP" >&6; }
3640 GREP="$ac_cv_path_GREP"
c906108c 3641
c906108c 3642
81ecdfbb
RW
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3644$as_echo_n "checking for egrep... " >&6; }
3645if test "${ac_cv_path_EGREP+set}" = set; then :
3646 $as_echo_n "(cached) " >&6
783e057b 3647else
81ecdfbb
RW
3648 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3649 then ac_cv_path_EGREP="$GREP -E"
3650 else
3651 if test -z "$EGREP"; then
3652 ac_path_EGREP_found=false
3653 # Loop through the user's path and test for each of PROGNAME-LIST
3654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3656do
3657 IFS=$as_save_IFS
3658 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3659 for ac_prog in egrep; do
3660 for ac_exec_ext in '' $ac_executable_extensions; do
3661 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3662 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3663# Check for GNU ac_path_EGREP and select it if it is found.
3664 # Check for GNU $ac_path_EGREP
3665case `"$ac_path_EGREP" --version 2>&1` in
3666*GNU*)
3667 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3668*)
3669 ac_count=0
3670 $as_echo_n 0123456789 >"conftest.in"
3671 while :
3672 do
3673 cat "conftest.in" "conftest.in" >"conftest.tmp"
3674 mv "conftest.tmp" "conftest.in"
3675 cp "conftest.in" "conftest.nl"
3676 $as_echo 'EGREP' >> "conftest.nl"
3677 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3678 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3679 as_fn_arith $ac_count + 1 && ac_count=$as_val
3680 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3681 # Best one so far, save it but keep looking for a better one
3682 ac_cv_path_EGREP="$ac_path_EGREP"
3683 ac_path_EGREP_max=$ac_count
3684 fi
3685 # 10*(2^10) chars as input seems more than enough
3686 test $ac_count -gt 10 && break
3687 done
3688 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3689esac
bec39cab 3690
81ecdfbb
RW
3691 $ac_path_EGREP_found && break 3
3692 done
3693 done
3694 done
3695IFS=$as_save_IFS
3696 if test -z "$ac_cv_path_EGREP"; then
3697 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3698 fi
783e057b 3699else
81ecdfbb 3700 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3701fi
3702
81ecdfbb 3703 fi
783e057b 3704fi
81ecdfbb
RW
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3706$as_echo "$ac_cv_path_EGREP" >&6; }
3707 EGREP="$ac_cv_path_EGREP"
3708
783e057b 3709
81ecdfbb
RW
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3711$as_echo_n "checking for ANSI C header files... " >&6; }
3712if test "${ac_cv_header_stdc+set}" = set; then :
3713 $as_echo_n "(cached) " >&6
783e057b 3714else
81ecdfbb 3715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3716/* end confdefs.h. */
783e057b 3717#include <stdlib.h>
bec39cab 3718#include <stdarg.h>
783e057b
DJ
3719#include <string.h>
3720#include <float.h>
c906108c 3721
bec39cab
AC
3722int
3723main ()
3724{
c906108c 3725
bec39cab
AC
3726 ;
3727 return 0;
3728}
3729_ACEOF
81ecdfbb 3730if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3731 ac_cv_header_stdc=yes
c906108c 3732else
81ecdfbb 3733 ac_cv_header_stdc=no
c906108c 3734fi
81ecdfbb 3735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3736
783e057b
DJ
3737if test $ac_cv_header_stdc = yes; then
3738 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3740/* end confdefs.h. */
3741#include <string.h>
c906108c 3742
783e057b
DJ
3743_ACEOF
3744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3745 $EGREP "memchr" >/dev/null 2>&1; then :
3746
c906108c 3747else
783e057b 3748 ac_cv_header_stdc=no
c906108c 3749fi
783e057b 3750rm -f conftest*
c906108c
SS
3751
3752fi
3753
783e057b
DJ
3754if test $ac_cv_header_stdc = yes; then
3755 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3757/* end confdefs.h. */
3758#include <stdlib.h>
bec39cab 3759
783e057b
DJ
3760_ACEOF
3761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3762 $EGREP "free" >/dev/null 2>&1; then :
3763
bec39cab 3764else
783e057b 3765 ac_cv_header_stdc=no
bec39cab 3766fi
783e057b 3767rm -f conftest*
bec39cab
AC
3768
3769fi
bec39cab 3770
783e057b
DJ
3771if test $ac_cv_header_stdc = yes; then
3772 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3773 if test "$cross_compiling" = yes; then :
783e057b 3774 :
bec39cab 3775else
81ecdfbb 3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3777/* end confdefs.h. */
3778#include <ctype.h>
81ecdfbb 3779#include <stdlib.h>
783e057b
DJ
3780#if ((' ' & 0x0FF) == 0x020)
3781# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3782# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3783#else
3784# define ISLOWER(c) \
3785 (('a' <= (c) && (c) <= 'i') \
3786 || ('j' <= (c) && (c) <= 'r') \
3787 || ('s' <= (c) && (c) <= 'z'))
3788# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3789#endif
3790
3791#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3792int
3793main ()
3794{
3795 int i;
3796 for (i = 0; i < 256; i++)
3797 if (XOR (islower (i), ISLOWER (i))
3798 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3799 return 2;
3800 return 0;
783e057b
DJ
3801}
3802_ACEOF
81ecdfbb 3803if ac_fn_c_try_run "$LINENO"; then :
783e057b 3804
81ecdfbb
RW
3805else
3806 ac_cv_header_stdc=no
783e057b 3807fi
81ecdfbb
RW
3808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3809 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3810fi
81ecdfbb 3811
783e057b
DJ
3812fi
3813fi
81ecdfbb
RW
3814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3815$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3816if test $ac_cv_header_stdc = yes; then
3817
81ecdfbb 3818$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3819
3820fi
3821
3822# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3823for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3824 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3825do :
3826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3827ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3828"
3829eval as_val=\$$as_ac_Header
3830 if test "x$as_val" = x""yes; then :
783e057b 3831 cat >>confdefs.h <<_ACEOF
81ecdfbb 3832#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3833_ACEOF
3834
3835fi
3836
3837done
3838
3839
3840
81ecdfbb
RW
3841 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3842if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3843 MINIX=yes
3844else
3845 MINIX=
3846fi
3847
3848
3849 if test "$MINIX" = yes; then
3850
81ecdfbb 3851$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3852
3853
81ecdfbb 3854$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3855
3856
81ecdfbb 3857$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3858
3859 fi
3860
3861
81ecdfbb
RW
3862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3863$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3864if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3865 $as_echo_n "(cached) " >&6
783e057b 3866else
81ecdfbb 3867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3868/* end confdefs.h. */
3869
c971b7fa
PA
3870# define __EXTENSIONS__ 1
3871 $ac_includes_default
783e057b
DJ
3872int
3873main ()
3874{
3875
3876 ;
3877 return 0;
3878}
3879_ACEOF
81ecdfbb 3880if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3881 ac_cv_safe_to_define___extensions__=yes
3882else
81ecdfbb 3883 ac_cv_safe_to_define___extensions__=no
783e057b 3884fi
81ecdfbb 3885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3886fi
81ecdfbb
RW
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3888$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3889 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3890 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3891
81ecdfbb 3892 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3893
81ecdfbb 3894 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3895
81ecdfbb 3896 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3897
81ecdfbb 3898 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3899
3900
c971b7fa
PA
3901ac_aux_dir=
3902for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3903 for ac_t in install-sh install.sh shtool; do
3904 if test -f "$ac_dir/$ac_t"; then
3905 ac_aux_dir=$ac_dir
3906 ac_install_sh="$ac_aux_dir/$ac_t -c"
3907 break 2
3908 fi
3909 done
3910done
3911if test -z "$ac_aux_dir"; then
3912 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3913fi
770d76d7 3914
c971b7fa
PA
3915# These three variables are undocumented and unsupported,
3916# and are intended to be withdrawn in a future Autoconf release.
3917# They can cause serious problems if a builder's source tree is in a directory
3918# whose full name contains unusual characters.
3919ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3920ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3921ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3922
770d76d7 3923
c971b7fa
PA
3924# Make sure we can run config.sub.
3925$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3926 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3927
c971b7fa
PA
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3929$as_echo_n "checking build system type... " >&6; }
3930if test "${ac_cv_build+set}" = set; then :
3931 $as_echo_n "(cached) " >&6
770d76d7 3932else
c971b7fa
PA
3933 ac_build_alias=$build_alias
3934test "x$ac_build_alias" = x &&
3935 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3936test "x$ac_build_alias" = x &&
3937 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3938ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3939 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3940
770d76d7 3941fi
c971b7fa
PA
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3943$as_echo "$ac_cv_build" >&6; }
3944case $ac_cv_build in
3945*-*-*) ;;
3946*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3947esac
c971b7fa
PA
3948build=$ac_cv_build
3949ac_save_IFS=$IFS; IFS='-'
3950set x $ac_cv_build
3951shift
3952build_cpu=$1
3953build_vendor=$2
3954shift; shift
3955# Remember, the first character of IFS is used to create $*,
3956# except with old shells:
3957build_os=$*
3958IFS=$ac_save_IFS
3959case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3960
3961
c971b7fa
PA
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3963$as_echo_n "checking host system type... " >&6; }
3964if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3965 $as_echo_n "(cached) " >&6
3966else
c971b7fa
PA
3967 if test "x$host_alias" = x; then
3968 ac_cv_host=$ac_cv_build
81ecdfbb 3969else
c971b7fa
PA
3970 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3971 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3972fi
81ecdfbb
RW
3973
3974fi
c971b7fa
PA
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3976$as_echo "$ac_cv_host" >&6; }
3977case $ac_cv_host in
3978*-*-*) ;;
3979*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 3980esac
c971b7fa
PA
3981host=$ac_cv_host
3982ac_save_IFS=$IFS; IFS='-'
3983set x $ac_cv_host
3984shift
3985host_cpu=$1
3986host_vendor=$2
3987shift; shift
3988# Remember, the first character of IFS is used to create $*,
3989# except with old shells:
3990host_os=$*
3991IFS=$ac_save_IFS
3992case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
3993
3994
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3996$as_echo_n "checking target system type... " >&6; }
3997if test "${ac_cv_target+set}" = set; then :
3998 $as_echo_n "(cached) " >&6
3999else
4000 if test "x$target_alias" = x; then
4001 ac_cv_target=$ac_cv_host
4002else
4003 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4004 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4005fi
4006
4007fi
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4009$as_echo "$ac_cv_target" >&6; }
4010case $ac_cv_target in
4011*-*-*) ;;
4012*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4013esac
4014target=$ac_cv_target
4015ac_save_IFS=$IFS; IFS='-'
4016set x $ac_cv_target
4017shift
4018target_cpu=$1
4019target_vendor=$2
4020shift; shift
4021# Remember, the first character of IFS is used to create $*,
4022# except with old shells:
4023target_os=$*
4024IFS=$ac_save_IFS
4025case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4026
4027
4028# The aliases save the names the user supplied, while $host etc.
4029# will get canonicalized.
4030test -n "$target_alias" &&
4031 test "$program_prefix$program_suffix$program_transform_name" = \
4032 NONENONEs,x,x, &&
4033 program_prefix=${target_alias}-
4034
4035# The tests for host and target for $enable_largefile require
4036# canonical names.
4037
4038
81ecdfbb 4039
da2f07f1
JK
4040# As the $enable_largefile decision depends on --enable-plugins we must set it
4041# even in directories otherwise not depending on the $plugins option.
4042
4043
4044# Check whether --enable-plugins was given.
4045if test "${enable_plugins+set}" = set; then :
4046 enableval=$enable_plugins; case "${enableval}" in
4047 yes | "") plugins=yes ;;
4048 no) plugins=no ;;
4049 *) plugins=yes ;;
4050 esac
4051else
4052 plugins=no
4053fi
4054
4055
4056
4057case "${host}" in
4058 sparc-*-solaris*|i[3-7]86-*-solaris*)
4059 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4060 # are mutually exclusive; and without procfs support, the bfd/ elf module
4061 # cannot provide certain routines such as elfcore_write_prpsinfo
4062 # or elfcore_write_prstatus. So unless the user explicitly requested
4063 # large-file support through the --enable-largefile switch, disable
4064 # large-file support in favor of procfs support.
4065 test "${target}" = "${host}" -a "x$plugins" = xno \
4066 && : ${enable_largefile="no"}
4067 ;;
4068esac
4069
4070# Check whether --enable-largefile was given.
4071if test "${enable_largefile+set}" = set; then :
4072 enableval=$enable_largefile;
4073fi
4074
4075if test "$enable_largefile" != no; then
4076
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4078$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4079if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4080 $as_echo_n "(cached) " >&6
4081else
4082 ac_cv_sys_largefile_CC=no
4083 if test "$GCC" != yes; then
4084 ac_save_CC=$CC
4085 while :; do
4086 # IRIX 6.2 and later do not support large files by default,
4087 # so use the C compiler's -n32 option if that helps.
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4089/* end confdefs.h. */
4090#include <sys/types.h>
4091 /* Check that off_t can represent 2**63 - 1 correctly.
4092 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4093 since some C++ compilers masquerading as C compilers
4094 incorrectly reject 9223372036854775807. */
4095#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4096 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4097 && LARGE_OFF_T % 2147483647 == 1)
4098 ? 1 : -1];
4099int
4100main ()
4101{
4102
4103 ;
4104 return 0;
4105}
4106_ACEOF
4107 if ac_fn_c_try_compile "$LINENO"; then :
4108 break
4109fi
4110rm -f core conftest.err conftest.$ac_objext
4111 CC="$CC -n32"
4112 if ac_fn_c_try_compile "$LINENO"; then :
4113 ac_cv_sys_largefile_CC=' -n32'; break
4114fi
4115rm -f core conftest.err conftest.$ac_objext
4116 break
4117 done
4118 CC=$ac_save_CC
4119 rm -f conftest.$ac_ext
4120 fi
4121fi
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4123$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4124 if test "$ac_cv_sys_largefile_CC" != no; then
4125 CC=$CC$ac_cv_sys_largefile_CC
4126 fi
4127
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4129$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4130if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4131 $as_echo_n "(cached) " >&6
4132else
4133 while :; do
4134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4135/* end confdefs.h. */
4136#include <sys/types.h>
4137 /* Check that off_t can represent 2**63 - 1 correctly.
4138 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4139 since some C++ compilers masquerading as C compilers
4140 incorrectly reject 9223372036854775807. */
4141#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4142 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4143 && LARGE_OFF_T % 2147483647 == 1)
4144 ? 1 : -1];
4145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153if ac_fn_c_try_compile "$LINENO"; then :
4154 ac_cv_sys_file_offset_bits=no; break
4155fi
4156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4158/* end confdefs.h. */
4159#define _FILE_OFFSET_BITS 64
4160#include <sys/types.h>
4161 /* Check that off_t can represent 2**63 - 1 correctly.
4162 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4163 since some C++ compilers masquerading as C compilers
4164 incorrectly reject 9223372036854775807. */
4165#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4166 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4167 && LARGE_OFF_T % 2147483647 == 1)
4168 ? 1 : -1];
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
4177if ac_fn_c_try_compile "$LINENO"; then :
4178 ac_cv_sys_file_offset_bits=64; break
4179fi
4180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4181 ac_cv_sys_file_offset_bits=unknown
4182 break
4183done
4184fi
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4186$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4187case $ac_cv_sys_file_offset_bits in #(
4188 no | unknown) ;;
4189 *)
4190cat >>confdefs.h <<_ACEOF
4191#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4192_ACEOF
4193;;
4194esac
4195rm -rf conftest*
4196 if test $ac_cv_sys_file_offset_bits = unknown; then
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4198$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4199if test "${ac_cv_sys_large_files+set}" = set; then :
4200 $as_echo_n "(cached) " >&6
4201else
4202 while :; do
4203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4204/* end confdefs.h. */
4205#include <sys/types.h>
4206 /* Check that off_t can represent 2**63 - 1 correctly.
4207 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4208 since some C++ compilers masquerading as C compilers
4209 incorrectly reject 9223372036854775807. */
4210#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4211 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4212 && LARGE_OFF_T % 2147483647 == 1)
4213 ? 1 : -1];
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
4222if ac_fn_c_try_compile "$LINENO"; then :
4223 ac_cv_sys_large_files=no; break
4224fi
4225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228#define _LARGE_FILES 1
4229#include <sys/types.h>
4230 /* Check that off_t can represent 2**63 - 1 correctly.
4231 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4232 since some C++ compilers masquerading as C compilers
4233 incorrectly reject 9223372036854775807. */
4234#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4235 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4236 && LARGE_OFF_T % 2147483647 == 1)
4237 ? 1 : -1];
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246if ac_fn_c_try_compile "$LINENO"; then :
4247 ac_cv_sys_large_files=1; break
4248fi
4249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250 ac_cv_sys_large_files=unknown
4251 break
4252done
4253fi
4254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4255$as_echo "$ac_cv_sys_large_files" >&6; }
4256case $ac_cv_sys_large_files in #(
4257 no | unknown) ;;
4258 *)
4259cat >>confdefs.h <<_ACEOF
4260#define _LARGE_FILES $ac_cv_sys_large_files
4261_ACEOF
4262;;
4263esac
4264rm -rf conftest*
4265 fi
4266fi
4267
4268
4269
81ecdfbb
RW
4270
4271
4272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4273$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4274if test "${am_cv_prog_cc_stdc+set}" = set; then :
4275 $as_echo_n "(cached) " >&6
4276else
4277 am_cv_prog_cc_stdc=no
4278ac_save_CC="$CC"
4279# Don't try gcc -ansi; that turns off useful extensions and
4280# breaks some systems' header files.
4281# AIX -qlanglvl=ansi
4282# Ultrix and OSF/1 -std1
4283# HP-UX 10.20 and later -Ae
4284# HP-UX older versions -Aa -D_HPUX_SOURCE
4285# SVR4 -Xc -D__EXTENSIONS__
4286for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4287do
783e057b 4288 CC="$ac_save_CC $ac_arg"
81ecdfbb 4289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4290/* end confdefs.h. */
4291#include <stdarg.h>
4292#include <stdio.h>
4293#include <sys/types.h>
4294#include <sys/stat.h>
4295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
4313int test (int i, double x);
4314struct s1 {int (*f) (int a);};
4315struct s2 {int (*f) (double a);};
4316int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4317int argc;
4318char **argv;
4319
4320int
4321main ()
4322{
4323
4324return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4325
4326 ;
4327 return 0;
4328}
4329_ACEOF
81ecdfbb 4330if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4331 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4332fi
81ecdfbb 4333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4334done
4335CC="$ac_save_CC"
4336
4337fi
4338
4339if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; }
783e057b 4342else
81ecdfbb
RW
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4344$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4345fi
4346case "x$am_cv_prog_cc_stdc" in
4347 x|xno) ;;
4348 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4349esac
4350
4351
4352ac_aux_dir=
81ecdfbb
RW
4353for ac_dir in .. "$srcdir"/..; do
4354 for ac_t in install-sh install.sh shtool; do
4355 if test -f "$ac_dir/$ac_t"; then
4356 ac_aux_dir=$ac_dir
4357 ac_install_sh="$ac_aux_dir/$ac_t -c"
4358 break 2
4359 fi
4360 done
783e057b
DJ
4361done
4362if test -z "$ac_aux_dir"; then
81ecdfbb 4363 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4364fi
81ecdfbb
RW
4365
4366# These three variables are undocumented and unsupported,
4367# and are intended to be withdrawn in a future Autoconf release.
4368# They can cause serious problems if a builder's source tree is in a directory
4369# whose full name contains unusual characters.
4370ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4371ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4372ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4373
783e057b 4374
783e057b 4375
81ecdfbb 4376
a417dc56
RW
4377# Dependency checking.
4378rm -rf .tst 2>/dev/null
4379mkdir .tst 2>/dev/null
4380if test -d .tst; then
4381 am__leading_dot=.
4382else
4383 am__leading_dot=_
4384fi
4385rmdir .tst 2>/dev/null
4386
4387DEPDIR="${am__leading_dot}deps"
4388
81ecdfbb 4389ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4390
4391
4392depcc="$CC" am_compiler_list=
4393
4394am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4396$as_echo_n "checking dependency style of $depcc... " >&6; }
4397if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4398 $as_echo_n "(cached) " >&6
a417dc56
RW
4399else
4400 if test -f "$am_depcomp"; then
4401 # We make a subdir and do the tests there. Otherwise we can end up
4402 # making bogus files that we don't know about and never remove. For
4403 # instance it was reported that on HP-UX the gcc test will end up
4404 # making a dummy file named `D' -- because `-MD' means `put the output
4405 # in D'.
4406 mkdir conftest.dir
4407 # Copy depcomp to subdir because otherwise we won't find it if we're
4408 # using a relative directory.
4409 cp "$am_depcomp" conftest.dir
4410 cd conftest.dir
4411 # We will build objects and dependencies in a subdirectory because
4412 # it helps to detect inapplicable dependency modes. For instance
4413 # both Tru64's cc and ICC support -MD to output dependencies as a
4414 # side effect of compilation, but ICC will put the dependencies in
4415 # the current directory while Tru64 will put them in the object
4416 # directory.
4417 mkdir sub
4418
4419 am_cv_CC_dependencies_compiler_type=none
4420 if test "$am_compiler_list" = ""; then
4421 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4422 fi
4423 for depmode in $am_compiler_list; do
4424 if test $depmode = none; then break; fi
4425
81ecdfbb 4426 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4427 # Setup a source with many dependencies, because some compilers
4428 # like to wrap large dependency lists on column 80 (with \), and
4429 # we should not choose a depcomp mode which is confused by this.
4430 #
4431 # We need to recreate these files for each test, as the compiler may
4432 # overwrite some of them when testing with obscure command lines.
4433 # This happens at least with the AIX C compiler.
4434 : > sub/conftest.c
4435 for i in 1 2 3 4 5 6; do
4436 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4437 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4438 # Solaris 8's {/usr,}/bin/sh.
4439 touch sub/conftst$i.h
4440 done
4441 echo "include sub/conftest.Po" > confmf
4442
4443 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4444 # mode. It turns out that the SunPro C++ compiler does not properly
4445 # handle `-M -o', and we need to detect this.
4446 depcmd="depmode=$depmode \
4447 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4448 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4449 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4450 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4451 if env $depcmd > conftest.err 2>&1 &&
4452 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4453 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4454 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4455 # icc doesn't choke on unknown options, it will just issue warnings
4456 # or remarks (even with -Werror). So we grep stderr for any message
4457 # that says an option was ignored or not supported.
4458 # When given -MP, icc 7.0 and 7.1 complain thusly:
4459 # icc: Command line warning: ignoring option '-M'; no argument required
4460 # The diagnosis changed in icc 8.0:
4461 # icc: Command line remark: option '-MP' not supported
4462 if (grep 'ignoring option' conftest.err ||
4463 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4464 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4465 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4466 break
4467 fi
4468 fi
81ecdfbb 4469 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4470 sed -e 's/^/| /' < conftest.err >&5
4471 done
4472
4473 cd ..
4474 rm -rf conftest.dir
4475else
4476 am_cv_CC_dependencies_compiler_type=none
4477fi
4478
4479fi
81ecdfbb
RW
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4481$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4482if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4483then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4484else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4485
4486fi
4487
4488
4489# Check for the 'make' the user wants to use.
4490for ac_prog in make
4491do
4492 # Extract the first word of "$ac_prog", so it can be a program name with args.
4493set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4495$as_echo_n "checking for $ac_word... " >&6; }
4496if test "${ac_cv_prog_MAKE+set}" = set; then :
4497 $as_echo_n "(cached) " >&6
a417dc56
RW
4498else
4499 if test -n "$MAKE"; then
4500 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4501else
4502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH
4504do
4505 IFS=$as_save_IFS
4506 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4507 for ac_exec_ext in '' $ac_executable_extensions; do
4508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4509 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4511 break 2
4512 fi
4513done
81ecdfbb
RW
4514 done
4515IFS=$as_save_IFS
a417dc56
RW
4516
4517fi
4518fi
4519MAKE=$ac_cv_prog_MAKE
4520if test -n "$MAKE"; then
81ecdfbb
RW
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4522$as_echo "$MAKE" >&6; }
a417dc56 4523else
81ecdfbb
RW
4524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4525$as_echo "no" >&6; }
a417dc56
RW
4526fi
4527
81ecdfbb 4528
a417dc56
RW
4529 test -n "$MAKE" && break
4530done
4531
4532MAKE_IS_GNU=
4533case "`$MAKE --version 2>&1 | sed 1q`" in
4534 *GNU*)
4535 MAKE_IS_GNU=yes
4536 ;;
4537esac
81ecdfbb 4538 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4539 GMAKE_TRUE=
4540 GMAKE_FALSE='#'
4541else
4542 GMAKE_TRUE='#'
4543 GMAKE_FALSE=
4544fi
4545
81ecdfbb
RW
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4547$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4548set x ${MAKE-make}
4549ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4550if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4551 $as_echo_n "(cached) " >&6
a417dc56
RW
4552else
4553 cat >conftest.make <<\_ACEOF
81ecdfbb 4554SHELL = /bin/sh
a417dc56 4555all:
81ecdfbb 4556 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4557_ACEOF
4558# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4559case `${MAKE-make} -f conftest.make 2>/dev/null` in
4560 *@@@%%%=?*=@@@%%%*)
4561 eval ac_cv_prog_make_${ac_make}_set=yes;;
4562 *)
4563 eval ac_cv_prog_make_${ac_make}_set=no;;
4564esac
a417dc56
RW
4565rm -f conftest.make
4566fi
81ecdfbb
RW
4567if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4569$as_echo "yes" >&6; }
a417dc56
RW
4570 SET_MAKE=
4571else
81ecdfbb
RW
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
a417dc56
RW
4574 SET_MAKE="MAKE=${MAKE-make}"
4575fi
4576
4577
c971b7fa
PA
4578# Configure gnulib. We need to build gnulib under some other
4579# directory not "gnulib", to avoid the problem of both GDB and
4580# GDBserver wanting to build it in the same directory, when building
4581# in the source dir.
783e057b 4582
c971b7fa
PA
4583 in_src="gnulib"
4584 in_build="build-gnulib"
4585
4586 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4587 # so they do not pile up.
4588 ac_sub_configure_args=
4589 ac_prev=
4590 eval "set x $ac_configure_args"
4591 shift
4592 for ac_arg
4593 do
4594 if test -n "$ac_prev"; then
4595 ac_prev=
4596 continue
4597 fi
4598 case $ac_arg in
4599 -cache-file | --cache-file | --cache-fil | --cache-fi \
4600 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4601 ac_prev=cache_file ;;
4602 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4603 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4604 | --c=*)
4605 ;;
4606 --config-cache | -C)
4607 ;;
4608 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4609 ac_prev=srcdir ;;
4610 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4611 ;;
4612 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4613 ac_prev=prefix ;;
4614 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4615 ;;
4616 --disable-option-checking)
4617 ;;
4618 *)
4619 case $ac_arg in
4620 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4621 esac
4622 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4623 esac
4624 done
4625
4626 # Always prepend --prefix to ensure using the same prefix
4627 # in subdir configurations.
4628 ac_arg="--prefix=$prefix"
4629 case $ac_arg in
4630 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4631 esac
4632 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4633
4634 # Pass --silent
4635 if test "$silent" = yes; then
4636 ac_sub_configure_args="--silent $ac_sub_configure_args"
4637 fi
4638
4639 # Always prepend --disable-option-checking to silence warnings, since
4640 # different subdirs can have different --enable and --with options.
4641 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4642
4643 ac_popdir=`pwd`
4644 ac_dir=$in_build
4645
4646 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4648 $as_echo "$ac_msg" >&6
4649 as_dir="$ac_dir"; as_fn_mkdir_p
4650
38ea300a
PA
4651 case $srcdir in
4652 [\\/]* | ?:[\\/]* )
4653 ac_srcdir=$srcdir/$in_src ;;
4654 *) # Relative name.
4655 ac_srcdir=../$srcdir/$in_src ;;
4656 esac
c971b7fa
PA
4657
4658 cd "$ac_dir"
4659
4660 ac_sub_configure=$ac_srcdir/configure
4661
4662 # Make the cache file name correct relative to the subdirectory.
4663 case $cache_file in
4664 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4665 *) # Relative name.
4666 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4667 esac
4668
4669 { $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
4670$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4671 # The eval makes quoting arguments work.
4672 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4673 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4674 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4675
4676 cd "$ac_popdir"
783e057b 4677
c971b7fa
PA
4678
4679
4680CONFIG_OBS=
4681CONFIG_DEPS=
4682CONFIG_SRCS=
4683ENABLE_CFLAGS=
4684
4685CONFIG_ALL=
4686CONFIG_CLEAN=
4687CONFIG_INSTALL=
4688CONFIG_UNINSTALL=
4689
4690# If we haven't got the data from the intl directory,
4691# assume NLS is disabled.
4692USE_NLS=no
4693LIBINTL=
4694LIBINTL_DEP=
4695INCINTL=
4696XGETTEXT=
4697GMSGFMT=
4698POSUB=
783e057b
DJ
4699
4700if test -f ../intl/config.intl; then
4701 . ../intl/config.intl
4702fi
81ecdfbb
RW
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4704$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4705if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
783e057b 4708else
81ecdfbb
RW
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4710$as_echo "yes" >&6; }
783e057b 4711
81ecdfbb 4712$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4713
4714
81ecdfbb
RW
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4716$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4717 # Look for .po and .gmo files in the source directory.
4718 CATALOGS=
4719 XLINGUAS=
4720 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4721 # If there aren't any .gmo files the shell will give us the
4722 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4723 # weeded out.
4724 case "$cat" in *\**)
4725 continue;;
4726 esac
4727 # The quadruple backslash is collapsed to a double backslash
4728 # by the backticks, then collapsed again by the double quotes,
4729 # leaving us with one backslash in the sed expression (right
4730 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4731 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4732 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4733 # The user is allowed to set LINGUAS to a list of languages to
4734 # install catalogs for. If it's empty that means "all of them."
4735 if test "x$LINGUAS" = x; then
4736 CATALOGS="$CATALOGS $cat"
4737 XLINGUAS="$XLINGUAS $lang"
4738 else
4739 case "$LINGUAS" in *$lang*)
4740 CATALOGS="$CATALOGS $cat"
4741 XLINGUAS="$XLINGUAS $lang"
4742 ;;
4743 esac
e28b3332
DJ
4744 fi
4745 done
c971b7fa
PA
4746 LINGUAS="$XLINGUAS"
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4748$as_echo "$LINGUAS" >&6; }
4749
4750
4751 DATADIRNAME=share
4752
4753 INSTOBJEXT=.mo
4754
4755 GENCAT=gencat
4756
4757 CATOBJEXT=.gmo
e28b3332 4758
e28b3332
DJ
4759fi
4760
c971b7fa
PA
4761localedir='${datadir}/locale'
4762
4763
4764if test x"$USE_NLS" = xyes; then
4765 CONFIG_ALL="$CONFIG_ALL all-po"
4766 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4767 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4768 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4769fi
e28b3332 4770
c971b7fa
PA
4771GNULIB=build-gnulib/import
4772
4773# For Makefile dependencies.
4774GNULIB_STDINT_H=
4775if test x"$STDINT_H" != x; then
4776 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4777fi
4778
4779
c971b7fa
PA
4780PACKAGE=gdb
4781
4782cat >>confdefs.h <<_ACEOF
4783#define PACKAGE "$PACKAGE"
4784_ACEOF
4785
4786
4787
4788# We never need to detect it in this sub-configure.
4789# But preserve it for config.status --recheck.
4790
4791
4792
4793MAKEINFO_EXTRA_FLAGS=""
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4795$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4796if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4797 $as_echo_n "(cached) " >&6
4798else
4799 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4800 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4801 gdb_cv_have_makeinfo_click=yes
4802 else
4803 gdb_cv_have_makeinfo_click=no
4804 fi
4805fi
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4807$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4808if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4809 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4810fi
e28b3332
DJ
4811
4812
bec39cab
AC
4813
4814
81ecdfbb
RW
4815# Check whether --with-separate-debug-dir was given.
4816if test "${with_separate_debug_dir+set}" = set; then :
4817 withval=$with_separate_debug_dir;
b14b1491
TT
4818 DEBUGDIR=$withval
4819else
4820 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4821fi
4822
20e95c23 4823
783e057b
DJ
4824 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4825 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4826 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4827 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4828
783e057b
DJ
4829cat >>confdefs.h <<_ACEOF
4830#define DEBUGDIR "$ac_define_dir"
20e95c23 4831_ACEOF
20e95c23 4832
20e95c23 4833
20e95c23 4834
0c4a4063 4835
b14b1491
TT
4836 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4837 if test "x$prefix" = xNONE; then
4838 test_prefix=/usr/local
4839 else
4840 test_prefix=$prefix
4841 fi
783e057b 4842 else
b14b1491 4843 test_prefix=$exec_prefix
783e057b 4844 fi
b14b1491
TT
4845 value=0
4846 case ${ac_define_dir} in
4847 "${test_prefix}"|"${test_prefix}/"*|\
4848 '${exec_prefix}'|'${exec_prefix}/'*)
4849 value=1
4850 ;;
4851 esac
4852
4853cat >>confdefs.h <<_ACEOF
4854#define DEBUGDIR_RELOCATABLE $value
4855_ACEOF
4856
4857
4858
0c4a4063 4859
f83d8a90
DE
4860# We can't pass paths as command line arguments.
4861# Mingw32 tries to be clever and will convert the paths for us.
4862# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4863# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4864# This breaks GDB's relocatable path conversions since paths passed in
4865# config.h would not get so translated, the path prefixes no longer match.
4866
4867 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4868 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4869 ac_define_dir=`eval echo $bindir`
4870 ac_define_dir=`eval echo $ac_define_dir`
4871
4872cat >>confdefs.h <<_ACEOF
4873#define BINDIR "$ac_define_dir"
4874_ACEOF
4875
4876
4877
b14b1491
TT
4878# GDB's datadir relocation
4879
4880
4881
81ecdfbb
RW
4882# Check whether --with-gdb-datadir was given.
4883if test "${with_gdb_datadir+set}" = set; then :
4884 withval=$with_gdb_datadir;
b14b1491 4885 GDB_DATADIR=$withval
20e95c23 4886else
b14b1491 4887 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4888fi
4889
20e95c23 4890
b14b1491
TT
4891 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4892 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4893 ac_define_dir=`eval echo $GDB_DATADIR`
4894 ac_define_dir=`eval echo $ac_define_dir`
4895
4896cat >>confdefs.h <<_ACEOF
4897#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4898_ACEOF
4899
b14b1491
TT
4900
4901
0c4a4063 4902
b14b1491
TT
4903 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4904 if test "x$prefix" = xNONE; then
4905 test_prefix=/usr/local
4906 else
4907 test_prefix=$prefix
4908 fi
4909 else
4910 test_prefix=$exec_prefix
4911 fi
4912 value=0
4913 case ${ac_define_dir} in
4914 "${test_prefix}"|"${test_prefix}/"*|\
4915 '${exec_prefix}'|'${exec_prefix}/'*)
4916 value=1
4917 ;;
4918 esac
4919
4920cat >>confdefs.h <<_ACEOF
4921#define GDB_DATADIR_RELOCATABLE $value
4922_ACEOF
4923
4924
783e057b 4925
20e95c23 4926
0c4a4063 4927
81ecdfbb
RW
4928# Check whether --with-relocated-sources was given.
4929if test "${with_relocated_sources+set}" = set; then :
4930 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4931
4932 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4933 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4934 ac_define_dir=`eval echo $reloc_srcdir`
4935 ac_define_dir=`eval echo $ac_define_dir`
4936
4937cat >>confdefs.h <<_ACEOF
4938#define RELOC_SRCDIR "$ac_define_dir"
4939_ACEOF
4940
4941
4942
81ecdfbb
RW
4943fi
4944
29b0e8a2 4945
bccbefd2
JK
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
4947$as_echo_n "checking for default auto-load safe-path... " >&6; }
4948
4949# Check whether --with-auto-load-safe-path was given.
4950if test "${with_auto_load_safe_path+set}" = set; then :
4951 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
4952 with_auto_load_safe_path=""
4953 fi
4954else
4955 with_auto_load_safe_path="$prefix"
4956fi
4957
4958
4959 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4960 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4961 ac_define_dir=`eval echo $with_auto_load_safe_path`
4962 ac_define_dir=`eval echo $ac_define_dir`
4963
4964cat >>confdefs.h <<_ACEOF
4965#define DEFAULT_AUTO_LOAD_SAFE_PATH "$ac_define_dir"
4966_ACEOF
4967
4968
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
4970$as_echo "$with_auto_load_safe_path" >&6; }
4971
29b0e8a2 4972
20e95c23 4973
5ae98d25 4974subdirs="$subdirs testsuite"
20e95c23
DJ
4975
4976
783e057b 4977# Check whether to support alternative target configurations
81ecdfbb
RW
4978# Check whether --enable-targets was given.
4979if test "${enable_targets+set}" = set; then :
4980 enableval=$enable_targets; case "${enableval}" in
4981 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
4982 ;;
4983 no) enable_targets= ;;
4984 *) enable_targets=$enableval ;;
4985esac
81ecdfbb
RW
4986fi
4987
20e95c23 4988
783e057b 4989# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
4990# Check whether --enable-64-bit-bfd was given.
4991if test "${enable_64_bit_bfd+set}" = set; then :
4992 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
4993 yes) want64=true ;;
4994 no) want64=false ;;
81ecdfbb 4995 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
4996esac
4997else
4998 want64=false
81ecdfbb
RW
4999fi
5000
783e057b
DJ
5001# Provide defaults for some variables set by the per-host and per-target
5002# configuration.
5003gdb_host_obs=posix-hdep.o
20e95c23 5004
783e057b
DJ
5005if test "${target}" = "${host}"; then
5006 gdb_native=yes
5007else
5008 gdb_native=no
5009fi
20e95c23 5010
783e057b 5011. $srcdir/configure.host
20e95c23 5012
783e057b 5013# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5014
783e057b
DJ
5015TARGET_OBS=
5016all_targets=
20e95c23 5017
783e057b 5018for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5019do
783e057b
DJ
5020 if test "$targ_alias" = "all"; then
5021 all_targets=true
5022 else
5023 # Canonicalize the secondary target names.
5024 result=`$ac_config_sub $targ_alias 2>/dev/null`
5025 if test -n "$result"; then
5026 targ=$result
5027 else
5028 targ=$targ_alias
5029 fi
20e95c23 5030
783e057b 5031 . ${srcdir}/configure.tgt
20e95c23 5032
bf307134
JB
5033 if test -z "${gdb_target_obs}"; then :
5034 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5035fi
5036
783e057b
DJ
5037 # Target-specific object files
5038 for i in ${gdb_target_obs}; do
5039 case " $TARGET_OBS " in
5040 *" ${i} "*) ;;
5041 *)
5042 TARGET_OBS="$TARGET_OBS ${i}"
5043 ;;
5044 esac
5045 done
20e95c23 5046
783e057b
DJ
5047 # Check whether this target needs 64-bit CORE_ADDR
5048 if test x${want64} = xfalse; then
5049 . ${srcdir}/../bfd/config.bfd
5050 fi
5051 fi
20e95c23
DJ
5052done
5053
783e057b
DJ
5054if test x${all_targets} = xtrue; then
5055
5056 # We want all 64-bit targets if we either:
5057 # - run on a 64-bit host or
5058 # - already require 64-bit support for some other target or
5059 # - the --enable-64-bit-bfd option was supplied
5060 # Otherwise we only support all 32-bit targets.
5061 #
5062 # NOTE: This test must be in sync with the corresponding
5063 # tests in BFD!
20e95c23 5064
783e057b 5065 if test x${want64} = xfalse; then
81ecdfbb
RW
5066 # The cast to long int works around a bug in the HP C Compiler
5067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5069# This bug is HP SR number 8606223364.
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5071$as_echo_n "checking size of long... " >&6; }
5072if test "${ac_cv_sizeof_long+set}" = set; then :
5073 $as_echo_n "(cached) " >&6
c0993dbe 5074else
81ecdfbb 5075 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5076
81ecdfbb
RW
5077else
5078 if test "$ac_cv_type_long" = yes; then
5079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5081{ as_fn_set_status 77
5082as_fn_error "cannot compute sizeof (long)
5083See \`config.log' for more details." "$LINENO" 5; }; }
5084 else
5085 ac_cv_sizeof_long=0
5086 fi
c0993dbe 5087fi
81ecdfbb 5088
c0993dbe 5089fi
81ecdfbb
RW
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5091$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5092
c0993dbe 5093
c0993dbe 5094
c0993dbe
UW
5095cat >>confdefs.h <<_ACEOF
5096#define SIZEOF_LONG $ac_cv_sizeof_long
5097_ACEOF
5098
5099
5100 if test "x${ac_cv_sizeof_long}" = "x8"; then
5101 want64=true
5102 fi
5103 fi
5104 if test x${want64} = xtrue; then
5105 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5106 else
5107 TARGET_OBS='$(ALL_TARGET_OBS)'
5108 fi
5109fi
5110
5111
5112
5113# For other settings, only the main target counts.
5114gdb_sim=
5115gdb_osabi=
5116build_gdbserver=
5117targ=$target; . ${srcdir}/configure.tgt
5118
5119# Fetch the default architecture and default target vector from BFD.
5120targ=$target; . $srcdir/../bfd/config.bfd
5121
5122# We only want the first architecture, so strip off the others if
5123# there is more than one.
5124targ_archs=`echo $targ_archs | sed 's/ .*//'`
5125
5126if test "x$targ_archs" != x; then
5127
5128cat >>confdefs.h <<_ACEOF
5129#define DEFAULT_BFD_ARCH $targ_archs
5130_ACEOF
5131
5132fi
5133if test "x$targ_defvec" != x; then
5134
5135cat >>confdefs.h <<_ACEOF
5136#define DEFAULT_BFD_VEC $targ_defvec
5137_ACEOF
5138
5139fi
5140
c0993dbe
UW
5141# The CLI cannot be disabled yet, but may be in the future.
5142
5143# Enable CLI.
81ecdfbb
RW
5144# Check whether --enable-gdbcli was given.
5145if test "${enable_gdbcli+set}" = set; then :
5146 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5147 yes)
5148 ;;
5149 no)
81ecdfbb 5150 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5151 *)
81ecdfbb 5152 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5153 esac
5154else
5155 enable_gdbcli=yes
81ecdfbb
RW
5156fi
5157
c0993dbe
UW
5158if test x"$enable_gdbcli" = xyes; then
5159 if test -d $srcdir/cli; then
5160 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5161 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5162 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5163 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5164 fi
5165fi
5166
5167# Enable MI.
81ecdfbb
RW
5168# Check whether --enable-gdbmi was given.
5169if test "${enable_gdbmi+set}" = set; then :
5170 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5171 yes | no)
5172 ;;
5173 *)
81ecdfbb 5174 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5175 esac
5176else
5177 enable_gdbmi=yes
81ecdfbb
RW
5178fi
5179
c0993dbe
UW
5180if test x"$enable_gdbmi" = xyes; then
5181 if test -d $srcdir/mi; then
5182 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5183 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5184 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5185 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5186 fi
5187fi
5188
5189# Enable TUI.
81ecdfbb
RW
5190# Check whether --enable-tui was given.
5191if test "${enable_tui+set}" = set; then :
5192 enableval=$enable_tui; case $enableval in
3ca64bd3 5193 yes | no | auto)
c0993dbe
UW
5194 ;;
5195 *)
81ecdfbb 5196 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5197 esac
5198else
3ca64bd3 5199 enable_tui=auto
81ecdfbb
RW
5200fi
5201
c0993dbe
UW
5202
5203# Enable gdbtk.
81ecdfbb
RW
5204# Check whether --enable-gdbtk was given.
5205if test "${enable_gdbtk+set}" = set; then :
5206 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5207 yes | no)
5208 ;;
5209 *)
81ecdfbb 5210 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5211 esac
5212else
5062cc19 5213 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5214 enable_gdbtk=yes
5215 else
5216 enable_gdbtk=no
5217 fi
81ecdfbb
RW
5218fi
5219
c0993dbe
UW
5220# We unconditionally disable gdbtk tests on selected platforms.
5221case $host_os in
5222 go32* | windows*)
81ecdfbb
RW
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5224$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5225 enable_gdbtk=no ;;
5226esac
5227
05e7c244 5228# Libunwind support for ia64.
bec39cab 5229
05e7c244
JK
5230
5231# Check whether --with-libunwind-ia64 was given.
5232if test "${with_libunwind_ia64+set}" = set; then :
5233 withval=$with_libunwind_ia64;
bec39cab 5234else
05e7c244
JK
5235 with_libunwind_ia64=auto
5236fi
bec39cab 5237
05e7c244
JK
5238
5239# Backward compatibility option.
5240if test "${with_libunwind+set}" = set; then
5241 if test x"$with_libunwind_ia64" != xauto; then
5242 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5243 fi
5244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5245$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5246 with_libunwind_ia64="$with_libunwind"
5247fi
5248
5249case "$with_libunwind_ia64" in
5250 yes | no)
5251 ;;
5252 auto)
5253 for ac_header in libunwind-ia64.h
81ecdfbb 5254do :
b54a8fd7
PA
5255 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5256if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5257 cat >>confdefs.h <<_ACEOF
b54a8fd7 5258#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5259_ACEOF
5260
5261fi
5262
5263done
5264
05e7c244
JK
5265 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5266 ;;
5267 *)
5268 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5269 ;;
5270esac
bec39cab 5271
05e7c244 5272if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5273 for ac_header in libunwind-ia64.h
81ecdfbb 5274do :
b54a8fd7
PA
5275 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5276if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5277 cat >>confdefs.h <<_ACEOF
b54a8fd7 5278#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5279_ACEOF
5280
5281fi
5282
5283done
5284
05e7c244
JK
5285 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5286 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5287 fi
5288 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5289 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5290 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5291fi
5292
cb01cfba
JB
5293opt_curses=no
5294
81ecdfbb
RW
5295# Check whether --with-curses was given.
5296if test "${with_curses+set}" = set; then :
5297 withval=$with_curses; opt_curses=$withval
5298fi
5299
cb01cfba 5300
76a39ba7 5301prefer_curses=no
cb01cfba 5302if test "$opt_curses" = "yes"; then
76a39ba7 5303 prefer_curses=yes
cb01cfba
JB
5304fi
5305
a9322a30 5306# Profiling support.
81ecdfbb
RW
5307# Check whether --enable-profiling was given.
5308if test "${enable_profiling+set}" = set; then :
5309 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5310 yes | no)
5311 ;;
5312 *)
81ecdfbb 5313 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5314 esac
5315else
5316 enable_profiling=no
81ecdfbb 5317fi
bec39cab 5318
a9322a30
TT
5319
5320for ac_func in monstartup _mcleanup
81ecdfbb
RW
5321do :
5322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5323ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5324eval as_val=\$$as_ac_var
5325 if test "x$as_val" = x""yes; then :
5326 cat >>confdefs.h <<_ACEOF
5327#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5328_ACEOF
a9322a30 5329
81ecdfbb
RW
5330fi
5331done
a9322a30 5332
81ecdfbb
RW
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5334$as_echo_n "checking for _etext... " >&6; }
5335if test "${ac_cv_var__etext+set}" = set; then :
5336 $as_echo_n "(cached) " >&6
5337else
5338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5339/* end confdefs.h. */
5340#include <stdlib.h>
5341extern char _etext;
a9322a30
TT
5342
5343int
5344main ()
5345{
5346free (&_etext);
5347 ;
5348 return 0;
5349}
bec39cab 5350_ACEOF
81ecdfbb 5351if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5352 ac_cv_var__etext=yes
bec39cab 5353else
81ecdfbb 5354 ac_cv_var__etext=no
bec39cab 5355fi
81ecdfbb
RW
5356rm -f core conftest.err conftest.$ac_objext \
5357 conftest$ac_exeext conftest.$ac_ext
bec39cab 5358fi
81ecdfbb
RW
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5360$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5361if test $ac_cv_var__etext = yes; then
60ca704f 5362
81ecdfbb 5363$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5364
bec39cab 5365fi
81ecdfbb
RW
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5367$as_echo_n "checking for etext... " >&6; }
5368if test "${ac_cv_var_etext+set}" = set; then :
5369 $as_echo_n "(cached) " >&6
bec39cab 5370else
81ecdfbb 5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5372/* end confdefs.h. */
a9322a30
TT
5373#include <stdlib.h>
5374extern char etext;
bec39cab
AC
5375
5376int
5377main ()
5378{
a9322a30 5379free (&etext);
bec39cab
AC
5380 ;
5381 return 0;
5382}
5383_ACEOF
81ecdfbb 5384if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5385 ac_cv_var_etext=yes
bec39cab 5386else
81ecdfbb 5387 ac_cv_var_etext=no
bec39cab 5388fi
81ecdfbb
RW
5389rm -f core conftest.err conftest.$ac_objext \
5390 conftest$ac_exeext conftest.$ac_ext
bec39cab 5391fi
81ecdfbb
RW
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5393$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5394if test $ac_cv_var_etext = yes; then
5395
81ecdfbb 5396$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5397
5398fi
a9322a30
TT
5399if test "$enable_profiling" = yes ; then
5400 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5401 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5402 fi
5403 PROFILE_CFLAGS=-pg
5404 OLD_CFLAGS="$CFLAGS"
5405 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5406
81ecdfbb
RW
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5408$as_echo_n "checking whether $CC supports -pg... " >&6; }
5409if test "${ac_cv_cc_supports_pg+set}" = set; then :
5410 $as_echo_n "(cached) " >&6
bec39cab 5411else
81ecdfbb 5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5413/* end confdefs.h. */
bec39cab
AC
5414
5415int
5416main ()
5417{
a9322a30 5418int x;
bec39cab
AC
5419 ;
5420 return 0;
5421}
5422_ACEOF
81ecdfbb 5423if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5424 ac_cv_cc_supports_pg=yes
bec39cab 5425else
81ecdfbb 5426 ac_cv_cc_supports_pg=no
bec39cab 5427fi
81ecdfbb 5428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5429fi
81ecdfbb
RW
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5431$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5432
a9322a30 5433 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5434 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5435 fi
bec39cab 5436
a9322a30 5437 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5438fi
5439
c16158bc
JM
5440
5441
81ecdfbb
RW
5442# Check whether --with-pkgversion was given.
5443if test "${with_pkgversion+set}" = set; then :
5444 withval=$with_pkgversion; case "$withval" in
5445 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5446 no) PKGVERSION= ;;
5447 *) PKGVERSION="($withval) " ;;
5448 esac
5449else
5450 PKGVERSION="(GDB) "
5451
81ecdfbb 5452fi
c16158bc
JM
5453
5454
5455
5456
81ecdfbb
RW
5457
5458# Check whether --with-bugurl was given.
5459if test "${with_bugurl+set}" = set; then :
5460 withval=$with_bugurl; case "$withval" in
5461 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5462 no) BUGURL=
5463 ;;
5464 *) BUGURL="$withval"
5465 ;;
5466 esac
5467else
5468 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5469
81ecdfbb
RW
5470fi
5471
c16158bc
JM
5472 case ${BUGURL} in
5473 "")
5474 REPORT_BUGS_TO=
5475 REPORT_BUGS_TEXI=
5476 ;;
5477 *)
5478 REPORT_BUGS_TO="<$BUGURL>"
5479 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5480 ;;
5481 esac;
5482
5483
5484
5485
5486cat >>confdefs.h <<_ACEOF
5487#define PKGVERSION "$PKGVERSION"
5488_ACEOF
5489
5490
5491cat >>confdefs.h <<_ACEOF
5492#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5493_ACEOF
5494
5495
bec39cab
AC
5496# --------------------- #
5497# Checks for programs. #
5498# --------------------- #
5499
5500for ac_prog in gawk mawk nawk awk
5501do
5502 # Extract the first word of "$ac_prog", so it can be a program name with args.
5503set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5505$as_echo_n "checking for $ac_word... " >&6; }
5506if test "${ac_cv_prog_AWK+set}" = set; then :
5507 $as_echo_n "(cached) " >&6
bec39cab
AC
5508else
5509 if test -n "$AWK"; then
5510 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5511else
5512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513for as_dir in $PATH
5514do
5515 IFS=$as_save_IFS
5516 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5517 for ac_exec_ext in '' $ac_executable_extensions; do
5518 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5519 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5521 break 2
5522 fi
5523done
81ecdfbb
RW
5524 done
5525IFS=$as_save_IFS
bec39cab
AC
5526
5527fi
5528fi
5529AWK=$ac_cv_prog_AWK
5530if test -n "$AWK"; then
81ecdfbb
RW
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5532$as_echo "$AWK" >&6; }
bec39cab 5533else
81ecdfbb
RW
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535$as_echo "no" >&6; }
bec39cab
AC
5536fi
5537
bec39cab 5538
81ecdfbb 5539 test -n "$AWK" && break
bec39cab
AC
5540done
5541
c971b7fa
PA
5542# Find a good install program. We prefer a C program (faster),
5543# so one script is as good as another. But avoid the broken or
5544# incompatible versions:
5545# SysV /etc/install, /usr/sbin/install
5546# SunOS /usr/etc/install
5547# IRIX /sbin/install
5548# AIX /bin/install
5549# AmigaOS /C/install, which installs bootblocks on floppy discs
5550# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5551# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5552# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5553# OS/2's system install, which has a completely different semantic
5554# ./install, which can be erroneously created by make from ./install.sh.
5555# Reject install programs that cannot install multiple files.
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5557$as_echo_n "checking for a BSD-compatible install... " >&6; }
5558if test -z "$INSTALL"; then
5559if test "${ac_cv_path_install+set}" = set; then :
5560 $as_echo_n "(cached) " >&6
5561else
5562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5563for as_dir in $PATH
5564do
5565 IFS=$as_save_IFS
5566 test -z "$as_dir" && as_dir=.
5567 # Account for people who put trailing slashes in PATH elements.
5568case $as_dir/ in #((
5569 ./ | .// | /[cC]/* | \
5570 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5571 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5572 /usr/ucb/* ) ;;
5573 *)
5574 # OSF1 and SCO ODT 3.0 have their own names for install.
5575 # Don't use installbsd from OSF since it installs stuff as root
5576 # by default.
5577 for ac_prog in ginstall scoinst install; do
5578 for ac_exec_ext in '' $ac_executable_extensions; do
5579 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5580 if test $ac_prog = install &&
5581 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5582 # AIX install. It has an incompatible calling convention.
5583 :
5584 elif test $ac_prog = install &&
5585 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5586 # program-specific install script used by HP pwplus--don't use.
5587 :
5588 else
5589 rm -rf conftest.one conftest.two conftest.dir
5590 echo one > conftest.one
5591 echo two > conftest.two
5592 mkdir conftest.dir
5593 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5594 test -s conftest.one && test -s conftest.two &&
5595 test -s conftest.dir/conftest.one &&
5596 test -s conftest.dir/conftest.two
5597 then
5598 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5599 break 3
5600 fi
5601 fi
5602 fi
5603 done
5604 done
5605 ;;
5606esac
5607
5608 done
5609IFS=$as_save_IFS
5610
5611rm -rf conftest.one conftest.two conftest.dir
5612
5613fi
5614 if test "${ac_cv_path_install+set}" = set; then
5615 INSTALL=$ac_cv_path_install
5616 else
5617 # As a last resort, use the slow shell script. Don't cache a
5618 # value for INSTALL within a source directory, because that will
5619 # break other packages using the cache if that directory is
5620 # removed, or if the value is a relative name.
5621 INSTALL=$ac_install_sh
5622 fi
5623fi
5624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5625$as_echo "$INSTALL" >&6; }
5626
5627# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5628# It thinks the first close brace ends the variable substitution.
5629test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5630
5631test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5632
5633test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5634
81ecdfbb
RW
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5636$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5637LN_S=$as_ln_s
5638if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5640$as_echo "yes" >&6; }
bec39cab 5641else
81ecdfbb
RW
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5643$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5644fi
5645
5646if test -n "$ac_tool_prefix"; then
5647 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5648set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5650$as_echo_n "checking for $ac_word... " >&6; }
5651if test "${ac_cv_prog_RANLIB+set}" = set; then :
5652 $as_echo_n "(cached) " >&6
bec39cab
AC
5653else
5654 if test -n "$RANLIB"; then
5655 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5656else
5657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658for as_dir in $PATH
5659do
5660 IFS=$as_save_IFS
5661 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5662 for ac_exec_ext in '' $ac_executable_extensions; do
5663 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5664 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5666 break 2
5667 fi
5668done
81ecdfbb
RW
5669 done
5670IFS=$as_save_IFS
bec39cab
AC
5671
5672fi
5673fi
5674RANLIB=$ac_cv_prog_RANLIB
5675if test -n "$RANLIB"; then
81ecdfbb
RW
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5677$as_echo "$RANLIB" >&6; }
bec39cab 5678else
81ecdfbb
RW
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
bec39cab
AC
5681fi
5682
81ecdfbb 5683
bec39cab
AC
5684fi
5685if test -z "$ac_cv_prog_RANLIB"; then
5686 ac_ct_RANLIB=$RANLIB
5687 # Extract the first word of "ranlib", so it can be a program name with args.
5688set dummy ranlib; ac_word=$2
81ecdfbb
RW
5689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5690$as_echo_n "checking for $ac_word... " >&6; }
5691if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5692 $as_echo_n "(cached) " >&6
bec39cab
AC
5693else
5694 if test -n "$ac_ct_RANLIB"; then
5695 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5696else
5697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700 IFS=$as_save_IFS
5701 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5702 for ac_exec_ext in '' $ac_executable_extensions; do
5703 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5704 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5706 break 2
5707 fi
5708done
81ecdfbb
RW
5709 done
5710IFS=$as_save_IFS
bec39cab 5711
bec39cab
AC
5712fi
5713fi
5714ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5715if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5717$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5718else
81ecdfbb
RW
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
bec39cab
AC
5721fi
5722
81ecdfbb
RW
5723 if test "x$ac_ct_RANLIB" = x; then
5724 RANLIB=":"
5725 else
5726 case $cross_compiling:$ac_tool_warned in
5727yes:)
5728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5730ac_tool_warned=yes ;;
5731esac
5732 RANLIB=$ac_ct_RANLIB
5733 fi
bec39cab
AC
5734else
5735 RANLIB="$ac_cv_prog_RANLIB"
5736fi
5737
5738for ac_prog in 'bison -y' byacc
5739do
5740 # Extract the first word of "$ac_prog", so it can be a program name with args.
5741set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if test "${ac_cv_prog_YACC+set}" = set; then :
5745 $as_echo_n "(cached) " >&6
bec39cab
AC
5746else
5747 if test -n "$YACC"; then
5748 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5749else
5750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751for as_dir in $PATH
5752do
5753 IFS=$as_save_IFS
5754 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5755 for ac_exec_ext in '' $ac_executable_extensions; do
5756 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5757 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5759 break 2
5760 fi
5761done
81ecdfbb
RW
5762 done
5763IFS=$as_save_IFS
bec39cab
AC
5764
5765fi
5766fi
5767YACC=$ac_cv_prog_YACC
5768if test -n "$YACC"; then
81ecdfbb
RW
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5770$as_echo "$YACC" >&6; }
bec39cab 5771else
81ecdfbb
RW
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
bec39cab
AC
5774fi
5775
81ecdfbb 5776
bec39cab
AC
5777 test -n "$YACC" && break
5778done
5779test -n "$YACC" || YACC="yacc"
5780
5781
5782if test -n "$ac_tool_prefix"; then
5783 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5784set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786$as_echo_n "checking for $ac_word... " >&6; }
5787if test "${ac_cv_prog_AR+set}" = set; then :
5788 $as_echo_n "(cached) " >&6
bec39cab
AC
5789else
5790 if test -n "$AR"; then
5791 ac_cv_prog_AR="$AR" # Let the user override the test.
5792else
5793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796 IFS=$as_save_IFS
5797 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5798 for ac_exec_ext in '' $ac_executable_extensions; do
5799 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5800 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5802 break 2
5803 fi
5804done
81ecdfbb
RW
5805 done
5806IFS=$as_save_IFS
bec39cab
AC
5807
5808fi
5809fi
5810AR=$ac_cv_prog_AR
5811if test -n "$AR"; then
81ecdfbb
RW
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5813$as_echo "$AR" >&6; }
bec39cab 5814else
81ecdfbb
RW
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816$as_echo "no" >&6; }
bec39cab
AC
5817fi
5818
81ecdfbb 5819
bec39cab
AC
5820fi
5821if test -z "$ac_cv_prog_AR"; then
5822 ac_ct_AR=$AR
5823 # Extract the first word of "ar", so it can be a program name with args.
5824set dummy ar; ac_word=$2
81ecdfbb
RW
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826$as_echo_n "checking for $ac_word... " >&6; }
5827if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5828 $as_echo_n "(cached) " >&6
bec39cab
AC
5829else
5830 if test -n "$ac_ct_AR"; then
5831 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5832else
5833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5834for as_dir in $PATH
5835do
5836 IFS=$as_save_IFS
5837 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5838 for ac_exec_ext in '' $ac_executable_extensions; do
5839 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5840 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5842 break 2
5843 fi
5844done
81ecdfbb
RW
5845 done
5846IFS=$as_save_IFS
bec39cab
AC
5847
5848fi
5849fi
5850ac_ct_AR=$ac_cv_prog_ac_ct_AR
5851if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5853$as_echo "$ac_ct_AR" >&6; }
bec39cab 5854else
81ecdfbb
RW
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5856$as_echo "no" >&6; }
bec39cab
AC
5857fi
5858
81ecdfbb
RW
5859 if test "x$ac_ct_AR" = x; then
5860 AR=""
5861 else
5862 case $cross_compiling:$ac_tool_warned in
5863yes:)
5864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5866ac_tool_warned=yes ;;
5867esac
5868 AR=$ac_ct_AR
5869 fi
bec39cab
AC
5870else
5871 AR="$ac_cv_prog_AR"
5872fi
5873
5874if test -n "$ac_tool_prefix"; then
5875 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5876set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5878$as_echo_n "checking for $ac_word... " >&6; }
5879if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5880 $as_echo_n "(cached) " >&6
bec39cab
AC
5881else
5882 if test -n "$DLLTOOL"; then
5883 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5884else
5885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5886for as_dir in $PATH
5887do
5888 IFS=$as_save_IFS
5889 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5890 for ac_exec_ext in '' $ac_executable_extensions; do
5891 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5892 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5894 break 2
5895 fi
5896done
81ecdfbb
RW
5897 done
5898IFS=$as_save_IFS
bec39cab
AC
5899
5900fi
5901fi
5902DLLTOOL=$ac_cv_prog_DLLTOOL
5903if test -n "$DLLTOOL"; then
81ecdfbb
RW
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5905$as_echo "$DLLTOOL" >&6; }
bec39cab 5906else
81ecdfbb
RW
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5908$as_echo "no" >&6; }
bec39cab
AC
5909fi
5910
81ecdfbb 5911
bec39cab
AC
5912fi
5913if test -z "$ac_cv_prog_DLLTOOL"; then
5914 ac_ct_DLLTOOL=$DLLTOOL
5915 # Extract the first word of "dlltool", so it can be a program name with args.
5916set dummy dlltool; ac_word=$2
81ecdfbb
RW
5917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5918$as_echo_n "checking for $ac_word... " >&6; }
5919if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5920 $as_echo_n "(cached) " >&6
bec39cab
AC
5921else
5922 if test -n "$ac_ct_DLLTOOL"; then
5923 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5924else
5925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5926for as_dir in $PATH
5927do
5928 IFS=$as_save_IFS
5929 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5930 for ac_exec_ext in '' $ac_executable_extensions; do
5931 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5932 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5934 break 2
5935 fi
5936done
81ecdfbb
RW
5937 done
5938IFS=$as_save_IFS
bec39cab
AC
5939
5940fi
5941fi
5942ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5943if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5945$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 5946else
81ecdfbb
RW
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948$as_echo "no" >&6; }
bec39cab
AC
5949fi
5950
81ecdfbb
RW
5951 if test "x$ac_ct_DLLTOOL" = x; then
5952 DLLTOOL=""
5953 else
5954 case $cross_compiling:$ac_tool_warned in
5955yes:)
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5958ac_tool_warned=yes ;;
5959esac
5960 DLLTOOL=$ac_ct_DLLTOOL
5961 fi
bec39cab
AC
5962else
5963 DLLTOOL="$ac_cv_prog_DLLTOOL"
5964fi
5965
5966if test -n "$ac_tool_prefix"; then
5967 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
5968set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if test "${ac_cv_prog_WINDRES+set}" = set; then :
5972 $as_echo_n "(cached) " >&6
bec39cab
AC
5973else
5974 if test -n "$WINDRES"; then
5975 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5976else
5977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978for as_dir in $PATH
5979do
5980 IFS=$as_save_IFS
5981 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5982 for ac_exec_ext in '' $ac_executable_extensions; do
5983 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5984 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 5985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5986 break 2
5987 fi
5988done
81ecdfbb
RW
5989 done
5990IFS=$as_save_IFS
bec39cab
AC
5991
5992fi
5993fi
5994WINDRES=$ac_cv_prog_WINDRES
5995if test -n "$WINDRES"; then
81ecdfbb
RW
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
5997$as_echo "$WINDRES" >&6; }
bec39cab 5998else
81ecdfbb
RW
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000$as_echo "no" >&6; }
bec39cab
AC
6001fi
6002
81ecdfbb 6003
bec39cab
AC
6004fi
6005if test -z "$ac_cv_prog_WINDRES"; then
6006 ac_ct_WINDRES=$WINDRES
6007 # Extract the first word of "windres", so it can be a program name with args.
6008set dummy windres; ac_word=$2
81ecdfbb
RW
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
6011if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6012 $as_echo_n "(cached) " >&6
bec39cab
AC
6013else
6014 if test -n "$ac_ct_WINDRES"; then
6015 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6022 for ac_exec_ext in '' $ac_executable_extensions; do
6023 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6024 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6026 break 2
6027 fi
6028done
81ecdfbb
RW
6029 done
6030IFS=$as_save_IFS
bec39cab
AC
6031
6032fi
6033fi
6034ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6035if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6037$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6038else
81ecdfbb
RW
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
c906108c 6041fi
bec39cab 6042
81ecdfbb
RW
6043 if test "x$ac_ct_WINDRES" = x; then
6044 WINDRES=""
6045 else
6046 case $cross_compiling:$ac_tool_warned in
6047yes:)
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6050ac_tool_warned=yes ;;
6051esac
6052 WINDRES=$ac_ct_WINDRES
6053 fi
c906108c 6054else
bec39cab 6055 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6056fi
6057
bec39cab
AC
6058
6059# Needed for GNU/Hurd.
6060if test -n "$ac_tool_prefix"; then
6061 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6062set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6064$as_echo_n "checking for $ac_word... " >&6; }
6065if test "${ac_cv_prog_MIG+set}" = set; then :
6066 $as_echo_n "(cached) " >&6
c906108c 6067else
bec39cab
AC
6068 if test -n "$MIG"; then
6069 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6070else
6071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6076 for ac_exec_ext in '' $ac_executable_extensions; do
6077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6078 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6080 break 2
6081 fi
6082done
81ecdfbb
RW
6083 done
6084IFS=$as_save_IFS
bec39cab 6085
c906108c 6086fi
bec39cab
AC
6087fi
6088MIG=$ac_cv_prog_MIG
6089if test -n "$MIG"; then
81ecdfbb
RW
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6091$as_echo "$MIG" >&6; }
c906108c 6092else
81ecdfbb
RW
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094$as_echo "no" >&6; }
c906108c
SS
6095fi
6096
81ecdfbb 6097
bec39cab
AC
6098fi
6099if test -z "$ac_cv_prog_MIG"; then
6100 ac_ct_MIG=$MIG
6101 # Extract the first word of "mig", so it can be a program name with args.
6102set dummy mig; ac_word=$2
81ecdfbb
RW
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6106 $as_echo_n "(cached) " >&6
bec39cab
AC
6107else
6108 if test -n "$ac_ct_MIG"; then
6109 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6116 for ac_exec_ext in '' $ac_executable_extensions; do
6117 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6118 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6120 break 2
6121 fi
6122done
81ecdfbb
RW
6123 done
6124IFS=$as_save_IFS
c906108c 6125
bec39cab
AC
6126fi
6127fi
6128ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6129if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6131$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6132else
81ecdfbb
RW
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
bec39cab 6135fi
c906108c 6136
81ecdfbb
RW
6137 if test "x$ac_ct_MIG" = x; then
6138 MIG=""
6139 else
6140 case $cross_compiling:$ac_tool_warned in
6141yes:)
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6144ac_tool_warned=yes ;;
6145esac
6146 MIG=$ac_ct_MIG
6147 fi
bec39cab
AC
6148else
6149 MIG="$ac_cv_prog_MIG"
6150fi
c906108c 6151
c906108c 6152
bec39cab
AC
6153# ---------------------- #
6154# Checks for libraries. #
6155# ---------------------- #
c906108c 6156
bec39cab 6157# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6159$as_echo_n "checking for main in -lm... " >&6; }
6160if test "${ac_cv_lib_m_main+set}" = set; then :
6161 $as_echo_n "(cached) " >&6
bec39cab
AC
6162else
6163 ac_check_lib_save_LIBS=$LIBS
6164LIBS="-lm $LIBS"
81ecdfbb 6165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6166/* end confdefs.h. */
c906108c 6167
c906108c 6168
bec39cab
AC
6169int
6170main ()
6171{
81ecdfbb 6172return main ();
bec39cab
AC
6173 ;
6174 return 0;
6175}
6176_ACEOF
81ecdfbb 6177if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6178 ac_cv_lib_m_main=yes
6179else
81ecdfbb 6180 ac_cv_lib_m_main=no
bec39cab 6181fi
81ecdfbb
RW
6182rm -f core conftest.err conftest.$ac_objext \
6183 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6184LIBS=$ac_check_lib_save_LIBS
6185fi
81ecdfbb
RW
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6187$as_echo "$ac_cv_lib_m_main" >&6; }
6188if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6189 cat >>confdefs.h <<_ACEOF
6190#define HAVE_LIBM 1
6191_ACEOF
6192
6193 LIBS="-lm $LIBS"
c906108c 6194
c906108c 6195fi
bec39cab
AC
6196
6197
6198# We need to link with -lw to get `wctype' on Solaris before Solaris
6199# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6200# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6201# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6202ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6203if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6204
c906108c 6205else
81ecdfbb
RW
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6207$as_echo_n "checking for wctype in -lw... " >&6; }
6208if test "${ac_cv_lib_w_wctype+set}" = set; then :
6209 $as_echo_n "(cached) " >&6
bec39cab
AC
6210else
6211 ac_check_lib_save_LIBS=$LIBS
6212LIBS="-lw $LIBS"
81ecdfbb 6213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6214/* end confdefs.h. */
c906108c 6215
81ecdfbb
RW
6216/* Override any GCC internal prototype to avoid an error.
6217 Use char because int might match the return type of a GCC
6218 builtin and then its argument prototype would still apply. */
bec39cab
AC
6219#ifdef __cplusplus
6220extern "C"
6221#endif
bec39cab
AC
6222char wctype ();
6223int
6224main ()
6225{
81ecdfbb 6226return wctype ();
bec39cab
AC
6227 ;
6228 return 0;
6229}
6230_ACEOF
81ecdfbb 6231if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6232 ac_cv_lib_w_wctype=yes
6233else
81ecdfbb 6234 ac_cv_lib_w_wctype=no
bec39cab 6235fi
81ecdfbb
RW
6236rm -f core conftest.err conftest.$ac_objext \
6237 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6238LIBS=$ac_check_lib_save_LIBS
6239fi
81ecdfbb
RW
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6241$as_echo "$ac_cv_lib_w_wctype" >&6; }
6242if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6243 cat >>confdefs.h <<_ACEOF
6244#define HAVE_LIBW 1
6245_ACEOF
c906108c 6246
bec39cab 6247 LIBS="-lw $LIBS"
c906108c 6248
bec39cab 6249fi
c906108c 6250
bec39cab 6251fi
c906108c 6252
ddc9cd0f 6253
bec39cab 6254# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6256$as_echo_n "checking for library containing gethostbyname... " >&6; }
6257if test "${ac_cv_search_gethostbyname+set}" = set; then :
6258 $as_echo_n "(cached) " >&6
bec39cab
AC
6259else
6260 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6262/* end confdefs.h. */
ddc9cd0f 6263
81ecdfbb
RW
6264/* Override any GCC internal prototype to avoid an error.
6265 Use char because int might match the return type of a GCC
6266 builtin and then its argument prototype would still apply. */
bec39cab
AC
6267#ifdef __cplusplus
6268extern "C"
6269#endif
bec39cab
AC
6270char gethostbyname ();
6271int
6272main ()
6273{
81ecdfbb 6274return gethostbyname ();
bec39cab
AC
6275 ;
6276 return 0;
6277}
6278_ACEOF
81ecdfbb
RW
6279for ac_lib in '' nsl; do
6280 if test -z "$ac_lib"; then
6281 ac_res="none required"
6282 else
6283 ac_res=-l$ac_lib
b4e70030 6284 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6285 fi
6286 if ac_fn_c_try_link "$LINENO"; then :
6287 ac_cv_search_gethostbyname=$ac_res
6288fi
6289rm -f core conftest.err conftest.$ac_objext \
6290 conftest$ac_exeext
6291 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6292 break
6293fi
6294done
6295if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6296
bec39cab 6297else
81ecdfbb 6298 ac_cv_search_gethostbyname=no
bec39cab 6299fi
81ecdfbb 6300rm conftest.$ac_ext
bec39cab
AC
6301LIBS=$ac_func_search_save_LIBS
6302fi
81ecdfbb
RW
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6304$as_echo "$ac_cv_search_gethostbyname" >&6; }
6305ac_res=$ac_cv_search_gethostbyname
6306if test "$ac_res" != no; then :
6307 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6308
bec39cab 6309fi
96baa820 6310
c906108c 6311
b4e70030 6312# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6314$as_echo_n "checking for library containing socketpair... " >&6; }
6315if test "${ac_cv_search_socketpair+set}" = set; then :
6316 $as_echo_n "(cached) " >&6
b4e70030
JB
6317else
6318 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6320/* end confdefs.h. */
6321
81ecdfbb
RW
6322/* Override any GCC internal prototype to avoid an error.
6323 Use char because int might match the return type of a GCC
6324 builtin and then its argument prototype would still apply. */
b4e70030
JB
6325#ifdef __cplusplus
6326extern "C"
6327#endif
b4e70030
JB
6328char socketpair ();
6329int
6330main ()
6331{
81ecdfbb 6332return socketpair ();
b4e70030
JB
6333 ;
6334 return 0;
6335}
6336_ACEOF
81ecdfbb
RW
6337for ac_lib in '' socket; do
6338 if test -z "$ac_lib"; then
6339 ac_res="none required"
6340 else
6341 ac_res=-l$ac_lib
b4e70030 6342 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6343 fi
6344 if ac_fn_c_try_link "$LINENO"; then :
6345 ac_cv_search_socketpair=$ac_res
6346fi
6347rm -f core conftest.err conftest.$ac_objext \
6348 conftest$ac_exeext
6349 if test "${ac_cv_search_socketpair+set}" = set; then :
6350 break
6351fi
6352done
6353if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6354
b4e70030 6355else
81ecdfbb 6356 ac_cv_search_socketpair=no
b4e70030 6357fi
81ecdfbb 6358rm conftest.$ac_ext
b4e70030
JB
6359LIBS=$ac_func_search_save_LIBS
6360fi
81ecdfbb
RW
6361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6362$as_echo "$ac_cv_search_socketpair" >&6; }
6363ac_res=$ac_cv_search_socketpair
6364if test "$ac_res" != no; then :
6365 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6366
6367fi
6368
6369
233a11ab 6370# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6371
6372 # See if the user specified whether he wants zlib support or not.
6373
6374# Check whether --with-zlib was given.
6375if test "${with_zlib+set}" = set; then :
6376 withval=$with_zlib;
6377else
6378 with_zlib=auto
6379fi
6380
6381
6382 if test "$with_zlib" != "no"; then
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6384$as_echo_n "checking for library containing zlibVersion... " >&6; }
6385if test "${ac_cv_search_zlibVersion+set}" = set; then :
6386 $as_echo_n "(cached) " >&6
233a11ab
CS
6387else
6388 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6390/* end confdefs.h. */
6391
81ecdfbb
RW
6392/* Override any GCC internal prototype to avoid an error.
6393 Use char because int might match the return type of a GCC
233a11ab 6394 builtin and then its argument prototype would still apply. */
233a11ab
CS
6395#ifdef __cplusplus
6396extern "C"
6397#endif
233a11ab
CS
6398char zlibVersion ();
6399int
6400main ()
6401{
81ecdfbb 6402return zlibVersion ();
233a11ab
CS
6403 ;
6404 return 0;
6405}
6406_ACEOF
81ecdfbb
RW
6407for ac_lib in '' z; do
6408 if test -z "$ac_lib"; then
6409 ac_res="none required"
233a11ab 6410 else
81ecdfbb
RW
6411 ac_res=-l$ac_lib
6412 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6413 fi
81ecdfbb
RW
6414 if ac_fn_c_try_link "$LINENO"; then :
6415 ac_cv_search_zlibVersion=$ac_res
233a11ab 6416fi
81ecdfbb
RW
6417rm -f core conftest.err conftest.$ac_objext \
6418 conftest$ac_exeext
6419 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6420 break
233a11ab 6421fi
81ecdfbb
RW
6422done
6423if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6424
233a11ab 6425else
81ecdfbb 6426 ac_cv_search_zlibVersion=no
233a11ab 6427fi
81ecdfbb
RW
6428rm conftest.$ac_ext
6429LIBS=$ac_func_search_save_LIBS
233a11ab 6430fi
81ecdfbb
RW
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6432$as_echo "$ac_cv_search_zlibVersion" >&6; }
6433ac_res=$ac_cv_search_zlibVersion
6434if test "$ac_res" != no; then :
6435 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6436 for ac_header in zlib.h
6437do :
6438 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6439if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6440 cat >>confdefs.h <<_ACEOF
81ecdfbb 6441#define HAVE_ZLIB_H 1
233a11ab
CS
6442_ACEOF
6443
6444fi
6445
6446done
6447
6448fi
6449
b040ad30
JB
6450 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6451 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6452 fi
6453 fi
6454
233a11ab 6455
77f120bf 6456# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6458$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6459if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6460 $as_echo_n "(cached) " >&6
bec39cab
AC
6461else
6462 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6464/* end confdefs.h. */
c906108c 6465
81ecdfbb
RW
6466/* Override any GCC internal prototype to avoid an error.
6467 Use char because int might match the return type of a GCC
6468 builtin and then its argument prototype would still apply. */
bec39cab
AC
6469#ifdef __cplusplus
6470extern "C"
6471#endif
77f120bf 6472char dlgetmodinfo ();
bec39cab
AC
6473int
6474main ()
6475{
81ecdfbb 6476return dlgetmodinfo ();
bec39cab
AC
6477 ;
6478 return 0;
6479}
6480_ACEOF
81ecdfbb
RW
6481for ac_lib in '' dl xpdl; do
6482 if test -z "$ac_lib"; then
6483 ac_res="none required"
6484 else
6485 ac_res=-l$ac_lib
b4e70030 6486 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6487 fi
6488 if ac_fn_c_try_link "$LINENO"; then :
6489 ac_cv_search_dlgetmodinfo=$ac_res
6490fi
6491rm -f core conftest.err conftest.$ac_objext \
6492 conftest$ac_exeext
6493 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6494 break
6495fi
6496done
6497if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6498
4e8d927d 6499else
81ecdfbb 6500 ac_cv_search_dlgetmodinfo=no
1ba607ad 6501fi
81ecdfbb 6502rm conftest.$ac_ext
bec39cab
AC
6503LIBS=$ac_func_search_save_LIBS
6504fi
81ecdfbb
RW
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6506$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6507ac_res=$ac_cv_search_dlgetmodinfo
6508if test "$ac_res" != no; then :
6509 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6510
8bb2c122 6511fi
8bb2c122 6512
8bb2c122 6513
77f120bf 6514
77f120bf 6515
6c7a06a3 6516
81ecdfbb
RW
6517# Check whether --with-libiconv-prefix was given.
6518if test "${with_libiconv_prefix+set}" = set; then :
6519 withval=$with_libiconv_prefix;
6c7a06a3 6520 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6521 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6522 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6523 done
6524
81ecdfbb
RW
6525fi
6526
6c7a06a3 6527
f18c4681 6528 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6529 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6530
81ecdfbb
RW
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6532$as_echo_n "checking for iconv... " >&6; }
6533if test "${am_cv_func_iconv+set}" = set; then :
6534 $as_echo_n "(cached) " >&6
d542061a 6535else
6c7a06a3
TT
6536
6537 am_cv_func_iconv="no, consider installing GNU libiconv"
6538 am_cv_lib_iconv=no
6539 am_cv_use_build_libiconv=no
f0f20949 6540 am_cv_build_libiconv_path=
4edb1e84
JB
6541
6542 # If libiconv is part of the build tree, then try using it over
6543 # any system iconv.
6544 if test -d ../libiconv; then
f18c4681
JB
6545 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6546 am_save_LIBS="$LIBS"
6547 am_save_CPPFLAGS="$CPPFLAGS"
6548 LIBS="$LIBS $lib_dir/libiconv.a"
6549 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6551/* end confdefs.h. */
6c7a06a3
TT
6552#include <stdlib.h>
6553#include <iconv.h>
d542061a
UW
6554int
6555main ()
6556{
6c7a06a3 6557iconv_t cd = iconv_open("","");
f18c4681
JB
6558 iconv(cd,NULL,NULL,NULL,NULL);
6559 iconv_close(cd);
d542061a
UW
6560 ;
6561 return 0;
6562}
6563_ACEOF
81ecdfbb 6564if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6565 am_cv_use_build_libiconv=yes
f0f20949 6566 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6567 am_cv_lib_iconv=yes
6568 am_cv_func_iconv=yes
d542061a 6569fi
81ecdfbb
RW
6570rm -f core conftest.err conftest.$ac_objext \
6571 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6572 LIBS="$am_save_LIBS"
6573 CPPFLAGS="$am_save_CPPFLAGS"
6574 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6575 break
6576 fi
6577 done
4edb1e84 6578 fi
94ae1714 6579
4edb1e84 6580 # Next, try to find iconv in libc.
6c7a06a3 6581 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6583/* end confdefs.h. */
6c7a06a3
TT
6584#include <stdlib.h>
6585#include <iconv.h>
d542061a
UW
6586int
6587main ()
6588{
6c7a06a3
TT
6589iconv_t cd = iconv_open("","");
6590 iconv(cd,NULL,NULL,NULL,NULL);
6591 iconv_close(cd);
d542061a
UW
6592 ;
6593 return 0;
6594}
6595_ACEOF
81ecdfbb 6596if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6597 am_cv_func_iconv=yes
d542061a 6598fi
81ecdfbb
RW
6599rm -f core conftest.err conftest.$ac_objext \
6600 conftest$ac_exeext conftest.$ac_ext
77f120bf 6601 fi
94ae1714 6602
4edb1e84
JB
6603 # If iconv was not in libc, try -liconv. In this case, arrange to
6604 # look in the libiconv prefix, if it was specified by the user.
6605 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6606 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6607 am_save_LIBS="$LIBS"
6608 if test -n "$LIBICONV_INCLUDE"; then
6609 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6610 LIBS="$LIBS $LIBICONV_LIBDIR"
6611 fi
6612 LIBS="$LIBS -liconv"
81ecdfbb 6613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6614/* end confdefs.h. */
6c7a06a3
TT
6615#include <stdlib.h>
6616#include <iconv.h>
bec39cab
AC
6617int
6618main ()
6619{
6c7a06a3
TT
6620iconv_t cd = iconv_open("","");
6621 iconv(cd,NULL,NULL,NULL,NULL);
6622 iconv_close(cd);
bec39cab
AC
6623 ;
6624 return 0;
6625}
6626_ACEOF
81ecdfbb 6627if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6628 am_cv_lib_iconv=yes
6c7a06a3 6629 am_cv_func_iconv=yes
627af7ea 6630fi
81ecdfbb
RW
6631rm -f core conftest.err conftest.$ac_objext \
6632 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6633 LIBS="$am_save_LIBS"
fc3b640d 6634 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6635 fi
6636
6637fi
81ecdfbb
RW
6638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6639$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6640
6641 # Set the various flags based on the cache variables. We can't rely
6642 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6643 LIBICONV=
6644 if test "$am_cv_lib_iconv" = yes; then
6645 LIBICONV="-liconv"
94ae1714
TT
6646 else
6647 LIBICONV_LIBDIR=
6648 LIBICONV_INCLUDE=
fc3b640d
TT
6649 fi
6650 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6651 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6652 LIBICONV_LIBDIR=""
fc3b640d
TT
6653 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6654 fi
6655 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6656 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6657
6c7a06a3
TT
6658 if test "$am_cv_func_iconv" = yes; then
6659
81ecdfbb 6660$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6661
81ecdfbb
RW
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6663$as_echo_n "checking for iconv declaration... " >&6; }
6664 if test "${am_cv_proto_iconv+set}" = set; then :
6665 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6666else
6667
81ecdfbb 6668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6669/* end confdefs.h. */
6670
6c7a06a3
TT
6671#include <stdlib.h>
6672#include <iconv.h>
6673extern
b4e70030 6674#ifdef __cplusplus
6c7a06a3 6675"C"
b4e70030 6676#endif
6c7a06a3
TT
6677#if defined(__STDC__) || defined(__cplusplus)
6678size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6679#else
6680size_t iconv();
6681#endif
6682
b4e70030
JB
6683int
6684main ()
6685{
6c7a06a3 6686
b4e70030
JB
6687 ;
6688 return 0;
6689}
6690_ACEOF
81ecdfbb 6691if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6692 am_cv_proto_iconv_arg1=""
4e8d927d 6693else
81ecdfbb 6694 am_cv_proto_iconv_arg1="const"
b4e70030 6695fi
81ecdfbb 6696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6697 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);"
6698fi
6699
6700 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6702 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6703$as_echo "${ac_t:-
6704 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6705
6706cat >>confdefs.h <<_ACEOF
6707#define ICONV_CONST $am_cv_proto_iconv_arg1
6708_ACEOF
6709
6710 fi
6c7a06a3
TT
6711
6712
478aac75
DE
6713# GDB may fork/exec the iconv program to get the list of supported character
6714# sets. Allow the user to specify where to find it.
6715# There are several factors affecting the choice of option name:
6716# - There is already --with-libiconv-prefix but we can't use it, it specifies
6717# the build-time location of libiconv files.
6718# - The program we need to find is iconv, which comes with glibc. The user
6719# doesn't necessarily have libiconv installed. Therefore naming this
6720# --with-libiconv-foo feels wrong.
6721# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6722# defined to work on directories not files (though it really doesn't know
6723# the difference).
6724# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6725# with --with-libiconv-prefix.
6726# Putting these together is why the option name is --with-iconv-bin.
6727
6728
6729# Check whether --with-iconv-bin was given.
6730if test "${with_iconv_bin+set}" = set; then :
6731 withval=$with_iconv_bin; iconv_bin="${withval}"
6732
6733cat >>confdefs.h <<_ACEOF
6734#define ICONV_BIN "${iconv_bin}"
6735_ACEOF
6736
6737
6738 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6739 if test "x$prefix" = xNONE; then
6740 test_prefix=/usr/local
6741 else
6742 test_prefix=$prefix
6743 fi
6744 else
6745 test_prefix=$exec_prefix
6746 fi
6747 value=0
6748 case ${iconv_bin} in
6749 "${test_prefix}"|"${test_prefix}/"*|\
6750 '${exec_prefix}'|'${exec_prefix}/'*)
6751 value=1
6752 ;;
6753 esac
6754
6755cat >>confdefs.h <<_ACEOF
6756#define ICONV_BIN_RELOCATABLE $value
6757_ACEOF
6758
6759
6760
6761fi
6762
6763
6c7a06a3
TT
6764# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6765# There is a very specific comment in /usr/include/curses.h explaining that
6766# termcap routines built into libcurses must not be used.
6767#
6768# The symptoms we observed so far is GDB unexpectedly changing
6769# the terminal settings when tgetent is called - this is particularly
6770# visible as the output is missing carriage returns, and so rapidly
6771# becomes very hard to read.
6772#
6773# The readline configure script has already decided that libtermcap
6774# was enough for its purposes, and so decided to build readline using
6775# libtermcap. Since the TUI mode requires curses, building GDB with
6776# TUI enabled results in both libraries to be used at the same time,
6777# which is not allowed. This basically means that GDB with TUI is
6778# broken on alpha-osf.
6779
6780case $host_os in
6bcc772d
RO
6781 osf* )
6782 if test x"$enable_tui" = xyes; then
81ecdfbb 6783 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6784 fi
6bcc772d 6785 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6786 enable_tui=no
6787 fi
6788 ;;
6789esac
6790
cb01cfba 6791# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6792if test x"$enable_tui" != xno; then
cb01cfba
JB
6793 prefer_curses=yes
6794fi
6795
6796curses_found=no
6797if test x"$prefer_curses" = xyes; then
6798 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6799 # curses library because the latter might not provide all the
6800 # functionality we need. However, this leads to problems on systems
6801 # where the linker searches /usr/local/lib, but the compiler doesn't
6802 # search /usr/local/include, if ncurses is installed in /usr/local. A
6803 # default installation of ncurses on alpha*-dec-osf* will lead to such
6804 # a situation.
81ecdfbb
RW
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6806$as_echo_n "checking for library containing waddstr... " >&6; }
6807if test "${ac_cv_search_waddstr+set}" = set; then :
6808 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6809else
6810 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6812/* end confdefs.h. */
6813
81ecdfbb
RW
6814/* Override any GCC internal prototype to avoid an error.
6815 Use char because int might match the return type of a GCC
6816 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6817#ifdef __cplusplus
6818extern "C"
6819#endif
6c7a06a3
TT
6820char waddstr ();
6821int
6822main ()
6823{
81ecdfbb 6824return waddstr ();
6c7a06a3
TT
6825 ;
6826 return 0;
6827}
6828_ACEOF
81ecdfbb
RW
6829for ac_lib in '' ncurses cursesX curses; do
6830 if test -z "$ac_lib"; then
6831 ac_res="none required"
6832 else
6833 ac_res=-l$ac_lib
6834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6835 fi
6836 if ac_fn_c_try_link "$LINENO"; then :
6837 ac_cv_search_waddstr=$ac_res
6838fi
6839rm -f core conftest.err conftest.$ac_objext \
6840 conftest$ac_exeext
6841 if test "${ac_cv_search_waddstr+set}" = set; then :
6842 break
6843fi
6844done
6845if test "${ac_cv_search_waddstr+set}" = set; then :
6846
6c7a06a3 6847else
81ecdfbb
RW
6848 ac_cv_search_waddstr=no
6849fi
6850rm conftest.$ac_ext
6851LIBS=$ac_func_search_save_LIBS
6852fi
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6854$as_echo "$ac_cv_search_waddstr" >&6; }
6855ac_res=$ac_cv_search_waddstr
6856if test "$ac_res" != no; then :
6857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6858
6859fi
6860
6861
cb01cfba
JB
6862 if test "$ac_cv_search_waddstr" != no; then
6863 curses_found=yes
6864 fi
6865fi
6866
6867# Check whether we should enable the TUI, but only do so if we really
6868# can.
6869if test x"$enable_tui" != xno; then
6870 if test -d $srcdir/tui; then
6871 if test "$curses_found" != no; then
6c7a06a3
TT
6872 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6873 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6874 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6875 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6876 else
6877 if test x"$enable_tui" = xyes; then
81ecdfbb 6878 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6879 else
81ecdfbb
RW
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6881$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6882 fi
6883 fi
6884 fi
6885fi
6886
6887# Since GDB uses Readline, we need termcap functionality. In many
6888# cases this will be provided by the curses library, but some systems
6889# have a seperate termcap library, or no curses library at all.
6890
6891case $host_os in
6892 cygwin*)
6893 if test -d $srcdir/libtermcap; then
6894 LIBS="../libtermcap/libtermcap.a $LIBS"
6895 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6896 fi ;;
6897 go32* | *djgpp*)
6898 ac_cv_search_tgetent="none required"
6899 ;;
6900 *mingw32*)
6901 ac_cv_search_tgetent="none required"
6902 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6903 ;;
6904esac
6905
6906# These are the libraries checked by Readline.
81ecdfbb
RW
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6908$as_echo_n "checking for library containing tgetent... " >&6; }
6909if test "${ac_cv_search_tgetent+set}" = set; then :
6910 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6911else
6912 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6914/* end confdefs.h. */
6915
81ecdfbb
RW
6916/* Override any GCC internal prototype to avoid an error.
6917 Use char because int might match the return type of a GCC
6918 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6919#ifdef __cplusplus
6920extern "C"
6921#endif
6c7a06a3
TT
6922char tgetent ();
6923int
6924main ()
6925{
81ecdfbb 6926return tgetent ();
6c7a06a3
TT
6927 ;
6928 return 0;
6929}
6930_ACEOF
81ecdfbb
RW
6931for ac_lib in '' termcap tinfo curses ncurses; do
6932 if test -z "$ac_lib"; then
6933 ac_res="none required"
6934 else
6935 ac_res=-l$ac_lib
6c7a06a3 6936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6937 fi
6938 if ac_fn_c_try_link "$LINENO"; then :
6939 ac_cv_search_tgetent=$ac_res
6940fi
6941rm -f core conftest.err conftest.$ac_objext \
6942 conftest$ac_exeext
6943 if test "${ac_cv_search_tgetent+set}" = set; then :
6944 break
6945fi
6946done
6947if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 6948
6c7a06a3 6949else
81ecdfbb 6950 ac_cv_search_tgetent=no
6c7a06a3 6951fi
81ecdfbb 6952rm conftest.$ac_ext
6c7a06a3
TT
6953LIBS=$ac_func_search_save_LIBS
6954fi
81ecdfbb
RW
6955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
6956$as_echo "$ac_cv_search_tgetent" >&6; }
6957ac_res=$ac_cv_search_tgetent
6958if test "$ac_res" != no; then :
6959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 6960
06825bd1
MK
6961fi
6962
06825bd1 6963
bec39cab 6964if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 6965 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
6966fi
6967
3841debe 6968
81ecdfbb
RW
6969# Check whether --with-system-readline was given.
6970if test "${with_system_readline+set}" = set; then :
6971 withval=$with_system_readline;
6972fi
6a30b0a5 6973
6a30b0a5
AS
6974
6975if test "$with_system_readline" = yes; then
6976 READLINE=-lreadline
6977 READLINE_DEPS=
6978 READLINE_CFLAGS=
39037522 6979 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
6980else
6981 READLINE='$(READLINE_DIR)/libreadline.a'
6982 READLINE_DEPS='$(READLINE)'
6983 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 6984 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
6985fi
6986
6987
6988
6989
6990
f997c383
SD
6991# Generate jit-reader.h
6992
6993# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
6994TARGET_PTR=
6995
6996# The cast to long int works around a bug in the HP C Compiler
6997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6999# This bug is HP SR number 8606223364.
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7001$as_echo_n "checking size of unsigned long long... " >&6; }
7002if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7003 $as_echo_n "(cached) " >&6
7004else
7005 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7006
7007else
7008 if test "$ac_cv_type_unsigned_long_long" = yes; then
7009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7011{ as_fn_set_status 77
7012as_fn_error "cannot compute sizeof (unsigned long long)
7013See \`config.log' for more details." "$LINENO" 5; }; }
7014 else
7015 ac_cv_sizeof_unsigned_long_long=0
7016 fi
7017fi
7018
7019fi
7020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7021$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7022
7023
7024
7025cat >>confdefs.h <<_ACEOF
7026#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7027_ACEOF
7028
7029
7030# The cast to long int works around a bug in the HP C Compiler
7031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7033# This bug is HP SR number 8606223364.
7034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7035$as_echo_n "checking size of unsigned long... " >&6; }
7036if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7037 $as_echo_n "(cached) " >&6
7038else
7039 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7040
7041else
7042 if test "$ac_cv_type_unsigned_long" = yes; then
7043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7045{ as_fn_set_status 77
7046as_fn_error "cannot compute sizeof (unsigned long)
7047See \`config.log' for more details." "$LINENO" 5; }; }
7048 else
7049 ac_cv_sizeof_unsigned_long=0
7050 fi
7051fi
7052
7053fi
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7055$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7056
7057
7058
7059cat >>confdefs.h <<_ACEOF
7060#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7061_ACEOF
7062
7063
7064# The cast to long int works around a bug in the HP C Compiler
7065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7067# This bug is HP SR number 8606223364.
7068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7069$as_echo_n "checking size of unsigned __int128... " >&6; }
7070if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7071 $as_echo_n "(cached) " >&6
7072else
7073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7074
7075else
7076 if test "$ac_cv_type_unsigned___int128" = yes; then
7077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7079{ as_fn_set_status 77
7080as_fn_error "cannot compute sizeof (unsigned __int128)
7081See \`config.log' for more details." "$LINENO" 5; }; }
7082 else
7083 ac_cv_sizeof_unsigned___int128=0
7084 fi
7085fi
7086
7087fi
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7089$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7090
7091
7092
7093cat >>confdefs.h <<_ACEOF
7094#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7095_ACEOF
7096
7097
7098
7099if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7100 TARGET_PTR="unsigned long"
7101elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7102 TARGET_PTR="unsigned long long"
7103elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7104 TARGET_PTR="unsigned __int128"
7105else
7106 TARGET_PTR="unsigned long"
7107fi
7108
7109
7110ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7111
7112
a2d08b9e
SD
7113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7114$as_echo_n "checking for library containing dlopen... " >&6; }
7115if test "${ac_cv_search_dlopen+set}" = set; then :
7116 $as_echo_n "(cached) " >&6
7117else
7118 ac_func_search_save_LIBS=$LIBS
7119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120/* end confdefs.h. */
7121
7122/* Override any GCC internal prototype to avoid an error.
7123 Use char because int might match the return type of a GCC
7124 builtin and then its argument prototype would still apply. */
7125#ifdef __cplusplus
7126extern "C"
7127#endif
7128char dlopen ();
7129int
7130main ()
7131{
7132return dlopen ();
7133 ;
7134 return 0;
7135}
7136_ACEOF
7137for ac_lib in '' dl; do
7138 if test -z "$ac_lib"; then
7139 ac_res="none required"
7140 else
7141 ac_res=-l$ac_lib
7142 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7143 fi
7144 if ac_fn_c_try_link "$LINENO"; then :
7145 ac_cv_search_dlopen=$ac_res
7146fi
7147rm -f core conftest.err conftest.$ac_objext \
7148 conftest$ac_exeext
7149 if test "${ac_cv_search_dlopen+set}" = set; then :
7150 break
7151fi
7152done
7153if test "${ac_cv_search_dlopen+set}" = set; then :
7154
7155else
7156 ac_cv_search_dlopen=no
7157fi
7158rm conftest.$ac_ext
7159LIBS=$ac_func_search_save_LIBS
7160fi
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7162$as_echo "$ac_cv_search_dlopen" >&6; }
7163ac_res=$ac_cv_search_dlopen
7164if test "$ac_res" != no; then :
7165 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7166
7167fi
7168
7169
39037522 7170
b8e0a31c
SD
7171
7172# Check whether --with-jit-reader-dir was given.
7173if test "${with_jit_reader_dir+set}" = set; then :
7174 withval=$with_jit_reader_dir;
7175 JIT_READER_DIR=$withval
7176else
7177 JIT_READER_DIR=${libdir}/gdb
7178fi
7179
7180
7181 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7182 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7183 ac_define_dir=`eval echo $JIT_READER_DIR`
7184 ac_define_dir=`eval echo $ac_define_dir`
7185
7186cat >>confdefs.h <<_ACEOF
7187#define JIT_READER_DIR "$ac_define_dir"
7188_ACEOF
7189
7190
7191
7192
7193 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7194 if test "x$prefix" = xNONE; then
7195 test_prefix=/usr/local
7196 else
7197 test_prefix=$prefix
7198 fi
7199 else
7200 test_prefix=$exec_prefix
7201 fi
7202 value=0
7203 case ${ac_define_dir} in
7204 "${test_prefix}"|"${test_prefix}/"*|\
7205 '${exec_prefix}'|'${exec_prefix}/'*)
7206 value=1
7207 ;;
7208 esac
7209
7210cat >>confdefs.h <<_ACEOF
7211#define JIT_READER_DIR_RELOCATABLE $value
7212_ACEOF
7213
7214
7215
7216
7217
81ecdfbb
RW
7218# Check whether --with-expat was given.
7219if test "${with_expat+set}" = set; then :
7220 withval=$with_expat;
5c39566f
DJ
7221else
7222 with_expat=auto
81ecdfbb
RW
7223fi
7224
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7226$as_echo_n "checking whether to use expat... " >&6; }
7227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7228$as_echo "$with_expat" >&6; }
5c39566f
DJ
7229
7230if test "${with_expat}" = no; then
81ecdfbb
RW
7231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7232$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7233 HAVE_LIBEXPAT=no
7234else
7235
3841debe
DJ
7236 if test "X$prefix" = "XNONE"; then
7237 acl_final_prefix="$ac_default_prefix"
7238 else
7239 acl_final_prefix="$prefix"
7240 fi
7241 if test "X$exec_prefix" = "XNONE"; then
7242 acl_final_exec_prefix='${prefix}'
7243 else
7244 acl_final_exec_prefix="$exec_prefix"
7245 fi
7246 acl_save_prefix="$prefix"
7247 prefix="$acl_final_prefix"
7248 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7249 prefix="$acl_save_prefix"
7250
7251
81ecdfbb
RW
7252# Check whether --with-gnu-ld was given.
7253if test "${with_gnu_ld+set}" = set; then :
7254 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7255else
7256 with_gnu_ld=no
81ecdfbb
RW
7257fi
7258
3841debe
DJ
7259# Prepare PATH_SEPARATOR.
7260# The user is always right.
7261if test "${PATH_SEPARATOR+set}" != set; then
7262 echo "#! /bin/sh" >conf$$.sh
7263 echo "exit 0" >>conf$$.sh
7264 chmod +x conf$$.sh
7265 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7266 PATH_SEPARATOR=';'
7267 else
7268 PATH_SEPARATOR=:
7269 fi
7270 rm -f conf$$.sh
7271fi
7272ac_prog=ld
7273if test "$GCC" = yes; then
7274 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7276$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7277 case $host in
7278 *-*-mingw*)
7279 # gcc leaves a trailing carriage return which upsets mingw
7280 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7281 *)
7282 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7283 esac
7284 case $ac_prog in
7285 # Accept absolute paths.
7286 [\\/]* | [A-Za-z]:[\\/]*)
7287 re_direlt='/[^/][^/]*/\.\./'
7288 # Canonicalize the path of ld
7289 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7290 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7291 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7292 done
7293 test -z "$LD" && LD="$ac_prog"
7294 ;;
7295 "")
7296 # If it fails, then pretend we aren't using GCC.
7297 ac_prog=ld
7298 ;;
7299 *)
7300 # If it is relative, then search for the first ld in PATH.
7301 with_gnu_ld=unknown
7302 ;;
7303 esac
7304elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7306$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7307else
81ecdfbb
RW
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7309$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7310fi
81ecdfbb
RW
7311if test "${acl_cv_path_LD+set}" = set; then :
7312 $as_echo_n "(cached) " >&6
3841debe
DJ
7313else
7314 if test -z "$LD"; then
7315 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7316 for ac_dir in $PATH; do
7317 test -z "$ac_dir" && ac_dir=.
7318 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7319 acl_cv_path_LD="$ac_dir/$ac_prog"
7320 # Check to see if the program is GNU ld. I'd rather use --version,
7321 # but apparently some GNU ld's only accept -v.
7322 # Break only if it was the GNU/non-GNU ld that we prefer.
7323 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7324 test "$with_gnu_ld" != no && break
7325 else
7326 test "$with_gnu_ld" != yes && break
7327 fi
7328 fi
7329 done
7330 IFS="$ac_save_ifs"
7331else
7332 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7333fi
7334fi
7335
7336LD="$acl_cv_path_LD"
7337if test -n "$LD"; then
81ecdfbb
RW
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7339$as_echo "$LD" >&6; }
3841debe 7340else
81ecdfbb
RW
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7342$as_echo "no" >&6; }
3841debe 7343fi
81ecdfbb
RW
7344test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7346$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7347if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7348 $as_echo_n "(cached) " >&6
3841debe
DJ
7349else
7350 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7351if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7352 acl_cv_prog_gnu_ld=yes
7353else
7354 acl_cv_prog_gnu_ld=no
7355fi
7356fi
81ecdfbb
RW
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7358$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7359with_gnu_ld=$acl_cv_prog_gnu_ld
7360
7361
7362
81ecdfbb
RW
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7364$as_echo_n "checking for shared library run path origin... " >&6; }
7365if test "${acl_cv_rpath+set}" = set; then :
7366 $as_echo_n "(cached) " >&6
3841debe
DJ
7367else
7368
7369 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7370 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7371 . ./conftest.sh
7372 rm -f ./conftest.sh
7373 acl_cv_rpath=done
7374
7375fi
81ecdfbb
RW
7376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7377$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7378 wl="$acl_cv_wl"
7379 libext="$acl_cv_libext"
7380 shlibext="$acl_cv_shlibext"
7381 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7382 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7383 hardcode_direct="$acl_cv_hardcode_direct"
7384 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7385 # Check whether --enable-rpath was given.
7386if test "${enable_rpath+set}" = set; then :
7387 enableval=$enable_rpath; :
3841debe
DJ
7388else
7389 enable_rpath=yes
81ecdfbb
RW
7390fi
7391
3841debe
DJ
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401 use_additional=yes
7402
7403 acl_save_prefix="$prefix"
7404 prefix="$acl_final_prefix"
7405 acl_save_exec_prefix="$exec_prefix"
7406 exec_prefix="$acl_final_exec_prefix"
7407
7408 eval additional_includedir=\"$includedir\"
7409 eval additional_libdir=\"$libdir\"
7410
7411 exec_prefix="$acl_save_exec_prefix"
7412 prefix="$acl_save_prefix"
7413
7414
81ecdfbb
RW
7415# Check whether --with-libexpat-prefix was given.
7416if test "${with_libexpat_prefix+set}" = set; then :
7417 withval=$with_libexpat_prefix;
3841debe
DJ
7418 if test "X$withval" = "Xno"; then
7419 use_additional=no
7420 else
7421 if test "X$withval" = "X"; then
7422
7423 acl_save_prefix="$prefix"
7424 prefix="$acl_final_prefix"
7425 acl_save_exec_prefix="$exec_prefix"
7426 exec_prefix="$acl_final_exec_prefix"
7427
7428 eval additional_includedir=\"$includedir\"
7429 eval additional_libdir=\"$libdir\"
7430
7431 exec_prefix="$acl_save_exec_prefix"
7432 prefix="$acl_save_prefix"
7433
7434 else
7435 additional_includedir="$withval/include"
7436 additional_libdir="$withval/lib"
7437 fi
7438 fi
7439
81ecdfbb
RW
7440fi
7441
3841debe
DJ
7442 LIBEXPAT=
7443 LTLIBEXPAT=
7444 INCEXPAT=
7445 rpathdirs=
7446 ltrpathdirs=
7447 names_already_handled=
7448 names_next_round='expat '
7449 while test -n "$names_next_round"; do
7450 names_this_round="$names_next_round"
7451 names_next_round=
7452 for name in $names_this_round; do
7453 already_handled=
7454 for n in $names_already_handled; do
7455 if test "$n" = "$name"; then
7456 already_handled=yes
7457 break
7458 fi
7459 done
7460 if test -z "$already_handled"; then
7461 names_already_handled="$names_already_handled $name"
7462 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7463 eval value=\"\$HAVE_LIB$uppername\"
7464 if test -n "$value"; then
7465 if test "$value" = yes; then
7466 eval value=\"\$LIB$uppername\"
7467 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7468 eval value=\"\$LTLIB$uppername\"
7469 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7470 else
7471 :
7472 fi
7473 else
7474 found_dir=
7475 found_la=
7476 found_so=
7477 found_a=
7478 if test $use_additional = yes; then
7479 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7480 found_dir="$additional_libdir"
7481 found_so="$additional_libdir/lib$name.$shlibext"
7482 if test -f "$additional_libdir/lib$name.la"; then
7483 found_la="$additional_libdir/lib$name.la"
7484 fi
7485 else
7486 if test -f "$additional_libdir/lib$name.$libext"; then
7487 found_dir="$additional_libdir"
7488 found_a="$additional_libdir/lib$name.$libext"
7489 if test -f "$additional_libdir/lib$name.la"; then
7490 found_la="$additional_libdir/lib$name.la"
7491 fi
7492 fi
7493 fi
7494 fi
7495 if test "X$found_dir" = "X"; then
7496 for x in $LDFLAGS $LTLIBEXPAT; do
7497
7498 acl_save_prefix="$prefix"
7499 prefix="$acl_final_prefix"
7500 acl_save_exec_prefix="$exec_prefix"
7501 exec_prefix="$acl_final_exec_prefix"
7502 eval x=\"$x\"
7503 exec_prefix="$acl_save_exec_prefix"
7504 prefix="$acl_save_prefix"
7505
7506 case "$x" in
7507 -L*)
7508 dir=`echo "X$x" | sed -e 's/^X-L//'`
7509 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7510 found_dir="$dir"
7511 found_so="$dir/lib$name.$shlibext"
7512 if test -f "$dir/lib$name.la"; then
7513 found_la="$dir/lib$name.la"
7514 fi
7515 else
7516 if test -f "$dir/lib$name.$libext"; then
7517 found_dir="$dir"
7518 found_a="$dir/lib$name.$libext"
7519 if test -f "$dir/lib$name.la"; then
7520 found_la="$dir/lib$name.la"
7521 fi
7522 fi
7523 fi
7524 ;;
7525 esac
7526 if test "X$found_dir" != "X"; then
7527 break
7528 fi
7529 done
7530 fi
7531 if test "X$found_dir" != "X"; then
7532 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7533 if test "X$found_so" != "X"; then
7534 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7535 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7536 else
7537 haveit=
7538 for x in $ltrpathdirs; do
7539 if test "X$x" = "X$found_dir"; then
7540 haveit=yes
7541 break
7542 fi
7543 done
7544 if test -z "$haveit"; then
7545 ltrpathdirs="$ltrpathdirs $found_dir"
7546 fi
7547 if test "$hardcode_direct" = yes; then
7548 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7549 else
7550 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7551 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7552 haveit=
7553 for x in $rpathdirs; do
7554 if test "X$x" = "X$found_dir"; then
7555 haveit=yes
7556 break
7557 fi
7558 done
7559 if test -z "$haveit"; then
7560 rpathdirs="$rpathdirs $found_dir"
7561 fi
7562 else
7563 haveit=
7564 for x in $LDFLAGS $LIBEXPAT; do
7565
7566 acl_save_prefix="$prefix"
7567 prefix="$acl_final_prefix"
7568 acl_save_exec_prefix="$exec_prefix"
7569 exec_prefix="$acl_final_exec_prefix"
7570 eval x=\"$x\"
7571 exec_prefix="$acl_save_exec_prefix"
7572 prefix="$acl_save_prefix"
7573
7574 if test "X$x" = "X-L$found_dir"; then
7575 haveit=yes
7576 break
7577 fi
7578 done
7579 if test -z "$haveit"; then
7580 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7581 fi
7582 if test "$hardcode_minus_L" != no; then
7583 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7584 else
7585 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7586 fi
7587 fi
7588 fi
7589 fi
7590 else
7591 if test "X$found_a" != "X"; then
7592 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7593 else
7594 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7595 fi
7596 fi
7597 additional_includedir=
7598 case "$found_dir" in
7599 */lib | */lib/)
7600 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7601 additional_includedir="$basedir/include"
7602 ;;
7603 esac
7604 if test "X$additional_includedir" != "X"; then
7605 if test "X$additional_includedir" != "X/usr/include"; then
7606 haveit=
7607 if test "X$additional_includedir" = "X/usr/local/include"; then
7608 if test -n "$GCC"; then
7609 case $host_os in
7610 linux*) haveit=yes;;
7611 esac
7612 fi
7613 fi
7614 if test -z "$haveit"; then
7615 for x in $CPPFLAGS $INCEXPAT; do
7616
7617 acl_save_prefix="$prefix"
7618 prefix="$acl_final_prefix"
7619 acl_save_exec_prefix="$exec_prefix"
7620 exec_prefix="$acl_final_exec_prefix"
7621 eval x=\"$x\"
7622 exec_prefix="$acl_save_exec_prefix"
7623 prefix="$acl_save_prefix"
7624
7625 if test "X$x" = "X-I$additional_includedir"; then
7626 haveit=yes
7627 break
7628 fi
7629 done
7630 if test -z "$haveit"; then
7631 if test -d "$additional_includedir"; then
7632 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7633 fi
7634 fi
7635 fi
7636 fi
7637 fi
7638 if test -n "$found_la"; then
7639 save_libdir="$libdir"
7640 case "$found_la" in
7641 */* | *\\*) . "$found_la" ;;
7642 *) . "./$found_la" ;;
7643 esac
7644 libdir="$save_libdir"
7645 for dep in $dependency_libs; do
7646 case "$dep" in
7647 -L*)
7648 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7649 if test "X$additional_libdir" != "X/usr/lib"; then
7650 haveit=
7651 if test "X$additional_libdir" = "X/usr/local/lib"; then
7652 if test -n "$GCC"; then
7653 case $host_os in
7654 linux*) haveit=yes;;
7655 esac
7656 fi
7657 fi
7658 if test -z "$haveit"; then
7659 haveit=
7660 for x in $LDFLAGS $LIBEXPAT; do
7661
7662 acl_save_prefix="$prefix"
7663 prefix="$acl_final_prefix"
7664 acl_save_exec_prefix="$exec_prefix"
7665 exec_prefix="$acl_final_exec_prefix"
7666 eval x=\"$x\"
7667 exec_prefix="$acl_save_exec_prefix"
7668 prefix="$acl_save_prefix"
7669
7670 if test "X$x" = "X-L$additional_libdir"; then
7671 haveit=yes
7672 break
7673 fi
7674 done
7675 if test -z "$haveit"; then
7676 if test -d "$additional_libdir"; then
7677 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7678 fi
7679 fi
7680 haveit=
7681 for x in $LDFLAGS $LTLIBEXPAT; do
7682
7683 acl_save_prefix="$prefix"
7684 prefix="$acl_final_prefix"
7685 acl_save_exec_prefix="$exec_prefix"
7686 exec_prefix="$acl_final_exec_prefix"
7687 eval x=\"$x\"
7688 exec_prefix="$acl_save_exec_prefix"
7689 prefix="$acl_save_prefix"
7690
7691 if test "X$x" = "X-L$additional_libdir"; then
7692 haveit=yes
7693 break
7694 fi
7695 done
7696 if test -z "$haveit"; then
7697 if test -d "$additional_libdir"; then
7698 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7699 fi
7700 fi
7701 fi
7702 fi
7703 ;;
7704 -R*)
7705 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7706 if test "$enable_rpath" != no; then
7707 haveit=
7708 for x in $rpathdirs; do
7709 if test "X$x" = "X$dir"; then
7710 haveit=yes
7711 break
7712 fi
7713 done
7714 if test -z "$haveit"; then
7715 rpathdirs="$rpathdirs $dir"
7716 fi
7717 haveit=
7718 for x in $ltrpathdirs; do
7719 if test "X$x" = "X$dir"; then
7720 haveit=yes
7721 break
7722 fi
7723 done
7724 if test -z "$haveit"; then
7725 ltrpathdirs="$ltrpathdirs $dir"
7726 fi
7727 fi
7728 ;;
7729 -l*)
7730 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7731 ;;
7732 *.la)
7733 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7734 ;;
7735 *)
7736 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7737 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7738 ;;
81ecdfbb
RW
7739 esac
7740 done
7741 fi
7742 else
7743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7744 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7745 fi
7746 fi
7747 fi
7748 done
7749 done
7750 if test "X$rpathdirs" != "X"; then
7751 if test -n "$hardcode_libdir_separator"; then
7752 alldirs=
7753 for found_dir in $rpathdirs; do
7754 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7755 done
7756 acl_save_libdir="$libdir"
7757 libdir="$alldirs"
7758 eval flag=\"$hardcode_libdir_flag_spec\"
7759 libdir="$acl_save_libdir"
7760 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7761 else
7762 for found_dir in $rpathdirs; do
7763 acl_save_libdir="$libdir"
7764 libdir="$found_dir"
7765 eval flag=\"$hardcode_libdir_flag_spec\"
7766 libdir="$acl_save_libdir"
7767 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7768 done
7769 fi
7770 fi
7771 if test "X$ltrpathdirs" != "X"; then
7772 for found_dir in $ltrpathdirs; do
7773 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7774 done
7775 fi
a9322a30
TT
7776
7777
81ecdfbb 7778 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7779
81ecdfbb
RW
7780 for element in $INCEXPAT; do
7781 haveit=
7782 for x in $CPPFLAGS; do
a9322a30 7783
81ecdfbb
RW
7784 acl_save_prefix="$prefix"
7785 prefix="$acl_final_prefix"
7786 acl_save_exec_prefix="$exec_prefix"
7787 exec_prefix="$acl_final_exec_prefix"
7788 eval x=\"$x\"
7789 exec_prefix="$acl_save_exec_prefix"
7790 prefix="$acl_save_prefix"
a8111142 7791
81ecdfbb
RW
7792 if test "X$x" = "X$element"; then
7793 haveit=yes
7794 break
7795 fi
7796 done
7797 if test -z "$haveit"; then
7798 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7799 fi
7800 done
a9322a30
TT
7801
7802
81ecdfbb
RW
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7804$as_echo_n "checking for libexpat... " >&6; }
7805if test "${ac_cv_libexpat+set}" = set; then :
7806 $as_echo_n "(cached) " >&6
bec39cab 7807else
bec39cab 7808
81ecdfbb
RW
7809 ac_save_LIBS="$LIBS"
7810 LIBS="$LIBS $LIBEXPAT"
7811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7812/* end confdefs.h. */
81ecdfbb
RW
7813#include "expat.h"
7814int
7815main ()
7816{
7817XML_Parser p = XML_ParserCreate (0);
7818 ;
7819 return 0;
7820}
bec39cab 7821_ACEOF
81ecdfbb
RW
7822if ac_fn_c_try_link "$LINENO"; then :
7823 ac_cv_libexpat=yes
c906108c 7824else
81ecdfbb 7825 ac_cv_libexpat=no
bec39cab 7826fi
81ecdfbb
RW
7827rm -f core conftest.err conftest.$ac_objext \
7828 conftest$ac_exeext conftest.$ac_ext
7829 LIBS="$ac_save_LIBS"
c906108c 7830
95ca63c4 7831fi
81ecdfbb
RW
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7833$as_echo "$ac_cv_libexpat" >&6; }
7834 if test "$ac_cv_libexpat" = yes; then
7835 HAVE_LIBEXPAT=yes
bec39cab 7836
81ecdfbb 7837$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7838
81ecdfbb
RW
7839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7840$as_echo_n "checking how to link with libexpat... " >&6; }
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7842$as_echo "$LIBEXPAT" >&6; }
7843 else
7844 HAVE_LIBEXPAT=no
7845 CPPFLAGS="$ac_save_CPPFLAGS"
7846 LIBEXPAT=
7847 LTLIBEXPAT=
7848 fi
95ca63c4
CF
7849
7850
7851
7cb9022a
MK
7852
7853
bec39cab 7854
81ecdfbb
RW
7855 if test "$HAVE_LIBEXPAT" != yes; then
7856 if test "$with_expat" = yes; then
7857 as_fn_error "expat is missing or unusable" "$LINENO" 5
7858 else
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7860$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7861 fi
7862 else
7863 save_LIBS=$LIBS
7864 LIBS="$LIBS $LIBEXPAT"
7865 for ac_func in XML_StopParser
7866do :
7867 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7868if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7869 cat >>confdefs.h <<_ACEOF
81ecdfbb 7870#define HAVE_XML_STOPPARSER 1
bec39cab 7871_ACEOF
95ca63c4 7872
bec39cab 7873fi
bec39cab 7874done
95ca63c4 7875
81ecdfbb
RW
7876 LIBS=$save_LIBS
7877 fi
a9322a30
TT
7878fi
7879
a9322a30 7880
a9322a30
TT
7881
7882
ec685c5e 7883
0c4a4063 7884
81ecdfbb
RW
7885# Check whether --with-python was given.
7886if test "${with_python+set}" = set; then :
7887 withval=$with_python;
bec39cab 7888else
81ecdfbb 7889 with_python=auto
bec39cab 7890fi
bec39cab 7891
81ecdfbb
RW
7892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7893$as_echo_n "checking whether to use python... " >&6; }
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7895$as_echo "$with_python" >&6; }
9a156167 7896
81ecdfbb
RW
7897if test "${with_python}" = no; then
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7899$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7900 have_libpython=no
bec39cab 7901else
81ecdfbb 7902 case "${with_python}" in
8c85a4e2 7903 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7904 if test -d ${with_python}; then
7905 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7906 python_prog="${with_python}/bin/python"
0c4a4063 7907 python_prefix=
9c4ea6c5
JB
7908 # If python does not exit ${with_python}/bin, then try in
7909 # ${with_python}. On Windows/MinGW, this is where the Python
7910 # executable is.
7911 if test ! -x "${python_prog}"; then
7912 python_prog="${with_python}/python"
7913 python_prefix=
7914 fi
e7a30f46 7915 if test ! -x "${python_prog}"; then
ec685c5e
DE
7916 # Fall back to gdb 7.0/7.1 behaviour.
7917 python_prog=missing
0c4a4063 7918 python_prefix=${with_python}
ec685c5e 7919 fi
e7a30f46 7920 elif test -x "${with_python}"; then
ec685c5e
DE
7921 # While we can't run python compiled for $host (unless host == build),
7922 # the user could write a script that provides the needed information,
7923 # so we support that.
ec685c5e 7924 python_prog=${with_python}
0c4a4063 7925 python_prefix=
ec685c5e
DE
7926 else
7927 as_fn_error "invalid value for --with-python" "$LINENO" 5
7928 fi
81ecdfbb 7929 ;;
ec685c5e
DE
7930 */*)
7931 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7932 as_fn_error "invalid value for --with-python" "$LINENO" 5
7933 ;;
ec685c5e
DE
7934 *)
7935 # The user has either specified auto, yes, or the name of the python
7936 # program assumed to be in $PATH.
7937 python_prefix=
7938 case "${with_python}" in
7939 yes | auto)
7940 if test ${build} = ${host}; then
7941 # Extract the first word of "python", so it can be a program name with args.
7942set dummy python; ac_word=$2
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7944$as_echo_n "checking for $ac_word... " >&6; }
7945if test "${ac_cv_path_python_prog_path+set}" = set; then :
7946 $as_echo_n "(cached) " >&6
7947else
7948 case $python_prog_path in
7949 [\\/]* | ?:[\\/]*)
7950 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
7951 ;;
7952 *)
7953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954for as_dir in $PATH
7955do
7956 IFS=$as_save_IFS
7957 test -z "$as_dir" && as_dir=.
7958 for ac_exec_ext in '' $ac_executable_extensions; do
7959 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7960 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
7961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7962 break 2
7963 fi
7964done
7965 done
7966IFS=$as_save_IFS
7967
7968 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
7969 ;;
7970esac
7971fi
7972python_prog_path=$ac_cv_path_python_prog_path
7973if test -n "$python_prog_path"; then
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
7975$as_echo "$python_prog_path" >&6; }
7976else
7977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982 if test "${python_prog_path}" = missing; then
7983 python_prog=missing
7984 else
7985 python_prog=${python_prog_path}
7986 fi
7987 else
7988 # Not much we can do except assume the cross-compiler will find the
7989 # right files.
7990 python_prog=missing
7991 fi
7992 ;;
7993 *)
7994 # While we can't run python compiled for $host (unless host == build),
7995 # the user could write a script that provides the needed information,
7996 # so we support that.
7997 python_prog="${with_python}"
7998 # Extract the first word of "${python_prog}", so it can be a program name with args.
7999set dummy ${python_prog}; ac_word=$2
8000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8001$as_echo_n "checking for $ac_word... " >&6; }
8002if test "${ac_cv_path_python_prog_path+set}" = set; then :
8003 $as_echo_n "(cached) " >&6
8004else
8005 case $python_prog_path in
8006 [\\/]* | ?:[\\/]*)
8007 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8008 ;;
8009 *)
8010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8011for as_dir in $PATH
8012do
8013 IFS=$as_save_IFS
8014 test -z "$as_dir" && as_dir=.
8015 for ac_exec_ext in '' $ac_executable_extensions; do
8016 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8017 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8019 break 2
8020 fi
8021done
8022 done
8023IFS=$as_save_IFS
8024
8025 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8026 ;;
8027esac
8028fi
8029python_prog_path=$ac_cv_path_python_prog_path
8030if test -n "$python_prog_path"; then
8031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8032$as_echo "$python_prog_path" >&6; }
8033else
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035$as_echo "no" >&6; }
8036fi
8037
8038
8039 if test "${python_prog_path}" = missing; then
8040 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8041 fi
8042 ;;
8043 esac
81ecdfbb
RW
8044 esac
8045
ec685c5e 8046 if test "${python_prog}" != missing; then
e7a30f46
DE
8047 # We have a python program to use, but it may be too old.
8048 # Don't flag an error for --with-python=auto (the default).
8049 have_python_config=yes
ec685c5e
DE
8050 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8051 if test $? != 0; then
e7a30f46
DE
8052 have_python_config=failed
8053 if test "${with_python}" != auto; then
8054 as_fn_error "failure running python-config --includes" "$LINENO" 5
8055 fi
ec685c5e
DE
8056 fi
8057 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8058 if test $? != 0; then
e7a30f46
DE
8059 have_python_config=failed
8060 if test "${with_python}" != auto; then
8061 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8062 fi
ec685c5e 8063 fi
0c4a4063
DE
8064 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8065 if test $? != 0; then
e7a30f46
DE
8066 have_python_config=failed
8067 if test "${with_python}" != auto; then
8068 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8069 fi
0c4a4063 8070 fi
ec685c5e 8071 else
ac534cba
JB
8072 # We do not have a python executable we can use to determine where
8073 # to find the Python headers and libs. We cannot guess the include
8074 # path from the python_prefix either, because that include path
8075 # depends on the Python version. So, there is nothing much we can
8076 # do except assume that the compiler will be able to find those files.
8077 python_includes=
8078 python_libs=
0c4a4063 8079 have_python_config=no
ec685c5e 8080 fi
bec39cab 8081
ec685c5e
DE
8082 # If we have python-config, only try the configuration it provides.
8083 # Otherwise fallback on the old way of trying different versions of
8084 # python in turn.
81ecdfbb 8085
ec685c5e
DE
8086 have_libpython=no
8087 if test "${have_python_config}" = yes; then
c1039e3c
JB
8088 # Determine the Python version by extracting "-lpython<version>"
8089 # part of the python_libs. <version> is usually X.Y with X and Y
8090 # being decimal numbers, but can also be XY (seen on Windows).
8091 #
8092 # The extraction is performed using sed with a regular expression.
8093 # Initially, the regexp used was using the '?' quantifier to make
8094 # the dot in the version number optional. Unfortunately, this
8095 # does not work with non-GNU versions of sed because, because of
8096 # what looks like a limitation (the '?' quantifier does not work
8097 # with back-references). We work around this limitation by using
8098 # the '*' quantifier instead. It means that, in theory, we might
8099 # match unexpected version strings such as "-lpython2..7", but
8100 # this seems unlikely in practice. And even if that happens,
8101 # an error will be triggered later on, when checking that version
8102 # number.
ec685c5e 8103 python_version=`echo " ${python_libs} " \
c1039e3c 8104 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8105 case "${python_version}" in
8106 python*)
ec685c5e
DE
8107
8108 version=${python_version}
8109
8110 new_CPPFLAGS=${python_includes}
8111 new_LIBS=${python_libs}
81ecdfbb
RW
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8113$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8114 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8115 save_LIBS=$LIBS
ec685c5e
DE
8116 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8117 LIBS="$LIBS $new_LIBS"
8118 found_usable_python=no
81ecdfbb 8119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8120/* end confdefs.h. */
ac534cba 8121#include "Python.h"
81ecdfbb
RW
8122int
8123main ()
8124{
8125Py_Initialize ();
8126 ;
8127 return 0;
8128}
bec39cab 8129_ACEOF
81ecdfbb 8130if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8131 have_libpython=${version}
8132 found_usable_python=yes
ac534cba
JB
8133 PYTHON_CPPFLAGS=$new_CPPFLAGS
8134 PYTHON_LIBS=$new_LIBS
9a156167 8135fi
81ecdfbb
RW
8136rm -f core conftest.err conftest.$ac_objext \
8137 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8138 CPPFLAGS=$save_CPPFLAGS
8139 LIBS=$save_LIBS
ec685c5e
DE
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8141$as_echo "${found_usable_python}" >&6; }
9a156167 8142
0c4a4063
DE
8143 ;;
8144 *)
ec685c5e 8145 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8146 ;;
8147 esac
e7a30f46 8148 elif test "${have_python_config}" != failed; then
ec685c5e 8149 if test "${have_libpython}" = no; then
9a156167 8150
420697bb
TT
8151 version=python2.7
8152
8153 new_CPPFLAGS=${python_includes}
8154 new_LIBS="${python_libs} -lpython2.7"
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8156$as_echo_n "checking for ${version}... " >&6; }
8157 save_CPPFLAGS=$CPPFLAGS
8158 save_LIBS=$LIBS
8159 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8160 LIBS="$LIBS $new_LIBS"
8161 found_usable_python=no
8162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8163/* end confdefs.h. */
ac534cba 8164#include "Python.h"
420697bb
TT
8165int
8166main ()
8167{
8168Py_Initialize ();
8169 ;
8170 return 0;
8171}
8172_ACEOF
8173if ac_fn_c_try_link "$LINENO"; then :
8174 have_libpython=${version}
8175 found_usable_python=yes
ac534cba
JB
8176 PYTHON_CPPFLAGS=$new_CPPFLAGS
8177 PYTHON_LIBS=$new_LIBS
420697bb
TT
8178fi
8179rm -f core conftest.err conftest.$ac_objext \
8180 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8181 CPPFLAGS=$save_CPPFLAGS
8182 LIBS=$save_LIBS
420697bb
TT
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8184$as_echo "${found_usable_python}" >&6; }
8185
8186 fi
8187 if test "${have_libpython}" = no; then
8188
ec685c5e
DE
8189 version=python2.6
8190
8191 new_CPPFLAGS=${python_includes}
8192 new_LIBS="${python_libs} -lpython2.6"
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8194$as_echo_n "checking for ${version}... " >&6; }
8195 save_CPPFLAGS=$CPPFLAGS
8196 save_LIBS=$LIBS
8197 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8198 LIBS="$LIBS $new_LIBS"
8199 found_usable_python=no
8200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8201/* end confdefs.h. */
ac534cba 8202#include "Python.h"
ec685c5e
DE
8203int
8204main ()
8205{
8206Py_Initialize ();
8207 ;
8208 return 0;
8209}
8210_ACEOF
8211if ac_fn_c_try_link "$LINENO"; then :
8212 have_libpython=${version}
8213 found_usable_python=yes
ac534cba
JB
8214 PYTHON_CPPFLAGS=$new_CPPFLAGS
8215 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8216fi
8217rm -f core conftest.err conftest.$ac_objext \
8218 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8219 CPPFLAGS=$save_CPPFLAGS
8220 LIBS=$save_LIBS
ec685c5e
DE
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8222$as_echo "${found_usable_python}" >&6; }
9a156167 8223
81ecdfbb 8224 fi
ec685c5e 8225 if test ${have_libpython} = no; then
9a156167 8226
81ecdfbb 8227 version=python2.5
9a156167 8228
ec685c5e
DE
8229 new_CPPFLAGS=${python_includes}
8230 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8232$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8233 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8234 save_LIBS=$LIBS
ec685c5e
DE
8235 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8236 LIBS="$LIBS $new_LIBS"
8237 found_usable_python=no
81ecdfbb 8238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8239/* end confdefs.h. */
ac534cba 8240#include "Python.h"
81ecdfbb
RW
8241int
8242main ()
8243{
8244Py_Initialize ();
8245 ;
8246 return 0;
8247}
436868fb 8248_ACEOF
81ecdfbb 8249if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8250 have_libpython=${version}
8251 found_usable_python=yes
ac534cba
JB
8252 PYTHON_CPPFLAGS=$new_CPPFLAGS
8253 PYTHON_LIBS=$new_LIBS
436868fb 8254fi
81ecdfbb
RW
8255rm -f core conftest.err conftest.$ac_objext \
8256 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8257 CPPFLAGS=$save_CPPFLAGS
8258 LIBS=$save_LIBS
ec685c5e
DE
8259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8260$as_echo "${found_usable_python}" >&6; }
a9322a30 8261
81ecdfbb 8262 fi
ec685c5e 8263 if test ${have_libpython} = no; then
a9322a30 8264
81ecdfbb 8265 version=python2.4
a9322a30 8266
ec685c5e
DE
8267 new_CPPFLAGS=${python_includes}
8268 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8270$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8271 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8272 save_LIBS=$LIBS
ec685c5e
DE
8273 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8274 LIBS="$LIBS $new_LIBS"
8275 found_usable_python=no
81ecdfbb 8276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8277/* end confdefs.h. */
ac534cba 8278#include "Python.h"
a9322a30
TT
8279int
8280main ()
8281{
81ecdfbb 8282Py_Initialize ();
a9322a30
TT
8283 ;
8284 return 0;
8285}
436868fb 8286_ACEOF
81ecdfbb 8287if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8288 have_libpython=${version}
8289 found_usable_python=yes
ac534cba
JB
8290 PYTHON_CPPFLAGS=$new_CPPFLAGS
8291 PYTHON_LIBS=$new_LIBS
436868fb 8292fi
81ecdfbb
RW
8293rm -f core conftest.err conftest.$ac_objext \
8294 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8295 CPPFLAGS=$save_CPPFLAGS
8296 LIBS=$save_LIBS
ec685c5e
DE
8297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8298$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8299
ec685c5e
DE
8300 fi
8301 fi
9c4ea6c5 8302 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8303
8304$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8305
9c4ea6c5 8306 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8307
8308$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8309
9c4ea6c5 8310 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8311
8312$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8313
9c4ea6c5 8314 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8315
8316$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8317
81ecdfbb 8318 fi
ec685c5e
DE
8319
8320 if test "${have_libpython}" = no; then
81ecdfbb
RW
8321 case "${with_python}" in
8322 yes)
8323 as_fn_error "python is missing or unusable" "$LINENO" 5
8324 ;;
8325 auto)
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8327$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8328 ;;
8329 *)
8330 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8331 ;;
8332 esac
0c4a4063
DE
8333 else
8334 if test -n "${python_prefix}"; then
8335
8336cat >>confdefs.h <<_ACEOF
8337#define WITH_PYTHON_PATH "${python_prefix}"
8338_ACEOF
8339
8340
8341 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8342 if test "x$prefix" = xNONE; then
8343 test_prefix=/usr/local
8344 else
8345 test_prefix=$prefix
8346 fi
8347 else
8348 test_prefix=$exec_prefix
8349 fi
8350 value=0
8351 case ${python_prefix} in
8352 "${test_prefix}"|"${test_prefix}/"*|\
8353 '${exec_prefix}'|'${exec_prefix}/'*)
8354 value=1
8355 ;;
8356 esac
8357
8358cat >>confdefs.h <<_ACEOF
8359#define PYTHON_PATH_RELOCATABLE $value
8360_ACEOF
8361
8362
8363 fi
81ecdfbb 8364 fi
436868fb 8365fi
436868fb 8366
ec685c5e 8367if test "${have_libpython}" != no; then
436868fb 8368
81ecdfbb 8369$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8370
81ecdfbb
RW
8371 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8372 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8373 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8374 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8375 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8376
81ecdfbb
RW
8377 # Flags needed to compile Python code (taken from python-config --cflags).
8378 # We cannot call python-config directly because it will output whatever was
8379 # used when compiling the Python interpreter itself, including flags which
8380 # would make the python-related objects be compiled differently from the
8381 # rest of GDB (e.g., -O2 and -fPIC).
8382 if test "${GCC}" = yes; then
8383 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8384 fi
436868fb 8385
81ecdfbb
RW
8386 if test "x${tentative_python_cflags}" != x; then
8387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8388$as_echo_n "checking compiler flags for python code... " >&6; }
8389 for flag in ${tentative_python_cflags}; do
8390 # Check that the compiler accepts it
8391 saved_CFLAGS="$CFLAGS"
8392 CFLAGS="$CFLAGS $flag"
8393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8394/* end confdefs.h. */
81ecdfbb 8395
a9322a30
TT
8396int
8397main ()
8398{
a9322a30
TT
8399
8400 ;
8401 return 0;
8402}
bec39cab 8403_ACEOF
81ecdfbb
RW
8404if ac_fn_c_try_compile "$LINENO"; then :
8405 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8406fi
81ecdfbb
RW
8407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8408 CFLAGS="$saved_CFLAGS"
8409 done
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8411$as_echo "${PYTHON_CFLAGS}" >&6; }
8412 fi
043b6510
JB
8413
8414 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8415 # #if _SGIAPI
8416 # #define siginfo __siginfo
8417 # #endif
8418 # The problem is that including Python causes some XOPEN macros to be
8419 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8420 # to false. So, we work around this issue by defining siginfo ourself
8421 # though the command-line.
8422 case "$gdb_host" in
8423 irix*) if test "${GCC}" = yes; then
8424 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8425 fi
8426 ;;
8427 esac
81ecdfbb
RW
8428else
8429 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8430 # included.
8431 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8432 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8433 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8434fi
9a156167 8435
9a156167 8436
ac534cba
JB
8437
8438
81ecdfbb
RW
8439# ------------------------- #
8440# Checks for header files. #
8441# ------------------------- #
c890192f 8442
81ecdfbb
RW
8443ac_header_dirent=no
8444for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8445 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8447$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8448if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8449 $as_echo_n "(cached) " >&6
bec39cab 8450else
81ecdfbb 8451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8452/* end confdefs.h. */
81ecdfbb
RW
8453#include <sys/types.h>
8454#include <$ac_hdr>
8455
a9322a30
TT
8456int
8457main ()
8458{
81ecdfbb
RW
8459if ((DIR *) 0)
8460return 0;
a9322a30
TT
8461 ;
8462 return 0;
8463}
bec39cab 8464_ACEOF
81ecdfbb
RW
8465if ac_fn_c_try_compile "$LINENO"; then :
8466 eval "$as_ac_Header=yes"
bec39cab 8467else
81ecdfbb 8468 eval "$as_ac_Header=no"
bec39cab 8469fi
81ecdfbb 8470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8471fi
81ecdfbb
RW
8472eval ac_res=\$$as_ac_Header
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8474$as_echo "$ac_res" >&6; }
8475eval as_val=\$$as_ac_Header
8476 if test "x$as_val" = x""yes; then :
8477 cat >>confdefs.h <<_ACEOF
8478#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8479_ACEOF
bec39cab 8480
81ecdfbb
RW
8481ac_header_dirent=$ac_hdr; break
8482fi
bec39cab 8483
81ecdfbb
RW
8484done
8485# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8486if test $ac_header_dirent = dirent.h; then
8487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8488$as_echo_n "checking for library containing opendir... " >&6; }
8489if test "${ac_cv_search_opendir+set}" = set; then :
8490 $as_echo_n "(cached) " >&6
c890192f 8491else
81ecdfbb
RW
8492 ac_func_search_save_LIBS=$LIBS
8493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8494/* end confdefs.h. */
8495
8496/* Override any GCC internal prototype to avoid an error.
8497 Use char because int might match the return type of a GCC
8498 builtin and then its argument prototype would still apply. */
8499#ifdef __cplusplus
8500extern "C"
8501#endif
8502char opendir ();
8503int
8504main ()
8505{
8506return opendir ();
8507 ;
8508 return 0;
8509}
bec39cab 8510_ACEOF
81ecdfbb
RW
8511for ac_lib in '' dir; do
8512 if test -z "$ac_lib"; then
8513 ac_res="none required"
8514 else
8515 ac_res=-l$ac_lib
8516 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8517 fi
8518 if ac_fn_c_try_link "$LINENO"; then :
8519 ac_cv_search_opendir=$ac_res
8520fi
8521rm -f core conftest.err conftest.$ac_objext \
8522 conftest$ac_exeext
8523 if test "${ac_cv_search_opendir+set}" = set; then :
8524 break
8525fi
8526done
8527if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8528
81ecdfbb
RW
8529else
8530 ac_cv_search_opendir=no
8531fi
8532rm conftest.$ac_ext
8533LIBS=$ac_func_search_save_LIBS
8534fi
8535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8536$as_echo "$ac_cv_search_opendir" >&6; }
8537ac_res=$ac_cv_search_opendir
8538if test "$ac_res" != no; then :
8539 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8540
bec39cab 8541fi
81ecdfbb 8542
bec39cab 8543else
81ecdfbb
RW
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8545$as_echo_n "checking for library containing opendir... " >&6; }
8546if test "${ac_cv_search_opendir+set}" = set; then :
8547 $as_echo_n "(cached) " >&6
8548else
8549 ac_func_search_save_LIBS=$LIBS
8550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8551/* end confdefs.h. */
81ecdfbb
RW
8552
8553/* Override any GCC internal prototype to avoid an error.
8554 Use char because int might match the return type of a GCC
8555 builtin and then its argument prototype would still apply. */
8556#ifdef __cplusplus
8557extern "C"
8558#endif
8559char opendir ();
a9322a30
TT
8560int
8561main ()
8562{
81ecdfbb 8563return opendir ();
a9322a30
TT
8564 ;
8565 return 0;
8566}
bec39cab 8567_ACEOF
81ecdfbb
RW
8568for ac_lib in '' x; do
8569 if test -z "$ac_lib"; then
8570 ac_res="none required"
8571 else
8572 ac_res=-l$ac_lib
8573 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8574 fi
8575 if ac_fn_c_try_link "$LINENO"; then :
8576 ac_cv_search_opendir=$ac_res
8577fi
8578rm -f core conftest.err conftest.$ac_objext \
8579 conftest$ac_exeext
8580 if test "${ac_cv_search_opendir+set}" = set; then :
8581 break
8582fi
8583done
8584if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8585
81ecdfbb
RW
8586else
8587 ac_cv_search_opendir=no
bec39cab 8588fi
81ecdfbb
RW
8589rm conftest.$ac_ext
8590LIBS=$ac_func_search_save_LIBS
a9322a30 8591fi
81ecdfbb
RW
8592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8593$as_echo "$ac_cv_search_opendir" >&6; }
8594ac_res=$ac_cv_search_opendir
8595if test "$ac_res" != no; then :
8596 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8597
81ecdfbb 8598fi
bec39cab 8599
81ecdfbb 8600fi
bec39cab 8601
81ecdfbb
RW
8602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8603$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8604if test "${ac_cv_header_stat_broken+set}" = set; then :
8605 $as_echo_n "(cached) " >&6
9a156167 8606else
81ecdfbb
RW
8607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8608/* end confdefs.h. */
8609#include <sys/types.h>
8610#include <sys/stat.h>
8611
8612#if defined S_ISBLK && defined S_IFDIR
8613extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8614#endif
8615
8616#if defined S_ISBLK && defined S_IFCHR
8617extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8618#endif
8619
8620#if defined S_ISLNK && defined S_IFREG
8621extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8622#endif
8623
8624#if defined S_ISSOCK && defined S_IFREG
8625extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8626#endif
8627
bec39cab 8628_ACEOF
81ecdfbb
RW
8629if ac_fn_c_try_compile "$LINENO"; then :
8630 ac_cv_header_stat_broken=no
8631else
8632 ac_cv_header_stat_broken=yes
8633fi
8634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8635fi
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8637$as_echo "$ac_cv_header_stat_broken" >&6; }
8638if test $ac_cv_header_stat_broken = yes; then
9a156167 8639
81ecdfbb 8640$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 8641
bec39cab 8642fi
81ecdfbb
RW
8643
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8645$as_echo_n "checking for ANSI C header files... " >&6; }
8646if test "${ac_cv_header_stdc+set}" = set; then :
8647 $as_echo_n "(cached) " >&6
bec39cab 8648else
81ecdfbb 8649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8650/* end confdefs.h. */
81ecdfbb
RW
8651#include <stdlib.h>
8652#include <stdarg.h>
8653#include <string.h>
8654#include <float.h>
8655
a9322a30
TT
8656int
8657main ()
8658{
a9322a30
TT
8659
8660 ;
8661 return 0;
8662}
bec39cab 8663_ACEOF
81ecdfbb
RW
8664if ac_fn_c_try_compile "$LINENO"; then :
8665 ac_cv_header_stdc=yes
bec39cab 8666else
81ecdfbb 8667 ac_cv_header_stdc=no
a9322a30 8668fi
81ecdfbb 8669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8670
81ecdfbb
RW
8671if test $ac_cv_header_stdc = yes; then
8672 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8674/* end confdefs.h. */
8675#include <string.h>
bec39cab 8676
81ecdfbb
RW
8677_ACEOF
8678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8679 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8680
bec39cab 8681else
81ecdfbb
RW
8682 ac_cv_header_stdc=no
8683fi
8684rm -f conftest*
8685
8686fi
8687
8688if test $ac_cv_header_stdc = yes; then
8689 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691/* end confdefs.h. */
8692#include <stdlib.h>
8693
bec39cab 8694_ACEOF
81ecdfbb
RW
8695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8696 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8697
81ecdfbb
RW
8698else
8699 ac_cv_header_stdc=no
8700fi
8701rm -f conftest*
bec39cab 8702
bec39cab 8703fi
81ecdfbb
RW
8704
8705if test $ac_cv_header_stdc = yes; then
8706 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8707 if test "$cross_compiling" = yes; then :
8708 :
bec39cab 8709else
81ecdfbb 8710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8711/* end confdefs.h. */
81ecdfbb
RW
8712#include <ctype.h>
8713#include <stdlib.h>
8714#if ((' ' & 0x0FF) == 0x020)
8715# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8716# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8717#else
8718# define ISLOWER(c) \
8719 (('a' <= (c) && (c) <= 'i') \
8720 || ('j' <= (c) && (c) <= 'r') \
8721 || ('s' <= (c) && (c) <= 'z'))
8722# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8723#endif
8724
8725#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8726int
8727main ()
8728{
81ecdfbb
RW
8729 int i;
8730 for (i = 0; i < 256; i++)
8731 if (XOR (islower (i), ISLOWER (i))
8732 || toupper (i) != TOUPPER (i))
8733 return 2;
a9322a30
TT
8734 return 0;
8735}
bec39cab 8736_ACEOF
81ecdfbb
RW
8737if ac_fn_c_try_run "$LINENO"; then :
8738
bec39cab 8739else
81ecdfbb
RW
8740 ac_cv_header_stdc=no
8741fi
8742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8743 conftest.$ac_objext conftest.beam conftest.$ac_ext
8744fi
bec39cab 8745
bec39cab 8746fi
a9322a30 8747fi
81ecdfbb
RW
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8749$as_echo "$ac_cv_header_stdc" >&6; }
8750if test $ac_cv_header_stdc = yes; then
bec39cab 8751
81ecdfbb 8752$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8753
81ecdfbb 8754fi
bec39cab 8755
81ecdfbb
RW
8756# elf_hp.h is for HP/UX 64-bit shared library support.
8757# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
8758# unconditionally, so what's the point in checking these?
8759for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8760 thread_db.h gnu/libc-version.h signal.h stddef.h \
8761 stdlib.h string.h memory.h strings.h sys/fault.h \
8762 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8763 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8764 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8765 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 8766 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 8767 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
8768do :
8769 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8770ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8771eval as_val=\$$as_ac_Header
8772 if test "x$as_val" = x""yes; then :
bec39cab 8773 cat >>confdefs.h <<_ACEOF
81ecdfbb 8774#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8775_ACEOF
c906108c 8776
bec39cab 8777fi
81ecdfbb
RW
8778
8779done
8780
8781for ac_header in link.h
8782do :
8783 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8784# include <sys/types.h>
8785#endif
8786#if HAVE_NLIST_H
8787# include <nlist.h>
a9322a30
TT
8788#endif
8789
81ecdfbb
RW
8790"
8791if test "x$ac_cv_header_link_h" = x""yes; then :
8792 cat >>confdefs.h <<_ACEOF
8793#define HAVE_LINK_H 1
bec39cab 8794_ACEOF
bec39cab 8795
a9322a30 8796fi
bec39cab 8797
81ecdfbb 8798done
c906108c 8799
81ecdfbb
RW
8800for ac_header in sys/proc.h
8801do :
8802 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8803# include <sys/param.h>
8804#endif
c906108c 8805
81ecdfbb
RW
8806"
8807if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8808 cat >>confdefs.h <<_ACEOF
81ecdfbb 8809#define HAVE_SYS_PROC_H 1
bec39cab 8810_ACEOF
5ee754fc 8811
bec39cab 8812fi
81ecdfbb
RW
8813
8814done
8815
8816for ac_header in sys/user.h
8817do :
8818 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8819# include <sys/param.h>
a9322a30
TT
8820#endif
8821
81ecdfbb
RW
8822"
8823if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8824 cat >>confdefs.h <<_ACEOF
8825#define HAVE_SYS_USER_H 1
bec39cab 8826_ACEOF
bec39cab 8827
a9322a30 8828fi
bec39cab 8829
81ecdfbb 8830done
5ee754fc 8831
5ee754fc 8832
81ecdfbb
RW
8833# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8834# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8835# think that we don't have <curses.h> if we're using GCC.
8836case $host_os in
8837 solaris2.[789])
8838 if test "$GCC" = yes; then
8839
8840$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8841
8842 fi ;;
8843esac
8844for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8845do :
8846 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8847ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8848eval as_val=\$$as_ac_Header
8849 if test "x$as_val" = x""yes; then :
bec39cab 8850 cat >>confdefs.h <<_ACEOF
81ecdfbb 8851#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8852_ACEOF
5ee754fc
MK
8853
8854fi
8855
81ecdfbb 8856done
bec39cab 8857
81ecdfbb
RW
8858for ac_header in term.h
8859do :
8860 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8861# include <curses.h>
8862#endif
bec39cab 8863
81ecdfbb
RW
8864"
8865if test "x$ac_cv_header_term_h" = x""yes; then :
8866 cat >>confdefs.h <<_ACEOF
8867#define HAVE_TERM_H 1
a8111142 8868_ACEOF
a8111142 8869
a8111142 8870fi
a8111142 8871
81ecdfbb 8872done
a8111142
TT
8873
8874
81ecdfbb
RW
8875# ------------------------- #
8876# Checks for declarations. #
8877# ------------------------- #
a9322a30 8878
81ecdfbb
RW
8879ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8880if test "x$ac_cv_have_decl_free" = x""yes; then :
8881 ac_have_decl=1
bec39cab 8882else
81ecdfbb
RW
8883 ac_have_decl=0
8884fi
8885
8886cat >>confdefs.h <<_ACEOF
8887#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8888_ACEOF
81ecdfbb
RW
8889ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8890if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8891 ac_have_decl=1
8892else
8893 ac_have_decl=0
8894fi
8895
8896cat >>confdefs.h <<_ACEOF
8897#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 8898_ACEOF
81ecdfbb
RW
8899ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
8900if test "x$ac_cv_have_decl_realloc" = x""yes; then :
8901 ac_have_decl=1
bec39cab 8902else
81ecdfbb
RW
8903 ac_have_decl=0
8904fi
bec39cab 8905
81ecdfbb
RW
8906cat >>confdefs.h <<_ACEOF
8907#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 8908_ACEOF
81ecdfbb
RW
8909ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
8910if test "x$ac_cv_have_decl_strerror" = x""yes; then :
8911 ac_have_decl=1
8912else
8913 ac_have_decl=0
8914fi
8915
8916cat >>confdefs.h <<_ACEOF
8917#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 8918_ACEOF
81ecdfbb
RW
8919ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8920if test "x$ac_cv_have_decl_strstr" = x""yes; then :
8921 ac_have_decl=1
bec39cab 8922else
81ecdfbb
RW
8923 ac_have_decl=0
8924fi
5ee754fc 8925
81ecdfbb
RW
8926cat >>confdefs.h <<_ACEOF
8927#define HAVE_DECL_STRSTR $ac_have_decl
8928_ACEOF
8929ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
8930if test "x$ac_cv_have_decl_getopt" = x""yes; then :
8931 ac_have_decl=1
8932else
8933 ac_have_decl=0
5ee754fc 8934fi
81ecdfbb
RW
8935
8936cat >>confdefs.h <<_ACEOF
8937#define HAVE_DECL_GETOPT $ac_have_decl
8938_ACEOF
8939ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
8940if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
8941 ac_have_decl=1
8942else
8943 ac_have_decl=0
5ee754fc 8944fi
81ecdfbb
RW
8945
8946cat >>confdefs.h <<_ACEOF
8947#define HAVE_DECL_SNPRINTF $ac_have_decl
8948_ACEOF
8949ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
8950if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
8951 ac_have_decl=1
8952else
8953 ac_have_decl=0
5ee754fc
MK
8954fi
8955
a9322a30 8956cat >>confdefs.h <<_ACEOF
81ecdfbb 8957#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 8958_ACEOF
5ee754fc 8959
5ee754fc 8960
81ecdfbb
RW
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
8962$as_echo_n "checking for LC_MESSAGES... " >&6; }
8963if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
8964 $as_echo_n "(cached) " >&6
bec39cab 8965else
81ecdfbb 8966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8967/* end confdefs.h. */
81ecdfbb 8968#include <locale.h>
a9322a30
TT
8969int
8970main ()
8971{
81ecdfbb 8972return LC_MESSAGES
a9322a30
TT
8973 ;
8974 return 0;
8975}
bec39cab 8976_ACEOF
81ecdfbb
RW
8977if ac_fn_c_try_link "$LINENO"; then :
8978 am_cv_val_LC_MESSAGES=yes
bec39cab 8979else
81ecdfbb
RW
8980 am_cv_val_LC_MESSAGES=no
8981fi
8982rm -f core conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
8984fi
8985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
8986$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
8987 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 8988
81ecdfbb
RW
8989$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
8990
8991 fi
8992
8993
8994# ----------------------- #
8995# Checks for structures. #
8996# ----------------------- #
8997
8998ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8999if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9000
9001cat >>confdefs.h <<_ACEOF
9002#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9003_ACEOF
7eb368b3 9004
81ecdfbb 9005
7eb368b3 9006fi
81ecdfbb
RW
9007ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9008if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9009
a9322a30
TT
9010cat >>confdefs.h <<_ACEOF
9011#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9012_ACEOF
9013
a9322a30 9014
7eb368b3
NR
9015fi
9016
7eb368b3 9017
a9322a30
TT
9018# ------------------ #
9019# Checks for types. #
9020# ------------------ #
7eb368b3 9021
81ecdfbb
RW
9022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9023$as_echo_n "checking return type of signal handlers... " >&6; }
9024if test "${ac_cv_type_signal+set}" = set; then :
9025 $as_echo_n "(cached) " >&6
bec39cab 9026else
81ecdfbb 9027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9028/* end confdefs.h. */
a9322a30
TT
9029#include <sys/types.h>
9030#include <signal.h>
7cb9022a 9031
a9322a30
TT
9032int
9033main ()
9034{
81ecdfbb 9035return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9036 ;
9037 return 0;
9038}
bec39cab 9039_ACEOF
81ecdfbb
RW
9040if ac_fn_c_try_compile "$LINENO"; then :
9041 ac_cv_type_signal=int
bec39cab 9042else
81ecdfbb 9043 ac_cv_type_signal=void
bec39cab 9044fi
81ecdfbb 9045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9046fi
81ecdfbb
RW
9047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9048$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9049
a9322a30
TT
9050cat >>confdefs.h <<_ACEOF
9051#define RETSIGTYPE $ac_cv_type_signal
9052_ACEOF
5ee754fc 9053
bec39cab 9054
81ecdfbb 9055ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9056#include <sys/socket.h>
9057
81ecdfbb
RW
9058"
9059if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9060
a9322a30
TT
9061cat >>confdefs.h <<_ACEOF
9062#define HAVE_SOCKLEN_T 1
9063_ACEOF
9064
9065
9066fi
9067
9068
9069# ------------------------------------- #
9070# Checks for compiler characteristics. #
9071# ------------------------------------- #
9072
81ecdfbb
RW
9073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9074$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9075if test "${ac_cv_c_const+set}" = set; then :
9076 $as_echo_n "(cached) " >&6
a9322a30 9077else
81ecdfbb 9078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9079/* end confdefs.h. */
a9322a30
TT
9080
9081int
9082main ()
9083{
9084/* FIXME: Include the comments suggested by Paul. */
9085#ifndef __cplusplus
9086 /* Ultrix mips cc rejects this. */
9087 typedef int charset[2];
81ecdfbb 9088 const charset cs;
a9322a30 9089 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9090 char const *const *pcpcc;
9091 char **ppc;
a9322a30
TT
9092 /* NEC SVR4.0.2 mips cc rejects this. */
9093 struct point {int x, y;};
9094 static struct point const zero = {0,0};
9095 /* AIX XL C 1.02.0.0 rejects this.
9096 It does not let you subtract one const X* pointer from another in
9097 an arm of an if-expression whose if-part is not a constant
9098 expression */
9099 const char *g = "string";
81ecdfbb 9100 pcpcc = &g + (g ? g-g : 0);
a9322a30 9101 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9102 ++pcpcc;
9103 ppc = (char**) pcpcc;
9104 pcpcc = (char const *const *) ppc;
a9322a30
TT
9105 { /* SCO 3.2v4 cc rejects this. */
9106 char *t;
9107 char const *s = 0 ? (char *) 0 : (char const *) 0;
9108
9109 *t++ = 0;
81ecdfbb 9110 if (s) return 0;
a9322a30
TT
9111 }
9112 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9113 int x[] = {25, 17};
9114 const int *foo = &x[0];
9115 ++foo;
9116 }
9117 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9118 typedef const int *iptr;
9119 iptr p = 0;
9120 ++p;
9121 }
9122 { /* AIX XL C 1.02.0.0 rejects this saying
9123 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9124 struct s { int j; const int *ap[3]; };
9125 struct s *b; b->j = 5;
9126 }
9127 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9128 const int foo = 10;
81ecdfbb 9129 if (!foo) return 0;
a9322a30 9130 }
81ecdfbb 9131 return !cs[0] && !zero.x;
a9322a30
TT
9132#endif
9133
9134 ;
9135 return 0;
9136}
bec39cab 9137_ACEOF
81ecdfbb 9138if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9139 ac_cv_c_const=yes
5ee754fc 9140else
81ecdfbb 9141 ac_cv_c_const=no
5ee754fc 9142fi
81ecdfbb 9143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9144fi
81ecdfbb
RW
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9146$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9147if test $ac_cv_c_const = no; then
bec39cab 9148
81ecdfbb 9149$as_echo "#define const /**/" >>confdefs.h
bec39cab 9150
5ee754fc 9151fi
bec39cab 9152
81ecdfbb
RW
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9154$as_echo_n "checking for inline... " >&6; }
9155if test "${ac_cv_c_inline+set}" = set; then :
9156 $as_echo_n "(cached) " >&6
bec39cab 9157else
a9322a30
TT
9158 ac_cv_c_inline=no
9159for ac_kw in inline __inline__ __inline; do
81ecdfbb 9160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9161/* end confdefs.h. */
a9322a30
TT
9162#ifndef __cplusplus
9163typedef int foo_t;
9164static $ac_kw foo_t static_foo () {return 0; }
9165$ac_kw foo_t foo () {return 0; }
9166#endif
9167
bec39cab 9168_ACEOF
81ecdfbb
RW
9169if ac_fn_c_try_compile "$LINENO"; then :
9170 ac_cv_c_inline=$ac_kw
bec39cab 9171fi
81ecdfbb
RW
9172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9173 test "$ac_cv_c_inline" != no && break
a9322a30 9174done
bec39cab 9175
5ee754fc 9176fi
81ecdfbb
RW
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9178$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9179
a9322a30
TT
9180case $ac_cv_c_inline in
9181 inline | yes) ;;
9182 *)
9183 case $ac_cv_c_inline in
9184 no) ac_val=;;
9185 *) ac_val=$ac_cv_c_inline;;
9186 esac
9187 cat >>confdefs.h <<_ACEOF
9188#ifndef __cplusplus
9189#define inline $ac_val
9190#endif
9191_ACEOF
bec39cab
AC
9192 ;;
9193esac
bec39cab 9194
81ecdfbb
RW
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9196$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9197if test "${ac_cv_c_bigendian+set}" = set; then :
9198 $as_echo_n "(cached) " >&6
bec39cab 9199else
81ecdfbb
RW
9200 ac_cv_c_bigendian=unknown
9201 # See if we're dealing with a universal compiler.
9202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9203/* end confdefs.h. */
9204#ifndef __APPLE_CC__
9205 not a universal capable compiler
9206 #endif
9207 typedef int dummy;
9208
9209_ACEOF
9210if ac_fn_c_try_compile "$LINENO"; then :
9211
9212 # Check for potential -arch flags. It is not universal unless
9213 # there are at least two -arch flags with different values.
9214 ac_arch=
9215 ac_prev=
9216 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9217 if test -n "$ac_prev"; then
9218 case $ac_word in
9219 i?86 | x86_64 | ppc | ppc64)
9220 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9221 ac_arch=$ac_word
9222 else
9223 ac_cv_c_bigendian=universal
9224 break
9225 fi
9226 ;;
9227 esac
9228 ac_prev=
9229 elif test "x$ac_word" = "x-arch"; then
9230 ac_prev=arch
9231 fi
9232 done
9233fi
9234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9235 if test $ac_cv_c_bigendian = unknown; then
9236 # See if sys/param.h defines the BYTE_ORDER macro.
9237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9238/* end confdefs.h. */
a9322a30 9239#include <sys/types.h>
81ecdfbb 9240 #include <sys/param.h>
a9322a30
TT
9241
9242int
9243main ()
9244{
81ecdfbb
RW
9245#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9246 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9247 && LITTLE_ENDIAN)
9248 bogus endian macros
9249 #endif
a9322a30
TT
9250
9251 ;
9252 return 0;
9253}
bec39cab 9254_ACEOF
81ecdfbb 9255if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9256 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9258/* end confdefs.h. */
a9322a30 9259#include <sys/types.h>
81ecdfbb 9260 #include <sys/param.h>
a9322a30
TT
9261
9262int
9263main ()
9264{
9265#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9266 not big endian
9267 #endif
a9322a30
TT
9268
9269 ;
9270 return 0;
9271}
bec39cab 9272_ACEOF
81ecdfbb 9273if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9274 ac_cv_c_bigendian=yes
5ee754fc 9275else
81ecdfbb 9276 ac_cv_c_bigendian=no
5ee754fc 9277fi
81ecdfbb
RW
9278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9279fi
9280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9281 fi
9282 if test $ac_cv_c_bigendian = unknown; then
9283 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9285/* end confdefs.h. */
9286#include <limits.h>
bec39cab 9287
81ecdfbb
RW
9288int
9289main ()
9290{
9291#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9292 bogus endian macros
9293 #endif
9294
9295 ;
9296 return 0;
9297}
7eb368b3 9298_ACEOF
81ecdfbb
RW
9299if ac_fn_c_try_compile "$LINENO"; then :
9300 # It does; now see whether it defined to _BIG_ENDIAN or not.
9301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9302/* end confdefs.h. */
81ecdfbb
RW
9303#include <limits.h>
9304
7eb368b3
NR
9305int
9306main ()
9307{
81ecdfbb
RW
9308#ifndef _BIG_ENDIAN
9309 not big endian
9310 #endif
9311
7eb368b3
NR
9312 ;
9313 return 0;
9314}
9315_ACEOF
81ecdfbb 9316if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9317 ac_cv_c_bigendian=yes
81ecdfbb
RW
9318else
9319 ac_cv_c_bigendian=no
a9322a30 9320fi
81ecdfbb 9321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9322fi
81ecdfbb
RW
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9324 fi
9325 if test $ac_cv_c_bigendian = unknown; then
9326 # Compile a test program.
9327 if test "$cross_compiling" = yes; then :
9328 # Try to guess by grepping values from an object file.
9329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9330/* end confdefs.h. */
9331short int ascii_mm[] =
9332 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9333 short int ascii_ii[] =
9334 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9335 int use_ascii (int i) {
9336 return ascii_mm[i] + ascii_ii[i];
9337 }
9338 short int ebcdic_ii[] =
9339 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9340 short int ebcdic_mm[] =
9341 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9342 int use_ebcdic (int i) {
9343 return ebcdic_mm[i] + ebcdic_ii[i];
9344 }
9345 extern int foo;
7eb368b3 9346
81ecdfbb
RW
9347int
9348main ()
9349{
9350return use_ascii (foo) == use_ebcdic (foo);
9351 ;
9352 return 0;
9353}
9354_ACEOF
9355if ac_fn_c_try_compile "$LINENO"; then :
9356 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9357 ac_cv_c_bigendian=yes
9358 fi
9359 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9360 if test "$ac_cv_c_bigendian" = unknown; then
9361 ac_cv_c_bigendian=no
9362 else
9363 # finding both strings is unlikely to happen, but who knows?
9364 ac_cv_c_bigendian=unknown
9365 fi
9366 fi
7eb368b3 9367fi
81ecdfbb 9368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9369else
81ecdfbb 9370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9371/* end confdefs.h. */
81ecdfbb 9372$ac_includes_default
d3ea6809
MM
9373int
9374main ()
9375{
81ecdfbb
RW
9376
9377 /* Are we little or big endian? From Harbison&Steele. */
9378 union
9379 {
9380 long int l;
9381 char c[sizeof (long int)];
9382 } u;
9383 u.l = 1;
9384 return u.c[sizeof (long int) - 1] == 1;
9385
9386 ;
9387 return 0;
d3ea6809
MM
9388}
9389_ACEOF
81ecdfbb 9390if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9391 ac_cv_c_bigendian=no
d3ea6809 9392else
81ecdfbb 9393 ac_cv_c_bigendian=yes
d3ea6809 9394fi
81ecdfbb
RW
9395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9396 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9397fi
a9322a30 9398
81ecdfbb
RW
9399 fi
9400fi
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9402$as_echo "$ac_cv_c_bigendian" >&6; }
9403 case $ac_cv_c_bigendian in #(
9404 yes)
9405 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9406;; #(
9407 no)
9408 ;; #(
9409 universal)
9410
9411$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9412
9413 ;; #(
9414 *)
9415 as_fn_error "unknown endianness
9416 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9417 esac
d3ea6809
MM
9418
9419
a9322a30
TT
9420# ------------------------------ #
9421# Checks for library functions. #
9422# ------------------------------ #
d3ea6809 9423
a9322a30
TT
9424# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9425# for constant arguments. Useless!
81ecdfbb
RW
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9427$as_echo_n "checking for working alloca.h... " >&6; }
9428if test "${ac_cv_working_alloca_h+set}" = set; then :
9429 $as_echo_n "(cached) " >&6
d3ea6809 9430else
81ecdfbb 9431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9432/* end confdefs.h. */
a9322a30 9433#include <alloca.h>
bec39cab
AC
9434int
9435main ()
9436{
a9322a30 9437char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9438 if (p) return 0;
bec39cab
AC
9439 ;
9440 return 0;
9441}
9442_ACEOF
81ecdfbb 9443if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9444 ac_cv_working_alloca_h=yes
bec39cab 9445else
81ecdfbb 9446 ac_cv_working_alloca_h=no
bec39cab 9447fi
81ecdfbb
RW
9448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
bec39cab 9450fi
81ecdfbb
RW
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9452$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9453if test $ac_cv_working_alloca_h = yes; then
9454
81ecdfbb 9455$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9456
c906108c 9457fi
bec39cab 9458
81ecdfbb
RW
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9460$as_echo_n "checking for alloca... " >&6; }
9461if test "${ac_cv_func_alloca_works+set}" = set; then :
9462 $as_echo_n "(cached) " >&6
bec39cab 9463else
81ecdfbb 9464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9465/* end confdefs.h. */
a9322a30
TT
9466#ifdef __GNUC__
9467# define alloca __builtin_alloca
b4e70030 9468#else
a9322a30
TT
9469# ifdef _MSC_VER
9470# include <malloc.h>
9471# define alloca _alloca
9472# else
81ecdfbb 9473# ifdef HAVE_ALLOCA_H
a9322a30
TT
9474# include <alloca.h>
9475# else
9476# ifdef _AIX
9477 #pragma alloca
9478# else
9479# ifndef alloca /* predefined by HP cc +Olibcalls */
9480char *alloca ();
9481# endif
9482# endif
9483# endif
9484# endif
c906108c 9485#endif
97bf5e38 9486
bec39cab
AC
9487int
9488main ()
9489{
a9322a30 9490char *p = (char *) alloca (1);
81ecdfbb 9491 if (p) return 0;
bec39cab
AC
9492 ;
9493 return 0;
9494}
9495_ACEOF
81ecdfbb 9496if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9497 ac_cv_func_alloca_works=yes
bec39cab 9498else
81ecdfbb 9499 ac_cv_func_alloca_works=no
bec39cab 9500fi
81ecdfbb
RW
9501rm -f core conftest.err conftest.$ac_objext \
9502 conftest$ac_exeext conftest.$ac_ext
bec39cab 9503fi
81ecdfbb
RW
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9505$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9506
9507if test $ac_cv_func_alloca_works = yes; then
9508
81ecdfbb 9509$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9510
a9322a30
TT
9511else
9512 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9513# that cause trouble. Some versions do not even contain alloca or
9514# contain a buggy version. If you still want to use their alloca,
9515# use ar to extract alloca.o from them instead of compiling alloca.c.
9516
81ecdfbb 9517ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9518
81ecdfbb 9519$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9520
bec39cab 9521
81ecdfbb
RW
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9523$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9524if test "${ac_cv_os_cray+set}" = set; then :
9525 $as_echo_n "(cached) " >&6
a9322a30 9526else
81ecdfbb 9527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9528/* end confdefs.h. */
81ecdfbb 9529#if defined CRAY && ! defined CRAY2
a9322a30
TT
9530webecray
9531#else
9532wenotbecray
9533#endif
9534
9535_ACEOF
9536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9537 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9538 ac_cv_os_cray=yes
9539else
81ecdfbb 9540 ac_cv_os_cray=no
bec39cab 9541fi
81ecdfbb
RW
9542rm -f conftest*
9543
bec39cab 9544fi
81ecdfbb
RW
9545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9546$as_echo "$ac_cv_os_cray" >&6; }
9547if test $ac_cv_os_cray = yes; then
9548 for ac_func in _getb67 GETB67 getb67; do
9549 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9550ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9551eval as_val=\$$as_ac_var
9552 if test "x$as_val" = x""yes; then :
a9322a30
TT
9553
9554cat >>confdefs.h <<_ACEOF
9555#define CRAY_STACKSEG_END $ac_func
bec39cab 9556_ACEOF
c906108c 9557
a9322a30 9558 break
c906108c
SS
9559fi
9560
a9322a30
TT
9561 done
9562fi
bec39cab 9563
81ecdfbb
RW
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9565$as_echo_n "checking stack direction for C alloca... " >&6; }
9566if test "${ac_cv_c_stack_direction+set}" = set; then :
9567 $as_echo_n "(cached) " >&6
a9322a30 9568else
81ecdfbb 9569 if test "$cross_compiling" = yes; then :
a9322a30 9570 ac_cv_c_stack_direction=0
bec39cab 9571else
81ecdfbb 9572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9573/* end confdefs.h. */
81ecdfbb 9574$ac_includes_default
a9322a30
TT
9575int
9576find_stack_direction ()
b4e70030 9577{
a9322a30
TT
9578 static char *addr = 0;
9579 auto char dummy;
9580 if (addr == 0)
9581 {
9582 addr = &dummy;
9583 return find_stack_direction ();
9584 }
9585 else
9586 return (&dummy > addr) ? 1 : -1;
b4e70030 9587}
b757528f 9588
bec39cab
AC
9589int
9590main ()
9591{
81ecdfbb 9592 return find_stack_direction () < 0;
bec39cab
AC
9593}
9594_ACEOF
81ecdfbb 9595if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9596 ac_cv_c_stack_direction=1
9597else
81ecdfbb 9598 ac_cv_c_stack_direction=-1
a9322a30 9599fi
81ecdfbb
RW
9600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9601 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9602fi
a9322a30 9603
81ecdfbb
RW
9604fi
9605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9606$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9607cat >>confdefs.h <<_ACEOF
9608#define STACK_DIRECTION $ac_cv_c_stack_direction
9609_ACEOF
9610
9611
9612fi
9613
a9322a30 9614for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9615do :
9616 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9617ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9618eval as_val=\$$as_ac_Header
9619 if test "x$as_val" = x""yes; then :
bec39cab 9620 cat >>confdefs.h <<_ACEOF
81ecdfbb 9621#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9622_ACEOF
b757528f 9623
b757528f 9624fi
bec39cab 9625
a9322a30 9626done
a3828db0 9627
a9322a30 9628for ac_func in getpagesize
81ecdfbb
RW
9629do :
9630 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9631if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9632 cat >>confdefs.h <<_ACEOF
81ecdfbb 9633#define HAVE_GETPAGESIZE 1
bec39cab 9634_ACEOF
bcb3dc3d 9635
bcb3dc3d
MK
9636fi
9637done
9638
81ecdfbb
RW
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9640$as_echo_n "checking for working mmap... " >&6; }
9641if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9642 $as_echo_n "(cached) " >&6
a9322a30 9643else
81ecdfbb 9644 if test "$cross_compiling" = yes; then :
a9322a30 9645 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9646else
81ecdfbb 9647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9648/* end confdefs.h. */
a9322a30
TT
9649$ac_includes_default
9650/* malloc might have been renamed as rpl_malloc. */
9651#undef malloc
bec39cab 9652
a9322a30
TT
9653/* Thanks to Mike Haertel and Jim Avera for this test.
9654 Here is a matrix of mmap possibilities:
9655 mmap private not fixed
9656 mmap private fixed at somewhere currently unmapped
9657 mmap private fixed at somewhere already mapped
9658 mmap shared not fixed
9659 mmap shared fixed at somewhere currently unmapped
9660 mmap shared fixed at somewhere already mapped
9661 For private mappings, we should verify that changes cannot be read()
9662 back from the file, nor mmap's back from the file at a different
9663 address. (There have been systems where private was not correctly
9664 implemented like the infamous i386 svr4.0, and systems where the
9665 VM page cache was not coherent with the file system buffer cache
9666 like early versions of FreeBSD and possibly contemporary NetBSD.)
9667 For shared mappings, we should conversely verify that changes get
9668 propagated back to all the places they're supposed to be.
bec39cab 9669
a9322a30
TT
9670 Grep wants private fixed already mapped.
9671 The main things grep needs to know about mmap are:
9672 * does it exist and is it safe to write into the mmap'd area
9673 * how to use it (BSD variants) */
8b9cf735 9674
a9322a30
TT
9675#include <fcntl.h>
9676#include <sys/mman.h>
8b9cf735 9677
81ecdfbb 9678#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9679char *malloc ();
a3828db0
MK
9680#endif
9681
a9322a30 9682/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9683#ifndef HAVE_GETPAGESIZE
a9322a30 9684/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9685# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9686# define HAVE_SYS_PARAM_H 1
9687# endif
9688
9689# ifdef _SC_PAGESIZE
9690# define getpagesize() sysconf(_SC_PAGESIZE)
9691# else /* no _SC_PAGESIZE */
81ecdfbb 9692# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9693# include <sys/param.h>
9694# ifdef EXEC_PAGESIZE
9695# define getpagesize() EXEC_PAGESIZE
9696# else /* no EXEC_PAGESIZE */
9697# ifdef NBPG
9698# define getpagesize() NBPG * CLSIZE
9699# ifndef CLSIZE
9700# define CLSIZE 1
9701# endif /* no CLSIZE */
9702# else /* no NBPG */
9703# ifdef NBPC
9704# define getpagesize() NBPC
9705# else /* no NBPC */
9706# ifdef PAGESIZE
9707# define getpagesize() PAGESIZE
9708# endif /* PAGESIZE */
9709# endif /* no NBPC */
9710# endif /* no NBPG */
9711# endif /* no EXEC_PAGESIZE */
9712# else /* no HAVE_SYS_PARAM_H */
9713# define getpagesize() 8192 /* punt totally */
9714# endif /* no HAVE_SYS_PARAM_H */
9715# endif /* no _SC_PAGESIZE */
9716
9717#endif /* no HAVE_GETPAGESIZE */
9718
bec39cab
AC
9719int
9720main ()
9721{
a9322a30
TT
9722 char *data, *data2, *data3;
9723 int i, pagesize;
9724 int fd;
9725
9726 pagesize = getpagesize ();
9727
9728 /* First, make a file with some known garbage in it. */
9729 data = (char *) malloc (pagesize);
9730 if (!data)
81ecdfbb 9731 return 1;
a9322a30
TT
9732 for (i = 0; i < pagesize; ++i)
9733 *(data + i) = rand ();
9734 umask (0);
9735 fd = creat ("conftest.mmap", 0600);
9736 if (fd < 0)
81ecdfbb 9737 return 1;
a9322a30 9738 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9739 return 1;
a9322a30
TT
9740 close (fd);
9741
9742 /* Next, try to mmap the file at a fixed address which already has
9743 something else allocated at it. If we can, also make sure that
9744 we see the same garbage. */
9745 fd = open ("conftest.mmap", O_RDWR);
9746 if (fd < 0)
81ecdfbb 9747 return 1;
a9322a30
TT
9748 data2 = (char *) malloc (2 * pagesize);
9749 if (!data2)
81ecdfbb
RW
9750 return 1;
9751 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9752 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9753 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9754 return 1;
a9322a30
TT
9755 for (i = 0; i < pagesize; ++i)
9756 if (*(data + i) != *(data2 + i))
81ecdfbb 9757 return 1;
a9322a30
TT
9758
9759 /* Finally, make sure that changes to the mapped area do not
9760 percolate back to the file as seen by read(). (This is a bug on
9761 some variants of i386 svr4.0.) */
9762 for (i = 0; i < pagesize; ++i)
9763 *(data2 + i) = *(data2 + i) + 1;
9764 data3 = (char *) malloc (pagesize);
9765 if (!data3)
81ecdfbb 9766 return 1;
a9322a30 9767 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9768 return 1;
a9322a30
TT
9769 for (i = 0; i < pagesize; ++i)
9770 if (*(data + i) != *(data3 + i))
81ecdfbb 9771 return 1;
a9322a30 9772 close (fd);
81ecdfbb 9773 return 0;
bec39cab
AC
9774}
9775_ACEOF
81ecdfbb 9776if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9777 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9778else
81ecdfbb 9779 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9780fi
81ecdfbb
RW
9781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9782 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9783fi
81ecdfbb 9784
a9322a30 9785fi
81ecdfbb
RW
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9787$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9788if test $ac_cv_func_mmap_fixed_mapped = yes; then
9789
81ecdfbb 9790$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9791
086ec9eb 9792fi
a9322a30 9793rm -f conftest.mmap
a3828db0 9794
81ecdfbb
RW
9795ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9796if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9797
a9322a30
TT
9798else
9799
9800cat >>confdefs.h <<_ACEOF
9801#define pid_t int
bec39cab 9802_ACEOF
086ec9eb
MK
9803
9804fi
9805
81ecdfbb
RW
9806for ac_header in vfork.h
9807do :
9808 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9809if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9810 cat >>confdefs.h <<_ACEOF
81ecdfbb 9811#define HAVE_VFORK_H 1
bec39cab 9812_ACEOF
c906108c
SS
9813
9814fi
a9322a30 9815
a3828db0 9816done
c906108c 9817
a9322a30 9818for ac_func in fork vfork
81ecdfbb
RW
9819do :
9820 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9821ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9822eval as_val=\$$as_ac_var
9823 if test "x$as_val" = x""yes; then :
a3828db0 9824 cat >>confdefs.h <<_ACEOF
81ecdfbb 9825#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9826_ACEOF
b83266a0 9827
97bf5e38 9828fi
a3828db0 9829done
b83266a0 9830
a9322a30 9831if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9833$as_echo_n "checking for working fork... " >&6; }
9834if test "${ac_cv_func_fork_works+set}" = set; then :
9835 $as_echo_n "(cached) " >&6
a9322a30 9836else
81ecdfbb 9837 if test "$cross_compiling" = yes; then :
a9322a30
TT
9838 ac_cv_func_fork_works=cross
9839else
81ecdfbb
RW
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841/* end confdefs.h. */
9842$ac_includes_default
9843int
9844main ()
9845{
9846
9847 /* By Ruediger Kuhlmann. */
9848 return fork () < 0;
9849
9850 ;
9851 return 0;
9852}
a9322a30 9853_ACEOF
81ecdfbb 9854if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9855 ac_cv_func_fork_works=yes
9856else
81ecdfbb 9857 ac_cv_func_fork_works=no
a9322a30 9858fi
81ecdfbb
RW
9859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9860 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9861fi
81ecdfbb 9862
a9322a30 9863fi
81ecdfbb
RW
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9865$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9866
9867else
9868 ac_cv_func_fork_works=$ac_cv_func_fork
9869fi
9870if test "x$ac_cv_func_fork_works" = xcross; then
9871 case $host in
9872 *-*-amigaos* | *-*-msdosdjgpp*)
9873 # Override, as these systems have only a dummy fork() stub
9874 ac_cv_func_fork_works=no
9875 ;;
9876 *)
9877 ac_cv_func_fork_works=yes
9878 ;;
9879 esac
81ecdfbb
RW
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9881$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9882fi
9883ac_cv_func_vfork_works=$ac_cv_func_vfork
9884if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9886$as_echo_n "checking for working vfork... " >&6; }
9887if test "${ac_cv_func_vfork_works+set}" = set; then :
9888 $as_echo_n "(cached) " >&6
a9322a30 9889else
81ecdfbb 9890 if test "$cross_compiling" = yes; then :
a9322a30
TT
9891 ac_cv_func_vfork_works=cross
9892else
81ecdfbb 9893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9894/* end confdefs.h. */
9895/* Thanks to Paul Eggert for this test. */
81ecdfbb 9896$ac_includes_default
a9322a30 9897#include <sys/wait.h>
81ecdfbb 9898#ifdef HAVE_VFORK_H
a9322a30
TT
9899# include <vfork.h>
9900#endif
9901/* On some sparc systems, changes by the child to local and incoming
9902 argument registers are propagated back to the parent. The compiler
9903 is told about this with #include <vfork.h>, but some compilers
9904 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9905 static variable whose address is put into a register that is
9906 clobbered by the vfork. */
9907static void
9908#ifdef __cplusplus
9909sparc_address_test (int arg)
9910# else
9911sparc_address_test (arg) int arg;
9912#endif
9913{
9914 static pid_t child;
9915 if (!child) {
9916 child = vfork ();
9917 if (child < 0) {
9918 perror ("vfork");
9919 _exit(2);
9920 }
9921 if (!child) {
9922 arg = getpid();
9923 write(-1, "", 0);
9924 _exit (arg);
9925 }
9926 }
9927}
9928
9929int
9930main ()
9931{
9932 pid_t parent = getpid ();
9933 pid_t child;
9934
9935 sparc_address_test (0);
9936
9937 child = vfork ();
9938
9939 if (child == 0) {
9940 /* Here is another test for sparc vfork register problems. This
9941 test uses lots of local variables, at least as many local
9942 variables as main has allocated so far including compiler
9943 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9944 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9945 reuse the register of parent for one of the local variables,
9946 since it will think that parent can't possibly be used any more
9947 in this routine. Assigning to the local variable will thus
9948 munge parent in the parent process. */
9949 pid_t
9950 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9951 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9952 /* Convince the compiler that p..p7 are live; otherwise, it might
9953 use the same hardware register for all 8 local variables. */
9954 if (p != p1 || p != p2 || p != p3 || p != p4
9955 || p != p5 || p != p6 || p != p7)
9956 _exit(1);
9957
9958 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9959 from child file descriptors. If the child closes a descriptor
9960 before it execs or exits, this munges the parent's descriptor
9961 as well. Test for this by closing stdout in the child. */
9962 _exit(close(fileno(stdout)) != 0);
9963 } else {
9964 int status;
9965 struct stat st;
9966
9967 while (wait(&status) != child)
9968 ;
81ecdfbb 9969 return (
a9322a30
TT
9970 /* Was there some problem with vforking? */
9971 child < 0
9972
9973 /* Did the child fail? (This shouldn't happen.) */
9974 || status
9975
9976 /* Did the vfork/compiler bug occur? */
9977 || parent != getpid()
9978
9979 /* Did the file descriptor bug occur? */
9980 || fstat(fileno(stdout), &st) != 0
9981 );
9982 }
9983}
9984_ACEOF
81ecdfbb 9985if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9986 ac_cv_func_vfork_works=yes
9987else
81ecdfbb 9988 ac_cv_func_vfork_works=no
a9322a30 9989fi
81ecdfbb
RW
9990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9991 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9992fi
81ecdfbb 9993
a9322a30 9994fi
81ecdfbb
RW
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9996$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
9997
9998fi;
9999if test "x$ac_cv_func_fork_works" = xcross; then
10000 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10002$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10003fi
10004
10005if test "x$ac_cv_func_vfork_works" = xyes; then
10006
81ecdfbb 10007$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10008
10009else
10010
81ecdfbb 10011$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10012
10013fi
10014if test "x$ac_cv_func_fork_works" = xyes; then
10015
81ecdfbb 10016$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10017
10018fi
10019
7313baad 10020for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10021 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10022 sbrk setpgid setpgrp setsid \
a9322a30 10023 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10024 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10025 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10026do :
10027 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10028ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10029eval as_val=\$$as_ac_var
10030 if test "x$as_val" = x""yes; then :
6c7a06a3 10031 cat >>confdefs.h <<_ACEOF
81ecdfbb 10032#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10033_ACEOF
10034
10035fi
10036done
10037
10038
81ecdfbb
RW
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10040$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10041if test "${am_cv_langinfo_codeset+set}" = set; then :
10042 $as_echo_n "(cached) " >&6
6c7a06a3 10043else
81ecdfbb 10044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10045/* end confdefs.h. */
10046#include <langinfo.h>
10047int
10048main ()
10049{
10050char* cs = nl_langinfo(CODESET);
bec39cab
AC
10051 ;
10052 return 0;
10053}
10054_ACEOF
81ecdfbb 10055if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10056 am_cv_langinfo_codeset=yes
a4db0f07 10057else
81ecdfbb 10058 am_cv_langinfo_codeset=no
a4db0f07 10059fi
81ecdfbb
RW
10060rm -f core conftest.err conftest.$ac_objext \
10061 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10062
a4db0f07 10063fi
81ecdfbb
RW
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10065$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10066 if test $am_cv_langinfo_codeset = yes; then
10067
81ecdfbb 10068$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10069
6c7a06a3 10070 fi
c906108c 10071
06825bd1 10072
a3828db0
MK
10073# Check the return and argument types of ptrace. No canned test for
10074# this, so roll our own.
10075gdb_ptrace_headers='
10076#if HAVE_SYS_TYPES_H
10077# include <sys/types.h>
10078#endif
10079#if HAVE_SYS_PTRACE_H
10080# include <sys/ptrace.h>
10081#endif
10082#if HAVE_UNISTD_H
10083# include <unistd.h>
10084#endif
10085'
10086# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10087ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10088"
10089if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10090 ac_have_decl=1
06825bd1 10091else
81ecdfbb 10092 ac_have_decl=0
06825bd1 10093fi
06825bd1 10094
a3828db0 10095cat >>confdefs.h <<_ACEOF
81ecdfbb 10096#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10097_ACEOF
81ecdfbb 10098if test $ac_have_decl = 1; then :
bec39cab 10099
a3828db0 10100else
a3828db0
MK
10101
10102 : ${gdb_cv_func_ptrace_ret='int'}
10103 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10104
06825bd1
MK
10105fi
10106
064ef605
DJ
10107# Check return type. Varargs (used on GNU/Linux) conflict with the
10108# empty argument list, so check for that explicitly.
81ecdfbb
RW
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10110$as_echo_n "checking return type of ptrace... " >&6; }
10111if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10112 $as_echo_n "(cached) " >&6
bec39cab 10113else
81ecdfbb 10114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10115/* end confdefs.h. */
a3828db0 10116$gdb_ptrace_headers
bec39cab
AC
10117int
10118main ()
10119{
064ef605
DJ
10120extern long ptrace (enum __ptrace_request, ...);
10121 ;
10122 return 0;
10123}
10124_ACEOF
81ecdfbb 10125if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10126 gdb_cv_func_ptrace_ret='long'
10127else
81ecdfbb 10128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10129/* end confdefs.h. */
10130$gdb_ptrace_headers
10131int
10132main ()
10133{
a3828db0 10134extern int ptrace ();
bec39cab
AC
10135 ;
10136 return 0;
10137}
10138_ACEOF
81ecdfbb 10139if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10140 gdb_cv_func_ptrace_ret='int'
70f9f479 10141else
81ecdfbb 10142 gdb_cv_func_ptrace_ret='long'
70f9f479 10143fi
81ecdfbb 10144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10145fi
81ecdfbb 10146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10147fi
81ecdfbb
RW
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10149$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10150
a3828db0
MK
10151cat >>confdefs.h <<_ACEOF
10152#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10153_ACEOF
70f9f479 10154
a3828db0 10155# Check argument types.
81ecdfbb
RW
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10157$as_echo_n "checking types of arguments for ptrace... " >&6; }
10158if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10159 $as_echo_n "(cached) " >&6
bec39cab 10160else
a3828db0 10161
81ecdfbb 10162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10163/* end confdefs.h. */
10164$gdb_ptrace_headers
10165int
10166main ()
10167{
10168extern long ptrace (enum __ptrace_request, ...);
10169 ;
10170 return 0;
10171}
10172_ACEOF
81ecdfbb 10173if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10174 gdb_cv_func_ptrace_args='int,int,long,long'
10175else
064ef605 10176
a3828db0
MK
10177for gdb_arg1 in 'int' 'long'; do
10178 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10179 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10180 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10182/* end confdefs.h. */
a3828db0 10183$gdb_ptrace_headers
bec39cab
AC
10184int
10185main ()
10186{
a3828db0
MK
10187
10188extern $gdb_cv_func_ptrace_ret
10189 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10190
bec39cab
AC
10191 ;
10192 return 0;
10193}
10194_ACEOF
81ecdfbb 10195if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10196 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10197 break 4;
5c7f2947 10198fi
81ecdfbb 10199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10200 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10202/* end confdefs.h. */
a3828db0 10203$gdb_ptrace_headers
bec39cab
AC
10204int
10205main ()
10206{
a3828db0
MK
10207
10208extern $gdb_cv_func_ptrace_ret
10209 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10210
bec39cab
AC
10211 ;
10212 return 0;
10213}
10214_ACEOF
81ecdfbb 10215if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10216
10217gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10218 break 5;
78434e59 10219fi
81ecdfbb 10220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10221 done
10222 done
10223 done
10224 done
10225done
10226# Provide a safe default value.
10227: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10228
064ef605 10229fi
81ecdfbb 10230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10231fi
81ecdfbb
RW
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10233$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10234ac_save_IFS=$IFS; IFS=','
10235set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10236IFS=$ac_save_IFS
10237shift
bec39cab 10238
a3828db0
MK
10239cat >>confdefs.h <<_ACEOF
10240#define PTRACE_TYPE_ARG3 $3
10241_ACEOF
10242
10243if test -n "$5"; then
10244
10245cat >>confdefs.h <<_ACEOF
10246#define PTRACE_TYPE_ARG5 $5
bec39cab 10247_ACEOF
78434e59
MK
10248
10249fi
10250
a3828db0 10251if test "$cross_compiling" = no; then
81ecdfbb
RW
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10253$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10254if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10255 $as_echo_n "(cached) " >&6
a3828db0 10256else
81ecdfbb
RW
10257 if test "$cross_compiling" = yes; then :
10258 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10259else
81ecdfbb 10260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10261/* end confdefs.h. */
81ecdfbb 10262$ac_includes_default
bec39cab
AC
10263int
10264main ()
10265{
a3828db0
MK
10266/* If this system has a BSD-style setpgrp which takes arguments,
10267 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10268 exit successfully. */
81ecdfbb 10269 return setpgrp (1,1) != -1;
bec39cab
AC
10270 ;
10271 return 0;
10272}
10273_ACEOF
81ecdfbb 10274if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10275 ac_cv_func_setpgrp_void=no
c906108c 10276else
81ecdfbb 10277 ac_cv_func_setpgrp_void=yes
c906108c 10278fi
81ecdfbb
RW
10279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10280 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10281fi
81ecdfbb 10282
a3828db0 10283fi
81ecdfbb
RW
10284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10285$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10286if test $ac_cv_func_setpgrp_void = yes; then
10287
81ecdfbb 10288$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10289
10290fi
a3828db0
MK
10291
10292else
81ecdfbb
RW
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10294$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10295if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10296 $as_echo_n "(cached) " >&6
97bf5e38 10297else
81ecdfbb 10298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10299/* end confdefs.h. */
a3828db0
MK
10300
10301#include <unistd.h>
10302
bec39cab
AC
10303int
10304main ()
10305{
a3828db0
MK
10306
10307 if (setpgrp(1,1) == -1)
10308 exit (0);
10309 else
10310 exit (1);
10311
bec39cab
AC
10312 ;
10313 return 0;
10314}
10315_ACEOF
81ecdfbb 10316if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10317 ac_cv_func_setpgrp_void=no
c906108c 10318else
81ecdfbb 10319 ac_cv_func_setpgrp_void=yes
c906108c 10320fi
81ecdfbb 10321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10322fi
81ecdfbb
RW
10323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10324$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10325if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10326 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10327
a3828db0 10328fi
c906108c
SS
10329fi
10330
a3828db0
MK
10331# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10332# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10334$as_echo_n "checking for sigsetjmp... " >&6; }
10335if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10336 $as_echo_n "(cached) " >&6
bec39cab 10337else
81ecdfbb 10338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10339/* end confdefs.h. */
a3828db0
MK
10340
10341#include <setjmp.h>
10342
bec39cab
AC
10343int
10344main ()
10345{
a3828db0 10346sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10347 ;
10348 return 0;
10349}
10350_ACEOF
81ecdfbb 10351if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10352 gdb_cv_func_sigsetjmp=yes
c906108c 10353else
81ecdfbb 10354 gdb_cv_func_sigsetjmp=no
c906108c 10355fi
81ecdfbb 10356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10357fi
81ecdfbb
RW
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10359$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10360if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10361
81ecdfbb 10362$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10363
97bf5e38 10364fi
c906108c 10365
a3828db0
MK
10366# Assume we'll default to using the included libiberty regex.
10367gdb_use_included_regex=yes
10368
10369# However, if the system regex is GNU regex, then default to *not*
10370# using the included regex.
81ecdfbb
RW
10371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10372$as_echo_n "checking for GNU regex... " >&6; }
10373if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10374 $as_echo_n "(cached) " >&6
bec39cab 10375else
81ecdfbb 10376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10377/* end confdefs.h. */
a3828db0 10378#include <gnu-versions.h>
bec39cab
AC
10379int
10380main ()
10381{
81ecdfbb
RW
10382#define REGEX_INTERFACE_VERSION 1
10383#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10384# error "Version mismatch"
10385#endif
5c45e068
MK
10386 ;
10387 return 0;
10388}
10389_ACEOF
81ecdfbb
RW
10390if ac_fn_c_try_compile "$LINENO"; then :
10391 gdb_cv_have_gnu_regex=yes
5c45e068 10392else
81ecdfbb
RW
10393 gdb_cv_have_gnu_regex=no
10394fi
10395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10396fi
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10398$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10399if test $gdb_cv_have_gnu_regex = yes; then
10400 gdb_use_included_regex=no
5c45e068 10401fi
81ecdfbb
RW
10402
10403
10404# Check whether --with-included-regex was given.
10405if test "${with_included_regex+set}" = set; then :
10406 withval=$with_included_regex; gdb_with_regex=$withval
10407else
10408 gdb_with_regex=$gdb_use_included_regex
c906108c 10409fi
81ecdfbb
RW
10410
10411if test "$gdb_with_regex" = yes; then
10412
10413$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10414
c906108c 10415fi
81ecdfbb
RW
10416
10417# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10418ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10419#include <sys/proc.h>
10420
10421"
10422if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10423
5c45e068 10424cat >>confdefs.h <<_ACEOF
a3828db0 10425#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10426_ACEOF
c906108c 10427
5c45e068 10428
97bf5e38 10429fi
c906108c 10430
5c45e068 10431
a3828db0 10432# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10434$as_echo_n "checking for struct lwp... " >&6; }
10435if test "${gdb_cv_struct_lwp+set}" = set; then :
10436 $as_echo_n "(cached) " >&6
bec39cab 10437else
81ecdfbb 10438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10439/* end confdefs.h. */
a3828db0
MK
10440#include <sys/param.h>
10441#include <sys/lwp.h>
bec39cab
AC
10442int
10443main ()
10444{
a3828db0 10445struct lwp l;
bec39cab
AC
10446 ;
10447 return 0;
10448}
10449_ACEOF
81ecdfbb 10450if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10451 gdb_cv_struct_lwp=yes
c906108c 10452else
81ecdfbb 10453 gdb_cv_struct_lwp=no
c906108c 10454fi
81ecdfbb 10455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10456fi
81ecdfbb
RW
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10458$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10459if test $gdb_cv_struct_lwp = yes; then
c906108c 10460
81ecdfbb 10461$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10462
97bf5e38 10463fi
c906108c 10464
a3828db0 10465# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10467$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10468if test "${gdb_cv_struct_reg+set}" = set; then :
10469 $as_echo_n "(cached) " >&6
bec39cab 10470else
81ecdfbb 10471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10472/* end confdefs.h. */
a3828db0
MK
10473#include <sys/types.h>
10474#include <machine/reg.h>
bec39cab
AC
10475int
10476main ()
10477{
a3828db0 10478struct reg r;
bec39cab
AC
10479 ;
10480 return 0;
10481}
10482_ACEOF
81ecdfbb 10483if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10484 gdb_cv_struct_reg=yes
27ca5dad 10485else
81ecdfbb 10486 gdb_cv_struct_reg=no
27ca5dad 10487fi
81ecdfbb 10488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10489fi
81ecdfbb
RW
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10491$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10492if test $gdb_cv_struct_reg = yes; then
bec39cab 10493
81ecdfbb 10494$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10495
10496fi
97bf5e38 10497
a3828db0
MK
10498# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10499# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10500ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10501"
10502if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10503
10504cat >>confdefs.h <<_ACEOF
a3828db0 10505#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10506_ACEOF
3862412b 10507
5c45e068 10508
97bf5e38 10509fi
81ecdfbb
RW
10510ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10511"
10512if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10513
10514cat >>confdefs.h <<_ACEOF
a3828db0 10515#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10516_ACEOF
3862412b 10517
5c45e068 10518
97bf5e38 10519fi
3862412b 10520
5c45e068 10521
a3828db0 10522# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10524$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10525if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10526 $as_echo_n "(cached) " >&6
451928c5 10527else
81ecdfbb 10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10529/* end confdefs.h. */
a3828db0 10530#include <sys/ptrace.h>
bec39cab
AC
10531int
10532main ()
10533{
a3828db0 10534PTRACE_GETREGS;
bec39cab
AC
10535 ;
10536 return 0;
10537}
10538_ACEOF
81ecdfbb 10539if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10540 gdb_cv_have_ptrace_getregs=yes
451928c5 10541else
81ecdfbb 10542 gdb_cv_have_ptrace_getregs=no
451928c5 10543fi
81ecdfbb 10544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10545fi
10546
81ecdfbb
RW
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10548$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10549if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10550
81ecdfbb 10551$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10552
97bf5e38 10553fi
451928c5 10554
a3828db0 10555# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10557$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10558if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10559 $as_echo_n "(cached) " >&6
451928c5 10560else
81ecdfbb 10561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10562/* end confdefs.h. */
a3828db0 10563#include <sys/ptrace.h>
bec39cab
AC
10564int
10565main ()
10566{
a3828db0 10567PTRACE_GETFPXREGS;
bec39cab
AC
10568 ;
10569 return 0;
10570}
10571_ACEOF
81ecdfbb 10572if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10573 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10574else
81ecdfbb 10575 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10576fi
81ecdfbb 10577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10578fi
10579
81ecdfbb
RW
10580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10581$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10582if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10583
81ecdfbb 10584$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10585
97bf5e38 10586fi
451928c5 10587
a3828db0 10588# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10590$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10591if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10592 $as_echo_n "(cached) " >&6
3862412b 10593else
81ecdfbb 10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10595/* end confdefs.h. */
a3828db0
MK
10596#include <sys/types.h>
10597#include <sys/ptrace.h>
bec39cab
AC
10598int
10599main ()
10600{
a3828db0 10601PT_GETDBREGS;
bec39cab
AC
10602 ;
10603 return 0;
10604}
10605_ACEOF
81ecdfbb 10606if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10607 gdb_cv_have_pt_getdbregs=yes
3862412b 10608else
81ecdfbb 10609 gdb_cv_have_pt_getdbregs=no
3862412b 10610fi
81ecdfbb 10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10612fi
10613
81ecdfbb
RW
10614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10615$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10616if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10617
81ecdfbb 10618$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10619
97bf5e38 10620fi
3862412b 10621
a3828db0 10622# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10624$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10625if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10626 $as_echo_n "(cached) " >&6
3862412b 10627else
81ecdfbb 10628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10629/* end confdefs.h. */
a3828db0
MK
10630#include <sys/types.h>
10631#include <sys/ptrace.h>
bec39cab
AC
10632int
10633main ()
10634{
a3828db0 10635PT_GETXMMREGS;
bec39cab
AC
10636 ;
10637 return 0;
10638}
10639_ACEOF
81ecdfbb 10640if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10641 gdb_cv_have_pt_getxmmregs=yes
3862412b 10642else
81ecdfbb 10643 gdb_cv_have_pt_getxmmregs=no
3862412b 10644fi
81ecdfbb 10645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10646fi
10647
81ecdfbb
RW
10648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10649$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10650if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10651
81ecdfbb 10652$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10653
97bf5e38 10654fi
3862412b 10655
eb368090 10656# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10657
10658if test "${target}" = "${host}"; then
10659 case "${host}" in
97bf5e38 10660 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10661
81ecdfbb 10662$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10663
10664 ;;
c162e8c9 10665 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10666
81ecdfbb 10667$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10668
10669 ;;
10670 mips-sgi-irix5*)
10671 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10672
81ecdfbb 10673$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10674
10675 ;;
10676 esac
10677fi
10678
10679if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10681$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10682 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10683 $as_echo_n "(cached) " >&6
bec39cab 10684else
81ecdfbb 10685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10686/* end confdefs.h. */
596c9d4b
KB
10687
10688#define _SYSCALL32
d30c5336
JK
10689/* Needed for new procfs interface on sparc-solaris. */
10690#define _STRUCTURED_PROC 1
596c9d4b 10691#include <sys/procfs.h>
bec39cab
AC
10692int
10693main ()
10694{
97bf5e38 10695pstatus_t avar
bec39cab
AC
10696 ;
10697 return 0;
10698}
10699_ACEOF
81ecdfbb 10700if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10701 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10702else
81ecdfbb 10703 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10704
596c9d4b 10705fi
81ecdfbb 10706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10707fi
10708
97bf5e38 10709 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10710
81ecdfbb 10711$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10712
10713 fi
81ecdfbb
RW
10714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10715$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10716
81ecdfbb
RW
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10718$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10719 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10720 $as_echo_n "(cached) " >&6
596c9d4b 10721else
81ecdfbb 10722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10723/* end confdefs.h. */
596c9d4b
KB
10724
10725#define _SYSCALL32
d30c5336
JK
10726/* Needed for new procfs interface on sparc-solaris. */
10727#define _STRUCTURED_PROC 1
596c9d4b 10728#include <sys/procfs.h>
bec39cab
AC
10729int
10730main ()
10731{
97bf5e38 10732prrun_t avar
bec39cab
AC
10733 ;
10734 return 0;
10735}
10736_ACEOF
81ecdfbb 10737if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10738 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10739else
81ecdfbb 10740 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10741
596c9d4b 10742fi
81ecdfbb 10743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10744fi
10745
97bf5e38 10746 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10747
81ecdfbb 10748$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10749
10750 fi
81ecdfbb
RW
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10752$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10753
81ecdfbb
RW
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10755$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10756 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10757 $as_echo_n "(cached) " >&6
596c9d4b 10758else
81ecdfbb 10759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10760/* end confdefs.h. */
596c9d4b
KB
10761
10762#define _SYSCALL32
d30c5336
JK
10763/* Needed for new procfs interface on sparc-solaris. */
10764#define _STRUCTURED_PROC 1
596c9d4b 10765#include <sys/procfs.h>
bec39cab
AC
10766int
10767main ()
10768{
97bf5e38 10769gregset_t avar
bec39cab
AC
10770 ;
10771 return 0;
10772}
10773_ACEOF
81ecdfbb 10774if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10775 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10776else
81ecdfbb 10777 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10778
596c9d4b 10779fi
81ecdfbb 10780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10781fi
10782
97bf5e38 10783 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10784
81ecdfbb 10785$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10786
10787 fi
81ecdfbb
RW
10788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10789$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10790
81ecdfbb
RW
10791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10792$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10793 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10794 $as_echo_n "(cached) " >&6
d84dd0c5 10795else
81ecdfbb 10796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10797/* end confdefs.h. */
97bf5e38
MK
10798
10799#define _SYSCALL32
d30c5336
JK
10800/* Needed for new procfs interface on sparc-solaris. */
10801#define _STRUCTURED_PROC 1
d84dd0c5 10802#include <sys/procfs.h>
bec39cab
AC
10803int
10804main ()
10805{
97bf5e38 10806fpregset_t avar
bec39cab
AC
10807 ;
10808 return 0;
10809}
10810_ACEOF
81ecdfbb 10811if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10812 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10813else
81ecdfbb 10814 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10815
d84dd0c5 10816fi
81ecdfbb 10817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10818fi
10819
97bf5e38 10820 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10821
81ecdfbb 10822$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10823
97bf5e38 10824 fi
81ecdfbb
RW
10825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10826$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 10827
81ecdfbb
RW
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10829$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10830 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
10831 $as_echo_n "(cached) " >&6
c906108c 10832else
81ecdfbb 10833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10834/* end confdefs.h. */
c906108c 10835
97bf5e38 10836#define _SYSCALL32
d30c5336
JK
10837/* Needed for new procfs interface on sparc-solaris. */
10838#define _STRUCTURED_PROC 1
97bf5e38 10839#include <sys/procfs.h>
bec39cab
AC
10840int
10841main ()
10842{
97bf5e38 10843prgregset_t avar
bec39cab
AC
10844 ;
10845 return 0;
10846}
10847_ACEOF
81ecdfbb 10848if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10849 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 10850else
81ecdfbb 10851 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 10852
c906108c 10853fi
81ecdfbb 10854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
10855fi
10856
97bf5e38 10857 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 10858
81ecdfbb 10859$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 10860
97bf5e38 10861 fi
81ecdfbb
RW
10862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10863$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 10864
81ecdfbb
RW
10865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10866$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10867 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
10868 $as_echo_n "(cached) " >&6
d45fe813 10869else
81ecdfbb 10870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10871/* end confdefs.h. */
97bf5e38
MK
10872
10873#define _SYSCALL32
d30c5336
JK
10874/* Needed for new procfs interface on sparc-solaris. */
10875#define _STRUCTURED_PROC 1
97bf5e38 10876#include <sys/procfs.h>
bec39cab
AC
10877int
10878main ()
10879{
97bf5e38 10880prfpregset_t avar
bec39cab
AC
10881 ;
10882 return 0;
10883}
10884_ACEOF
81ecdfbb 10885if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10886 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 10887else
81ecdfbb 10888 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 10889
d45fe813 10890fi
81ecdfbb 10891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10892fi
10893
97bf5e38 10894 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 10895
81ecdfbb 10896$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 10897
97bf5e38 10898 fi
81ecdfbb
RW
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10900$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 10901
81ecdfbb
RW
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10903$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10904 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
10905 $as_echo_n "(cached) " >&6
d45fe813 10906else
81ecdfbb 10907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10908/* end confdefs.h. */
97bf5e38
MK
10909
10910#define _SYSCALL32
d30c5336
JK
10911/* Needed for new procfs interface on sparc-solaris. */
10912#define _STRUCTURED_PROC 1
97bf5e38 10913#include <sys/procfs.h>
bec39cab
AC
10914int
10915main ()
10916{
97bf5e38 10917prgregset32_t avar
bec39cab
AC
10918 ;
10919 return 0;
10920}
10921_ACEOF
81ecdfbb 10922if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10923 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 10924else
81ecdfbb 10925 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 10926
d45fe813 10927fi
81ecdfbb 10928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10929fi
10930
97bf5e38 10931 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 10932
81ecdfbb 10933$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 10934
97bf5e38 10935 fi
81ecdfbb
RW
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10937$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 10938
81ecdfbb
RW
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
10940$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
10941 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
10942 $as_echo_n "(cached) " >&6
d45fe813 10943else
81ecdfbb 10944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10945/* end confdefs.h. */
97bf5e38
MK
10946
10947#define _SYSCALL32
d30c5336
JK
10948/* Needed for new procfs interface on sparc-solaris. */
10949#define _STRUCTURED_PROC 1
97bf5e38 10950#include <sys/procfs.h>
bec39cab
AC
10951int
10952main ()
10953{
97bf5e38 10954prfpregset32_t avar
bec39cab
AC
10955 ;
10956 return 0;
10957}
10958_ACEOF
81ecdfbb 10959if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10960 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 10961else
81ecdfbb 10962 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 10963
d45fe813 10964fi
81ecdfbb 10965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10966fi
10967
97bf5e38 10968 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 10969
81ecdfbb 10970$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 10971
97bf5e38 10972 fi
81ecdfbb
RW
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
10974$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 10975
81ecdfbb
RW
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10977$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10978 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
10979 $as_echo_n "(cached) " >&6
d45fe813 10980else
81ecdfbb 10981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10982/* end confdefs.h. */
97bf5e38 10983
d45fe813 10984#define _SYSCALL32
d30c5336
JK
10985/* Needed for new procfs interface on sparc-solaris. */
10986#define _STRUCTURED_PROC 1
97bf5e38 10987#include <sys/procfs.h>
bec39cab
AC
10988int
10989main ()
10990{
97bf5e38 10991lwpid_t avar
bec39cab
AC
10992 ;
10993 return 0;
10994}
10995_ACEOF
81ecdfbb 10996if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10997 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 10998else
81ecdfbb 10999 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11000
d45fe813 11001fi
81ecdfbb 11002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11003fi
11004
97bf5e38 11005 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11006
81ecdfbb 11007$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11008
97bf5e38 11009 fi
81ecdfbb
RW
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11011$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11012
81ecdfbb
RW
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11014$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11015 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11016 $as_echo_n "(cached) " >&6
c906108c 11017else
81ecdfbb 11018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11019/* end confdefs.h. */
c906108c 11020
97bf5e38 11021#define _SYSCALL32
d30c5336
JK
11022/* Needed for new procfs interface on sparc-solaris. */
11023#define _STRUCTURED_PROC 1
97bf5e38 11024#include <sys/procfs.h>
bec39cab
AC
11025int
11026main ()
11027{
97bf5e38 11028psaddr_t avar
bec39cab
AC
11029 ;
11030 return 0;
11031}
11032_ACEOF
81ecdfbb 11033if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11034 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11035else
81ecdfbb 11036 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11037
c906108c 11038fi
81ecdfbb 11039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11040fi
11041
97bf5e38 11042 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11043
81ecdfbb 11044$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11045
97bf5e38 11046 fi
81ecdfbb
RW
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11048$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11049
81ecdfbb
RW
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11051$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11052 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11053 $as_echo_n "(cached) " >&6
c906108c 11054else
81ecdfbb 11055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11056/* end confdefs.h. */
c906108c 11057
97bf5e38 11058#define _SYSCALL32
d30c5336
JK
11059/* Needed for new procfs interface on sparc-solaris. */
11060#define _STRUCTURED_PROC 1
97bf5e38 11061#include <sys/procfs.h>
bec39cab
AC
11062int
11063main ()
11064{
97bf5e38 11065prsysent_t avar
bec39cab
AC
11066 ;
11067 return 0;
11068}
11069_ACEOF
81ecdfbb 11070if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11071 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11072else
81ecdfbb 11073 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11074
c906108c 11075fi
81ecdfbb 11076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11077fi
11078
97bf5e38 11079 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11080
81ecdfbb 11081$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11082
97bf5e38 11083 fi
81ecdfbb
RW
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11085$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11086
81ecdfbb
RW
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11088$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11089 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11090 $as_echo_n "(cached) " >&6
c906108c 11091else
81ecdfbb 11092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11093/* end confdefs.h. */
c906108c 11094
97bf5e38 11095#define _SYSCALL32
d30c5336
JK
11096/* Needed for new procfs interface on sparc-solaris. */
11097#define _STRUCTURED_PROC 1
97bf5e38 11098#include <sys/procfs.h>
bec39cab
AC
11099int
11100main ()
11101{
97bf5e38 11102pr_sigset_t avar
bec39cab
AC
11103 ;
11104 return 0;
11105}
11106_ACEOF
81ecdfbb 11107if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11108 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11109else
81ecdfbb 11110 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11111
c906108c 11112fi
81ecdfbb 11113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11114fi
11115
97bf5e38 11116 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11117
81ecdfbb 11118$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11119
97bf5e38 11120 fi
81ecdfbb
RW
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11122$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11123
81ecdfbb
RW
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11125$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11126 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11127 $as_echo_n "(cached) " >&6
c906108c 11128else
81ecdfbb 11129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11130/* end confdefs.h. */
c906108c 11131
97bf5e38 11132#define _SYSCALL32
d30c5336
JK
11133/* Needed for new procfs interface on sparc-solaris. */
11134#define _STRUCTURED_PROC 1
97bf5e38 11135#include <sys/procfs.h>
bec39cab
AC
11136int
11137main ()
11138{
97bf5e38 11139pr_sigaction64_t avar
bec39cab
AC
11140 ;
11141 return 0;
11142}
11143_ACEOF
81ecdfbb 11144if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11145 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11146else
81ecdfbb 11147 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11148
c906108c 11149fi
81ecdfbb 11150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11151fi
11152
97bf5e38 11153 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11154
81ecdfbb 11155$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11156
97bf5e38 11157 fi
81ecdfbb
RW
11158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11159$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11160
81ecdfbb
RW
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11162$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11163 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11164 $as_echo_n "(cached) " >&6
97bf5e38 11165else
81ecdfbb 11166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11167/* end confdefs.h. */
97bf5e38
MK
11168
11169#define _SYSCALL32
d30c5336
JK
11170/* Needed for new procfs interface on sparc-solaris. */
11171#define _STRUCTURED_PROC 1
97bf5e38 11172#include <sys/procfs.h>
bec39cab
AC
11173int
11174main ()
11175{
97bf5e38 11176pr_siginfo64_t avar
bec39cab
AC
11177 ;
11178 return 0;
11179}
11180_ACEOF
81ecdfbb 11181if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11182 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11183else
81ecdfbb 11184 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11185
97bf5e38 11186fi
81ecdfbb 11187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11188fi
c906108c 11189
97bf5e38 11190 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11191
81ecdfbb 11192$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11193
97bf5e38 11194 fi
81ecdfbb
RW
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11196$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11197
11198
97bf5e38
MK
11199
11200
11201
97bf5e38 11202 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11204$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11205 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11206 $as_echo_n "(cached) " >&6
c906108c 11207else
81ecdfbb 11208 if test "$cross_compiling" = yes; then :
97bf5e38 11209 gdb_cv_prfpregset_t_broken=yes
c906108c 11210else
81ecdfbb 11211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11212/* end confdefs.h. */
97bf5e38
MK
11213#include <sys/procfs.h>
11214 int main ()
11215 {
11216 if (sizeof (prfpregset_t) == sizeof (void *))
11217 return 1;
11218 return 0;
11219 }
bec39cab 11220_ACEOF
81ecdfbb 11221if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11222 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11223else
11224 gdb_cv_prfpregset_t_broken=yes
c906108c 11225fi
81ecdfbb
RW
11226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11227 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11228fi
81ecdfbb 11229
c906108c
SS
11230fi
11231
81ecdfbb
RW
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11233$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11234 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11235
81ecdfbb 11236$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11237
97bf5e38
MK
11238 fi
11239 fi
c906108c 11240
bec39cab 11241
81ecdfbb
RW
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11243$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11244 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11245 $as_echo_n "(cached) " >&6
c906108c 11246else
81ecdfbb 11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11248/* end confdefs.h. */
97bf5e38
MK
11249#include <unistd.h>
11250#include <sys/types.h>
11251#include <sys/procfs.h>
11252
bec39cab
AC
11253int
11254main ()
11255{
97bf5e38
MK
11256
11257 int dummy;;
11258 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11259
11260 ;
11261 return 0;
11262}
11263_ACEOF
81ecdfbb 11264if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11265 gdb_cv_have_procfs_piocset=yes
c906108c 11266else
81ecdfbb 11267 gdb_cv_have_procfs_piocset=no
c906108c 11268fi
81ecdfbb 11269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11270fi
97bf5e38 11271
81ecdfbb
RW
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11273$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11274 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11275
81ecdfbb 11276$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11277
11278 fi
c906108c 11279fi
c906108c 11280
97bf5e38 11281if test ${host} = ${target} ; then
bec39cab 11282
81ecdfbb
RW
11283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11284$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11285 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11286 $as_echo_n "(cached) " >&6
bec39cab 11287else
81ecdfbb 11288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11289/* end confdefs.h. */
97bf5e38 11290#include <link.h>
bec39cab
AC
11291int
11292main ()
11293{
97bf5e38 11294struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11295 ;
11296 return 0;
11297}
11298_ACEOF
81ecdfbb 11299if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11300 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11301else
81ecdfbb 11302 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11303fi
81ecdfbb 11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11305fi
11306
81ecdfbb
RW
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11308$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11309 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11310
81ecdfbb 11311$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11312
11313 fi
11314
bec39cab 11315
81ecdfbb
RW
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11317$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11318 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11319 $as_echo_n "(cached) " >&6
c906108c 11320else
81ecdfbb 11321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11322/* end confdefs.h. */
97bf5e38
MK
11323#include <sys/types.h>
11324#include <link.h>
bec39cab
AC
11325int
11326main ()
11327{
97bf5e38 11328struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11329 ;
11330 return 0;
11331}
11332_ACEOF
81ecdfbb 11333if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11334 gdb_cv_have_struct_link_map_with_lm_members=yes
11335else
81ecdfbb 11336 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11337fi
81ecdfbb 11338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11339fi
c906108c 11340
81ecdfbb
RW
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11342$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11343 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11344
81ecdfbb 11345$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11346
11347 fi
11348
bec39cab 11349
81ecdfbb
RW
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11351$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11352 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11353 $as_echo_n "(cached) " >&6
c906108c 11354else
81ecdfbb 11355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11356/* end confdefs.h. */
97bf5e38
MK
11357#include <sys/types.h>
11358#ifdef HAVE_NLIST_H
11359#include <nlist.h>
11360#endif
11361#include <link.h>
bec39cab
AC
11362int
11363main ()
11364{
97bf5e38 11365struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11366 ;
11367 return 0;
11368}
11369_ACEOF
81ecdfbb 11370if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11371 gdb_cv_have_struct_so_map_with_som_members=yes
11372else
81ecdfbb 11373 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11374fi
81ecdfbb 11375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11376fi
c906108c 11377
81ecdfbb
RW
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11379$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11380 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11381
81ecdfbb 11382$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11383
97bf5e38 11384 fi
c906108c 11385
bec39cab 11386
81ecdfbb
RW
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11388$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11389 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11390 $as_echo_n "(cached) " >&6
97bf5e38 11391else
81ecdfbb 11392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11393/* end confdefs.h. */
97bf5e38
MK
11394#define _SYSCALL32
11395#include <sys/link.h>
bec39cab
AC
11396int
11397main ()
11398{
97bf5e38 11399struct link_map32 l;
bec39cab
AC
11400 ;
11401 return 0;
11402}
11403_ACEOF
81ecdfbb 11404if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11405 gdb_cv_have_struct_link_map32=yes
11406else
81ecdfbb 11407 gdb_cv_have_struct_link_map32=no
97bf5e38 11408fi
81ecdfbb 11409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11410fi
c906108c 11411
81ecdfbb
RW
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11413$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11414 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11415
81ecdfbb 11416$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11417
60ca704f 11418
81ecdfbb 11419$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11420
97bf5e38
MK
11421 fi
11422fi
c906108c 11423
bc8bcb4b 11424# Check if the compiler supports the `long long' type.
c906108c 11425
81ecdfbb
RW
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11427$as_echo_n "checking for long long support in compiler... " >&6; }
11428if test "${gdb_cv_c_long_long+set}" = set; then :
11429 $as_echo_n "(cached) " >&6
97bf5e38 11430else
81ecdfbb 11431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11432/* end confdefs.h. */
bc8bcb4b 11433extern long long foo;
bec39cab
AC
11434int
11435main ()
11436{
bc8bcb4b 11437switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11438 ;
11439 return 0;
11440}
11441_ACEOF
81ecdfbb 11442if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11443 gdb_cv_c_long_long=yes
11444else
81ecdfbb 11445 gdb_cv_c_long_long=no
97bf5e38 11446fi
81ecdfbb 11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11448fi
81ecdfbb
RW
11449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11450$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11451if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11452
81ecdfbb 11453$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11454
11455fi
11456
bc8bcb4b 11457# Check if the compiler and runtime support printing long longs.
97bf5e38 11458
81ecdfbb
RW
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11460$as_echo_n "checking for long long support in printf... " >&6; }
11461if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11462 $as_echo_n "(cached) " >&6
97bf5e38 11463else
81ecdfbb 11464 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11465 gdb_cv_printf_has_long_long=no
11466else
81ecdfbb 11467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11468/* end confdefs.h. */
bc8bcb4b
MK
11469$ac_includes_default
11470int
11471main ()
11472{
11473char buf[32];
97bf5e38
MK
11474 long long l = 0;
11475 l = (l << 16) + 0x0123;
11476 l = (l << 16) + 0x4567;
11477 l = (l << 16) + 0x89ab;
11478 l = (l << 16) + 0xcdef;
11479 sprintf (buf, "0x%016llx", l);
11480 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11481 ;
11482 return 0;
c906108c 11483}
bec39cab 11484_ACEOF
81ecdfbb 11485if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11486 gdb_cv_printf_has_long_long=yes
11487else
81ecdfbb 11488 gdb_cv_printf_has_long_long=no
97bf5e38 11489fi
81ecdfbb
RW
11490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11491 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11492fi
81ecdfbb 11493
97bf5e38 11494fi
81ecdfbb
RW
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11496$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11497if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11498
81ecdfbb 11499$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11500
11501fi
97bf5e38 11502
1a619819
LM
11503# Check if the compiler and runtime support printing decfloats.
11504
81ecdfbb
RW
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11506$as_echo_n "checking for decfloat support in printf... " >&6; }
11507if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11508 $as_echo_n "(cached) " >&6
1a619819 11509else
81ecdfbb 11510 if test "$cross_compiling" = yes; then :
1a619819
LM
11511 gdb_cv_printf_has_decfloat=no
11512else
81ecdfbb 11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11514/* end confdefs.h. */
11515$ac_includes_default
11516int
11517main ()
11518{
11519char buf[64];
11520 _Decimal32 d32 = 1.2345df;
11521 _Decimal64 d64 = 1.2345dd;
11522 _Decimal128 d128 = 1.2345dl;
11523 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11524 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11525 ;
11526 return 0;
11527}
11528_ACEOF
81ecdfbb 11529if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11530 gdb_cv_printf_has_decfloat=yes
11531else
81ecdfbb 11532 gdb_cv_printf_has_decfloat=no
1a619819 11533fi
81ecdfbb
RW
11534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11535 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11536fi
81ecdfbb 11537
1a619819 11538fi
81ecdfbb
RW
11539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11540$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11541if test $gdb_cv_printf_has_decfloat = yes; then
11542
81ecdfbb 11543$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11544
11545fi
11546
bc8bcb4b
MK
11547# Check if the compiler supports the `long double' type. We can't use
11548# AC_C_LONG_DOUBLE because that one does additional checks on the
11549# constants defined in <float.h> that fail on some systems,
11550# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11551
81ecdfbb
RW
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11553$as_echo_n "checking for long double support in compiler... " >&6; }
11554if test "${gdb_cv_c_long_double+set}" = set; then :
11555 $as_echo_n "(cached) " >&6
97bf5e38 11556else
81ecdfbb 11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11558/* end confdefs.h. */
97bf5e38 11559long double foo;
bec39cab 11560_ACEOF
81ecdfbb 11561if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11562 gdb_cv_c_long_double=yes
97bf5e38 11563else
81ecdfbb 11564 gdb_cv_c_long_double=no
97bf5e38 11565fi
81ecdfbb 11566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11567fi
81ecdfbb
RW
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11569$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11570if test $gdb_cv_c_long_double = yes; then
c906108c 11571
81ecdfbb 11572$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11573
11574fi
11575
bc8bcb4b 11576# Check if the compiler and runtime support printing long doubles.
97bf5e38 11577
81ecdfbb
RW
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11579$as_echo_n "checking for long double support in printf... " >&6; }
11580if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11581 $as_echo_n "(cached) " >&6
97bf5e38 11582else
81ecdfbb 11583 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11584 gdb_cv_printf_has_long_double=no
11585else
81ecdfbb 11586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11587/* end confdefs.h. */
bc8bcb4b
MK
11588$ac_includes_default
11589int
11590main ()
11591{
11592char buf[16];
97bf5e38
MK
11593 long double f = 3.141592653;
11594 sprintf (buf, "%Lg", f);
11595 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11596 ;
11597 return 0;
97bf5e38 11598}
bec39cab 11599_ACEOF
81ecdfbb 11600if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11601 gdb_cv_printf_has_long_double=yes
c906108c 11602else
81ecdfbb 11603 gdb_cv_printf_has_long_double=no
c906108c 11604fi
81ecdfbb
RW
11605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11606 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11607fi
81ecdfbb 11608
c906108c 11609fi
81ecdfbb
RW
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11611$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11612if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11613
81ecdfbb 11614$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11615
11616fi
97bf5e38 11617
bc8bcb4b 11618# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11619
81ecdfbb
RW
11620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11621$as_echo_n "checking for long double support in scanf... " >&6; }
11622if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11623 $as_echo_n "(cached) " >&6
97bf5e38 11624else
81ecdfbb 11625 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11626 gdb_cv_scanf_has_long_double=no
11627else
81ecdfbb 11628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11629/* end confdefs.h. */
bc8bcb4b
MK
11630#include <stdio.h>
11631int
11632main ()
11633{
11634char *buf = "3.141592653";
97bf5e38
MK
11635 long double f = 0;
11636 sscanf (buf, "%Lg", &f);
11637 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11638 ;
11639 return 0;
97bf5e38 11640}
bec39cab 11641_ACEOF
81ecdfbb 11642if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11643 gdb_cv_scanf_has_long_double=yes
11644else
81ecdfbb 11645 gdb_cv_scanf_has_long_double=no
97bf5e38 11646fi
81ecdfbb
RW
11647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11648 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11649fi
81ecdfbb 11650
c906108c 11651fi
81ecdfbb
RW
11652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11653$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11654if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11655
81ecdfbb 11656$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11657
11658fi
c906108c 11659
438013df
AO
11660case ${host_os} in
11661aix*)
81ecdfbb
RW
11662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11663$as_echo_n "checking for -bbigtoc option... " >&6; }
11664if test "${gdb_cv_bigtoc+set}" = set; then :
11665 $as_echo_n "(cached) " >&6
438013df 11666else
bec39cab 11667
438013df
AO
11668 SAVE_LDFLAGS=$LDFLAGS
11669
11670 case $GCC in
11671 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11672 *) gdb_cv_bigtoc=-bbigtoc ;;
11673 esac
11674
11675 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11677/* end confdefs.h. */
438013df 11678
bec39cab
AC
11679int
11680main ()
11681{
438013df 11682int i;
bec39cab
AC
11683 ;
11684 return 0;
11685}
11686_ACEOF
81ecdfbb 11687if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11688
81ecdfbb
RW
11689else
11690 gdb_cv_bigtoc=
438013df 11691fi
81ecdfbb
RW
11692rm -f core conftest.err conftest.$ac_objext \
11693 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11694 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11695
bec39cab 11696fi
81ecdfbb
RW
11697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11698$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11699 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11700 ;;
11701esac
11702
38f6b338 11703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11704$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11705dynamic_list=false
11706if test "${gdb_native}" = yes; then
11707 # The dynamically loaded libthread_db needs access to symbols in the gdb
11708 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11709 # may not be supported there.
11710 old_LDFLAGS="$LDFLAGS"
11711 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11712 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11713 LDFLAGS="$LDFLAGS $RDYNAMIC"
11714 if test "${have_libpython}" = no; then
11715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11716/* end confdefs.h. */
11717
11718int
11719main ()
11720{
11721
11722 ;
11723 return 0;
11724}
11725_ACEOF
11726if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11727 dynamic_list=true
11728fi
11729rm -f core conftest.err conftest.$ac_objext \
11730 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11731 else
11732 # Workaround http://bugs.python.org/issue4434 where static
11733 # libpythonX.Y.a would get its symbols required for
11734 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11735 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11736 old_CFLAGS="$CFLAGS"
11737 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11738 if test "$cross_compiling" = yes; then :
3bebe2f2 11739 true
f6528abd 11740else
3bebe2f2
JK
11741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11742/* end confdefs.h. */
11743#include "${have_libpython}/Python.h"
11744int
11745main ()
11746{
11747int err;
38f6b338
JK
11748 Py_Initialize ();
11749 err = PyRun_SimpleString ("import itertools\n");
11750 Py_Finalize ();
11751 return err == 0 ? 0 : 1;
3bebe2f2
JK
11752 ;
11753 return 0;
11754}
11755_ACEOF
11756if ac_fn_c_try_run "$LINENO"; then :
11757 dynamic_list=true
11758fi
11759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11760 conftest.$ac_objext conftest.beam conftest.$ac_ext
11761fi
11762
38f6b338
JK
11763 CFLAGS="$old_CFLAGS"
11764 fi
11765 LDFLAGS="$old_LDFLAGS"
11766fi
11767if $dynamic_list; then
11768 found="-Wl,--dynamic-list"
11769 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11770else
38f6b338
JK
11771 found="-rdynamic"
11772 RDYNAMIC="-rdynamic"
f6528abd 11773fi
f6528abd 11774
38f6b338 11775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11776$as_echo "$found" >&6; }
0407b3f1 11777
f6528abd 11778
0407b3f1 11779if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11780 case ${host_os} in
c906108c 11781 solaris*)
d92419e5
JB
11782 # See if thread_db library is around for Solaris thread debugging.
11783 # Note that we must explicitly test for version 1 of the library
11784 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11785 # the same API.
81ecdfbb
RW
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11787$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11788 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11790$as_echo "yes" >&6; }
60ca704f 11791
81ecdfbb 11792$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11793
3483b318 11794 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11795 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11797$as_echo_n "checking for dlopen in -ldl... " >&6; }
11798if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11799 $as_echo_n "(cached) " >&6
c906108c 11800else
bec39cab 11801 ac_check_lib_save_LIBS=$LIBS
c906108c 11802LIBS="-ldl $LIBS"
81ecdfbb 11803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11804/* end confdefs.h. */
11805
81ecdfbb
RW
11806/* Override any GCC internal prototype to avoid an error.
11807 Use char because int might match the return type of a GCC
11808 builtin and then its argument prototype would still apply. */
bec39cab
AC
11809#ifdef __cplusplus
11810extern "C"
11811#endif
bec39cab
AC
11812char dlopen ();
11813int
11814main ()
11815{
81ecdfbb 11816return dlopen ();
bec39cab
AC
11817 ;
11818 return 0;
11819}
11820_ACEOF
81ecdfbb 11821if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11822 ac_cv_lib_dl_dlopen=yes
11823else
81ecdfbb 11824 ac_cv_lib_dl_dlopen=no
bec39cab 11825fi
81ecdfbb
RW
11826rm -f core conftest.err conftest.$ac_objext \
11827 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11828LIBS=$ac_check_lib_save_LIBS
11829fi
81ecdfbb
RW
11830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11831$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11832if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11833 cat >>confdefs.h <<_ACEOF
11834#define HAVE_LIBDL 1
11835_ACEOF
c906108c
SS
11836
11837 LIBS="-ldl $LIBS"
11838
c906108c
SS
11839fi
11840
f6528abd 11841 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
11842 # Sun randomly tweaked the prototypes in <proc_service.h>
11843 # at one point.
81ecdfbb
RW
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
11845$as_echo_n "checking if <proc_service.h> is old... " >&6; }
11846 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
11847 $as_echo_n "(cached) " >&6
c906108c 11848else
bec39cab 11849
81ecdfbb 11850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11851/* end confdefs.h. */
c906108c
SS
11852
11853 #include <proc_service.h>
11854 ps_err_e ps_pdwrite
11855 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 11856
bec39cab
AC
11857int
11858main ()
11859{
11860
11861 ;
11862 return 0;
11863}
11864_ACEOF
81ecdfbb 11865if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
11866 gdb_cv_proc_service_is_old=no
11867else
81ecdfbb 11868 gdb_cv_proc_service_is_old=yes
c906108c 11869fi
81ecdfbb 11870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11871
c906108c
SS
11872fi
11873
81ecdfbb
RW
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
11875$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 11876 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 11877
81ecdfbb 11878$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
11879
11880 fi
11881 else
81ecdfbb
RW
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11883$as_echo "no" >&6; }
c906108c
SS
11884 fi
11885 ;;
d92419e5 11886 aix*)
81ecdfbb
RW
11887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
11888$as_echo_n "checking for AiX thread debugging library... " >&6; }
11889 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
11890 $as_echo_n "(cached) " >&6
bec39cab 11891else
81ecdfbb 11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11893/* end confdefs.h. */
d92419e5 11894#include <sys/pthdebug.h>
bec39cab
AC
11895int
11896main ()
11897{
d92419e5
JB
11898#ifndef PTHDB_VERSION_3
11899 #error
11900 #endif
bec39cab
AC
11901 ;
11902 return 0;
11903}
11904_ACEOF
81ecdfbb 11905if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
11906 gdb_cv_have_aix_thread_debug=yes
11907else
81ecdfbb 11908 gdb_cv_have_aix_thread_debug=no
d92419e5 11909fi
81ecdfbb 11910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
11911fi
11912
81ecdfbb
RW
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
11914$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
11915 if test $gdb_cv_have_aix_thread_debug = yes; then
11916 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 11917 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 11918 LIBS="$LIBS -lpthdebug"
d645e32e
JB
11919
11920 # Older versions of AIX do not provide the declaration for
11921 # the getthrds function (it appears that it was introduced
11922 # with AIX 6.x).
11923 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
11924"
11925if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
11926 ac_have_decl=1
11927else
11928 ac_have_decl=0
11929fi
11930
11931cat >>confdefs.h <<_ACEOF
11932#define HAVE_DECL_GETTHRDS $ac_have_decl
11933_ACEOF
11934
d92419e5
JB
11935 fi
11936 ;;
c906108c 11937 esac
bec39cab 11938
c906108c
SS
11939fi
11940
3f47be5c 11941if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
11942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
11943$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
11944if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
11945 $as_echo_n "(cached) " >&6
bec39cab 11946else
81ecdfbb 11947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11948/* end confdefs.h. */
3f47be5c 11949#include <thread_db.h>
bec39cab
AC
11950int
11951main ()
11952{
3f47be5c 11953int i = TD_NOTALLOC;
bec39cab
AC
11954 ;
11955 return 0;
11956}
11957_ACEOF
81ecdfbb 11958if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
11959 gdb_cv_thread_db_h_has_td_notalloc=yes
11960else
81ecdfbb 11961 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 11962
3f47be5c 11963fi
81ecdfbb 11964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 11965
bec39cab 11966fi
81ecdfbb
RW
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
11968$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
11969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
11970$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
11971if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
11972 $as_echo_n "(cached) " >&6
59f80f10 11973else
81ecdfbb 11974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
11975/* end confdefs.h. */
11976#include <thread_db.h>
11977int
11978main ()
11979{
11980int i = TD_VERSION;
11981 ;
11982 return 0;
11983}
11984_ACEOF
81ecdfbb 11985if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
11986 gdb_cv_thread_db_h_has_td_version=yes
11987else
81ecdfbb 11988 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
11989
11990fi
81ecdfbb 11991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
11992
11993fi
81ecdfbb
RW
11994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
11995$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
11997$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
11998if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
11999 $as_echo_n "(cached) " >&6
59f80f10 12000else
81ecdfbb 12001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12002/* end confdefs.h. */
12003#include <thread_db.h>
12004int
12005main ()
12006{
12007int i = TD_NOTLS;
12008 ;
12009 return 0;
12010}
12011_ACEOF
81ecdfbb 12012if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12013 gdb_cv_thread_db_h_has_td_notls=yes
12014else
81ecdfbb 12015 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12016
12017fi
81ecdfbb 12018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12019
12020fi
81ecdfbb
RW
12021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12022$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12023fi
12024if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12025
81ecdfbb 12026$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12027
59f80f10
DJ
12028fi
12029if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12030
81ecdfbb 12031$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12032
12033fi
12034if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12035
81ecdfbb 12036$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12037
3f47be5c
EZ
12038fi
12039
b757528f 12040if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12042$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12043if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12044 $as_echo_n "(cached) " >&6
bec39cab 12045else
81ecdfbb 12046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12047/* end confdefs.h. */
b757528f 12048#include <sys/syscall.h>
bec39cab
AC
12049int
12050main ()
12051{
b757528f 12052int i = __NR_tkill;
bec39cab
AC
12053 ;
12054 return 0;
12055}
12056_ACEOF
81ecdfbb 12057if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12058 gdb_cv_sys_syscall_h_has_tkill=yes
12059else
81ecdfbb 12060 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12061
b757528f 12062fi
81ecdfbb 12063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12064
bec39cab 12065fi
81ecdfbb
RW
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12067$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12068fi
12069if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12070
81ecdfbb 12071$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12072
12073fi
12074
81ecdfbb
RW
12075ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12076"
12077if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12078 ac_have_decl=1
10568435 12079else
81ecdfbb 12080 ac_have_decl=0
10568435 12081fi
10568435
JK
12082
12083cat >>confdefs.h <<_ACEOF
81ecdfbb 12084#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12085_ACEOF
12086
12087
81ecdfbb
RW
12088if test "$cross_compiling" = yes; then :
12089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12090/* end confdefs.h. */
12091#include <sys/personality.h>
12092int
12093main ()
12094{
12095
12096# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12097# define ADDR_NO_RANDOMIZE 0x0040000
12098# endif
12099 /* Test the flag could be set and stays set. */
12100 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12101 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12102 return 1
12103 ;
12104 return 0;
12105}
12106_ACEOF
81ecdfbb 12107if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12108 have_personality=true
12109else
81ecdfbb 12110 have_personality=false
10568435 12111fi
81ecdfbb
RW
12112rm -f core conftest.err conftest.$ac_objext \
12113 conftest$ac_exeext conftest.$ac_ext
10568435 12114else
81ecdfbb 12115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12116/* end confdefs.h. */
12117#include <sys/personality.h>
12118int
12119main ()
12120{
12121
12122# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12123# define ADDR_NO_RANDOMIZE 0x0040000
12124# endif
12125 /* Test the flag could be set and stays set. */
12126 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12127 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12128 return 1
12129 ;
12130 return 0;
12131}
12132_ACEOF
81ecdfbb 12133if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12134 have_personality=true
12135else
81ecdfbb 12136 have_personality=false
10568435 12137fi
81ecdfbb
RW
12138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12139 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12140fi
81ecdfbb 12141
10568435
JK
12142if $have_personality
12143then
12144
81ecdfbb 12145$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12146
12147fi
12148
fb40c209 12149
f83d8a90
DE
12150# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12151# except that the argument to --with-sysroot is optional.
12152# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12153if test "x$with_sysroot" = xyes; then
12154 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12155fi
bec39cab 12156
81ecdfbb
RW
12157# Check whether --with-sysroot was given.
12158if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12159 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12160else
12161 TARGET_SYSTEM_ROOT=
12162fi
030292b7 12163
030292b7 12164
f83d8a90
DE
12165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12167 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12168 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12169
f83d8a90
DE
12170cat >>confdefs.h <<_ACEOF
12171#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12172_ACEOF
bec39cab 12173
030292b7 12174
b14b1491 12175
f83d8a90
DE
12176
12177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12178 if test "x$prefix" = xNONE; then
12179 test_prefix=/usr/local
12180 else
12181 test_prefix=$prefix
12182 fi
12183 else
12184 test_prefix=$exec_prefix
12185 fi
12186 value=0
12187 case ${ac_define_dir} in
12188 "${test_prefix}"|"${test_prefix}/"*|\
12189 '${exec_prefix}'|'${exec_prefix}/'*)
12190 value=1
12191 ;;
12192 esac
12193
12194cat >>confdefs.h <<_ACEOF
12195#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12196_ACEOF
030292b7
DJ
12197
12198
12199
16e7150e 12200
16e7150e 12201
81ecdfbb
RW
12202# Check whether --with-system-gdbinit was given.
12203if test "${with_system_gdbinit+set}" = set; then :
12204 withval=$with_system_gdbinit;
b14b1491
TT
12205 SYSTEM_GDBINIT=$withval
12206else
12207 SYSTEM_GDBINIT=
81ecdfbb
RW
12208fi
12209
16e7150e
JG
12210
12211 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12212 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12213 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12214 ac_define_dir=`eval echo $ac_define_dir`
12215
12216cat >>confdefs.h <<_ACEOF
12217#define SYSTEM_GDBINIT "$ac_define_dir"
12218_ACEOF
12219
12220
12221
0c4a4063 12222
b14b1491
TT
12223 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12224 if test "x$prefix" = xNONE; then
12225 test_prefix=/usr/local
12226 else
12227 test_prefix=$prefix
12228 fi
12229 else
12230 test_prefix=$exec_prefix
12231 fi
12232 value=0
12233 case ${ac_define_dir} in
12234 "${test_prefix}"|"${test_prefix}/"*|\
12235 '${exec_prefix}'|'${exec_prefix}/'*)
12236 value=1
12237 ;;
12238 esac
16e7150e 12239
b14b1491
TT
12240cat >>confdefs.h <<_ACEOF
12241#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12242_ACEOF
12243
b14b1491 12244
16e7150e 12245
0c4a4063 12246
81ecdfbb
RW
12247# Check whether --enable-werror was given.
12248if test "${enable_werror+set}" = set; then :
12249 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12250 yes | y) ERROR_ON_WARNING="yes" ;;
12251 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12252 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12253 esac
81ecdfbb
RW
12254fi
12255
094a342e
MK
12256
12257# Enable -Werror by default when using gcc
12258if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
12259 ERROR_ON_WARNING=yes
12260fi
12261
12262WERROR_CFLAGS=""
12263if test "${ERROR_ON_WARNING}" = yes ; then
12264 WERROR_CFLAGS="-Werror"
12265fi
12266
aa79a185
DJ
12267# The entries after -Wno-pointer-sign are disabled warnings which may
12268# be enabled in the future, which can not currently be used to build
12269# GDB.
12270# NOTE: If you change this list, remember to update
3b851bce 12271# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12272build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12273-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12274-Wno-unused -Wunused-value -Wunused-function \
b03a2011 12275-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 12276
3526781e
DJ
12277# Enable -Wno-format by default when using gcc on mingw since many
12278# GCC versions complain about %I64.
12279case "${host}" in
12280 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12281esac
12282
81ecdfbb
RW
12283# Check whether --enable-build-warnings was given.
12284if test "${enable_build_warnings+set}" = set; then :
12285 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12286 yes) ;;
12287 no) build_warnings="-w";;
12288 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12289 build_warnings="${build_warnings} ${t}";;
12290 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12291 build_warnings="${t} ${build_warnings}";;
12292 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12293esac
d4f3574e 12294if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12295 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12296fi
81ecdfbb
RW
12297fi
12298# Check whether --enable-gdb-build-warnings was given.
12299if test "${enable_gdb_build_warnings+set}" = set; then :
12300 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12301 yes) ;;
12302 no) build_warnings="-w";;
12303 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12304 build_warnings="${build_warnings} ${t}";;
12305 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12306 build_warnings="${t} ${build_warnings}";;
12307 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12308esac
12309if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12310 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12311fi
81ecdfbb
RW
12312fi
12313WARN_CFLAGS=""
c906108c
SS
12314if test "x${build_warnings}" != x -a "x$GCC" = xyes
12315then
81ecdfbb
RW
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12317$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12318 # Separate out the -Werror flag as some files just cannot be
12319 # compiled with it enabled.
12320 for w in ${build_warnings}; do
12321 case $w in
12322 -Werr*) WERROR_CFLAGS=-Werror ;;
12323 *) # Check that GCC accepts it
4536bbc6
AC
12324 saved_CFLAGS="$CFLAGS"
12325 CFLAGS="$CFLAGS $w"
81ecdfbb 12326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12327/* end confdefs.h. */
4536bbc6 12328
bec39cab
AC
12329int
12330main ()
12331{
4536bbc6 12332
bec39cab
AC
12333 ;
12334 return 0;
12335}
12336_ACEOF
81ecdfbb 12337if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12338 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12339fi
81ecdfbb 12340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12341 CFLAGS="$saved_CFLAGS"
746a987d
AC
12342 esac
12343 done
81ecdfbb
RW
12344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12345$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12346fi
12347
12348
104c1213 12349
7a292a7a 12350# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12352$as_echo_n "checking for cygwin... " >&6; }
12353if test "${gdb_cv_os_cygwin+set}" = set; then :
12354 $as_echo_n "(cached) " >&6
bec39cab 12355else
81ecdfbb 12356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12357/* end confdefs.h. */
7a292a7a
SS
12358
12359#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12360lose
12361#endif
bec39cab 12362_ACEOF
7a292a7a 12363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12364 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12365 gdb_cv_os_cygwin=yes
12366else
7a292a7a
SS
12367 gdb_cv_os_cygwin=no
12368fi
12369rm -f conftest*
12370
12371fi
81ecdfbb
RW
12372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12373$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12374
aff38e61 12375
3eb25fda 12376SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12377case ${host} in
95cbc983
AC
12378 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12379 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12380 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12381esac
12382
12383
cd0fc7c3
SS
12384# libreadline needs libuser32.a in a cygwin environment
12385WIN32LIBS=
12386if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12387 WIN32LIBS="-luser32"
12388 case "${target}" in
12389 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12390 ;;
12391 esac
cd0fc7c3 12392fi
c906108c 12393
b4505029
MM
12394# The ser-tcp.c module requires sockets.
12395case ${host} in
12396 *mingw32*)
12397
81ecdfbb 12398$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12399
12400 WIN32LIBS="$WIN32LIBS -lws2_32"
12401 ;;
12402esac
12403
7a292a7a 12404
31d99776
DJ
12405# Add ELF support to GDB, but only if BFD includes ELF support.
12406OLD_CFLAGS=$CFLAGS
12407OLD_LDFLAGS=$LDFLAGS
12408OLD_LIBS=$LIBS
12cd34f3
PA
12409# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12410# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12411# always want our bfd.
12412CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12413LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12414intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12415# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12416if test "$plugins" = "yes"; then
12417 LIBS="-ldl $LIBS"
12418fi
0f72fb1c 12419LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12421$as_echo_n "checking for ELF support in BFD... " >&6; }
12422if test "${gdb_cv_var_elf+set}" = set; then :
12423 $as_echo_n "(cached) " >&6
31d99776 12424else
81ecdfbb 12425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12426/* end confdefs.h. */
12427#include <stdlib.h>
12428#include "bfd.h"
12429#include "elf-bfd.h"
12430
12431int
12432main ()
12433{
12434bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12435 ;
12436 return 0;
12437}
12438_ACEOF
81ecdfbb 12439if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12440 gdb_cv_var_elf=yes
12441else
81ecdfbb 12442 gdb_cv_var_elf=no
31d99776 12443fi
81ecdfbb
RW
12444rm -f core conftest.err conftest.$ac_objext \
12445 conftest$ac_exeext conftest.$ac_ext
31d99776 12446fi
81ecdfbb
RW
12447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12448$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
12449if test $gdb_cv_var_elf = yes; then
12450 CONFIG_OBS="$CONFIG_OBS elfread.o"
12451
81ecdfbb 12452$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12453
075ff26d
JK
12454 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12455 if test "$plugins" = "yes"; then
12456 OLD_LIBS="-ldl $OLD_LIBS"
12457 fi
31d99776
DJ
12458fi
12459CFLAGS=$OLD_CFLAGS
12460LDFLAGS=$OLD_LDFLAGS
12461LIBS=$OLD_LIBS
12462
121ce6e5
DJ
12463# Add any host-specific objects to GDB.
12464CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12465
3fc11d3e
JM
12466LIBGUI="../libgui/src/libgui.a"
12467GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
12468
12469
7a292a7a 12470
3fc11d3e
JM
12471WIN32LDAPP=
12472
12473
12474
d91670b9 12475case "${host}" in
686a5eed 12476*-*-cygwin* | *-*-mingw* )
d91670b9
CV
12477 configdir="win"
12478 ;;
12479*)
12480 configdir="unix"
12481 ;;
12482esac
3fc11d3e
JM
12483
12484GDBTKLIBS=
12485if test "${enable_gdbtk}" = "yes"; then
12486
d1c3b63a
KS
12487 # Gdbtk must have an absolute path to srcdir in order to run
12488 # properly when not installed.
12489 here=`pwd`
12490 cd ${srcdir}
12491 GDBTK_SRC_DIR=`pwd`
12492 cd $here
12493
bec39cab 12494
5062cc19
KS
12495 #
12496 # Ok, lets find the tcl configuration
12497 # First, look for one uninstalled.
12498 # the alternative search directory is invoked by --with-tcl
12499 #
3fc11d3e 12500
5062cc19
KS
12501 if test x"${no_tcl}" = x ; then
12502 # we reset no_tcl in case something fails here
12503 no_tcl=true
bec39cab 12504
81ecdfbb
RW
12505# Check whether --with-tcl was given.
12506if test "${with_tcl+set}" = set; then :
12507 withval=$with_tcl; with_tclconfig=${withval}
12508fi
12509
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
12511$as_echo_n "checking for Tcl configuration... " >&6; }
12512 if test "${ac_cv_c_tclconfig+set}" = set; then :
12513 $as_echo_n "(cached) " >&6
3fc11d3e 12514else
bec39cab 12515
3fc11d3e 12516
5062cc19
KS
12517 # First check to see if --with-tcl was specified.
12518 case "${host}" in
12519 *-*-cygwin*) platDir="win" ;;
12520 *) platDir="unix" ;;
12521 esac
12522 if test x"${with_tclconfig}" != x ; then
12523 if test -f "${with_tclconfig}/tclConfig.sh" ; then
12524 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
12525 else
81ecdfbb 12526 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
12527 fi
12528 fi
12529
12530 # then check for a private Tcl installation
12531 if test x"${ac_cv_c_tclconfig}" = x ; then
12532 for i in \
12533 ../tcl \
12534 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12535 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
12536 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
12537 ../../tcl \
12538 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12539 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
12540 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
12541 ../../../tcl \
12542 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12543 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
12544 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
12545 if test -f "$i/$platDir/tclConfig.sh" ; then
12546 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12547 break
12548 fi
12549 done
12550 fi
12551
12552 # on Darwin, check in Framework installation locations
12553 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
12554 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12555 `ls -d /Library/Frameworks 2>/dev/null` \
12556 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12557 `ls -d /System/Library/Frameworks 2>/dev/null` \
12558 ; do
12559 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
12560 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
12561 break
12562 fi
12563 done
12564 fi
12565
12566 # check in a few common install locations
12567 if test x"${ac_cv_c_tclconfig}" = x ; then
12568 for i in `ls -d ${libdir} 2>/dev/null` \
12569 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12570 `ls -d ${prefix}/lib 2>/dev/null` \
12571 `ls -d /usr/local/lib 2>/dev/null` \
12572 `ls -d /usr/contrib/lib 2>/dev/null` \
12573 `ls -d /usr/lib 2>/dev/null` \
12574 ; do
12575 if test -f "$i/tclConfig.sh" ; then
12576 ac_cv_c_tclconfig=`(cd $i; pwd)`
12577 break
12578 fi
12579 done
12580 fi
3fc11d3e 12581
5062cc19
KS
12582 # check in a few other private locations
12583 if test x"${ac_cv_c_tclconfig}" = x ; then
12584 for i in \
12585 ${srcdir}/../tcl \
12586 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12587 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
12588 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
12589 if test -f "$i/$platDir/tclConfig.sh" ; then
12590 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12591 break
12592 fi
12593 done
12594 fi
bec39cab 12595
3fc11d3e
JM
12596fi
12597
5062cc19
KS
12598
12599 if test x"${ac_cv_c_tclconfig}" = x ; then
12600 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
12602$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
12603 else
12604 no_tcl=
12605 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
12607$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
12608 fi
12609 fi
3fc11d3e 12610
bec39cab 12611
85541719
DE
12612 # If $no_tk is nonempty, then we can't do Tk, and there is no
12613 # point to doing Tcl.
bec39cab 12614
5062cc19
KS
12615 #
12616 # Ok, lets find the tk configuration
12617 # First, look for one uninstalled.
12618 # the alternative search directory is invoked by --with-tk
12619 #
3fc11d3e 12620
5062cc19
KS
12621 if test x"${no_tk}" = x ; then
12622 # we reset no_tk in case something fails here
12623 no_tk=true
bec39cab 12624
81ecdfbb
RW
12625# Check whether --with-tk was given.
12626if test "${with_tk+set}" = set; then :
12627 withval=$with_tk; with_tkconfig=${withval}
12628fi
12629
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
12631$as_echo_n "checking for Tk configuration... " >&6; }
12632 if test "${ac_cv_c_tkconfig+set}" = set; then :
12633 $as_echo_n "(cached) " >&6
bec39cab 12634else
3fc11d3e
JM
12635
12636
5062cc19
KS
12637 # First check to see if --with-tkconfig was specified.
12638 if test x"${with_tkconfig}" != x ; then
12639 if test -f "${with_tkconfig}/tkConfig.sh" ; then
12640 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
12641 else
81ecdfbb 12642 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
12643 fi
12644 fi
3fc11d3e 12645
5062cc19
KS
12646 # then check for a private Tk library
12647 case "${host}" in
12648 *-*-cygwin*) platDir="win" ;;
12649 *) platDir="unix" ;;
12650 esac
12651 if test x"${ac_cv_c_tkconfig}" = x ; then
12652 for i in \
12653 ../tk \
12654 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12655 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
12656 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
12657 ../../tk \
12658 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12659 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
12660 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
12661 ../../../tk \
12662 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12663 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
12664 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
12665 if test -f "$i/$platDir/tkConfig.sh" ; then
12666 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12667 break
12668 fi
12669 done
12670 fi
12671
12672 # on Darwin, check in Framework installation locations
12673 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
12674 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12675 `ls -d /Library/Frameworks 2>/dev/null` \
12676 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12677 `ls -d /System/Library/Frameworks 2>/dev/null` \
12678 ; do
12679 if test -f "$i/Tk.framework/tkConfig.sh" ; then
12680 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
12681 break
12682 fi
12683 done
12684 fi
12685
12686 # check in a few common install locations
12687 if test x"${ac_cv_c_tkconfig}" = x ; then
12688 for i in `ls -d ${libdir} 2>/dev/null` \
12689 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12690 `ls -d ${prefix}/lib 2>/dev/null` \
12691 `ls -d /usr/local/lib 2>/dev/null` \
12692 `ls -d /usr/contrib/lib 2>/dev/null` \
12693 `ls -d /usr/lib 2>/dev/null` \
12694 ; do
12695 if test -f "$i/tkConfig.sh" ; then
12696 ac_cv_c_tkconfig=`(cd $i; pwd)`
12697 break
12698 fi
12699 done
12700 fi
12701 # check in a few other private locations
12702 if test x"${ac_cv_c_tkconfig}" = x ; then
12703 for i in \
12704 ${srcdir}/../tk \
12705 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12706 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
12707 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
12708 if test -f "$i/$platDir/tkConfig.sh" ; then
12709 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12710 break
12711 fi
12712 done
12713 fi
3fc11d3e 12714
3fc11d3e
JM
12715fi
12716
12717
5062cc19
KS
12718 if test x"${ac_cv_c_tkconfig}" = x ; then
12719 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
12721$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
12722 else
12723 no_tk=
12724 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
12726$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 12727 fi
3fc11d3e 12728 fi
dd2504ab 12729
dd2504ab 12730
85541719
DE
12731 if test -z "${no_tcl}" -a -z "${no_tk}"; then
12732
81ecdfbb
RW
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
12734$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
12735
12736 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12738$as_echo "loading" >&6; }
85541719
DE
12739 . ${TCL_BIN_DIR}/tclConfig.sh
12740 else
81ecdfbb
RW
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
12742$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
12743 fi
12744
12745 # eval is required to do the TCL_DBGX substitution
12746 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
12747 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
12748
12749 # If the TCL_BIN_DIR is the build directory (not the install directory),
12750 # then set the common variable name to the value of the build variables.
12751 # For example, the variable TCL_LIB_SPEC will be set to the value
12752 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
12753 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
12754 # installed and uninstalled version of Tcl.
12755 if test -f "${TCL_BIN_DIR}/Makefile" ; then
12756 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
12757 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
12758 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
12759 elif test "`uname -s`" = "Darwin"; then
12760 # If Tcl was built as a framework, attempt to use the libraries
12761 # from the framework at the given location so that linking works
12762 # against Tcl.framework installed in an arbitary location.
12763 case ${TCL_DEFS} in
12764 *TCL_FRAMEWORK*)
12765 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
12766 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
12767 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
12768 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
12769 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
12770 break
12771 fi
12772 done
12773 fi
12774 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
12775 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
12776 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
12777 fi
12778 ;;
12779 esac
12780 fi
12781
12782 # eval is required to do the TCL_DBGX substitution
12783 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
12784 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
12785 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
12786 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802 # Check for in-tree tcl
12803 here=`pwd`
12804 cd ${srcdir}/..
12805 topdir=`pwd`
12806 cd ${here}
12807
12808 intree="no"
12809 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
12810 intree="yes"
12811 fi
12812
12813 # Find Tcl private headers
12814 if test x"${intree}" = xno; then
12815
81ecdfbb
RW
12816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
12817$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
12818 private_dir=""
12819 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
12820 if test -f ${dir}/tclInt.h ; then
12821 private_dir=${dir}
12822 fi
12823
12824 if test x"${private_dir}" = x; then
81ecdfbb 12825 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
12826 else
12827 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12829$as_echo "${private_dir}" >&6; }
85541719
DE
12830 fi
12831
12832 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
12833 TCL_LIBRARY="${TCL_LIB_SPEC}"
12834 TCL_DEPS=""
12835 else
12836 # If building tcl in the same src tree, private headers
12837 # are not needed, but we need to be sure to use the right
12838 # headers library
12839 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
12840 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
12841 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
12842 fi
12843
12844
12845
12846
12847
81ecdfbb
RW
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
12849$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 12850
5062cc19 12851 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12853$as_echo "loading" >&6; }
5062cc19 12854 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 12855 else
81ecdfbb
RW
12856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
12857$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 12858 fi
bec39cab 12859
5062cc19
KS
12860 # eval is required to do the TK_DBGX substitution
12861 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
12862 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
12863
12864 # If the TK_BIN_DIR is the build directory (not the install directory),
12865 # then set the common variable name to the value of the build variables.
12866 # For example, the variable TK_LIB_SPEC will be set to the value
12867 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
12868 # instead of TK_BUILD_LIB_SPEC since it will work with both an
12869 # installed and uninstalled version of Tcl.
85541719 12870 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
12871 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
12872 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
12873 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
12874 elif test "`uname -s`" = "Darwin"; then
12875 # If Tk was built as a framework, attempt to use the libraries
12876 # from the framework at the given location so that linking works
12877 # against Tk.framework installed in an arbitary location.
12878 case ${TK_DEFS} in
12879 *TK_FRAMEWORK*)
85541719 12880 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
12881 for i in "`cd ${TK_BIN_DIR}; pwd`" \
12882 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
12883 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
12884 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
12885 break
12886 fi
12887 done
12888 fi
85541719 12889 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
12890 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
12891 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
12892 fi
12893 ;;
12894 esac
3fc11d3e
JM
12895 fi
12896
5062cc19
KS
12897 # eval is required to do the TK_DBGX substitution
12898 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
12899 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
12900 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
12901 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 12902
3fc11d3e
JM
12903
12904
bec39cab
AC
12905
12906
12907
12908
12909
12910
12911
3fc11d3e 12912
3fc11d3e 12913
bec39cab 12914
bec39cab 12915
85541719
DE
12916 # Check for in-tree Tk
12917 intree="no"
12918 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
12919 intree="yes"
12920 fi
3fc11d3e 12921
85541719
DE
12922 # Find Tk private headers
12923 if test x"${intree}" = xno; then
3fc11d3e 12924
81ecdfbb
RW
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
12926$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
12927 private_dir=""
12928 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
12929 if test -f ${dir}/tkInt.h; then
12930 private_dir=${dir}
3fc11d3e 12931 fi
bec39cab 12932
5062cc19 12933 if test x"${private_dir}" = x; then
81ecdfbb 12934 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 12935 else
5062cc19 12936 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12938$as_echo "${private_dir}" >&6; }
3fc11d3e 12939 fi
3fc11d3e 12940
85541719
DE
12941 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
12942 TK_LIBRARY=${TK_LIB_SPEC}
12943 TK_DEPS=""
12944 else
12945 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
12946 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
12947 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
12948 fi
3fc11d3e
JM
12949
12950
3fc11d3e
JM
12951
12952
3fc11d3e 12953
85541719 12954 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 12955
85541719
DE
12956 # Include some libraries that Tcl and Tk want.
12957 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
12958 # Yes, the ordering seems wrong here. But it isn't.
12959 # TK_LIBS is the list of libraries that need to be linked
12960 # after Tcl/Tk. Note that this isn't put into LIBS. If it
12961 # were in LIBS then any link tests after this point would
12962 # try to include things like `$(LIBGUI)', which wouldn't work.
12963 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 12964
85541719
DE
12965 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
12966 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
12967 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
12968 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
12969 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
12970 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
12971 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 12972
85541719
DE
12973 if test x$gdb_cv_os_cygwin = xyes; then
12974 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
12975 WIN32LDAPP="-Wl,--subsystem,console"
12976 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 12977 fi
ffc6a242 12978
81ecdfbb 12979 subdirs="$subdirs gdbtk"
3ace7edb 12980
85541719 12981 fi
3fc11d3e
JM
12982fi
12983
12984
12985
12986
12987
12988
12989
12990
81ecdfbb
RW
12991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
12992$as_echo_n "checking for X... " >&6; }
bec39cab 12993
c906108c 12994
81ecdfbb
RW
12995# Check whether --with-x was given.
12996if test "${with_x+set}" = set; then :
12997 withval=$with_x;
12998fi
c906108c
SS
12999
13000# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13001if test "x$with_x" = xno; then
13002 # The user explicitly disabled X.
13003 have_x=disabled
13004else
81ecdfbb
RW
13005 case $x_includes,$x_libraries in #(
13006 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13007 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13008 $as_echo_n "(cached) " >&6
c906108c
SS
13009else
13010 # One or both of the vars are not set, and there is no cached value.
bec39cab 13011ac_x_includes=no ac_x_libraries=no
81ecdfbb 13012rm -f -r conftest.dir
bec39cab
AC
13013if mkdir conftest.dir; then
13014 cd conftest.dir
bec39cab 13015 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13016incroot:
13017 @echo incroot='${INCROOT}'
13018usrlibdir:
13019 @echo usrlibdir='${USRLIBDIR}'
13020libdir:
13021 @echo libdir='${LIBDIR}'
13022_ACEOF
13023 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13024 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13025 for ac_var in incroot usrlibdir libdir; do
13026 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13027 done
c906108c 13028 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13029 for ac_extension in a so sl dylib la dll; do
13030 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13031 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13032 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13033 fi
13034 done
13035 # Screen out bogus values from the imake configuration. They are
13036 # bogus both because they are the default anyway, and because
13037 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13038 case $ac_im_incroot in
81ecdfbb 13039 /usr/include) ac_x_includes= ;;
bec39cab 13040 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13041 esac
bec39cab 13042 case $ac_im_usrlibdir in
81ecdfbb 13043 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13044 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13045 esac
13046 fi
13047 cd ..
81ecdfbb 13048 rm -f -r conftest.dir
c906108c
SS
13049fi
13050
bec39cab
AC
13051# Standard set of common directories for X headers.
13052# Check X11 before X11Rn because it is often a symlink to the current release.
13053ac_x_header_dirs='
13054/usr/X11/include
81ecdfbb 13055/usr/X11R7/include
bec39cab
AC
13056/usr/X11R6/include
13057/usr/X11R5/include
13058/usr/X11R4/include
13059
13060/usr/include/X11
81ecdfbb 13061/usr/include/X11R7
bec39cab
AC
13062/usr/include/X11R6
13063/usr/include/X11R5
13064/usr/include/X11R4
13065
13066/usr/local/X11/include
81ecdfbb 13067/usr/local/X11R7/include
bec39cab
AC
13068/usr/local/X11R6/include
13069/usr/local/X11R5/include
13070/usr/local/X11R4/include
13071
13072/usr/local/include/X11
81ecdfbb 13073/usr/local/include/X11R7
bec39cab
AC
13074/usr/local/include/X11R6
13075/usr/local/include/X11R5
13076/usr/local/include/X11R4
13077
13078/usr/X386/include
13079/usr/x386/include
13080/usr/XFree86/include/X11
13081
13082/usr/include
13083/usr/local/include
13084/usr/unsupported/include
13085/usr/athena/include
13086/usr/local/x11r5/include
13087/usr/lpp/Xamples/include
13088
13089/usr/openwin/include
13090/usr/openwin/share/include'
13091
13092if test "$ac_x_includes" = no; then
81ecdfbb 13093 # Guess where to find include files, by looking for Xlib.h.
c906108c 13094 # First, try using that file with no special directory specified.
81ecdfbb 13095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13096/* end confdefs.h. */
81ecdfbb 13097#include <X11/Xlib.h>
bec39cab 13098_ACEOF
81ecdfbb 13099if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13100 # We can compile using X headers with no special include directory.
13101ac_x_includes=
13102else
bec39cab 13103 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13104 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13105 ac_x_includes=$ac_dir
13106 break
13107 fi
13108done
c906108c 13109fi
bec39cab
AC
13110rm -f conftest.err conftest.$ac_ext
13111fi # $ac_x_includes = no
c906108c 13112
bec39cab 13113if test "$ac_x_libraries" = no; then
c906108c 13114 # Check for the libraries.
c906108c
SS
13115 # See if we find them without any special options.
13116 # Don't add to $LIBS permanently.
bec39cab 13117 ac_save_LIBS=$LIBS
81ecdfbb
RW
13118 LIBS="-lX11 $LIBS"
13119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13120/* end confdefs.h. */
81ecdfbb 13121#include <X11/Xlib.h>
bec39cab
AC
13122int
13123main ()
13124{
81ecdfbb 13125XrmInitialize ()
bec39cab
AC
13126 ;
13127 return 0;
13128}
13129_ACEOF
81ecdfbb 13130if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13131 LIBS=$ac_save_LIBS
c906108c
SS
13132# We can link X programs with no special library path.
13133ac_x_libraries=
13134else
81ecdfbb
RW
13135 LIBS=$ac_save_LIBS
13136for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13137do
bec39cab 13138 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13139 for ac_extension in a so sl dylib la dll; do
13140 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13141 ac_x_libraries=$ac_dir
13142 break 2
13143 fi
13144 done
13145done
13146fi
81ecdfbb
RW
13147rm -f core conftest.err conftest.$ac_objext \
13148 conftest$ac_exeext conftest.$ac_ext
bec39cab 13149fi # $ac_x_libraries = no
c906108c 13150
81ecdfbb
RW
13151case $ac_x_includes,$ac_x_libraries in #(
13152 no,* | *,no | *\'*)
13153 # Didn't find X, or a directory has "'" in its name.
13154 ac_cv_have_x="have_x=no";; #(
13155 *)
13156 # Record where we found X for the cache.
13157 ac_cv_have_x="have_x=yes\
13158 ac_x_includes='$ac_x_includes'\
13159 ac_x_libraries='$ac_x_libraries'"
13160esac
c906108c 13161fi
81ecdfbb
RW
13162;; #(
13163 *) have_x=yes;;
13164 esac
c906108c
SS
13165 eval "$ac_cv_have_x"
13166fi # $with_x != no
13167
13168if test "$have_x" != yes; then
81ecdfbb
RW
13169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13170$as_echo "$have_x" >&6; }
c906108c
SS
13171 no_x=yes
13172else
13173 # If each of the values was on the command line, it overrides each guess.
13174 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13175 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13176 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13177 ac_cv_have_x="have_x=yes\
13178 ac_x_includes='$x_includes'\
13179 ac_x_libraries='$x_libraries'"
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13181$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13182fi
13183
13184
bec39cab 13185# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13186# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13187# This code just checks for a few cases where we'd like to ignore those
13188# definitions, even when they're present in the '.mt' file. These cases
13189# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13190# not part of the source tree.
7a292a7a 13191#
81ecdfbb
RW
13192# Check whether --enable-sim was given.
13193if test "${enable_sim+set}" = set; then :
13194 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13195 echo "enableval = ${enableval}";
13196 case "${enableval}" in
13197 yes) ignore_sim=false ;;
13198 no) ignore_sim=true ;;
13199 *) ignore_sim=false ;;
13200 esac
13201else
13202 ignore_sim=false
81ecdfbb
RW
13203fi
13204
7a292a7a
SS
13205
13206if test ! -d "${srcdir}/../sim"; then
13207 ignore_sim=true
13208fi
13209
9b624dbe
UW
13210SIM=
13211SIM_OBS=
13212if test "${ignore_sim}" = "false"; then
13213 if test x"${gdb_sim}" != x ; then
13214 SIM="${gdb_sim}"
13215 SIM_OBS="remote-sim.o"
60ca704f 13216
81ecdfbb 13217$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13218
9b624dbe 13219 fi
7a292a7a
SS
13220fi
13221
13222
13223
c906108c
SS
13224
13225
13226
13227
13228
13229
dfcd3bfb 13230
e56ac5c3
AC
13231
13232
b3a90332
AC
13233
13234
c35f4ffc 13235# List of host floatformats.
bec39cab
AC
13236
13237cat >>confdefs.h <<_ACEOF
c35f4ffc 13238#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13239_ACEOF
c35f4ffc 13240
bec39cab
AC
13241
13242cat >>confdefs.h <<_ACEOF
c35f4ffc 13243#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13244_ACEOF
13245
c35f4ffc 13246
bec39cab 13247cat >>confdefs.h <<_ACEOF
c35f4ffc 13248#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13249_ACEOF
c35f4ffc
AC
13250
13251
c906108c
SS
13252# target_subdir is used by the testsuite to find the target libraries.
13253target_subdir=
13254if test "${host}" != "${target}"; then
13255 target_subdir="${target_alias}/"
13256fi
13257
13258
13259frags=
771b4502 13260if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13261 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13262 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13263 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13264 fi
13265 frags="$frags $host_makefile_frag"
13266else
13267 host_makefile_frag=/dev/null
c906108c 13268fi
c906108c 13269
c906108c
SS
13270
13271
13272
771b4502 13273if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13274# We pick this up from the host configuration file (.mh) because we
13275# do not have a native configuration Makefile fragment.
c906108c
SS
13276nativefile=`sed -n '
13277s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13278' ${host_makefile_frag}`
c906108c
SS
13279fi
13280
13281
b00a8037 13282if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13283
13284cat >>confdefs.h <<_ACEOF
b00a8037 13285#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13286_ACEOF
b00a8037
DJ
13287
13288fi
13289
8dcde887 13290# Enable multi-ice-gdb-server.
81ecdfbb
RW
13291# Check whether --enable-multi-ice was given.
13292if test "${enable_multi_ice+set}" = set; then :
13293 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13294 yes | no)
13295 ;;
81ecdfbb 13296 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13297 esac
81ecdfbb 13298fi
b4e70030 13299
81ecdfbb
RW
13300if test "x$enable_multi_ice" = xyes; then
13301 subdirs="$subdirs multi-ice"
3ace7edb 13302
a85f51e7
DJ
13303fi
13304
496c0e1b
JB
13305# Check whether --enable-gdbserver was given.
13306if test "${enable_gdbserver+set}" = set; then :
13307 enableval=$enable_gdbserver; case "${enableval}" in
13308 yes| no|auto) ;;
13309 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13310esac
13311else
13312 enable_gdbserver=auto
13313fi
13314
13315
13316# We only build gdbserver automatically in a native configuration, and
13317# only if the user did not explicitly disable its build.
13318if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13320$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13321 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13323$as_echo "yes" >&6; }
13324 subdirs="$subdirs gdbserver"
3ace7edb 13325
496c0e1b 13326 gdbserver_build_enabled=yes
8dcde887 13327 else
81ecdfbb
RW
13328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13329$as_echo "no" >&6; }
8dcde887
MK
13330 fi
13331fi
13332
496c0e1b
JB
13333# If the user explicitly request the gdbserver to be built, verify that
13334# we were in fact able to enable it.
13335if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13336 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13337fi
13338
db985757 13339# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13340# to an empty version.
c906108c
SS
13341
13342files=
13343links=
5a2402b8 13344
c906108c
SS
13345rm -f nm.h
13346if test "${nativefile}" != ""; then
0f475e27
AC
13347 case "${nativefile}" in
13348 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13349 * ) GDB_NM_FILE="${nativefile}"
13350 esac
5a2402b8
AC
13351 files="${files} ${GDB_NM_FILE}"
13352 links="${links} nm.h"
60ca704f
SE
13353
13354cat >>confdefs.h <<_ACEOF
b78960be 13355#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 13356_ACEOF
5a2402b8 13357
c906108c 13358fi
5a2402b8
AC
13359
13360
bec39cab
AC
13361ac_sources="$files"
13362ac_dests="$links"
13363while test -n "$ac_sources"; do
13364 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
13365 set $ac_sources; ac_source=$1; shift; ac_sources=$*
13366 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
13367done
81ecdfbb 13368ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
13369
13370
c906108c
SS
13371
13372
c906108c 13373
81ecdfbb 13374$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 13375
bec39cab 13376
c971b7fa 13377ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
13378
13379ac_config_commands="$ac_config_commands default"
89a34d1b 13380
bec39cab
AC
13381cat >confcache <<\_ACEOF
13382# This file is a shell script that caches the results of configure
13383# tests run on this system so they can be shared between configure
13384# scripts and configure runs, see configure's option --config-cache.
13385# It is not useful on other systems. If it contains results you don't
13386# want to keep, you may remove or edit it.
13387#
13388# config.status only pays attention to the cache file if you give it
13389# the --recheck option to rerun configure.
13390#
13391# `ac_cv_env_foo' variables (set or unset) will be overridden when
13392# loading this file, other *unset* `ac_cv_foo' will be assigned the
13393# following values.
13394
13395_ACEOF
13396
13397# The following way of writing the cache mishandles newlines in values,
13398# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 13399# So, we kill variables containing newlines.
bec39cab
AC
13400# Ultrix sh set writes to stderr and can't be redirected directly,
13401# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
13402(
13403 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13404 eval ac_val=\$$ac_var
13405 case $ac_val in #(
13406 *${as_nl}*)
13407 case $ac_var in #(
13408 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13409$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13410 esac
13411 case $ac_var in #(
13412 _ | IFS | as_nl) ;; #(
13413 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13414 *) { eval $ac_var=; unset $ac_var;} ;;
13415 esac ;;
13416 esac
13417 done
13418
bec39cab 13419 (set) 2>&1 |
81ecdfbb
RW
13420 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13421 *${as_nl}ac_space=\ *)
13422 # `set' does not quote correctly, so add quotes: double-quote
13423 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
13424 sed -n \
13425 "s/'/'\\\\''/g;
13426 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 13427 ;; #(
bec39cab
AC
13428 *)
13429 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 13430 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 13431 ;;
81ecdfbb
RW
13432 esac |
13433 sort
13434) |
bec39cab 13435 sed '
81ecdfbb 13436 /^ac_cv_env_/b end
bec39cab 13437 t clear
81ecdfbb 13438 :clear
bec39cab
AC
13439 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13440 t end
81ecdfbb
RW
13441 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13442 :end' >>confcache
13443if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13444 if test -w "$cache_file"; then
13445 test "x$cache_file" != "x/dev/null" &&
13446 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13447$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
13448 cat confcache >$cache_file
13449 else
81ecdfbb
RW
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13451$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
13452 fi
13453fi
13454rm -f confcache
13455
13456test "x$prefix" = xNONE && prefix=$ac_default_prefix
13457# Let make expand exec_prefix.
13458test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13459
bec39cab
AC
13460DEFS=-DHAVE_CONFIG_H
13461
13462ac_libobjs=
13463ac_ltlibobjs=
13464for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13465 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
13466 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13467 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13468 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13469 # will be set to the directory where LIBOBJS objects are built.
13470 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13471 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
13472done
13473LIBOBJS=$ac_libobjs
13474
13475LTLIBOBJS=$ac_ltlibobjs
13476
13477
85981d60 13478if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
13479 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
13480Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 13481fi
a417dc56 13482if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
13483 as_fn_error "conditional \"GMAKE\" was never defined.
13484Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 13485fi
81ecdfbb
RW
13486
13487
bec39cab 13488: ${CONFIG_STATUS=./config.status}
81ecdfbb 13489ac_write_fail=0
bec39cab
AC
13490ac_clean_files_save=$ac_clean_files
13491ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
13492{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13493$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13494as_write_fail=0
13495cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
13496#! $SHELL
13497# Generated by $as_me.
13498# Run this file to recreate the current configuration.
13499# Compiler output produced by configure, useful for debugging
13500# configure, is in config.log if it exists.
13501
13502debug=false
13503ac_cs_recheck=false
13504ac_cs_silent=false
bec39cab 13505
81ecdfbb
RW
13506SHELL=\${CONFIG_SHELL-$SHELL}
13507export SHELL
13508_ASEOF
13509cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13510## -------------------- ##
13511## M4sh Initialization. ##
13512## -------------------- ##
13513
13514# Be more Bourne compatible
13515DUALCASE=1; export DUALCASE # for MKS sh
13516if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
13517 emulate sh
13518 NULLCMD=:
81ecdfbb 13519 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
13520 # is contrary to our usage. Disable this feature.
13521 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
13522 setopt NO_GLOB_SUBST
13523else
13524 case `(set -o) 2>/dev/null` in #(
13525 *posix*) :
13526 set -o posix ;; #(
13527 *) :
13528 ;;
13529esac
bec39cab 13530fi
bec39cab 13531
81ecdfbb
RW
13532
13533as_nl='
13534'
13535export as_nl
13536# Printing a long string crashes Solaris 7 /usr/bin/printf.
13537as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13538as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13539as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13540# Prefer a ksh shell builtin over an external printf program on Solaris,
13541# but without wasting forks for bash or zsh.
13542if test -z "$BASH_VERSION$ZSH_VERSION" \
13543 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13544 as_echo='print -r --'
13545 as_echo_n='print -rn --'
13546elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13547 as_echo='printf %s\n'
13548 as_echo_n='printf %s'
13549else
13550 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13551 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13552 as_echo_n='/usr/ucb/echo -n'
13553 else
13554 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13555 as_echo_n_body='eval
13556 arg=$1;
13557 case $arg in #(
13558 *"$as_nl"*)
13559 expr "X$arg" : "X\\(.*\\)$as_nl";
13560 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13561 esac;
13562 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13563 '
13564 export as_echo_n_body
13565 as_echo_n='sh -c $as_echo_n_body as_echo'
13566 fi
13567 export as_echo_body
13568 as_echo='sh -c $as_echo_body as_echo'
13569fi
13570
13571# The user is always right.
13572if test "${PATH_SEPARATOR+set}" != set; then
13573 PATH_SEPARATOR=:
13574 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13575 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13576 PATH_SEPARATOR=';'
13577 }
bec39cab
AC
13578fi
13579
13580
81ecdfbb
RW
13581# IFS
13582# We need space, tab and new line, in precisely that order. Quoting is
13583# there to prevent editors from complaining about space-tab.
13584# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13585# splitting by setting IFS to empty value.)
13586IFS=" "" $as_nl"
13587
13588# Find who we are. Look in the path if we contain no directory separator.
13589case $0 in #((
13590 *[\\/]* ) as_myself=$0 ;;
13591 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13592for as_dir in $PATH
13593do
13594 IFS=$as_save_IFS
13595 test -z "$as_dir" && as_dir=.
13596 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13597 done
13598IFS=$as_save_IFS
13599
13600 ;;
13601esac
13602# We did not find ourselves, most probably we were run as `sh COMMAND'
13603# in which case we are not to be found in the path.
13604if test "x$as_myself" = x; then
13605 as_myself=$0
13606fi
13607if test ! -f "$as_myself"; then
13608 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13609 exit 1
13610fi
13611
13612# Unset variables that we do not need and which cause bugs (e.g. in
13613# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13614# suppresses any "Segmentation fault" message there. '((' could
13615# trigger a bug in pdksh 5.2.14.
13616for as_var in BASH_ENV ENV MAIL MAILPATH
13617do eval test x\${$as_var+set} = xset \
13618 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13619done
bec39cab
AC
13620PS1='$ '
13621PS2='> '
13622PS4='+ '
13623
13624# NLS nuisances.
81ecdfbb
RW
13625LC_ALL=C
13626export LC_ALL
13627LANGUAGE=C
13628export LANGUAGE
13629
13630# CDPATH.
13631(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13632
13633
13634# as_fn_error ERROR [LINENO LOG_FD]
13635# ---------------------------------
13636# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13637# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13638# script with status $?, using 1 if that was 0.
13639as_fn_error ()
13640{
13641 as_status=$?; test $as_status -eq 0 && as_status=1
13642 if test "$3"; then
13643 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13644 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13645 fi
13646 $as_echo "$as_me: error: $1" >&2
13647 as_fn_exit $as_status
13648} # as_fn_error
13649
13650
13651# as_fn_set_status STATUS
13652# -----------------------
13653# Set $? to STATUS, without forking.
13654as_fn_set_status ()
13655{
13656 return $1
13657} # as_fn_set_status
13658
13659# as_fn_exit STATUS
13660# -----------------
13661# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13662as_fn_exit ()
13663{
13664 set +e
13665 as_fn_set_status $1
13666 exit $1
13667} # as_fn_exit
13668
13669# as_fn_unset VAR
13670# ---------------
13671# Portably unset VAR.
13672as_fn_unset ()
13673{
13674 { eval $1=; unset $1;}
13675}
13676as_unset=as_fn_unset
13677# as_fn_append VAR VALUE
13678# ----------------------
13679# Append the text in VALUE to the end of the definition contained in VAR. Take
13680# advantage of any shell optimizations that allow amortized linear growth over
13681# repeated appends, instead of the typical quadratic growth present in naive
13682# implementations.
13683if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13684 eval 'as_fn_append ()
13685 {
13686 eval $1+=\$2
13687 }'
13688else
13689 as_fn_append ()
13690 {
13691 eval $1=\$$1\$2
13692 }
13693fi # as_fn_append
13694
13695# as_fn_arith ARG...
13696# ------------------
13697# Perform arithmetic evaluation on the ARGs, and store the result in the
13698# global $as_val. Take advantage of shells that can avoid forks. The arguments
13699# must be portable across $(()) and expr.
13700if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13701 eval 'as_fn_arith ()
13702 {
13703 as_val=$(( $* ))
13704 }'
13705else
13706 as_fn_arith ()
13707 {
13708 as_val=`expr "$@" || test $? -eq 1`
13709 }
13710fi # as_fn_arith
bec39cab 13711
81ecdfbb
RW
13712
13713if expr a : '\(a\)' >/dev/null 2>&1 &&
13714 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
13715 as_expr=expr
13716else
13717 as_expr=false
13718fi
13719
81ecdfbb 13720if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
13721 as_basename=basename
13722else
13723 as_basename=false
13724fi
13725
81ecdfbb
RW
13726if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13727 as_dirname=dirname
13728else
13729 as_dirname=false
13730fi
bec39cab 13731
81ecdfbb 13732as_me=`$as_basename -- "$0" ||
bec39cab
AC
13733$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13734 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
13735 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13736$as_echo X/"$0" |
13737 sed '/^.*\/\([^/][^/]*\)\/*$/{
13738 s//\1/
13739 q
13740 }
13741 /^X\/\(\/\/\)$/{
13742 s//\1/
13743 q
13744 }
13745 /^X\/\(\/\).*/{
13746 s//\1/
13747 q
13748 }
13749 s/.*/./; q'`
b4e70030 13750
b4e70030
JB
13751# Avoid depending upon Character Ranges.
13752as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13753as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13754as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13755as_cr_digits='0123456789'
13756as_cr_alnum=$as_cr_Letters$as_cr_digits
13757
81ecdfbb
RW
13758ECHO_C= ECHO_N= ECHO_T=
13759case `echo -n x` in #(((((
13760-n*)
13761 case `echo 'xy\c'` in
13762 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13763 xy) ECHO_C='\c';;
13764 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13765 ECHO_T=' ';;
13766 esac;;
13767*)
13768 ECHO_N='-n';;
bec39cab
AC
13769esac
13770
81ecdfbb
RW
13771rm -f conf$$ conf$$.exe conf$$.file
13772if test -d conf$$.dir; then
13773 rm -f conf$$.dir/conf$$.file
bec39cab 13774else
81ecdfbb
RW
13775 rm -f conf$$.dir
13776 mkdir conf$$.dir 2>/dev/null
bec39cab 13777fi
81ecdfbb
RW
13778if (echo >conf$$.file) 2>/dev/null; then
13779 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 13780 as_ln_s='ln -s'
81ecdfbb
RW
13781 # ... but there are two gotchas:
13782 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13783 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13784 # In both cases, we have to default to `cp -p'.
13785 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13786 as_ln_s='cp -p'
13787 elif ln conf$$.file conf$$ 2>/dev/null; then
13788 as_ln_s=ln
13789 else
13790 as_ln_s='cp -p'
b4e70030 13791 fi
bec39cab
AC
13792else
13793 as_ln_s='cp -p'
13794fi
81ecdfbb
RW
13795rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13796rmdir conf$$.dir 2>/dev/null
13797
13798
13799# as_fn_mkdir_p
13800# -------------
13801# Create "$as_dir" as a directory, including parents if necessary.
13802as_fn_mkdir_p ()
13803{
13804
13805 case $as_dir in #(
13806 -*) as_dir=./$as_dir;;
13807 esac
13808 test -d "$as_dir" || eval $as_mkdir_p || {
13809 as_dirs=
13810 while :; do
13811 case $as_dir in #(
13812 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13813 *) as_qdir=$as_dir;;
13814 esac
13815 as_dirs="'$as_qdir' $as_dirs"
13816 as_dir=`$as_dirname -- "$as_dir" ||
13817$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13818 X"$as_dir" : 'X\(//\)[^/]' \| \
13819 X"$as_dir" : 'X\(//\)$' \| \
13820 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13821$as_echo X"$as_dir" |
13822 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13823 s//\1/
13824 q
13825 }
13826 /^X\(\/\/\)[^/].*/{
13827 s//\1/
13828 q
13829 }
13830 /^X\(\/\/\)$/{
13831 s//\1/
13832 q
13833 }
13834 /^X\(\/\).*/{
13835 s//\1/
13836 q
13837 }
13838 s/.*/./; q'`
13839 test -d "$as_dir" && break
13840 done
13841 test -z "$as_dirs" || eval "mkdir $as_dirs"
13842 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13843
bec39cab 13844
81ecdfbb 13845} # as_fn_mkdir_p
bec39cab 13846if mkdir -p . 2>/dev/null; then
81ecdfbb 13847 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
13848else
13849 test -d ./-p && rmdir ./-p
13850 as_mkdir_p=false
13851fi
13852
81ecdfbb
RW
13853if test -x / >/dev/null 2>&1; then
13854 as_test_x='test -x'
13855else
13856 if ls -dL / >/dev/null 2>&1; then
13857 as_ls_L_option=L
13858 else
13859 as_ls_L_option=
13860 fi
13861 as_test_x='
13862 eval sh -c '\''
13863 if test -d "$1"; then
13864 test -d "$1/.";
13865 else
13866 case $1 in #(
13867 -*)set "./$1";;
13868 esac;
13869 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
13870 ???[sx]*):;;*)false;;esac;fi
13871 '\'' sh
13872 '
13873fi
13874as_executable_p=$as_test_x
bec39cab
AC
13875
13876# Sed expression to map a string onto a valid CPP name.
13877as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13878
13879# Sed expression to map a string onto a valid variable name.
13880as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13881
13882
bec39cab 13883exec 6>&1
81ecdfbb
RW
13884## ----------------------------------- ##
13885## Main body of $CONFIG_STATUS script. ##
13886## ----------------------------------- ##
13887_ASEOF
13888test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13889
13890cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13891# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 13892# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
13893# values after options handling.
13894ac_log="
bec39cab 13895This file was extended by $as_me, which was
81ecdfbb 13896generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
13897
13898 CONFIG_FILES = $CONFIG_FILES
13899 CONFIG_HEADERS = $CONFIG_HEADERS
13900 CONFIG_LINKS = $CONFIG_LINKS
13901 CONFIG_COMMANDS = $CONFIG_COMMANDS
13902 $ $0 $@
13903
81ecdfbb
RW
13904on `(hostname || uname -n) 2>/dev/null | sed 1q`
13905"
13906
bec39cab
AC
13907_ACEOF
13908
81ecdfbb
RW
13909case $ac_config_files in *"
13910"*) set x $ac_config_files; shift; ac_config_files=$*;;
13911esac
234b45d4 13912
81ecdfbb
RW
13913case $ac_config_headers in *"
13914"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13915esac
b4e70030 13916
b4e70030 13917
81ecdfbb
RW
13918cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13919# Files that config.status was made for.
13920config_files="$ac_config_files"
13921config_headers="$ac_config_headers"
13922config_links="$ac_config_links"
13923config_commands="$ac_config_commands"
234b45d4 13924
81ecdfbb 13925_ACEOF
b4e70030 13926
81ecdfbb 13927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 13928ac_cs_usage="\
81ecdfbb
RW
13929\`$as_me' instantiates files and other configuration actions
13930from templates according to the current configuration. Unless the files
13931and actions are specified as TAGs, all are instantiated by default.
234b45d4 13932
81ecdfbb 13933Usage: $0 [OPTION]... [TAG]...
234b45d4 13934
bec39cab 13935 -h, --help print this help, then exit
81ecdfbb
RW
13936 -V, --version print version number and configuration settings, then exit
13937 -q, --quiet, --silent
13938 do not print progress messages
bec39cab
AC
13939 -d, --debug don't remove temporary files
13940 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
13941 --file=FILE[:TEMPLATE]
13942 instantiate the configuration file FILE
13943 --header=FILE[:TEMPLATE]
13944 instantiate the configuration header FILE
234b45d4 13945
bec39cab
AC
13946Configuration files:
13947$config_files
234b45d4 13948
bec39cab
AC
13949Configuration headers:
13950$config_headers
234b45d4 13951
bec39cab
AC
13952Configuration links:
13953$config_links
234b45d4 13954
bec39cab
AC
13955Configuration commands:
13956$config_commands
13957
81ecdfbb 13958Report bugs to the package provider."
b4e70030 13959
81ecdfbb
RW
13960_ACEOF
13961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
13962ac_cs_version="\\
13963config.status
81ecdfbb
RW
13964configured by $0, generated by GNU Autoconf 2.64,
13965 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 13966
81ecdfbb 13967Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
13968This config.status script is free software; the Free Software Foundation
13969gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
13970
13971ac_pwd='$ac_pwd'
13972srcdir='$srcdir'
13973INSTALL='$INSTALL'
81ecdfbb
RW
13974AWK='$AWK'
13975test -n "\$AWK" || AWK=awk
bec39cab
AC
13976_ACEOF
13977
81ecdfbb
RW
13978cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13979# The default lists apply if the user does not specify any file.
bec39cab
AC
13980ac_need_defaults=:
13981while test $# != 0
13982do
13983 case $1 in
13984 --*=*)
81ecdfbb
RW
13985 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13986 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 13987 ac_shift=:
c906108c 13988 ;;
81ecdfbb 13989 *)
bec39cab
AC
13990 ac_option=$1
13991 ac_optarg=$2
13992 ac_shift=shift
c906108c 13993 ;;
bec39cab 13994 esac
c906108c 13995
bec39cab
AC
13996 case $ac_option in
13997 # Handling of the options.
bec39cab
AC
13998 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13999 ac_cs_recheck=: ;;
81ecdfbb
RW
14000 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14001 $as_echo "$ac_cs_version"; exit ;;
14002 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
14003 debug=: ;;
14004 --file | --fil | --fi | --f )
14005 $ac_shift
81ecdfbb
RW
14006 case $ac_optarg in
14007 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14008 esac
14009 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14010 ac_need_defaults=false;;
14011 --header | --heade | --head | --hea )
14012 $ac_shift
81ecdfbb
RW
14013 case $ac_optarg in
14014 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14015 esac
14016 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14017 ac_need_defaults=false;;
81ecdfbb
RW
14018 --he | --h)
14019 # Conflict between --help and --header
14020 as_fn_error "ambiguous option: \`$1'
14021Try \`$0 --help' for more information.";;
14022 --help | --hel | -h )
14023 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14024 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14025 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14026 ac_cs_silent=: ;;
c906108c 14027
bec39cab 14028 # This is an error.
81ecdfbb
RW
14029 -*) as_fn_error "unrecognized option: \`$1'
14030Try \`$0 --help' for more information." ;;
c906108c 14031
81ecdfbb
RW
14032 *) as_fn_append ac_config_targets " $1"
14033 ac_need_defaults=false ;;
c906108c 14034
bec39cab
AC
14035 esac
14036 shift
14037done
c906108c 14038
bec39cab 14039ac_configure_extra_args=
c906108c 14040
bec39cab
AC
14041if $ac_cs_silent; then
14042 exec 6>/dev/null
14043 ac_configure_extra_args="$ac_configure_extra_args --silent"
14044fi
c906108c 14045
bec39cab 14046_ACEOF
81ecdfbb 14047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14048if \$ac_cs_recheck; then
81ecdfbb
RW
14049 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14050 shift
14051 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14052 CONFIG_SHELL='$SHELL'
14053 export CONFIG_SHELL
14054 exec "\$@"
bec39cab
AC
14055fi
14056
14057_ACEOF
81ecdfbb
RW
14058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14059exec 5>>config.log
14060{
14061 echo
14062 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14063## Running $as_me. ##
14064_ASBOX
14065 $as_echo "$ac_log"
14066} >&5
bec39cab 14067
81ecdfbb
RW
14068_ACEOF
14069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14070#
81ecdfbb 14071# INIT-COMMANDS
c906108c 14072#
a417dc56 14073ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14074
bec39cab
AC
14075_ACEOF
14076
81ecdfbb 14077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14078
81ecdfbb 14079# Handling of arguments.
bec39cab 14080for ac_config_target in $ac_config_targets
c906108c 14081do
81ecdfbb
RW
14082 case $ac_config_target in
14083 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14084 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14085 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14086 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14087 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14088 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14089 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14090 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14091 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14092
14093 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14094 esac
14095done
14096
81ecdfbb 14097
bec39cab
AC
14098# If the user did not use the arguments to specify the items to instantiate,
14099# then the envvar interface is used. Set only those that are not.
14100# We use the long form for the default assignment because of an extremely
14101# bizarre bug on SunOS 4.1.3.
14102if $ac_need_defaults; then
14103 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14104 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14105 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14106 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14107fi
14108
b4e70030 14109# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14110# simply because there is no reason against having it here, and in addition,
b4e70030 14111# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14112# Hook for its removal unless debugging.
14113# Note that there is a small window in which the directory will not be cleaned:
14114# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14115$debug ||
14116{
81ecdfbb
RW
14117 tmp=
14118 trap 'exit_status=$?
14119 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14120' 0
14121 trap 'as_fn_exit 1' 1 2 13 15
14122}
14123# Create a (secure) tmp directory for tmp files.
14124
14125{
14126 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14127 test -n "$tmp" && test -d "$tmp"
14128} ||
14129{
14130 tmp=./conf$$-$RANDOM
14131 (umask 077 && mkdir "$tmp")
14132} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14133
14134# Set up the scripts for CONFIG_FILES section.
14135# No need to generate them if there are no CONFIG_FILES.
14136# This happens for instance with `./config.status config.h'.
14137if test -n "$CONFIG_FILES"; then
14138
14139if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14140 ac_cs_awk_getline=:
14141 ac_cs_awk_pipe_init=
14142 ac_cs_awk_read_file='
14143 while ((getline aline < (F[key])) > 0)
14144 print(aline)
14145 close(F[key])'
14146 ac_cs_awk_pipe_fini=
14147else
14148 ac_cs_awk_getline=false
14149 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14150 ac_cs_awk_read_file='
14151 print "|#_!!_#|"
14152 print "cat " F[key] " &&"
14153 '$ac_cs_awk_pipe_init
14154 # The final `:' finishes the AND list.
14155 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14156fi
14157ac_cr=`echo X | tr X '\015'`
14158# On cygwin, bash can eat \r inside `` if the user requested igncr.
14159# But we know of no other shell where ac_cr would be empty at this
14160# point, so we can use a bashism as a fallback.
14161if test "x$ac_cr" = x; then
14162 eval ac_cr=\$\'\\r\'
14163fi
14164ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14165if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14166 ac_cs_awk_cr='\r'
14167else
14168 ac_cs_awk_cr=$ac_cr
14169fi
14170
14171echo 'BEGIN {' >"$tmp/subs1.awk" &&
14172_ACEOF
14173
14174# Create commands to substitute file output variables.
14175{
14176 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14177 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14178 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14179 echo "_ACAWK" &&
14180 echo "_ACEOF"
14181} >conf$$files.sh &&
14182. ./conf$$files.sh ||
14183 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14184rm -f conf$$files.sh
14185
14186{
14187 echo "cat >conf$$subs.awk <<_ACEOF" &&
14188 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14189 echo "_ACEOF"
14190} >conf$$subs.sh ||
14191 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14192ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14193ac_delim='%!_!# '
14194for ac_last_try in false false false false false :; do
14195 . ./conf$$subs.sh ||
14196 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14197
14198 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14199 if test $ac_delim_n = $ac_delim_num; then
14200 break
14201 elif $ac_last_try; then
14202 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14203 else
14204 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14205 fi
14206done
14207rm -f conf$$subs.sh
14208
14209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14210cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14211_ACEOF
14212sed -n '
14213h
14214s/^/S["/; s/!.*/"]=/
14215p
14216g
14217s/^[^!]*!//
14218:repl
14219t repl
14220s/'"$ac_delim"'$//
14221t delim
14222:nl
14223h
14224s/\(.\{148\}\).*/\1/
14225t more1
14226s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14227p
14228n
14229b repl
14230:more1
14231s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14232p
14233g
14234s/.\{148\}//
14235t nl
14236:delim
14237h
14238s/\(.\{148\}\).*/\1/
14239t more2
14240s/["\\]/\\&/g; s/^/"/; s/$/"/
14241p
14242b
14243:more2
14244s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14245p
14246g
14247s/.\{148\}//
14248t delim
14249' <conf$$subs.awk | sed '
14250/^[^""]/{
14251 N
14252 s/\n//
14253}
14254' >>$CONFIG_STATUS || ac_write_fail=1
14255rm -f conf$$subs.awk
14256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14257_ACAWK
14258cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14259 for (key in S) S_is_set[key] = 1
14260 FS = "\a"
14261 \$ac_cs_awk_pipe_init
14262}
14263{
14264 line = $ 0
14265 nfields = split(line, field, "@")
14266 substed = 0
14267 len = length(field[1])
14268 for (i = 2; i < nfields; i++) {
14269 key = field[i]
14270 keylen = length(key)
14271 if (S_is_set[key]) {
14272 value = S[key]
14273 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14274 len += length(value) + length(field[++i])
14275 substed = 1
14276 } else
14277 len += 1 + keylen
14278 }
14279 if (nfields == 3 && !substed) {
14280 key = field[2]
14281 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14282 \$ac_cs_awk_read_file
14283 next
14284 }
14285 }
14286 print line
b4e70030 14287}
81ecdfbb
RW
14288\$ac_cs_awk_pipe_fini
14289_ACAWK
14290_ACEOF
14291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14292if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14293 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14294else
14295 cat
14296fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14297 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14298_ACEOF
14299
14300# VPATH may cause trouble with some makes, so we remove $(srcdir),
14301# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14302# trailing colons and then remove the whole line if VPATH becomes empty
14303# (actually we leave an empty line to preserve line numbers).
14304if test "x$srcdir" = x.; then
14305 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14306s/:*\$(srcdir):*/:/
14307s/:*\${srcdir}:*/:/
14308s/:*@srcdir@:*/:/
14309s/^\([^=]*=[ ]*\):*/\1/
14310s/:*$//
14311s/^[^=]*=[ ]*$//
14312}'
14313fi
14314
14315cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14316fi # test -n "$CONFIG_FILES"
14317
14318# Set up the scripts for CONFIG_HEADERS section.
14319# No need to generate them if there are no CONFIG_HEADERS.
14320# This happens for instance with `./config.status Makefile'.
14321if test -n "$CONFIG_HEADERS"; then
14322cat >"$tmp/defines.awk" <<\_ACAWK ||
14323BEGIN {
14324_ACEOF
14325
14326# Transform confdefs.h into an awk script `defines.awk', embedded as
14327# here-document in config.status, that substitutes the proper values into
14328# config.h.in to produce config.h.
4e8d927d 14329
81ecdfbb
RW
14330# Create a delimiter string that does not exist in confdefs.h, to ease
14331# handling of long lines.
14332ac_delim='%!_!# '
14333for ac_last_try in false false :; do
14334 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14335 if test -z "$ac_t"; then
14336 break
14337 elif $ac_last_try; then
14338 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14339 else
14340 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14341 fi
14342done
4e8d927d 14343
81ecdfbb
RW
14344# For the awk script, D is an array of macro values keyed by name,
14345# likewise P contains macro parameters if any. Preserve backslash
14346# newline sequences.
14347
14348ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14349sed -n '
14350s/.\{148\}/&'"$ac_delim"'/g
14351t rset
14352:rset
14353s/^[ ]*#[ ]*define[ ][ ]*/ /
14354t def
14355d
14356:def
14357s/\\$//
14358t bsnl
14359s/["\\]/\\&/g
14360s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14361D["\1"]=" \3"/p
14362s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14363d
14364:bsnl
14365s/["\\]/\\&/g
14366s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14367D["\1"]=" \3\\\\\\n"\\/p
14368t cont
14369s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14370t cont
14371d
14372:cont
14373n
14374s/.\{148\}/&'"$ac_delim"'/g
14375t clear
14376:clear
14377s/\\$//
14378t bsnlc
14379s/["\\]/\\&/g; s/^/"/; s/$/"/p
14380d
14381:bsnlc
14382s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14383b cont
14384' <confdefs.h | sed '
14385s/'"$ac_delim"'/"\\\
14386"/g' >>$CONFIG_STATUS || ac_write_fail=1
14387
14388cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14389 for (key in D) D_is_set[key] = 1
14390 FS = "\a"
14391}
14392/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14393 line = \$ 0
14394 split(line, arg, " ")
14395 if (arg[1] == "#") {
14396 defundef = arg[2]
14397 mac1 = arg[3]
14398 } else {
14399 defundef = substr(arg[1], 2)
14400 mac1 = arg[2]
14401 }
14402 split(mac1, mac2, "(") #)
14403 macro = mac2[1]
14404 prefix = substr(line, 1, index(line, defundef) - 1)
14405 if (D_is_set[macro]) {
14406 # Preserve the white space surrounding the "#".
14407 print prefix "define", macro P[macro] D[macro]
14408 next
14409 } else {
14410 # Replace #undef with comments. This is necessary, for example,
14411 # in the case of _POSIX_SOURCE, which is predefined and required
14412 # on some systems where configure will not decide to define it.
14413 if (defundef == "undef") {
14414 print "/*", prefix defundef, macro, "*/"
14415 next
14416 }
14417 }
b4e70030 14418}
81ecdfbb
RW
14419{ print }
14420_ACAWK
b4e70030 14421_ACEOF
81ecdfbb
RW
14422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14423 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14424fi # test -n "$CONFIG_HEADERS"
4e8d927d 14425
4e8d927d 14426
81ecdfbb
RW
14427eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
14428shift
14429for ac_tag
14430do
14431 case $ac_tag in
14432 :[FHLC]) ac_mode=$ac_tag; continue;;
14433 esac
14434 case $ac_mode$ac_tag in
14435 :[FHL]*:*);;
14436 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
14437 :[FH]-) ac_tag=-:-;;
14438 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14439 esac
14440 ac_save_IFS=$IFS
14441 IFS=:
14442 set x $ac_tag
14443 IFS=$ac_save_IFS
14444 shift
14445 ac_file=$1
14446 shift
4e8d927d 14447
81ecdfbb
RW
14448 case $ac_mode in
14449 :L) ac_source=$1;;
14450 :[FH])
14451 ac_file_inputs=
14452 for ac_f
14453 do
14454 case $ac_f in
14455 -) ac_f="$tmp/stdin";;
14456 *) # Look for the file first in the build tree, then in the source tree
14457 # (if the path is not absolute). The absolute path cannot be DOS-style,
14458 # because $ac_f cannot contain `:'.
14459 test -f "$ac_f" ||
14460 case $ac_f in
14461 [\\/$]*) false;;
14462 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14463 esac ||
14464 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14465 esac
14466 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14467 as_fn_append ac_file_inputs " '$ac_f'"
14468 done
14469
14470 # Let's still pretend it is `configure' which instantiates (i.e., don't
14471 # use $as_me), people would be surprised to read:
14472 # /* config.h. Generated by config.status. */
14473 configure_input='Generated from '`
14474 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14475 `' by configure.'
14476 if test x"$ac_file" != x-; then
14477 configure_input="$ac_file. $configure_input"
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14479$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 14480 fi
81ecdfbb
RW
14481 # Neutralize special characters interpreted by sed in replacement strings.
14482 case $configure_input in #(
14483 *\&* | *\|* | *\\* )
14484 ac_sed_conf_input=`$as_echo "$configure_input" |
14485 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14486 *) ac_sed_conf_input=$configure_input;;
14487 esac
4e8d927d 14488
81ecdfbb
RW
14489 case $ac_tag in
14490 *:-:* | *:-) cat >"$tmp/stdin" \
14491 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
14492 esac
14493 ;;
c906108c
SS
14494 esac
14495
81ecdfbb 14496 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
14497$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14498 X"$ac_file" : 'X\(//\)[^/]' \| \
14499 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
14500 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14501$as_echo X"$ac_file" |
14502 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14503 s//\1/
14504 q
14505 }
14506 /^X\(\/\/\)[^/].*/{
14507 s//\1/
14508 q
14509 }
14510 /^X\(\/\/\)$/{
14511 s//\1/
14512 q
14513 }
14514 /^X\(\/\).*/{
14515 s//\1/
14516 q
14517 }
14518 s/.*/./; q'`
14519 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14520 ac_builddir=.
14521
81ecdfbb
RW
14522case "$ac_dir" in
14523.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14524*)
14525 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14526 # A ".." for each directory in $ac_dir_suffix.
14527 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14528 case $ac_top_builddir_sub in
14529 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14530 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14531 esac ;;
14532esac
14533ac_abs_top_builddir=$ac_pwd
14534ac_abs_builddir=$ac_pwd$ac_dir_suffix
14535# for backward compatibility:
14536ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14537
14538case $srcdir in
81ecdfbb 14539 .) # We are building in place.
bec39cab 14540 ac_srcdir=.
81ecdfbb
RW
14541 ac_top_srcdir=$ac_top_builddir_sub
14542 ac_abs_top_srcdir=$ac_pwd ;;
14543 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14544 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14545 ac_top_srcdir=$srcdir
14546 ac_abs_top_srcdir=$srcdir ;;
14547 *) # Relative name.
14548 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14549 ac_top_srcdir=$ac_top_build_prefix$srcdir
14550 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14551esac
81ecdfbb 14552ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 14553
c906108c 14554
81ecdfbb
RW
14555 case $ac_mode in
14556 :F)
14557 #
14558 # CONFIG_FILE
14559 #
c906108c 14560
bec39cab
AC
14561 case $INSTALL in
14562 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 14563 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 14564 esac
81ecdfbb 14565_ACEOF
121ce6e5 14566
81ecdfbb
RW
14567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14568# If the template does not know about datarootdir, expand it.
14569# FIXME: This hack should be removed a few years after 2.60.
14570ac_datarootdir_hack=; ac_datarootdir_seen=
14571ac_sed_dataroot='
14572/datarootdir/ {
14573 p
14574 q
14575}
14576/@datadir@/p
14577/@docdir@/p
14578/@infodir@/p
14579/@localedir@/p
14580/@mandir@/p'
14581case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14582*datarootdir*) ac_datarootdir_seen=yes;;
14583*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14584 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14585$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14586_ACEOF
14587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14588 ac_datarootdir_hack='
14589 s&@datadir@&$datadir&g
14590 s&@docdir@&$docdir&g
14591 s&@infodir@&$infodir&g
14592 s&@localedir@&$localedir&g
14593 s&@mandir@&$mandir&g
14594 s&\\\${datarootdir}&$datarootdir&g' ;;
14595esac
4e8d927d 14596_ACEOF
81ecdfbb
RW
14597
14598# Neutralize VPATH when `$srcdir' = `.'.
14599# Shell code in configure.ac might set extrasub.
14600# FIXME: do we really want to maintain this feature?
14601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14602ac_sed_extra="$ac_vpsub
bec39cab
AC
14603$extrasub
14604_ACEOF
81ecdfbb 14605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
14606:t
14607/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
14608s|@configure_input@|$ac_sed_conf_input|;t t
14609s&@top_builddir@&$ac_top_builddir_sub&;t t
14610s&@top_build_prefix@&$ac_top_build_prefix&;t t
14611s&@srcdir@&$ac_srcdir&;t t
14612s&@abs_srcdir@&$ac_abs_srcdir&;t t
14613s&@top_srcdir@&$ac_top_srcdir&;t t
14614s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14615s&@builddir@&$ac_builddir&;t t
14616s&@abs_builddir@&$ac_abs_builddir&;t t
14617s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14618s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
14619$ac_datarootdir_hack
14620"
14621eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
14622if $ac_cs_awk_getline; then
14623 $AWK -f "$tmp/subs.awk"
14624else
14625 $AWK -f "$tmp/subs.awk" | $SHELL
14626fi >$tmp/out \
14627 || as_fn_error "could not create $ac_file" "$LINENO" 5
14628
14629test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14630 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14631 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14633which seems to be undefined. Please make sure it is defined." >&5
14634$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14635which seems to be undefined. Please make sure it is defined." >&2;}
14636
14637 rm -f "$tmp/stdin"
bec39cab 14638 case $ac_file in
81ecdfbb
RW
14639 -) cat "$tmp/out" && rm -f "$tmp/out";;
14640 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14641 esac \
14642 || as_fn_error "could not create $ac_file" "$LINENO" 5
14643 ;;
14644 :H)
14645 #
14646 # CONFIG_HEADER
14647 #
bec39cab 14648 if test x"$ac_file" != x-; then
81ecdfbb
RW
14649 {
14650 $as_echo "/* $configure_input */" \
14651 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14652 } >"$tmp/config.h" \
14653 || as_fn_error "could not create $ac_file" "$LINENO" 5
14654 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14656$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 14657 else
81ecdfbb
RW
14658 rm -f "$ac_file"
14659 mv "$tmp/config.h" "$ac_file" \
14660 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
14661 fi
14662 else
81ecdfbb
RW
14663 $as_echo "/* $configure_input */" \
14664 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14665 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 14666 fi
81ecdfbb
RW
14667 ;;
14668 :L)
14669 #
14670 # CONFIG_LINK
14671 #
c906108c 14672
81ecdfbb
RW
14673 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
14674 :
b4e70030 14675 else
81ecdfbb
RW
14676 # Prefer the file from the source tree if names are identical.
14677 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
14678 ac_source=$srcdir/$ac_source
14679 fi
b4e70030 14680
81ecdfbb
RW
14681 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
14682$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 14683
81ecdfbb
RW
14684 if test ! -r "$ac_source"; then
14685 as_fn_error "$ac_source: file not found" "$LINENO" 5
14686 fi
14687 rm -f "$ac_file"
bec39cab 14688
81ecdfbb
RW
14689 # Try a relative symlink, then a hard link, then a copy.
14690 case $srcdir in
14691 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
14692 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
14693 esac
14694 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
14695 ln "$ac_source" "$ac_file" 2>/dev/null ||
14696 cp -p "$ac_source" "$ac_file" ||
14697 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
14698 fi
14699 ;;
14700 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14701$as_echo "$as_me: executing $ac_file commands" >&6;}
14702 ;;
c906108c 14703 esac
b4e70030 14704
bec39cab 14705
81ecdfbb
RW
14706 case $ac_file$ac_mode in
14707 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 14708 "default":C)
c906108c
SS
14709case x$CONFIG_HEADERS in
14710xconfig.h:config.in)
14711echo > stamp-h ;;
14712esac
bec39cab 14713 ;;
81ecdfbb 14714
bec39cab 14715 esac
81ecdfbb 14716done # for ac_tag
c906108c 14717
bec39cab 14718
81ecdfbb 14719as_fn_exit 0
bec39cab 14720_ACEOF
bec39cab
AC
14721ac_clean_files=$ac_clean_files_save
14722
81ecdfbb
RW
14723test $ac_write_fail = 0 ||
14724 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14725
bec39cab
AC
14726
14727# configure is writing to config.log, and then calls config.status.
14728# config.status does its own redirection, appending to config.log.
14729# Unfortunately, on DOS this fails, as config.log is still kept open
14730# by configure, so config.status won't be able to write to it; its
14731# output is simply discarded. So we exec the FD to /dev/null,
14732# effectively closing config.log, so it can be properly (re)opened and
14733# appended to by config.status. When coming back to configure, we
14734# need to make the FD available again.
14735if test "$no_create" != yes; then
14736 ac_cs_success=:
14737 ac_config_status_args=
14738 test "$silent" = yes &&
14739 ac_config_status_args="$ac_config_status_args --quiet"
14740 exec 5>/dev/null
14741 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14742 exec 5>>config.log
14743 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14744 # would make configure fail if this is the last instruction.
81ecdfbb 14745 $ac_cs_success || as_fn_exit $?
bec39cab 14746fi
c906108c 14747
bec39cab 14748#
81ecdfbb 14749# CONFIG_SUBDIRS section.
bec39cab 14750#
c906108c
SS
14751if test "$no_recursion" != yes; then
14752
81ecdfbb
RW
14753 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
14754 # so they do not pile up.
c906108c
SS
14755 ac_sub_configure_args=
14756 ac_prev=
fdc59709
PB
14757 eval "set x $ac_configure_args"
14758 shift
14759 for ac_arg
14760 do
c906108c
SS
14761 if test -n "$ac_prev"; then
14762 ac_prev=
14763 continue
14764 fi
bec39cab 14765 case $ac_arg in
c906108c
SS
14766 -cache-file | --cache-file | --cache-fil | --cache-fi \
14767 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14768 ac_prev=cache_file ;;
14769 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
14770 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14771 | --c=*)
14772 ;;
14773 --config-cache | -C)
c906108c
SS
14774 ;;
14775 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14776 ac_prev=srcdir ;;
14777 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14778 ;;
bec39cab
AC
14779 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14780 ac_prev=prefix ;;
14781 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14782 ;;
81ecdfbb
RW
14783 --disable-option-checking)
14784 ;;
fdc59709
PB
14785 *)
14786 case $ac_arg in
81ecdfbb 14787 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14788 esac
81ecdfbb 14789 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
14790 esac
14791 done
14792
bec39cab
AC
14793 # Always prepend --prefix to ensure using the same prefix
14794 # in subdir configurations.
fdc59709
PB
14795 ac_arg="--prefix=$prefix"
14796 case $ac_arg in
81ecdfbb 14797 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14798 esac
81ecdfbb
RW
14799 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14800
14801 # Pass --silent
14802 if test "$silent" = yes; then
14803 ac_sub_configure_args="--silent $ac_sub_configure_args"
14804 fi
14805
14806 # Always prepend --disable-option-checking to silence warnings, since
14807 # different subdirs can have different --enable and --with options.
14808 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 14809
b4e70030 14810 ac_popdir=`pwd`
bec39cab 14811 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
14812
14813 # Do not complain, so a configure script can configure whichever
14814 # parts of a large source tree are present.
fdc59709 14815 test -d "$srcdir/$ac_dir" || continue
c906108c 14816
81ecdfbb
RW
14817 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14818 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14819 $as_echo "$ac_msg" >&6
14820 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14821 ac_builddir=.
14822
81ecdfbb
RW
14823case "$ac_dir" in
14824.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14825*)
14826 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14827 # A ".." for each directory in $ac_dir_suffix.
14828 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14829 case $ac_top_builddir_sub in
14830 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14831 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14832 esac ;;
14833esac
14834ac_abs_top_builddir=$ac_pwd
14835ac_abs_builddir=$ac_pwd$ac_dir_suffix
14836# for backward compatibility:
14837ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14838
14839case $srcdir in
81ecdfbb 14840 .) # We are building in place.
bec39cab 14841 ac_srcdir=.
81ecdfbb
RW
14842 ac_top_srcdir=$ac_top_builddir_sub
14843 ac_abs_top_srcdir=$ac_pwd ;;
14844 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14845 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14846 ac_top_srcdir=$srcdir
14847 ac_abs_top_srcdir=$srcdir ;;
14848 *) # Relative name.
14849 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14850 ac_top_srcdir=$ac_top_build_prefix$srcdir
14851 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14852esac
81ecdfbb 14853ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 14854
c906108c 14855
fdc59709 14856 cd "$ac_dir"
c906108c
SS
14857
14858 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
14859 if test -f "$ac_srcdir/configure.gnu"; then
14860 ac_sub_configure=$ac_srcdir/configure.gnu
14861 elif test -f "$ac_srcdir/configure"; then
14862 ac_sub_configure=$ac_srcdir/configure
14863 elif test -f "$ac_srcdir/configure.in"; then
14864 # This should be Cygnus configure.
14865 ac_sub_configure=$ac_aux_dir/configure
c906108c 14866 else
81ecdfbb
RW
14867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14868$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
14869 ac_sub_configure=
14870 fi
14871
14872 # The recursion is here.
14873 if test -n "$ac_sub_configure"; then
c906108c 14874 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
14875 case $cache_file in
14876 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
14877 *) # Relative name.
14878 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 14879 esac
c906108c 14880
81ecdfbb
RW
14881 { $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
14882$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 14883 # The eval makes quoting arguments work.
fdc59709
PB
14884 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14885 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 14886 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
14887 fi
14888
fdc59709 14889 cd "$ac_popdir"
c906108c
SS
14890 done
14891fi
81ecdfbb
RW
14892if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14894$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14895fi
c906108c
SS
14896
14897
14898exit 0