gdb/
[deliverable/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
9009e1ae
MR
1431Program names:
1432 --program-prefix=PREFIX prepend PREFIX to installed program names
1433 --program-suffix=SUFFIX append SUFFIX to installed program names
1434 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1435
bec39cab
AC
1436X features:
1437 --x-includes=DIR X include files are in DIR
1438 --x-libraries=DIR X library files are in DIR
1439
1440System types:
1441 --build=BUILD configure for building on BUILD [guessed]
1442 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1443 --target=TARGET configure for building compilers for TARGET [HOST]
1444_ACEOF
1445fi
1446
1447if test -n "$ac_init_help"; then
1448
1449 cat <<\_ACEOF
1450
1451Optional Features:
81ecdfbb 1452 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1453 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1454 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1455 --enable-maintainer-mode enable make rules and dependencies not useful
1456 (and sometimes confusing) to the casual installer
da2f07f1
JK
1457 --enable-plugins Enable support for plugins (defaults no)
1458 --disable-largefile omit support for large files
a1220294
TT
1459 --enable-targets=TARGETS
1460 alternative target configurations
c0993dbe 1461 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1462 --disable-gdbcli disable command-line interface (CLI)
1463 --disable-gdbmi disable machine-interface (MI)
1464 --enable-tui enable full-screen terminal user interface (TUI)
1465 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1466 --enable-profiling enable profiling of GDB
3841debe 1467 --disable-rpath do not hardcode runtime library paths
a1220294 1468 --enable-werror treat compile warnings as errors
32c1c914 1469 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1470 --enable-gdb-build-warnings
32c1c914 1471 enable GDB specific build-time compiler warnings if
a1220294 1472 gcc is used
32c1c914 1473 --enable-sim link gdb with simulator
bec39cab 1474 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1475 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1476 is auto)
bec39cab
AC
1477
1478Optional Packages:
1479 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1480 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1481 --with-separate-debug-dir=PATH
32c1c914 1482 look for global separate debug info in this path
62e4f60c 1483 [LIBDIR/debug]
b14b1491
TT
1484 --with-gdb-datadir=PATH look for global separate data files in this path
1485 [DATADIR/gdb]
29b0e8a2 1486 --with-relocated-sources=PATH
32c1c914 1487 automatically relocate this path for source files
bccbefd2 1488 --with-auto-load-safe-path=PATH
6dea1fbd
JK
1489 directories safe to hold auto-loaded files, use
1490 $ddir for --with-gdb-datadir path [$ddir/auto-load]
bccbefd2
JK
1491 --without-auto-load-safe-path
1492 do not restrict auto-loaded files locations
05e7c244 1493 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1494 --with-curses use the curses library instead of the termcap
1495 library
c16158bc
JM
1496 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1497 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1498 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1499 --with-libiconv-prefix=DIR
1500 search for libiconv in DIR/include and DIR/lib
478aac75 1501 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1502 --with-system-readline use installed readline library
b8e0a31c
SD
1503 --with-jit-reader-dir=PATH
1504 directory to load the JIT readers from
5c39566f 1505 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1506 --with-gnu-ld assume the C compiler uses GNU ld default=no
1507 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1508 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1509 --with-python[=PYTHON] include python support
1510 (auto/yes/no/<python-program>)
a1220294
TT
1511 --without-included-regex
1512 don't use included regex; this is the default on
1513 systems with version 2 of the GNU C library (use
1514 with caution on other system)
81ecdfbb 1515 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1516 --with-system-gdbinit=PATH
32c1c914 1517 automatically load a system-wide gdbinit file
5062cc19
KS
1518 --with-tcl directory containing tcl configuration (tclConfig.sh)
1519 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1520 --with-x use the X Window System
bec39cab
AC
1521
1522Some influential environment variables:
1523 CC C compiler command
1524 CFLAGS C compiler flags
1525 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1526 nonstandard directory <lib dir>
81ecdfbb
RW
1527 LIBS libraries to pass to the linker, e.g. -l<library>
1528 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1529 you have headers in a nonstandard directory <include dir>
bec39cab 1530 CPP C preprocessor
f06e05e0
JK
1531 MAKEINFO Parent configure detects if it is of sufficient version.
1532 MAKEINFOFLAGS
1533 Parameters for MAKEINFO.
81ecdfbb
RW
1534 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1535 the first program found out of: `bison -y', `byacc', `yacc'.
1536 YFLAGS The list of arguments that will be passed by default to $YACC.
1537 This script will default YFLAGS to the empty string to avoid a
1538 default value of `-d' given by some make applications.
1539 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1540
1541Use these variables to override the choices made by `configure' or to help
1542it to find libraries and programs with nonstandard names/locations.
1543
81ecdfbb 1544Report bugs to the package provider.
bec39cab 1545_ACEOF
81ecdfbb 1546ac_status=$?
bec39cab
AC
1547fi
1548
1549if test "$ac_init_help" = "recursive"; then
1550 # If there are subdirs, report their specific --help.
bec39cab 1551 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1552 test -d "$ac_dir" ||
1553 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1554 continue
bec39cab
AC
1555 ac_builddir=.
1556
81ecdfbb
RW
1557case "$ac_dir" in
1558.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1559*)
1560 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1561 # A ".." for each directory in $ac_dir_suffix.
1562 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1563 case $ac_top_builddir_sub in
1564 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1566 esac ;;
1567esac
1568ac_abs_top_builddir=$ac_pwd
1569ac_abs_builddir=$ac_pwd$ac_dir_suffix
1570# for backward compatibility:
1571ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1572
1573case $srcdir in
81ecdfbb 1574 .) # We are building in place.
bec39cab 1575 ac_srcdir=.
81ecdfbb
RW
1576 ac_top_srcdir=$ac_top_builddir_sub
1577 ac_abs_top_srcdir=$ac_pwd ;;
1578 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1579 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1580 ac_top_srcdir=$srcdir
1581 ac_abs_top_srcdir=$srcdir ;;
1582 *) # Relative name.
1583 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1584 ac_top_srcdir=$ac_top_build_prefix$srcdir
1585 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1586esac
81ecdfbb 1587ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1588
81ecdfbb
RW
1589 cd "$ac_dir" || { ac_status=$?; continue; }
1590 # Check for guested configure.
1591 if test -f "$ac_srcdir/configure.gnu"; then
1592 echo &&
1593 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1594 elif test -f "$ac_srcdir/configure"; then
1595 echo &&
1596 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1597 else
81ecdfbb
RW
1598 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1599 fi || ac_status=$?
1600 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1601 done
1602fi
1603
81ecdfbb 1604test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1605if $ac_init_version; then
1606 cat <<\_ACEOF
81ecdfbb
RW
1607configure
1608generated by GNU Autoconf 2.64
bec39cab 1609
81ecdfbb 1610Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1611This configure script is free software; the Free Software Foundation
1612gives unlimited permission to copy, distribute and modify it.
1613_ACEOF
81ecdfbb 1614 exit
bec39cab 1615fi
bec39cab 1616
81ecdfbb
RW
1617## ------------------------ ##
1618## Autoconf initialization. ##
1619## ------------------------ ##
bec39cab 1620
81ecdfbb
RW
1621# ac_fn_c_try_compile LINENO
1622# --------------------------
1623# Try to compile conftest.$ac_ext, and return whether this succeeded.
1624ac_fn_c_try_compile ()
1625{
1626 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1627 rm -f conftest.$ac_objext
1628 if { { ac_try="$ac_compile"
1629case "(($ac_try" in
1630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1631 *) ac_try_echo=$ac_try;;
1632esac
1633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1634$as_echo "$ac_try_echo"; } >&5
1635 (eval "$ac_compile") 2>conftest.err
1636 ac_status=$?
1637 if test -s conftest.err; then
1638 grep -v '^ *+' conftest.err >conftest.er1
1639 cat conftest.er1 >&5
1640 mv -f conftest.er1 conftest.err
1641 fi
1642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1643 test $ac_status = 0; } && {
1644 test -z "$ac_c_werror_flag" ||
1645 test ! -s conftest.err
1646 } && test -s conftest.$ac_objext; then :
1647 ac_retval=0
1648else
1649 $as_echo "$as_me: failed program was:" >&5
1650sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1651
81ecdfbb
RW
1652 ac_retval=1
1653fi
1654 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1655 return $ac_retval
1656
1657} # ac_fn_c_try_compile
1658
1659# ac_fn_c_try_cpp LINENO
1660# ----------------------
1661# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_cpp ()
bec39cab 1663{
81ecdfbb
RW
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 if { { ac_try="$ac_cpp conftest.$ac_ext"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680 test $ac_status = 0; } >/dev/null && {
1681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 }; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1688
81ecdfbb
RW
1689 ac_retval=1
1690fi
1691 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1692 return $ac_retval
bec39cab 1693
81ecdfbb 1694} # ac_fn_c_try_cpp
bec39cab 1695
81ecdfbb
RW
1696# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1697# -------------------------------------------------------
1698# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1699# the include files in INCLUDES and setting the cache variable VAR
1700# accordingly.
1701ac_fn_c_check_header_mongrel ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706$as_echo_n "checking for $2... " >&6; }
1707if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1708 $as_echo_n "(cached) " >&6
1709fi
1710eval ac_res=\$$3
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1712$as_echo "$ac_res" >&6; }
1713else
1714 # Is the header compilable?
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1716$as_echo_n "checking $2 usability... " >&6; }
1717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1718/* end confdefs.h. */
1719$4
1720#include <$2>
1721_ACEOF
1722if ac_fn_c_try_compile "$LINENO"; then :
1723 ac_header_compiler=yes
1724else
1725 ac_header_compiler=no
1726fi
1727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1729$as_echo "$ac_header_compiler" >&6; }
bec39cab 1730
81ecdfbb
RW
1731# Is the header present?
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1733$as_echo_n "checking $2 presence... " >&6; }
1734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1735/* end confdefs.h. */
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_cpp "$LINENO"; then :
1739 ac_header_preproc=yes
1740else
1741 ac_header_preproc=no
1742fi
1743rm -f conftest.err conftest.$ac_ext
1744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1745$as_echo "$ac_header_preproc" >&6; }
bec39cab 1746
81ecdfbb
RW
1747# So? What about this header?
1748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1749 yes:no: )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1751$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1753$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1754 ;;
1755 no:yes:* )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1757$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1759$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1761$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1763$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1765$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1766 ;;
1767esac
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
1770if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1771 $as_echo_n "(cached) " >&6
1772else
1773 eval "$3=\$ac_header_compiler"
1774fi
1775eval ac_res=\$$3
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1777$as_echo "$ac_res" >&6; }
1778fi
1779 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1780
81ecdfbb 1781} # ac_fn_c_check_header_mongrel
bec39cab 1782
81ecdfbb
RW
1783# ac_fn_c_try_run LINENO
1784# ----------------------
1785# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1786# that executables *can* be run.
1787ac_fn_c_try_run ()
1788{
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790 if { { ac_try="$ac_link"
1791case "(($ac_try" in
1792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793 *) ac_try_echo=$ac_try;;
1794esac
1795eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796$as_echo "$ac_try_echo"; } >&5
1797 (eval "$ac_link") 2>&5
1798 ac_status=$?
1799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1800 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1801 { { case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804esac
1805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1806$as_echo "$ac_try_echo"; } >&5
1807 (eval "$ac_try") 2>&5
1808 ac_status=$?
1809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1810 test $ac_status = 0; }; }; then :
1811 ac_retval=0
1812else
1813 $as_echo "$as_me: program exited with status $ac_status" >&5
1814 $as_echo "$as_me: failed program was:" >&5
1815sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1816
81ecdfbb
RW
1817 ac_retval=$ac_status
1818fi
1819 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1820 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1821 return $ac_retval
bec39cab 1822
81ecdfbb 1823} # ac_fn_c_try_run
bec39cab 1824
81ecdfbb
RW
1825# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1826# -------------------------------------------------------
1827# Tests whether HEADER exists and can be compiled using the include files in
1828# INCLUDES, setting the cache variable VAR accordingly.
1829ac_fn_c_check_header_compile ()
1830{
1831 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1833$as_echo_n "checking for $2... " >&6; }
1834if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1835 $as_echo_n "(cached) " >&6
1836else
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839$4
1840#include <$2>
bec39cab 1841_ACEOF
81ecdfbb
RW
1842if ac_fn_c_try_compile "$LINENO"; then :
1843 eval "$3=yes"
1844else
1845 eval "$3=no"
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
1852 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1853
81ecdfbb 1854} # ac_fn_c_check_header_compile
bec39cab 1855
81ecdfbb
RW
1856# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1857# --------------------------------------------
1858# Tries to find the compile-time value of EXPR in a program that includes
1859# INCLUDES, setting VAR accordingly. Returns whether the value could be
1860# computed
1861ac_fn_c_compute_int ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if test "$cross_compiling" = yes; then
1865 # Depending upon the size, compute the lo and hi bounds.
1866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867/* end confdefs.h. */
1868$4
1869int
1870main ()
1871{
1872static int test_array [1 - 2 * !(($2) >= 0)];
1873test_array [0] = 0
bec39cab 1874
81ecdfbb
RW
1875 ;
1876 return 0;
1877}
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880 ac_lo=0 ac_mid=0
1881 while :; do
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$4
1885int
1886main ()
1887{
1888static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1889test_array [0] = 0
bec39cab 1890
81ecdfbb
RW
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 ac_hi=$ac_mid; break
1897else
1898 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1899 if test $ac_lo -le $ac_mid; then
1900 ac_lo= ac_hi=
1901 break
1902 fi
1903 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1904fi
81ecdfbb
RW
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906 done
c906108c 1907else
81ecdfbb
RW
1908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910$4
1911int
1912main ()
1913{
1914static int test_array [1 - 2 * !(($2) < 0)];
1915test_array [0] = 0
bec39cab 1916
81ecdfbb
RW
1917 ;
1918 return 0;
1919}
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922 ac_hi=-1 ac_mid=-1
1923 while :; do
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1931test_array [0] = 0
bec39cab 1932
81ecdfbb
RW
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938 ac_lo=$ac_mid; break
1939else
1940 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1941 if test $ac_mid -le $ac_hi; then
1942 ac_lo= ac_hi=
1943 break
1944 fi
1945 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1946fi
1947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1948 done
1949else
1950 ac_lo= ac_hi=
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955# Binary search between lo and hi bounds.
1956while test "x$ac_lo" != "x$ac_hi"; do
1957 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1965test_array [0] = 0
bec39cab 1966
81ecdfbb
RW
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 ac_hi=$ac_mid
1973else
1974 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977done
1978case $ac_lo in #((
1979?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1980'') ac_retval=1 ;;
1981esac
1982 else
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986static long int longval () { return $2; }
1987static unsigned long int ulongval () { return $2; }
1988#include <stdio.h>
1989#include <stdlib.h>
1990int
1991main ()
1992{
bec39cab 1993
81ecdfbb
RW
1994 FILE *f = fopen ("conftest.val", "w");
1995 if (! f)
1996 return 1;
1997 if (($2) < 0)
1998 {
1999 long int i = longval ();
2000 if (i != ($2))
2001 return 1;
2002 fprintf (f, "%ld", i);
2003 }
2004 else
2005 {
2006 unsigned long int i = ulongval ();
2007 if (i != ($2))
2008 return 1;
2009 fprintf (f, "%lu", i);
2010 }
2011 /* Do not output a trailing newline, as this causes \r\n confusion
2012 on some platforms. */
2013 return ferror (f) || fclose (f) != 0;
bec39cab 2014
81ecdfbb
RW
2015 ;
2016 return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_run "$LINENO"; then :
2020 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2021else
2022 ac_retval=1
2023fi
2024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2025 conftest.$ac_objext conftest.beam conftest.$ac_ext
2026rm -f conftest.val
bec39cab 2027
81ecdfbb
RW
2028 fi
2029 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2030 return $ac_retval
bec39cab 2031
81ecdfbb 2032} # ac_fn_c_compute_int
bec39cab 2033
c971b7fa
PA
2034# ac_fn_c_try_link LINENO
2035# -----------------------
2036# Try to link conftest.$ac_ext, and return whether this succeeded.
2037ac_fn_c_try_link ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 rm -f conftest.$ac_objext conftest$ac_exeext
2041 if { { ac_try="$ac_link"
2042case "(($ac_try" in
2043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2044 *) ac_try_echo=$ac_try;;
2045esac
2046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2047$as_echo "$ac_try_echo"; } >&5
2048 (eval "$ac_link") 2>conftest.err
2049 ac_status=$?
2050 if test -s conftest.err; then
2051 grep -v '^ *+' conftest.err >conftest.er1
2052 cat conftest.er1 >&5
2053 mv -f conftest.er1 conftest.err
2054 fi
2055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2056 test $ac_status = 0; } && {
2057 test -z "$ac_c_werror_flag" ||
2058 test ! -s conftest.err
2059 } && test -s conftest$ac_exeext && {
2060 test "$cross_compiling" = yes ||
2061 $as_test_x conftest$ac_exeext
2062 }; then :
2063 ac_retval=0
2064else
2065 $as_echo "$as_me: failed program was:" >&5
2066sed 's/^/| /' conftest.$ac_ext >&5
2067
2068 ac_retval=1
2069fi
2070 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2071 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2072 # interfere with the next link command; also delete a directory that is
2073 # left behind by Apple's compiler. We do this before executing the actions.
2074 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2075 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2076 return $ac_retval
2077
2078} # ac_fn_c_try_link
2079
55a8c076
YQ
2080# ac_fn_c_check_func LINENO FUNC VAR
2081# ----------------------------------
2082# Tests whether FUNC exists, setting the cache variable VAR accordingly
2083ac_fn_c_check_func ()
81ecdfbb
RW
2084{
2085 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2087$as_echo_n "checking for $2... " >&6; }
2088if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2089 $as_echo_n "(cached) " >&6
2090else
81ecdfbb
RW
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
55a8c076
YQ
2093/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2094 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2095#define $2 innocuous_$2
2096
2097/* System header to define __stub macros and hopefully few prototypes,
2098 which can conflict with char $2 (); below.
2099 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2100 <limits.h> exists even on freestanding compilers. */
2101
2102#ifdef __STDC__
2103# include <limits.h>
2104#else
2105# include <assert.h>
2106#endif
2107
2108#undef $2
2109
2110/* Override any GCC internal prototype to avoid an error.
2111 Use char because int might match the return type of a GCC
2112 builtin and then its argument prototype would still apply. */
2113#ifdef __cplusplus
2114extern "C"
2115#endif
2116char $2 ();
2117/* The GNU C library defines this for functions which it implements
2118 to always fail with ENOSYS. Some functions are actually named
2119 something starting with __ and the normal name is an alias. */
2120#if defined __stub_$2 || defined __stub___$2
2121choke me
2122#endif
2123
2124int
2125main ()
2126{
2127return $2 ();
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_link "$LINENO"; then :
2133 eval "$3=yes"
2134else
2135 eval "$3=no"
2136fi
2137rm -f core conftest.err conftest.$ac_objext \
2138 conftest$ac_exeext conftest.$ac_ext
2139fi
2140eval ac_res=\$$3
2141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2142$as_echo "$ac_res" >&6; }
2143 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2144
2145} # ac_fn_c_check_func
2146
770d76d7
PA
2147# ac_fn_c_check_decl LINENO SYMBOL VAR
2148# ------------------------------------
2149# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2150ac_fn_c_check_decl ()
2151{
2152 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153 as_decl_name=`echo $2|sed 's/ *(.*//'`
2154 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2156$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2157if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2158 $as_echo_n "(cached) " >&6
2159else
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
2164main ()
2165{
2166#ifndef $as_decl_name
2167#ifdef __cplusplus
2168 (void) $as_decl_use;
2169#else
2170 (void) $as_decl_name;
2171#endif
2172#endif
2173
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_compile "$LINENO"; then :
2179 eval "$3=yes"
2180else
2181 eval "$3=no"
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185eval ac_res=\$$3
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2187$as_echo "$ac_res" >&6; }
2188 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2189
2190} # ac_fn_c_check_decl
2191
55a8c076
YQ
2192# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2193# ----------------------------------------------------
2194# Tries to find if the field MEMBER exists in type AGGR, after including
2195# INCLUDES, setting cache variable VAR accordingly.
2196ac_fn_c_check_member ()
2197{
2198 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2200$as_echo_n "checking for $2.$3... " >&6; }
2201if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2202 $as_echo_n "(cached) " >&6
2203else
2204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205/* end confdefs.h. */
2206$5
2207int
2208main ()
2209{
2210static $2 ac_aggr;
2211if (ac_aggr.$3)
2212return 0;
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_compile "$LINENO"; then :
2218 eval "$4=yes"
2219else
2220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221/* end confdefs.h. */
2222$5
2223int
2224main ()
2225{
2226static $2 ac_aggr;
2227if (sizeof ac_aggr.$3)
2228return 0;
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_compile "$LINENO"; then :
2234 eval "$4=yes"
2235else
2236 eval "$4=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241fi
2242eval ac_res=\$$4
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
2245 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2246
2247} # ac_fn_c_check_member
2248
2249# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2250# -------------------------------------------
2251# Tests whether TYPE exists after having included INCLUDES, setting cache
2252# variable VAR accordingly.
2253ac_fn_c_check_type ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
2258if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2259 $as_echo_n "(cached) " >&6
2260else
2261 eval "$3=no"
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268if (sizeof ($2))
2269 return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$4
2278int
2279main ()
2280{
2281if (sizeof (($2)))
2282 return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2288
81ecdfbb
RW
2289else
2290 eval "$3=yes"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$3
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
2299 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2300
81ecdfbb
RW
2301} # ac_fn_c_check_type
2302cat >config.log <<_ACEOF
2303This file contains any messages produced by compilers while
2304running configure, to aid debugging if configure makes a mistake.
d5af19ba 2305
81ecdfbb
RW
2306It was created by $as_me, which was
2307generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2308
81ecdfbb 2309 $ $0 $@
413ccac7 2310
81ecdfbb
RW
2311_ACEOF
2312exec 5>>config.log
2313{
2314cat <<_ASUNAME
2315## --------- ##
2316## Platform. ##
2317## --------- ##
413ccac7 2318
81ecdfbb
RW
2319hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2320uname -m = `(uname -m) 2>/dev/null || echo unknown`
2321uname -r = `(uname -r) 2>/dev/null || echo unknown`
2322uname -s = `(uname -s) 2>/dev/null || echo unknown`
2323uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2324
81ecdfbb
RW
2325/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2326/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2327
81ecdfbb
RW
2328/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2329/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2330/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2331/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2332/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2333/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2334/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2335
81ecdfbb 2336_ASUNAME
bec39cab 2337
bec39cab
AC
2338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2339for as_dir in $PATH
2340do
2341 IFS=$as_save_IFS
2342 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2343 $as_echo "PATH: $as_dir"
2344 done
2345IFS=$as_save_IFS
bec39cab 2346
81ecdfbb 2347} >&5
bec39cab 2348
81ecdfbb 2349cat >&5 <<_ACEOF
bec39cab 2350
bec39cab 2351
81ecdfbb
RW
2352## ----------- ##
2353## Core tests. ##
2354## ----------- ##
2355
2356_ACEOF
2357
2358
2359# Keep a trace of the command line.
2360# Strip out --no-create and --no-recursion so they do not pile up.
2361# Strip out --silent because we don't want to record it for future runs.
2362# Also quote any args containing shell meta-characters.
2363# Make two passes to allow for proper duplicate-argument suppression.
2364ac_configure_args=
2365ac_configure_args0=
2366ac_configure_args1=
2367ac_must_keep_next=false
2368for ac_pass in 1 2
2369do
2370 for ac_arg
2371 do
2372 case $ac_arg in
2373 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2374 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2375 | -silent | --silent | --silen | --sile | --sil)
2376 continue ;;
2377 *\'*)
2378 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2379 esac
2380 case $ac_pass in
2381 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2382 2)
2383 as_fn_append ac_configure_args1 " '$ac_arg'"
2384 if test $ac_must_keep_next = true; then
2385 ac_must_keep_next=false # Got value, back to normal.
2386 else
2387 case $ac_arg in
2388 *=* | --config-cache | -C | -disable-* | --disable-* \
2389 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2390 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2391 | -with-* | --with-* | -without-* | --without-* | --x)
2392 case "$ac_configure_args0 " in
2393 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2394 esac
2395 ;;
2396 -* ) ac_must_keep_next=true ;;
2397 esac
2398 fi
2399 as_fn_append ac_configure_args " '$ac_arg'"
2400 ;;
2401 esac
2402 done
2403done
2404{ ac_configure_args0=; unset ac_configure_args0;}
2405{ ac_configure_args1=; unset ac_configure_args1;}
2406
2407# When interrupted or exit'd, cleanup temporary files, and complete
2408# config.log. We remove comments because anyway the quotes in there
2409# would cause problems or look ugly.
2410# WARNING: Use '\'' to represent an apostrophe within the trap.
2411# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2412trap 'exit_status=$?
2413 # Save into config.log some information that might help in debugging.
2414 {
2415 echo
2416
2417 cat <<\_ASBOX
2418## ---------------- ##
2419## Cache variables. ##
2420## ---------------- ##
2421_ASBOX
2422 echo
2423 # The following way of writing the cache mishandles newlines in values,
2424(
2425 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2426 eval ac_val=\$$ac_var
2427 case $ac_val in #(
2428 *${as_nl}*)
2429 case $ac_var in #(
2430 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2431$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2432 esac
2433 case $ac_var in #(
2434 _ | IFS | as_nl) ;; #(
2435 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2436 *) { eval $ac_var=; unset $ac_var;} ;;
2437 esac ;;
2438 esac
2439 done
2440 (set) 2>&1 |
2441 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2442 *${as_nl}ac_space=\ *)
2443 sed -n \
2444 "s/'\''/'\''\\\\'\'''\''/g;
2445 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2446 ;; #(
2447 *)
2448 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2449 ;;
2450 esac |
2451 sort
2452)
2453 echo
2454
2455 cat <<\_ASBOX
2456## ----------------- ##
2457## Output variables. ##
2458## ----------------- ##
2459_ASBOX
2460 echo
2461 for ac_var in $ac_subst_vars
2462 do
2463 eval ac_val=\$$ac_var
2464 case $ac_val in
2465 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2466 esac
2467 $as_echo "$ac_var='\''$ac_val'\''"
2468 done | sort
2469 echo
2470
2471 if test -n "$ac_subst_files"; then
2472 cat <<\_ASBOX
2473## ------------------- ##
2474## File substitutions. ##
2475## ------------------- ##
2476_ASBOX
2477 echo
2478 for ac_var in $ac_subst_files
2479 do
2480 eval ac_val=\$$ac_var
2481 case $ac_val in
2482 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2483 esac
2484 $as_echo "$ac_var='\''$ac_val'\''"
2485 done | sort
2486 echo
2487 fi
2488
2489 if test -s confdefs.h; then
2490 cat <<\_ASBOX
2491## ----------- ##
2492## confdefs.h. ##
2493## ----------- ##
2494_ASBOX
2495 echo
2496 cat confdefs.h
2497 echo
2498 fi
2499 test "$ac_signal" != 0 &&
2500 $as_echo "$as_me: caught signal $ac_signal"
2501 $as_echo "$as_me: exit $exit_status"
2502 } >&5
2503 rm -f core *.core core.conftest.* &&
2504 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2505 exit $exit_status
2506' 0
2507for ac_signal in 1 2 13 15; do
2508 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2509done
2510ac_signal=0
2511
2512# confdefs.h avoids OS command line length limits that DEFS can exceed.
2513rm -f -r conftest* confdefs.h
2514
2515$as_echo "/* confdefs.h */" > confdefs.h
2516
2517# Predefined preprocessor variables.
2518
2519cat >>confdefs.h <<_ACEOF
2520#define PACKAGE_NAME "$PACKAGE_NAME"
2521_ACEOF
2522
2523cat >>confdefs.h <<_ACEOF
2524#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2525_ACEOF
2526
2527cat >>confdefs.h <<_ACEOF
2528#define PACKAGE_VERSION "$PACKAGE_VERSION"
2529_ACEOF
2530
2531cat >>confdefs.h <<_ACEOF
2532#define PACKAGE_STRING "$PACKAGE_STRING"
2533_ACEOF
2534
2535cat >>confdefs.h <<_ACEOF
2536#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2537_ACEOF
2538
2539cat >>confdefs.h <<_ACEOF
2540#define PACKAGE_URL "$PACKAGE_URL"
2541_ACEOF
2542
2543
2544# Let the site file select an alternate cache file if it wants to.
2545# Prefer an explicitly selected file to automatically selected ones.
2546ac_site_file1=NONE
2547ac_site_file2=NONE
2548if test -n "$CONFIG_SITE"; then
2549 ac_site_file1=$CONFIG_SITE
2550elif test "x$prefix" != xNONE; then
2551 ac_site_file1=$prefix/share/config.site
2552 ac_site_file2=$prefix/etc/config.site
2553else
2554 ac_site_file1=$ac_default_prefix/share/config.site
2555 ac_site_file2=$ac_default_prefix/etc/config.site
2556fi
2557for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2558do
2559 test "x$ac_site_file" = xNONE && continue
2560 if test -r "$ac_site_file"; then
2561 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2562$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2563 sed 's/^/| /' "$ac_site_file" >&5
2564 . "$ac_site_file"
2565 fi
2566done
2567
2568if test -r "$cache_file"; then
2569 # Some versions of bash will fail to source /dev/null (special
2570 # files actually), so we avoid doing that.
2571 if test -f "$cache_file"; then
2572 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2573$as_echo "$as_me: loading cache $cache_file" >&6;}
2574 case $cache_file in
2575 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2576 *) . "./$cache_file";;
2577 esac
2578 fi
2579else
2580 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2581$as_echo "$as_me: creating cache $cache_file" >&6;}
2582 >$cache_file
bec39cab
AC
2583fi
2584
81ecdfbb
RW
2585# Check that the precious variables saved in the cache have kept the same
2586# value.
2587ac_cache_corrupted=false
2588for ac_var in $ac_precious_vars; do
2589 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2590 eval ac_new_set=\$ac_env_${ac_var}_set
2591 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2592 eval ac_new_val=\$ac_env_${ac_var}_value
2593 case $ac_old_set,$ac_new_set in
2594 set,)
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2596$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2597 ac_cache_corrupted=: ;;
2598 ,set)
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2600$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2601 ac_cache_corrupted=: ;;
2602 ,);;
2603 *)
2604 if test "x$ac_old_val" != "x$ac_new_val"; then
2605 # differences in whitespace do not lead to failure.
2606 ac_old_val_w=`echo x $ac_old_val`
2607 ac_new_val_w=`echo x $ac_new_val`
2608 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2610$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2611 ac_cache_corrupted=:
2612 else
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2614$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2615 eval $ac_var=\$ac_old_val
2616 fi
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2618$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2620$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2621 fi;;
2622 esac
2623 # Pass precious variables to config.status.
2624 if test "$ac_new_set" = set; then
2625 case $ac_new_val in
2626 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2627 *) ac_arg=$ac_var=$ac_new_val ;;
2628 esac
2629 case " $ac_configure_args " in
2630 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2631 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2632 esac
2633 fi
2634done
2635if $ac_cache_corrupted; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2639$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2640 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2641fi
2642## -------------------- ##
2643## Main body of script. ##
2644## -------------------- ##
2645
2646ac_ext=c
2647ac_cpp='$CPP $CPPFLAGS'
2648ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2649ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2650ac_compiler_gnu=$ac_cv_c_compiler_gnu
2651
2652
2653
2654
2655
2656ac_config_headers="$ac_config_headers config.h:config.in"
2657
2658
2659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2660$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2661 # Check whether --enable-maintainer-mode was given.
2662if test "${enable_maintainer_mode+set}" = set; then :
2663 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2664else
2665 USE_MAINTAINER_MODE=no
2666fi
2667
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2669$as_echo "$USE_MAINTAINER_MODE" >&6; }
2670 if test $USE_MAINTAINER_MODE = yes; then
2671 MAINTAINER_MODE_TRUE=
2672 MAINTAINER_MODE_FALSE='#'
2673else
2674 MAINTAINER_MODE_TRUE='#'
2675 MAINTAINER_MODE_FALSE=
2676fi
2677
2678 MAINT=$MAINTAINER_MODE_TRUE
2679
2680
2681
2682ac_ext=c
2683ac_cpp='$CPP $CPPFLAGS'
2684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
2687if test -n "$ac_tool_prefix"; then
2688 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2689set dummy ${ac_tool_prefix}gcc; ac_word=$2
2690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2691$as_echo_n "checking for $ac_word... " >&6; }
2692if test "${ac_cv_prog_CC+set}" = set; then :
2693 $as_echo_n "(cached) " >&6
c906108c
SS
2694else
2695 if test -n "$CC"; then
2696 ac_cv_prog_CC="$CC" # Let the user override the test.
2697else
bec39cab
AC
2698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2699for as_dir in $PATH
2700do
2701 IFS=$as_save_IFS
2702 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2703 for ac_exec_ext in '' $ac_executable_extensions; do
2704 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2705 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2707 break 2
2708 fi
2709done
81ecdfbb
RW
2710 done
2711IFS=$as_save_IFS
bec39cab 2712
c906108c
SS
2713fi
2714fi
bec39cab 2715CC=$ac_cv_prog_CC
c906108c 2716if test -n "$CC"; then
81ecdfbb
RW
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2718$as_echo "$CC" >&6; }
c906108c 2719else
81ecdfbb
RW
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2721$as_echo "no" >&6; }
c906108c
SS
2722fi
2723
81ecdfbb 2724
b4e70030
JB
2725fi
2726if test -z "$ac_cv_prog_CC"; then
2727 ac_ct_CC=$CC
81ecdfbb
RW
2728 # Extract the first word of "gcc", so it can be a program name with args.
2729set dummy gcc; ac_word=$2
2730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2731$as_echo_n "checking for $ac_word... " >&6; }
2732if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2733 $as_echo_n "(cached) " >&6
b4e70030
JB
2734else
2735 if test -n "$ac_ct_CC"; then
2736 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2737else
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2743 for ac_exec_ext in '' $ac_executable_extensions; do
2744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2745 ac_cv_prog_ac_ct_CC="gcc"
2746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2747 break 2
4e8d927d 2748 fi
b4e70030 2749done
81ecdfbb
RW
2750 done
2751IFS=$as_save_IFS
b4e70030
JB
2752
2753fi
2754fi
2755ac_ct_CC=$ac_cv_prog_ac_ct_CC
2756if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2758$as_echo "$ac_ct_CC" >&6; }
b4e70030 2759else
81ecdfbb
RW
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2761$as_echo "no" >&6; }
b4e70030
JB
2762fi
2763
81ecdfbb
RW
2764 if test "x$ac_ct_CC" = x; then
2765 CC=""
2766 else
2767 case $cross_compiling:$ac_tool_warned in
2768yes:)
2769{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2770$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2771ac_tool_warned=yes ;;
2772esac
2773 CC=$ac_ct_CC
2774 fi
b4e70030
JB
2775else
2776 CC="$ac_cv_prog_CC"
2777fi
2778
c906108c 2779if test -z "$CC"; then
81ecdfbb
RW
2780 if test -n "$ac_tool_prefix"; then
2781 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2782set dummy ${ac_tool_prefix}cc; ac_word=$2
2783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2784$as_echo_n "checking for $ac_word... " >&6; }
2785if test "${ac_cv_prog_CC+set}" = set; then :
2786 $as_echo_n "(cached) " >&6
c906108c
SS
2787else
2788 if test -n "$CC"; then
2789 ac_cv_prog_CC="$CC" # Let the user override the test.
2790else
bec39cab
AC
2791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2792for as_dir in $PATH
2793do
2794 IFS=$as_save_IFS
2795 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2796 for ac_exec_ext in '' $ac_executable_extensions; do
2797 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2798 ac_cv_prog_CC="${ac_tool_prefix}cc"
2799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2800 break 2
2801 fi
2802done
81ecdfbb
RW
2803 done
2804IFS=$as_save_IFS
2805
2806fi
2807fi
2808CC=$ac_cv_prog_CC
2809if test -n "$CC"; then
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2811$as_echo "$CC" >&6; }
2812else
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2814$as_echo "no" >&6; }
2815fi
2816
2817
2818 fi
2819fi
2820if test -z "$CC"; then
2821 # Extract the first word of "cc", so it can be a program name with args.
2822set dummy cc; ac_word=$2
2823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2824$as_echo_n "checking for $ac_word... " >&6; }
2825if test "${ac_cv_prog_CC+set}" = set; then :
2826 $as_echo_n "(cached) " >&6
2827else
2828 if test -n "$CC"; then
2829 ac_cv_prog_CC="$CC" # Let the user override the test.
2830else
2831 ac_prog_rejected=no
2832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833for as_dir in $PATH
2834do
2835 IFS=$as_save_IFS
2836 test -z "$as_dir" && as_dir=.
2837 for ac_exec_ext in '' $ac_executable_extensions; do
2838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2839 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2840 ac_prog_rejected=yes
2841 continue
2842 fi
2843 ac_cv_prog_CC="cc"
2844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2845 break 2
2846 fi
2847done
2848 done
2849IFS=$as_save_IFS
bec39cab 2850
c906108c
SS
2851if test $ac_prog_rejected = yes; then
2852 # We found a bogon in the path, so make sure we never use it.
2853 set dummy $ac_cv_prog_CC
2854 shift
bec39cab 2855 if test $# != 0; then
c906108c
SS
2856 # We chose a different compiler from the bogus one.
2857 # However, it has the same basename, so the bogon will be chosen
2858 # first if we set CC to just the basename; use the full file name.
2859 shift
bec39cab 2860 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2861 fi
2862fi
2863fi
2864fi
bec39cab 2865CC=$ac_cv_prog_CC
c906108c 2866if test -n "$CC"; then
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2868$as_echo "$CC" >&6; }
c906108c 2869else
81ecdfbb
RW
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2871$as_echo "no" >&6; }
c906108c
SS
2872fi
2873
81ecdfbb 2874
bec39cab
AC
2875fi
2876if test -z "$CC"; then
2877 if test -n "$ac_tool_prefix"; then
81ecdfbb 2878 for ac_prog in cl.exe
bec39cab
AC
2879 do
2880 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883$as_echo_n "checking for $ac_word... " >&6; }
2884if test "${ac_cv_prog_CC+set}" = set; then :
2885 $as_echo_n "(cached) " >&6
c906108c
SS
2886else
2887 if test -n "$CC"; then
2888 ac_cv_prog_CC="$CC" # Let the user override the test.
2889else
bec39cab
AC
2890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891for as_dir in $PATH
2892do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2897 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2899 break 2
2900 fi
2901done
81ecdfbb
RW
2902 done
2903IFS=$as_save_IFS
bec39cab 2904
c906108c
SS
2905fi
2906fi
bec39cab 2907CC=$ac_cv_prog_CC
c906108c 2908if test -n "$CC"; then
81ecdfbb
RW
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2910$as_echo "$CC" >&6; }
c906108c 2911else
81ecdfbb
RW
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913$as_echo "no" >&6; }
c906108c 2914fi
bec39cab 2915
81ecdfbb 2916
bec39cab
AC
2917 test -n "$CC" && break
2918 done
2919fi
2920if test -z "$CC"; then
2921 ac_ct_CC=$CC
81ecdfbb 2922 for ac_prog in cl.exe
bec39cab
AC
2923do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2927$as_echo_n "checking for $ac_word... " >&6; }
2928if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2929 $as_echo_n "(cached) " >&6
bec39cab
AC
2930else
2931 if test -n "$ac_ct_CC"; then
2932 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2933else
2934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2935for as_dir in $PATH
2936do
2937 IFS=$as_save_IFS
2938 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2939 for ac_exec_ext in '' $ac_executable_extensions; do
2940 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2941 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2943 break 2
c906108c 2944 fi
bec39cab 2945done
81ecdfbb
RW
2946 done
2947IFS=$as_save_IFS
bec39cab
AC
2948
2949fi
2950fi
2951ac_ct_CC=$ac_cv_prog_ac_ct_CC
2952if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2954$as_echo "$ac_ct_CC" >&6; }
bec39cab 2955else
81ecdfbb
RW
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2957$as_echo "no" >&6; }
c906108c
SS
2958fi
2959
81ecdfbb 2960
bec39cab
AC
2961 test -n "$ac_ct_CC" && break
2962done
c906108c 2963
81ecdfbb
RW
2964 if test "x$ac_ct_CC" = x; then
2965 CC=""
2966 else
2967 case $cross_compiling:$ac_tool_warned in
2968yes:)
2969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2971ac_tool_warned=yes ;;
2972esac
2973 CC=$ac_ct_CC
2974 fi
bec39cab
AC
2975fi
2976
2977fi
2978
2979
81ecdfbb
RW
2980test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2982as_fn_error "no acceptable C compiler found in \$PATH
2983See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
2984
2985# Provide some information about the compiler.
81ecdfbb
RW
2986$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2987set X $ac_compile
2988ac_compiler=$2
2989for ac_option in --version -v -V -qversion; do
2990 { { ac_try="$ac_compiler $ac_option >&5"
2991case "(($ac_try" in
2992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2993 *) ac_try_echo=$ac_try;;
2994esac
2995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2996$as_echo "$ac_try_echo"; } >&5
2997 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 2998 ac_status=$?
81ecdfbb
RW
2999 if test -s conftest.err; then
3000 sed '10a\
3001... rest of stderr output deleted ...
3002 10q' conftest.err >conftest.er1
3003 cat conftest.er1 >&5
3004 rm -f conftest.er1 conftest.err
3005 fi
3006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3007 test $ac_status = 0; }
3008done
bec39cab 3009
81ecdfbb 3010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3011/* end confdefs.h. */
3012
3013int
3014main ()
3015{
3016
3017 ;
3018 return 0;
3019}
3020_ACEOF
3021ac_clean_files_save=$ac_clean_files
81ecdfbb 3022ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3023# Try to create an executable without -o first, disregard a.out.
3024# It will help us diagnose broken compilers, and finding out an intuition
3025# of exeext.
81ecdfbb
RW
3026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3027$as_echo_n "checking for C compiler default output file name... " >&6; }
3028ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3029
3030# The possible output files:
3031ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3032
3033ac_rmfiles=
3034for ac_file in $ac_files
3035do
3036 case $ac_file in
3037 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3038 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3039 esac
3040done
3041rm -f $ac_rmfiles
3042
3043if { { ac_try="$ac_link_default"
3044case "(($ac_try" in
3045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046 *) ac_try_echo=$ac_try;;
3047esac
3048eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3049$as_echo "$ac_try_echo"; } >&5
3050 (eval "$ac_link_default") 2>&5
3051 ac_status=$?
3052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3053 test $ac_status = 0; }; then :
3054 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3055# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3056# in a Makefile. We should not override ac_cv_exeext if it was cached,
3057# so that the user can short-circuit this test for compilers unknown to
3058# Autoconf.
3059for ac_file in $ac_files ''
bec39cab
AC
3060do
3061 test -f "$ac_file" || continue
3062 case $ac_file in
81ecdfbb 3063 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3064 ;;
3065 [ab].out )
3066 # We found the default executable, but exeext='' is most
3067 # certainly right.
3068 break;;
3069 *.* )
81ecdfbb
RW
3070 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3071 then :; else
3072 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3073 fi
3074 # We set ac_cv_exeext here because the later test for it is not
3075 # safe: cross compilers may not add the suffix if given an `-o'
3076 # argument, so we may need to know it at that point already.
3077 # Even if this section looks crufty: it has the advantage of
3078 # actually working.
b4e70030
JB
3079 break;;
3080 * )
3081 break;;
bec39cab
AC
3082 esac
3083done
81ecdfbb
RW
3084test "$ac_cv_exeext" = no && ac_cv_exeext=
3085
bec39cab 3086else
81ecdfbb
RW
3087 ac_file=''
3088fi
3089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3090$as_echo "$ac_file" >&6; }
3091if test -z "$ac_file"; then :
3092 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3093sed 's/^/| /' conftest.$ac_ext >&5
3094
81ecdfbb
RW
3095{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3097{ as_fn_set_status 77
3098as_fn_error "C compiler cannot create executables
3099See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3100fi
b4e70030 3101ac_exeext=$ac_cv_exeext
b4e70030 3102
81ecdfbb 3103# Check that the compiler produces executables we can run. If not, either
bec39cab 3104# the compiler is broken, or we cross compile.
81ecdfbb
RW
3105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3106$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3107# If not cross compiling, check that we can run a simple program.
3108if test "$cross_compiling" != yes; then
3109 if { ac_try='./$ac_file'
81ecdfbb
RW
3110 { { case "(($ac_try" in
3111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3112 *) ac_try_echo=$ac_try;;
3113esac
3114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3115$as_echo "$ac_try_echo"; } >&5
3116 (eval "$ac_try") 2>&5
bec39cab 3117 ac_status=$?
81ecdfbb
RW
3118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3119 test $ac_status = 0; }; }; then
bec39cab 3120 cross_compiling=no
c906108c 3121 else
bec39cab
AC
3122 if test "$cross_compiling" = maybe; then
3123 cross_compiling=yes
3124 else
81ecdfbb
RW
3125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3127as_fn_error "cannot run C compiled programs.
bec39cab 3128If you meant to cross compile, use \`--host'.
81ecdfbb 3129See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3130 fi
c906108c 3131 fi
bec39cab 3132fi
81ecdfbb
RW
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3134$as_echo "yes" >&6; }
bec39cab 3135
81ecdfbb 3136rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3137ac_clean_files=$ac_clean_files_save
81ecdfbb 3138# Check that the compiler produces executables we can run. If not, either
b4e70030 3139# the compiler is broken, or we cross compile.
81ecdfbb
RW
3140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3141$as_echo_n "checking whether we are cross compiling... " >&6; }
3142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3143$as_echo "$cross_compiling" >&6; }
3144
3145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3146$as_echo_n "checking for suffix of executables... " >&6; }
3147if { { ac_try="$ac_link"
3148case "(($ac_try" in
3149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3150 *) ac_try_echo=$ac_try;;
3151esac
3152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3153$as_echo "$ac_try_echo"; } >&5
3154 (eval "$ac_link") 2>&5
bec39cab 3155 ac_status=$?
81ecdfbb
RW
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }; then :
b4e70030
JB
3158 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3159# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3160# work properly (i.e., refer to `conftest.exe'), while it won't with
3161# `rm'.
3162for ac_file in conftest.exe conftest conftest.*; do
3163 test -f "$ac_file" || continue
3164 case $ac_file in
81ecdfbb 3165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3166 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3167 break;;
3168 * ) break;;
3169 esac
3170done
c906108c 3171else
81ecdfbb
RW
3172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3174as_fn_error "cannot compute suffix of executables: cannot compile and link
3175See \`config.log' for more details." "$LINENO" 5; }
c906108c 3176fi
b4e70030 3177rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3179$as_echo "$ac_cv_exeext" >&6; }
c906108c 3180
b4e70030 3181rm -f conftest.$ac_ext
bec39cab
AC
3182EXEEXT=$ac_cv_exeext
3183ac_exeext=$EXEEXT
81ecdfbb
RW
3184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3185$as_echo_n "checking for suffix of object files... " >&6; }
3186if test "${ac_cv_objext+set}" = set; then :
3187 $as_echo_n "(cached) " >&6
bec39cab 3188else
81ecdfbb 3189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3190/* end confdefs.h. */
3191
3192int
3193main ()
3194{
3195
3196 ;
3197 return 0;
3198}
3199_ACEOF
3200rm -f conftest.o conftest.obj
81ecdfbb
RW
3201if { { ac_try="$ac_compile"
3202case "(($ac_try" in
3203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3204 *) ac_try_echo=$ac_try;;
3205esac
3206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3207$as_echo "$ac_try_echo"; } >&5
3208 (eval "$ac_compile") 2>&5
3209 ac_status=$?
3210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211 test $ac_status = 0; }; then :
3212 for ac_file in conftest.o conftest.obj conftest.*; do
3213 test -f "$ac_file" || continue;
bec39cab 3214 case $ac_file in
81ecdfbb 3215 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3216 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3217 break;;
3218 esac
3219done
c906108c 3220else
81ecdfbb 3221 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3222sed 's/^/| /' conftest.$ac_ext >&5
3223
81ecdfbb
RW
3224{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3226as_fn_error "cannot compute suffix of object files: cannot compile
3227See \`config.log' for more details." "$LINENO" 5; }
c906108c 3228fi
b4e70030 3229rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3230fi
81ecdfbb
RW
3231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3232$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3233OBJEXT=$ac_cv_objext
3234ac_objext=$OBJEXT
81ecdfbb
RW
3235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3236$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3237if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3238 $as_echo_n "(cached) " >&6
c906108c 3239else
81ecdfbb 3240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3241/* end confdefs.h. */
3242
3243int
3244main ()
3245{
3246#ifndef __GNUC__
3247 choke me
3248#endif
3249
3250 ;
3251 return 0;
3252}
3253_ACEOF
81ecdfbb 3254if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3255 ac_compiler_gnu=yes
3256else
81ecdfbb 3257 ac_compiler_gnu=no
bec39cab 3258fi
81ecdfbb 3259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3260ac_cv_c_compiler_gnu=$ac_compiler_gnu
3261
3262fi
81ecdfbb
RW
3263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3264$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3265if test $ac_compiler_gnu = yes; then
3266 GCC=yes
3267else
3268 GCC=
3269fi
bec39cab
AC
3270ac_test_CFLAGS=${CFLAGS+set}
3271ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3273$as_echo_n "checking whether $CC accepts -g... " >&6; }
3274if test "${ac_cv_prog_cc_g+set}" = set; then :
3275 $as_echo_n "(cached) " >&6
bec39cab 3276else
81ecdfbb
RW
3277 ac_save_c_werror_flag=$ac_c_werror_flag
3278 ac_c_werror_flag=yes
3279 ac_cv_prog_cc_g=no
3280 CFLAGS="-g"
3281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3282/* end confdefs.h. */
3283
3284int
3285main ()
3286{
3287
3288 ;
3289 return 0;
3290}
3291_ACEOF
81ecdfbb 3292if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3293 ac_cv_prog_cc_g=yes
3294else
81ecdfbb
RW
3295 CFLAGS=""
3296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3297/* end confdefs.h. */
3298
3299int
3300main ()
3301{
3302
3303 ;
3304 return 0;
3305}
3306_ACEOF
3307if ac_fn_c_try_compile "$LINENO"; then :
3308
3309else
3310 ac_c_werror_flag=$ac_save_c_werror_flag
3311 CFLAGS="-g"
3312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3313/* end confdefs.h. */
3314
3315int
3316main ()
3317{
c906108c 3318
81ecdfbb
RW
3319 ;
3320 return 0;
3321}
3322_ACEOF
3323if ac_fn_c_try_compile "$LINENO"; then :
3324 ac_cv_prog_cc_g=yes
3325fi
3326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3327fi
3328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3329fi
81ecdfbb
RW
3330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3331 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3332fi
81ecdfbb
RW
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3334$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3335if test "$ac_test_CFLAGS" = set; then
bec39cab 3336 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3337elif test $ac_cv_prog_cc_g = yes; then
3338 if test "$GCC" = yes; then
3339 CFLAGS="-g -O2"
3340 else
3341 CFLAGS="-g"
3342 fi
3343else
3344 if test "$GCC" = yes; then
3345 CFLAGS="-O2"
3346 else
3347 CFLAGS=
3348 fi
3349fi
81ecdfbb
RW
3350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3351$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3352if test "${ac_cv_prog_cc_c89+set}" = set; then :
3353 $as_echo_n "(cached) " >&6
bec39cab 3354else
81ecdfbb 3355 ac_cv_prog_cc_c89=no
bec39cab 3356ac_save_CC=$CC
81ecdfbb 3357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3358/* end confdefs.h. */
c906108c
SS
3359#include <stdarg.h>
3360#include <stdio.h>
3361#include <sys/types.h>
3362#include <sys/stat.h>
3363/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3364struct buf { int x; };
3365FILE * (*rcsopen) (struct buf *, struct stat *, int);
3366static char *e (p, i)
3367 char **p;
3368 int i;
3369{
3370 return p[i];
3371}
3372static char *f (char * (*g) (char **, int), char **p, ...)
3373{
3374 char *s;
3375 va_list v;
3376 va_start (v,p);
3377 s = g (p, va_arg (v,int));
3378 va_end (v);
3379 return s;
3380}
bec39cab
AC
3381
3382/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3383 function prototypes and stuff, but not '\xHH' hex character constants.
3384 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3385 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3386 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3387 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3388 that's true only with -std. */
bec39cab
AC
3389int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3390
81ecdfbb
RW
3391/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3392 inside strings and character constants. */
3393#define FOO(x) 'x'
3394int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3395
c906108c
SS
3396int test (int i, double x);
3397struct s1 {int (*f) (int a);};
3398struct s2 {int (*f) (double a);};
3399int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3400int argc;
3401char **argv;
bec39cab
AC
3402int
3403main ()
3404{
c906108c 3405return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3406 ;
3407 return 0;
3408}
3409_ACEOF
81ecdfbb
RW
3410for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3411 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3412do
3413 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3414 if ac_fn_c_try_compile "$LINENO"; then :
3415 ac_cv_prog_cc_c89=$ac_arg
c906108c 3416fi
81ecdfbb
RW
3417rm -f core conftest.err conftest.$ac_objext
3418 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3419done
81ecdfbb 3420rm -f conftest.$ac_ext
bec39cab 3421CC=$ac_save_CC
c906108c
SS
3422
3423fi
81ecdfbb
RW
3424# AC_CACHE_VAL
3425case "x$ac_cv_prog_cc_c89" in
3426 x)
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3428$as_echo "none needed" >&6; } ;;
3429 xno)
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3431$as_echo "unsupported" >&6; } ;;
bec39cab 3432 *)
81ecdfbb
RW
3433 CC="$CC $ac_cv_prog_cc_c89"
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3435$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3436esac
81ecdfbb 3437if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3438
b4e70030
JB
3439fi
3440
bec39cab
AC
3441ac_ext=c
3442ac_cpp='$CPP $CPPFLAGS'
3443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3445ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3446
60ca704f 3447
bec39cab
AC
3448ac_ext=c
3449ac_cpp='$CPP $CPPFLAGS'
3450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3452ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3454$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3455# On Suns, sometimes $CPP names a directory.
3456if test -n "$CPP" && test -d "$CPP"; then
3457 CPP=
8bb2c122 3458fi
bec39cab 3459if test -z "$CPP"; then
81ecdfbb
RW
3460 if test "${ac_cv_prog_CPP+set}" = set; then :
3461 $as_echo_n "(cached) " >&6
bec39cab
AC
3462else
3463 # Double quotes because CPP needs to be expanded
3464 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3465 do
3466 ac_preproc_ok=false
3467for ac_c_preproc_warn_flag in '' yes
3468do
3469 # Use a header file that comes with gcc, so configuring glibc
3470 # with a fresh cross-compiler works.
3471 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3472 # <limits.h> exists even on freestanding compilers.
3473 # On the NeXT, cc -E runs the code through the compiler's parser,
3474 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3476/* end confdefs.h. */
3477#ifdef __STDC__
3478# include <limits.h>
3479#else
3480# include <assert.h>
3481#endif
3482 Syntax error
3483_ACEOF
81ecdfbb 3484if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3485
81ecdfbb 3486else
bec39cab
AC
3487 # Broken: fails on valid input.
3488continue
3489fi
3490rm -f conftest.err conftest.$ac_ext
3491
81ecdfbb 3492 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3493 # can be detected and how.
81ecdfbb 3494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3495/* end confdefs.h. */
3496#include <ac_nonexistent.h>
3497_ACEOF
81ecdfbb 3498if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3499 # Broken: success on invalid input.
3500continue
8bb2c122 3501else
bec39cab
AC
3502 # Passes both tests.
3503ac_preproc_ok=:
3504break
8bb2c122 3505fi
bec39cab 3506rm -f conftest.err conftest.$ac_ext
8bb2c122 3507
bec39cab
AC
3508done
3509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3510rm -f conftest.err conftest.$ac_ext
81ecdfbb 3511if $ac_preproc_ok; then :
bec39cab
AC
3512 break
3513fi
8bb2c122 3514
bec39cab
AC
3515 done
3516 ac_cv_prog_CPP=$CPP
ddc9cd0f 3517
c906108c 3518fi
bec39cab
AC
3519 CPP=$ac_cv_prog_CPP
3520else
3521 ac_cv_prog_CPP=$CPP
c906108c 3522fi
81ecdfbb
RW
3523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3524$as_echo "$CPP" >&6; }
bec39cab
AC
3525ac_preproc_ok=false
3526for ac_c_preproc_warn_flag in '' yes
3527do
3528 # Use a header file that comes with gcc, so configuring glibc
3529 # with a fresh cross-compiler works.
3530 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3531 # <limits.h> exists even on freestanding compilers.
3532 # On the NeXT, cc -E runs the code through the compiler's parser,
3533 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3535/* end confdefs.h. */
3536#ifdef __STDC__
3537# include <limits.h>
3538#else
3539# include <assert.h>
3540#endif
3541 Syntax error
3542_ACEOF
81ecdfbb 3543if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3544
81ecdfbb 3545else
bec39cab
AC
3546 # Broken: fails on valid input.
3547continue
3548fi
3549rm -f conftest.err conftest.$ac_ext
3550
81ecdfbb 3551 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3552 # can be detected and how.
81ecdfbb 3553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3554/* end confdefs.h. */
3555#include <ac_nonexistent.h>
3556_ACEOF
81ecdfbb 3557if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3558 # Broken: success on invalid input.
3559continue
c906108c 3560else
bec39cab
AC
3561 # Passes both tests.
3562ac_preproc_ok=:
3563break
c906108c 3564fi
bec39cab 3565rm -f conftest.err conftest.$ac_ext
c906108c 3566
bec39cab
AC
3567done
3568# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3569rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3570if $ac_preproc_ok; then :
3571
c906108c 3572else
81ecdfbb
RW
3573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3575as_fn_error "C preprocessor \"$CPP\" fails sanity check
3576See \`config.log' for more details." "$LINENO" 5; }
c906108c 3577fi
c906108c 3578
bec39cab
AC
3579ac_ext=c
3580ac_cpp='$CPP $CPPFLAGS'
3581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3583ac_compiler_gnu=$ac_cv_c_compiler_gnu
3584
3585
81ecdfbb
RW
3586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3587$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3588if test "${ac_cv_path_GREP+set}" = set; then :
3589 $as_echo_n "(cached) " >&6
4e8d927d 3590else
81ecdfbb
RW
3591 if test -z "$GREP"; then
3592 ac_path_GREP_found=false
3593 # Loop through the user's path and test for each of PROGNAME-LIST
3594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
3599 for ac_prog in grep ggrep; do
3600 for ac_exec_ext in '' $ac_executable_extensions; do
3601 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3602 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3603# Check for GNU ac_path_GREP and select it if it is found.
3604 # Check for GNU $ac_path_GREP
3605case `"$ac_path_GREP" --version 2>&1` in
3606*GNU*)
3607 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3608*)
3609 ac_count=0
3610 $as_echo_n 0123456789 >"conftest.in"
3611 while :
3612 do
3613 cat "conftest.in" "conftest.in" >"conftest.tmp"
3614 mv "conftest.tmp" "conftest.in"
3615 cp "conftest.in" "conftest.nl"
3616 $as_echo 'GREP' >> "conftest.nl"
3617 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3618 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3619 as_fn_arith $ac_count + 1 && ac_count=$as_val
3620 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3621 # Best one so far, save it but keep looking for a better one
3622 ac_cv_path_GREP="$ac_path_GREP"
3623 ac_path_GREP_max=$ac_count
bec39cab 3624 fi
81ecdfbb
RW
3625 # 10*(2^10) chars as input seems more than enough
3626 test $ac_count -gt 10 && break
3627 done
3628 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3629esac
bec39cab 3630
81ecdfbb
RW
3631 $ac_path_GREP_found && break 3
3632 done
3633 done
3634 done
3635IFS=$as_save_IFS
3636 if test -z "$ac_cv_path_GREP"; then
3637 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3638 fi
c906108c 3639else
81ecdfbb 3640 ac_cv_path_GREP=$GREP
c906108c 3641fi
c906108c 3642
81ecdfbb
RW
3643fi
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3645$as_echo "$ac_cv_path_GREP" >&6; }
3646 GREP="$ac_cv_path_GREP"
c906108c 3647
c906108c 3648
81ecdfbb
RW
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3650$as_echo_n "checking for egrep... " >&6; }
3651if test "${ac_cv_path_EGREP+set}" = set; then :
3652 $as_echo_n "(cached) " >&6
783e057b 3653else
81ecdfbb
RW
3654 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3655 then ac_cv_path_EGREP="$GREP -E"
3656 else
3657 if test -z "$EGREP"; then
3658 ac_path_EGREP_found=false
3659 # Loop through the user's path and test for each of PROGNAME-LIST
3660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3665 for ac_prog in egrep; do
3666 for ac_exec_ext in '' $ac_executable_extensions; do
3667 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3668 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3669# Check for GNU ac_path_EGREP and select it if it is found.
3670 # Check for GNU $ac_path_EGREP
3671case `"$ac_path_EGREP" --version 2>&1` in
3672*GNU*)
3673 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3674*)
3675 ac_count=0
3676 $as_echo_n 0123456789 >"conftest.in"
3677 while :
3678 do
3679 cat "conftest.in" "conftest.in" >"conftest.tmp"
3680 mv "conftest.tmp" "conftest.in"
3681 cp "conftest.in" "conftest.nl"
3682 $as_echo 'EGREP' >> "conftest.nl"
3683 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3684 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3685 as_fn_arith $ac_count + 1 && ac_count=$as_val
3686 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3687 # Best one so far, save it but keep looking for a better one
3688 ac_cv_path_EGREP="$ac_path_EGREP"
3689 ac_path_EGREP_max=$ac_count
3690 fi
3691 # 10*(2^10) chars as input seems more than enough
3692 test $ac_count -gt 10 && break
3693 done
3694 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3695esac
bec39cab 3696
81ecdfbb
RW
3697 $ac_path_EGREP_found && break 3
3698 done
3699 done
3700 done
3701IFS=$as_save_IFS
3702 if test -z "$ac_cv_path_EGREP"; then
3703 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3704 fi
783e057b 3705else
81ecdfbb 3706 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3707fi
3708
81ecdfbb 3709 fi
783e057b 3710fi
81ecdfbb
RW
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3712$as_echo "$ac_cv_path_EGREP" >&6; }
3713 EGREP="$ac_cv_path_EGREP"
3714
783e057b 3715
81ecdfbb
RW
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3717$as_echo_n "checking for ANSI C header files... " >&6; }
3718if test "${ac_cv_header_stdc+set}" = set; then :
3719 $as_echo_n "(cached) " >&6
783e057b 3720else
81ecdfbb 3721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3722/* end confdefs.h. */
783e057b 3723#include <stdlib.h>
bec39cab 3724#include <stdarg.h>
783e057b
DJ
3725#include <string.h>
3726#include <float.h>
c906108c 3727
bec39cab
AC
3728int
3729main ()
3730{
c906108c 3731
bec39cab
AC
3732 ;
3733 return 0;
3734}
3735_ACEOF
81ecdfbb 3736if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3737 ac_cv_header_stdc=yes
c906108c 3738else
81ecdfbb 3739 ac_cv_header_stdc=no
c906108c 3740fi
81ecdfbb 3741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3742
783e057b
DJ
3743if test $ac_cv_header_stdc = yes; then
3744 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3746/* end confdefs.h. */
3747#include <string.h>
c906108c 3748
783e057b
DJ
3749_ACEOF
3750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3751 $EGREP "memchr" >/dev/null 2>&1; then :
3752
c906108c 3753else
783e057b 3754 ac_cv_header_stdc=no
c906108c 3755fi
783e057b 3756rm -f conftest*
c906108c
SS
3757
3758fi
3759
783e057b
DJ
3760if test $ac_cv_header_stdc = yes; then
3761 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3763/* end confdefs.h. */
3764#include <stdlib.h>
bec39cab 3765
783e057b
DJ
3766_ACEOF
3767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3768 $EGREP "free" >/dev/null 2>&1; then :
3769
bec39cab 3770else
783e057b 3771 ac_cv_header_stdc=no
bec39cab 3772fi
783e057b 3773rm -f conftest*
bec39cab
AC
3774
3775fi
bec39cab 3776
783e057b
DJ
3777if test $ac_cv_header_stdc = yes; then
3778 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3779 if test "$cross_compiling" = yes; then :
783e057b 3780 :
bec39cab 3781else
81ecdfbb 3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3783/* end confdefs.h. */
3784#include <ctype.h>
81ecdfbb 3785#include <stdlib.h>
783e057b
DJ
3786#if ((' ' & 0x0FF) == 0x020)
3787# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3788# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3789#else
3790# define ISLOWER(c) \
3791 (('a' <= (c) && (c) <= 'i') \
3792 || ('j' <= (c) && (c) <= 'r') \
3793 || ('s' <= (c) && (c) <= 'z'))
3794# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3795#endif
3796
3797#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3798int
3799main ()
3800{
3801 int i;
3802 for (i = 0; i < 256; i++)
3803 if (XOR (islower (i), ISLOWER (i))
3804 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3805 return 2;
3806 return 0;
783e057b
DJ
3807}
3808_ACEOF
81ecdfbb 3809if ac_fn_c_try_run "$LINENO"; then :
783e057b 3810
81ecdfbb
RW
3811else
3812 ac_cv_header_stdc=no
783e057b 3813fi
81ecdfbb
RW
3814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3815 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3816fi
81ecdfbb 3817
783e057b
DJ
3818fi
3819fi
81ecdfbb
RW
3820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3821$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3822if test $ac_cv_header_stdc = yes; then
3823
81ecdfbb 3824$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3825
3826fi
3827
3828# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3829for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3830 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3831do :
3832 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3833ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3834"
3835eval as_val=\$$as_ac_Header
3836 if test "x$as_val" = x""yes; then :
783e057b 3837 cat >>confdefs.h <<_ACEOF
81ecdfbb 3838#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3839_ACEOF
3840
3841fi
3842
3843done
3844
3845
3846
81ecdfbb
RW
3847 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3848if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3849 MINIX=yes
3850else
3851 MINIX=
3852fi
3853
3854
3855 if test "$MINIX" = yes; then
3856
81ecdfbb 3857$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3858
3859
81ecdfbb 3860$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3861
3862
81ecdfbb 3863$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3864
3865 fi
3866
3867
81ecdfbb
RW
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3869$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3870if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3871 $as_echo_n "(cached) " >&6
783e057b 3872else
81ecdfbb 3873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3874/* end confdefs.h. */
3875
c971b7fa
PA
3876# define __EXTENSIONS__ 1
3877 $ac_includes_default
783e057b
DJ
3878int
3879main ()
3880{
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
81ecdfbb 3886if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3887 ac_cv_safe_to_define___extensions__=yes
3888else
81ecdfbb 3889 ac_cv_safe_to_define___extensions__=no
783e057b 3890fi
81ecdfbb 3891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3892fi
81ecdfbb
RW
3893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3894$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3895 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3896 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3897
81ecdfbb 3898 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3899
81ecdfbb 3900 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3901
81ecdfbb 3902 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3903
81ecdfbb 3904 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3905
3906
c971b7fa
PA
3907ac_aux_dir=
3908for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3909 for ac_t in install-sh install.sh shtool; do
3910 if test -f "$ac_dir/$ac_t"; then
3911 ac_aux_dir=$ac_dir
3912 ac_install_sh="$ac_aux_dir/$ac_t -c"
3913 break 2
3914 fi
3915 done
3916done
3917if test -z "$ac_aux_dir"; then
3918 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3919fi
770d76d7 3920
c971b7fa
PA
3921# These three variables are undocumented and unsupported,
3922# and are intended to be withdrawn in a future Autoconf release.
3923# They can cause serious problems if a builder's source tree is in a directory
3924# whose full name contains unusual characters.
3925ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3926ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3927ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3928
770d76d7 3929
c971b7fa
PA
3930# Make sure we can run config.sub.
3931$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3932 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3933
c971b7fa
PA
3934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3935$as_echo_n "checking build system type... " >&6; }
3936if test "${ac_cv_build+set}" = set; then :
3937 $as_echo_n "(cached) " >&6
770d76d7 3938else
c971b7fa
PA
3939 ac_build_alias=$build_alias
3940test "x$ac_build_alias" = x &&
3941 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3942test "x$ac_build_alias" = x &&
3943 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3944ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3945 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3946
770d76d7 3947fi
c971b7fa
PA
3948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3949$as_echo "$ac_cv_build" >&6; }
3950case $ac_cv_build in
3951*-*-*) ;;
3952*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3953esac
c971b7fa
PA
3954build=$ac_cv_build
3955ac_save_IFS=$IFS; IFS='-'
3956set x $ac_cv_build
3957shift
3958build_cpu=$1
3959build_vendor=$2
3960shift; shift
3961# Remember, the first character of IFS is used to create $*,
3962# except with old shells:
3963build_os=$*
3964IFS=$ac_save_IFS
3965case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3966
3967
c971b7fa
PA
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3969$as_echo_n "checking host system type... " >&6; }
3970if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3971 $as_echo_n "(cached) " >&6
3972else
c971b7fa
PA
3973 if test "x$host_alias" = x; then
3974 ac_cv_host=$ac_cv_build
81ecdfbb 3975else
c971b7fa
PA
3976 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3977 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3978fi
81ecdfbb
RW
3979
3980fi
c971b7fa
PA
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3982$as_echo "$ac_cv_host" >&6; }
3983case $ac_cv_host in
3984*-*-*) ;;
3985*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 3986esac
c971b7fa
PA
3987host=$ac_cv_host
3988ac_save_IFS=$IFS; IFS='-'
3989set x $ac_cv_host
3990shift
3991host_cpu=$1
3992host_vendor=$2
3993shift; shift
3994# Remember, the first character of IFS is used to create $*,
3995# except with old shells:
3996host_os=$*
3997IFS=$ac_save_IFS
3998case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
3999
4000
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4002$as_echo_n "checking target system type... " >&6; }
4003if test "${ac_cv_target+set}" = set; then :
4004 $as_echo_n "(cached) " >&6
4005else
4006 if test "x$target_alias" = x; then
4007 ac_cv_target=$ac_cv_host
4008else
4009 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4010 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4011fi
4012
4013fi
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4015$as_echo "$ac_cv_target" >&6; }
4016case $ac_cv_target in
4017*-*-*) ;;
4018*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4019esac
4020target=$ac_cv_target
4021ac_save_IFS=$IFS; IFS='-'
4022set x $ac_cv_target
4023shift
4024target_cpu=$1
4025target_vendor=$2
4026shift; shift
4027# Remember, the first character of IFS is used to create $*,
4028# except with old shells:
4029target_os=$*
4030IFS=$ac_save_IFS
4031case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4032
4033
4034# The aliases save the names the user supplied, while $host etc.
4035# will get canonicalized.
4036test -n "$target_alias" &&
4037 test "$program_prefix$program_suffix$program_transform_name" = \
4038 NONENONEs,x,x, &&
4039 program_prefix=${target_alias}-
4040
4041# The tests for host and target for $enable_largefile require
4042# canonical names.
4043
4044
81ecdfbb 4045
da2f07f1
JK
4046# As the $enable_largefile decision depends on --enable-plugins we must set it
4047# even in directories otherwise not depending on the $plugins option.
4048
4049
4050# Check whether --enable-plugins was given.
4051if test "${enable_plugins+set}" = set; then :
4052 enableval=$enable_plugins; case "${enableval}" in
4053 yes | "") plugins=yes ;;
4054 no) plugins=no ;;
4055 *) plugins=yes ;;
4056 esac
4057else
4058 plugins=no
4059fi
4060
4061
4062
4063case "${host}" in
4064 sparc-*-solaris*|i[3-7]86-*-solaris*)
4065 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4066 # are mutually exclusive; and without procfs support, the bfd/ elf module
4067 # cannot provide certain routines such as elfcore_write_prpsinfo
4068 # or elfcore_write_prstatus. So unless the user explicitly requested
4069 # large-file support through the --enable-largefile switch, disable
4070 # large-file support in favor of procfs support.
4071 test "${target}" = "${host}" -a "x$plugins" = xno \
4072 && : ${enable_largefile="no"}
4073 ;;
4074esac
4075
4076# Check whether --enable-largefile was given.
4077if test "${enable_largefile+set}" = set; then :
4078 enableval=$enable_largefile;
4079fi
4080
4081if test "$enable_largefile" != no; then
4082
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4084$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4085if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4086 $as_echo_n "(cached) " >&6
4087else
4088 ac_cv_sys_largefile_CC=no
4089 if test "$GCC" != yes; then
4090 ac_save_CC=$CC
4091 while :; do
4092 # IRIX 6.2 and later do not support large files by default,
4093 # so use the C compiler's -n32 option if that helps.
4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4095/* end confdefs.h. */
4096#include <sys/types.h>
4097 /* Check that off_t can represent 2**63 - 1 correctly.
4098 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4099 since some C++ compilers masquerading as C compilers
4100 incorrectly reject 9223372036854775807. */
4101#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4102 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4103 && LARGE_OFF_T % 2147483647 == 1)
4104 ? 1 : -1];
4105int
4106main ()
4107{
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
4113 if ac_fn_c_try_compile "$LINENO"; then :
4114 break
4115fi
4116rm -f core conftest.err conftest.$ac_objext
4117 CC="$CC -n32"
4118 if ac_fn_c_try_compile "$LINENO"; then :
4119 ac_cv_sys_largefile_CC=' -n32'; break
4120fi
4121rm -f core conftest.err conftest.$ac_objext
4122 break
4123 done
4124 CC=$ac_save_CC
4125 rm -f conftest.$ac_ext
4126 fi
4127fi
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4129$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4130 if test "$ac_cv_sys_largefile_CC" != no; then
4131 CC=$CC$ac_cv_sys_largefile_CC
4132 fi
4133
4134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4135$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4136if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4137 $as_echo_n "(cached) " >&6
4138else
4139 while :; do
4140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4141/* end confdefs.h. */
4142#include <sys/types.h>
4143 /* Check that off_t can represent 2**63 - 1 correctly.
4144 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4145 since some C++ compilers masquerading as C compilers
4146 incorrectly reject 9223372036854775807. */
4147#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4148 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4149 && LARGE_OFF_T % 2147483647 == 1)
4150 ? 1 : -1];
4151int
4152main ()
4153{
4154
4155 ;
4156 return 0;
4157}
4158_ACEOF
4159if ac_fn_c_try_compile "$LINENO"; then :
4160 ac_cv_sys_file_offset_bits=no; break
4161fi
4162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164/* end confdefs.h. */
4165#define _FILE_OFFSET_BITS 64
4166#include <sys/types.h>
4167 /* Check that off_t can represent 2**63 - 1 correctly.
4168 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4169 since some C++ compilers masquerading as C compilers
4170 incorrectly reject 9223372036854775807. */
4171#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4172 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4173 && LARGE_OFF_T % 2147483647 == 1)
4174 ? 1 : -1];
4175int
4176main ()
4177{
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
4183if ac_fn_c_try_compile "$LINENO"; then :
4184 ac_cv_sys_file_offset_bits=64; break
4185fi
4186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4187 ac_cv_sys_file_offset_bits=unknown
4188 break
4189done
4190fi
4191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4192$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4193case $ac_cv_sys_file_offset_bits in #(
4194 no | unknown) ;;
4195 *)
4196cat >>confdefs.h <<_ACEOF
4197#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4198_ACEOF
4199;;
4200esac
4201rm -rf conftest*
4202 if test $ac_cv_sys_file_offset_bits = unknown; then
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4204$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4205if test "${ac_cv_sys_large_files+set}" = set; then :
4206 $as_echo_n "(cached) " >&6
4207else
4208 while :; do
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4210/* end confdefs.h. */
4211#include <sys/types.h>
4212 /* Check that off_t can represent 2**63 - 1 correctly.
4213 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4214 since some C++ compilers masquerading as C compilers
4215 incorrectly reject 9223372036854775807. */
4216#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4217 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4218 && LARGE_OFF_T % 2147483647 == 1)
4219 ? 1 : -1];
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
4228if ac_fn_c_try_compile "$LINENO"; then :
4229 ac_cv_sys_large_files=no; break
4230fi
4231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4233/* end confdefs.h. */
4234#define _LARGE_FILES 1
4235#include <sys/types.h>
4236 /* Check that off_t can represent 2**63 - 1 correctly.
4237 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4238 since some C++ compilers masquerading as C compilers
4239 incorrectly reject 9223372036854775807. */
4240#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4241 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4242 && LARGE_OFF_T % 2147483647 == 1)
4243 ? 1 : -1];
4244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
4252if ac_fn_c_try_compile "$LINENO"; then :
4253 ac_cv_sys_large_files=1; break
4254fi
4255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_cv_sys_large_files=unknown
4257 break
4258done
4259fi
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4261$as_echo "$ac_cv_sys_large_files" >&6; }
4262case $ac_cv_sys_large_files in #(
4263 no | unknown) ;;
4264 *)
4265cat >>confdefs.h <<_ACEOF
4266#define _LARGE_FILES $ac_cv_sys_large_files
4267_ACEOF
4268;;
4269esac
4270rm -rf conftest*
4271 fi
4272fi
4273
4274
4275
81ecdfbb
RW
4276
4277
4278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4279$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4280if test "${am_cv_prog_cc_stdc+set}" = set; then :
4281 $as_echo_n "(cached) " >&6
4282else
4283 am_cv_prog_cc_stdc=no
4284ac_save_CC="$CC"
4285# Don't try gcc -ansi; that turns off useful extensions and
4286# breaks some systems' header files.
4287# AIX -qlanglvl=ansi
4288# Ultrix and OSF/1 -std1
4289# HP-UX 10.20 and later -Ae
4290# HP-UX older versions -Aa -D_HPUX_SOURCE
4291# SVR4 -Xc -D__EXTENSIONS__
4292for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4293do
783e057b 4294 CC="$ac_save_CC $ac_arg"
81ecdfbb 4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4296/* end confdefs.h. */
4297#include <stdarg.h>
4298#include <stdio.h>
4299#include <sys/types.h>
4300#include <sys/stat.h>
4301/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4302struct buf { int x; };
4303FILE * (*rcsopen) (struct buf *, struct stat *, int);
4304static char *e (p, i)
4305 char **p;
4306 int i;
4307{
4308 return p[i];
4309}
4310static char *f (char * (*g) (char **, int), char **p, ...)
4311{
4312 char *s;
4313 va_list v;
4314 va_start (v,p);
4315 s = g (p, va_arg (v,int));
4316 va_end (v);
4317 return s;
4318}
4319int test (int i, double x);
4320struct s1 {int (*f) (int a);};
4321struct s2 {int (*f) (double a);};
4322int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4323int argc;
4324char **argv;
4325
4326int
4327main ()
4328{
4329
4330return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4331
4332 ;
4333 return 0;
4334}
4335_ACEOF
81ecdfbb 4336if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4337 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4338fi
81ecdfbb 4339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4340done
4341CC="$ac_save_CC"
4342
4343fi
4344
4345if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4347$as_echo "none needed" >&6; }
783e057b 4348else
81ecdfbb
RW
4349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4350$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4351fi
4352case "x$am_cv_prog_cc_stdc" in
4353 x|xno) ;;
4354 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4355esac
4356
4357
4358ac_aux_dir=
81ecdfbb
RW
4359for ac_dir in .. "$srcdir"/..; do
4360 for ac_t in install-sh install.sh shtool; do
4361 if test -f "$ac_dir/$ac_t"; then
4362 ac_aux_dir=$ac_dir
4363 ac_install_sh="$ac_aux_dir/$ac_t -c"
4364 break 2
4365 fi
4366 done
783e057b
DJ
4367done
4368if test -z "$ac_aux_dir"; then
81ecdfbb 4369 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4370fi
81ecdfbb
RW
4371
4372# These three variables are undocumented and unsupported,
4373# and are intended to be withdrawn in a future Autoconf release.
4374# They can cause serious problems if a builder's source tree is in a directory
4375# whose full name contains unusual characters.
4376ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4377ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4378ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4379
783e057b 4380
783e057b 4381
9009e1ae
MR
4382test "$program_prefix" != NONE &&
4383 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4384# Use a double $ so make ignores it.
4385test "$program_suffix" != NONE &&
4386 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4387# Double any \ or $.
4388# By default was `s,x,x', remove it if useless.
4389ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4390program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4391
81ecdfbb 4392
a417dc56
RW
4393# Dependency checking.
4394rm -rf .tst 2>/dev/null
4395mkdir .tst 2>/dev/null
4396if test -d .tst; then
4397 am__leading_dot=.
4398else
4399 am__leading_dot=_
4400fi
4401rmdir .tst 2>/dev/null
4402
4403DEPDIR="${am__leading_dot}deps"
4404
81ecdfbb 4405ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4406
4407
4408depcc="$CC" am_compiler_list=
4409
4410am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4412$as_echo_n "checking dependency style of $depcc... " >&6; }
4413if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4414 $as_echo_n "(cached) " >&6
a417dc56
RW
4415else
4416 if test -f "$am_depcomp"; then
4417 # We make a subdir and do the tests there. Otherwise we can end up
4418 # making bogus files that we don't know about and never remove. For
4419 # instance it was reported that on HP-UX the gcc test will end up
4420 # making a dummy file named `D' -- because `-MD' means `put the output
4421 # in D'.
4422 mkdir conftest.dir
4423 # Copy depcomp to subdir because otherwise we won't find it if we're
4424 # using a relative directory.
4425 cp "$am_depcomp" conftest.dir
4426 cd conftest.dir
4427 # We will build objects and dependencies in a subdirectory because
4428 # it helps to detect inapplicable dependency modes. For instance
4429 # both Tru64's cc and ICC support -MD to output dependencies as a
4430 # side effect of compilation, but ICC will put the dependencies in
4431 # the current directory while Tru64 will put them in the object
4432 # directory.
4433 mkdir sub
4434
4435 am_cv_CC_dependencies_compiler_type=none
4436 if test "$am_compiler_list" = ""; then
4437 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4438 fi
4439 for depmode in $am_compiler_list; do
4440 if test $depmode = none; then break; fi
4441
81ecdfbb 4442 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4443 # Setup a source with many dependencies, because some compilers
4444 # like to wrap large dependency lists on column 80 (with \), and
4445 # we should not choose a depcomp mode which is confused by this.
4446 #
4447 # We need to recreate these files for each test, as the compiler may
4448 # overwrite some of them when testing with obscure command lines.
4449 # This happens at least with the AIX C compiler.
4450 : > sub/conftest.c
4451 for i in 1 2 3 4 5 6; do
4452 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4453 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4454 # Solaris 8's {/usr,}/bin/sh.
4455 touch sub/conftst$i.h
4456 done
4457 echo "include sub/conftest.Po" > confmf
4458
4459 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4460 # mode. It turns out that the SunPro C++ compiler does not properly
4461 # handle `-M -o', and we need to detect this.
4462 depcmd="depmode=$depmode \
4463 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4464 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4465 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4466 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4467 if env $depcmd > conftest.err 2>&1 &&
4468 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4469 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4470 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4471 # icc doesn't choke on unknown options, it will just issue warnings
4472 # or remarks (even with -Werror). So we grep stderr for any message
4473 # that says an option was ignored or not supported.
4474 # When given -MP, icc 7.0 and 7.1 complain thusly:
4475 # icc: Command line warning: ignoring option '-M'; no argument required
4476 # The diagnosis changed in icc 8.0:
4477 # icc: Command line remark: option '-MP' not supported
4478 if (grep 'ignoring option' conftest.err ||
4479 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4480 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4481 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4482 break
4483 fi
4484 fi
81ecdfbb 4485 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4486 sed -e 's/^/| /' < conftest.err >&5
4487 done
4488
4489 cd ..
4490 rm -rf conftest.dir
4491else
4492 am_cv_CC_dependencies_compiler_type=none
4493fi
4494
4495fi
81ecdfbb
RW
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4497$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4498if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4499then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4500else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4501
4502fi
4503
4504
4505# Check for the 'make' the user wants to use.
4506for ac_prog in make
4507do
4508 # Extract the first word of "$ac_prog", so it can be a program name with args.
4509set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4511$as_echo_n "checking for $ac_word... " >&6; }
4512if test "${ac_cv_prog_MAKE+set}" = set; then :
4513 $as_echo_n "(cached) " >&6
a417dc56
RW
4514else
4515 if test -n "$MAKE"; then
4516 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4517else
4518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521 IFS=$as_save_IFS
4522 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4523 for ac_exec_ext in '' $ac_executable_extensions; do
4524 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4525 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4527 break 2
4528 fi
4529done
81ecdfbb
RW
4530 done
4531IFS=$as_save_IFS
a417dc56
RW
4532
4533fi
4534fi
4535MAKE=$ac_cv_prog_MAKE
4536if test -n "$MAKE"; then
81ecdfbb
RW
4537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4538$as_echo "$MAKE" >&6; }
a417dc56 4539else
81ecdfbb
RW
4540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541$as_echo "no" >&6; }
a417dc56
RW
4542fi
4543
81ecdfbb 4544
a417dc56
RW
4545 test -n "$MAKE" && break
4546done
4547
4548MAKE_IS_GNU=
4549case "`$MAKE --version 2>&1 | sed 1q`" in
4550 *GNU*)
4551 MAKE_IS_GNU=yes
4552 ;;
4553esac
81ecdfbb 4554 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4555 GMAKE_TRUE=
4556 GMAKE_FALSE='#'
4557else
4558 GMAKE_TRUE='#'
4559 GMAKE_FALSE=
4560fi
4561
81ecdfbb
RW
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4563$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4564set x ${MAKE-make}
4565ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4566if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4567 $as_echo_n "(cached) " >&6
a417dc56
RW
4568else
4569 cat >conftest.make <<\_ACEOF
81ecdfbb 4570SHELL = /bin/sh
a417dc56 4571all:
81ecdfbb 4572 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4573_ACEOF
4574# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4575case `${MAKE-make} -f conftest.make 2>/dev/null` in
4576 *@@@%%%=?*=@@@%%%*)
4577 eval ac_cv_prog_make_${ac_make}_set=yes;;
4578 *)
4579 eval ac_cv_prog_make_${ac_make}_set=no;;
4580esac
a417dc56
RW
4581rm -f conftest.make
4582fi
81ecdfbb
RW
4583if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4585$as_echo "yes" >&6; }
a417dc56
RW
4586 SET_MAKE=
4587else
81ecdfbb
RW
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
a417dc56
RW
4590 SET_MAKE="MAKE=${MAKE-make}"
4591fi
4592
4593
c971b7fa
PA
4594# Configure gnulib. We need to build gnulib under some other
4595# directory not "gnulib", to avoid the problem of both GDB and
4596# GDBserver wanting to build it in the same directory, when building
4597# in the source dir.
783e057b 4598
c971b7fa
PA
4599 in_src="gnulib"
4600 in_build="build-gnulib"
4601
4602 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4603 # so they do not pile up.
4604 ac_sub_configure_args=
4605 ac_prev=
4606 eval "set x $ac_configure_args"
4607 shift
4608 for ac_arg
4609 do
4610 if test -n "$ac_prev"; then
4611 ac_prev=
4612 continue
4613 fi
4614 case $ac_arg in
4615 -cache-file | --cache-file | --cache-fil | --cache-fi \
4616 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4617 ac_prev=cache_file ;;
4618 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4619 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4620 | --c=*)
4621 ;;
4622 --config-cache | -C)
4623 ;;
4624 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4625 ac_prev=srcdir ;;
4626 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4627 ;;
4628 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4629 ac_prev=prefix ;;
4630 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4631 ;;
4632 --disable-option-checking)
4633 ;;
4634 *)
4635 case $ac_arg in
4636 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4637 esac
4638 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4639 esac
4640 done
4641
4642 # Always prepend --prefix to ensure using the same prefix
4643 # in subdir configurations.
4644 ac_arg="--prefix=$prefix"
4645 case $ac_arg in
4646 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4647 esac
4648 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4649
4650 # Pass --silent
4651 if test "$silent" = yes; then
4652 ac_sub_configure_args="--silent $ac_sub_configure_args"
4653 fi
4654
4655 # Always prepend --disable-option-checking to silence warnings, since
4656 # different subdirs can have different --enable and --with options.
4657 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4658
4659 ac_popdir=`pwd`
4660 ac_dir=$in_build
4661
4662 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4663 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4664 $as_echo "$ac_msg" >&6
4665 as_dir="$ac_dir"; as_fn_mkdir_p
4666
38ea300a
PA
4667 case $srcdir in
4668 [\\/]* | ?:[\\/]* )
4669 ac_srcdir=$srcdir/$in_src ;;
4670 *) # Relative name.
4671 ac_srcdir=../$srcdir/$in_src ;;
4672 esac
c971b7fa
PA
4673
4674 cd "$ac_dir"
4675
4676 ac_sub_configure=$ac_srcdir/configure
4677
4678 # Make the cache file name correct relative to the subdirectory.
4679 case $cache_file in
4680 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4681 *) # Relative name.
4682 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4683 esac
4684
4685 { $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
4686$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4687 # The eval makes quoting arguments work.
4688 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4689 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4690 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4691
4692 cd "$ac_popdir"
783e057b 4693
c971b7fa
PA
4694
4695
4696CONFIG_OBS=
4697CONFIG_DEPS=
4698CONFIG_SRCS=
4699ENABLE_CFLAGS=
4700
4701CONFIG_ALL=
4702CONFIG_CLEAN=
4703CONFIG_INSTALL=
4704CONFIG_UNINSTALL=
4705
4706# If we haven't got the data from the intl directory,
4707# assume NLS is disabled.
4708USE_NLS=no
4709LIBINTL=
4710LIBINTL_DEP=
4711INCINTL=
4712XGETTEXT=
4713GMSGFMT=
4714POSUB=
783e057b
DJ
4715
4716if test -f ../intl/config.intl; then
4717 . ../intl/config.intl
4718fi
81ecdfbb
RW
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4720$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4721if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
783e057b 4724else
81ecdfbb
RW
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4726$as_echo "yes" >&6; }
783e057b 4727
81ecdfbb 4728$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4729
4730
81ecdfbb
RW
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4732$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4733 # Look for .po and .gmo files in the source directory.
4734 CATALOGS=
4735 XLINGUAS=
4736 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4737 # If there aren't any .gmo files the shell will give us the
4738 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4739 # weeded out.
4740 case "$cat" in *\**)
4741 continue;;
4742 esac
4743 # The quadruple backslash is collapsed to a double backslash
4744 # by the backticks, then collapsed again by the double quotes,
4745 # leaving us with one backslash in the sed expression (right
4746 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4747 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4748 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4749 # The user is allowed to set LINGUAS to a list of languages to
4750 # install catalogs for. If it's empty that means "all of them."
4751 if test "x$LINGUAS" = x; then
4752 CATALOGS="$CATALOGS $cat"
4753 XLINGUAS="$XLINGUAS $lang"
4754 else
4755 case "$LINGUAS" in *$lang*)
4756 CATALOGS="$CATALOGS $cat"
4757 XLINGUAS="$XLINGUAS $lang"
4758 ;;
4759 esac
e28b3332
DJ
4760 fi
4761 done
c971b7fa
PA
4762 LINGUAS="$XLINGUAS"
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4764$as_echo "$LINGUAS" >&6; }
4765
4766
4767 DATADIRNAME=share
4768
4769 INSTOBJEXT=.mo
4770
4771 GENCAT=gencat
4772
4773 CATOBJEXT=.gmo
e28b3332 4774
e28b3332
DJ
4775fi
4776
c971b7fa
PA
4777localedir='${datadir}/locale'
4778
4779
4780if test x"$USE_NLS" = xyes; then
4781 CONFIG_ALL="$CONFIG_ALL all-po"
4782 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4783 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4784 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4785fi
e28b3332 4786
c971b7fa
PA
4787GNULIB=build-gnulib/import
4788
4789# For Makefile dependencies.
4790GNULIB_STDINT_H=
4791if test x"$STDINT_H" != x; then
4792 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4793fi
4794
4795
c971b7fa
PA
4796PACKAGE=gdb
4797
4798cat >>confdefs.h <<_ACEOF
4799#define PACKAGE "$PACKAGE"
4800_ACEOF
4801
4802
4803
4804# We never need to detect it in this sub-configure.
4805# But preserve it for config.status --recheck.
4806
4807
4808
4809MAKEINFO_EXTRA_FLAGS=""
4810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4811$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4812if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4813 $as_echo_n "(cached) " >&6
4814else
4815 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4816 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4817 gdb_cv_have_makeinfo_click=yes
4818 else
4819 gdb_cv_have_makeinfo_click=no
4820 fi
4821fi
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4823$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4824if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4825 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4826fi
e28b3332
DJ
4827
4828
bec39cab
AC
4829
4830
81ecdfbb
RW
4831# Check whether --with-separate-debug-dir was given.
4832if test "${with_separate_debug_dir+set}" = set; then :
4833 withval=$with_separate_debug_dir;
b14b1491
TT
4834 DEBUGDIR=$withval
4835else
4836 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4837fi
4838
20e95c23 4839
783e057b
DJ
4840 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4841 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4842 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4843 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4844
783e057b
DJ
4845cat >>confdefs.h <<_ACEOF
4846#define DEBUGDIR "$ac_define_dir"
20e95c23 4847_ACEOF
20e95c23 4848
20e95c23 4849
20e95c23 4850
0c4a4063 4851
b14b1491
TT
4852 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4853 if test "x$prefix" = xNONE; then
4854 test_prefix=/usr/local
4855 else
4856 test_prefix=$prefix
4857 fi
783e057b 4858 else
b14b1491 4859 test_prefix=$exec_prefix
783e057b 4860 fi
b14b1491
TT
4861 value=0
4862 case ${ac_define_dir} in
4863 "${test_prefix}"|"${test_prefix}/"*|\
4864 '${exec_prefix}'|'${exec_prefix}/'*)
4865 value=1
4866 ;;
4867 esac
4868
4869cat >>confdefs.h <<_ACEOF
4870#define DEBUGDIR_RELOCATABLE $value
4871_ACEOF
4872
4873
4874
0c4a4063 4875
f83d8a90
DE
4876# We can't pass paths as command line arguments.
4877# Mingw32 tries to be clever and will convert the paths for us.
4878# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4879# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4880# This breaks GDB's relocatable path conversions since paths passed in
4881# config.h would not get so translated, the path prefixes no longer match.
4882
4883 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4884 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4885 ac_define_dir=`eval echo $bindir`
4886 ac_define_dir=`eval echo $ac_define_dir`
4887
4888cat >>confdefs.h <<_ACEOF
4889#define BINDIR "$ac_define_dir"
4890_ACEOF
4891
4892
4893
b14b1491
TT
4894# GDB's datadir relocation
4895
4896
4897
81ecdfbb
RW
4898# Check whether --with-gdb-datadir was given.
4899if test "${with_gdb_datadir+set}" = set; then :
4900 withval=$with_gdb_datadir;
b14b1491 4901 GDB_DATADIR=$withval
20e95c23 4902else
b14b1491 4903 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4904fi
4905
20e95c23 4906
b14b1491
TT
4907 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4908 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4909 ac_define_dir=`eval echo $GDB_DATADIR`
4910 ac_define_dir=`eval echo $ac_define_dir`
4911
4912cat >>confdefs.h <<_ACEOF
4913#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4914_ACEOF
4915
b14b1491
TT
4916
4917
0c4a4063 4918
b14b1491
TT
4919 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4920 if test "x$prefix" = xNONE; then
4921 test_prefix=/usr/local
4922 else
4923 test_prefix=$prefix
4924 fi
4925 else
4926 test_prefix=$exec_prefix
4927 fi
4928 value=0
4929 case ${ac_define_dir} in
4930 "${test_prefix}"|"${test_prefix}/"*|\
4931 '${exec_prefix}'|'${exec_prefix}/'*)
4932 value=1
4933 ;;
4934 esac
4935
4936cat >>confdefs.h <<_ACEOF
4937#define GDB_DATADIR_RELOCATABLE $value
4938_ACEOF
4939
4940
783e057b 4941
20e95c23 4942
0c4a4063 4943
81ecdfbb
RW
4944# Check whether --with-relocated-sources was given.
4945if test "${with_relocated_sources+set}" = set; then :
4946 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4947
4948 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4949 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4950 ac_define_dir=`eval echo $reloc_srcdir`
4951 ac_define_dir=`eval echo $ac_define_dir`
4952
4953cat >>confdefs.h <<_ACEOF
4954#define RELOC_SRCDIR "$ac_define_dir"
4955_ACEOF
4956
4957
4958
81ecdfbb
RW
4959fi
4960
29b0e8a2 4961
bccbefd2
JK
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
4963$as_echo_n "checking for default auto-load safe-path... " >&6; }
4964
4965# Check whether --with-auto-load-safe-path was given.
4966if test "${with_auto_load_safe_path+set}" = set; then :
4967 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
4968 with_auto_load_safe_path="/"
4969 fi
bccbefd2 4970else
6dea1fbd 4971 with_auto_load_safe_path='$ddir/auto-load'
bccbefd2
JK
4972fi
4973
6dea1fbd 4974escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]ddir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
4975
4976 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4977 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 4978 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
4979 ac_define_dir=`eval echo $ac_define_dir`
4980
4981cat >>confdefs.h <<_ACEOF
6dea1fbd 4982#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
4983_ACEOF
4984
4985
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
4987$as_echo "$with_auto_load_safe_path" >&6; }
4988
29b0e8a2 4989
20e95c23 4990
5ae98d25 4991subdirs="$subdirs testsuite"
20e95c23
DJ
4992
4993
783e057b 4994# Check whether to support alternative target configurations
81ecdfbb
RW
4995# Check whether --enable-targets was given.
4996if test "${enable_targets+set}" = set; then :
4997 enableval=$enable_targets; case "${enableval}" in
4998 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
4999 ;;
5000 no) enable_targets= ;;
5001 *) enable_targets=$enableval ;;
5002esac
81ecdfbb
RW
5003fi
5004
20e95c23 5005
783e057b 5006# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5007# Check whether --enable-64-bit-bfd was given.
5008if test "${enable_64_bit_bfd+set}" = set; then :
5009 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5010 yes) want64=true ;;
5011 no) want64=false ;;
81ecdfbb 5012 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5013esac
5014else
5015 want64=false
81ecdfbb
RW
5016fi
5017
783e057b
DJ
5018# Provide defaults for some variables set by the per-host and per-target
5019# configuration.
5020gdb_host_obs=posix-hdep.o
20e95c23 5021
783e057b
DJ
5022if test "${target}" = "${host}"; then
5023 gdb_native=yes
5024else
5025 gdb_native=no
5026fi
20e95c23 5027
783e057b 5028. $srcdir/configure.host
20e95c23 5029
783e057b 5030# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5031
783e057b
DJ
5032TARGET_OBS=
5033all_targets=
20e95c23 5034
783e057b 5035for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5036do
783e057b
DJ
5037 if test "$targ_alias" = "all"; then
5038 all_targets=true
5039 else
5040 # Canonicalize the secondary target names.
5041 result=`$ac_config_sub $targ_alias 2>/dev/null`
5042 if test -n "$result"; then
5043 targ=$result
5044 else
5045 targ=$targ_alias
5046 fi
20e95c23 5047
783e057b 5048 . ${srcdir}/configure.tgt
20e95c23 5049
bf307134
JB
5050 if test -z "${gdb_target_obs}"; then :
5051 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5052fi
5053
783e057b
DJ
5054 # Target-specific object files
5055 for i in ${gdb_target_obs}; do
5056 case " $TARGET_OBS " in
5057 *" ${i} "*) ;;
5058 *)
5059 TARGET_OBS="$TARGET_OBS ${i}"
5060 ;;
5061 esac
5062 done
20e95c23 5063
783e057b
DJ
5064 # Check whether this target needs 64-bit CORE_ADDR
5065 if test x${want64} = xfalse; then
5066 . ${srcdir}/../bfd/config.bfd
5067 fi
5068 fi
20e95c23
DJ
5069done
5070
783e057b
DJ
5071if test x${all_targets} = xtrue; then
5072
5073 # We want all 64-bit targets if we either:
5074 # - run on a 64-bit host or
5075 # - already require 64-bit support for some other target or
5076 # - the --enable-64-bit-bfd option was supplied
5077 # Otherwise we only support all 32-bit targets.
5078 #
5079 # NOTE: This test must be in sync with the corresponding
5080 # tests in BFD!
20e95c23 5081
783e057b 5082 if test x${want64} = xfalse; then
81ecdfbb
RW
5083 # The cast to long int works around a bug in the HP C Compiler
5084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5086# This bug is HP SR number 8606223364.
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5088$as_echo_n "checking size of long... " >&6; }
5089if test "${ac_cv_sizeof_long+set}" = set; then :
5090 $as_echo_n "(cached) " >&6
c0993dbe 5091else
81ecdfbb 5092 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5093
81ecdfbb
RW
5094else
5095 if test "$ac_cv_type_long" = yes; then
5096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5098{ as_fn_set_status 77
5099as_fn_error "cannot compute sizeof (long)
5100See \`config.log' for more details." "$LINENO" 5; }; }
5101 else
5102 ac_cv_sizeof_long=0
5103 fi
c0993dbe 5104fi
81ecdfbb 5105
c0993dbe 5106fi
81ecdfbb
RW
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5108$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5109
c0993dbe 5110
c0993dbe 5111
c0993dbe
UW
5112cat >>confdefs.h <<_ACEOF
5113#define SIZEOF_LONG $ac_cv_sizeof_long
5114_ACEOF
5115
5116
5117 if test "x${ac_cv_sizeof_long}" = "x8"; then
5118 want64=true
5119 fi
5120 fi
5121 if test x${want64} = xtrue; then
5122 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5123 else
5124 TARGET_OBS='$(ALL_TARGET_OBS)'
5125 fi
5126fi
5127
5128
5129
5130# For other settings, only the main target counts.
5131gdb_sim=
5132gdb_osabi=
5133build_gdbserver=
5134targ=$target; . ${srcdir}/configure.tgt
5135
5136# Fetch the default architecture and default target vector from BFD.
5137targ=$target; . $srcdir/../bfd/config.bfd
5138
5139# We only want the first architecture, so strip off the others if
5140# there is more than one.
5141targ_archs=`echo $targ_archs | sed 's/ .*//'`
5142
5143if test "x$targ_archs" != x; then
5144
5145cat >>confdefs.h <<_ACEOF
5146#define DEFAULT_BFD_ARCH $targ_archs
5147_ACEOF
5148
5149fi
5150if test "x$targ_defvec" != x; then
5151
5152cat >>confdefs.h <<_ACEOF
5153#define DEFAULT_BFD_VEC $targ_defvec
5154_ACEOF
5155
5156fi
5157
c0993dbe
UW
5158# The CLI cannot be disabled yet, but may be in the future.
5159
5160# Enable CLI.
81ecdfbb
RW
5161# Check whether --enable-gdbcli was given.
5162if test "${enable_gdbcli+set}" = set; then :
5163 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5164 yes)
5165 ;;
5166 no)
81ecdfbb 5167 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5168 *)
81ecdfbb 5169 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5170 esac
5171else
5172 enable_gdbcli=yes
81ecdfbb
RW
5173fi
5174
c0993dbe
UW
5175if test x"$enable_gdbcli" = xyes; then
5176 if test -d $srcdir/cli; then
5177 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5178 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5179 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5180 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5181 fi
5182fi
5183
5184# Enable MI.
81ecdfbb
RW
5185# Check whether --enable-gdbmi was given.
5186if test "${enable_gdbmi+set}" = set; then :
5187 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5188 yes | no)
5189 ;;
5190 *)
81ecdfbb 5191 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5192 esac
5193else
5194 enable_gdbmi=yes
81ecdfbb
RW
5195fi
5196
c0993dbe
UW
5197if test x"$enable_gdbmi" = xyes; then
5198 if test -d $srcdir/mi; then
5199 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5200 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5201 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5202 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5203 fi
5204fi
5205
5206# Enable TUI.
81ecdfbb
RW
5207# Check whether --enable-tui was given.
5208if test "${enable_tui+set}" = set; then :
5209 enableval=$enable_tui; case $enableval in
3ca64bd3 5210 yes | no | auto)
c0993dbe
UW
5211 ;;
5212 *)
81ecdfbb 5213 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5214 esac
5215else
3ca64bd3 5216 enable_tui=auto
81ecdfbb
RW
5217fi
5218
c0993dbe
UW
5219
5220# Enable gdbtk.
81ecdfbb
RW
5221# Check whether --enable-gdbtk was given.
5222if test "${enable_gdbtk+set}" = set; then :
5223 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5224 yes | no)
5225 ;;
5226 *)
81ecdfbb 5227 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5228 esac
5229else
5062cc19 5230 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5231 enable_gdbtk=yes
5232 else
5233 enable_gdbtk=no
5234 fi
81ecdfbb
RW
5235fi
5236
c0993dbe
UW
5237# We unconditionally disable gdbtk tests on selected platforms.
5238case $host_os in
5239 go32* | windows*)
81ecdfbb
RW
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5241$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5242 enable_gdbtk=no ;;
5243esac
5244
05e7c244 5245# Libunwind support for ia64.
bec39cab 5246
05e7c244
JK
5247
5248# Check whether --with-libunwind-ia64 was given.
5249if test "${with_libunwind_ia64+set}" = set; then :
5250 withval=$with_libunwind_ia64;
bec39cab 5251else
05e7c244
JK
5252 with_libunwind_ia64=auto
5253fi
bec39cab 5254
05e7c244
JK
5255
5256# Backward compatibility option.
5257if test "${with_libunwind+set}" = set; then
5258 if test x"$with_libunwind_ia64" != xauto; then
5259 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5260 fi
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5262$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5263 with_libunwind_ia64="$with_libunwind"
5264fi
5265
5266case "$with_libunwind_ia64" in
5267 yes | no)
5268 ;;
5269 auto)
5270 for ac_header in libunwind-ia64.h
81ecdfbb 5271do :
b54a8fd7
PA
5272 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5273if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5274 cat >>confdefs.h <<_ACEOF
b54a8fd7 5275#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5276_ACEOF
5277
5278fi
5279
5280done
5281
05e7c244
JK
5282 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5283 ;;
5284 *)
5285 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5286 ;;
5287esac
bec39cab 5288
05e7c244 5289if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5290 for ac_header in libunwind-ia64.h
81ecdfbb 5291do :
b54a8fd7
PA
5292 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5293if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5294 cat >>confdefs.h <<_ACEOF
b54a8fd7 5295#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5296_ACEOF
5297
5298fi
5299
5300done
5301
05e7c244
JK
5302 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5303 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5304 fi
5305 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5306 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5307 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5308fi
5309
cb01cfba
JB
5310opt_curses=no
5311
81ecdfbb
RW
5312# Check whether --with-curses was given.
5313if test "${with_curses+set}" = set; then :
5314 withval=$with_curses; opt_curses=$withval
5315fi
5316
cb01cfba 5317
76a39ba7 5318prefer_curses=no
cb01cfba 5319if test "$opt_curses" = "yes"; then
76a39ba7 5320 prefer_curses=yes
cb01cfba
JB
5321fi
5322
a9322a30 5323# Profiling support.
81ecdfbb
RW
5324# Check whether --enable-profiling was given.
5325if test "${enable_profiling+set}" = set; then :
5326 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5327 yes | no)
5328 ;;
5329 *)
81ecdfbb 5330 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5331 esac
5332else
5333 enable_profiling=no
81ecdfbb 5334fi
bec39cab 5335
a9322a30
TT
5336
5337for ac_func in monstartup _mcleanup
81ecdfbb
RW
5338do :
5339 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5340ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5341eval as_val=\$$as_ac_var
5342 if test "x$as_val" = x""yes; then :
5343 cat >>confdefs.h <<_ACEOF
5344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5345_ACEOF
a9322a30 5346
81ecdfbb
RW
5347fi
5348done
a9322a30 5349
81ecdfbb
RW
5350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5351$as_echo_n "checking for _etext... " >&6; }
5352if test "${ac_cv_var__etext+set}" = set; then :
5353 $as_echo_n "(cached) " >&6
5354else
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357#include <stdlib.h>
5358extern char _etext;
a9322a30
TT
5359
5360int
5361main ()
5362{
5363free (&_etext);
5364 ;
5365 return 0;
5366}
bec39cab 5367_ACEOF
81ecdfbb 5368if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5369 ac_cv_var__etext=yes
bec39cab 5370else
81ecdfbb 5371 ac_cv_var__etext=no
bec39cab 5372fi
81ecdfbb
RW
5373rm -f core conftest.err conftest.$ac_objext \
5374 conftest$ac_exeext conftest.$ac_ext
bec39cab 5375fi
81ecdfbb
RW
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5377$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5378if test $ac_cv_var__etext = yes; then
60ca704f 5379
81ecdfbb 5380$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5381
bec39cab 5382fi
81ecdfbb
RW
5383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5384$as_echo_n "checking for etext... " >&6; }
5385if test "${ac_cv_var_etext+set}" = set; then :
5386 $as_echo_n "(cached) " >&6
bec39cab 5387else
81ecdfbb 5388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5389/* end confdefs.h. */
a9322a30
TT
5390#include <stdlib.h>
5391extern char etext;
bec39cab
AC
5392
5393int
5394main ()
5395{
a9322a30 5396free (&etext);
bec39cab
AC
5397 ;
5398 return 0;
5399}
5400_ACEOF
81ecdfbb 5401if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5402 ac_cv_var_etext=yes
bec39cab 5403else
81ecdfbb 5404 ac_cv_var_etext=no
bec39cab 5405fi
81ecdfbb
RW
5406rm -f core conftest.err conftest.$ac_objext \
5407 conftest$ac_exeext conftest.$ac_ext
bec39cab 5408fi
81ecdfbb
RW
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5410$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5411if test $ac_cv_var_etext = yes; then
5412
81ecdfbb 5413$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5414
5415fi
a9322a30
TT
5416if test "$enable_profiling" = yes ; then
5417 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5418 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5419 fi
5420 PROFILE_CFLAGS=-pg
5421 OLD_CFLAGS="$CFLAGS"
5422 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5423
81ecdfbb
RW
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5425$as_echo_n "checking whether $CC supports -pg... " >&6; }
5426if test "${ac_cv_cc_supports_pg+set}" = set; then :
5427 $as_echo_n "(cached) " >&6
bec39cab 5428else
81ecdfbb 5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5430/* end confdefs.h. */
bec39cab
AC
5431
5432int
5433main ()
5434{
a9322a30 5435int x;
bec39cab
AC
5436 ;
5437 return 0;
5438}
5439_ACEOF
81ecdfbb 5440if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5441 ac_cv_cc_supports_pg=yes
bec39cab 5442else
81ecdfbb 5443 ac_cv_cc_supports_pg=no
bec39cab 5444fi
81ecdfbb 5445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5446fi
81ecdfbb
RW
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5448$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5449
a9322a30 5450 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5451 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5452 fi
bec39cab 5453
a9322a30 5454 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5455fi
5456
c16158bc
JM
5457
5458
81ecdfbb
RW
5459# Check whether --with-pkgversion was given.
5460if test "${with_pkgversion+set}" = set; then :
5461 withval=$with_pkgversion; case "$withval" in
5462 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5463 no) PKGVERSION= ;;
5464 *) PKGVERSION="($withval) " ;;
5465 esac
5466else
5467 PKGVERSION="(GDB) "
5468
81ecdfbb 5469fi
c16158bc
JM
5470
5471
5472
5473
81ecdfbb
RW
5474
5475# Check whether --with-bugurl was given.
5476if test "${with_bugurl+set}" = set; then :
5477 withval=$with_bugurl; case "$withval" in
5478 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5479 no) BUGURL=
5480 ;;
5481 *) BUGURL="$withval"
5482 ;;
5483 esac
5484else
5485 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5486
81ecdfbb
RW
5487fi
5488
c16158bc
JM
5489 case ${BUGURL} in
5490 "")
5491 REPORT_BUGS_TO=
5492 REPORT_BUGS_TEXI=
5493 ;;
5494 *)
5495 REPORT_BUGS_TO="<$BUGURL>"
5496 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5497 ;;
5498 esac;
5499
5500
5501
5502
5503cat >>confdefs.h <<_ACEOF
5504#define PKGVERSION "$PKGVERSION"
5505_ACEOF
5506
5507
5508cat >>confdefs.h <<_ACEOF
5509#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5510_ACEOF
5511
5512
bec39cab
AC
5513# --------------------- #
5514# Checks for programs. #
5515# --------------------- #
5516
5517for ac_prog in gawk mawk nawk awk
5518do
5519 # Extract the first word of "$ac_prog", so it can be a program name with args.
5520set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5522$as_echo_n "checking for $ac_word... " >&6; }
5523if test "${ac_cv_prog_AWK+set}" = set; then :
5524 $as_echo_n "(cached) " >&6
bec39cab
AC
5525else
5526 if test -n "$AWK"; then
5527 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5528else
5529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5530for as_dir in $PATH
5531do
5532 IFS=$as_save_IFS
5533 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5534 for ac_exec_ext in '' $ac_executable_extensions; do
5535 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5536 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5538 break 2
5539 fi
5540done
81ecdfbb
RW
5541 done
5542IFS=$as_save_IFS
bec39cab
AC
5543
5544fi
5545fi
5546AWK=$ac_cv_prog_AWK
5547if test -n "$AWK"; then
81ecdfbb
RW
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5549$as_echo "$AWK" >&6; }
bec39cab 5550else
81ecdfbb
RW
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552$as_echo "no" >&6; }
bec39cab
AC
5553fi
5554
bec39cab 5555
81ecdfbb 5556 test -n "$AWK" && break
bec39cab
AC
5557done
5558
c971b7fa
PA
5559# Find a good install program. We prefer a C program (faster),
5560# so one script is as good as another. But avoid the broken or
5561# incompatible versions:
5562# SysV /etc/install, /usr/sbin/install
5563# SunOS /usr/etc/install
5564# IRIX /sbin/install
5565# AIX /bin/install
5566# AmigaOS /C/install, which installs bootblocks on floppy discs
5567# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5568# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5569# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5570# OS/2's system install, which has a completely different semantic
5571# ./install, which can be erroneously created by make from ./install.sh.
5572# Reject install programs that cannot install multiple files.
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5574$as_echo_n "checking for a BSD-compatible install... " >&6; }
5575if test -z "$INSTALL"; then
5576if test "${ac_cv_path_install+set}" = set; then :
5577 $as_echo_n "(cached) " >&6
5578else
5579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582 IFS=$as_save_IFS
5583 test -z "$as_dir" && as_dir=.
5584 # Account for people who put trailing slashes in PATH elements.
5585case $as_dir/ in #((
5586 ./ | .// | /[cC]/* | \
5587 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5588 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5589 /usr/ucb/* ) ;;
5590 *)
5591 # OSF1 and SCO ODT 3.0 have their own names for install.
5592 # Don't use installbsd from OSF since it installs stuff as root
5593 # by default.
5594 for ac_prog in ginstall scoinst install; do
5595 for ac_exec_ext in '' $ac_executable_extensions; do
5596 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5597 if test $ac_prog = install &&
5598 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5599 # AIX install. It has an incompatible calling convention.
5600 :
5601 elif test $ac_prog = install &&
5602 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5603 # program-specific install script used by HP pwplus--don't use.
5604 :
5605 else
5606 rm -rf conftest.one conftest.two conftest.dir
5607 echo one > conftest.one
5608 echo two > conftest.two
5609 mkdir conftest.dir
5610 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5611 test -s conftest.one && test -s conftest.two &&
5612 test -s conftest.dir/conftest.one &&
5613 test -s conftest.dir/conftest.two
5614 then
5615 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5616 break 3
5617 fi
5618 fi
5619 fi
5620 done
5621 done
5622 ;;
5623esac
5624
5625 done
5626IFS=$as_save_IFS
5627
5628rm -rf conftest.one conftest.two conftest.dir
5629
5630fi
5631 if test "${ac_cv_path_install+set}" = set; then
5632 INSTALL=$ac_cv_path_install
5633 else
5634 # As a last resort, use the slow shell script. Don't cache a
5635 # value for INSTALL within a source directory, because that will
5636 # break other packages using the cache if that directory is
5637 # removed, or if the value is a relative name.
5638 INSTALL=$ac_install_sh
5639 fi
5640fi
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5642$as_echo "$INSTALL" >&6; }
5643
5644# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5645# It thinks the first close brace ends the variable substitution.
5646test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5647
5648test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5649
5650test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5651
81ecdfbb
RW
5652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5653$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5654LN_S=$as_ln_s
5655if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5657$as_echo "yes" >&6; }
bec39cab 5658else
81ecdfbb
RW
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5660$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5661fi
5662
5663if test -n "$ac_tool_prefix"; then
5664 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5665set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if test "${ac_cv_prog_RANLIB+set}" = set; then :
5669 $as_echo_n "(cached) " >&6
bec39cab
AC
5670else
5671 if test -n "$RANLIB"; then
5672 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5673else
5674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677 IFS=$as_save_IFS
5678 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5679 for ac_exec_ext in '' $ac_executable_extensions; do
5680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5681 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5683 break 2
5684 fi
5685done
81ecdfbb
RW
5686 done
5687IFS=$as_save_IFS
bec39cab
AC
5688
5689fi
5690fi
5691RANLIB=$ac_cv_prog_RANLIB
5692if test -n "$RANLIB"; then
81ecdfbb
RW
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5694$as_echo "$RANLIB" >&6; }
bec39cab 5695else
81ecdfbb
RW
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
bec39cab
AC
5698fi
5699
81ecdfbb 5700
bec39cab
AC
5701fi
5702if test -z "$ac_cv_prog_RANLIB"; then
5703 ac_ct_RANLIB=$RANLIB
5704 # Extract the first word of "ranlib", so it can be a program name with args.
5705set dummy ranlib; ac_word=$2
81ecdfbb
RW
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
5708if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5709 $as_echo_n "(cached) " >&6
bec39cab
AC
5710else
5711 if test -n "$ac_ct_RANLIB"; then
5712 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5719 for ac_exec_ext in '' $ac_executable_extensions; do
5720 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5721 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5723 break 2
5724 fi
5725done
81ecdfbb
RW
5726 done
5727IFS=$as_save_IFS
bec39cab 5728
bec39cab
AC
5729fi
5730fi
5731ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5732if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5734$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5735else
81ecdfbb
RW
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
bec39cab
AC
5738fi
5739
81ecdfbb
RW
5740 if test "x$ac_ct_RANLIB" = x; then
5741 RANLIB=":"
5742 else
5743 case $cross_compiling:$ac_tool_warned in
5744yes:)
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5747ac_tool_warned=yes ;;
5748esac
5749 RANLIB=$ac_ct_RANLIB
5750 fi
bec39cab
AC
5751else
5752 RANLIB="$ac_cv_prog_RANLIB"
5753fi
5754
5755for ac_prog in 'bison -y' byacc
5756do
5757 # Extract the first word of "$ac_prog", so it can be a program name with args.
5758set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760$as_echo_n "checking for $ac_word... " >&6; }
5761if test "${ac_cv_prog_YACC+set}" = set; then :
5762 $as_echo_n "(cached) " >&6
bec39cab
AC
5763else
5764 if test -n "$YACC"; then
5765 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5766else
5767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770 IFS=$as_save_IFS
5771 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5772 for ac_exec_ext in '' $ac_executable_extensions; do
5773 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5774 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5776 break 2
5777 fi
5778done
81ecdfbb
RW
5779 done
5780IFS=$as_save_IFS
bec39cab
AC
5781
5782fi
5783fi
5784YACC=$ac_cv_prog_YACC
5785if test -n "$YACC"; then
81ecdfbb
RW
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5787$as_echo "$YACC" >&6; }
bec39cab 5788else
81ecdfbb
RW
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790$as_echo "no" >&6; }
bec39cab
AC
5791fi
5792
81ecdfbb 5793
bec39cab
AC
5794 test -n "$YACC" && break
5795done
5796test -n "$YACC" || YACC="yacc"
5797
5798
5799if test -n "$ac_tool_prefix"; then
5800 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5801set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
5804if test "${ac_cv_prog_AR+set}" = set; then :
5805 $as_echo_n "(cached) " >&6
bec39cab
AC
5806else
5807 if test -n "$AR"; then
5808 ac_cv_prog_AR="$AR" # Let the user override the test.
5809else
5810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5811for as_dir in $PATH
5812do
5813 IFS=$as_save_IFS
5814 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5815 for ac_exec_ext in '' $ac_executable_extensions; do
5816 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5817 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5819 break 2
5820 fi
5821done
81ecdfbb
RW
5822 done
5823IFS=$as_save_IFS
bec39cab
AC
5824
5825fi
5826fi
5827AR=$ac_cv_prog_AR
5828if test -n "$AR"; then
81ecdfbb
RW
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5830$as_echo "$AR" >&6; }
bec39cab 5831else
81ecdfbb
RW
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
bec39cab
AC
5834fi
5835
81ecdfbb 5836
bec39cab
AC
5837fi
5838if test -z "$ac_cv_prog_AR"; then
5839 ac_ct_AR=$AR
5840 # Extract the first word of "ar", so it can be a program name with args.
5841set dummy ar; ac_word=$2
81ecdfbb
RW
5842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5843$as_echo_n "checking for $ac_word... " >&6; }
5844if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5845 $as_echo_n "(cached) " >&6
bec39cab
AC
5846else
5847 if test -n "$ac_ct_AR"; then
5848 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5849else
5850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853 IFS=$as_save_IFS
5854 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5855 for ac_exec_ext in '' $ac_executable_extensions; do
5856 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5857 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5859 break 2
5860 fi
5861done
81ecdfbb
RW
5862 done
5863IFS=$as_save_IFS
bec39cab
AC
5864
5865fi
5866fi
5867ac_ct_AR=$ac_cv_prog_ac_ct_AR
5868if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5870$as_echo "$ac_ct_AR" >&6; }
bec39cab 5871else
81ecdfbb
RW
5872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
bec39cab
AC
5874fi
5875
81ecdfbb
RW
5876 if test "x$ac_ct_AR" = x; then
5877 AR=""
5878 else
5879 case $cross_compiling:$ac_tool_warned in
5880yes:)
5881{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5882$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5883ac_tool_warned=yes ;;
5884esac
5885 AR=$ac_ct_AR
5886 fi
bec39cab
AC
5887else
5888 AR="$ac_cv_prog_AR"
5889fi
5890
5891if test -n "$ac_tool_prefix"; then
5892 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5893set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5897 $as_echo_n "(cached) " >&6
bec39cab
AC
5898else
5899 if test -n "$DLLTOOL"; then
5900 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5901else
5902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905 IFS=$as_save_IFS
5906 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5907 for ac_exec_ext in '' $ac_executable_extensions; do
5908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5909 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5911 break 2
5912 fi
5913done
81ecdfbb
RW
5914 done
5915IFS=$as_save_IFS
bec39cab
AC
5916
5917fi
5918fi
5919DLLTOOL=$ac_cv_prog_DLLTOOL
5920if test -n "$DLLTOOL"; then
81ecdfbb
RW
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5922$as_echo "$DLLTOOL" >&6; }
bec39cab 5923else
81ecdfbb
RW
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
bec39cab
AC
5926fi
5927
81ecdfbb 5928
bec39cab
AC
5929fi
5930if test -z "$ac_cv_prog_DLLTOOL"; then
5931 ac_ct_DLLTOOL=$DLLTOOL
5932 # Extract the first word of "dlltool", so it can be a program name with args.
5933set dummy dlltool; ac_word=$2
81ecdfbb
RW
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5935$as_echo_n "checking for $ac_word... " >&6; }
5936if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5937 $as_echo_n "(cached) " >&6
bec39cab
AC
5938else
5939 if test -n "$ac_ct_DLLTOOL"; then
5940 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5941else
5942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5943for as_dir in $PATH
5944do
5945 IFS=$as_save_IFS
5946 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5947 for ac_exec_ext in '' $ac_executable_extensions; do
5948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5949 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5951 break 2
5952 fi
5953done
81ecdfbb
RW
5954 done
5955IFS=$as_save_IFS
bec39cab
AC
5956
5957fi
5958fi
5959ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5960if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5962$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 5963else
81ecdfbb
RW
5964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5965$as_echo "no" >&6; }
bec39cab
AC
5966fi
5967
81ecdfbb
RW
5968 if test "x$ac_ct_DLLTOOL" = x; then
5969 DLLTOOL=""
5970 else
5971 case $cross_compiling:$ac_tool_warned in
5972yes:)
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5974$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5975ac_tool_warned=yes ;;
5976esac
5977 DLLTOOL=$ac_ct_DLLTOOL
5978 fi
bec39cab
AC
5979else
5980 DLLTOOL="$ac_cv_prog_DLLTOOL"
5981fi
5982
5983if test -n "$ac_tool_prefix"; then
5984 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
5985set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if test "${ac_cv_prog_WINDRES+set}" = set; then :
5989 $as_echo_n "(cached) " >&6
bec39cab
AC
5990else
5991 if test -n "$WINDRES"; then
5992 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5999 for ac_exec_ext in '' $ac_executable_extensions; do
6000 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6001 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6003 break 2
6004 fi
6005done
81ecdfbb
RW
6006 done
6007IFS=$as_save_IFS
bec39cab
AC
6008
6009fi
6010fi
6011WINDRES=$ac_cv_prog_WINDRES
6012if test -n "$WINDRES"; then
81ecdfbb
RW
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6014$as_echo "$WINDRES" >&6; }
bec39cab 6015else
81ecdfbb
RW
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
bec39cab
AC
6018fi
6019
81ecdfbb 6020
bec39cab
AC
6021fi
6022if test -z "$ac_cv_prog_WINDRES"; then
6023 ac_ct_WINDRES=$WINDRES
6024 # Extract the first word of "windres", so it can be a program name with args.
6025set dummy windres; ac_word=$2
81ecdfbb
RW
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
6028if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6029 $as_echo_n "(cached) " >&6
bec39cab
AC
6030else
6031 if test -n "$ac_ct_WINDRES"; then
6032 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6039 for ac_exec_ext in '' $ac_executable_extensions; do
6040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6041 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6043 break 2
6044 fi
6045done
81ecdfbb
RW
6046 done
6047IFS=$as_save_IFS
bec39cab
AC
6048
6049fi
6050fi
6051ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6052if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6054$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6055else
81ecdfbb
RW
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
c906108c 6058fi
bec39cab 6059
81ecdfbb
RW
6060 if test "x$ac_ct_WINDRES" = x; then
6061 WINDRES=""
6062 else
6063 case $cross_compiling:$ac_tool_warned in
6064yes:)
6065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6067ac_tool_warned=yes ;;
6068esac
6069 WINDRES=$ac_ct_WINDRES
6070 fi
c906108c 6071else
bec39cab 6072 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6073fi
6074
bec39cab
AC
6075
6076# Needed for GNU/Hurd.
6077if test -n "$ac_tool_prefix"; then
6078 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6079set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6081$as_echo_n "checking for $ac_word... " >&6; }
6082if test "${ac_cv_prog_MIG+set}" = set; then :
6083 $as_echo_n "(cached) " >&6
c906108c 6084else
bec39cab
AC
6085 if test -n "$MIG"; then
6086 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6087else
6088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089for as_dir in $PATH
6090do
6091 IFS=$as_save_IFS
6092 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6093 for ac_exec_ext in '' $ac_executable_extensions; do
6094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6095 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6097 break 2
6098 fi
6099done
81ecdfbb
RW
6100 done
6101IFS=$as_save_IFS
bec39cab 6102
c906108c 6103fi
bec39cab
AC
6104fi
6105MIG=$ac_cv_prog_MIG
6106if test -n "$MIG"; then
81ecdfbb
RW
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6108$as_echo "$MIG" >&6; }
c906108c 6109else
81ecdfbb
RW
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111$as_echo "no" >&6; }
c906108c
SS
6112fi
6113
81ecdfbb 6114
bec39cab
AC
6115fi
6116if test -z "$ac_cv_prog_MIG"; then
6117 ac_ct_MIG=$MIG
6118 # Extract the first word of "mig", so it can be a program name with args.
6119set dummy mig; ac_word=$2
81ecdfbb
RW
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6121$as_echo_n "checking for $ac_word... " >&6; }
6122if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6123 $as_echo_n "(cached) " >&6
bec39cab
AC
6124else
6125 if test -n "$ac_ct_MIG"; then
6126 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6127else
6128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131 IFS=$as_save_IFS
6132 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6133 for ac_exec_ext in '' $ac_executable_extensions; do
6134 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6135 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6137 break 2
6138 fi
6139done
81ecdfbb
RW
6140 done
6141IFS=$as_save_IFS
c906108c 6142
bec39cab
AC
6143fi
6144fi
6145ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6146if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6148$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6149else
81ecdfbb
RW
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
bec39cab 6152fi
c906108c 6153
81ecdfbb
RW
6154 if test "x$ac_ct_MIG" = x; then
6155 MIG=""
6156 else
6157 case $cross_compiling:$ac_tool_warned in
6158yes:)
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6161ac_tool_warned=yes ;;
6162esac
6163 MIG=$ac_ct_MIG
6164 fi
bec39cab
AC
6165else
6166 MIG="$ac_cv_prog_MIG"
6167fi
c906108c 6168
c906108c 6169
bec39cab
AC
6170# ---------------------- #
6171# Checks for libraries. #
6172# ---------------------- #
c906108c 6173
bec39cab 6174# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6176$as_echo_n "checking for main in -lm... " >&6; }
6177if test "${ac_cv_lib_m_main+set}" = set; then :
6178 $as_echo_n "(cached) " >&6
bec39cab
AC
6179else
6180 ac_check_lib_save_LIBS=$LIBS
6181LIBS="-lm $LIBS"
81ecdfbb 6182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6183/* end confdefs.h. */
c906108c 6184
c906108c 6185
bec39cab
AC
6186int
6187main ()
6188{
81ecdfbb 6189return main ();
bec39cab
AC
6190 ;
6191 return 0;
6192}
6193_ACEOF
81ecdfbb 6194if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6195 ac_cv_lib_m_main=yes
6196else
81ecdfbb 6197 ac_cv_lib_m_main=no
bec39cab 6198fi
81ecdfbb
RW
6199rm -f core conftest.err conftest.$ac_objext \
6200 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6201LIBS=$ac_check_lib_save_LIBS
6202fi
81ecdfbb
RW
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6204$as_echo "$ac_cv_lib_m_main" >&6; }
6205if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6206 cat >>confdefs.h <<_ACEOF
6207#define HAVE_LIBM 1
6208_ACEOF
6209
6210 LIBS="-lm $LIBS"
c906108c 6211
c906108c 6212fi
bec39cab
AC
6213
6214
6215# We need to link with -lw to get `wctype' on Solaris before Solaris
6216# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6217# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6218# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6219ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6220if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6221
c906108c 6222else
81ecdfbb
RW
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6224$as_echo_n "checking for wctype in -lw... " >&6; }
6225if test "${ac_cv_lib_w_wctype+set}" = set; then :
6226 $as_echo_n "(cached) " >&6
bec39cab
AC
6227else
6228 ac_check_lib_save_LIBS=$LIBS
6229LIBS="-lw $LIBS"
81ecdfbb 6230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6231/* end confdefs.h. */
c906108c 6232
81ecdfbb
RW
6233/* Override any GCC internal prototype to avoid an error.
6234 Use char because int might match the return type of a GCC
6235 builtin and then its argument prototype would still apply. */
bec39cab
AC
6236#ifdef __cplusplus
6237extern "C"
6238#endif
bec39cab
AC
6239char wctype ();
6240int
6241main ()
6242{
81ecdfbb 6243return wctype ();
bec39cab
AC
6244 ;
6245 return 0;
6246}
6247_ACEOF
81ecdfbb 6248if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6249 ac_cv_lib_w_wctype=yes
6250else
81ecdfbb 6251 ac_cv_lib_w_wctype=no
bec39cab 6252fi
81ecdfbb
RW
6253rm -f core conftest.err conftest.$ac_objext \
6254 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6255LIBS=$ac_check_lib_save_LIBS
6256fi
81ecdfbb
RW
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6258$as_echo "$ac_cv_lib_w_wctype" >&6; }
6259if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6260 cat >>confdefs.h <<_ACEOF
6261#define HAVE_LIBW 1
6262_ACEOF
c906108c 6263
bec39cab 6264 LIBS="-lw $LIBS"
c906108c 6265
bec39cab 6266fi
c906108c 6267
bec39cab 6268fi
c906108c 6269
ddc9cd0f 6270
bec39cab 6271# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6273$as_echo_n "checking for library containing gethostbyname... " >&6; }
6274if test "${ac_cv_search_gethostbyname+set}" = set; then :
6275 $as_echo_n "(cached) " >&6
bec39cab
AC
6276else
6277 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6279/* end confdefs.h. */
ddc9cd0f 6280
81ecdfbb
RW
6281/* Override any GCC internal prototype to avoid an error.
6282 Use char because int might match the return type of a GCC
6283 builtin and then its argument prototype would still apply. */
bec39cab
AC
6284#ifdef __cplusplus
6285extern "C"
6286#endif
bec39cab
AC
6287char gethostbyname ();
6288int
6289main ()
6290{
81ecdfbb 6291return gethostbyname ();
bec39cab
AC
6292 ;
6293 return 0;
6294}
6295_ACEOF
81ecdfbb
RW
6296for ac_lib in '' nsl; do
6297 if test -z "$ac_lib"; then
6298 ac_res="none required"
6299 else
6300 ac_res=-l$ac_lib
b4e70030 6301 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6302 fi
6303 if ac_fn_c_try_link "$LINENO"; then :
6304 ac_cv_search_gethostbyname=$ac_res
6305fi
6306rm -f core conftest.err conftest.$ac_objext \
6307 conftest$ac_exeext
6308 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6309 break
6310fi
6311done
6312if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6313
bec39cab 6314else
81ecdfbb 6315 ac_cv_search_gethostbyname=no
bec39cab 6316fi
81ecdfbb 6317rm conftest.$ac_ext
bec39cab
AC
6318LIBS=$ac_func_search_save_LIBS
6319fi
81ecdfbb
RW
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6321$as_echo "$ac_cv_search_gethostbyname" >&6; }
6322ac_res=$ac_cv_search_gethostbyname
6323if test "$ac_res" != no; then :
6324 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6325
bec39cab 6326fi
96baa820 6327
c906108c 6328
b4e70030 6329# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6331$as_echo_n "checking for library containing socketpair... " >&6; }
6332if test "${ac_cv_search_socketpair+set}" = set; then :
6333 $as_echo_n "(cached) " >&6
b4e70030
JB
6334else
6335 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6337/* end confdefs.h. */
6338
81ecdfbb
RW
6339/* Override any GCC internal prototype to avoid an error.
6340 Use char because int might match the return type of a GCC
6341 builtin and then its argument prototype would still apply. */
b4e70030
JB
6342#ifdef __cplusplus
6343extern "C"
6344#endif
b4e70030
JB
6345char socketpair ();
6346int
6347main ()
6348{
81ecdfbb 6349return socketpair ();
b4e70030
JB
6350 ;
6351 return 0;
6352}
6353_ACEOF
81ecdfbb
RW
6354for ac_lib in '' socket; do
6355 if test -z "$ac_lib"; then
6356 ac_res="none required"
6357 else
6358 ac_res=-l$ac_lib
b4e70030 6359 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6360 fi
6361 if ac_fn_c_try_link "$LINENO"; then :
6362 ac_cv_search_socketpair=$ac_res
6363fi
6364rm -f core conftest.err conftest.$ac_objext \
6365 conftest$ac_exeext
6366 if test "${ac_cv_search_socketpair+set}" = set; then :
6367 break
6368fi
6369done
6370if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6371
b4e70030 6372else
81ecdfbb 6373 ac_cv_search_socketpair=no
b4e70030 6374fi
81ecdfbb 6375rm conftest.$ac_ext
b4e70030
JB
6376LIBS=$ac_func_search_save_LIBS
6377fi
81ecdfbb
RW
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6379$as_echo "$ac_cv_search_socketpair" >&6; }
6380ac_res=$ac_cv_search_socketpair
6381if test "$ac_res" != no; then :
6382 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6383
6384fi
6385
6386
233a11ab 6387# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6388
6389 # See if the user specified whether he wants zlib support or not.
6390
6391# Check whether --with-zlib was given.
6392if test "${with_zlib+set}" = set; then :
6393 withval=$with_zlib;
6394else
6395 with_zlib=auto
6396fi
6397
6398
6399 if test "$with_zlib" != "no"; then
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6401$as_echo_n "checking for library containing zlibVersion... " >&6; }
6402if test "${ac_cv_search_zlibVersion+set}" = set; then :
6403 $as_echo_n "(cached) " >&6
233a11ab
CS
6404else
6405 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6407/* end confdefs.h. */
6408
81ecdfbb
RW
6409/* Override any GCC internal prototype to avoid an error.
6410 Use char because int might match the return type of a GCC
233a11ab 6411 builtin and then its argument prototype would still apply. */
233a11ab
CS
6412#ifdef __cplusplus
6413extern "C"
6414#endif
233a11ab
CS
6415char zlibVersion ();
6416int
6417main ()
6418{
81ecdfbb 6419return zlibVersion ();
233a11ab
CS
6420 ;
6421 return 0;
6422}
6423_ACEOF
81ecdfbb
RW
6424for ac_lib in '' z; do
6425 if test -z "$ac_lib"; then
6426 ac_res="none required"
233a11ab 6427 else
81ecdfbb
RW
6428 ac_res=-l$ac_lib
6429 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6430 fi
81ecdfbb
RW
6431 if ac_fn_c_try_link "$LINENO"; then :
6432 ac_cv_search_zlibVersion=$ac_res
233a11ab 6433fi
81ecdfbb
RW
6434rm -f core conftest.err conftest.$ac_objext \
6435 conftest$ac_exeext
6436 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6437 break
233a11ab 6438fi
81ecdfbb
RW
6439done
6440if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6441
233a11ab 6442else
81ecdfbb 6443 ac_cv_search_zlibVersion=no
233a11ab 6444fi
81ecdfbb
RW
6445rm conftest.$ac_ext
6446LIBS=$ac_func_search_save_LIBS
233a11ab 6447fi
81ecdfbb
RW
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6449$as_echo "$ac_cv_search_zlibVersion" >&6; }
6450ac_res=$ac_cv_search_zlibVersion
6451if test "$ac_res" != no; then :
6452 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6453 for ac_header in zlib.h
6454do :
6455 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6456if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6457 cat >>confdefs.h <<_ACEOF
81ecdfbb 6458#define HAVE_ZLIB_H 1
233a11ab
CS
6459_ACEOF
6460
6461fi
6462
6463done
6464
6465fi
6466
b040ad30
JB
6467 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6468 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6469 fi
6470 fi
6471
233a11ab 6472
77f120bf 6473# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6475$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6476if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6477 $as_echo_n "(cached) " >&6
bec39cab
AC
6478else
6479 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6481/* end confdefs.h. */
c906108c 6482
81ecdfbb
RW
6483/* Override any GCC internal prototype to avoid an error.
6484 Use char because int might match the return type of a GCC
6485 builtin and then its argument prototype would still apply. */
bec39cab
AC
6486#ifdef __cplusplus
6487extern "C"
6488#endif
77f120bf 6489char dlgetmodinfo ();
bec39cab
AC
6490int
6491main ()
6492{
81ecdfbb 6493return dlgetmodinfo ();
bec39cab
AC
6494 ;
6495 return 0;
6496}
6497_ACEOF
81ecdfbb
RW
6498for ac_lib in '' dl xpdl; do
6499 if test -z "$ac_lib"; then
6500 ac_res="none required"
6501 else
6502 ac_res=-l$ac_lib
b4e70030 6503 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6504 fi
6505 if ac_fn_c_try_link "$LINENO"; then :
6506 ac_cv_search_dlgetmodinfo=$ac_res
6507fi
6508rm -f core conftest.err conftest.$ac_objext \
6509 conftest$ac_exeext
6510 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6511 break
6512fi
6513done
6514if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6515
4e8d927d 6516else
81ecdfbb 6517 ac_cv_search_dlgetmodinfo=no
1ba607ad 6518fi
81ecdfbb 6519rm conftest.$ac_ext
bec39cab
AC
6520LIBS=$ac_func_search_save_LIBS
6521fi
81ecdfbb
RW
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6523$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6524ac_res=$ac_cv_search_dlgetmodinfo
6525if test "$ac_res" != no; then :
6526 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6527
8bb2c122 6528fi
8bb2c122 6529
8bb2c122 6530
77f120bf 6531
77f120bf 6532
6c7a06a3 6533
81ecdfbb
RW
6534# Check whether --with-libiconv-prefix was given.
6535if test "${with_libiconv_prefix+set}" = set; then :
6536 withval=$with_libiconv_prefix;
6c7a06a3 6537 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6538 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6539 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6540 done
6541
81ecdfbb
RW
6542fi
6543
6c7a06a3 6544
f18c4681 6545 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6546 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6547
81ecdfbb
RW
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6549$as_echo_n "checking for iconv... " >&6; }
6550if test "${am_cv_func_iconv+set}" = set; then :
6551 $as_echo_n "(cached) " >&6
d542061a 6552else
6c7a06a3
TT
6553
6554 am_cv_func_iconv="no, consider installing GNU libiconv"
6555 am_cv_lib_iconv=no
6556 am_cv_use_build_libiconv=no
f0f20949 6557 am_cv_build_libiconv_path=
4edb1e84
JB
6558
6559 # If libiconv is part of the build tree, then try using it over
6560 # any system iconv.
6561 if test -d ../libiconv; then
f18c4681
JB
6562 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6563 am_save_LIBS="$LIBS"
6564 am_save_CPPFLAGS="$CPPFLAGS"
6565 LIBS="$LIBS $lib_dir/libiconv.a"
6566 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6568/* end confdefs.h. */
6c7a06a3
TT
6569#include <stdlib.h>
6570#include <iconv.h>
d542061a
UW
6571int
6572main ()
6573{
6c7a06a3 6574iconv_t cd = iconv_open("","");
f18c4681
JB
6575 iconv(cd,NULL,NULL,NULL,NULL);
6576 iconv_close(cd);
d542061a
UW
6577 ;
6578 return 0;
6579}
6580_ACEOF
81ecdfbb 6581if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6582 am_cv_use_build_libiconv=yes
f0f20949 6583 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6584 am_cv_lib_iconv=yes
6585 am_cv_func_iconv=yes
d542061a 6586fi
81ecdfbb
RW
6587rm -f core conftest.err conftest.$ac_objext \
6588 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6589 LIBS="$am_save_LIBS"
6590 CPPFLAGS="$am_save_CPPFLAGS"
6591 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6592 break
6593 fi
6594 done
4edb1e84 6595 fi
94ae1714 6596
4edb1e84 6597 # Next, try to find iconv in libc.
6c7a06a3 6598 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6600/* end confdefs.h. */
6c7a06a3
TT
6601#include <stdlib.h>
6602#include <iconv.h>
d542061a
UW
6603int
6604main ()
6605{
6c7a06a3
TT
6606iconv_t cd = iconv_open("","");
6607 iconv(cd,NULL,NULL,NULL,NULL);
6608 iconv_close(cd);
d542061a
UW
6609 ;
6610 return 0;
6611}
6612_ACEOF
81ecdfbb 6613if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6614 am_cv_func_iconv=yes
d542061a 6615fi
81ecdfbb
RW
6616rm -f core conftest.err conftest.$ac_objext \
6617 conftest$ac_exeext conftest.$ac_ext
77f120bf 6618 fi
94ae1714 6619
4edb1e84
JB
6620 # If iconv was not in libc, try -liconv. In this case, arrange to
6621 # look in the libiconv prefix, if it was specified by the user.
6622 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6623 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6624 am_save_LIBS="$LIBS"
6625 if test -n "$LIBICONV_INCLUDE"; then
6626 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6627 LIBS="$LIBS $LIBICONV_LIBDIR"
6628 fi
6629 LIBS="$LIBS -liconv"
81ecdfbb 6630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6631/* end confdefs.h. */
6c7a06a3
TT
6632#include <stdlib.h>
6633#include <iconv.h>
bec39cab
AC
6634int
6635main ()
6636{
6c7a06a3
TT
6637iconv_t cd = iconv_open("","");
6638 iconv(cd,NULL,NULL,NULL,NULL);
6639 iconv_close(cd);
bec39cab
AC
6640 ;
6641 return 0;
6642}
6643_ACEOF
81ecdfbb 6644if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6645 am_cv_lib_iconv=yes
6c7a06a3 6646 am_cv_func_iconv=yes
627af7ea 6647fi
81ecdfbb
RW
6648rm -f core conftest.err conftest.$ac_objext \
6649 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6650 LIBS="$am_save_LIBS"
fc3b640d 6651 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6652 fi
6653
6654fi
81ecdfbb
RW
6655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6656$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6657
6658 # Set the various flags based on the cache variables. We can't rely
6659 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6660 LIBICONV=
6661 if test "$am_cv_lib_iconv" = yes; then
6662 LIBICONV="-liconv"
94ae1714
TT
6663 else
6664 LIBICONV_LIBDIR=
6665 LIBICONV_INCLUDE=
fc3b640d
TT
6666 fi
6667 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6668 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6669 LIBICONV_LIBDIR=""
fc3b640d
TT
6670 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6671 fi
6672 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6673 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6674
6c7a06a3
TT
6675 if test "$am_cv_func_iconv" = yes; then
6676
81ecdfbb 6677$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6678
81ecdfbb
RW
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6680$as_echo_n "checking for iconv declaration... " >&6; }
6681 if test "${am_cv_proto_iconv+set}" = set; then :
6682 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6683else
6684
81ecdfbb 6685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6686/* end confdefs.h. */
6687
6c7a06a3
TT
6688#include <stdlib.h>
6689#include <iconv.h>
6690extern
b4e70030 6691#ifdef __cplusplus
6c7a06a3 6692"C"
b4e70030 6693#endif
6c7a06a3
TT
6694#if defined(__STDC__) || defined(__cplusplus)
6695size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6696#else
6697size_t iconv();
6698#endif
6699
b4e70030
JB
6700int
6701main ()
6702{
6c7a06a3 6703
b4e70030
JB
6704 ;
6705 return 0;
6706}
6707_ACEOF
81ecdfbb 6708if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6709 am_cv_proto_iconv_arg1=""
4e8d927d 6710else
81ecdfbb 6711 am_cv_proto_iconv_arg1="const"
b4e70030 6712fi
81ecdfbb 6713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6714 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);"
6715fi
6716
6717 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6719 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6720$as_echo "${ac_t:-
6721 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6722
6723cat >>confdefs.h <<_ACEOF
6724#define ICONV_CONST $am_cv_proto_iconv_arg1
6725_ACEOF
6726
6727 fi
6c7a06a3
TT
6728
6729
478aac75
DE
6730# GDB may fork/exec the iconv program to get the list of supported character
6731# sets. Allow the user to specify where to find it.
6732# There are several factors affecting the choice of option name:
6733# - There is already --with-libiconv-prefix but we can't use it, it specifies
6734# the build-time location of libiconv files.
6735# - The program we need to find is iconv, which comes with glibc. The user
6736# doesn't necessarily have libiconv installed. Therefore naming this
6737# --with-libiconv-foo feels wrong.
6738# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6739# defined to work on directories not files (though it really doesn't know
6740# the difference).
6741# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6742# with --with-libiconv-prefix.
6743# Putting these together is why the option name is --with-iconv-bin.
6744
6745
6746# Check whether --with-iconv-bin was given.
6747if test "${with_iconv_bin+set}" = set; then :
6748 withval=$with_iconv_bin; iconv_bin="${withval}"
6749
6750cat >>confdefs.h <<_ACEOF
6751#define ICONV_BIN "${iconv_bin}"
6752_ACEOF
6753
6754
6755 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6756 if test "x$prefix" = xNONE; then
6757 test_prefix=/usr/local
6758 else
6759 test_prefix=$prefix
6760 fi
6761 else
6762 test_prefix=$exec_prefix
6763 fi
6764 value=0
6765 case ${iconv_bin} in
6766 "${test_prefix}"|"${test_prefix}/"*|\
6767 '${exec_prefix}'|'${exec_prefix}/'*)
6768 value=1
6769 ;;
6770 esac
6771
6772cat >>confdefs.h <<_ACEOF
6773#define ICONV_BIN_RELOCATABLE $value
6774_ACEOF
6775
6776
6777
6778fi
6779
6780
6c7a06a3
TT
6781# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6782# There is a very specific comment in /usr/include/curses.h explaining that
6783# termcap routines built into libcurses must not be used.
6784#
6785# The symptoms we observed so far is GDB unexpectedly changing
6786# the terminal settings when tgetent is called - this is particularly
6787# visible as the output is missing carriage returns, and so rapidly
6788# becomes very hard to read.
6789#
6790# The readline configure script has already decided that libtermcap
6791# was enough for its purposes, and so decided to build readline using
6792# libtermcap. Since the TUI mode requires curses, building GDB with
6793# TUI enabled results in both libraries to be used at the same time,
6794# which is not allowed. This basically means that GDB with TUI is
6795# broken on alpha-osf.
6796
6797case $host_os in
6bcc772d
RO
6798 osf* )
6799 if test x"$enable_tui" = xyes; then
81ecdfbb 6800 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6801 fi
6bcc772d 6802 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6803 enable_tui=no
6804 fi
6805 ;;
6806esac
6807
cb01cfba 6808# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6809if test x"$enable_tui" != xno; then
cb01cfba
JB
6810 prefer_curses=yes
6811fi
6812
6813curses_found=no
6814if test x"$prefer_curses" = xyes; then
6815 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6816 # curses library because the latter might not provide all the
6817 # functionality we need. However, this leads to problems on systems
6818 # where the linker searches /usr/local/lib, but the compiler doesn't
6819 # search /usr/local/include, if ncurses is installed in /usr/local. A
6820 # default installation of ncurses on alpha*-dec-osf* will lead to such
6821 # a situation.
81ecdfbb
RW
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6823$as_echo_n "checking for library containing waddstr... " >&6; }
6824if test "${ac_cv_search_waddstr+set}" = set; then :
6825 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6826else
6827 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6829/* end confdefs.h. */
6830
81ecdfbb
RW
6831/* Override any GCC internal prototype to avoid an error.
6832 Use char because int might match the return type of a GCC
6833 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6834#ifdef __cplusplus
6835extern "C"
6836#endif
6c7a06a3
TT
6837char waddstr ();
6838int
6839main ()
6840{
81ecdfbb 6841return waddstr ();
6c7a06a3
TT
6842 ;
6843 return 0;
6844}
6845_ACEOF
81ecdfbb
RW
6846for ac_lib in '' ncurses cursesX curses; do
6847 if test -z "$ac_lib"; then
6848 ac_res="none required"
6849 else
6850 ac_res=-l$ac_lib
6851 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6852 fi
6853 if ac_fn_c_try_link "$LINENO"; then :
6854 ac_cv_search_waddstr=$ac_res
6855fi
6856rm -f core conftest.err conftest.$ac_objext \
6857 conftest$ac_exeext
6858 if test "${ac_cv_search_waddstr+set}" = set; then :
6859 break
6860fi
6861done
6862if test "${ac_cv_search_waddstr+set}" = set; then :
6863
6c7a06a3 6864else
81ecdfbb
RW
6865 ac_cv_search_waddstr=no
6866fi
6867rm conftest.$ac_ext
6868LIBS=$ac_func_search_save_LIBS
6869fi
6870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6871$as_echo "$ac_cv_search_waddstr" >&6; }
6872ac_res=$ac_cv_search_waddstr
6873if test "$ac_res" != no; then :
6874 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6875
6876fi
6877
6878
cb01cfba
JB
6879 if test "$ac_cv_search_waddstr" != no; then
6880 curses_found=yes
6881 fi
6882fi
6883
6884# Check whether we should enable the TUI, but only do so if we really
6885# can.
6886if test x"$enable_tui" != xno; then
6887 if test -d $srcdir/tui; then
6888 if test "$curses_found" != no; then
6c7a06a3
TT
6889 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6890 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6891 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6892 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6893 else
6894 if test x"$enable_tui" = xyes; then
81ecdfbb 6895 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6896 else
81ecdfbb
RW
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6898$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6899 fi
6900 fi
6901 fi
6902fi
6903
6904# Since GDB uses Readline, we need termcap functionality. In many
6905# cases this will be provided by the curses library, but some systems
6906# have a seperate termcap library, or no curses library at all.
6907
6908case $host_os in
6909 cygwin*)
6910 if test -d $srcdir/libtermcap; then
6911 LIBS="../libtermcap/libtermcap.a $LIBS"
6912 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6913 fi ;;
6914 go32* | *djgpp*)
6915 ac_cv_search_tgetent="none required"
6916 ;;
6917 *mingw32*)
6918 ac_cv_search_tgetent="none required"
6919 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6920 ;;
6921esac
6922
6923# These are the libraries checked by Readline.
81ecdfbb
RW
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6925$as_echo_n "checking for library containing tgetent... " >&6; }
6926if test "${ac_cv_search_tgetent+set}" = set; then :
6927 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6928else
6929 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6931/* end confdefs.h. */
6932
81ecdfbb
RW
6933/* Override any GCC internal prototype to avoid an error.
6934 Use char because int might match the return type of a GCC
6935 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6936#ifdef __cplusplus
6937extern "C"
6938#endif
6c7a06a3
TT
6939char tgetent ();
6940int
6941main ()
6942{
81ecdfbb 6943return tgetent ();
6c7a06a3
TT
6944 ;
6945 return 0;
6946}
6947_ACEOF
81ecdfbb
RW
6948for ac_lib in '' termcap tinfo curses ncurses; do
6949 if test -z "$ac_lib"; then
6950 ac_res="none required"
6951 else
6952 ac_res=-l$ac_lib
6c7a06a3 6953 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6954 fi
6955 if ac_fn_c_try_link "$LINENO"; then :
6956 ac_cv_search_tgetent=$ac_res
6957fi
6958rm -f core conftest.err conftest.$ac_objext \
6959 conftest$ac_exeext
6960 if test "${ac_cv_search_tgetent+set}" = set; then :
6961 break
6962fi
6963done
6964if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 6965
6c7a06a3 6966else
81ecdfbb 6967 ac_cv_search_tgetent=no
6c7a06a3 6968fi
81ecdfbb 6969rm conftest.$ac_ext
6c7a06a3
TT
6970LIBS=$ac_func_search_save_LIBS
6971fi
81ecdfbb
RW
6972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
6973$as_echo "$ac_cv_search_tgetent" >&6; }
6974ac_res=$ac_cv_search_tgetent
6975if test "$ac_res" != no; then :
6976 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 6977
06825bd1
MK
6978fi
6979
06825bd1 6980
bec39cab 6981if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 6982 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
6983fi
6984
3841debe 6985
81ecdfbb
RW
6986# Check whether --with-system-readline was given.
6987if test "${with_system_readline+set}" = set; then :
6988 withval=$with_system_readline;
6989fi
6a30b0a5 6990
6a30b0a5
AS
6991
6992if test "$with_system_readline" = yes; then
6993 READLINE=-lreadline
6994 READLINE_DEPS=
6995 READLINE_CFLAGS=
39037522 6996 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
6997else
6998 READLINE='$(READLINE_DIR)/libreadline.a'
6999 READLINE_DEPS='$(READLINE)'
7000 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7001 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7002fi
7003
7004
7005
7006
7007
f997c383
SD
7008# Generate jit-reader.h
7009
7010# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7011TARGET_PTR=
7012
7013# The cast to long int works around a bug in the HP C Compiler
7014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7016# This bug is HP SR number 8606223364.
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7018$as_echo_n "checking size of unsigned long long... " >&6; }
7019if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7020 $as_echo_n "(cached) " >&6
7021else
7022 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7023
7024else
7025 if test "$ac_cv_type_unsigned_long_long" = yes; then
7026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7028{ as_fn_set_status 77
7029as_fn_error "cannot compute sizeof (unsigned long long)
7030See \`config.log' for more details." "$LINENO" 5; }; }
7031 else
7032 ac_cv_sizeof_unsigned_long_long=0
7033 fi
7034fi
7035
7036fi
7037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7038$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7039
7040
7041
7042cat >>confdefs.h <<_ACEOF
7043#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7044_ACEOF
7045
7046
7047# The cast to long int works around a bug in the HP C Compiler
7048# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7049# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7050# This bug is HP SR number 8606223364.
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7052$as_echo_n "checking size of unsigned long... " >&6; }
7053if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7054 $as_echo_n "(cached) " >&6
7055else
7056 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7057
7058else
7059 if test "$ac_cv_type_unsigned_long" = yes; then
7060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7062{ as_fn_set_status 77
7063as_fn_error "cannot compute sizeof (unsigned long)
7064See \`config.log' for more details." "$LINENO" 5; }; }
7065 else
7066 ac_cv_sizeof_unsigned_long=0
7067 fi
7068fi
7069
7070fi
7071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7072$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7073
7074
7075
7076cat >>confdefs.h <<_ACEOF
7077#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7078_ACEOF
7079
7080
7081# The cast to long int works around a bug in the HP C Compiler
7082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7084# This bug is HP SR number 8606223364.
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7086$as_echo_n "checking size of unsigned __int128... " >&6; }
7087if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7091
7092else
7093 if test "$ac_cv_type_unsigned___int128" = yes; then
7094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7096{ as_fn_set_status 77
7097as_fn_error "cannot compute sizeof (unsigned __int128)
7098See \`config.log' for more details." "$LINENO" 5; }; }
7099 else
7100 ac_cv_sizeof_unsigned___int128=0
7101 fi
7102fi
7103
7104fi
7105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7106$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7107
7108
7109
7110cat >>confdefs.h <<_ACEOF
7111#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7112_ACEOF
7113
7114
7115
7116if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7117 TARGET_PTR="unsigned long"
7118elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7119 TARGET_PTR="unsigned long long"
7120elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7121 TARGET_PTR="unsigned __int128"
7122else
7123 TARGET_PTR="unsigned long"
7124fi
7125
7126
7127ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7128
7129
a2d08b9e
SD
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7131$as_echo_n "checking for library containing dlopen... " >&6; }
7132if test "${ac_cv_search_dlopen+set}" = set; then :
7133 $as_echo_n "(cached) " >&6
7134else
7135 ac_func_search_save_LIBS=$LIBS
7136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7137/* end confdefs.h. */
7138
7139/* Override any GCC internal prototype to avoid an error.
7140 Use char because int might match the return type of a GCC
7141 builtin and then its argument prototype would still apply. */
7142#ifdef __cplusplus
7143extern "C"
7144#endif
7145char dlopen ();
7146int
7147main ()
7148{
7149return dlopen ();
7150 ;
7151 return 0;
7152}
7153_ACEOF
7154for ac_lib in '' dl; do
7155 if test -z "$ac_lib"; then
7156 ac_res="none required"
7157 else
7158 ac_res=-l$ac_lib
7159 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7160 fi
7161 if ac_fn_c_try_link "$LINENO"; then :
7162 ac_cv_search_dlopen=$ac_res
7163fi
7164rm -f core conftest.err conftest.$ac_objext \
7165 conftest$ac_exeext
7166 if test "${ac_cv_search_dlopen+set}" = set; then :
7167 break
7168fi
7169done
7170if test "${ac_cv_search_dlopen+set}" = set; then :
7171
7172else
7173 ac_cv_search_dlopen=no
7174fi
7175rm conftest.$ac_ext
7176LIBS=$ac_func_search_save_LIBS
7177fi
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7179$as_echo "$ac_cv_search_dlopen" >&6; }
7180ac_res=$ac_cv_search_dlopen
7181if test "$ac_res" != no; then :
7182 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7183
7184fi
7185
7186
39037522 7187
b8e0a31c
SD
7188
7189# Check whether --with-jit-reader-dir was given.
7190if test "${with_jit_reader_dir+set}" = set; then :
7191 withval=$with_jit_reader_dir;
7192 JIT_READER_DIR=$withval
7193else
7194 JIT_READER_DIR=${libdir}/gdb
7195fi
7196
7197
7198 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7199 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7200 ac_define_dir=`eval echo $JIT_READER_DIR`
7201 ac_define_dir=`eval echo $ac_define_dir`
7202
7203cat >>confdefs.h <<_ACEOF
7204#define JIT_READER_DIR "$ac_define_dir"
7205_ACEOF
7206
7207
7208
7209
7210 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7211 if test "x$prefix" = xNONE; then
7212 test_prefix=/usr/local
7213 else
7214 test_prefix=$prefix
7215 fi
7216 else
7217 test_prefix=$exec_prefix
7218 fi
7219 value=0
7220 case ${ac_define_dir} in
7221 "${test_prefix}"|"${test_prefix}/"*|\
7222 '${exec_prefix}'|'${exec_prefix}/'*)
7223 value=1
7224 ;;
7225 esac
7226
7227cat >>confdefs.h <<_ACEOF
7228#define JIT_READER_DIR_RELOCATABLE $value
7229_ACEOF
7230
7231
7232
7233
7234
81ecdfbb
RW
7235# Check whether --with-expat was given.
7236if test "${with_expat+set}" = set; then :
7237 withval=$with_expat;
5c39566f
DJ
7238else
7239 with_expat=auto
81ecdfbb
RW
7240fi
7241
7242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7243$as_echo_n "checking whether to use expat... " >&6; }
7244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7245$as_echo "$with_expat" >&6; }
5c39566f
DJ
7246
7247if test "${with_expat}" = no; then
81ecdfbb
RW
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7249$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7250 HAVE_LIBEXPAT=no
7251else
7252
3841debe
DJ
7253 if test "X$prefix" = "XNONE"; then
7254 acl_final_prefix="$ac_default_prefix"
7255 else
7256 acl_final_prefix="$prefix"
7257 fi
7258 if test "X$exec_prefix" = "XNONE"; then
7259 acl_final_exec_prefix='${prefix}'
7260 else
7261 acl_final_exec_prefix="$exec_prefix"
7262 fi
7263 acl_save_prefix="$prefix"
7264 prefix="$acl_final_prefix"
7265 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7266 prefix="$acl_save_prefix"
7267
7268
81ecdfbb
RW
7269# Check whether --with-gnu-ld was given.
7270if test "${with_gnu_ld+set}" = set; then :
7271 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7272else
7273 with_gnu_ld=no
81ecdfbb
RW
7274fi
7275
3841debe
DJ
7276# Prepare PATH_SEPARATOR.
7277# The user is always right.
7278if test "${PATH_SEPARATOR+set}" != set; then
7279 echo "#! /bin/sh" >conf$$.sh
7280 echo "exit 0" >>conf$$.sh
7281 chmod +x conf$$.sh
7282 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7283 PATH_SEPARATOR=';'
7284 else
7285 PATH_SEPARATOR=:
7286 fi
7287 rm -f conf$$.sh
7288fi
7289ac_prog=ld
7290if test "$GCC" = yes; then
7291 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7293$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7294 case $host in
7295 *-*-mingw*)
7296 # gcc leaves a trailing carriage return which upsets mingw
7297 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7298 *)
7299 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7300 esac
7301 case $ac_prog in
7302 # Accept absolute paths.
7303 [\\/]* | [A-Za-z]:[\\/]*)
7304 re_direlt='/[^/][^/]*/\.\./'
7305 # Canonicalize the path of ld
7306 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7307 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7308 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7309 done
7310 test -z "$LD" && LD="$ac_prog"
7311 ;;
7312 "")
7313 # If it fails, then pretend we aren't using GCC.
7314 ac_prog=ld
7315 ;;
7316 *)
7317 # If it is relative, then search for the first ld in PATH.
7318 with_gnu_ld=unknown
7319 ;;
7320 esac
7321elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7323$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7324else
81ecdfbb
RW
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7326$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7327fi
81ecdfbb
RW
7328if test "${acl_cv_path_LD+set}" = set; then :
7329 $as_echo_n "(cached) " >&6
3841debe
DJ
7330else
7331 if test -z "$LD"; then
7332 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7333 for ac_dir in $PATH; do
7334 test -z "$ac_dir" && ac_dir=.
7335 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7336 acl_cv_path_LD="$ac_dir/$ac_prog"
7337 # Check to see if the program is GNU ld. I'd rather use --version,
7338 # but apparently some GNU ld's only accept -v.
7339 # Break only if it was the GNU/non-GNU ld that we prefer.
7340 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7341 test "$with_gnu_ld" != no && break
7342 else
7343 test "$with_gnu_ld" != yes && break
7344 fi
7345 fi
7346 done
7347 IFS="$ac_save_ifs"
7348else
7349 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7350fi
7351fi
7352
7353LD="$acl_cv_path_LD"
7354if test -n "$LD"; then
81ecdfbb
RW
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7356$as_echo "$LD" >&6; }
3841debe 7357else
81ecdfbb
RW
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359$as_echo "no" >&6; }
3841debe 7360fi
81ecdfbb
RW
7361test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7363$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7364if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7365 $as_echo_n "(cached) " >&6
3841debe
DJ
7366else
7367 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7368if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7369 acl_cv_prog_gnu_ld=yes
7370else
7371 acl_cv_prog_gnu_ld=no
7372fi
7373fi
81ecdfbb
RW
7374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7375$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7376with_gnu_ld=$acl_cv_prog_gnu_ld
7377
7378
7379
81ecdfbb
RW
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7381$as_echo_n "checking for shared library run path origin... " >&6; }
7382if test "${acl_cv_rpath+set}" = set; then :
7383 $as_echo_n "(cached) " >&6
3841debe
DJ
7384else
7385
7386 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7387 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7388 . ./conftest.sh
7389 rm -f ./conftest.sh
7390 acl_cv_rpath=done
7391
7392fi
81ecdfbb
RW
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7394$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7395 wl="$acl_cv_wl"
7396 libext="$acl_cv_libext"
7397 shlibext="$acl_cv_shlibext"
7398 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7399 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7400 hardcode_direct="$acl_cv_hardcode_direct"
7401 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7402 # Check whether --enable-rpath was given.
7403if test "${enable_rpath+set}" = set; then :
7404 enableval=$enable_rpath; :
3841debe
DJ
7405else
7406 enable_rpath=yes
81ecdfbb
RW
7407fi
7408
3841debe
DJ
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418 use_additional=yes
7419
7420 acl_save_prefix="$prefix"
7421 prefix="$acl_final_prefix"
7422 acl_save_exec_prefix="$exec_prefix"
7423 exec_prefix="$acl_final_exec_prefix"
7424
7425 eval additional_includedir=\"$includedir\"
7426 eval additional_libdir=\"$libdir\"
7427
7428 exec_prefix="$acl_save_exec_prefix"
7429 prefix="$acl_save_prefix"
7430
7431
81ecdfbb
RW
7432# Check whether --with-libexpat-prefix was given.
7433if test "${with_libexpat_prefix+set}" = set; then :
7434 withval=$with_libexpat_prefix;
3841debe
DJ
7435 if test "X$withval" = "Xno"; then
7436 use_additional=no
7437 else
7438 if test "X$withval" = "X"; then
7439
7440 acl_save_prefix="$prefix"
7441 prefix="$acl_final_prefix"
7442 acl_save_exec_prefix="$exec_prefix"
7443 exec_prefix="$acl_final_exec_prefix"
7444
7445 eval additional_includedir=\"$includedir\"
7446 eval additional_libdir=\"$libdir\"
7447
7448 exec_prefix="$acl_save_exec_prefix"
7449 prefix="$acl_save_prefix"
7450
7451 else
7452 additional_includedir="$withval/include"
7453 additional_libdir="$withval/lib"
7454 fi
7455 fi
7456
81ecdfbb
RW
7457fi
7458
3841debe
DJ
7459 LIBEXPAT=
7460 LTLIBEXPAT=
7461 INCEXPAT=
7462 rpathdirs=
7463 ltrpathdirs=
7464 names_already_handled=
7465 names_next_round='expat '
7466 while test -n "$names_next_round"; do
7467 names_this_round="$names_next_round"
7468 names_next_round=
7469 for name in $names_this_round; do
7470 already_handled=
7471 for n in $names_already_handled; do
7472 if test "$n" = "$name"; then
7473 already_handled=yes
7474 break
7475 fi
7476 done
7477 if test -z "$already_handled"; then
7478 names_already_handled="$names_already_handled $name"
7479 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7480 eval value=\"\$HAVE_LIB$uppername\"
7481 if test -n "$value"; then
7482 if test "$value" = yes; then
7483 eval value=\"\$LIB$uppername\"
7484 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7485 eval value=\"\$LTLIB$uppername\"
7486 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7487 else
7488 :
7489 fi
7490 else
7491 found_dir=
7492 found_la=
7493 found_so=
7494 found_a=
7495 if test $use_additional = yes; then
7496 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7497 found_dir="$additional_libdir"
7498 found_so="$additional_libdir/lib$name.$shlibext"
7499 if test -f "$additional_libdir/lib$name.la"; then
7500 found_la="$additional_libdir/lib$name.la"
7501 fi
7502 else
7503 if test -f "$additional_libdir/lib$name.$libext"; then
7504 found_dir="$additional_libdir"
7505 found_a="$additional_libdir/lib$name.$libext"
7506 if test -f "$additional_libdir/lib$name.la"; then
7507 found_la="$additional_libdir/lib$name.la"
7508 fi
7509 fi
7510 fi
7511 fi
7512 if test "X$found_dir" = "X"; then
7513 for x in $LDFLAGS $LTLIBEXPAT; do
7514
7515 acl_save_prefix="$prefix"
7516 prefix="$acl_final_prefix"
7517 acl_save_exec_prefix="$exec_prefix"
7518 exec_prefix="$acl_final_exec_prefix"
7519 eval x=\"$x\"
7520 exec_prefix="$acl_save_exec_prefix"
7521 prefix="$acl_save_prefix"
7522
7523 case "$x" in
7524 -L*)
7525 dir=`echo "X$x" | sed -e 's/^X-L//'`
7526 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7527 found_dir="$dir"
7528 found_so="$dir/lib$name.$shlibext"
7529 if test -f "$dir/lib$name.la"; then
7530 found_la="$dir/lib$name.la"
7531 fi
7532 else
7533 if test -f "$dir/lib$name.$libext"; then
7534 found_dir="$dir"
7535 found_a="$dir/lib$name.$libext"
7536 if test -f "$dir/lib$name.la"; then
7537 found_la="$dir/lib$name.la"
7538 fi
7539 fi
7540 fi
7541 ;;
7542 esac
7543 if test "X$found_dir" != "X"; then
7544 break
7545 fi
7546 done
7547 fi
7548 if test "X$found_dir" != "X"; then
7549 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7550 if test "X$found_so" != "X"; then
7551 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7552 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7553 else
7554 haveit=
7555 for x in $ltrpathdirs; do
7556 if test "X$x" = "X$found_dir"; then
7557 haveit=yes
7558 break
7559 fi
7560 done
7561 if test -z "$haveit"; then
7562 ltrpathdirs="$ltrpathdirs $found_dir"
7563 fi
7564 if test "$hardcode_direct" = yes; then
7565 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7566 else
7567 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7568 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7569 haveit=
7570 for x in $rpathdirs; do
7571 if test "X$x" = "X$found_dir"; then
7572 haveit=yes
7573 break
7574 fi
7575 done
7576 if test -z "$haveit"; then
7577 rpathdirs="$rpathdirs $found_dir"
7578 fi
7579 else
7580 haveit=
7581 for x in $LDFLAGS $LIBEXPAT; do
7582
7583 acl_save_prefix="$prefix"
7584 prefix="$acl_final_prefix"
7585 acl_save_exec_prefix="$exec_prefix"
7586 exec_prefix="$acl_final_exec_prefix"
7587 eval x=\"$x\"
7588 exec_prefix="$acl_save_exec_prefix"
7589 prefix="$acl_save_prefix"
7590
7591 if test "X$x" = "X-L$found_dir"; then
7592 haveit=yes
7593 break
7594 fi
7595 done
7596 if test -z "$haveit"; then
7597 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7598 fi
7599 if test "$hardcode_minus_L" != no; then
7600 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7601 else
7602 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7603 fi
7604 fi
7605 fi
7606 fi
7607 else
7608 if test "X$found_a" != "X"; then
7609 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7610 else
7611 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7612 fi
7613 fi
7614 additional_includedir=
7615 case "$found_dir" in
7616 */lib | */lib/)
7617 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7618 additional_includedir="$basedir/include"
7619 ;;
7620 esac
7621 if test "X$additional_includedir" != "X"; then
7622 if test "X$additional_includedir" != "X/usr/include"; then
7623 haveit=
7624 if test "X$additional_includedir" = "X/usr/local/include"; then
7625 if test -n "$GCC"; then
7626 case $host_os in
7627 linux*) haveit=yes;;
7628 esac
7629 fi
7630 fi
7631 if test -z "$haveit"; then
7632 for x in $CPPFLAGS $INCEXPAT; do
7633
7634 acl_save_prefix="$prefix"
7635 prefix="$acl_final_prefix"
7636 acl_save_exec_prefix="$exec_prefix"
7637 exec_prefix="$acl_final_exec_prefix"
7638 eval x=\"$x\"
7639 exec_prefix="$acl_save_exec_prefix"
7640 prefix="$acl_save_prefix"
7641
7642 if test "X$x" = "X-I$additional_includedir"; then
7643 haveit=yes
7644 break
7645 fi
7646 done
7647 if test -z "$haveit"; then
7648 if test -d "$additional_includedir"; then
7649 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7650 fi
7651 fi
7652 fi
7653 fi
7654 fi
7655 if test -n "$found_la"; then
7656 save_libdir="$libdir"
7657 case "$found_la" in
7658 */* | *\\*) . "$found_la" ;;
7659 *) . "./$found_la" ;;
7660 esac
7661 libdir="$save_libdir"
7662 for dep in $dependency_libs; do
7663 case "$dep" in
7664 -L*)
7665 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7666 if test "X$additional_libdir" != "X/usr/lib"; then
7667 haveit=
7668 if test "X$additional_libdir" = "X/usr/local/lib"; then
7669 if test -n "$GCC"; then
7670 case $host_os in
7671 linux*) haveit=yes;;
7672 esac
7673 fi
7674 fi
7675 if test -z "$haveit"; then
7676 haveit=
7677 for x in $LDFLAGS $LIBEXPAT; do
7678
7679 acl_save_prefix="$prefix"
7680 prefix="$acl_final_prefix"
7681 acl_save_exec_prefix="$exec_prefix"
7682 exec_prefix="$acl_final_exec_prefix"
7683 eval x=\"$x\"
7684 exec_prefix="$acl_save_exec_prefix"
7685 prefix="$acl_save_prefix"
7686
7687 if test "X$x" = "X-L$additional_libdir"; then
7688 haveit=yes
7689 break
7690 fi
7691 done
7692 if test -z "$haveit"; then
7693 if test -d "$additional_libdir"; then
7694 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7695 fi
7696 fi
7697 haveit=
7698 for x in $LDFLAGS $LTLIBEXPAT; do
7699
7700 acl_save_prefix="$prefix"
7701 prefix="$acl_final_prefix"
7702 acl_save_exec_prefix="$exec_prefix"
7703 exec_prefix="$acl_final_exec_prefix"
7704 eval x=\"$x\"
7705 exec_prefix="$acl_save_exec_prefix"
7706 prefix="$acl_save_prefix"
7707
7708 if test "X$x" = "X-L$additional_libdir"; then
7709 haveit=yes
7710 break
7711 fi
7712 done
7713 if test -z "$haveit"; then
7714 if test -d "$additional_libdir"; then
7715 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7716 fi
7717 fi
7718 fi
7719 fi
7720 ;;
7721 -R*)
7722 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7723 if test "$enable_rpath" != no; then
7724 haveit=
7725 for x in $rpathdirs; do
7726 if test "X$x" = "X$dir"; then
7727 haveit=yes
7728 break
7729 fi
7730 done
7731 if test -z "$haveit"; then
7732 rpathdirs="$rpathdirs $dir"
7733 fi
7734 haveit=
7735 for x in $ltrpathdirs; do
7736 if test "X$x" = "X$dir"; then
7737 haveit=yes
7738 break
7739 fi
7740 done
7741 if test -z "$haveit"; then
7742 ltrpathdirs="$ltrpathdirs $dir"
7743 fi
7744 fi
7745 ;;
7746 -l*)
7747 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7748 ;;
7749 *.la)
7750 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7751 ;;
7752 *)
7753 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7754 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7755 ;;
81ecdfbb
RW
7756 esac
7757 done
7758 fi
7759 else
7760 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7761 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7762 fi
7763 fi
7764 fi
7765 done
7766 done
7767 if test "X$rpathdirs" != "X"; then
7768 if test -n "$hardcode_libdir_separator"; then
7769 alldirs=
7770 for found_dir in $rpathdirs; do
7771 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7772 done
7773 acl_save_libdir="$libdir"
7774 libdir="$alldirs"
7775 eval flag=\"$hardcode_libdir_flag_spec\"
7776 libdir="$acl_save_libdir"
7777 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7778 else
7779 for found_dir in $rpathdirs; do
7780 acl_save_libdir="$libdir"
7781 libdir="$found_dir"
7782 eval flag=\"$hardcode_libdir_flag_spec\"
7783 libdir="$acl_save_libdir"
7784 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7785 done
7786 fi
7787 fi
7788 if test "X$ltrpathdirs" != "X"; then
7789 for found_dir in $ltrpathdirs; do
7790 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7791 done
7792 fi
a9322a30
TT
7793
7794
81ecdfbb 7795 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7796
81ecdfbb
RW
7797 for element in $INCEXPAT; do
7798 haveit=
7799 for x in $CPPFLAGS; do
a9322a30 7800
81ecdfbb
RW
7801 acl_save_prefix="$prefix"
7802 prefix="$acl_final_prefix"
7803 acl_save_exec_prefix="$exec_prefix"
7804 exec_prefix="$acl_final_exec_prefix"
7805 eval x=\"$x\"
7806 exec_prefix="$acl_save_exec_prefix"
7807 prefix="$acl_save_prefix"
a8111142 7808
81ecdfbb
RW
7809 if test "X$x" = "X$element"; then
7810 haveit=yes
7811 break
7812 fi
7813 done
7814 if test -z "$haveit"; then
7815 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7816 fi
7817 done
a9322a30
TT
7818
7819
81ecdfbb
RW
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7821$as_echo_n "checking for libexpat... " >&6; }
7822if test "${ac_cv_libexpat+set}" = set; then :
7823 $as_echo_n "(cached) " >&6
bec39cab 7824else
bec39cab 7825
81ecdfbb
RW
7826 ac_save_LIBS="$LIBS"
7827 LIBS="$LIBS $LIBEXPAT"
7828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7829/* end confdefs.h. */
81ecdfbb
RW
7830#include "expat.h"
7831int
7832main ()
7833{
7834XML_Parser p = XML_ParserCreate (0);
7835 ;
7836 return 0;
7837}
bec39cab 7838_ACEOF
81ecdfbb
RW
7839if ac_fn_c_try_link "$LINENO"; then :
7840 ac_cv_libexpat=yes
c906108c 7841else
81ecdfbb 7842 ac_cv_libexpat=no
bec39cab 7843fi
81ecdfbb
RW
7844rm -f core conftest.err conftest.$ac_objext \
7845 conftest$ac_exeext conftest.$ac_ext
7846 LIBS="$ac_save_LIBS"
c906108c 7847
95ca63c4 7848fi
81ecdfbb
RW
7849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7850$as_echo "$ac_cv_libexpat" >&6; }
7851 if test "$ac_cv_libexpat" = yes; then
7852 HAVE_LIBEXPAT=yes
bec39cab 7853
81ecdfbb 7854$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7855
81ecdfbb
RW
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7857$as_echo_n "checking how to link with libexpat... " >&6; }
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7859$as_echo "$LIBEXPAT" >&6; }
7860 else
7861 HAVE_LIBEXPAT=no
7862 CPPFLAGS="$ac_save_CPPFLAGS"
7863 LIBEXPAT=
7864 LTLIBEXPAT=
7865 fi
95ca63c4
CF
7866
7867
7868
7cb9022a
MK
7869
7870
bec39cab 7871
81ecdfbb
RW
7872 if test "$HAVE_LIBEXPAT" != yes; then
7873 if test "$with_expat" = yes; then
7874 as_fn_error "expat is missing or unusable" "$LINENO" 5
7875 else
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7877$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7878 fi
7879 else
7880 save_LIBS=$LIBS
7881 LIBS="$LIBS $LIBEXPAT"
7882 for ac_func in XML_StopParser
7883do :
7884 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7885if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7886 cat >>confdefs.h <<_ACEOF
81ecdfbb 7887#define HAVE_XML_STOPPARSER 1
bec39cab 7888_ACEOF
95ca63c4 7889
bec39cab 7890fi
bec39cab 7891done
95ca63c4 7892
81ecdfbb
RW
7893 LIBS=$save_LIBS
7894 fi
a9322a30
TT
7895fi
7896
a9322a30 7897
a9322a30
TT
7898
7899
ec685c5e 7900
0c4a4063 7901
81ecdfbb
RW
7902# Check whether --with-python was given.
7903if test "${with_python+set}" = set; then :
7904 withval=$with_python;
bec39cab 7905else
81ecdfbb 7906 with_python=auto
bec39cab 7907fi
bec39cab 7908
81ecdfbb
RW
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7910$as_echo_n "checking whether to use python... " >&6; }
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7912$as_echo "$with_python" >&6; }
9a156167 7913
81ecdfbb
RW
7914if test "${with_python}" = no; then
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7916$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7917 have_libpython=no
bec39cab 7918else
81ecdfbb 7919 case "${with_python}" in
8c85a4e2 7920 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7921 if test -d ${with_python}; then
7922 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7923 python_prog="${with_python}/bin/python"
0c4a4063 7924 python_prefix=
9c4ea6c5
JB
7925 # If python does not exit ${with_python}/bin, then try in
7926 # ${with_python}. On Windows/MinGW, this is where the Python
7927 # executable is.
7928 if test ! -x "${python_prog}"; then
7929 python_prog="${with_python}/python"
7930 python_prefix=
7931 fi
e7a30f46 7932 if test ! -x "${python_prog}"; then
ec685c5e
DE
7933 # Fall back to gdb 7.0/7.1 behaviour.
7934 python_prog=missing
0c4a4063 7935 python_prefix=${with_python}
ec685c5e 7936 fi
e7a30f46 7937 elif test -x "${with_python}"; then
ec685c5e
DE
7938 # While we can't run python compiled for $host (unless host == build),
7939 # the user could write a script that provides the needed information,
7940 # so we support that.
ec685c5e 7941 python_prog=${with_python}
0c4a4063 7942 python_prefix=
ec685c5e
DE
7943 else
7944 as_fn_error "invalid value for --with-python" "$LINENO" 5
7945 fi
81ecdfbb 7946 ;;
ec685c5e
DE
7947 */*)
7948 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7949 as_fn_error "invalid value for --with-python" "$LINENO" 5
7950 ;;
ec685c5e
DE
7951 *)
7952 # The user has either specified auto, yes, or the name of the python
7953 # program assumed to be in $PATH.
7954 python_prefix=
7955 case "${with_python}" in
7956 yes | auto)
7957 if test ${build} = ${host}; then
7958 # Extract the first word of "python", so it can be a program name with args.
7959set dummy python; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if test "${ac_cv_path_python_prog_path+set}" = set; then :
7963 $as_echo_n "(cached) " >&6
7964else
7965 case $python_prog_path in
7966 [\\/]* | ?:[\\/]*)
7967 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
7968 ;;
7969 *)
7970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973 IFS=$as_save_IFS
7974 test -z "$as_dir" && as_dir=.
7975 for ac_exec_ext in '' $ac_executable_extensions; do
7976 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7977 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
7978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979 break 2
7980 fi
7981done
7982 done
7983IFS=$as_save_IFS
7984
7985 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
7986 ;;
7987esac
7988fi
7989python_prog_path=$ac_cv_path_python_prog_path
7990if test -n "$python_prog_path"; then
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
7992$as_echo "$python_prog_path" >&6; }
7993else
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999 if test "${python_prog_path}" = missing; then
8000 python_prog=missing
8001 else
8002 python_prog=${python_prog_path}
8003 fi
8004 else
8005 # Not much we can do except assume the cross-compiler will find the
8006 # right files.
8007 python_prog=missing
8008 fi
8009 ;;
8010 *)
8011 # While we can't run python compiled for $host (unless host == build),
8012 # the user could write a script that provides the needed information,
8013 # so we support that.
8014 python_prog="${with_python}"
8015 # Extract the first word of "${python_prog}", so it can be a program name with args.
8016set dummy ${python_prog}; ac_word=$2
8017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8018$as_echo_n "checking for $ac_word... " >&6; }
8019if test "${ac_cv_path_python_prog_path+set}" = set; then :
8020 $as_echo_n "(cached) " >&6
8021else
8022 case $python_prog_path in
8023 [\\/]* | ?:[\\/]*)
8024 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8025 ;;
8026 *)
8027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8028for as_dir in $PATH
8029do
8030 IFS=$as_save_IFS
8031 test -z "$as_dir" && as_dir=.
8032 for ac_exec_ext in '' $ac_executable_extensions; do
8033 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8034 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8036 break 2
8037 fi
8038done
8039 done
8040IFS=$as_save_IFS
8041
8042 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8043 ;;
8044esac
8045fi
8046python_prog_path=$ac_cv_path_python_prog_path
8047if test -n "$python_prog_path"; then
8048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8049$as_echo "$python_prog_path" >&6; }
8050else
8051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056 if test "${python_prog_path}" = missing; then
8057 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8058 fi
8059 ;;
8060 esac
81ecdfbb
RW
8061 esac
8062
ec685c5e 8063 if test "${python_prog}" != missing; then
e7a30f46
DE
8064 # We have a python program to use, but it may be too old.
8065 # Don't flag an error for --with-python=auto (the default).
8066 have_python_config=yes
ec685c5e
DE
8067 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8068 if test $? != 0; then
e7a30f46
DE
8069 have_python_config=failed
8070 if test "${with_python}" != auto; then
8071 as_fn_error "failure running python-config --includes" "$LINENO" 5
8072 fi
ec685c5e
DE
8073 fi
8074 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8075 if test $? != 0; then
e7a30f46
DE
8076 have_python_config=failed
8077 if test "${with_python}" != auto; then
8078 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8079 fi
ec685c5e 8080 fi
0c4a4063
DE
8081 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8082 if test $? != 0; then
e7a30f46
DE
8083 have_python_config=failed
8084 if test "${with_python}" != auto; then
8085 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8086 fi
0c4a4063 8087 fi
ec685c5e 8088 else
ac534cba
JB
8089 # We do not have a python executable we can use to determine where
8090 # to find the Python headers and libs. We cannot guess the include
8091 # path from the python_prefix either, because that include path
8092 # depends on the Python version. So, there is nothing much we can
8093 # do except assume that the compiler will be able to find those files.
8094 python_includes=
8095 python_libs=
0c4a4063 8096 have_python_config=no
ec685c5e 8097 fi
bec39cab 8098
ec685c5e
DE
8099 # If we have python-config, only try the configuration it provides.
8100 # Otherwise fallback on the old way of trying different versions of
8101 # python in turn.
81ecdfbb 8102
ec685c5e
DE
8103 have_libpython=no
8104 if test "${have_python_config}" = yes; then
c1039e3c
JB
8105 # Determine the Python version by extracting "-lpython<version>"
8106 # part of the python_libs. <version> is usually X.Y with X and Y
8107 # being decimal numbers, but can also be XY (seen on Windows).
8108 #
8109 # The extraction is performed using sed with a regular expression.
8110 # Initially, the regexp used was using the '?' quantifier to make
8111 # the dot in the version number optional. Unfortunately, this
8112 # does not work with non-GNU versions of sed because, because of
8113 # what looks like a limitation (the '?' quantifier does not work
8114 # with back-references). We work around this limitation by using
8115 # the '*' quantifier instead. It means that, in theory, we might
8116 # match unexpected version strings such as "-lpython2..7", but
8117 # this seems unlikely in practice. And even if that happens,
8118 # an error will be triggered later on, when checking that version
8119 # number.
ec685c5e 8120 python_version=`echo " ${python_libs} " \
c1039e3c 8121 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8122 case "${python_version}" in
8123 python*)
ec685c5e
DE
8124
8125 version=${python_version}
8126
8127 new_CPPFLAGS=${python_includes}
8128 new_LIBS=${python_libs}
81ecdfbb
RW
8129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8130$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8131 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8132 save_LIBS=$LIBS
ec685c5e
DE
8133 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8134 LIBS="$LIBS $new_LIBS"
8135 found_usable_python=no
81ecdfbb 8136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8137/* end confdefs.h. */
ac534cba 8138#include "Python.h"
81ecdfbb
RW
8139int
8140main ()
8141{
8142Py_Initialize ();
8143 ;
8144 return 0;
8145}
bec39cab 8146_ACEOF
81ecdfbb 8147if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8148 have_libpython=${version}
8149 found_usable_python=yes
ac534cba
JB
8150 PYTHON_CPPFLAGS=$new_CPPFLAGS
8151 PYTHON_LIBS=$new_LIBS
9a156167 8152fi
81ecdfbb
RW
8153rm -f core conftest.err conftest.$ac_objext \
8154 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8155 CPPFLAGS=$save_CPPFLAGS
8156 LIBS=$save_LIBS
ec685c5e
DE
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8158$as_echo "${found_usable_python}" >&6; }
9a156167 8159
0c4a4063
DE
8160 ;;
8161 *)
ec685c5e 8162 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8163 ;;
8164 esac
e7a30f46 8165 elif test "${have_python_config}" != failed; then
ec685c5e 8166 if test "${have_libpython}" = no; then
9a156167 8167
420697bb
TT
8168 version=python2.7
8169
8170 new_CPPFLAGS=${python_includes}
8171 new_LIBS="${python_libs} -lpython2.7"
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8173$as_echo_n "checking for ${version}... " >&6; }
8174 save_CPPFLAGS=$CPPFLAGS
8175 save_LIBS=$LIBS
8176 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8177 LIBS="$LIBS $new_LIBS"
8178 found_usable_python=no
8179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180/* end confdefs.h. */
ac534cba 8181#include "Python.h"
420697bb
TT
8182int
8183main ()
8184{
8185Py_Initialize ();
8186 ;
8187 return 0;
8188}
8189_ACEOF
8190if ac_fn_c_try_link "$LINENO"; then :
8191 have_libpython=${version}
8192 found_usable_python=yes
ac534cba
JB
8193 PYTHON_CPPFLAGS=$new_CPPFLAGS
8194 PYTHON_LIBS=$new_LIBS
420697bb
TT
8195fi
8196rm -f core conftest.err conftest.$ac_objext \
8197 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8198 CPPFLAGS=$save_CPPFLAGS
8199 LIBS=$save_LIBS
420697bb
TT
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8201$as_echo "${found_usable_python}" >&6; }
8202
8203 fi
8204 if test "${have_libpython}" = no; then
8205
ec685c5e
DE
8206 version=python2.6
8207
8208 new_CPPFLAGS=${python_includes}
8209 new_LIBS="${python_libs} -lpython2.6"
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8211$as_echo_n "checking for ${version}... " >&6; }
8212 save_CPPFLAGS=$CPPFLAGS
8213 save_LIBS=$LIBS
8214 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8215 LIBS="$LIBS $new_LIBS"
8216 found_usable_python=no
8217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8218/* end confdefs.h. */
ac534cba 8219#include "Python.h"
ec685c5e
DE
8220int
8221main ()
8222{
8223Py_Initialize ();
8224 ;
8225 return 0;
8226}
8227_ACEOF
8228if ac_fn_c_try_link "$LINENO"; then :
8229 have_libpython=${version}
8230 found_usable_python=yes
ac534cba
JB
8231 PYTHON_CPPFLAGS=$new_CPPFLAGS
8232 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8233fi
8234rm -f core conftest.err conftest.$ac_objext \
8235 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8236 CPPFLAGS=$save_CPPFLAGS
8237 LIBS=$save_LIBS
ec685c5e
DE
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8239$as_echo "${found_usable_python}" >&6; }
9a156167 8240
81ecdfbb 8241 fi
ec685c5e 8242 if test ${have_libpython} = no; then
9a156167 8243
81ecdfbb 8244 version=python2.5
9a156167 8245
ec685c5e
DE
8246 new_CPPFLAGS=${python_includes}
8247 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8249$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8250 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8251 save_LIBS=$LIBS
ec685c5e
DE
8252 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8253 LIBS="$LIBS $new_LIBS"
8254 found_usable_python=no
81ecdfbb 8255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8256/* end confdefs.h. */
ac534cba 8257#include "Python.h"
81ecdfbb
RW
8258int
8259main ()
8260{
8261Py_Initialize ();
8262 ;
8263 return 0;
8264}
436868fb 8265_ACEOF
81ecdfbb 8266if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8267 have_libpython=${version}
8268 found_usable_python=yes
ac534cba
JB
8269 PYTHON_CPPFLAGS=$new_CPPFLAGS
8270 PYTHON_LIBS=$new_LIBS
436868fb 8271fi
81ecdfbb
RW
8272rm -f core conftest.err conftest.$ac_objext \
8273 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8274 CPPFLAGS=$save_CPPFLAGS
8275 LIBS=$save_LIBS
ec685c5e
DE
8276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8277$as_echo "${found_usable_python}" >&6; }
a9322a30 8278
81ecdfbb 8279 fi
ec685c5e 8280 if test ${have_libpython} = no; then
a9322a30 8281
81ecdfbb 8282 version=python2.4
a9322a30 8283
ec685c5e
DE
8284 new_CPPFLAGS=${python_includes}
8285 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8287$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8288 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8289 save_LIBS=$LIBS
ec685c5e
DE
8290 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8291 LIBS="$LIBS $new_LIBS"
8292 found_usable_python=no
81ecdfbb 8293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8294/* end confdefs.h. */
ac534cba 8295#include "Python.h"
a9322a30
TT
8296int
8297main ()
8298{
81ecdfbb 8299Py_Initialize ();
a9322a30
TT
8300 ;
8301 return 0;
8302}
436868fb 8303_ACEOF
81ecdfbb 8304if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8305 have_libpython=${version}
8306 found_usable_python=yes
ac534cba
JB
8307 PYTHON_CPPFLAGS=$new_CPPFLAGS
8308 PYTHON_LIBS=$new_LIBS
436868fb 8309fi
81ecdfbb
RW
8310rm -f core conftest.err conftest.$ac_objext \
8311 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8312 CPPFLAGS=$save_CPPFLAGS
8313 LIBS=$save_LIBS
ec685c5e
DE
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8315$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8316
ec685c5e
DE
8317 fi
8318 fi
9c4ea6c5 8319 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8320
8321$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8322
9c4ea6c5 8323 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8324
8325$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8326
9c4ea6c5 8327 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8328
8329$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8330
9c4ea6c5 8331 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8332
8333$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8334
81ecdfbb 8335 fi
ec685c5e
DE
8336
8337 if test "${have_libpython}" = no; then
81ecdfbb
RW
8338 case "${with_python}" in
8339 yes)
8340 as_fn_error "python is missing or unusable" "$LINENO" 5
8341 ;;
8342 auto)
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8344$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8345 ;;
8346 *)
8347 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8348 ;;
8349 esac
0c4a4063
DE
8350 else
8351 if test -n "${python_prefix}"; then
8352
8353cat >>confdefs.h <<_ACEOF
8354#define WITH_PYTHON_PATH "${python_prefix}"
8355_ACEOF
8356
8357
8358 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8359 if test "x$prefix" = xNONE; then
8360 test_prefix=/usr/local
8361 else
8362 test_prefix=$prefix
8363 fi
8364 else
8365 test_prefix=$exec_prefix
8366 fi
8367 value=0
8368 case ${python_prefix} in
8369 "${test_prefix}"|"${test_prefix}/"*|\
8370 '${exec_prefix}'|'${exec_prefix}/'*)
8371 value=1
8372 ;;
8373 esac
8374
8375cat >>confdefs.h <<_ACEOF
8376#define PYTHON_PATH_RELOCATABLE $value
8377_ACEOF
8378
8379
8380 fi
81ecdfbb 8381 fi
436868fb 8382fi
436868fb 8383
ec685c5e 8384if test "${have_libpython}" != no; then
436868fb 8385
81ecdfbb 8386$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8387
81ecdfbb
RW
8388 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8389 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8390 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8391 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8392 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8393
81ecdfbb
RW
8394 # Flags needed to compile Python code (taken from python-config --cflags).
8395 # We cannot call python-config directly because it will output whatever was
8396 # used when compiling the Python interpreter itself, including flags which
8397 # would make the python-related objects be compiled differently from the
8398 # rest of GDB (e.g., -O2 and -fPIC).
8399 if test "${GCC}" = yes; then
8400 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8401 fi
436868fb 8402
81ecdfbb
RW
8403 if test "x${tentative_python_cflags}" != x; then
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8405$as_echo_n "checking compiler flags for python code... " >&6; }
8406 for flag in ${tentative_python_cflags}; do
8407 # Check that the compiler accepts it
8408 saved_CFLAGS="$CFLAGS"
8409 CFLAGS="$CFLAGS $flag"
8410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8411/* end confdefs.h. */
81ecdfbb 8412
a9322a30
TT
8413int
8414main ()
8415{
a9322a30
TT
8416
8417 ;
8418 return 0;
8419}
bec39cab 8420_ACEOF
81ecdfbb
RW
8421if ac_fn_c_try_compile "$LINENO"; then :
8422 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8423fi
81ecdfbb
RW
8424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8425 CFLAGS="$saved_CFLAGS"
8426 done
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8428$as_echo "${PYTHON_CFLAGS}" >&6; }
8429 fi
043b6510
JB
8430
8431 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8432 # #if _SGIAPI
8433 # #define siginfo __siginfo
8434 # #endif
8435 # The problem is that including Python causes some XOPEN macros to be
8436 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8437 # to false. So, we work around this issue by defining siginfo ourself
8438 # though the command-line.
8439 case "$gdb_host" in
8440 irix*) if test "${GCC}" = yes; then
8441 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8442 fi
8443 ;;
8444 esac
81ecdfbb
RW
8445else
8446 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8447 # included.
8448 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8449 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8450 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8451fi
9a156167 8452
9a156167 8453
ac534cba
JB
8454
8455
81ecdfbb
RW
8456# ------------------------- #
8457# Checks for header files. #
8458# ------------------------- #
c890192f 8459
81ecdfbb
RW
8460ac_header_dirent=no
8461for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8462 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8464$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8465if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8466 $as_echo_n "(cached) " >&6
bec39cab 8467else
81ecdfbb 8468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8469/* end confdefs.h. */
81ecdfbb
RW
8470#include <sys/types.h>
8471#include <$ac_hdr>
8472
a9322a30
TT
8473int
8474main ()
8475{
81ecdfbb
RW
8476if ((DIR *) 0)
8477return 0;
a9322a30
TT
8478 ;
8479 return 0;
8480}
bec39cab 8481_ACEOF
81ecdfbb
RW
8482if ac_fn_c_try_compile "$LINENO"; then :
8483 eval "$as_ac_Header=yes"
bec39cab 8484else
81ecdfbb 8485 eval "$as_ac_Header=no"
bec39cab 8486fi
81ecdfbb 8487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8488fi
81ecdfbb
RW
8489eval ac_res=\$$as_ac_Header
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8491$as_echo "$ac_res" >&6; }
8492eval as_val=\$$as_ac_Header
8493 if test "x$as_val" = x""yes; then :
8494 cat >>confdefs.h <<_ACEOF
8495#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8496_ACEOF
bec39cab 8497
81ecdfbb
RW
8498ac_header_dirent=$ac_hdr; break
8499fi
bec39cab 8500
81ecdfbb
RW
8501done
8502# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8503if test $ac_header_dirent = dirent.h; then
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8505$as_echo_n "checking for library containing opendir... " >&6; }
8506if test "${ac_cv_search_opendir+set}" = set; then :
8507 $as_echo_n "(cached) " >&6
c890192f 8508else
81ecdfbb
RW
8509 ac_func_search_save_LIBS=$LIBS
8510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8511/* end confdefs.h. */
8512
8513/* Override any GCC internal prototype to avoid an error.
8514 Use char because int might match the return type of a GCC
8515 builtin and then its argument prototype would still apply. */
8516#ifdef __cplusplus
8517extern "C"
8518#endif
8519char opendir ();
8520int
8521main ()
8522{
8523return opendir ();
8524 ;
8525 return 0;
8526}
bec39cab 8527_ACEOF
81ecdfbb
RW
8528for ac_lib in '' dir; do
8529 if test -z "$ac_lib"; then
8530 ac_res="none required"
8531 else
8532 ac_res=-l$ac_lib
8533 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8534 fi
8535 if ac_fn_c_try_link "$LINENO"; then :
8536 ac_cv_search_opendir=$ac_res
8537fi
8538rm -f core conftest.err conftest.$ac_objext \
8539 conftest$ac_exeext
8540 if test "${ac_cv_search_opendir+set}" = set; then :
8541 break
8542fi
8543done
8544if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8545
81ecdfbb
RW
8546else
8547 ac_cv_search_opendir=no
8548fi
8549rm conftest.$ac_ext
8550LIBS=$ac_func_search_save_LIBS
8551fi
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8553$as_echo "$ac_cv_search_opendir" >&6; }
8554ac_res=$ac_cv_search_opendir
8555if test "$ac_res" != no; then :
8556 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8557
bec39cab 8558fi
81ecdfbb 8559
bec39cab 8560else
81ecdfbb
RW
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8562$as_echo_n "checking for library containing opendir... " >&6; }
8563if test "${ac_cv_search_opendir+set}" = set; then :
8564 $as_echo_n "(cached) " >&6
8565else
8566 ac_func_search_save_LIBS=$LIBS
8567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8568/* end confdefs.h. */
81ecdfbb
RW
8569
8570/* Override any GCC internal prototype to avoid an error.
8571 Use char because int might match the return type of a GCC
8572 builtin and then its argument prototype would still apply. */
8573#ifdef __cplusplus
8574extern "C"
8575#endif
8576char opendir ();
a9322a30
TT
8577int
8578main ()
8579{
81ecdfbb 8580return opendir ();
a9322a30
TT
8581 ;
8582 return 0;
8583}
bec39cab 8584_ACEOF
81ecdfbb
RW
8585for ac_lib in '' x; do
8586 if test -z "$ac_lib"; then
8587 ac_res="none required"
8588 else
8589 ac_res=-l$ac_lib
8590 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8591 fi
8592 if ac_fn_c_try_link "$LINENO"; then :
8593 ac_cv_search_opendir=$ac_res
8594fi
8595rm -f core conftest.err conftest.$ac_objext \
8596 conftest$ac_exeext
8597 if test "${ac_cv_search_opendir+set}" = set; then :
8598 break
8599fi
8600done
8601if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8602
81ecdfbb
RW
8603else
8604 ac_cv_search_opendir=no
bec39cab 8605fi
81ecdfbb
RW
8606rm conftest.$ac_ext
8607LIBS=$ac_func_search_save_LIBS
a9322a30 8608fi
81ecdfbb
RW
8609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8610$as_echo "$ac_cv_search_opendir" >&6; }
8611ac_res=$ac_cv_search_opendir
8612if test "$ac_res" != no; then :
8613 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8614
81ecdfbb 8615fi
bec39cab 8616
81ecdfbb 8617fi
bec39cab 8618
81ecdfbb
RW
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8620$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8621if test "${ac_cv_header_stat_broken+set}" = set; then :
8622 $as_echo_n "(cached) " >&6
9a156167 8623else
81ecdfbb
RW
8624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8625/* end confdefs.h. */
8626#include <sys/types.h>
8627#include <sys/stat.h>
8628
8629#if defined S_ISBLK && defined S_IFDIR
8630extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8631#endif
8632
8633#if defined S_ISBLK && defined S_IFCHR
8634extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8635#endif
8636
8637#if defined S_ISLNK && defined S_IFREG
8638extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8639#endif
8640
8641#if defined S_ISSOCK && defined S_IFREG
8642extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8643#endif
8644
bec39cab 8645_ACEOF
81ecdfbb
RW
8646if ac_fn_c_try_compile "$LINENO"; then :
8647 ac_cv_header_stat_broken=no
8648else
8649 ac_cv_header_stat_broken=yes
8650fi
8651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8652fi
8653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8654$as_echo "$ac_cv_header_stat_broken" >&6; }
8655if test $ac_cv_header_stat_broken = yes; then
9a156167 8656
81ecdfbb 8657$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 8658
bec39cab 8659fi
81ecdfbb
RW
8660
8661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8662$as_echo_n "checking for ANSI C header files... " >&6; }
8663if test "${ac_cv_header_stdc+set}" = set; then :
8664 $as_echo_n "(cached) " >&6
bec39cab 8665else
81ecdfbb 8666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8667/* end confdefs.h. */
81ecdfbb
RW
8668#include <stdlib.h>
8669#include <stdarg.h>
8670#include <string.h>
8671#include <float.h>
8672
a9322a30
TT
8673int
8674main ()
8675{
a9322a30
TT
8676
8677 ;
8678 return 0;
8679}
bec39cab 8680_ACEOF
81ecdfbb
RW
8681if ac_fn_c_try_compile "$LINENO"; then :
8682 ac_cv_header_stdc=yes
bec39cab 8683else
81ecdfbb 8684 ac_cv_header_stdc=no
a9322a30 8685fi
81ecdfbb 8686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8687
81ecdfbb
RW
8688if test $ac_cv_header_stdc = yes; then
8689 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691/* end confdefs.h. */
8692#include <string.h>
bec39cab 8693
81ecdfbb
RW
8694_ACEOF
8695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8696 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8697
bec39cab 8698else
81ecdfbb
RW
8699 ac_cv_header_stdc=no
8700fi
8701rm -f conftest*
8702
8703fi
8704
8705if test $ac_cv_header_stdc = yes; then
8706 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8708/* end confdefs.h. */
8709#include <stdlib.h>
8710
bec39cab 8711_ACEOF
81ecdfbb
RW
8712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8713 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8714
81ecdfbb
RW
8715else
8716 ac_cv_header_stdc=no
8717fi
8718rm -f conftest*
bec39cab 8719
bec39cab 8720fi
81ecdfbb
RW
8721
8722if test $ac_cv_header_stdc = yes; then
8723 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8724 if test "$cross_compiling" = yes; then :
8725 :
bec39cab 8726else
81ecdfbb 8727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8728/* end confdefs.h. */
81ecdfbb
RW
8729#include <ctype.h>
8730#include <stdlib.h>
8731#if ((' ' & 0x0FF) == 0x020)
8732# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8733# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8734#else
8735# define ISLOWER(c) \
8736 (('a' <= (c) && (c) <= 'i') \
8737 || ('j' <= (c) && (c) <= 'r') \
8738 || ('s' <= (c) && (c) <= 'z'))
8739# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8740#endif
8741
8742#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8743int
8744main ()
8745{
81ecdfbb
RW
8746 int i;
8747 for (i = 0; i < 256; i++)
8748 if (XOR (islower (i), ISLOWER (i))
8749 || toupper (i) != TOUPPER (i))
8750 return 2;
a9322a30
TT
8751 return 0;
8752}
bec39cab 8753_ACEOF
81ecdfbb
RW
8754if ac_fn_c_try_run "$LINENO"; then :
8755
bec39cab 8756else
81ecdfbb
RW
8757 ac_cv_header_stdc=no
8758fi
8759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8760 conftest.$ac_objext conftest.beam conftest.$ac_ext
8761fi
bec39cab 8762
bec39cab 8763fi
a9322a30 8764fi
81ecdfbb
RW
8765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8766$as_echo "$ac_cv_header_stdc" >&6; }
8767if test $ac_cv_header_stdc = yes; then
bec39cab 8768
81ecdfbb 8769$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8770
81ecdfbb 8771fi
bec39cab 8772
81ecdfbb
RW
8773# elf_hp.h is for HP/UX 64-bit shared library support.
8774# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
8775# unconditionally, so what's the point in checking these?
8776for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8777 thread_db.h gnu/libc-version.h signal.h stddef.h \
8778 stdlib.h string.h memory.h strings.h sys/fault.h \
8779 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8780 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8781 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8782 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 8783 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 8784 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
8785do :
8786 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8787ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8788eval as_val=\$$as_ac_Header
8789 if test "x$as_val" = x""yes; then :
bec39cab 8790 cat >>confdefs.h <<_ACEOF
81ecdfbb 8791#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8792_ACEOF
c906108c 8793
bec39cab 8794fi
81ecdfbb
RW
8795
8796done
8797
8798for ac_header in link.h
8799do :
8800 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8801# include <sys/types.h>
8802#endif
8803#if HAVE_NLIST_H
8804# include <nlist.h>
a9322a30
TT
8805#endif
8806
81ecdfbb
RW
8807"
8808if test "x$ac_cv_header_link_h" = x""yes; then :
8809 cat >>confdefs.h <<_ACEOF
8810#define HAVE_LINK_H 1
bec39cab 8811_ACEOF
bec39cab 8812
a9322a30 8813fi
bec39cab 8814
81ecdfbb 8815done
c906108c 8816
81ecdfbb
RW
8817for ac_header in sys/proc.h
8818do :
8819 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8820# include <sys/param.h>
8821#endif
c906108c 8822
81ecdfbb
RW
8823"
8824if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8825 cat >>confdefs.h <<_ACEOF
81ecdfbb 8826#define HAVE_SYS_PROC_H 1
bec39cab 8827_ACEOF
5ee754fc 8828
bec39cab 8829fi
81ecdfbb
RW
8830
8831done
8832
8833for ac_header in sys/user.h
8834do :
8835 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8836# include <sys/param.h>
a9322a30
TT
8837#endif
8838
81ecdfbb
RW
8839"
8840if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8841 cat >>confdefs.h <<_ACEOF
8842#define HAVE_SYS_USER_H 1
bec39cab 8843_ACEOF
bec39cab 8844
a9322a30 8845fi
bec39cab 8846
81ecdfbb 8847done
5ee754fc 8848
5ee754fc 8849
81ecdfbb
RW
8850# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8851# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8852# think that we don't have <curses.h> if we're using GCC.
8853case $host_os in
8854 solaris2.[789])
8855 if test "$GCC" = yes; then
8856
8857$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8858
8859 fi ;;
8860esac
8861for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8862do :
8863 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8864ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8865eval as_val=\$$as_ac_Header
8866 if test "x$as_val" = x""yes; then :
bec39cab 8867 cat >>confdefs.h <<_ACEOF
81ecdfbb 8868#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8869_ACEOF
5ee754fc
MK
8870
8871fi
8872
81ecdfbb 8873done
bec39cab 8874
81ecdfbb
RW
8875for ac_header in term.h
8876do :
8877 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8878# include <curses.h>
8879#endif
bec39cab 8880
81ecdfbb
RW
8881"
8882if test "x$ac_cv_header_term_h" = x""yes; then :
8883 cat >>confdefs.h <<_ACEOF
8884#define HAVE_TERM_H 1
a8111142 8885_ACEOF
a8111142 8886
a8111142 8887fi
a8111142 8888
81ecdfbb 8889done
a8111142
TT
8890
8891
81ecdfbb
RW
8892# ------------------------- #
8893# Checks for declarations. #
8894# ------------------------- #
a9322a30 8895
81ecdfbb
RW
8896ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8897if test "x$ac_cv_have_decl_free" = x""yes; then :
8898 ac_have_decl=1
bec39cab 8899else
81ecdfbb
RW
8900 ac_have_decl=0
8901fi
8902
8903cat >>confdefs.h <<_ACEOF
8904#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8905_ACEOF
81ecdfbb
RW
8906ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8907if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8908 ac_have_decl=1
8909else
8910 ac_have_decl=0
8911fi
8912
8913cat >>confdefs.h <<_ACEOF
8914#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 8915_ACEOF
81ecdfbb
RW
8916ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
8917if test "x$ac_cv_have_decl_realloc" = x""yes; then :
8918 ac_have_decl=1
bec39cab 8919else
81ecdfbb
RW
8920 ac_have_decl=0
8921fi
bec39cab 8922
81ecdfbb
RW
8923cat >>confdefs.h <<_ACEOF
8924#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 8925_ACEOF
81ecdfbb
RW
8926ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
8927if test "x$ac_cv_have_decl_strerror" = x""yes; then :
8928 ac_have_decl=1
8929else
8930 ac_have_decl=0
8931fi
8932
8933cat >>confdefs.h <<_ACEOF
8934#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 8935_ACEOF
81ecdfbb
RW
8936ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8937if test "x$ac_cv_have_decl_strstr" = x""yes; then :
8938 ac_have_decl=1
bec39cab 8939else
81ecdfbb
RW
8940 ac_have_decl=0
8941fi
5ee754fc 8942
81ecdfbb
RW
8943cat >>confdefs.h <<_ACEOF
8944#define HAVE_DECL_STRSTR $ac_have_decl
8945_ACEOF
8946ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
8947if test "x$ac_cv_have_decl_getopt" = x""yes; then :
8948 ac_have_decl=1
8949else
8950 ac_have_decl=0
5ee754fc 8951fi
81ecdfbb
RW
8952
8953cat >>confdefs.h <<_ACEOF
8954#define HAVE_DECL_GETOPT $ac_have_decl
8955_ACEOF
8956ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
8957if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
8958 ac_have_decl=1
8959else
8960 ac_have_decl=0
5ee754fc 8961fi
81ecdfbb
RW
8962
8963cat >>confdefs.h <<_ACEOF
8964#define HAVE_DECL_SNPRINTF $ac_have_decl
8965_ACEOF
8966ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
8967if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
8968 ac_have_decl=1
8969else
8970 ac_have_decl=0
5ee754fc
MK
8971fi
8972
a9322a30 8973cat >>confdefs.h <<_ACEOF
81ecdfbb 8974#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 8975_ACEOF
5ee754fc 8976
5ee754fc 8977
81ecdfbb
RW
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
8979$as_echo_n "checking for LC_MESSAGES... " >&6; }
8980if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
8981 $as_echo_n "(cached) " >&6
bec39cab 8982else
81ecdfbb 8983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8984/* end confdefs.h. */
81ecdfbb 8985#include <locale.h>
a9322a30
TT
8986int
8987main ()
8988{
81ecdfbb 8989return LC_MESSAGES
a9322a30
TT
8990 ;
8991 return 0;
8992}
bec39cab 8993_ACEOF
81ecdfbb
RW
8994if ac_fn_c_try_link "$LINENO"; then :
8995 am_cv_val_LC_MESSAGES=yes
bec39cab 8996else
81ecdfbb
RW
8997 am_cv_val_LC_MESSAGES=no
8998fi
8999rm -f core conftest.err conftest.$ac_objext \
9000 conftest$ac_exeext conftest.$ac_ext
9001fi
9002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9003$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9004 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9005
81ecdfbb
RW
9006$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9007
9008 fi
9009
9010
9011# ----------------------- #
9012# Checks for structures. #
9013# ----------------------- #
9014
9015ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9016if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9017
9018cat >>confdefs.h <<_ACEOF
9019#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9020_ACEOF
7eb368b3 9021
81ecdfbb 9022
7eb368b3 9023fi
81ecdfbb
RW
9024ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9025if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9026
a9322a30
TT
9027cat >>confdefs.h <<_ACEOF
9028#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9029_ACEOF
9030
a9322a30 9031
7eb368b3
NR
9032fi
9033
7eb368b3 9034
a9322a30
TT
9035# ------------------ #
9036# Checks for types. #
9037# ------------------ #
7eb368b3 9038
81ecdfbb
RW
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9040$as_echo_n "checking return type of signal handlers... " >&6; }
9041if test "${ac_cv_type_signal+set}" = set; then :
9042 $as_echo_n "(cached) " >&6
bec39cab 9043else
81ecdfbb 9044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9045/* end confdefs.h. */
a9322a30
TT
9046#include <sys/types.h>
9047#include <signal.h>
7cb9022a 9048
a9322a30
TT
9049int
9050main ()
9051{
81ecdfbb 9052return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9053 ;
9054 return 0;
9055}
bec39cab 9056_ACEOF
81ecdfbb
RW
9057if ac_fn_c_try_compile "$LINENO"; then :
9058 ac_cv_type_signal=int
bec39cab 9059else
81ecdfbb 9060 ac_cv_type_signal=void
bec39cab 9061fi
81ecdfbb 9062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9063fi
81ecdfbb
RW
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9065$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9066
a9322a30
TT
9067cat >>confdefs.h <<_ACEOF
9068#define RETSIGTYPE $ac_cv_type_signal
9069_ACEOF
5ee754fc 9070
bec39cab 9071
81ecdfbb 9072ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9073#include <sys/socket.h>
9074
81ecdfbb
RW
9075"
9076if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9077
a9322a30
TT
9078cat >>confdefs.h <<_ACEOF
9079#define HAVE_SOCKLEN_T 1
9080_ACEOF
9081
9082
9083fi
9084
9085
9086# ------------------------------------- #
9087# Checks for compiler characteristics. #
9088# ------------------------------------- #
9089
81ecdfbb
RW
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9091$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9092if test "${ac_cv_c_const+set}" = set; then :
9093 $as_echo_n "(cached) " >&6
a9322a30 9094else
81ecdfbb 9095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9096/* end confdefs.h. */
a9322a30
TT
9097
9098int
9099main ()
9100{
9101/* FIXME: Include the comments suggested by Paul. */
9102#ifndef __cplusplus
9103 /* Ultrix mips cc rejects this. */
9104 typedef int charset[2];
81ecdfbb 9105 const charset cs;
a9322a30 9106 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9107 char const *const *pcpcc;
9108 char **ppc;
a9322a30
TT
9109 /* NEC SVR4.0.2 mips cc rejects this. */
9110 struct point {int x, y;};
9111 static struct point const zero = {0,0};
9112 /* AIX XL C 1.02.0.0 rejects this.
9113 It does not let you subtract one const X* pointer from another in
9114 an arm of an if-expression whose if-part is not a constant
9115 expression */
9116 const char *g = "string";
81ecdfbb 9117 pcpcc = &g + (g ? g-g : 0);
a9322a30 9118 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9119 ++pcpcc;
9120 ppc = (char**) pcpcc;
9121 pcpcc = (char const *const *) ppc;
a9322a30
TT
9122 { /* SCO 3.2v4 cc rejects this. */
9123 char *t;
9124 char const *s = 0 ? (char *) 0 : (char const *) 0;
9125
9126 *t++ = 0;
81ecdfbb 9127 if (s) return 0;
a9322a30
TT
9128 }
9129 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9130 int x[] = {25, 17};
9131 const int *foo = &x[0];
9132 ++foo;
9133 }
9134 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9135 typedef const int *iptr;
9136 iptr p = 0;
9137 ++p;
9138 }
9139 { /* AIX XL C 1.02.0.0 rejects this saying
9140 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9141 struct s { int j; const int *ap[3]; };
9142 struct s *b; b->j = 5;
9143 }
9144 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9145 const int foo = 10;
81ecdfbb 9146 if (!foo) return 0;
a9322a30 9147 }
81ecdfbb 9148 return !cs[0] && !zero.x;
a9322a30
TT
9149#endif
9150
9151 ;
9152 return 0;
9153}
bec39cab 9154_ACEOF
81ecdfbb 9155if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9156 ac_cv_c_const=yes
5ee754fc 9157else
81ecdfbb 9158 ac_cv_c_const=no
5ee754fc 9159fi
81ecdfbb 9160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9161fi
81ecdfbb
RW
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9163$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9164if test $ac_cv_c_const = no; then
bec39cab 9165
81ecdfbb 9166$as_echo "#define const /**/" >>confdefs.h
bec39cab 9167
5ee754fc 9168fi
bec39cab 9169
81ecdfbb
RW
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9171$as_echo_n "checking for inline... " >&6; }
9172if test "${ac_cv_c_inline+set}" = set; then :
9173 $as_echo_n "(cached) " >&6
bec39cab 9174else
a9322a30
TT
9175 ac_cv_c_inline=no
9176for ac_kw in inline __inline__ __inline; do
81ecdfbb 9177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9178/* end confdefs.h. */
a9322a30
TT
9179#ifndef __cplusplus
9180typedef int foo_t;
9181static $ac_kw foo_t static_foo () {return 0; }
9182$ac_kw foo_t foo () {return 0; }
9183#endif
9184
bec39cab 9185_ACEOF
81ecdfbb
RW
9186if ac_fn_c_try_compile "$LINENO"; then :
9187 ac_cv_c_inline=$ac_kw
bec39cab 9188fi
81ecdfbb
RW
9189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9190 test "$ac_cv_c_inline" != no && break
a9322a30 9191done
bec39cab 9192
5ee754fc 9193fi
81ecdfbb
RW
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9195$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9196
a9322a30
TT
9197case $ac_cv_c_inline in
9198 inline | yes) ;;
9199 *)
9200 case $ac_cv_c_inline in
9201 no) ac_val=;;
9202 *) ac_val=$ac_cv_c_inline;;
9203 esac
9204 cat >>confdefs.h <<_ACEOF
9205#ifndef __cplusplus
9206#define inline $ac_val
9207#endif
9208_ACEOF
bec39cab
AC
9209 ;;
9210esac
bec39cab 9211
81ecdfbb
RW
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9213$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9214if test "${ac_cv_c_bigendian+set}" = set; then :
9215 $as_echo_n "(cached) " >&6
bec39cab 9216else
81ecdfbb
RW
9217 ac_cv_c_bigendian=unknown
9218 # See if we're dealing with a universal compiler.
9219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220/* end confdefs.h. */
9221#ifndef __APPLE_CC__
9222 not a universal capable compiler
9223 #endif
9224 typedef int dummy;
9225
9226_ACEOF
9227if ac_fn_c_try_compile "$LINENO"; then :
9228
9229 # Check for potential -arch flags. It is not universal unless
9230 # there are at least two -arch flags with different values.
9231 ac_arch=
9232 ac_prev=
9233 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9234 if test -n "$ac_prev"; then
9235 case $ac_word in
9236 i?86 | x86_64 | ppc | ppc64)
9237 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9238 ac_arch=$ac_word
9239 else
9240 ac_cv_c_bigendian=universal
9241 break
9242 fi
9243 ;;
9244 esac
9245 ac_prev=
9246 elif test "x$ac_word" = "x-arch"; then
9247 ac_prev=arch
9248 fi
9249 done
9250fi
9251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9252 if test $ac_cv_c_bigendian = unknown; then
9253 # See if sys/param.h defines the BYTE_ORDER macro.
9254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9255/* end confdefs.h. */
a9322a30 9256#include <sys/types.h>
81ecdfbb 9257 #include <sys/param.h>
a9322a30
TT
9258
9259int
9260main ()
9261{
81ecdfbb
RW
9262#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9263 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9264 && LITTLE_ENDIAN)
9265 bogus endian macros
9266 #endif
a9322a30
TT
9267
9268 ;
9269 return 0;
9270}
bec39cab 9271_ACEOF
81ecdfbb 9272if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9273 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9275/* end confdefs.h. */
a9322a30 9276#include <sys/types.h>
81ecdfbb 9277 #include <sys/param.h>
a9322a30
TT
9278
9279int
9280main ()
9281{
9282#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9283 not big endian
9284 #endif
a9322a30
TT
9285
9286 ;
9287 return 0;
9288}
bec39cab 9289_ACEOF
81ecdfbb 9290if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9291 ac_cv_c_bigendian=yes
5ee754fc 9292else
81ecdfbb 9293 ac_cv_c_bigendian=no
5ee754fc 9294fi
81ecdfbb
RW
9295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9296fi
9297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9298 fi
9299 if test $ac_cv_c_bigendian = unknown; then
9300 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9302/* end confdefs.h. */
9303#include <limits.h>
bec39cab 9304
81ecdfbb
RW
9305int
9306main ()
9307{
9308#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9309 bogus endian macros
9310 #endif
9311
9312 ;
9313 return 0;
9314}
7eb368b3 9315_ACEOF
81ecdfbb
RW
9316if ac_fn_c_try_compile "$LINENO"; then :
9317 # It does; now see whether it defined to _BIG_ENDIAN or not.
9318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9319/* end confdefs.h. */
81ecdfbb
RW
9320#include <limits.h>
9321
7eb368b3
NR
9322int
9323main ()
9324{
81ecdfbb
RW
9325#ifndef _BIG_ENDIAN
9326 not big endian
9327 #endif
9328
7eb368b3
NR
9329 ;
9330 return 0;
9331}
9332_ACEOF
81ecdfbb 9333if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9334 ac_cv_c_bigendian=yes
81ecdfbb
RW
9335else
9336 ac_cv_c_bigendian=no
a9322a30 9337fi
81ecdfbb 9338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9339fi
81ecdfbb
RW
9340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9341 fi
9342 if test $ac_cv_c_bigendian = unknown; then
9343 # Compile a test program.
9344 if test "$cross_compiling" = yes; then :
9345 # Try to guess by grepping values from an object file.
9346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9347/* end confdefs.h. */
9348short int ascii_mm[] =
9349 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9350 short int ascii_ii[] =
9351 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9352 int use_ascii (int i) {
9353 return ascii_mm[i] + ascii_ii[i];
9354 }
9355 short int ebcdic_ii[] =
9356 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9357 short int ebcdic_mm[] =
9358 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9359 int use_ebcdic (int i) {
9360 return ebcdic_mm[i] + ebcdic_ii[i];
9361 }
9362 extern int foo;
7eb368b3 9363
81ecdfbb
RW
9364int
9365main ()
9366{
9367return use_ascii (foo) == use_ebcdic (foo);
9368 ;
9369 return 0;
9370}
9371_ACEOF
9372if ac_fn_c_try_compile "$LINENO"; then :
9373 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9374 ac_cv_c_bigendian=yes
9375 fi
9376 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9377 if test "$ac_cv_c_bigendian" = unknown; then
9378 ac_cv_c_bigendian=no
9379 else
9380 # finding both strings is unlikely to happen, but who knows?
9381 ac_cv_c_bigendian=unknown
9382 fi
9383 fi
7eb368b3 9384fi
81ecdfbb 9385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9386else
81ecdfbb 9387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9388/* end confdefs.h. */
81ecdfbb 9389$ac_includes_default
d3ea6809
MM
9390int
9391main ()
9392{
81ecdfbb
RW
9393
9394 /* Are we little or big endian? From Harbison&Steele. */
9395 union
9396 {
9397 long int l;
9398 char c[sizeof (long int)];
9399 } u;
9400 u.l = 1;
9401 return u.c[sizeof (long int) - 1] == 1;
9402
9403 ;
9404 return 0;
d3ea6809
MM
9405}
9406_ACEOF
81ecdfbb 9407if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9408 ac_cv_c_bigendian=no
d3ea6809 9409else
81ecdfbb 9410 ac_cv_c_bigendian=yes
d3ea6809 9411fi
81ecdfbb
RW
9412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9413 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9414fi
a9322a30 9415
81ecdfbb
RW
9416 fi
9417fi
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9419$as_echo "$ac_cv_c_bigendian" >&6; }
9420 case $ac_cv_c_bigendian in #(
9421 yes)
9422 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9423;; #(
9424 no)
9425 ;; #(
9426 universal)
9427
9428$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9429
9430 ;; #(
9431 *)
9432 as_fn_error "unknown endianness
9433 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9434 esac
d3ea6809
MM
9435
9436
a9322a30
TT
9437# ------------------------------ #
9438# Checks for library functions. #
9439# ------------------------------ #
d3ea6809 9440
a9322a30
TT
9441# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9442# for constant arguments. Useless!
81ecdfbb
RW
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9444$as_echo_n "checking for working alloca.h... " >&6; }
9445if test "${ac_cv_working_alloca_h+set}" = set; then :
9446 $as_echo_n "(cached) " >&6
d3ea6809 9447else
81ecdfbb 9448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9449/* end confdefs.h. */
a9322a30 9450#include <alloca.h>
bec39cab
AC
9451int
9452main ()
9453{
a9322a30 9454char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9455 if (p) return 0;
bec39cab
AC
9456 ;
9457 return 0;
9458}
9459_ACEOF
81ecdfbb 9460if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9461 ac_cv_working_alloca_h=yes
bec39cab 9462else
81ecdfbb 9463 ac_cv_working_alloca_h=no
bec39cab 9464fi
81ecdfbb
RW
9465rm -f core conftest.err conftest.$ac_objext \
9466 conftest$ac_exeext conftest.$ac_ext
bec39cab 9467fi
81ecdfbb
RW
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9469$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9470if test $ac_cv_working_alloca_h = yes; then
9471
81ecdfbb 9472$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9473
c906108c 9474fi
bec39cab 9475
81ecdfbb
RW
9476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9477$as_echo_n "checking for alloca... " >&6; }
9478if test "${ac_cv_func_alloca_works+set}" = set; then :
9479 $as_echo_n "(cached) " >&6
bec39cab 9480else
81ecdfbb 9481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9482/* end confdefs.h. */
a9322a30
TT
9483#ifdef __GNUC__
9484# define alloca __builtin_alloca
b4e70030 9485#else
a9322a30
TT
9486# ifdef _MSC_VER
9487# include <malloc.h>
9488# define alloca _alloca
9489# else
81ecdfbb 9490# ifdef HAVE_ALLOCA_H
a9322a30
TT
9491# include <alloca.h>
9492# else
9493# ifdef _AIX
9494 #pragma alloca
9495# else
9496# ifndef alloca /* predefined by HP cc +Olibcalls */
9497char *alloca ();
9498# endif
9499# endif
9500# endif
9501# endif
c906108c 9502#endif
97bf5e38 9503
bec39cab
AC
9504int
9505main ()
9506{
a9322a30 9507char *p = (char *) alloca (1);
81ecdfbb 9508 if (p) return 0;
bec39cab
AC
9509 ;
9510 return 0;
9511}
9512_ACEOF
81ecdfbb 9513if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9514 ac_cv_func_alloca_works=yes
bec39cab 9515else
81ecdfbb 9516 ac_cv_func_alloca_works=no
bec39cab 9517fi
81ecdfbb
RW
9518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext
bec39cab 9520fi
81ecdfbb
RW
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9522$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9523
9524if test $ac_cv_func_alloca_works = yes; then
9525
81ecdfbb 9526$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9527
a9322a30
TT
9528else
9529 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9530# that cause trouble. Some versions do not even contain alloca or
9531# contain a buggy version. If you still want to use their alloca,
9532# use ar to extract alloca.o from them instead of compiling alloca.c.
9533
81ecdfbb 9534ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9535
81ecdfbb 9536$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9537
bec39cab 9538
81ecdfbb
RW
9539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9540$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9541if test "${ac_cv_os_cray+set}" = set; then :
9542 $as_echo_n "(cached) " >&6
a9322a30 9543else
81ecdfbb 9544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9545/* end confdefs.h. */
81ecdfbb 9546#if defined CRAY && ! defined CRAY2
a9322a30
TT
9547webecray
9548#else
9549wenotbecray
9550#endif
9551
9552_ACEOF
9553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9554 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9555 ac_cv_os_cray=yes
9556else
81ecdfbb 9557 ac_cv_os_cray=no
bec39cab 9558fi
81ecdfbb
RW
9559rm -f conftest*
9560
bec39cab 9561fi
81ecdfbb
RW
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9563$as_echo "$ac_cv_os_cray" >&6; }
9564if test $ac_cv_os_cray = yes; then
9565 for ac_func in _getb67 GETB67 getb67; do
9566 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9567ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9568eval as_val=\$$as_ac_var
9569 if test "x$as_val" = x""yes; then :
a9322a30
TT
9570
9571cat >>confdefs.h <<_ACEOF
9572#define CRAY_STACKSEG_END $ac_func
bec39cab 9573_ACEOF
c906108c 9574
a9322a30 9575 break
c906108c
SS
9576fi
9577
a9322a30
TT
9578 done
9579fi
bec39cab 9580
81ecdfbb
RW
9581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9582$as_echo_n "checking stack direction for C alloca... " >&6; }
9583if test "${ac_cv_c_stack_direction+set}" = set; then :
9584 $as_echo_n "(cached) " >&6
a9322a30 9585else
81ecdfbb 9586 if test "$cross_compiling" = yes; then :
a9322a30 9587 ac_cv_c_stack_direction=0
bec39cab 9588else
81ecdfbb 9589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9590/* end confdefs.h. */
81ecdfbb 9591$ac_includes_default
a9322a30
TT
9592int
9593find_stack_direction ()
b4e70030 9594{
a9322a30
TT
9595 static char *addr = 0;
9596 auto char dummy;
9597 if (addr == 0)
9598 {
9599 addr = &dummy;
9600 return find_stack_direction ();
9601 }
9602 else
9603 return (&dummy > addr) ? 1 : -1;
b4e70030 9604}
b757528f 9605
bec39cab
AC
9606int
9607main ()
9608{
81ecdfbb 9609 return find_stack_direction () < 0;
bec39cab
AC
9610}
9611_ACEOF
81ecdfbb 9612if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9613 ac_cv_c_stack_direction=1
9614else
81ecdfbb 9615 ac_cv_c_stack_direction=-1
a9322a30 9616fi
81ecdfbb
RW
9617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9618 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9619fi
a9322a30 9620
81ecdfbb
RW
9621fi
9622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9623$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9624cat >>confdefs.h <<_ACEOF
9625#define STACK_DIRECTION $ac_cv_c_stack_direction
9626_ACEOF
9627
9628
9629fi
9630
a9322a30 9631for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9632do :
9633 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9634ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9635eval as_val=\$$as_ac_Header
9636 if test "x$as_val" = x""yes; then :
bec39cab 9637 cat >>confdefs.h <<_ACEOF
81ecdfbb 9638#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9639_ACEOF
b757528f 9640
b757528f 9641fi
bec39cab 9642
a9322a30 9643done
a3828db0 9644
a9322a30 9645for ac_func in getpagesize
81ecdfbb
RW
9646do :
9647 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9648if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9649 cat >>confdefs.h <<_ACEOF
81ecdfbb 9650#define HAVE_GETPAGESIZE 1
bec39cab 9651_ACEOF
bcb3dc3d 9652
bcb3dc3d
MK
9653fi
9654done
9655
81ecdfbb
RW
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9657$as_echo_n "checking for working mmap... " >&6; }
9658if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9659 $as_echo_n "(cached) " >&6
a9322a30 9660else
81ecdfbb 9661 if test "$cross_compiling" = yes; then :
a9322a30 9662 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9663else
81ecdfbb 9664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9665/* end confdefs.h. */
a9322a30
TT
9666$ac_includes_default
9667/* malloc might have been renamed as rpl_malloc. */
9668#undef malloc
bec39cab 9669
a9322a30
TT
9670/* Thanks to Mike Haertel and Jim Avera for this test.
9671 Here is a matrix of mmap possibilities:
9672 mmap private not fixed
9673 mmap private fixed at somewhere currently unmapped
9674 mmap private fixed at somewhere already mapped
9675 mmap shared not fixed
9676 mmap shared fixed at somewhere currently unmapped
9677 mmap shared fixed at somewhere already mapped
9678 For private mappings, we should verify that changes cannot be read()
9679 back from the file, nor mmap's back from the file at a different
9680 address. (There have been systems where private was not correctly
9681 implemented like the infamous i386 svr4.0, and systems where the
9682 VM page cache was not coherent with the file system buffer cache
9683 like early versions of FreeBSD and possibly contemporary NetBSD.)
9684 For shared mappings, we should conversely verify that changes get
9685 propagated back to all the places they're supposed to be.
bec39cab 9686
a9322a30
TT
9687 Grep wants private fixed already mapped.
9688 The main things grep needs to know about mmap are:
9689 * does it exist and is it safe to write into the mmap'd area
9690 * how to use it (BSD variants) */
8b9cf735 9691
a9322a30
TT
9692#include <fcntl.h>
9693#include <sys/mman.h>
8b9cf735 9694
81ecdfbb 9695#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9696char *malloc ();
a3828db0
MK
9697#endif
9698
a9322a30 9699/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9700#ifndef HAVE_GETPAGESIZE
a9322a30 9701/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9702# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9703# define HAVE_SYS_PARAM_H 1
9704# endif
9705
9706# ifdef _SC_PAGESIZE
9707# define getpagesize() sysconf(_SC_PAGESIZE)
9708# else /* no _SC_PAGESIZE */
81ecdfbb 9709# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9710# include <sys/param.h>
9711# ifdef EXEC_PAGESIZE
9712# define getpagesize() EXEC_PAGESIZE
9713# else /* no EXEC_PAGESIZE */
9714# ifdef NBPG
9715# define getpagesize() NBPG * CLSIZE
9716# ifndef CLSIZE
9717# define CLSIZE 1
9718# endif /* no CLSIZE */
9719# else /* no NBPG */
9720# ifdef NBPC
9721# define getpagesize() NBPC
9722# else /* no NBPC */
9723# ifdef PAGESIZE
9724# define getpagesize() PAGESIZE
9725# endif /* PAGESIZE */
9726# endif /* no NBPC */
9727# endif /* no NBPG */
9728# endif /* no EXEC_PAGESIZE */
9729# else /* no HAVE_SYS_PARAM_H */
9730# define getpagesize() 8192 /* punt totally */
9731# endif /* no HAVE_SYS_PARAM_H */
9732# endif /* no _SC_PAGESIZE */
9733
9734#endif /* no HAVE_GETPAGESIZE */
9735
bec39cab
AC
9736int
9737main ()
9738{
a9322a30
TT
9739 char *data, *data2, *data3;
9740 int i, pagesize;
9741 int fd;
9742
9743 pagesize = getpagesize ();
9744
9745 /* First, make a file with some known garbage in it. */
9746 data = (char *) malloc (pagesize);
9747 if (!data)
81ecdfbb 9748 return 1;
a9322a30
TT
9749 for (i = 0; i < pagesize; ++i)
9750 *(data + i) = rand ();
9751 umask (0);
9752 fd = creat ("conftest.mmap", 0600);
9753 if (fd < 0)
81ecdfbb 9754 return 1;
a9322a30 9755 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9756 return 1;
a9322a30
TT
9757 close (fd);
9758
9759 /* Next, try to mmap the file at a fixed address which already has
9760 something else allocated at it. If we can, also make sure that
9761 we see the same garbage. */
9762 fd = open ("conftest.mmap", O_RDWR);
9763 if (fd < 0)
81ecdfbb 9764 return 1;
a9322a30
TT
9765 data2 = (char *) malloc (2 * pagesize);
9766 if (!data2)
81ecdfbb
RW
9767 return 1;
9768 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9769 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9770 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9771 return 1;
a9322a30
TT
9772 for (i = 0; i < pagesize; ++i)
9773 if (*(data + i) != *(data2 + i))
81ecdfbb 9774 return 1;
a9322a30
TT
9775
9776 /* Finally, make sure that changes to the mapped area do not
9777 percolate back to the file as seen by read(). (This is a bug on
9778 some variants of i386 svr4.0.) */
9779 for (i = 0; i < pagesize; ++i)
9780 *(data2 + i) = *(data2 + i) + 1;
9781 data3 = (char *) malloc (pagesize);
9782 if (!data3)
81ecdfbb 9783 return 1;
a9322a30 9784 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9785 return 1;
a9322a30
TT
9786 for (i = 0; i < pagesize; ++i)
9787 if (*(data + i) != *(data3 + i))
81ecdfbb 9788 return 1;
a9322a30 9789 close (fd);
81ecdfbb 9790 return 0;
bec39cab
AC
9791}
9792_ACEOF
81ecdfbb 9793if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9794 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9795else
81ecdfbb 9796 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9797fi
81ecdfbb
RW
9798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9799 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9800fi
81ecdfbb 9801
a9322a30 9802fi
81ecdfbb
RW
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9804$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9805if test $ac_cv_func_mmap_fixed_mapped = yes; then
9806
81ecdfbb 9807$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9808
086ec9eb 9809fi
a9322a30 9810rm -f conftest.mmap
a3828db0 9811
81ecdfbb
RW
9812ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9813if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9814
a9322a30
TT
9815else
9816
9817cat >>confdefs.h <<_ACEOF
9818#define pid_t int
bec39cab 9819_ACEOF
086ec9eb
MK
9820
9821fi
9822
81ecdfbb
RW
9823for ac_header in vfork.h
9824do :
9825 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9826if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9827 cat >>confdefs.h <<_ACEOF
81ecdfbb 9828#define HAVE_VFORK_H 1
bec39cab 9829_ACEOF
c906108c
SS
9830
9831fi
a9322a30 9832
a3828db0 9833done
c906108c 9834
a9322a30 9835for ac_func in fork vfork
81ecdfbb
RW
9836do :
9837 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9838ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9839eval as_val=\$$as_ac_var
9840 if test "x$as_val" = x""yes; then :
a3828db0 9841 cat >>confdefs.h <<_ACEOF
81ecdfbb 9842#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9843_ACEOF
b83266a0 9844
97bf5e38 9845fi
a3828db0 9846done
b83266a0 9847
a9322a30 9848if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9850$as_echo_n "checking for working fork... " >&6; }
9851if test "${ac_cv_func_fork_works+set}" = set; then :
9852 $as_echo_n "(cached) " >&6
a9322a30 9853else
81ecdfbb 9854 if test "$cross_compiling" = yes; then :
a9322a30
TT
9855 ac_cv_func_fork_works=cross
9856else
81ecdfbb
RW
9857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9858/* end confdefs.h. */
9859$ac_includes_default
9860int
9861main ()
9862{
9863
9864 /* By Ruediger Kuhlmann. */
9865 return fork () < 0;
9866
9867 ;
9868 return 0;
9869}
a9322a30 9870_ACEOF
81ecdfbb 9871if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9872 ac_cv_func_fork_works=yes
9873else
81ecdfbb 9874 ac_cv_func_fork_works=no
a9322a30 9875fi
81ecdfbb
RW
9876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9877 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9878fi
81ecdfbb 9879
a9322a30 9880fi
81ecdfbb
RW
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9882$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9883
9884else
9885 ac_cv_func_fork_works=$ac_cv_func_fork
9886fi
9887if test "x$ac_cv_func_fork_works" = xcross; then
9888 case $host in
9889 *-*-amigaos* | *-*-msdosdjgpp*)
9890 # Override, as these systems have only a dummy fork() stub
9891 ac_cv_func_fork_works=no
9892 ;;
9893 *)
9894 ac_cv_func_fork_works=yes
9895 ;;
9896 esac
81ecdfbb
RW
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9898$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9899fi
9900ac_cv_func_vfork_works=$ac_cv_func_vfork
9901if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9903$as_echo_n "checking for working vfork... " >&6; }
9904if test "${ac_cv_func_vfork_works+set}" = set; then :
9905 $as_echo_n "(cached) " >&6
a9322a30 9906else
81ecdfbb 9907 if test "$cross_compiling" = yes; then :
a9322a30
TT
9908 ac_cv_func_vfork_works=cross
9909else
81ecdfbb 9910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9911/* end confdefs.h. */
9912/* Thanks to Paul Eggert for this test. */
81ecdfbb 9913$ac_includes_default
a9322a30 9914#include <sys/wait.h>
81ecdfbb 9915#ifdef HAVE_VFORK_H
a9322a30
TT
9916# include <vfork.h>
9917#endif
9918/* On some sparc systems, changes by the child to local and incoming
9919 argument registers are propagated back to the parent. The compiler
9920 is told about this with #include <vfork.h>, but some compilers
9921 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9922 static variable whose address is put into a register that is
9923 clobbered by the vfork. */
9924static void
9925#ifdef __cplusplus
9926sparc_address_test (int arg)
9927# else
9928sparc_address_test (arg) int arg;
9929#endif
9930{
9931 static pid_t child;
9932 if (!child) {
9933 child = vfork ();
9934 if (child < 0) {
9935 perror ("vfork");
9936 _exit(2);
9937 }
9938 if (!child) {
9939 arg = getpid();
9940 write(-1, "", 0);
9941 _exit (arg);
9942 }
9943 }
9944}
9945
9946int
9947main ()
9948{
9949 pid_t parent = getpid ();
9950 pid_t child;
9951
9952 sparc_address_test (0);
9953
9954 child = vfork ();
9955
9956 if (child == 0) {
9957 /* Here is another test for sparc vfork register problems. This
9958 test uses lots of local variables, at least as many local
9959 variables as main has allocated so far including compiler
9960 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9961 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9962 reuse the register of parent for one of the local variables,
9963 since it will think that parent can't possibly be used any more
9964 in this routine. Assigning to the local variable will thus
9965 munge parent in the parent process. */
9966 pid_t
9967 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9968 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9969 /* Convince the compiler that p..p7 are live; otherwise, it might
9970 use the same hardware register for all 8 local variables. */
9971 if (p != p1 || p != p2 || p != p3 || p != p4
9972 || p != p5 || p != p6 || p != p7)
9973 _exit(1);
9974
9975 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9976 from child file descriptors. If the child closes a descriptor
9977 before it execs or exits, this munges the parent's descriptor
9978 as well. Test for this by closing stdout in the child. */
9979 _exit(close(fileno(stdout)) != 0);
9980 } else {
9981 int status;
9982 struct stat st;
9983
9984 while (wait(&status) != child)
9985 ;
81ecdfbb 9986 return (
a9322a30
TT
9987 /* Was there some problem with vforking? */
9988 child < 0
9989
9990 /* Did the child fail? (This shouldn't happen.) */
9991 || status
9992
9993 /* Did the vfork/compiler bug occur? */
9994 || parent != getpid()
9995
9996 /* Did the file descriptor bug occur? */
9997 || fstat(fileno(stdout), &st) != 0
9998 );
9999 }
10000}
10001_ACEOF
81ecdfbb 10002if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10003 ac_cv_func_vfork_works=yes
10004else
81ecdfbb 10005 ac_cv_func_vfork_works=no
a9322a30 10006fi
81ecdfbb
RW
10007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10008 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10009fi
81ecdfbb 10010
a9322a30 10011fi
81ecdfbb
RW
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10013$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10014
10015fi;
10016if test "x$ac_cv_func_fork_works" = xcross; then
10017 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10019$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10020fi
10021
10022if test "x$ac_cv_func_vfork_works" = xyes; then
10023
81ecdfbb 10024$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10025
10026else
10027
81ecdfbb 10028$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10029
10030fi
10031if test "x$ac_cv_func_fork_works" = xyes; then
10032
81ecdfbb 10033$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10034
10035fi
10036
7313baad 10037for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10038 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10039 sbrk setpgid setpgrp setsid \
a9322a30 10040 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10041 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10042 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10043do :
10044 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10045ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10046eval as_val=\$$as_ac_var
10047 if test "x$as_val" = x""yes; then :
6c7a06a3 10048 cat >>confdefs.h <<_ACEOF
81ecdfbb 10049#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10050_ACEOF
10051
10052fi
10053done
10054
10055
81ecdfbb
RW
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10057$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10058if test "${am_cv_langinfo_codeset+set}" = set; then :
10059 $as_echo_n "(cached) " >&6
6c7a06a3 10060else
81ecdfbb 10061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10062/* end confdefs.h. */
10063#include <langinfo.h>
10064int
10065main ()
10066{
10067char* cs = nl_langinfo(CODESET);
bec39cab
AC
10068 ;
10069 return 0;
10070}
10071_ACEOF
81ecdfbb 10072if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10073 am_cv_langinfo_codeset=yes
a4db0f07 10074else
81ecdfbb 10075 am_cv_langinfo_codeset=no
a4db0f07 10076fi
81ecdfbb
RW
10077rm -f core conftest.err conftest.$ac_objext \
10078 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10079
a4db0f07 10080fi
81ecdfbb
RW
10081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10082$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10083 if test $am_cv_langinfo_codeset = yes; then
10084
81ecdfbb 10085$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10086
6c7a06a3 10087 fi
c906108c 10088
06825bd1 10089
a3828db0
MK
10090# Check the return and argument types of ptrace. No canned test for
10091# this, so roll our own.
10092gdb_ptrace_headers='
10093#if HAVE_SYS_TYPES_H
10094# include <sys/types.h>
10095#endif
10096#if HAVE_SYS_PTRACE_H
10097# include <sys/ptrace.h>
10098#endif
10099#if HAVE_UNISTD_H
10100# include <unistd.h>
10101#endif
10102'
10103# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10104ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10105"
10106if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10107 ac_have_decl=1
06825bd1 10108else
81ecdfbb 10109 ac_have_decl=0
06825bd1 10110fi
06825bd1 10111
a3828db0 10112cat >>confdefs.h <<_ACEOF
81ecdfbb 10113#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10114_ACEOF
81ecdfbb 10115if test $ac_have_decl = 1; then :
bec39cab 10116
a3828db0 10117else
a3828db0
MK
10118
10119 : ${gdb_cv_func_ptrace_ret='int'}
10120 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10121
06825bd1
MK
10122fi
10123
064ef605
DJ
10124# Check return type. Varargs (used on GNU/Linux) conflict with the
10125# empty argument list, so check for that explicitly.
81ecdfbb
RW
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10127$as_echo_n "checking return type of ptrace... " >&6; }
10128if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10129 $as_echo_n "(cached) " >&6
bec39cab 10130else
81ecdfbb 10131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10132/* end confdefs.h. */
a3828db0 10133$gdb_ptrace_headers
bec39cab
AC
10134int
10135main ()
10136{
064ef605
DJ
10137extern long ptrace (enum __ptrace_request, ...);
10138 ;
10139 return 0;
10140}
10141_ACEOF
81ecdfbb 10142if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10143 gdb_cv_func_ptrace_ret='long'
10144else
81ecdfbb 10145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10146/* end confdefs.h. */
10147$gdb_ptrace_headers
10148int
10149main ()
10150{
a3828db0 10151extern int ptrace ();
bec39cab
AC
10152 ;
10153 return 0;
10154}
10155_ACEOF
81ecdfbb 10156if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10157 gdb_cv_func_ptrace_ret='int'
70f9f479 10158else
81ecdfbb 10159 gdb_cv_func_ptrace_ret='long'
70f9f479 10160fi
81ecdfbb 10161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10162fi
81ecdfbb 10163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10164fi
81ecdfbb
RW
10165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10166$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10167
a3828db0
MK
10168cat >>confdefs.h <<_ACEOF
10169#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10170_ACEOF
70f9f479 10171
a3828db0 10172# Check argument types.
81ecdfbb
RW
10173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10174$as_echo_n "checking types of arguments for ptrace... " >&6; }
10175if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10176 $as_echo_n "(cached) " >&6
bec39cab 10177else
a3828db0 10178
81ecdfbb 10179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10180/* end confdefs.h. */
10181$gdb_ptrace_headers
10182int
10183main ()
10184{
10185extern long ptrace (enum __ptrace_request, ...);
10186 ;
10187 return 0;
10188}
10189_ACEOF
81ecdfbb 10190if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10191 gdb_cv_func_ptrace_args='int,int,long,long'
10192else
064ef605 10193
a3828db0
MK
10194for gdb_arg1 in 'int' 'long'; do
10195 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10196 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10197 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10199/* end confdefs.h. */
a3828db0 10200$gdb_ptrace_headers
bec39cab
AC
10201int
10202main ()
10203{
a3828db0
MK
10204
10205extern $gdb_cv_func_ptrace_ret
10206 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10207
bec39cab
AC
10208 ;
10209 return 0;
10210}
10211_ACEOF
81ecdfbb 10212if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10213 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10214 break 4;
5c7f2947 10215fi
81ecdfbb 10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10217 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10219/* end confdefs.h. */
a3828db0 10220$gdb_ptrace_headers
bec39cab
AC
10221int
10222main ()
10223{
a3828db0
MK
10224
10225extern $gdb_cv_func_ptrace_ret
10226 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10227
bec39cab
AC
10228 ;
10229 return 0;
10230}
10231_ACEOF
81ecdfbb 10232if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10233
10234gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10235 break 5;
78434e59 10236fi
81ecdfbb 10237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10238 done
10239 done
10240 done
10241 done
10242done
10243# Provide a safe default value.
10244: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10245
064ef605 10246fi
81ecdfbb 10247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10248fi
81ecdfbb
RW
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10250$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10251ac_save_IFS=$IFS; IFS=','
10252set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10253IFS=$ac_save_IFS
10254shift
bec39cab 10255
a3828db0
MK
10256cat >>confdefs.h <<_ACEOF
10257#define PTRACE_TYPE_ARG3 $3
10258_ACEOF
10259
10260if test -n "$5"; then
10261
10262cat >>confdefs.h <<_ACEOF
10263#define PTRACE_TYPE_ARG5 $5
bec39cab 10264_ACEOF
78434e59
MK
10265
10266fi
10267
a3828db0 10268if test "$cross_compiling" = no; then
81ecdfbb
RW
10269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10270$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10271if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10272 $as_echo_n "(cached) " >&6
a3828db0 10273else
81ecdfbb
RW
10274 if test "$cross_compiling" = yes; then :
10275 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10276else
81ecdfbb 10277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10278/* end confdefs.h. */
81ecdfbb 10279$ac_includes_default
bec39cab
AC
10280int
10281main ()
10282{
a3828db0
MK
10283/* If this system has a BSD-style setpgrp which takes arguments,
10284 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10285 exit successfully. */
81ecdfbb 10286 return setpgrp (1,1) != -1;
bec39cab
AC
10287 ;
10288 return 0;
10289}
10290_ACEOF
81ecdfbb 10291if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10292 ac_cv_func_setpgrp_void=no
c906108c 10293else
81ecdfbb 10294 ac_cv_func_setpgrp_void=yes
c906108c 10295fi
81ecdfbb
RW
10296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10297 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10298fi
81ecdfbb 10299
a3828db0 10300fi
81ecdfbb
RW
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10302$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10303if test $ac_cv_func_setpgrp_void = yes; then
10304
81ecdfbb 10305$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10306
10307fi
a3828db0
MK
10308
10309else
81ecdfbb
RW
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10311$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10312if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10313 $as_echo_n "(cached) " >&6
97bf5e38 10314else
81ecdfbb 10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10316/* end confdefs.h. */
a3828db0
MK
10317
10318#include <unistd.h>
10319
bec39cab
AC
10320int
10321main ()
10322{
a3828db0
MK
10323
10324 if (setpgrp(1,1) == -1)
10325 exit (0);
10326 else
10327 exit (1);
10328
bec39cab
AC
10329 ;
10330 return 0;
10331}
10332_ACEOF
81ecdfbb 10333if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10334 ac_cv_func_setpgrp_void=no
c906108c 10335else
81ecdfbb 10336 ac_cv_func_setpgrp_void=yes
c906108c 10337fi
81ecdfbb 10338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10339fi
81ecdfbb
RW
10340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10341$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10342if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10343 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10344
a3828db0 10345fi
c906108c
SS
10346fi
10347
a3828db0
MK
10348# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10349# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10351$as_echo_n "checking for sigsetjmp... " >&6; }
10352if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10353 $as_echo_n "(cached) " >&6
bec39cab 10354else
81ecdfbb 10355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10356/* end confdefs.h. */
a3828db0
MK
10357
10358#include <setjmp.h>
10359
bec39cab
AC
10360int
10361main ()
10362{
a3828db0 10363sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10364 ;
10365 return 0;
10366}
10367_ACEOF
81ecdfbb 10368if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10369 gdb_cv_func_sigsetjmp=yes
c906108c 10370else
81ecdfbb 10371 gdb_cv_func_sigsetjmp=no
c906108c 10372fi
81ecdfbb 10373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10374fi
81ecdfbb
RW
10375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10376$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10377if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10378
81ecdfbb 10379$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10380
97bf5e38 10381fi
c906108c 10382
a3828db0
MK
10383# Assume we'll default to using the included libiberty regex.
10384gdb_use_included_regex=yes
10385
10386# However, if the system regex is GNU regex, then default to *not*
10387# using the included regex.
81ecdfbb
RW
10388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10389$as_echo_n "checking for GNU regex... " >&6; }
10390if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10391 $as_echo_n "(cached) " >&6
bec39cab 10392else
81ecdfbb 10393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10394/* end confdefs.h. */
a3828db0 10395#include <gnu-versions.h>
bec39cab
AC
10396int
10397main ()
10398{
81ecdfbb
RW
10399#define REGEX_INTERFACE_VERSION 1
10400#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10401# error "Version mismatch"
10402#endif
5c45e068
MK
10403 ;
10404 return 0;
10405}
10406_ACEOF
81ecdfbb
RW
10407if ac_fn_c_try_compile "$LINENO"; then :
10408 gdb_cv_have_gnu_regex=yes
5c45e068 10409else
81ecdfbb
RW
10410 gdb_cv_have_gnu_regex=no
10411fi
10412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10413fi
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10415$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10416if test $gdb_cv_have_gnu_regex = yes; then
10417 gdb_use_included_regex=no
5c45e068 10418fi
81ecdfbb
RW
10419
10420
10421# Check whether --with-included-regex was given.
10422if test "${with_included_regex+set}" = set; then :
10423 withval=$with_included_regex; gdb_with_regex=$withval
10424else
10425 gdb_with_regex=$gdb_use_included_regex
c906108c 10426fi
81ecdfbb
RW
10427
10428if test "$gdb_with_regex" = yes; then
10429
10430$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10431
c906108c 10432fi
81ecdfbb
RW
10433
10434# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10435ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10436#include <sys/proc.h>
10437
10438"
10439if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10440
5c45e068 10441cat >>confdefs.h <<_ACEOF
a3828db0 10442#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10443_ACEOF
c906108c 10444
5c45e068 10445
97bf5e38 10446fi
c906108c 10447
5c45e068 10448
a3828db0 10449# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10451$as_echo_n "checking for struct lwp... " >&6; }
10452if test "${gdb_cv_struct_lwp+set}" = set; then :
10453 $as_echo_n "(cached) " >&6
bec39cab 10454else
81ecdfbb 10455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10456/* end confdefs.h. */
a3828db0
MK
10457#include <sys/param.h>
10458#include <sys/lwp.h>
bec39cab
AC
10459int
10460main ()
10461{
a3828db0 10462struct lwp l;
bec39cab
AC
10463 ;
10464 return 0;
10465}
10466_ACEOF
81ecdfbb 10467if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10468 gdb_cv_struct_lwp=yes
c906108c 10469else
81ecdfbb 10470 gdb_cv_struct_lwp=no
c906108c 10471fi
81ecdfbb 10472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10473fi
81ecdfbb
RW
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10475$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10476if test $gdb_cv_struct_lwp = yes; then
c906108c 10477
81ecdfbb 10478$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10479
97bf5e38 10480fi
c906108c 10481
a3828db0 10482# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10484$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10485if test "${gdb_cv_struct_reg+set}" = set; then :
10486 $as_echo_n "(cached) " >&6
bec39cab 10487else
81ecdfbb 10488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10489/* end confdefs.h. */
a3828db0
MK
10490#include <sys/types.h>
10491#include <machine/reg.h>
bec39cab
AC
10492int
10493main ()
10494{
a3828db0 10495struct reg r;
bec39cab
AC
10496 ;
10497 return 0;
10498}
10499_ACEOF
81ecdfbb 10500if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10501 gdb_cv_struct_reg=yes
27ca5dad 10502else
81ecdfbb 10503 gdb_cv_struct_reg=no
27ca5dad 10504fi
81ecdfbb 10505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10506fi
81ecdfbb
RW
10507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10508$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10509if test $gdb_cv_struct_reg = yes; then
bec39cab 10510
81ecdfbb 10511$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10512
10513fi
97bf5e38 10514
a3828db0
MK
10515# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10516# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10517ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10518"
10519if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10520
10521cat >>confdefs.h <<_ACEOF
a3828db0 10522#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10523_ACEOF
3862412b 10524
5c45e068 10525
97bf5e38 10526fi
81ecdfbb
RW
10527ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10528"
10529if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10530
10531cat >>confdefs.h <<_ACEOF
a3828db0 10532#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10533_ACEOF
3862412b 10534
5c45e068 10535
97bf5e38 10536fi
3862412b 10537
5c45e068 10538
a3828db0 10539# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10541$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10542if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10543 $as_echo_n "(cached) " >&6
451928c5 10544else
81ecdfbb 10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10546/* end confdefs.h. */
a3828db0 10547#include <sys/ptrace.h>
bec39cab
AC
10548int
10549main ()
10550{
a3828db0 10551PTRACE_GETREGS;
bec39cab
AC
10552 ;
10553 return 0;
10554}
10555_ACEOF
81ecdfbb 10556if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10557 gdb_cv_have_ptrace_getregs=yes
451928c5 10558else
81ecdfbb 10559 gdb_cv_have_ptrace_getregs=no
451928c5 10560fi
81ecdfbb 10561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10562fi
10563
81ecdfbb
RW
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10565$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10566if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10567
81ecdfbb 10568$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10569
97bf5e38 10570fi
451928c5 10571
a3828db0 10572# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10574$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10575if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10576 $as_echo_n "(cached) " >&6
451928c5 10577else
81ecdfbb 10578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10579/* end confdefs.h. */
a3828db0 10580#include <sys/ptrace.h>
bec39cab
AC
10581int
10582main ()
10583{
a3828db0 10584PTRACE_GETFPXREGS;
bec39cab
AC
10585 ;
10586 return 0;
10587}
10588_ACEOF
81ecdfbb 10589if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10590 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10591else
81ecdfbb 10592 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10593fi
81ecdfbb 10594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10595fi
10596
81ecdfbb
RW
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10598$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10599if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10600
81ecdfbb 10601$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10602
97bf5e38 10603fi
451928c5 10604
a3828db0 10605# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10607$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10608if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10609 $as_echo_n "(cached) " >&6
3862412b 10610else
81ecdfbb 10611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10612/* end confdefs.h. */
a3828db0
MK
10613#include <sys/types.h>
10614#include <sys/ptrace.h>
bec39cab
AC
10615int
10616main ()
10617{
a3828db0 10618PT_GETDBREGS;
bec39cab
AC
10619 ;
10620 return 0;
10621}
10622_ACEOF
81ecdfbb 10623if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10624 gdb_cv_have_pt_getdbregs=yes
3862412b 10625else
81ecdfbb 10626 gdb_cv_have_pt_getdbregs=no
3862412b 10627fi
81ecdfbb 10628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10629fi
10630
81ecdfbb
RW
10631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10632$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10633if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10634
81ecdfbb 10635$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10636
97bf5e38 10637fi
3862412b 10638
a3828db0 10639# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10641$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10642if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10643 $as_echo_n "(cached) " >&6
3862412b 10644else
81ecdfbb 10645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10646/* end confdefs.h. */
a3828db0
MK
10647#include <sys/types.h>
10648#include <sys/ptrace.h>
bec39cab
AC
10649int
10650main ()
10651{
a3828db0 10652PT_GETXMMREGS;
bec39cab
AC
10653 ;
10654 return 0;
10655}
10656_ACEOF
81ecdfbb 10657if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10658 gdb_cv_have_pt_getxmmregs=yes
3862412b 10659else
81ecdfbb 10660 gdb_cv_have_pt_getxmmregs=no
3862412b 10661fi
81ecdfbb 10662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10663fi
10664
81ecdfbb
RW
10665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10666$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10667if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10668
81ecdfbb 10669$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10670
97bf5e38 10671fi
3862412b 10672
eb368090 10673# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10674
10675if test "${target}" = "${host}"; then
10676 case "${host}" in
97bf5e38 10677 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10678
81ecdfbb 10679$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10680
10681 ;;
c162e8c9 10682 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10683
81ecdfbb 10684$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10685
10686 ;;
10687 mips-sgi-irix5*)
10688 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10689
81ecdfbb 10690$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10691
10692 ;;
10693 esac
10694fi
10695
10696if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10698$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10699 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10700 $as_echo_n "(cached) " >&6
bec39cab 10701else
81ecdfbb 10702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10703/* end confdefs.h. */
596c9d4b
KB
10704
10705#define _SYSCALL32
d30c5336
JK
10706/* Needed for new procfs interface on sparc-solaris. */
10707#define _STRUCTURED_PROC 1
596c9d4b 10708#include <sys/procfs.h>
bec39cab
AC
10709int
10710main ()
10711{
97bf5e38 10712pstatus_t avar
bec39cab
AC
10713 ;
10714 return 0;
10715}
10716_ACEOF
81ecdfbb 10717if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10718 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10719else
81ecdfbb 10720 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10721
596c9d4b 10722fi
81ecdfbb 10723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10724fi
10725
97bf5e38 10726 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10727
81ecdfbb 10728$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10729
10730 fi
81ecdfbb
RW
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10732$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10733
81ecdfbb
RW
10734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10735$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10736 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10737 $as_echo_n "(cached) " >&6
596c9d4b 10738else
81ecdfbb 10739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10740/* end confdefs.h. */
596c9d4b
KB
10741
10742#define _SYSCALL32
d30c5336
JK
10743/* Needed for new procfs interface on sparc-solaris. */
10744#define _STRUCTURED_PROC 1
596c9d4b 10745#include <sys/procfs.h>
bec39cab
AC
10746int
10747main ()
10748{
97bf5e38 10749prrun_t avar
bec39cab
AC
10750 ;
10751 return 0;
10752}
10753_ACEOF
81ecdfbb 10754if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10755 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10756else
81ecdfbb 10757 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10758
596c9d4b 10759fi
81ecdfbb 10760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10761fi
10762
97bf5e38 10763 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10764
81ecdfbb 10765$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10766
10767 fi
81ecdfbb
RW
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10769$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10770
81ecdfbb
RW
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10772$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10773 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10774 $as_echo_n "(cached) " >&6
596c9d4b 10775else
81ecdfbb 10776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10777/* end confdefs.h. */
596c9d4b
KB
10778
10779#define _SYSCALL32
d30c5336
JK
10780/* Needed for new procfs interface on sparc-solaris. */
10781#define _STRUCTURED_PROC 1
596c9d4b 10782#include <sys/procfs.h>
bec39cab
AC
10783int
10784main ()
10785{
97bf5e38 10786gregset_t avar
bec39cab
AC
10787 ;
10788 return 0;
10789}
10790_ACEOF
81ecdfbb 10791if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10792 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10793else
81ecdfbb 10794 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10795
596c9d4b 10796fi
81ecdfbb 10797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10798fi
10799
97bf5e38 10800 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10801
81ecdfbb 10802$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10803
10804 fi
81ecdfbb
RW
10805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10806$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10807
81ecdfbb
RW
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10809$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10810 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10811 $as_echo_n "(cached) " >&6
d84dd0c5 10812else
81ecdfbb 10813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10814/* end confdefs.h. */
97bf5e38
MK
10815
10816#define _SYSCALL32
d30c5336
JK
10817/* Needed for new procfs interface on sparc-solaris. */
10818#define _STRUCTURED_PROC 1
d84dd0c5 10819#include <sys/procfs.h>
bec39cab
AC
10820int
10821main ()
10822{
97bf5e38 10823fpregset_t avar
bec39cab
AC
10824 ;
10825 return 0;
10826}
10827_ACEOF
81ecdfbb 10828if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10829 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10830else
81ecdfbb 10831 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10832
d84dd0c5 10833fi
81ecdfbb 10834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10835fi
10836
97bf5e38 10837 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10838
81ecdfbb 10839$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10840
97bf5e38 10841 fi
81ecdfbb
RW
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10843$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 10844
81ecdfbb
RW
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10846$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10847 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
10848 $as_echo_n "(cached) " >&6
c906108c 10849else
81ecdfbb 10850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10851/* end confdefs.h. */
c906108c 10852
97bf5e38 10853#define _SYSCALL32
d30c5336
JK
10854/* Needed for new procfs interface on sparc-solaris. */
10855#define _STRUCTURED_PROC 1
97bf5e38 10856#include <sys/procfs.h>
bec39cab
AC
10857int
10858main ()
10859{
97bf5e38 10860prgregset_t avar
bec39cab
AC
10861 ;
10862 return 0;
10863}
10864_ACEOF
81ecdfbb 10865if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10866 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 10867else
81ecdfbb 10868 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 10869
c906108c 10870fi
81ecdfbb 10871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
10872fi
10873
97bf5e38 10874 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 10875
81ecdfbb 10876$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 10877
97bf5e38 10878 fi
81ecdfbb
RW
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10880$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 10881
81ecdfbb
RW
10882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10883$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10884 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
10885 $as_echo_n "(cached) " >&6
d45fe813 10886else
81ecdfbb 10887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10888/* end confdefs.h. */
97bf5e38
MK
10889
10890#define _SYSCALL32
d30c5336
JK
10891/* Needed for new procfs interface on sparc-solaris. */
10892#define _STRUCTURED_PROC 1
97bf5e38 10893#include <sys/procfs.h>
bec39cab
AC
10894int
10895main ()
10896{
97bf5e38 10897prfpregset_t avar
bec39cab
AC
10898 ;
10899 return 0;
10900}
10901_ACEOF
81ecdfbb 10902if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10903 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 10904else
81ecdfbb 10905 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 10906
d45fe813 10907fi
81ecdfbb 10908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10909fi
10910
97bf5e38 10911 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 10912
81ecdfbb 10913$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 10914
97bf5e38 10915 fi
81ecdfbb
RW
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10917$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 10918
81ecdfbb
RW
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10920$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10921 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
10922 $as_echo_n "(cached) " >&6
d45fe813 10923else
81ecdfbb 10924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10925/* end confdefs.h. */
97bf5e38
MK
10926
10927#define _SYSCALL32
d30c5336
JK
10928/* Needed for new procfs interface on sparc-solaris. */
10929#define _STRUCTURED_PROC 1
97bf5e38 10930#include <sys/procfs.h>
bec39cab
AC
10931int
10932main ()
10933{
97bf5e38 10934prgregset32_t avar
bec39cab
AC
10935 ;
10936 return 0;
10937}
10938_ACEOF
81ecdfbb 10939if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10940 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 10941else
81ecdfbb 10942 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 10943
d45fe813 10944fi
81ecdfbb 10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10946fi
10947
97bf5e38 10948 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 10949
81ecdfbb 10950$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 10951
97bf5e38 10952 fi
81ecdfbb
RW
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10954$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 10955
81ecdfbb
RW
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
10957$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
10958 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
10959 $as_echo_n "(cached) " >&6
d45fe813 10960else
81ecdfbb 10961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10962/* end confdefs.h. */
97bf5e38
MK
10963
10964#define _SYSCALL32
d30c5336
JK
10965/* Needed for new procfs interface on sparc-solaris. */
10966#define _STRUCTURED_PROC 1
97bf5e38 10967#include <sys/procfs.h>
bec39cab
AC
10968int
10969main ()
10970{
97bf5e38 10971prfpregset32_t avar
bec39cab
AC
10972 ;
10973 return 0;
10974}
10975_ACEOF
81ecdfbb 10976if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10977 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 10978else
81ecdfbb 10979 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 10980
d45fe813 10981fi
81ecdfbb 10982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10983fi
10984
97bf5e38 10985 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 10986
81ecdfbb 10987$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 10988
97bf5e38 10989 fi
81ecdfbb
RW
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
10991$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 10992
81ecdfbb
RW
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10994$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10995 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
10996 $as_echo_n "(cached) " >&6
d45fe813 10997else
81ecdfbb 10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10999/* end confdefs.h. */
97bf5e38 11000
d45fe813 11001#define _SYSCALL32
d30c5336
JK
11002/* Needed for new procfs interface on sparc-solaris. */
11003#define _STRUCTURED_PROC 1
97bf5e38 11004#include <sys/procfs.h>
bec39cab
AC
11005int
11006main ()
11007{
97bf5e38 11008lwpid_t avar
bec39cab
AC
11009 ;
11010 return 0;
11011}
11012_ACEOF
81ecdfbb 11013if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11014 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11015else
81ecdfbb 11016 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11017
d45fe813 11018fi
81ecdfbb 11019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11020fi
11021
97bf5e38 11022 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11023
81ecdfbb 11024$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11025
97bf5e38 11026 fi
81ecdfbb
RW
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11028$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11029
81ecdfbb
RW
11030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11031$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11032 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11033 $as_echo_n "(cached) " >&6
c906108c 11034else
81ecdfbb 11035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11036/* end confdefs.h. */
c906108c 11037
97bf5e38 11038#define _SYSCALL32
d30c5336
JK
11039/* Needed for new procfs interface on sparc-solaris. */
11040#define _STRUCTURED_PROC 1
97bf5e38 11041#include <sys/procfs.h>
bec39cab
AC
11042int
11043main ()
11044{
97bf5e38 11045psaddr_t avar
bec39cab
AC
11046 ;
11047 return 0;
11048}
11049_ACEOF
81ecdfbb 11050if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11051 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11052else
81ecdfbb 11053 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11054
c906108c 11055fi
81ecdfbb 11056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11057fi
11058
97bf5e38 11059 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11060
81ecdfbb 11061$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11062
97bf5e38 11063 fi
81ecdfbb
RW
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11065$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11066
81ecdfbb
RW
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11068$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11069 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11070 $as_echo_n "(cached) " >&6
c906108c 11071else
81ecdfbb 11072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11073/* end confdefs.h. */
c906108c 11074
97bf5e38 11075#define _SYSCALL32
d30c5336
JK
11076/* Needed for new procfs interface on sparc-solaris. */
11077#define _STRUCTURED_PROC 1
97bf5e38 11078#include <sys/procfs.h>
bec39cab
AC
11079int
11080main ()
11081{
97bf5e38 11082prsysent_t avar
bec39cab
AC
11083 ;
11084 return 0;
11085}
11086_ACEOF
81ecdfbb 11087if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11088 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11089else
81ecdfbb 11090 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11091
c906108c 11092fi
81ecdfbb 11093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11094fi
11095
97bf5e38 11096 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11097
81ecdfbb 11098$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11099
97bf5e38 11100 fi
81ecdfbb
RW
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11102$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11103
81ecdfbb
RW
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11105$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11106 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11107 $as_echo_n "(cached) " >&6
c906108c 11108else
81ecdfbb 11109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11110/* end confdefs.h. */
c906108c 11111
97bf5e38 11112#define _SYSCALL32
d30c5336
JK
11113/* Needed for new procfs interface on sparc-solaris. */
11114#define _STRUCTURED_PROC 1
97bf5e38 11115#include <sys/procfs.h>
bec39cab
AC
11116int
11117main ()
11118{
97bf5e38 11119pr_sigset_t avar
bec39cab
AC
11120 ;
11121 return 0;
11122}
11123_ACEOF
81ecdfbb 11124if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11125 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11126else
81ecdfbb 11127 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11128
c906108c 11129fi
81ecdfbb 11130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11131fi
11132
97bf5e38 11133 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11134
81ecdfbb 11135$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11136
97bf5e38 11137 fi
81ecdfbb
RW
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11139$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11140
81ecdfbb
RW
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11142$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11143 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11144 $as_echo_n "(cached) " >&6
c906108c 11145else
81ecdfbb 11146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11147/* end confdefs.h. */
c906108c 11148
97bf5e38 11149#define _SYSCALL32
d30c5336
JK
11150/* Needed for new procfs interface on sparc-solaris. */
11151#define _STRUCTURED_PROC 1
97bf5e38 11152#include <sys/procfs.h>
bec39cab
AC
11153int
11154main ()
11155{
97bf5e38 11156pr_sigaction64_t avar
bec39cab
AC
11157 ;
11158 return 0;
11159}
11160_ACEOF
81ecdfbb 11161if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11162 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11163else
81ecdfbb 11164 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11165
c906108c 11166fi
81ecdfbb 11167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11168fi
11169
97bf5e38 11170 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11171
81ecdfbb 11172$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11173
97bf5e38 11174 fi
81ecdfbb
RW
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11176$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11177
81ecdfbb
RW
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11179$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11180 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11181 $as_echo_n "(cached) " >&6
97bf5e38 11182else
81ecdfbb 11183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11184/* end confdefs.h. */
97bf5e38
MK
11185
11186#define _SYSCALL32
d30c5336
JK
11187/* Needed for new procfs interface on sparc-solaris. */
11188#define _STRUCTURED_PROC 1
97bf5e38 11189#include <sys/procfs.h>
bec39cab
AC
11190int
11191main ()
11192{
97bf5e38 11193pr_siginfo64_t avar
bec39cab
AC
11194 ;
11195 return 0;
11196}
11197_ACEOF
81ecdfbb 11198if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11199 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11200else
81ecdfbb 11201 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11202
97bf5e38 11203fi
81ecdfbb 11204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11205fi
c906108c 11206
97bf5e38 11207 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11208
81ecdfbb 11209$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11210
97bf5e38 11211 fi
81ecdfbb
RW
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11213$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11214
11215
97bf5e38
MK
11216
11217
11218
97bf5e38 11219 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11221$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11222 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11223 $as_echo_n "(cached) " >&6
c906108c 11224else
81ecdfbb 11225 if test "$cross_compiling" = yes; then :
97bf5e38 11226 gdb_cv_prfpregset_t_broken=yes
c906108c 11227else
81ecdfbb 11228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11229/* end confdefs.h. */
97bf5e38
MK
11230#include <sys/procfs.h>
11231 int main ()
11232 {
11233 if (sizeof (prfpregset_t) == sizeof (void *))
11234 return 1;
11235 return 0;
11236 }
bec39cab 11237_ACEOF
81ecdfbb 11238if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11239 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11240else
11241 gdb_cv_prfpregset_t_broken=yes
c906108c 11242fi
81ecdfbb
RW
11243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11244 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11245fi
81ecdfbb 11246
c906108c
SS
11247fi
11248
81ecdfbb
RW
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11250$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11251 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11252
81ecdfbb 11253$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11254
97bf5e38
MK
11255 fi
11256 fi
c906108c 11257
bec39cab 11258
81ecdfbb
RW
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11260$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11261 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11262 $as_echo_n "(cached) " >&6
c906108c 11263else
81ecdfbb 11264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11265/* end confdefs.h. */
97bf5e38
MK
11266#include <unistd.h>
11267#include <sys/types.h>
11268#include <sys/procfs.h>
11269
bec39cab
AC
11270int
11271main ()
11272{
97bf5e38
MK
11273
11274 int dummy;;
11275 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11276
11277 ;
11278 return 0;
11279}
11280_ACEOF
81ecdfbb 11281if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11282 gdb_cv_have_procfs_piocset=yes
c906108c 11283else
81ecdfbb 11284 gdb_cv_have_procfs_piocset=no
c906108c 11285fi
81ecdfbb 11286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11287fi
97bf5e38 11288
81ecdfbb
RW
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11290$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11291 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11292
81ecdfbb 11293$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11294
11295 fi
c906108c 11296fi
c906108c 11297
97bf5e38 11298if test ${host} = ${target} ; then
bec39cab 11299
81ecdfbb
RW
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11301$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11302 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11303 $as_echo_n "(cached) " >&6
bec39cab 11304else
81ecdfbb 11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11306/* end confdefs.h. */
97bf5e38 11307#include <link.h>
bec39cab
AC
11308int
11309main ()
11310{
97bf5e38 11311struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11312 ;
11313 return 0;
11314}
11315_ACEOF
81ecdfbb 11316if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11317 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11318else
81ecdfbb 11319 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11320fi
81ecdfbb 11321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11322fi
11323
81ecdfbb
RW
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11325$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11326 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11327
81ecdfbb 11328$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11329
11330 fi
11331
bec39cab 11332
81ecdfbb
RW
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11334$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11335 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11336 $as_echo_n "(cached) " >&6
c906108c 11337else
81ecdfbb 11338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11339/* end confdefs.h. */
97bf5e38
MK
11340#include <sys/types.h>
11341#include <link.h>
bec39cab
AC
11342int
11343main ()
11344{
97bf5e38 11345struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11346 ;
11347 return 0;
11348}
11349_ACEOF
81ecdfbb 11350if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11351 gdb_cv_have_struct_link_map_with_lm_members=yes
11352else
81ecdfbb 11353 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11354fi
81ecdfbb 11355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11356fi
c906108c 11357
81ecdfbb
RW
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11359$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11360 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11361
81ecdfbb 11362$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11363
11364 fi
11365
bec39cab 11366
81ecdfbb
RW
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11368$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11369 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11370 $as_echo_n "(cached) " >&6
c906108c 11371else
81ecdfbb 11372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11373/* end confdefs.h. */
97bf5e38
MK
11374#include <sys/types.h>
11375#ifdef HAVE_NLIST_H
11376#include <nlist.h>
11377#endif
11378#include <link.h>
bec39cab
AC
11379int
11380main ()
11381{
97bf5e38 11382struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11383 ;
11384 return 0;
11385}
11386_ACEOF
81ecdfbb 11387if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11388 gdb_cv_have_struct_so_map_with_som_members=yes
11389else
81ecdfbb 11390 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11391fi
81ecdfbb 11392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11393fi
c906108c 11394
81ecdfbb
RW
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11396$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11397 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11398
81ecdfbb 11399$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11400
97bf5e38 11401 fi
c906108c 11402
bec39cab 11403
81ecdfbb
RW
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11405$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11406 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11407 $as_echo_n "(cached) " >&6
97bf5e38 11408else
81ecdfbb 11409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11410/* end confdefs.h. */
97bf5e38
MK
11411#define _SYSCALL32
11412#include <sys/link.h>
bec39cab
AC
11413int
11414main ()
11415{
97bf5e38 11416struct link_map32 l;
bec39cab
AC
11417 ;
11418 return 0;
11419}
11420_ACEOF
81ecdfbb 11421if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11422 gdb_cv_have_struct_link_map32=yes
11423else
81ecdfbb 11424 gdb_cv_have_struct_link_map32=no
97bf5e38 11425fi
81ecdfbb 11426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11427fi
c906108c 11428
81ecdfbb
RW
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11430$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11431 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11432
81ecdfbb 11433$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11434
60ca704f 11435
81ecdfbb 11436$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11437
97bf5e38
MK
11438 fi
11439fi
c906108c 11440
bc8bcb4b 11441# Check if the compiler supports the `long long' type.
c906108c 11442
81ecdfbb
RW
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11444$as_echo_n "checking for long long support in compiler... " >&6; }
11445if test "${gdb_cv_c_long_long+set}" = set; then :
11446 $as_echo_n "(cached) " >&6
97bf5e38 11447else
81ecdfbb 11448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11449/* end confdefs.h. */
bc8bcb4b 11450extern long long foo;
bec39cab
AC
11451int
11452main ()
11453{
bc8bcb4b 11454switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11455 ;
11456 return 0;
11457}
11458_ACEOF
81ecdfbb 11459if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11460 gdb_cv_c_long_long=yes
11461else
81ecdfbb 11462 gdb_cv_c_long_long=no
97bf5e38 11463fi
81ecdfbb 11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11465fi
81ecdfbb
RW
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11467$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11468if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11469
81ecdfbb 11470$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11471
11472fi
11473
bc8bcb4b 11474# Check if the compiler and runtime support printing long longs.
97bf5e38 11475
81ecdfbb
RW
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11477$as_echo_n "checking for long long support in printf... " >&6; }
11478if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11479 $as_echo_n "(cached) " >&6
97bf5e38 11480else
81ecdfbb 11481 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11482 gdb_cv_printf_has_long_long=no
11483else
81ecdfbb 11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11485/* end confdefs.h. */
bc8bcb4b
MK
11486$ac_includes_default
11487int
11488main ()
11489{
11490char buf[32];
97bf5e38
MK
11491 long long l = 0;
11492 l = (l << 16) + 0x0123;
11493 l = (l << 16) + 0x4567;
11494 l = (l << 16) + 0x89ab;
11495 l = (l << 16) + 0xcdef;
11496 sprintf (buf, "0x%016llx", l);
11497 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11498 ;
11499 return 0;
c906108c 11500}
bec39cab 11501_ACEOF
81ecdfbb 11502if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11503 gdb_cv_printf_has_long_long=yes
11504else
81ecdfbb 11505 gdb_cv_printf_has_long_long=no
97bf5e38 11506fi
81ecdfbb
RW
11507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11508 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11509fi
81ecdfbb 11510
97bf5e38 11511fi
81ecdfbb
RW
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11513$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11514if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11515
81ecdfbb 11516$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11517
11518fi
97bf5e38 11519
1a619819
LM
11520# Check if the compiler and runtime support printing decfloats.
11521
81ecdfbb
RW
11522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11523$as_echo_n "checking for decfloat support in printf... " >&6; }
11524if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11525 $as_echo_n "(cached) " >&6
1a619819 11526else
81ecdfbb 11527 if test "$cross_compiling" = yes; then :
1a619819
LM
11528 gdb_cv_printf_has_decfloat=no
11529else
81ecdfbb 11530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11531/* end confdefs.h. */
11532$ac_includes_default
11533int
11534main ()
11535{
11536char buf[64];
11537 _Decimal32 d32 = 1.2345df;
11538 _Decimal64 d64 = 1.2345dd;
11539 _Decimal128 d128 = 1.2345dl;
11540 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11541 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11542 ;
11543 return 0;
11544}
11545_ACEOF
81ecdfbb 11546if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11547 gdb_cv_printf_has_decfloat=yes
11548else
81ecdfbb 11549 gdb_cv_printf_has_decfloat=no
1a619819 11550fi
81ecdfbb
RW
11551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11552 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11553fi
81ecdfbb 11554
1a619819 11555fi
81ecdfbb
RW
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11557$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11558if test $gdb_cv_printf_has_decfloat = yes; then
11559
81ecdfbb 11560$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11561
11562fi
11563
bc8bcb4b
MK
11564# Check if the compiler supports the `long double' type. We can't use
11565# AC_C_LONG_DOUBLE because that one does additional checks on the
11566# constants defined in <float.h> that fail on some systems,
11567# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11568
81ecdfbb
RW
11569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11570$as_echo_n "checking for long double support in compiler... " >&6; }
11571if test "${gdb_cv_c_long_double+set}" = set; then :
11572 $as_echo_n "(cached) " >&6
97bf5e38 11573else
81ecdfbb 11574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11575/* end confdefs.h. */
97bf5e38 11576long double foo;
bec39cab 11577_ACEOF
81ecdfbb 11578if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11579 gdb_cv_c_long_double=yes
97bf5e38 11580else
81ecdfbb 11581 gdb_cv_c_long_double=no
97bf5e38 11582fi
81ecdfbb 11583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11584fi
81ecdfbb
RW
11585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11586$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11587if test $gdb_cv_c_long_double = yes; then
c906108c 11588
81ecdfbb 11589$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11590
11591fi
11592
bc8bcb4b 11593# Check if the compiler and runtime support printing long doubles.
97bf5e38 11594
81ecdfbb
RW
11595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11596$as_echo_n "checking for long double support in printf... " >&6; }
11597if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11598 $as_echo_n "(cached) " >&6
97bf5e38 11599else
81ecdfbb 11600 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11601 gdb_cv_printf_has_long_double=no
11602else
81ecdfbb 11603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11604/* end confdefs.h. */
bc8bcb4b
MK
11605$ac_includes_default
11606int
11607main ()
11608{
11609char buf[16];
97bf5e38
MK
11610 long double f = 3.141592653;
11611 sprintf (buf, "%Lg", f);
11612 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11613 ;
11614 return 0;
97bf5e38 11615}
bec39cab 11616_ACEOF
81ecdfbb 11617if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11618 gdb_cv_printf_has_long_double=yes
c906108c 11619else
81ecdfbb 11620 gdb_cv_printf_has_long_double=no
c906108c 11621fi
81ecdfbb
RW
11622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11623 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11624fi
81ecdfbb 11625
c906108c 11626fi
81ecdfbb
RW
11627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11628$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11629if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11630
81ecdfbb 11631$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11632
11633fi
97bf5e38 11634
bc8bcb4b 11635# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11636
81ecdfbb
RW
11637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11638$as_echo_n "checking for long double support in scanf... " >&6; }
11639if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11640 $as_echo_n "(cached) " >&6
97bf5e38 11641else
81ecdfbb 11642 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11643 gdb_cv_scanf_has_long_double=no
11644else
81ecdfbb 11645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11646/* end confdefs.h. */
bc8bcb4b
MK
11647#include <stdio.h>
11648int
11649main ()
11650{
11651char *buf = "3.141592653";
97bf5e38
MK
11652 long double f = 0;
11653 sscanf (buf, "%Lg", &f);
11654 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11655 ;
11656 return 0;
97bf5e38 11657}
bec39cab 11658_ACEOF
81ecdfbb 11659if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11660 gdb_cv_scanf_has_long_double=yes
11661else
81ecdfbb 11662 gdb_cv_scanf_has_long_double=no
97bf5e38 11663fi
81ecdfbb
RW
11664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11665 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11666fi
81ecdfbb 11667
c906108c 11668fi
81ecdfbb
RW
11669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11670$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11671if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11672
81ecdfbb 11673$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11674
11675fi
c906108c 11676
438013df
AO
11677case ${host_os} in
11678aix*)
81ecdfbb
RW
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11680$as_echo_n "checking for -bbigtoc option... " >&6; }
11681if test "${gdb_cv_bigtoc+set}" = set; then :
11682 $as_echo_n "(cached) " >&6
438013df 11683else
bec39cab 11684
438013df
AO
11685 SAVE_LDFLAGS=$LDFLAGS
11686
11687 case $GCC in
11688 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11689 *) gdb_cv_bigtoc=-bbigtoc ;;
11690 esac
11691
11692 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11694/* end confdefs.h. */
438013df 11695
bec39cab
AC
11696int
11697main ()
11698{
438013df 11699int i;
bec39cab
AC
11700 ;
11701 return 0;
11702}
11703_ACEOF
81ecdfbb 11704if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11705
81ecdfbb
RW
11706else
11707 gdb_cv_bigtoc=
438013df 11708fi
81ecdfbb
RW
11709rm -f core conftest.err conftest.$ac_objext \
11710 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11711 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11712
bec39cab 11713fi
81ecdfbb
RW
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11715$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11716 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11717 ;;
11718esac
11719
38f6b338 11720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11721$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11722dynamic_list=false
11723if test "${gdb_native}" = yes; then
11724 # The dynamically loaded libthread_db needs access to symbols in the gdb
11725 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11726 # may not be supported there.
11727 old_LDFLAGS="$LDFLAGS"
11728 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11729 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11730 LDFLAGS="$LDFLAGS $RDYNAMIC"
11731 if test "${have_libpython}" = no; then
11732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11733/* end confdefs.h. */
11734
11735int
11736main ()
11737{
11738
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11744 dynamic_list=true
11745fi
11746rm -f core conftest.err conftest.$ac_objext \
11747 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11748 else
11749 # Workaround http://bugs.python.org/issue4434 where static
11750 # libpythonX.Y.a would get its symbols required for
11751 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11752 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11753 old_CFLAGS="$CFLAGS"
11754 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11755 if test "$cross_compiling" = yes; then :
3bebe2f2 11756 true
f6528abd 11757else
3bebe2f2
JK
11758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11759/* end confdefs.h. */
11760#include "${have_libpython}/Python.h"
11761int
11762main ()
11763{
11764int err;
38f6b338
JK
11765 Py_Initialize ();
11766 err = PyRun_SimpleString ("import itertools\n");
11767 Py_Finalize ();
11768 return err == 0 ? 0 : 1;
3bebe2f2
JK
11769 ;
11770 return 0;
11771}
11772_ACEOF
11773if ac_fn_c_try_run "$LINENO"; then :
11774 dynamic_list=true
11775fi
11776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11777 conftest.$ac_objext conftest.beam conftest.$ac_ext
11778fi
11779
38f6b338
JK
11780 CFLAGS="$old_CFLAGS"
11781 fi
11782 LDFLAGS="$old_LDFLAGS"
11783fi
11784if $dynamic_list; then
11785 found="-Wl,--dynamic-list"
11786 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11787else
38f6b338
JK
11788 found="-rdynamic"
11789 RDYNAMIC="-rdynamic"
f6528abd 11790fi
f6528abd 11791
38f6b338 11792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11793$as_echo "$found" >&6; }
0407b3f1 11794
f6528abd 11795
0407b3f1 11796if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11797 case ${host_os} in
c906108c 11798 solaris*)
d92419e5
JB
11799 # See if thread_db library is around for Solaris thread debugging.
11800 # Note that we must explicitly test for version 1 of the library
11801 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11802 # the same API.
81ecdfbb
RW
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11804$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11805 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11807$as_echo "yes" >&6; }
60ca704f 11808
81ecdfbb 11809$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11810
3483b318 11811 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11812 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11814$as_echo_n "checking for dlopen in -ldl... " >&6; }
11815if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11816 $as_echo_n "(cached) " >&6
c906108c 11817else
bec39cab 11818 ac_check_lib_save_LIBS=$LIBS
c906108c 11819LIBS="-ldl $LIBS"
81ecdfbb 11820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11821/* end confdefs.h. */
11822
81ecdfbb
RW
11823/* Override any GCC internal prototype to avoid an error.
11824 Use char because int might match the return type of a GCC
11825 builtin and then its argument prototype would still apply. */
bec39cab
AC
11826#ifdef __cplusplus
11827extern "C"
11828#endif
bec39cab
AC
11829char dlopen ();
11830int
11831main ()
11832{
81ecdfbb 11833return dlopen ();
bec39cab
AC
11834 ;
11835 return 0;
11836}
11837_ACEOF
81ecdfbb 11838if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11839 ac_cv_lib_dl_dlopen=yes
11840else
81ecdfbb 11841 ac_cv_lib_dl_dlopen=no
bec39cab 11842fi
81ecdfbb
RW
11843rm -f core conftest.err conftest.$ac_objext \
11844 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11845LIBS=$ac_check_lib_save_LIBS
11846fi
81ecdfbb
RW
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11848$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11849if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11850 cat >>confdefs.h <<_ACEOF
11851#define HAVE_LIBDL 1
11852_ACEOF
c906108c
SS
11853
11854 LIBS="-ldl $LIBS"
11855
c906108c
SS
11856fi
11857
f6528abd 11858 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
11859 # Sun randomly tweaked the prototypes in <proc_service.h>
11860 # at one point.
81ecdfbb
RW
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
11862$as_echo_n "checking if <proc_service.h> is old... " >&6; }
11863 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
11864 $as_echo_n "(cached) " >&6
c906108c 11865else
bec39cab 11866
81ecdfbb 11867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11868/* end confdefs.h. */
c906108c
SS
11869
11870 #include <proc_service.h>
11871 ps_err_e ps_pdwrite
11872 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 11873
bec39cab
AC
11874int
11875main ()
11876{
11877
11878 ;
11879 return 0;
11880}
11881_ACEOF
81ecdfbb 11882if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
11883 gdb_cv_proc_service_is_old=no
11884else
81ecdfbb 11885 gdb_cv_proc_service_is_old=yes
c906108c 11886fi
81ecdfbb 11887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11888
c906108c
SS
11889fi
11890
81ecdfbb
RW
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
11892$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 11893 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 11894
81ecdfbb 11895$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
11896
11897 fi
11898 else
81ecdfbb
RW
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11900$as_echo "no" >&6; }
c906108c
SS
11901 fi
11902 ;;
d92419e5 11903 aix*)
81ecdfbb
RW
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
11905$as_echo_n "checking for AiX thread debugging library... " >&6; }
11906 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
11907 $as_echo_n "(cached) " >&6
bec39cab 11908else
81ecdfbb 11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11910/* end confdefs.h. */
d92419e5 11911#include <sys/pthdebug.h>
bec39cab
AC
11912int
11913main ()
11914{
d92419e5
JB
11915#ifndef PTHDB_VERSION_3
11916 #error
11917 #endif
bec39cab
AC
11918 ;
11919 return 0;
11920}
11921_ACEOF
81ecdfbb 11922if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
11923 gdb_cv_have_aix_thread_debug=yes
11924else
81ecdfbb 11925 gdb_cv_have_aix_thread_debug=no
d92419e5 11926fi
81ecdfbb 11927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
11928fi
11929
81ecdfbb
RW
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
11931$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
11932 if test $gdb_cv_have_aix_thread_debug = yes; then
11933 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 11934 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 11935 LIBS="$LIBS -lpthdebug"
d645e32e
JB
11936
11937 # Older versions of AIX do not provide the declaration for
11938 # the getthrds function (it appears that it was introduced
11939 # with AIX 6.x).
11940 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
11941"
11942if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
11943 ac_have_decl=1
11944else
11945 ac_have_decl=0
11946fi
11947
11948cat >>confdefs.h <<_ACEOF
11949#define HAVE_DECL_GETTHRDS $ac_have_decl
11950_ACEOF
11951
d92419e5
JB
11952 fi
11953 ;;
c906108c 11954 esac
bec39cab 11955
c906108c
SS
11956fi
11957
3f47be5c 11958if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
11959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
11960$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
11961if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
11962 $as_echo_n "(cached) " >&6
bec39cab 11963else
81ecdfbb 11964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11965/* end confdefs.h. */
3f47be5c 11966#include <thread_db.h>
bec39cab
AC
11967int
11968main ()
11969{
3f47be5c 11970int i = TD_NOTALLOC;
bec39cab
AC
11971 ;
11972 return 0;
11973}
11974_ACEOF
81ecdfbb 11975if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
11976 gdb_cv_thread_db_h_has_td_notalloc=yes
11977else
81ecdfbb 11978 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 11979
3f47be5c 11980fi
81ecdfbb 11981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 11982
bec39cab 11983fi
81ecdfbb
RW
11984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
11985$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
11987$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
11988if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
11989 $as_echo_n "(cached) " >&6
59f80f10 11990else
81ecdfbb 11991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
11992/* end confdefs.h. */
11993#include <thread_db.h>
11994int
11995main ()
11996{
11997int i = TD_VERSION;
11998 ;
11999 return 0;
12000}
12001_ACEOF
81ecdfbb 12002if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12003 gdb_cv_thread_db_h_has_td_version=yes
12004else
81ecdfbb 12005 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12006
12007fi
81ecdfbb 12008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12009
12010fi
81ecdfbb
RW
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12012$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12014$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12015if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12016 $as_echo_n "(cached) " >&6
59f80f10 12017else
81ecdfbb 12018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12019/* end confdefs.h. */
12020#include <thread_db.h>
12021int
12022main ()
12023{
12024int i = TD_NOTLS;
12025 ;
12026 return 0;
12027}
12028_ACEOF
81ecdfbb 12029if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12030 gdb_cv_thread_db_h_has_td_notls=yes
12031else
81ecdfbb 12032 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12033
12034fi
81ecdfbb 12035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12036
12037fi
81ecdfbb
RW
12038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12039$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12040fi
12041if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12042
81ecdfbb 12043$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12044
59f80f10
DJ
12045fi
12046if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12047
81ecdfbb 12048$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12049
12050fi
12051if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12052
81ecdfbb 12053$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12054
3f47be5c
EZ
12055fi
12056
b757528f 12057if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12059$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12060if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12061 $as_echo_n "(cached) " >&6
bec39cab 12062else
81ecdfbb 12063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12064/* end confdefs.h. */
b757528f 12065#include <sys/syscall.h>
bec39cab
AC
12066int
12067main ()
12068{
b757528f 12069int i = __NR_tkill;
bec39cab
AC
12070 ;
12071 return 0;
12072}
12073_ACEOF
81ecdfbb 12074if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12075 gdb_cv_sys_syscall_h_has_tkill=yes
12076else
81ecdfbb 12077 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12078
b757528f 12079fi
81ecdfbb 12080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12081
bec39cab 12082fi
81ecdfbb
RW
12083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12084$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12085fi
12086if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12087
81ecdfbb 12088$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12089
12090fi
12091
81ecdfbb
RW
12092ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12093"
12094if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12095 ac_have_decl=1
10568435 12096else
81ecdfbb 12097 ac_have_decl=0
10568435 12098fi
10568435
JK
12099
12100cat >>confdefs.h <<_ACEOF
81ecdfbb 12101#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12102_ACEOF
12103
12104
81ecdfbb
RW
12105if test "$cross_compiling" = yes; then :
12106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12107/* end confdefs.h. */
12108#include <sys/personality.h>
12109int
12110main ()
12111{
12112
12113# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12114# define ADDR_NO_RANDOMIZE 0x0040000
12115# endif
12116 /* Test the flag could be set and stays set. */
12117 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12118 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12119 return 1
12120 ;
12121 return 0;
12122}
12123_ACEOF
81ecdfbb 12124if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12125 have_personality=true
12126else
81ecdfbb 12127 have_personality=false
10568435 12128fi
81ecdfbb
RW
12129rm -f core conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext conftest.$ac_ext
10568435 12131else
81ecdfbb 12132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12133/* end confdefs.h. */
12134#include <sys/personality.h>
12135int
12136main ()
12137{
12138
12139# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12140# define ADDR_NO_RANDOMIZE 0x0040000
12141# endif
12142 /* Test the flag could be set and stays set. */
12143 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12144 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12145 return 1
12146 ;
12147 return 0;
12148}
12149_ACEOF
81ecdfbb 12150if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12151 have_personality=true
12152else
81ecdfbb 12153 have_personality=false
10568435 12154fi
81ecdfbb
RW
12155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12156 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12157fi
81ecdfbb 12158
10568435
JK
12159if $have_personality
12160then
12161
81ecdfbb 12162$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12163
12164fi
12165
fb40c209 12166
f83d8a90
DE
12167# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12168# except that the argument to --with-sysroot is optional.
12169# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12170if test "x$with_sysroot" = xyes; then
12171 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12172fi
bec39cab 12173
81ecdfbb
RW
12174# Check whether --with-sysroot was given.
12175if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12176 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12177else
12178 TARGET_SYSTEM_ROOT=
12179fi
030292b7 12180
030292b7 12181
f83d8a90
DE
12182 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12183 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12184 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12185 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12186
f83d8a90
DE
12187cat >>confdefs.h <<_ACEOF
12188#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12189_ACEOF
bec39cab 12190
030292b7 12191
b14b1491 12192
f83d8a90
DE
12193
12194 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12195 if test "x$prefix" = xNONE; then
12196 test_prefix=/usr/local
12197 else
12198 test_prefix=$prefix
12199 fi
12200 else
12201 test_prefix=$exec_prefix
12202 fi
12203 value=0
12204 case ${ac_define_dir} in
12205 "${test_prefix}"|"${test_prefix}/"*|\
12206 '${exec_prefix}'|'${exec_prefix}/'*)
12207 value=1
12208 ;;
12209 esac
12210
12211cat >>confdefs.h <<_ACEOF
12212#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12213_ACEOF
030292b7
DJ
12214
12215
12216
16e7150e 12217
16e7150e 12218
81ecdfbb
RW
12219# Check whether --with-system-gdbinit was given.
12220if test "${with_system_gdbinit+set}" = set; then :
12221 withval=$with_system_gdbinit;
b14b1491
TT
12222 SYSTEM_GDBINIT=$withval
12223else
12224 SYSTEM_GDBINIT=
81ecdfbb
RW
12225fi
12226
16e7150e
JG
12227
12228 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12229 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12230 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12231 ac_define_dir=`eval echo $ac_define_dir`
12232
12233cat >>confdefs.h <<_ACEOF
12234#define SYSTEM_GDBINIT "$ac_define_dir"
12235_ACEOF
12236
12237
12238
0c4a4063 12239
b14b1491
TT
12240 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12241 if test "x$prefix" = xNONE; then
12242 test_prefix=/usr/local
12243 else
12244 test_prefix=$prefix
12245 fi
12246 else
12247 test_prefix=$exec_prefix
12248 fi
12249 value=0
12250 case ${ac_define_dir} in
12251 "${test_prefix}"|"${test_prefix}/"*|\
12252 '${exec_prefix}'|'${exec_prefix}/'*)
12253 value=1
12254 ;;
12255 esac
16e7150e 12256
b14b1491
TT
12257cat >>confdefs.h <<_ACEOF
12258#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12259_ACEOF
12260
b14b1491 12261
16e7150e 12262
0c4a4063 12263
81ecdfbb
RW
12264# Check whether --enable-werror was given.
12265if test "${enable_werror+set}" = set; then :
12266 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12267 yes | y) ERROR_ON_WARNING="yes" ;;
12268 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12269 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12270 esac
81ecdfbb
RW
12271fi
12272
094a342e
MK
12273
12274# Enable -Werror by default when using gcc
12275if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
12276 ERROR_ON_WARNING=yes
12277fi
12278
12279WERROR_CFLAGS=""
12280if test "${ERROR_ON_WARNING}" = yes ; then
12281 WERROR_CFLAGS="-Werror"
12282fi
12283
aa79a185
DJ
12284# The entries after -Wno-pointer-sign are disabled warnings which may
12285# be enabled in the future, which can not currently be used to build
12286# GDB.
12287# NOTE: If you change this list, remember to update
3b851bce 12288# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12289build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12290-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12291-Wno-unused -Wunused-value -Wunused-function \
b03a2011 12292-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 12293
3526781e
DJ
12294# Enable -Wno-format by default when using gcc on mingw since many
12295# GCC versions complain about %I64.
12296case "${host}" in
12297 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12298esac
12299
81ecdfbb
RW
12300# Check whether --enable-build-warnings was given.
12301if test "${enable_build_warnings+set}" = set; then :
12302 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12303 yes) ;;
12304 no) build_warnings="-w";;
12305 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12306 build_warnings="${build_warnings} ${t}";;
12307 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12308 build_warnings="${t} ${build_warnings}";;
12309 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12310esac
d4f3574e 12311if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12312 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12313fi
81ecdfbb
RW
12314fi
12315# Check whether --enable-gdb-build-warnings was given.
12316if test "${enable_gdb_build_warnings+set}" = set; then :
12317 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12318 yes) ;;
12319 no) build_warnings="-w";;
12320 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12321 build_warnings="${build_warnings} ${t}";;
12322 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12323 build_warnings="${t} ${build_warnings}";;
12324 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12325esac
12326if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12327 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12328fi
81ecdfbb
RW
12329fi
12330WARN_CFLAGS=""
c906108c
SS
12331if test "x${build_warnings}" != x -a "x$GCC" = xyes
12332then
81ecdfbb
RW
12333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12334$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12335 # Separate out the -Werror flag as some files just cannot be
12336 # compiled with it enabled.
12337 for w in ${build_warnings}; do
12338 case $w in
12339 -Werr*) WERROR_CFLAGS=-Werror ;;
12340 *) # Check that GCC accepts it
4536bbc6
AC
12341 saved_CFLAGS="$CFLAGS"
12342 CFLAGS="$CFLAGS $w"
81ecdfbb 12343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12344/* end confdefs.h. */
4536bbc6 12345
bec39cab
AC
12346int
12347main ()
12348{
4536bbc6 12349
bec39cab
AC
12350 ;
12351 return 0;
12352}
12353_ACEOF
81ecdfbb 12354if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12355 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12356fi
81ecdfbb 12357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12358 CFLAGS="$saved_CFLAGS"
746a987d
AC
12359 esac
12360 done
81ecdfbb
RW
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12362$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12363fi
12364
12365
104c1213 12366
7a292a7a 12367# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12369$as_echo_n "checking for cygwin... " >&6; }
12370if test "${gdb_cv_os_cygwin+set}" = set; then :
12371 $as_echo_n "(cached) " >&6
bec39cab 12372else
81ecdfbb 12373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12374/* end confdefs.h. */
7a292a7a
SS
12375
12376#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12377lose
12378#endif
bec39cab 12379_ACEOF
7a292a7a 12380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12381 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12382 gdb_cv_os_cygwin=yes
12383else
7a292a7a
SS
12384 gdb_cv_os_cygwin=no
12385fi
12386rm -f conftest*
12387
12388fi
81ecdfbb
RW
12389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12390$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12391
aff38e61 12392
3eb25fda 12393SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12394case ${host} in
95cbc983
AC
12395 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12396 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12397 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12398esac
12399
12400
cd0fc7c3
SS
12401# libreadline needs libuser32.a in a cygwin environment
12402WIN32LIBS=
12403if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12404 WIN32LIBS="-luser32"
12405 case "${target}" in
12406 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12407 ;;
12408 esac
cd0fc7c3 12409fi
c906108c 12410
b4505029
MM
12411# The ser-tcp.c module requires sockets.
12412case ${host} in
12413 *mingw32*)
12414
81ecdfbb 12415$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12416
12417 WIN32LIBS="$WIN32LIBS -lws2_32"
12418 ;;
12419esac
12420
7a292a7a 12421
31d99776
DJ
12422# Add ELF support to GDB, but only if BFD includes ELF support.
12423OLD_CFLAGS=$CFLAGS
12424OLD_LDFLAGS=$LDFLAGS
12425OLD_LIBS=$LIBS
12cd34f3
PA
12426# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12427# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12428# always want our bfd.
12429CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12430LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12431intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12432# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12433if test "$plugins" = "yes"; then
12434 LIBS="-ldl $LIBS"
12435fi
0f72fb1c 12436LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12438$as_echo_n "checking for ELF support in BFD... " >&6; }
12439if test "${gdb_cv_var_elf+set}" = set; then :
12440 $as_echo_n "(cached) " >&6
31d99776 12441else
81ecdfbb 12442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12443/* end confdefs.h. */
12444#include <stdlib.h>
12445#include "bfd.h"
12446#include "elf-bfd.h"
12447
12448int
12449main ()
12450{
12451bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12452 ;
12453 return 0;
12454}
12455_ACEOF
81ecdfbb 12456if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12457 gdb_cv_var_elf=yes
12458else
81ecdfbb 12459 gdb_cv_var_elf=no
31d99776 12460fi
81ecdfbb
RW
12461rm -f core conftest.err conftest.$ac_objext \
12462 conftest$ac_exeext conftest.$ac_ext
31d99776 12463fi
81ecdfbb
RW
12464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12465$as_echo "$gdb_cv_var_elf" >&6; }
31d99776 12466if test $gdb_cv_var_elf = yes; then
55aa24fb 12467 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12468
81ecdfbb 12469$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12470
075ff26d
JK
12471 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12472 if test "$plugins" = "yes"; then
12473 OLD_LIBS="-ldl $OLD_LIBS"
12474 fi
31d99776
DJ
12475fi
12476CFLAGS=$OLD_CFLAGS
12477LDFLAGS=$OLD_LDFLAGS
12478LIBS=$OLD_LIBS
12479
121ce6e5
DJ
12480# Add any host-specific objects to GDB.
12481CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12482
3fc11d3e
JM
12483LIBGUI="../libgui/src/libgui.a"
12484GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
12485
12486
7a292a7a 12487
3fc11d3e
JM
12488WIN32LDAPP=
12489
12490
12491
d91670b9 12492case "${host}" in
686a5eed 12493*-*-cygwin* | *-*-mingw* )
d91670b9
CV
12494 configdir="win"
12495 ;;
12496*)
12497 configdir="unix"
12498 ;;
12499esac
3fc11d3e
JM
12500
12501GDBTKLIBS=
12502if test "${enable_gdbtk}" = "yes"; then
12503
d1c3b63a
KS
12504 # Gdbtk must have an absolute path to srcdir in order to run
12505 # properly when not installed.
12506 here=`pwd`
12507 cd ${srcdir}
12508 GDBTK_SRC_DIR=`pwd`
12509 cd $here
12510
bec39cab 12511
5062cc19
KS
12512 #
12513 # Ok, lets find the tcl configuration
12514 # First, look for one uninstalled.
12515 # the alternative search directory is invoked by --with-tcl
12516 #
3fc11d3e 12517
5062cc19
KS
12518 if test x"${no_tcl}" = x ; then
12519 # we reset no_tcl in case something fails here
12520 no_tcl=true
bec39cab 12521
81ecdfbb
RW
12522# Check whether --with-tcl was given.
12523if test "${with_tcl+set}" = set; then :
12524 withval=$with_tcl; with_tclconfig=${withval}
12525fi
12526
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
12528$as_echo_n "checking for Tcl configuration... " >&6; }
12529 if test "${ac_cv_c_tclconfig+set}" = set; then :
12530 $as_echo_n "(cached) " >&6
3fc11d3e 12531else
bec39cab 12532
3fc11d3e 12533
5062cc19
KS
12534 # First check to see if --with-tcl was specified.
12535 case "${host}" in
12536 *-*-cygwin*) platDir="win" ;;
12537 *) platDir="unix" ;;
12538 esac
12539 if test x"${with_tclconfig}" != x ; then
12540 if test -f "${with_tclconfig}/tclConfig.sh" ; then
12541 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
12542 else
81ecdfbb 12543 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
12544 fi
12545 fi
12546
12547 # then check for a private Tcl installation
12548 if test x"${ac_cv_c_tclconfig}" = x ; then
12549 for i in \
12550 ../tcl \
12551 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12552 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
12553 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
12554 ../../tcl \
12555 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12556 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
12557 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
12558 ../../../tcl \
12559 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12560 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
12561 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
12562 if test -f "$i/$platDir/tclConfig.sh" ; then
12563 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12564 break
12565 fi
12566 done
12567 fi
12568
12569 # on Darwin, check in Framework installation locations
12570 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
12571 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12572 `ls -d /Library/Frameworks 2>/dev/null` \
12573 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12574 `ls -d /System/Library/Frameworks 2>/dev/null` \
12575 ; do
12576 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
12577 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
12578 break
12579 fi
12580 done
12581 fi
12582
12583 # check in a few common install locations
12584 if test x"${ac_cv_c_tclconfig}" = x ; then
12585 for i in `ls -d ${libdir} 2>/dev/null` \
12586 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12587 `ls -d ${prefix}/lib 2>/dev/null` \
12588 `ls -d /usr/local/lib 2>/dev/null` \
12589 `ls -d /usr/contrib/lib 2>/dev/null` \
12590 `ls -d /usr/lib 2>/dev/null` \
12591 ; do
12592 if test -f "$i/tclConfig.sh" ; then
12593 ac_cv_c_tclconfig=`(cd $i; pwd)`
12594 break
12595 fi
12596 done
12597 fi
3fc11d3e 12598
5062cc19
KS
12599 # check in a few other private locations
12600 if test x"${ac_cv_c_tclconfig}" = x ; then
12601 for i in \
12602 ${srcdir}/../tcl \
12603 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12604 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
12605 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
12606 if test -f "$i/$platDir/tclConfig.sh" ; then
12607 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12608 break
12609 fi
12610 done
12611 fi
bec39cab 12612
3fc11d3e
JM
12613fi
12614
5062cc19
KS
12615
12616 if test x"${ac_cv_c_tclconfig}" = x ; then
12617 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
12619$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
12620 else
12621 no_tcl=
12622 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
12624$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
12625 fi
12626 fi
3fc11d3e 12627
bec39cab 12628
85541719
DE
12629 # If $no_tk is nonempty, then we can't do Tk, and there is no
12630 # point to doing Tcl.
bec39cab 12631
5062cc19
KS
12632 #
12633 # Ok, lets find the tk configuration
12634 # First, look for one uninstalled.
12635 # the alternative search directory is invoked by --with-tk
12636 #
3fc11d3e 12637
5062cc19
KS
12638 if test x"${no_tk}" = x ; then
12639 # we reset no_tk in case something fails here
12640 no_tk=true
bec39cab 12641
81ecdfbb
RW
12642# Check whether --with-tk was given.
12643if test "${with_tk+set}" = set; then :
12644 withval=$with_tk; with_tkconfig=${withval}
12645fi
12646
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
12648$as_echo_n "checking for Tk configuration... " >&6; }
12649 if test "${ac_cv_c_tkconfig+set}" = set; then :
12650 $as_echo_n "(cached) " >&6
bec39cab 12651else
3fc11d3e
JM
12652
12653
5062cc19
KS
12654 # First check to see if --with-tkconfig was specified.
12655 if test x"${with_tkconfig}" != x ; then
12656 if test -f "${with_tkconfig}/tkConfig.sh" ; then
12657 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
12658 else
81ecdfbb 12659 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
12660 fi
12661 fi
3fc11d3e 12662
5062cc19
KS
12663 # then check for a private Tk library
12664 case "${host}" in
12665 *-*-cygwin*) platDir="win" ;;
12666 *) platDir="unix" ;;
12667 esac
12668 if test x"${ac_cv_c_tkconfig}" = x ; then
12669 for i in \
12670 ../tk \
12671 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12672 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
12673 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
12674 ../../tk \
12675 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12676 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
12677 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
12678 ../../../tk \
12679 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12680 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
12681 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
12682 if test -f "$i/$platDir/tkConfig.sh" ; then
12683 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12684 break
12685 fi
12686 done
12687 fi
12688
12689 # on Darwin, check in Framework installation locations
12690 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
12691 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12692 `ls -d /Library/Frameworks 2>/dev/null` \
12693 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12694 `ls -d /System/Library/Frameworks 2>/dev/null` \
12695 ; do
12696 if test -f "$i/Tk.framework/tkConfig.sh" ; then
12697 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
12698 break
12699 fi
12700 done
12701 fi
12702
12703 # check in a few common install locations
12704 if test x"${ac_cv_c_tkconfig}" = x ; then
12705 for i in `ls -d ${libdir} 2>/dev/null` \
12706 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12707 `ls -d ${prefix}/lib 2>/dev/null` \
12708 `ls -d /usr/local/lib 2>/dev/null` \
12709 `ls -d /usr/contrib/lib 2>/dev/null` \
12710 `ls -d /usr/lib 2>/dev/null` \
12711 ; do
12712 if test -f "$i/tkConfig.sh" ; then
12713 ac_cv_c_tkconfig=`(cd $i; pwd)`
12714 break
12715 fi
12716 done
12717 fi
12718 # check in a few other private locations
12719 if test x"${ac_cv_c_tkconfig}" = x ; then
12720 for i in \
12721 ${srcdir}/../tk \
12722 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12723 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
12724 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
12725 if test -f "$i/$platDir/tkConfig.sh" ; then
12726 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12727 break
12728 fi
12729 done
12730 fi
3fc11d3e 12731
3fc11d3e
JM
12732fi
12733
12734
5062cc19
KS
12735 if test x"${ac_cv_c_tkconfig}" = x ; then
12736 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
12738$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
12739 else
12740 no_tk=
12741 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
12743$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 12744 fi
3fc11d3e 12745 fi
dd2504ab 12746
dd2504ab 12747
85541719
DE
12748 if test -z "${no_tcl}" -a -z "${no_tk}"; then
12749
81ecdfbb
RW
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
12751$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
12752
12753 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12755$as_echo "loading" >&6; }
85541719
DE
12756 . ${TCL_BIN_DIR}/tclConfig.sh
12757 else
81ecdfbb
RW
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
12759$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
12760 fi
12761
12762 # eval is required to do the TCL_DBGX substitution
12763 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
12764 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
12765
12766 # If the TCL_BIN_DIR is the build directory (not the install directory),
12767 # then set the common variable name to the value of the build variables.
12768 # For example, the variable TCL_LIB_SPEC will be set to the value
12769 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
12770 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
12771 # installed and uninstalled version of Tcl.
12772 if test -f "${TCL_BIN_DIR}/Makefile" ; then
12773 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
12774 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
12775 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
12776 elif test "`uname -s`" = "Darwin"; then
12777 # If Tcl was built as a framework, attempt to use the libraries
12778 # from the framework at the given location so that linking works
12779 # against Tcl.framework installed in an arbitary location.
12780 case ${TCL_DEFS} in
12781 *TCL_FRAMEWORK*)
12782 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
12783 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
12784 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
12785 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
12786 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
12787 break
12788 fi
12789 done
12790 fi
12791 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
12792 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
12793 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
12794 fi
12795 ;;
12796 esac
12797 fi
12798
12799 # eval is required to do the TCL_DBGX substitution
12800 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
12801 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
12802 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
12803 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819 # Check for in-tree tcl
12820 here=`pwd`
12821 cd ${srcdir}/..
12822 topdir=`pwd`
12823 cd ${here}
12824
12825 intree="no"
12826 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
12827 intree="yes"
12828 fi
12829
12830 # Find Tcl private headers
12831 if test x"${intree}" = xno; then
12832
81ecdfbb
RW
12833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
12834$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
12835 private_dir=""
12836 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
12837 if test -f ${dir}/tclInt.h ; then
12838 private_dir=${dir}
12839 fi
12840
12841 if test x"${private_dir}" = x; then
81ecdfbb 12842 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
12843 else
12844 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12846$as_echo "${private_dir}" >&6; }
85541719
DE
12847 fi
12848
12849 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
12850 TCL_LIBRARY="${TCL_LIB_SPEC}"
12851 TCL_DEPS=""
12852 else
12853 # If building tcl in the same src tree, private headers
12854 # are not needed, but we need to be sure to use the right
12855 # headers library
12856 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
12857 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
12858 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
12859 fi
12860
12861
12862
12863
12864
81ecdfbb
RW
12865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
12866$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 12867
5062cc19 12868 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12870$as_echo "loading" >&6; }
5062cc19 12871 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 12872 else
81ecdfbb
RW
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
12874$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 12875 fi
bec39cab 12876
5062cc19
KS
12877 # eval is required to do the TK_DBGX substitution
12878 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
12879 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
12880
12881 # If the TK_BIN_DIR is the build directory (not the install directory),
12882 # then set the common variable name to the value of the build variables.
12883 # For example, the variable TK_LIB_SPEC will be set to the value
12884 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
12885 # instead of TK_BUILD_LIB_SPEC since it will work with both an
12886 # installed and uninstalled version of Tcl.
85541719 12887 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
12888 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
12889 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
12890 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
12891 elif test "`uname -s`" = "Darwin"; then
12892 # If Tk was built as a framework, attempt to use the libraries
12893 # from the framework at the given location so that linking works
12894 # against Tk.framework installed in an arbitary location.
12895 case ${TK_DEFS} in
12896 *TK_FRAMEWORK*)
85541719 12897 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
12898 for i in "`cd ${TK_BIN_DIR}; pwd`" \
12899 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
12900 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
12901 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
12902 break
12903 fi
12904 done
12905 fi
85541719 12906 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
12907 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
12908 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
12909 fi
12910 ;;
12911 esac
3fc11d3e
JM
12912 fi
12913
5062cc19
KS
12914 # eval is required to do the TK_DBGX substitution
12915 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
12916 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
12917 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
12918 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 12919
3fc11d3e
JM
12920
12921
bec39cab
AC
12922
12923
12924
12925
12926
12927
12928
3fc11d3e 12929
3fc11d3e 12930
bec39cab 12931
bec39cab 12932
85541719
DE
12933 # Check for in-tree Tk
12934 intree="no"
12935 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
12936 intree="yes"
12937 fi
3fc11d3e 12938
85541719
DE
12939 # Find Tk private headers
12940 if test x"${intree}" = xno; then
3fc11d3e 12941
81ecdfbb
RW
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
12943$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
12944 private_dir=""
12945 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
12946 if test -f ${dir}/tkInt.h; then
12947 private_dir=${dir}
3fc11d3e 12948 fi
bec39cab 12949
5062cc19 12950 if test x"${private_dir}" = x; then
81ecdfbb 12951 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 12952 else
5062cc19 12953 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12955$as_echo "${private_dir}" >&6; }
3fc11d3e 12956 fi
3fc11d3e 12957
85541719
DE
12958 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
12959 TK_LIBRARY=${TK_LIB_SPEC}
12960 TK_DEPS=""
12961 else
12962 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
12963 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
12964 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
12965 fi
3fc11d3e
JM
12966
12967
3fc11d3e
JM
12968
12969
3fc11d3e 12970
85541719 12971 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 12972
85541719
DE
12973 # Include some libraries that Tcl and Tk want.
12974 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
12975 # Yes, the ordering seems wrong here. But it isn't.
12976 # TK_LIBS is the list of libraries that need to be linked
12977 # after Tcl/Tk. Note that this isn't put into LIBS. If it
12978 # were in LIBS then any link tests after this point would
12979 # try to include things like `$(LIBGUI)', which wouldn't work.
12980 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 12981
85541719
DE
12982 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
12983 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
12984 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
12985 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
12986 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
12987 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
12988 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 12989
85541719
DE
12990 if test x$gdb_cv_os_cygwin = xyes; then
12991 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
12992 WIN32LDAPP="-Wl,--subsystem,console"
12993 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 12994 fi
ffc6a242 12995
81ecdfbb 12996 subdirs="$subdirs gdbtk"
3ace7edb 12997
85541719 12998 fi
3fc11d3e
JM
12999fi
13000
13001
13002
13003
13004
13005
13006
13007
81ecdfbb
RW
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13009$as_echo_n "checking for X... " >&6; }
bec39cab 13010
c906108c 13011
81ecdfbb
RW
13012# Check whether --with-x was given.
13013if test "${with_x+set}" = set; then :
13014 withval=$with_x;
13015fi
c906108c
SS
13016
13017# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13018if test "x$with_x" = xno; then
13019 # The user explicitly disabled X.
13020 have_x=disabled
13021else
81ecdfbb
RW
13022 case $x_includes,$x_libraries in #(
13023 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13024 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13025 $as_echo_n "(cached) " >&6
c906108c
SS
13026else
13027 # One or both of the vars are not set, and there is no cached value.
bec39cab 13028ac_x_includes=no ac_x_libraries=no
81ecdfbb 13029rm -f -r conftest.dir
bec39cab
AC
13030if mkdir conftest.dir; then
13031 cd conftest.dir
bec39cab 13032 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13033incroot:
13034 @echo incroot='${INCROOT}'
13035usrlibdir:
13036 @echo usrlibdir='${USRLIBDIR}'
13037libdir:
13038 @echo libdir='${LIBDIR}'
13039_ACEOF
13040 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13041 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13042 for ac_var in incroot usrlibdir libdir; do
13043 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13044 done
c906108c 13045 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13046 for ac_extension in a so sl dylib la dll; do
13047 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13048 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13049 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13050 fi
13051 done
13052 # Screen out bogus values from the imake configuration. They are
13053 # bogus both because they are the default anyway, and because
13054 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13055 case $ac_im_incroot in
81ecdfbb 13056 /usr/include) ac_x_includes= ;;
bec39cab 13057 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13058 esac
bec39cab 13059 case $ac_im_usrlibdir in
81ecdfbb 13060 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13061 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13062 esac
13063 fi
13064 cd ..
81ecdfbb 13065 rm -f -r conftest.dir
c906108c
SS
13066fi
13067
bec39cab
AC
13068# Standard set of common directories for X headers.
13069# Check X11 before X11Rn because it is often a symlink to the current release.
13070ac_x_header_dirs='
13071/usr/X11/include
81ecdfbb 13072/usr/X11R7/include
bec39cab
AC
13073/usr/X11R6/include
13074/usr/X11R5/include
13075/usr/X11R4/include
13076
13077/usr/include/X11
81ecdfbb 13078/usr/include/X11R7
bec39cab
AC
13079/usr/include/X11R6
13080/usr/include/X11R5
13081/usr/include/X11R4
13082
13083/usr/local/X11/include
81ecdfbb 13084/usr/local/X11R7/include
bec39cab
AC
13085/usr/local/X11R6/include
13086/usr/local/X11R5/include
13087/usr/local/X11R4/include
13088
13089/usr/local/include/X11
81ecdfbb 13090/usr/local/include/X11R7
bec39cab
AC
13091/usr/local/include/X11R6
13092/usr/local/include/X11R5
13093/usr/local/include/X11R4
13094
13095/usr/X386/include
13096/usr/x386/include
13097/usr/XFree86/include/X11
13098
13099/usr/include
13100/usr/local/include
13101/usr/unsupported/include
13102/usr/athena/include
13103/usr/local/x11r5/include
13104/usr/lpp/Xamples/include
13105
13106/usr/openwin/include
13107/usr/openwin/share/include'
13108
13109if test "$ac_x_includes" = no; then
81ecdfbb 13110 # Guess where to find include files, by looking for Xlib.h.
c906108c 13111 # First, try using that file with no special directory specified.
81ecdfbb 13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13113/* end confdefs.h. */
81ecdfbb 13114#include <X11/Xlib.h>
bec39cab 13115_ACEOF
81ecdfbb 13116if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13117 # We can compile using X headers with no special include directory.
13118ac_x_includes=
13119else
bec39cab 13120 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13121 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13122 ac_x_includes=$ac_dir
13123 break
13124 fi
13125done
c906108c 13126fi
bec39cab
AC
13127rm -f conftest.err conftest.$ac_ext
13128fi # $ac_x_includes = no
c906108c 13129
bec39cab 13130if test "$ac_x_libraries" = no; then
c906108c 13131 # Check for the libraries.
c906108c
SS
13132 # See if we find them without any special options.
13133 # Don't add to $LIBS permanently.
bec39cab 13134 ac_save_LIBS=$LIBS
81ecdfbb
RW
13135 LIBS="-lX11 $LIBS"
13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13137/* end confdefs.h. */
81ecdfbb 13138#include <X11/Xlib.h>
bec39cab
AC
13139int
13140main ()
13141{
81ecdfbb 13142XrmInitialize ()
bec39cab
AC
13143 ;
13144 return 0;
13145}
13146_ACEOF
81ecdfbb 13147if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13148 LIBS=$ac_save_LIBS
c906108c
SS
13149# We can link X programs with no special library path.
13150ac_x_libraries=
13151else
81ecdfbb
RW
13152 LIBS=$ac_save_LIBS
13153for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13154do
bec39cab 13155 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13156 for ac_extension in a so sl dylib la dll; do
13157 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13158 ac_x_libraries=$ac_dir
13159 break 2
13160 fi
13161 done
13162done
13163fi
81ecdfbb
RW
13164rm -f core conftest.err conftest.$ac_objext \
13165 conftest$ac_exeext conftest.$ac_ext
bec39cab 13166fi # $ac_x_libraries = no
c906108c 13167
81ecdfbb
RW
13168case $ac_x_includes,$ac_x_libraries in #(
13169 no,* | *,no | *\'*)
13170 # Didn't find X, or a directory has "'" in its name.
13171 ac_cv_have_x="have_x=no";; #(
13172 *)
13173 # Record where we found X for the cache.
13174 ac_cv_have_x="have_x=yes\
13175 ac_x_includes='$ac_x_includes'\
13176 ac_x_libraries='$ac_x_libraries'"
13177esac
c906108c 13178fi
81ecdfbb
RW
13179;; #(
13180 *) have_x=yes;;
13181 esac
c906108c
SS
13182 eval "$ac_cv_have_x"
13183fi # $with_x != no
13184
13185if test "$have_x" != yes; then
81ecdfbb
RW
13186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13187$as_echo "$have_x" >&6; }
c906108c
SS
13188 no_x=yes
13189else
13190 # If each of the values was on the command line, it overrides each guess.
13191 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13192 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13193 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13194 ac_cv_have_x="have_x=yes\
13195 ac_x_includes='$x_includes'\
13196 ac_x_libraries='$x_libraries'"
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13198$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13199fi
13200
13201
bec39cab 13202# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13203# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13204# This code just checks for a few cases where we'd like to ignore those
13205# definitions, even when they're present in the '.mt' file. These cases
13206# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13207# not part of the source tree.
7a292a7a 13208#
81ecdfbb
RW
13209# Check whether --enable-sim was given.
13210if test "${enable_sim+set}" = set; then :
13211 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13212 echo "enableval = ${enableval}";
13213 case "${enableval}" in
13214 yes) ignore_sim=false ;;
13215 no) ignore_sim=true ;;
13216 *) ignore_sim=false ;;
13217 esac
13218else
13219 ignore_sim=false
81ecdfbb
RW
13220fi
13221
7a292a7a
SS
13222
13223if test ! -d "${srcdir}/../sim"; then
13224 ignore_sim=true
13225fi
13226
9b624dbe
UW
13227SIM=
13228SIM_OBS=
13229if test "${ignore_sim}" = "false"; then
13230 if test x"${gdb_sim}" != x ; then
13231 SIM="${gdb_sim}"
13232 SIM_OBS="remote-sim.o"
60ca704f 13233
81ecdfbb 13234$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13235
9b624dbe 13236 fi
7a292a7a
SS
13237fi
13238
13239
13240
c906108c
SS
13241
13242
13243
13244
13245
13246
dfcd3bfb 13247
e56ac5c3
AC
13248
13249
b3a90332
AC
13250
13251
c35f4ffc 13252# List of host floatformats.
bec39cab
AC
13253
13254cat >>confdefs.h <<_ACEOF
c35f4ffc 13255#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13256_ACEOF
c35f4ffc 13257
bec39cab
AC
13258
13259cat >>confdefs.h <<_ACEOF
c35f4ffc 13260#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13261_ACEOF
13262
c35f4ffc 13263
bec39cab 13264cat >>confdefs.h <<_ACEOF
c35f4ffc 13265#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13266_ACEOF
c35f4ffc
AC
13267
13268
c906108c
SS
13269# target_subdir is used by the testsuite to find the target libraries.
13270target_subdir=
13271if test "${host}" != "${target}"; then
13272 target_subdir="${target_alias}/"
13273fi
13274
13275
13276frags=
771b4502 13277if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13278 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13279 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13280 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13281 fi
13282 frags="$frags $host_makefile_frag"
13283else
13284 host_makefile_frag=/dev/null
c906108c 13285fi
c906108c 13286
c906108c
SS
13287
13288
13289
771b4502 13290if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13291# We pick this up from the host configuration file (.mh) because we
13292# do not have a native configuration Makefile fragment.
c906108c
SS
13293nativefile=`sed -n '
13294s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13295' ${host_makefile_frag}`
c906108c
SS
13296fi
13297
13298
b00a8037 13299if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13300
13301cat >>confdefs.h <<_ACEOF
b00a8037 13302#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13303_ACEOF
b00a8037
DJ
13304
13305fi
13306
8dcde887 13307# Enable multi-ice-gdb-server.
81ecdfbb
RW
13308# Check whether --enable-multi-ice was given.
13309if test "${enable_multi_ice+set}" = set; then :
13310 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13311 yes | no)
13312 ;;
81ecdfbb 13313 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13314 esac
81ecdfbb 13315fi
b4e70030 13316
81ecdfbb
RW
13317if test "x$enable_multi_ice" = xyes; then
13318 subdirs="$subdirs multi-ice"
3ace7edb 13319
a85f51e7
DJ
13320fi
13321
496c0e1b
JB
13322# Check whether --enable-gdbserver was given.
13323if test "${enable_gdbserver+set}" = set; then :
13324 enableval=$enable_gdbserver; case "${enableval}" in
13325 yes| no|auto) ;;
13326 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13327esac
13328else
13329 enable_gdbserver=auto
13330fi
13331
13332
13333# We only build gdbserver automatically in a native configuration, and
13334# only if the user did not explicitly disable its build.
13335if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13337$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13338 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13340$as_echo "yes" >&6; }
13341 subdirs="$subdirs gdbserver"
3ace7edb 13342
496c0e1b 13343 gdbserver_build_enabled=yes
8dcde887 13344 else
81ecdfbb
RW
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13346$as_echo "no" >&6; }
8dcde887
MK
13347 fi
13348fi
13349
496c0e1b
JB
13350# If the user explicitly request the gdbserver to be built, verify that
13351# we were in fact able to enable it.
13352if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13353 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13354fi
13355
db985757 13356# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13357# to an empty version.
c906108c
SS
13358
13359files=
13360links=
5a2402b8 13361
c906108c
SS
13362rm -f nm.h
13363if test "${nativefile}" != ""; then
0f475e27
AC
13364 case "${nativefile}" in
13365 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13366 * ) GDB_NM_FILE="${nativefile}"
13367 esac
5a2402b8
AC
13368 files="${files} ${GDB_NM_FILE}"
13369 links="${links} nm.h"
60ca704f
SE
13370
13371cat >>confdefs.h <<_ACEOF
b78960be 13372#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 13373_ACEOF
5a2402b8 13374
c906108c 13375fi
5a2402b8
AC
13376
13377
bec39cab
AC
13378ac_sources="$files"
13379ac_dests="$links"
13380while test -n "$ac_sources"; do
13381 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
13382 set $ac_sources; ac_source=$1; shift; ac_sources=$*
13383 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
13384done
81ecdfbb 13385ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
13386
13387
c906108c
SS
13388
13389
c906108c 13390
81ecdfbb 13391$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 13392
bec39cab 13393
c971b7fa 13394ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
13395
13396ac_config_commands="$ac_config_commands default"
89a34d1b 13397
bec39cab
AC
13398cat >confcache <<\_ACEOF
13399# This file is a shell script that caches the results of configure
13400# tests run on this system so they can be shared between configure
13401# scripts and configure runs, see configure's option --config-cache.
13402# It is not useful on other systems. If it contains results you don't
13403# want to keep, you may remove or edit it.
13404#
13405# config.status only pays attention to the cache file if you give it
13406# the --recheck option to rerun configure.
13407#
13408# `ac_cv_env_foo' variables (set or unset) will be overridden when
13409# loading this file, other *unset* `ac_cv_foo' will be assigned the
13410# following values.
13411
13412_ACEOF
13413
13414# The following way of writing the cache mishandles newlines in values,
13415# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 13416# So, we kill variables containing newlines.
bec39cab
AC
13417# Ultrix sh set writes to stderr and can't be redirected directly,
13418# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
13419(
13420 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13421 eval ac_val=\$$ac_var
13422 case $ac_val in #(
13423 *${as_nl}*)
13424 case $ac_var in #(
13425 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13426$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13427 esac
13428 case $ac_var in #(
13429 _ | IFS | as_nl) ;; #(
13430 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13431 *) { eval $ac_var=; unset $ac_var;} ;;
13432 esac ;;
13433 esac
13434 done
13435
bec39cab 13436 (set) 2>&1 |
81ecdfbb
RW
13437 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13438 *${as_nl}ac_space=\ *)
13439 # `set' does not quote correctly, so add quotes: double-quote
13440 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
13441 sed -n \
13442 "s/'/'\\\\''/g;
13443 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 13444 ;; #(
bec39cab
AC
13445 *)
13446 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 13447 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 13448 ;;
81ecdfbb
RW
13449 esac |
13450 sort
13451) |
bec39cab 13452 sed '
81ecdfbb 13453 /^ac_cv_env_/b end
bec39cab 13454 t clear
81ecdfbb 13455 :clear
bec39cab
AC
13456 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13457 t end
81ecdfbb
RW
13458 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13459 :end' >>confcache
13460if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13461 if test -w "$cache_file"; then
13462 test "x$cache_file" != "x/dev/null" &&
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13464$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
13465 cat confcache >$cache_file
13466 else
81ecdfbb
RW
13467 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13468$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
13469 fi
13470fi
13471rm -f confcache
13472
13473test "x$prefix" = xNONE && prefix=$ac_default_prefix
13474# Let make expand exec_prefix.
13475test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13476
bec39cab
AC
13477DEFS=-DHAVE_CONFIG_H
13478
13479ac_libobjs=
13480ac_ltlibobjs=
13481for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13482 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
13483 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13484 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13485 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13486 # will be set to the directory where LIBOBJS objects are built.
13487 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13488 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
13489done
13490LIBOBJS=$ac_libobjs
13491
13492LTLIBOBJS=$ac_ltlibobjs
13493
13494
85981d60 13495if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
13496 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
13497Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 13498fi
a417dc56 13499if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
13500 as_fn_error "conditional \"GMAKE\" was never defined.
13501Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 13502fi
81ecdfbb
RW
13503
13504
bec39cab 13505: ${CONFIG_STATUS=./config.status}
81ecdfbb 13506ac_write_fail=0
bec39cab
AC
13507ac_clean_files_save=$ac_clean_files
13508ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
13509{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13510$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13511as_write_fail=0
13512cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
13513#! $SHELL
13514# Generated by $as_me.
13515# Run this file to recreate the current configuration.
13516# Compiler output produced by configure, useful for debugging
13517# configure, is in config.log if it exists.
13518
13519debug=false
13520ac_cs_recheck=false
13521ac_cs_silent=false
bec39cab 13522
81ecdfbb
RW
13523SHELL=\${CONFIG_SHELL-$SHELL}
13524export SHELL
13525_ASEOF
13526cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13527## -------------------- ##
13528## M4sh Initialization. ##
13529## -------------------- ##
13530
13531# Be more Bourne compatible
13532DUALCASE=1; export DUALCASE # for MKS sh
13533if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
13534 emulate sh
13535 NULLCMD=:
81ecdfbb 13536 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
13537 # is contrary to our usage. Disable this feature.
13538 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
13539 setopt NO_GLOB_SUBST
13540else
13541 case `(set -o) 2>/dev/null` in #(
13542 *posix*) :
13543 set -o posix ;; #(
13544 *) :
13545 ;;
13546esac
bec39cab 13547fi
bec39cab 13548
81ecdfbb
RW
13549
13550as_nl='
13551'
13552export as_nl
13553# Printing a long string crashes Solaris 7 /usr/bin/printf.
13554as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13555as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13556as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13557# Prefer a ksh shell builtin over an external printf program on Solaris,
13558# but without wasting forks for bash or zsh.
13559if test -z "$BASH_VERSION$ZSH_VERSION" \
13560 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13561 as_echo='print -r --'
13562 as_echo_n='print -rn --'
13563elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13564 as_echo='printf %s\n'
13565 as_echo_n='printf %s'
13566else
13567 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13568 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13569 as_echo_n='/usr/ucb/echo -n'
13570 else
13571 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13572 as_echo_n_body='eval
13573 arg=$1;
13574 case $arg in #(
13575 *"$as_nl"*)
13576 expr "X$arg" : "X\\(.*\\)$as_nl";
13577 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13578 esac;
13579 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13580 '
13581 export as_echo_n_body
13582 as_echo_n='sh -c $as_echo_n_body as_echo'
13583 fi
13584 export as_echo_body
13585 as_echo='sh -c $as_echo_body as_echo'
13586fi
13587
13588# The user is always right.
13589if test "${PATH_SEPARATOR+set}" != set; then
13590 PATH_SEPARATOR=:
13591 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13592 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13593 PATH_SEPARATOR=';'
13594 }
bec39cab
AC
13595fi
13596
13597
81ecdfbb
RW
13598# IFS
13599# We need space, tab and new line, in precisely that order. Quoting is
13600# there to prevent editors from complaining about space-tab.
13601# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13602# splitting by setting IFS to empty value.)
13603IFS=" "" $as_nl"
13604
13605# Find who we are. Look in the path if we contain no directory separator.
13606case $0 in #((
13607 *[\\/]* ) as_myself=$0 ;;
13608 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13609for as_dir in $PATH
13610do
13611 IFS=$as_save_IFS
13612 test -z "$as_dir" && as_dir=.
13613 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13614 done
13615IFS=$as_save_IFS
13616
13617 ;;
13618esac
13619# We did not find ourselves, most probably we were run as `sh COMMAND'
13620# in which case we are not to be found in the path.
13621if test "x$as_myself" = x; then
13622 as_myself=$0
13623fi
13624if test ! -f "$as_myself"; then
13625 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13626 exit 1
13627fi
13628
13629# Unset variables that we do not need and which cause bugs (e.g. in
13630# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13631# suppresses any "Segmentation fault" message there. '((' could
13632# trigger a bug in pdksh 5.2.14.
13633for as_var in BASH_ENV ENV MAIL MAILPATH
13634do eval test x\${$as_var+set} = xset \
13635 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13636done
bec39cab
AC
13637PS1='$ '
13638PS2='> '
13639PS4='+ '
13640
13641# NLS nuisances.
81ecdfbb
RW
13642LC_ALL=C
13643export LC_ALL
13644LANGUAGE=C
13645export LANGUAGE
13646
13647# CDPATH.
13648(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13649
13650
13651# as_fn_error ERROR [LINENO LOG_FD]
13652# ---------------------------------
13653# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13654# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13655# script with status $?, using 1 if that was 0.
13656as_fn_error ()
13657{
13658 as_status=$?; test $as_status -eq 0 && as_status=1
13659 if test "$3"; then
13660 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13661 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13662 fi
13663 $as_echo "$as_me: error: $1" >&2
13664 as_fn_exit $as_status
13665} # as_fn_error
13666
13667
13668# as_fn_set_status STATUS
13669# -----------------------
13670# Set $? to STATUS, without forking.
13671as_fn_set_status ()
13672{
13673 return $1
13674} # as_fn_set_status
13675
13676# as_fn_exit STATUS
13677# -----------------
13678# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13679as_fn_exit ()
13680{
13681 set +e
13682 as_fn_set_status $1
13683 exit $1
13684} # as_fn_exit
13685
13686# as_fn_unset VAR
13687# ---------------
13688# Portably unset VAR.
13689as_fn_unset ()
13690{
13691 { eval $1=; unset $1;}
13692}
13693as_unset=as_fn_unset
13694# as_fn_append VAR VALUE
13695# ----------------------
13696# Append the text in VALUE to the end of the definition contained in VAR. Take
13697# advantage of any shell optimizations that allow amortized linear growth over
13698# repeated appends, instead of the typical quadratic growth present in naive
13699# implementations.
13700if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13701 eval 'as_fn_append ()
13702 {
13703 eval $1+=\$2
13704 }'
13705else
13706 as_fn_append ()
13707 {
13708 eval $1=\$$1\$2
13709 }
13710fi # as_fn_append
13711
13712# as_fn_arith ARG...
13713# ------------------
13714# Perform arithmetic evaluation on the ARGs, and store the result in the
13715# global $as_val. Take advantage of shells that can avoid forks. The arguments
13716# must be portable across $(()) and expr.
13717if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13718 eval 'as_fn_arith ()
13719 {
13720 as_val=$(( $* ))
13721 }'
13722else
13723 as_fn_arith ()
13724 {
13725 as_val=`expr "$@" || test $? -eq 1`
13726 }
13727fi # as_fn_arith
bec39cab 13728
81ecdfbb
RW
13729
13730if expr a : '\(a\)' >/dev/null 2>&1 &&
13731 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
13732 as_expr=expr
13733else
13734 as_expr=false
13735fi
13736
81ecdfbb 13737if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
13738 as_basename=basename
13739else
13740 as_basename=false
13741fi
13742
81ecdfbb
RW
13743if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13744 as_dirname=dirname
13745else
13746 as_dirname=false
13747fi
bec39cab 13748
81ecdfbb 13749as_me=`$as_basename -- "$0" ||
bec39cab
AC
13750$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13751 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
13752 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13753$as_echo X/"$0" |
13754 sed '/^.*\/\([^/][^/]*\)\/*$/{
13755 s//\1/
13756 q
13757 }
13758 /^X\/\(\/\/\)$/{
13759 s//\1/
13760 q
13761 }
13762 /^X\/\(\/\).*/{
13763 s//\1/
13764 q
13765 }
13766 s/.*/./; q'`
b4e70030 13767
b4e70030
JB
13768# Avoid depending upon Character Ranges.
13769as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13770as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13771as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13772as_cr_digits='0123456789'
13773as_cr_alnum=$as_cr_Letters$as_cr_digits
13774
81ecdfbb
RW
13775ECHO_C= ECHO_N= ECHO_T=
13776case `echo -n x` in #(((((
13777-n*)
13778 case `echo 'xy\c'` in
13779 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13780 xy) ECHO_C='\c';;
13781 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13782 ECHO_T=' ';;
13783 esac;;
13784*)
13785 ECHO_N='-n';;
bec39cab
AC
13786esac
13787
81ecdfbb
RW
13788rm -f conf$$ conf$$.exe conf$$.file
13789if test -d conf$$.dir; then
13790 rm -f conf$$.dir/conf$$.file
bec39cab 13791else
81ecdfbb
RW
13792 rm -f conf$$.dir
13793 mkdir conf$$.dir 2>/dev/null
bec39cab 13794fi
81ecdfbb
RW
13795if (echo >conf$$.file) 2>/dev/null; then
13796 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 13797 as_ln_s='ln -s'
81ecdfbb
RW
13798 # ... but there are two gotchas:
13799 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13800 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13801 # In both cases, we have to default to `cp -p'.
13802 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13803 as_ln_s='cp -p'
13804 elif ln conf$$.file conf$$ 2>/dev/null; then
13805 as_ln_s=ln
13806 else
13807 as_ln_s='cp -p'
b4e70030 13808 fi
bec39cab
AC
13809else
13810 as_ln_s='cp -p'
13811fi
81ecdfbb
RW
13812rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13813rmdir conf$$.dir 2>/dev/null
13814
13815
13816# as_fn_mkdir_p
13817# -------------
13818# Create "$as_dir" as a directory, including parents if necessary.
13819as_fn_mkdir_p ()
13820{
13821
13822 case $as_dir in #(
13823 -*) as_dir=./$as_dir;;
13824 esac
13825 test -d "$as_dir" || eval $as_mkdir_p || {
13826 as_dirs=
13827 while :; do
13828 case $as_dir in #(
13829 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13830 *) as_qdir=$as_dir;;
13831 esac
13832 as_dirs="'$as_qdir' $as_dirs"
13833 as_dir=`$as_dirname -- "$as_dir" ||
13834$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13835 X"$as_dir" : 'X\(//\)[^/]' \| \
13836 X"$as_dir" : 'X\(//\)$' \| \
13837 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13838$as_echo X"$as_dir" |
13839 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13840 s//\1/
13841 q
13842 }
13843 /^X\(\/\/\)[^/].*/{
13844 s//\1/
13845 q
13846 }
13847 /^X\(\/\/\)$/{
13848 s//\1/
13849 q
13850 }
13851 /^X\(\/\).*/{
13852 s//\1/
13853 q
13854 }
13855 s/.*/./; q'`
13856 test -d "$as_dir" && break
13857 done
13858 test -z "$as_dirs" || eval "mkdir $as_dirs"
13859 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13860
bec39cab 13861
81ecdfbb 13862} # as_fn_mkdir_p
bec39cab 13863if mkdir -p . 2>/dev/null; then
81ecdfbb 13864 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
13865else
13866 test -d ./-p && rmdir ./-p
13867 as_mkdir_p=false
13868fi
13869
81ecdfbb
RW
13870if test -x / >/dev/null 2>&1; then
13871 as_test_x='test -x'
13872else
13873 if ls -dL / >/dev/null 2>&1; then
13874 as_ls_L_option=L
13875 else
13876 as_ls_L_option=
13877 fi
13878 as_test_x='
13879 eval sh -c '\''
13880 if test -d "$1"; then
13881 test -d "$1/.";
13882 else
13883 case $1 in #(
13884 -*)set "./$1";;
13885 esac;
13886 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
13887 ???[sx]*):;;*)false;;esac;fi
13888 '\'' sh
13889 '
13890fi
13891as_executable_p=$as_test_x
bec39cab
AC
13892
13893# Sed expression to map a string onto a valid CPP name.
13894as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13895
13896# Sed expression to map a string onto a valid variable name.
13897as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13898
13899
bec39cab 13900exec 6>&1
81ecdfbb
RW
13901## ----------------------------------- ##
13902## Main body of $CONFIG_STATUS script. ##
13903## ----------------------------------- ##
13904_ASEOF
13905test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13906
13907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13908# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 13909# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
13910# values after options handling.
13911ac_log="
bec39cab 13912This file was extended by $as_me, which was
81ecdfbb 13913generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
13914
13915 CONFIG_FILES = $CONFIG_FILES
13916 CONFIG_HEADERS = $CONFIG_HEADERS
13917 CONFIG_LINKS = $CONFIG_LINKS
13918 CONFIG_COMMANDS = $CONFIG_COMMANDS
13919 $ $0 $@
13920
81ecdfbb
RW
13921on `(hostname || uname -n) 2>/dev/null | sed 1q`
13922"
13923
bec39cab
AC
13924_ACEOF
13925
81ecdfbb
RW
13926case $ac_config_files in *"
13927"*) set x $ac_config_files; shift; ac_config_files=$*;;
13928esac
234b45d4 13929
81ecdfbb
RW
13930case $ac_config_headers in *"
13931"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13932esac
b4e70030 13933
b4e70030 13934
81ecdfbb
RW
13935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13936# Files that config.status was made for.
13937config_files="$ac_config_files"
13938config_headers="$ac_config_headers"
13939config_links="$ac_config_links"
13940config_commands="$ac_config_commands"
234b45d4 13941
81ecdfbb 13942_ACEOF
b4e70030 13943
81ecdfbb 13944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 13945ac_cs_usage="\
81ecdfbb
RW
13946\`$as_me' instantiates files and other configuration actions
13947from templates according to the current configuration. Unless the files
13948and actions are specified as TAGs, all are instantiated by default.
234b45d4 13949
81ecdfbb 13950Usage: $0 [OPTION]... [TAG]...
234b45d4 13951
bec39cab 13952 -h, --help print this help, then exit
81ecdfbb
RW
13953 -V, --version print version number and configuration settings, then exit
13954 -q, --quiet, --silent
13955 do not print progress messages
bec39cab
AC
13956 -d, --debug don't remove temporary files
13957 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
13958 --file=FILE[:TEMPLATE]
13959 instantiate the configuration file FILE
13960 --header=FILE[:TEMPLATE]
13961 instantiate the configuration header FILE
234b45d4 13962
bec39cab
AC
13963Configuration files:
13964$config_files
234b45d4 13965
bec39cab
AC
13966Configuration headers:
13967$config_headers
234b45d4 13968
bec39cab
AC
13969Configuration links:
13970$config_links
234b45d4 13971
bec39cab
AC
13972Configuration commands:
13973$config_commands
13974
81ecdfbb 13975Report bugs to the package provider."
b4e70030 13976
81ecdfbb
RW
13977_ACEOF
13978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
13979ac_cs_version="\\
13980config.status
81ecdfbb
RW
13981configured by $0, generated by GNU Autoconf 2.64,
13982 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 13983
81ecdfbb 13984Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
13985This config.status script is free software; the Free Software Foundation
13986gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
13987
13988ac_pwd='$ac_pwd'
13989srcdir='$srcdir'
13990INSTALL='$INSTALL'
81ecdfbb
RW
13991AWK='$AWK'
13992test -n "\$AWK" || AWK=awk
bec39cab
AC
13993_ACEOF
13994
81ecdfbb
RW
13995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13996# The default lists apply if the user does not specify any file.
bec39cab
AC
13997ac_need_defaults=:
13998while test $# != 0
13999do
14000 case $1 in
14001 --*=*)
81ecdfbb
RW
14002 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14003 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 14004 ac_shift=:
c906108c 14005 ;;
81ecdfbb 14006 *)
bec39cab
AC
14007 ac_option=$1
14008 ac_optarg=$2
14009 ac_shift=shift
c906108c 14010 ;;
bec39cab 14011 esac
c906108c 14012
bec39cab
AC
14013 case $ac_option in
14014 # Handling of the options.
bec39cab
AC
14015 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14016 ac_cs_recheck=: ;;
81ecdfbb
RW
14017 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14018 $as_echo "$ac_cs_version"; exit ;;
14019 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
14020 debug=: ;;
14021 --file | --fil | --fi | --f )
14022 $ac_shift
81ecdfbb
RW
14023 case $ac_optarg in
14024 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14025 esac
14026 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14027 ac_need_defaults=false;;
14028 --header | --heade | --head | --hea )
14029 $ac_shift
81ecdfbb
RW
14030 case $ac_optarg in
14031 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14032 esac
14033 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14034 ac_need_defaults=false;;
81ecdfbb
RW
14035 --he | --h)
14036 # Conflict between --help and --header
14037 as_fn_error "ambiguous option: \`$1'
14038Try \`$0 --help' for more information.";;
14039 --help | --hel | -h )
14040 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14041 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14042 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14043 ac_cs_silent=: ;;
c906108c 14044
bec39cab 14045 # This is an error.
81ecdfbb
RW
14046 -*) as_fn_error "unrecognized option: \`$1'
14047Try \`$0 --help' for more information." ;;
c906108c 14048
81ecdfbb
RW
14049 *) as_fn_append ac_config_targets " $1"
14050 ac_need_defaults=false ;;
c906108c 14051
bec39cab
AC
14052 esac
14053 shift
14054done
c906108c 14055
bec39cab 14056ac_configure_extra_args=
c906108c 14057
bec39cab
AC
14058if $ac_cs_silent; then
14059 exec 6>/dev/null
14060 ac_configure_extra_args="$ac_configure_extra_args --silent"
14061fi
c906108c 14062
bec39cab 14063_ACEOF
81ecdfbb 14064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14065if \$ac_cs_recheck; then
81ecdfbb
RW
14066 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14067 shift
14068 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14069 CONFIG_SHELL='$SHELL'
14070 export CONFIG_SHELL
14071 exec "\$@"
bec39cab
AC
14072fi
14073
14074_ACEOF
81ecdfbb
RW
14075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14076exec 5>>config.log
14077{
14078 echo
14079 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14080## Running $as_me. ##
14081_ASBOX
14082 $as_echo "$ac_log"
14083} >&5
bec39cab 14084
81ecdfbb
RW
14085_ACEOF
14086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14087#
81ecdfbb 14088# INIT-COMMANDS
c906108c 14089#
a417dc56 14090ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14091
bec39cab
AC
14092_ACEOF
14093
81ecdfbb 14094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14095
81ecdfbb 14096# Handling of arguments.
bec39cab 14097for ac_config_target in $ac_config_targets
c906108c 14098do
81ecdfbb
RW
14099 case $ac_config_target in
14100 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14101 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14102 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14103 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14104 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14105 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14106 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14107 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14108 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14109
14110 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14111 esac
14112done
14113
81ecdfbb 14114
bec39cab
AC
14115# If the user did not use the arguments to specify the items to instantiate,
14116# then the envvar interface is used. Set only those that are not.
14117# We use the long form for the default assignment because of an extremely
14118# bizarre bug on SunOS 4.1.3.
14119if $ac_need_defaults; then
14120 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14121 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14122 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14123 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14124fi
14125
b4e70030 14126# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14127# simply because there is no reason against having it here, and in addition,
b4e70030 14128# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14129# Hook for its removal unless debugging.
14130# Note that there is a small window in which the directory will not be cleaned:
14131# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14132$debug ||
14133{
81ecdfbb
RW
14134 tmp=
14135 trap 'exit_status=$?
14136 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14137' 0
14138 trap 'as_fn_exit 1' 1 2 13 15
14139}
14140# Create a (secure) tmp directory for tmp files.
14141
14142{
14143 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14144 test -n "$tmp" && test -d "$tmp"
14145} ||
14146{
14147 tmp=./conf$$-$RANDOM
14148 (umask 077 && mkdir "$tmp")
14149} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14150
14151# Set up the scripts for CONFIG_FILES section.
14152# No need to generate them if there are no CONFIG_FILES.
14153# This happens for instance with `./config.status config.h'.
14154if test -n "$CONFIG_FILES"; then
14155
14156if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14157 ac_cs_awk_getline=:
14158 ac_cs_awk_pipe_init=
14159 ac_cs_awk_read_file='
14160 while ((getline aline < (F[key])) > 0)
14161 print(aline)
14162 close(F[key])'
14163 ac_cs_awk_pipe_fini=
14164else
14165 ac_cs_awk_getline=false
14166 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14167 ac_cs_awk_read_file='
14168 print "|#_!!_#|"
14169 print "cat " F[key] " &&"
14170 '$ac_cs_awk_pipe_init
14171 # The final `:' finishes the AND list.
14172 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14173fi
14174ac_cr=`echo X | tr X '\015'`
14175# On cygwin, bash can eat \r inside `` if the user requested igncr.
14176# But we know of no other shell where ac_cr would be empty at this
14177# point, so we can use a bashism as a fallback.
14178if test "x$ac_cr" = x; then
14179 eval ac_cr=\$\'\\r\'
14180fi
14181ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14182if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14183 ac_cs_awk_cr='\r'
14184else
14185 ac_cs_awk_cr=$ac_cr
14186fi
14187
14188echo 'BEGIN {' >"$tmp/subs1.awk" &&
14189_ACEOF
14190
14191# Create commands to substitute file output variables.
14192{
14193 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14194 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14195 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14196 echo "_ACAWK" &&
14197 echo "_ACEOF"
14198} >conf$$files.sh &&
14199. ./conf$$files.sh ||
14200 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14201rm -f conf$$files.sh
14202
14203{
14204 echo "cat >conf$$subs.awk <<_ACEOF" &&
14205 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14206 echo "_ACEOF"
14207} >conf$$subs.sh ||
14208 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14209ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14210ac_delim='%!_!# '
14211for ac_last_try in false false false false false :; do
14212 . ./conf$$subs.sh ||
14213 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14214
14215 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14216 if test $ac_delim_n = $ac_delim_num; then
14217 break
14218 elif $ac_last_try; then
14219 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14220 else
14221 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14222 fi
14223done
14224rm -f conf$$subs.sh
14225
14226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14227cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14228_ACEOF
14229sed -n '
14230h
14231s/^/S["/; s/!.*/"]=/
14232p
14233g
14234s/^[^!]*!//
14235:repl
14236t repl
14237s/'"$ac_delim"'$//
14238t delim
14239:nl
14240h
14241s/\(.\{148\}\).*/\1/
14242t more1
14243s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14244p
14245n
14246b repl
14247:more1
14248s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14249p
14250g
14251s/.\{148\}//
14252t nl
14253:delim
14254h
14255s/\(.\{148\}\).*/\1/
14256t more2
14257s/["\\]/\\&/g; s/^/"/; s/$/"/
14258p
14259b
14260:more2
14261s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14262p
14263g
14264s/.\{148\}//
14265t delim
14266' <conf$$subs.awk | sed '
14267/^[^""]/{
14268 N
14269 s/\n//
14270}
14271' >>$CONFIG_STATUS || ac_write_fail=1
14272rm -f conf$$subs.awk
14273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14274_ACAWK
14275cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14276 for (key in S) S_is_set[key] = 1
14277 FS = "\a"
14278 \$ac_cs_awk_pipe_init
14279}
14280{
14281 line = $ 0
14282 nfields = split(line, field, "@")
14283 substed = 0
14284 len = length(field[1])
14285 for (i = 2; i < nfields; i++) {
14286 key = field[i]
14287 keylen = length(key)
14288 if (S_is_set[key]) {
14289 value = S[key]
14290 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14291 len += length(value) + length(field[++i])
14292 substed = 1
14293 } else
14294 len += 1 + keylen
14295 }
14296 if (nfields == 3 && !substed) {
14297 key = field[2]
14298 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14299 \$ac_cs_awk_read_file
14300 next
14301 }
14302 }
14303 print line
b4e70030 14304}
81ecdfbb
RW
14305\$ac_cs_awk_pipe_fini
14306_ACAWK
14307_ACEOF
14308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14309if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14310 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14311else
14312 cat
14313fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14314 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14315_ACEOF
14316
14317# VPATH may cause trouble with some makes, so we remove $(srcdir),
14318# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14319# trailing colons and then remove the whole line if VPATH becomes empty
14320# (actually we leave an empty line to preserve line numbers).
14321if test "x$srcdir" = x.; then
14322 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14323s/:*\$(srcdir):*/:/
14324s/:*\${srcdir}:*/:/
14325s/:*@srcdir@:*/:/
14326s/^\([^=]*=[ ]*\):*/\1/
14327s/:*$//
14328s/^[^=]*=[ ]*$//
14329}'
14330fi
14331
14332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14333fi # test -n "$CONFIG_FILES"
14334
14335# Set up the scripts for CONFIG_HEADERS section.
14336# No need to generate them if there are no CONFIG_HEADERS.
14337# This happens for instance with `./config.status Makefile'.
14338if test -n "$CONFIG_HEADERS"; then
14339cat >"$tmp/defines.awk" <<\_ACAWK ||
14340BEGIN {
14341_ACEOF
14342
14343# Transform confdefs.h into an awk script `defines.awk', embedded as
14344# here-document in config.status, that substitutes the proper values into
14345# config.h.in to produce config.h.
4e8d927d 14346
81ecdfbb
RW
14347# Create a delimiter string that does not exist in confdefs.h, to ease
14348# handling of long lines.
14349ac_delim='%!_!# '
14350for ac_last_try in false false :; do
14351 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14352 if test -z "$ac_t"; then
14353 break
14354 elif $ac_last_try; then
14355 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14356 else
14357 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14358 fi
14359done
4e8d927d 14360
81ecdfbb
RW
14361# For the awk script, D is an array of macro values keyed by name,
14362# likewise P contains macro parameters if any. Preserve backslash
14363# newline sequences.
14364
14365ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14366sed -n '
14367s/.\{148\}/&'"$ac_delim"'/g
14368t rset
14369:rset
14370s/^[ ]*#[ ]*define[ ][ ]*/ /
14371t def
14372d
14373:def
14374s/\\$//
14375t bsnl
14376s/["\\]/\\&/g
14377s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14378D["\1"]=" \3"/p
14379s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14380d
14381:bsnl
14382s/["\\]/\\&/g
14383s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14384D["\1"]=" \3\\\\\\n"\\/p
14385t cont
14386s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14387t cont
14388d
14389:cont
14390n
14391s/.\{148\}/&'"$ac_delim"'/g
14392t clear
14393:clear
14394s/\\$//
14395t bsnlc
14396s/["\\]/\\&/g; s/^/"/; s/$/"/p
14397d
14398:bsnlc
14399s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14400b cont
14401' <confdefs.h | sed '
14402s/'"$ac_delim"'/"\\\
14403"/g' >>$CONFIG_STATUS || ac_write_fail=1
14404
14405cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14406 for (key in D) D_is_set[key] = 1
14407 FS = "\a"
14408}
14409/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14410 line = \$ 0
14411 split(line, arg, " ")
14412 if (arg[1] == "#") {
14413 defundef = arg[2]
14414 mac1 = arg[3]
14415 } else {
14416 defundef = substr(arg[1], 2)
14417 mac1 = arg[2]
14418 }
14419 split(mac1, mac2, "(") #)
14420 macro = mac2[1]
14421 prefix = substr(line, 1, index(line, defundef) - 1)
14422 if (D_is_set[macro]) {
14423 # Preserve the white space surrounding the "#".
14424 print prefix "define", macro P[macro] D[macro]
14425 next
14426 } else {
14427 # Replace #undef with comments. This is necessary, for example,
14428 # in the case of _POSIX_SOURCE, which is predefined and required
14429 # on some systems where configure will not decide to define it.
14430 if (defundef == "undef") {
14431 print "/*", prefix defundef, macro, "*/"
14432 next
14433 }
14434 }
b4e70030 14435}
81ecdfbb
RW
14436{ print }
14437_ACAWK
b4e70030 14438_ACEOF
81ecdfbb
RW
14439cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14440 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14441fi # test -n "$CONFIG_HEADERS"
4e8d927d 14442
4e8d927d 14443
81ecdfbb
RW
14444eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
14445shift
14446for ac_tag
14447do
14448 case $ac_tag in
14449 :[FHLC]) ac_mode=$ac_tag; continue;;
14450 esac
14451 case $ac_mode$ac_tag in
14452 :[FHL]*:*);;
14453 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
14454 :[FH]-) ac_tag=-:-;;
14455 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14456 esac
14457 ac_save_IFS=$IFS
14458 IFS=:
14459 set x $ac_tag
14460 IFS=$ac_save_IFS
14461 shift
14462 ac_file=$1
14463 shift
4e8d927d 14464
81ecdfbb
RW
14465 case $ac_mode in
14466 :L) ac_source=$1;;
14467 :[FH])
14468 ac_file_inputs=
14469 for ac_f
14470 do
14471 case $ac_f in
14472 -) ac_f="$tmp/stdin";;
14473 *) # Look for the file first in the build tree, then in the source tree
14474 # (if the path is not absolute). The absolute path cannot be DOS-style,
14475 # because $ac_f cannot contain `:'.
14476 test -f "$ac_f" ||
14477 case $ac_f in
14478 [\\/$]*) false;;
14479 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14480 esac ||
14481 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14482 esac
14483 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14484 as_fn_append ac_file_inputs " '$ac_f'"
14485 done
14486
14487 # Let's still pretend it is `configure' which instantiates (i.e., don't
14488 # use $as_me), people would be surprised to read:
14489 # /* config.h. Generated by config.status. */
14490 configure_input='Generated from '`
14491 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14492 `' by configure.'
14493 if test x"$ac_file" != x-; then
14494 configure_input="$ac_file. $configure_input"
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14496$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 14497 fi
81ecdfbb
RW
14498 # Neutralize special characters interpreted by sed in replacement strings.
14499 case $configure_input in #(
14500 *\&* | *\|* | *\\* )
14501 ac_sed_conf_input=`$as_echo "$configure_input" |
14502 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14503 *) ac_sed_conf_input=$configure_input;;
14504 esac
4e8d927d 14505
81ecdfbb
RW
14506 case $ac_tag in
14507 *:-:* | *:-) cat >"$tmp/stdin" \
14508 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
14509 esac
14510 ;;
c906108c
SS
14511 esac
14512
81ecdfbb 14513 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
14514$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14515 X"$ac_file" : 'X\(//\)[^/]' \| \
14516 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
14517 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14518$as_echo X"$ac_file" |
14519 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14520 s//\1/
14521 q
14522 }
14523 /^X\(\/\/\)[^/].*/{
14524 s//\1/
14525 q
14526 }
14527 /^X\(\/\/\)$/{
14528 s//\1/
14529 q
14530 }
14531 /^X\(\/\).*/{
14532 s//\1/
14533 q
14534 }
14535 s/.*/./; q'`
14536 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14537 ac_builddir=.
14538
81ecdfbb
RW
14539case "$ac_dir" in
14540.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14541*)
14542 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14543 # A ".." for each directory in $ac_dir_suffix.
14544 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14545 case $ac_top_builddir_sub in
14546 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14547 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14548 esac ;;
14549esac
14550ac_abs_top_builddir=$ac_pwd
14551ac_abs_builddir=$ac_pwd$ac_dir_suffix
14552# for backward compatibility:
14553ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14554
14555case $srcdir in
81ecdfbb 14556 .) # We are building in place.
bec39cab 14557 ac_srcdir=.
81ecdfbb
RW
14558 ac_top_srcdir=$ac_top_builddir_sub
14559 ac_abs_top_srcdir=$ac_pwd ;;
14560 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14561 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14562 ac_top_srcdir=$srcdir
14563 ac_abs_top_srcdir=$srcdir ;;
14564 *) # Relative name.
14565 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14566 ac_top_srcdir=$ac_top_build_prefix$srcdir
14567 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14568esac
81ecdfbb 14569ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 14570
c906108c 14571
81ecdfbb
RW
14572 case $ac_mode in
14573 :F)
14574 #
14575 # CONFIG_FILE
14576 #
c906108c 14577
bec39cab
AC
14578 case $INSTALL in
14579 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 14580 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 14581 esac
81ecdfbb 14582_ACEOF
121ce6e5 14583
81ecdfbb
RW
14584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14585# If the template does not know about datarootdir, expand it.
14586# FIXME: This hack should be removed a few years after 2.60.
14587ac_datarootdir_hack=; ac_datarootdir_seen=
14588ac_sed_dataroot='
14589/datarootdir/ {
14590 p
14591 q
14592}
14593/@datadir@/p
14594/@docdir@/p
14595/@infodir@/p
14596/@localedir@/p
14597/@mandir@/p'
14598case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14599*datarootdir*) ac_datarootdir_seen=yes;;
14600*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14602$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14603_ACEOF
14604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14605 ac_datarootdir_hack='
14606 s&@datadir@&$datadir&g
14607 s&@docdir@&$docdir&g
14608 s&@infodir@&$infodir&g
14609 s&@localedir@&$localedir&g
14610 s&@mandir@&$mandir&g
14611 s&\\\${datarootdir}&$datarootdir&g' ;;
14612esac
4e8d927d 14613_ACEOF
81ecdfbb
RW
14614
14615# Neutralize VPATH when `$srcdir' = `.'.
14616# Shell code in configure.ac might set extrasub.
14617# FIXME: do we really want to maintain this feature?
14618cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14619ac_sed_extra="$ac_vpsub
bec39cab
AC
14620$extrasub
14621_ACEOF
81ecdfbb 14622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
14623:t
14624/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
14625s|@configure_input@|$ac_sed_conf_input|;t t
14626s&@top_builddir@&$ac_top_builddir_sub&;t t
14627s&@top_build_prefix@&$ac_top_build_prefix&;t t
14628s&@srcdir@&$ac_srcdir&;t t
14629s&@abs_srcdir@&$ac_abs_srcdir&;t t
14630s&@top_srcdir@&$ac_top_srcdir&;t t
14631s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14632s&@builddir@&$ac_builddir&;t t
14633s&@abs_builddir@&$ac_abs_builddir&;t t
14634s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14635s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
14636$ac_datarootdir_hack
14637"
14638eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
14639if $ac_cs_awk_getline; then
14640 $AWK -f "$tmp/subs.awk"
14641else
14642 $AWK -f "$tmp/subs.awk" | $SHELL
14643fi >$tmp/out \
14644 || as_fn_error "could not create $ac_file" "$LINENO" 5
14645
14646test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14647 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14648 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14650which seems to be undefined. Please make sure it is defined." >&5
14651$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14652which seems to be undefined. Please make sure it is defined." >&2;}
14653
14654 rm -f "$tmp/stdin"
bec39cab 14655 case $ac_file in
81ecdfbb
RW
14656 -) cat "$tmp/out" && rm -f "$tmp/out";;
14657 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14658 esac \
14659 || as_fn_error "could not create $ac_file" "$LINENO" 5
14660 ;;
14661 :H)
14662 #
14663 # CONFIG_HEADER
14664 #
bec39cab 14665 if test x"$ac_file" != x-; then
81ecdfbb
RW
14666 {
14667 $as_echo "/* $configure_input */" \
14668 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14669 } >"$tmp/config.h" \
14670 || as_fn_error "could not create $ac_file" "$LINENO" 5
14671 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14673$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 14674 else
81ecdfbb
RW
14675 rm -f "$ac_file"
14676 mv "$tmp/config.h" "$ac_file" \
14677 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
14678 fi
14679 else
81ecdfbb
RW
14680 $as_echo "/* $configure_input */" \
14681 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14682 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 14683 fi
81ecdfbb
RW
14684 ;;
14685 :L)
14686 #
14687 # CONFIG_LINK
14688 #
c906108c 14689
81ecdfbb
RW
14690 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
14691 :
b4e70030 14692 else
81ecdfbb
RW
14693 # Prefer the file from the source tree if names are identical.
14694 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
14695 ac_source=$srcdir/$ac_source
14696 fi
b4e70030 14697
81ecdfbb
RW
14698 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
14699$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 14700
81ecdfbb
RW
14701 if test ! -r "$ac_source"; then
14702 as_fn_error "$ac_source: file not found" "$LINENO" 5
14703 fi
14704 rm -f "$ac_file"
bec39cab 14705
81ecdfbb
RW
14706 # Try a relative symlink, then a hard link, then a copy.
14707 case $srcdir in
14708 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
14709 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
14710 esac
14711 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
14712 ln "$ac_source" "$ac_file" 2>/dev/null ||
14713 cp -p "$ac_source" "$ac_file" ||
14714 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
14715 fi
14716 ;;
14717 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14718$as_echo "$as_me: executing $ac_file commands" >&6;}
14719 ;;
c906108c 14720 esac
b4e70030 14721
bec39cab 14722
81ecdfbb
RW
14723 case $ac_file$ac_mode in
14724 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 14725 "default":C)
c906108c
SS
14726case x$CONFIG_HEADERS in
14727xconfig.h:config.in)
14728echo > stamp-h ;;
14729esac
bec39cab 14730 ;;
81ecdfbb 14731
bec39cab 14732 esac
81ecdfbb 14733done # for ac_tag
c906108c 14734
bec39cab 14735
81ecdfbb 14736as_fn_exit 0
bec39cab 14737_ACEOF
bec39cab
AC
14738ac_clean_files=$ac_clean_files_save
14739
81ecdfbb
RW
14740test $ac_write_fail = 0 ||
14741 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14742
bec39cab
AC
14743
14744# configure is writing to config.log, and then calls config.status.
14745# config.status does its own redirection, appending to config.log.
14746# Unfortunately, on DOS this fails, as config.log is still kept open
14747# by configure, so config.status won't be able to write to it; its
14748# output is simply discarded. So we exec the FD to /dev/null,
14749# effectively closing config.log, so it can be properly (re)opened and
14750# appended to by config.status. When coming back to configure, we
14751# need to make the FD available again.
14752if test "$no_create" != yes; then
14753 ac_cs_success=:
14754 ac_config_status_args=
14755 test "$silent" = yes &&
14756 ac_config_status_args="$ac_config_status_args --quiet"
14757 exec 5>/dev/null
14758 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14759 exec 5>>config.log
14760 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14761 # would make configure fail if this is the last instruction.
81ecdfbb 14762 $ac_cs_success || as_fn_exit $?
bec39cab 14763fi
c906108c 14764
bec39cab 14765#
81ecdfbb 14766# CONFIG_SUBDIRS section.
bec39cab 14767#
c906108c
SS
14768if test "$no_recursion" != yes; then
14769
81ecdfbb
RW
14770 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
14771 # so they do not pile up.
c906108c
SS
14772 ac_sub_configure_args=
14773 ac_prev=
fdc59709
PB
14774 eval "set x $ac_configure_args"
14775 shift
14776 for ac_arg
14777 do
c906108c
SS
14778 if test -n "$ac_prev"; then
14779 ac_prev=
14780 continue
14781 fi
bec39cab 14782 case $ac_arg in
c906108c
SS
14783 -cache-file | --cache-file | --cache-fil | --cache-fi \
14784 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14785 ac_prev=cache_file ;;
14786 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
14787 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14788 | --c=*)
14789 ;;
14790 --config-cache | -C)
c906108c
SS
14791 ;;
14792 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14793 ac_prev=srcdir ;;
14794 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14795 ;;
bec39cab
AC
14796 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14797 ac_prev=prefix ;;
14798 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14799 ;;
81ecdfbb
RW
14800 --disable-option-checking)
14801 ;;
fdc59709
PB
14802 *)
14803 case $ac_arg in
81ecdfbb 14804 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14805 esac
81ecdfbb 14806 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
14807 esac
14808 done
14809
bec39cab
AC
14810 # Always prepend --prefix to ensure using the same prefix
14811 # in subdir configurations.
fdc59709
PB
14812 ac_arg="--prefix=$prefix"
14813 case $ac_arg in
81ecdfbb 14814 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14815 esac
81ecdfbb
RW
14816 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14817
14818 # Pass --silent
14819 if test "$silent" = yes; then
14820 ac_sub_configure_args="--silent $ac_sub_configure_args"
14821 fi
14822
14823 # Always prepend --disable-option-checking to silence warnings, since
14824 # different subdirs can have different --enable and --with options.
14825 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 14826
b4e70030 14827 ac_popdir=`pwd`
bec39cab 14828 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
14829
14830 # Do not complain, so a configure script can configure whichever
14831 # parts of a large source tree are present.
fdc59709 14832 test -d "$srcdir/$ac_dir" || continue
c906108c 14833
81ecdfbb
RW
14834 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14835 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14836 $as_echo "$ac_msg" >&6
14837 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14838 ac_builddir=.
14839
81ecdfbb
RW
14840case "$ac_dir" in
14841.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14842*)
14843 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14844 # A ".." for each directory in $ac_dir_suffix.
14845 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14846 case $ac_top_builddir_sub in
14847 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14848 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14849 esac ;;
14850esac
14851ac_abs_top_builddir=$ac_pwd
14852ac_abs_builddir=$ac_pwd$ac_dir_suffix
14853# for backward compatibility:
14854ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14855
14856case $srcdir in
81ecdfbb 14857 .) # We are building in place.
bec39cab 14858 ac_srcdir=.
81ecdfbb
RW
14859 ac_top_srcdir=$ac_top_builddir_sub
14860 ac_abs_top_srcdir=$ac_pwd ;;
14861 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14862 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14863 ac_top_srcdir=$srcdir
14864 ac_abs_top_srcdir=$srcdir ;;
14865 *) # Relative name.
14866 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14867 ac_top_srcdir=$ac_top_build_prefix$srcdir
14868 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14869esac
81ecdfbb 14870ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 14871
c906108c 14872
fdc59709 14873 cd "$ac_dir"
c906108c
SS
14874
14875 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
14876 if test -f "$ac_srcdir/configure.gnu"; then
14877 ac_sub_configure=$ac_srcdir/configure.gnu
14878 elif test -f "$ac_srcdir/configure"; then
14879 ac_sub_configure=$ac_srcdir/configure
14880 elif test -f "$ac_srcdir/configure.in"; then
14881 # This should be Cygnus configure.
14882 ac_sub_configure=$ac_aux_dir/configure
c906108c 14883 else
81ecdfbb
RW
14884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14885$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
14886 ac_sub_configure=
14887 fi
14888
14889 # The recursion is here.
14890 if test -n "$ac_sub_configure"; then
c906108c 14891 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
14892 case $cache_file in
14893 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
14894 *) # Relative name.
14895 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 14896 esac
c906108c 14897
81ecdfbb
RW
14898 { $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
14899$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 14900 # The eval makes quoting arguments work.
fdc59709
PB
14901 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14902 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 14903 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
14904 fi
14905
fdc59709 14906 cd "$ac_popdir"
c906108c
SS
14907 done
14908fi
81ecdfbb
RW
14909if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14911$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14912fi
c906108c
SS
14913
14914
14915exit 0
This page took 2.360101 seconds and 4 git commands to generate.