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
7349ff92 781with_auto_load_dir
bccbefd2 782with_auto_load_safe_path
81ecdfbb
RW
783enable_targets
784enable_64_bit_bfd
785enable_gdbcli
786enable_gdbmi
787enable_tui
788enable_gdbtk
05e7c244 789with_libunwind_ia64
81ecdfbb
RW
790with_curses
791enable_profiling
792with_pkgversion
793with_bugurl
b040ad30 794with_zlib
81ecdfbb 795with_libiconv_prefix
478aac75 796with_iconv_bin
81ecdfbb 797with_system_readline
b8e0a31c 798with_jit_reader_dir
81ecdfbb
RW
799with_expat
800with_gnu_ld
801enable_rpath
802with_libexpat_prefix
803with_python
804with_included_regex
805with_sysroot
806with_system_gdbinit
807enable_werror
808enable_build_warnings
809enable_gdb_build_warnings
810with_tcl
811with_tk
812with_x
813enable_sim
814enable_multi_ice
496c0e1b 815enable_gdbserver
81ecdfbb
RW
816'
817 ac_precious_vars='build_alias
818host_alias
819target_alias
820CC
821CFLAGS
822LDFLAGS
823LIBS
824CPPFLAGS
825CPP
f06e05e0
JK
826MAKEINFO
827MAKEINFOFLAGS
81ecdfbb
RW
828YACC
829YFLAGS
830XMKMF'
5ae98d25 831ac_subdirs_all='testsuite
81ecdfbb
RW
832gdbtk
833multi-ice
834gdbserver'
c906108c
SS
835
836# Initialize some variables set by options.
bec39cab
AC
837ac_init_help=
838ac_init_version=false
81ecdfbb
RW
839ac_unrecognized_opts=
840ac_unrecognized_sep=
c906108c
SS
841# The variables have the same names as the options, with
842# dashes changed to underlines.
bec39cab 843cache_file=/dev/null
c906108c 844exec_prefix=NONE
c906108c 845no_create=
c906108c
SS
846no_recursion=
847prefix=NONE
848program_prefix=NONE
849program_suffix=NONE
850program_transform_name=s,x,x,
851silent=
852site=
853srcdir=
c906108c
SS
854verbose=
855x_includes=NONE
856x_libraries=NONE
bec39cab
AC
857
858# Installation directory options.
859# These are left unexpanded so users can "make install exec_prefix=/foo"
860# and all the variables that are supposed to be based on exec_prefix
861# by default will actually change.
862# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 863# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
864bindir='${exec_prefix}/bin'
865sbindir='${exec_prefix}/sbin'
866libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
867datarootdir='${prefix}/share'
868datadir='${datarootdir}'
c906108c
SS
869sysconfdir='${prefix}/etc'
870sharedstatedir='${prefix}/com'
871localstatedir='${prefix}/var'
c906108c
SS
872includedir='${prefix}/include'
873oldincludedir='/usr/include'
81ecdfbb
RW
874docdir='${datarootdir}/doc/${PACKAGE}'
875infodir='${datarootdir}/info'
876htmldir='${docdir}'
877dvidir='${docdir}'
878pdfdir='${docdir}'
879psdir='${docdir}'
880libdir='${exec_prefix}/lib'
881localedir='${datarootdir}/locale'
882mandir='${datarootdir}/man'
c906108c 883
c906108c 884ac_prev=
81ecdfbb 885ac_dashdash=
c906108c
SS
886for ac_option
887do
c906108c
SS
888 # If the previous option needs an argument, assign it.
889 if test -n "$ac_prev"; then
81ecdfbb 890 eval $ac_prev=\$ac_option
c906108c
SS
891 ac_prev=
892 continue
893 fi
894
81ecdfbb
RW
895 case $ac_option in
896 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
897 *) ac_optarg=yes ;;
898 esac
c906108c
SS
899
900 # Accept the important Cygnus configure options, so we can diagnose typos.
901
81ecdfbb
RW
902 case $ac_dashdash$ac_option in
903 --)
904 ac_dashdash=yes ;;
c906108c
SS
905
906 -bindir | --bindir | --bindi | --bind | --bin | --bi)
907 ac_prev=bindir ;;
908 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 909 bindir=$ac_optarg ;;
c906108c
SS
910
911 -build | --build | --buil | --bui | --bu)
bec39cab 912 ac_prev=build_alias ;;
c906108c 913 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 914 build_alias=$ac_optarg ;;
c906108c
SS
915
916 -cache-file | --cache-file | --cache-fil | --cache-fi \
917 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
918 ac_prev=cache_file ;;
919 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
920 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
921 cache_file=$ac_optarg ;;
922
923 --config-cache | -C)
924 cache_file=config.cache ;;
c906108c 925
81ecdfbb 926 -datadir | --datadir | --datadi | --datad)
c906108c 927 ac_prev=datadir ;;
81ecdfbb 928 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 929 datadir=$ac_optarg ;;
c906108c 930
81ecdfbb
RW
931 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
932 | --dataroo | --dataro | --datar)
933 ac_prev=datarootdir ;;
934 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
935 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
936 datarootdir=$ac_optarg ;;
937
c906108c 938 -disable-* | --disable-*)
81ecdfbb 939 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 940 # Reject names that are not valid shell variable names.
81ecdfbb
RW
941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
942 as_fn_error "invalid feature name: $ac_useropt"
943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=no ;;
953
954 -docdir | --docdir | --docdi | --doc | --do)
955 ac_prev=docdir ;;
956 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
957 docdir=$ac_optarg ;;
958
959 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
960 ac_prev=dvidir ;;
961 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
962 dvidir=$ac_optarg ;;
c906108c
SS
963
964 -enable-* | --enable-*)
81ecdfbb 965 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 966 # Reject names that are not valid shell variable names.
81ecdfbb
RW
967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
968 as_fn_error "invalid feature name: $ac_useropt"
969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
b4e70030 977 esac
81ecdfbb 978 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
979
980 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
981 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
982 | --exec | --exe | --ex)
983 ac_prev=exec_prefix ;;
984 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
985 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
986 | --exec=* | --exe=* | --ex=*)
bec39cab 987 exec_prefix=$ac_optarg ;;
c906108c
SS
988
989 -gas | --gas | --ga | --g)
990 # Obsolete; use --with-gas.
991 with_gas=yes ;;
992
bec39cab
AC
993 -help | --help | --hel | --he | -h)
994 ac_init_help=long ;;
995 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
996 ac_init_help=recursive ;;
997 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
998 ac_init_help=short ;;
c906108c
SS
999
1000 -host | --host | --hos | --ho)
bec39cab 1001 ac_prev=host_alias ;;
c906108c 1002 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1003 host_alias=$ac_optarg ;;
c906108c 1004
81ecdfbb
RW
1005 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1006 ac_prev=htmldir ;;
1007 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1008 | --ht=*)
1009 htmldir=$ac_optarg ;;
1010
c906108c
SS
1011 -includedir | --includedir | --includedi | --included | --include \
1012 | --includ | --inclu | --incl | --inc)
1013 ac_prev=includedir ;;
1014 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1015 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1016 includedir=$ac_optarg ;;
c906108c
SS
1017
1018 -infodir | --infodir | --infodi | --infod | --info | --inf)
1019 ac_prev=infodir ;;
1020 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1021 infodir=$ac_optarg ;;
c906108c
SS
1022
1023 -libdir | --libdir | --libdi | --libd)
1024 ac_prev=libdir ;;
1025 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1026 libdir=$ac_optarg ;;
c906108c
SS
1027
1028 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1029 | --libexe | --libex | --libe)
1030 ac_prev=libexecdir ;;
1031 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1032 | --libexe=* | --libex=* | --libe=*)
bec39cab 1033 libexecdir=$ac_optarg ;;
c906108c 1034
81ecdfbb
RW
1035 -localedir | --localedir | --localedi | --localed | --locale)
1036 ac_prev=localedir ;;
1037 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1038 localedir=$ac_optarg ;;
1039
c906108c 1040 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1041 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1042 ac_prev=localstatedir ;;
1043 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1044 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1045 localstatedir=$ac_optarg ;;
c906108c
SS
1046
1047 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1048 ac_prev=mandir ;;
1049 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1050 mandir=$ac_optarg ;;
c906108c
SS
1051
1052 -nfp | --nfp | --nf)
1053 # Obsolete; use --without-fp.
1054 with_fp=no ;;
1055
1056 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1057 | --no-cr | --no-c | -n)
c906108c
SS
1058 no_create=yes ;;
1059
1060 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062 no_recursion=yes ;;
1063
1064 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1065 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1066 | --oldin | --oldi | --old | --ol | --o)
1067 ac_prev=oldincludedir ;;
1068 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1069 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1070 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1071 oldincludedir=$ac_optarg ;;
c906108c
SS
1072
1073 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1074 ac_prev=prefix ;;
1075 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1076 prefix=$ac_optarg ;;
c906108c
SS
1077
1078 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1079 | --program-pre | --program-pr | --program-p)
1080 ac_prev=program_prefix ;;
1081 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1082 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1083 program_prefix=$ac_optarg ;;
c906108c
SS
1084
1085 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1086 | --program-suf | --program-su | --program-s)
1087 ac_prev=program_suffix ;;
1088 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1089 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1090 program_suffix=$ac_optarg ;;
c906108c
SS
1091
1092 -program-transform-name | --program-transform-name \
1093 | --program-transform-nam | --program-transform-na \
1094 | --program-transform-n | --program-transform- \
1095 | --program-transform | --program-transfor \
1096 | --program-transfo | --program-transf \
1097 | --program-trans | --program-tran \
1098 | --progr-tra | --program-tr | --program-t)
1099 ac_prev=program_transform_name ;;
1100 -program-transform-name=* | --program-transform-name=* \
1101 | --program-transform-nam=* | --program-transform-na=* \
1102 | --program-transform-n=* | --program-transform-=* \
1103 | --program-transform=* | --program-transfor=* \
1104 | --program-transfo=* | --program-transf=* \
1105 | --program-trans=* | --program-tran=* \
1106 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1107 program_transform_name=$ac_optarg ;;
c906108c 1108
81ecdfbb
RW
1109 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1110 ac_prev=pdfdir ;;
1111 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1112 pdfdir=$ac_optarg ;;
1113
1114 -psdir | --psdir | --psdi | --psd | --ps)
1115 ac_prev=psdir ;;
1116 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1117 psdir=$ac_optarg ;;
1118
c906108c
SS
1119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120 | -silent | --silent | --silen | --sile | --sil)
1121 silent=yes ;;
1122
1123 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1124 ac_prev=sbindir ;;
1125 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1126 | --sbi=* | --sb=*)
bec39cab 1127 sbindir=$ac_optarg ;;
c906108c
SS
1128
1129 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1130 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1131 | --sharedst | --shareds | --shared | --share | --shar \
1132 | --sha | --sh)
1133 ac_prev=sharedstatedir ;;
1134 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1135 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1136 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1137 | --sha=* | --sh=*)
bec39cab 1138 sharedstatedir=$ac_optarg ;;
c906108c
SS
1139
1140 -site | --site | --sit)
1141 ac_prev=site ;;
1142 -site=* | --site=* | --sit=*)
bec39cab 1143 site=$ac_optarg ;;
3ace7edb 1144
c906108c
SS
1145 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1146 ac_prev=srcdir ;;
1147 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1148 srcdir=$ac_optarg ;;
c906108c
SS
1149
1150 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1151 | --syscon | --sysco | --sysc | --sys | --sy)
1152 ac_prev=sysconfdir ;;
1153 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1154 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1155 sysconfdir=$ac_optarg ;;
c906108c
SS
1156
1157 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1158 ac_prev=target_alias ;;
c906108c 1159 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1160 target_alias=$ac_optarg ;;
c906108c
SS
1161
1162 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1163 verbose=yes ;;
1164
bec39cab
AC
1165 -version | --version | --versio | --versi | --vers | -V)
1166 ac_init_version=: ;;
c906108c
SS
1167
1168 -with-* | --with-*)
81ecdfbb 1169 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1170 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1171 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1172 as_fn_error "invalid package name: $ac_useropt"
1173 ac_useropt_orig=$ac_useropt
1174 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175 case $ac_user_opts in
1176 *"
1177"with_$ac_useropt"
1178"*) ;;
1179 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1180 ac_unrecognized_sep=', ';;
b4e70030 1181 esac
81ecdfbb 1182 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1183
1184 -without-* | --without-*)
81ecdfbb 1185 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1186 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1188 as_fn_error "invalid package name: $ac_useropt"
1189 ac_useropt_orig=$ac_useropt
1190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1191 case $ac_user_opts in
1192 *"
1193"with_$ac_useropt"
1194"*) ;;
1195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1196 ac_unrecognized_sep=', ';;
1197 esac
1198 eval with_$ac_useropt=no ;;
c906108c
SS
1199
1200 --x)
1201 # Obsolete; use --with-x.
1202 with_x=yes ;;
1203
1204 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1205 | --x-incl | --x-inc | --x-in | --x-i)
1206 ac_prev=x_includes ;;
1207 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1208 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1209 x_includes=$ac_optarg ;;
c906108c
SS
1210
1211 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1212 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1213 ac_prev=x_libraries ;;
1214 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1215 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1216 x_libraries=$ac_optarg ;;
c906108c 1217
81ecdfbb
RW
1218 -*) as_fn_error "unrecognized option: \`$ac_option'
1219Try \`$0 --help' for more information."
c906108c
SS
1220 ;;
1221
bec39cab
AC
1222 *=*)
1223 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1224 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1225 case $ac_envvar in #(
1226 '' | [0-9]* | *[!_$as_cr_alnum]* )
1227 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1228 esac
1229 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1230 export $ac_envvar ;;
1231
c906108c 1232 *)
bec39cab 1233 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1234 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1235 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1236 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1237 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1238 ;;
1239
1240 esac
1241done
1242
1243if test -n "$ac_prev"; then
bec39cab 1244 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1245 as_fn_error "missing argument to $ac_option"
c906108c 1246fi
c906108c 1247
81ecdfbb
RW
1248if test -n "$ac_unrecognized_opts"; then
1249 case $enable_option_checking in
1250 no) ;;
1251 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1252 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1253 esac
81ecdfbb 1254fi
b4e70030 1255
81ecdfbb
RW
1256# Check all directory arguments for consistency.
1257for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1258 datadir sysconfdir sharedstatedir localstatedir includedir \
1259 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1260 libdir localedir mandir
b4e70030 1261do
81ecdfbb
RW
1262 eval ac_val=\$$ac_var
1263 # Remove trailing slashes.
1264 case $ac_val in
1265 */ )
1266 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1267 eval $ac_var=\$ac_val;;
1268 esac
1269 # Be sure to have absolute directory names.
b4e70030 1270 case $ac_val in
81ecdfbb
RW
1271 [\\/$]* | ?:[\\/]* ) continue;;
1272 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1273 esac
81ecdfbb 1274 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1275done
1276
bec39cab
AC
1277# There might be people who depend on the old broken behavior: `$host'
1278# used to hold the argument of --host etc.
1279# FIXME: To remove some day.
1280build=$build_alias
1281host=$host_alias
1282target=$target_alias
1283
1284# FIXME: To remove some day.
1285if test "x$host_alias" != x; then
1286 if test "x$build_alias" = x; then
1287 cross_compiling=maybe
81ecdfbb 1288 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1289 If a cross compiler is detected then cross compile mode will be used." >&2
1290 elif test "x$build_alias" != "x$host_alias"; then
1291 cross_compiling=yes
1292 fi
1293fi
c906108c 1294
bec39cab
AC
1295ac_tool_prefix=
1296test -n "$host_alias" && ac_tool_prefix=$host_alias-
1297
1298test "$silent" = yes && exec 6>/dev/null
c906108c 1299
c906108c 1300
81ecdfbb
RW
1301ac_pwd=`pwd` && test -n "$ac_pwd" &&
1302ac_ls_di=`ls -di .` &&
1303ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1304 as_fn_error "working directory cannot be determined"
1305test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1306 as_fn_error "pwd does not report name of working directory"
1307
1308
c906108c
SS
1309# Find the source files, if location was not specified.
1310if test -z "$srcdir"; then
1311 ac_srcdir_defaulted=yes
81ecdfbb
RW
1312 # Try the directory containing this script, then the parent directory.
1313 ac_confdir=`$as_dirname -- "$as_myself" ||
1314$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1315 X"$as_myself" : 'X\(//\)[^/]' \| \
1316 X"$as_myself" : 'X\(//\)$' \| \
1317 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1318$as_echo X"$as_myself" |
1319 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\/\)[^/].*/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)$/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\).*/{
1332 s//\1/
1333 q
1334 }
1335 s/.*/./; q'`
c906108c 1336 srcdir=$ac_confdir
81ecdfbb 1337 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1338 srcdir=..
1339 fi
1340else
1341 ac_srcdir_defaulted=no
1342fi
81ecdfbb
RW
1343if test ! -r "$srcdir/$ac_unique_file"; then
1344 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1345 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1346fi
1347ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1348ac_abs_confdir=`(
1349 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1350 pwd)`
1351# When building in place, set srcdir=.
1352if test "$ac_abs_confdir" = "$ac_pwd"; then
1353 srcdir=.
1354fi
1355# Remove unnecessary trailing slashes from srcdir.
1356# Double slashes in file names in object file debugging info
1357# mess up M-x gdb in Emacs.
1358case $srcdir in
1359*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1360esac
1361for ac_var in $ac_precious_vars; do
1362 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_env_${ac_var}_value=\$${ac_var}
1364 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1365 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1366done
c906108c 1367
bec39cab
AC
1368#
1369# Report the --help message.
1370#
1371if test "$ac_init_help" = "long"; then
1372 # Omit some internal or obsolete options to make the list less imposing.
1373 # This message is too long to be a string in the A/UX 3.1 sh.
1374 cat <<_ACEOF
1375\`configure' configures this package to adapt to many kinds of systems.
1376
1377Usage: $0 [OPTION]... [VAR=VALUE]...
1378
1379To assign environment variables (e.g., CC, CFLAGS...), specify them as
1380VAR=VALUE. See below for descriptions of some of the useful variables.
1381
1382Defaults for the options are specified in brackets.
1383
1384Configuration:
1385 -h, --help display this help and exit
1386 --help=short display options specific to this package
1387 --help=recursive display the short help of all the included packages
1388 -V, --version display version information and exit
1389 -q, --quiet, --silent do not print \`checking...' messages
1390 --cache-file=FILE cache test results in FILE [disabled]
1391 -C, --config-cache alias for \`--cache-file=config.cache'
1392 -n, --no-create do not create output files
1393 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1394
bec39cab
AC
1395Installation directories:
1396 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1397 [$ac_default_prefix]
bec39cab 1398 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1399 [PREFIX]
bec39cab
AC
1400
1401By default, \`make install' will install all the files in
1402\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1403an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1404for instance \`--prefix=\$HOME'.
1405
1406For better control, use the options below.
1407
1408Fine tuning of the installation directories:
81ecdfbb
RW
1409 --bindir=DIR user executables [EPREFIX/bin]
1410 --sbindir=DIR system admin executables [EPREFIX/sbin]
1411 --libexecdir=DIR program executables [EPREFIX/libexec]
1412 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1413 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1414 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1415 --libdir=DIR object code libraries [EPREFIX/lib]
1416 --includedir=DIR C header files [PREFIX/include]
1417 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1418 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1419 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1420 --infodir=DIR info documentation [DATAROOTDIR/info]
1421 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1422 --mandir=DIR man documentation [DATAROOTDIR/man]
1423 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1424 --htmldir=DIR html documentation [DOCDIR]
1425 --dvidir=DIR dvi documentation [DOCDIR]
1426 --pdfdir=DIR pdf documentation [DOCDIR]
1427 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1428_ACEOF
1429
1430 cat <<\_ACEOF
1431
9009e1ae
MR
1432Program names:
1433 --program-prefix=PREFIX prepend PREFIX to installed program names
1434 --program-suffix=SUFFIX append SUFFIX to installed program names
1435 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1436
bec39cab
AC
1437X features:
1438 --x-includes=DIR X include files are in DIR
1439 --x-libraries=DIR X library files are in DIR
1440
1441System types:
1442 --build=BUILD configure for building on BUILD [guessed]
1443 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1444 --target=TARGET configure for building compilers for TARGET [HOST]
1445_ACEOF
1446fi
1447
1448if test -n "$ac_init_help"; then
1449
1450 cat <<\_ACEOF
1451
1452Optional Features:
81ecdfbb 1453 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1454 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1455 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1456 --enable-maintainer-mode enable make rules and dependencies not useful
1457 (and sometimes confusing) to the casual installer
da2f07f1
JK
1458 --enable-plugins Enable support for plugins (defaults no)
1459 --disable-largefile omit support for large files
a1220294
TT
1460 --enable-targets=TARGETS
1461 alternative target configurations
c0993dbe 1462 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1463 --disable-gdbcli disable command-line interface (CLI)
1464 --disable-gdbmi disable machine-interface (MI)
1465 --enable-tui enable full-screen terminal user interface (TUI)
1466 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1467 --enable-profiling enable profiling of GDB
3841debe 1468 --disable-rpath do not hardcode runtime library paths
a1220294 1469 --enable-werror treat compile warnings as errors
32c1c914 1470 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1471 --enable-gdb-build-warnings
32c1c914 1472 enable GDB specific build-time compiler warnings if
a1220294 1473 gcc is used
32c1c914 1474 --enable-sim link gdb with simulator
bec39cab 1475 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1476 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1477 is auto)
bec39cab
AC
1478
1479Optional Packages:
1480 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1481 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1482 --with-separate-debug-dir=PATH
32c1c914 1483 look for global separate debug info in this path
62e4f60c 1484 [LIBDIR/debug]
b14b1491
TT
1485 --with-gdb-datadir=PATH look for global separate data files in this path
1486 [DATADIR/gdb]
29b0e8a2 1487 --with-relocated-sources=PATH
32c1c914 1488 automatically relocate this path for source files
7349ff92
JK
1489 --with-auto-load-dir=PATH
1490 directories from which to load auto-loaded scripts,
1491 use '$ddir' for -data-directory [$ddir/auto-load]
bccbefd2 1492 --with-auto-load-safe-path=PATH
6dea1fbd 1493 directories safe to hold auto-loaded files, use
7349ff92
JK
1494 $ddir for --with-gdb-datadir path
1495 [--with-auto-load-dir]
bccbefd2
JK
1496 --without-auto-load-safe-path
1497 do not restrict auto-loaded files locations
05e7c244 1498 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1499 --with-curses use the curses library instead of the termcap
1500 library
c16158bc
JM
1501 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1502 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1503 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1504 --with-libiconv-prefix=DIR
1505 search for libiconv in DIR/include and DIR/lib
478aac75 1506 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1507 --with-system-readline use installed readline library
b8e0a31c
SD
1508 --with-jit-reader-dir=PATH
1509 directory to load the JIT readers from
5c39566f 1510 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1511 --with-gnu-ld assume the C compiler uses GNU ld default=no
1512 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1513 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1514 --with-python[=PYTHON] include python support
1515 (auto/yes/no/<python-program>)
a1220294
TT
1516 --without-included-regex
1517 don't use included regex; this is the default on
1518 systems with version 2 of the GNU C library (use
1519 with caution on other system)
81ecdfbb 1520 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1521 --with-system-gdbinit=PATH
32c1c914 1522 automatically load a system-wide gdbinit file
5062cc19
KS
1523 --with-tcl directory containing tcl configuration (tclConfig.sh)
1524 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1525 --with-x use the X Window System
bec39cab
AC
1526
1527Some influential environment variables:
1528 CC C compiler command
1529 CFLAGS C compiler flags
1530 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1531 nonstandard directory <lib dir>
81ecdfbb
RW
1532 LIBS libraries to pass to the linker, e.g. -l<library>
1533 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1534 you have headers in a nonstandard directory <include dir>
bec39cab 1535 CPP C preprocessor
f06e05e0
JK
1536 MAKEINFO Parent configure detects if it is of sufficient version.
1537 MAKEINFOFLAGS
1538 Parameters for MAKEINFO.
81ecdfbb
RW
1539 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1540 the first program found out of: `bison -y', `byacc', `yacc'.
1541 YFLAGS The list of arguments that will be passed by default to $YACC.
1542 This script will default YFLAGS to the empty string to avoid a
1543 default value of `-d' given by some make applications.
1544 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1545
1546Use these variables to override the choices made by `configure' or to help
1547it to find libraries and programs with nonstandard names/locations.
1548
81ecdfbb 1549Report bugs to the package provider.
bec39cab 1550_ACEOF
81ecdfbb 1551ac_status=$?
bec39cab
AC
1552fi
1553
1554if test "$ac_init_help" = "recursive"; then
1555 # If there are subdirs, report their specific --help.
bec39cab 1556 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1557 test -d "$ac_dir" ||
1558 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559 continue
bec39cab
AC
1560 ac_builddir=.
1561
81ecdfbb
RW
1562case "$ac_dir" in
1563.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564*)
1565 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1566 # A ".." for each directory in $ac_dir_suffix.
1567 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1568 case $ac_top_builddir_sub in
1569 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571 esac ;;
1572esac
1573ac_abs_top_builddir=$ac_pwd
1574ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575# for backward compatibility:
1576ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1577
1578case $srcdir in
81ecdfbb 1579 .) # We are building in place.
bec39cab 1580 ac_srcdir=.
81ecdfbb
RW
1581 ac_top_srcdir=$ac_top_builddir_sub
1582 ac_abs_top_srcdir=$ac_pwd ;;
1583 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1584 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1585 ac_top_srcdir=$srcdir
1586 ac_abs_top_srcdir=$srcdir ;;
1587 *) # Relative name.
1588 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589 ac_top_srcdir=$ac_top_build_prefix$srcdir
1590 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1591esac
81ecdfbb 1592ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1593
81ecdfbb
RW
1594 cd "$ac_dir" || { ac_status=$?; continue; }
1595 # Check for guested configure.
1596 if test -f "$ac_srcdir/configure.gnu"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599 elif test -f "$ac_srcdir/configure"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1602 else
81ecdfbb
RW
1603 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1604 fi || ac_status=$?
1605 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1606 done
1607fi
1608
81ecdfbb 1609test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1610if $ac_init_version; then
1611 cat <<\_ACEOF
81ecdfbb
RW
1612configure
1613generated by GNU Autoconf 2.64
bec39cab 1614
81ecdfbb 1615Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1616This configure script is free software; the Free Software Foundation
1617gives unlimited permission to copy, distribute and modify it.
1618_ACEOF
81ecdfbb 1619 exit
bec39cab 1620fi
bec39cab 1621
81ecdfbb
RW
1622## ------------------------ ##
1623## Autoconf initialization. ##
1624## ------------------------ ##
bec39cab 1625
81ecdfbb
RW
1626# ac_fn_c_try_compile LINENO
1627# --------------------------
1628# Try to compile conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_compile ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 rm -f conftest.$ac_objext
1633 if { { ac_try="$ac_compile"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_compile") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648 test $ac_status = 0; } && {
1649 test -z "$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 } && test -s conftest.$ac_objext; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1656
81ecdfbb
RW
1657 ac_retval=1
1658fi
1659 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1660 return $ac_retval
1661
1662} # ac_fn_c_try_compile
1663
1664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
bec39cab 1668{
81ecdfbb
RW
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685 test $ac_status = 0; } >/dev/null && {
1686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1693
81ecdfbb
RW
1694 ac_retval=1
1695fi
1696 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1697 return $ac_retval
bec39cab 1698
81ecdfbb 1699} # ac_fn_c_try_cpp
bec39cab 1700
81ecdfbb
RW
1701# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1702# -------------------------------------------------------
1703# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1704# the include files in INCLUDES and setting the cache variable VAR
1705# accordingly.
1706ac_fn_c_check_header_mongrel ()
1707{
1708 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1709 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1711$as_echo_n "checking for $2... " >&6; }
1712if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1713 $as_echo_n "(cached) " >&6
1714fi
1715eval ac_res=\$$3
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1717$as_echo "$ac_res" >&6; }
1718else
1719 # Is the header compilable?
1720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1721$as_echo_n "checking $2 usability... " >&6; }
1722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1723/* end confdefs.h. */
1724$4
1725#include <$2>
1726_ACEOF
1727if ac_fn_c_try_compile "$LINENO"; then :
1728 ac_header_compiler=yes
1729else
1730 ac_header_compiler=no
1731fi
1732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1734$as_echo "$ac_header_compiler" >&6; }
bec39cab 1735
81ecdfbb
RW
1736# Is the header present?
1737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1738$as_echo_n "checking $2 presence... " >&6; }
1739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741#include <$2>
1742_ACEOF
1743if ac_fn_c_try_cpp "$LINENO"; then :
1744 ac_header_preproc=yes
1745else
1746 ac_header_preproc=no
1747fi
1748rm -f conftest.err conftest.$ac_ext
1749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1750$as_echo "$ac_header_preproc" >&6; }
bec39cab 1751
81ecdfbb
RW
1752# So? What about this header?
1753case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1754 yes:no: )
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1756$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1758$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1759 ;;
1760 no:yes:* )
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1762$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1764$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1766$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1768$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1770$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1771 ;;
1772esac
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
1775if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1776 $as_echo_n "(cached) " >&6
1777else
1778 eval "$3=\$ac_header_compiler"
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783fi
1784 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1785
81ecdfbb 1786} # ac_fn_c_check_header_mongrel
bec39cab 1787
81ecdfbb
RW
1788# ac_fn_c_try_run LINENO
1789# ----------------------
1790# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1791# that executables *can* be run.
1792ac_fn_c_try_run ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { { ac_try="$ac_link"
1796case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799esac
1800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801$as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>&5
1803 ac_status=$?
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1806 { { case "(($ac_try" in
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1809esac
1810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811$as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_try") 2>&5
1813 ac_status=$?
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; }; }; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: program exited with status $ac_status" >&5
1819 $as_echo "$as_me: failed program was:" >&5
1820sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1821
81ecdfbb
RW
1822 ac_retval=$ac_status
1823fi
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1825 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1826 return $ac_retval
bec39cab 1827
81ecdfbb 1828} # ac_fn_c_try_run
bec39cab 1829
81ecdfbb
RW
1830# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1831# -------------------------------------------------------
1832# Tests whether HEADER exists and can be compiled using the include files in
1833# INCLUDES, setting the cache variable VAR accordingly.
1834ac_fn_c_check_header_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
1839if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1840 $as_echo_n "(cached) " >&6
1841else
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845#include <$2>
bec39cab 1846_ACEOF
81ecdfbb
RW
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 eval "$3=yes"
1849else
1850 eval "$3=no"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1858
81ecdfbb 1859} # ac_fn_c_check_header_compile
bec39cab 1860
81ecdfbb
RW
1861# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1862# --------------------------------------------
1863# Tries to find the compile-time value of EXPR in a program that includes
1864# INCLUDES, setting VAR accordingly. Returns whether the value could be
1865# computed
1866ac_fn_c_compute_int ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if test "$cross_compiling" = yes; then
1870 # Depending upon the size, compute the lo and hi bounds.
1871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1872/* end confdefs.h. */
1873$4
1874int
1875main ()
1876{
1877static int test_array [1 - 2 * !(($2) >= 0)];
1878test_array [0] = 0
bec39cab 1879
81ecdfbb
RW
1880 ;
1881 return 0;
1882}
1883_ACEOF
1884if ac_fn_c_try_compile "$LINENO"; then :
1885 ac_lo=0 ac_mid=0
1886 while :; do
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$4
1890int
1891main ()
1892{
1893static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1894test_array [0] = 0
bec39cab 1895
81ecdfbb
RW
1896 ;
1897 return 0;
1898}
1899_ACEOF
1900if ac_fn_c_try_compile "$LINENO"; then :
1901 ac_hi=$ac_mid; break
1902else
1903 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1904 if test $ac_lo -le $ac_mid; then
1905 ac_lo= ac_hi=
1906 break
1907 fi
1908 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1909fi
81ecdfbb
RW
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911 done
c906108c 1912else
81ecdfbb
RW
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916int
1917main ()
1918{
1919static int test_array [1 - 2 * !(($2) < 0)];
1920test_array [0] = 0
bec39cab 1921
81ecdfbb
RW
1922 ;
1923 return 0;
1924}
1925_ACEOF
1926if ac_fn_c_try_compile "$LINENO"; then :
1927 ac_hi=-1 ac_mid=-1
1928 while :; do
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$4
1932int
1933main ()
1934{
1935static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1936test_array [0] = 0
bec39cab 1937
81ecdfbb
RW
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 ac_lo=$ac_mid; break
1944else
1945 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1946 if test $ac_mid -le $ac_hi; then
1947 ac_lo= ac_hi=
1948 break
1949 fi
1950 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953 done
1954else
1955 ac_lo= ac_hi=
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1958fi
1959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960# Binary search between lo and hi bounds.
1961while test "x$ac_lo" != "x$ac_hi"; do
1962 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1964/* end confdefs.h. */
1965$4
1966int
1967main ()
1968{
1969static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1970test_array [0] = 0
bec39cab 1971
81ecdfbb
RW
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_compile "$LINENO"; then :
1977 ac_hi=$ac_mid
1978else
1979 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1980fi
1981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982done
1983case $ac_lo in #((
1984?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1985'') ac_retval=1 ;;
1986esac
1987 else
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$4
1991static long int longval () { return $2; }
1992static unsigned long int ulongval () { return $2; }
1993#include <stdio.h>
1994#include <stdlib.h>
1995int
1996main ()
1997{
bec39cab 1998
81ecdfbb
RW
1999 FILE *f = fopen ("conftest.val", "w");
2000 if (! f)
2001 return 1;
2002 if (($2) < 0)
2003 {
2004 long int i = longval ();
2005 if (i != ($2))
2006 return 1;
2007 fprintf (f, "%ld", i);
2008 }
2009 else
2010 {
2011 unsigned long int i = ulongval ();
2012 if (i != ($2))
2013 return 1;
2014 fprintf (f, "%lu", i);
2015 }
2016 /* Do not output a trailing newline, as this causes \r\n confusion
2017 on some platforms. */
2018 return ferror (f) || fclose (f) != 0;
bec39cab 2019
81ecdfbb
RW
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_run "$LINENO"; then :
2025 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2026else
2027 ac_retval=1
2028fi
2029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2030 conftest.$ac_objext conftest.beam conftest.$ac_ext
2031rm -f conftest.val
bec39cab 2032
81ecdfbb
RW
2033 fi
2034 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2035 return $ac_retval
bec39cab 2036
81ecdfbb 2037} # ac_fn_c_compute_int
bec39cab 2038
c971b7fa
PA
2039# ac_fn_c_try_link LINENO
2040# -----------------------
2041# Try to link conftest.$ac_ext, and return whether this succeeded.
2042ac_fn_c_try_link ()
2043{
2044 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045 rm -f conftest.$ac_objext conftest$ac_exeext
2046 if { { ac_try="$ac_link"
2047case "(($ac_try" in
2048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2049 *) ac_try_echo=$ac_try;;
2050esac
2051eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2052$as_echo "$ac_try_echo"; } >&5
2053 (eval "$ac_link") 2>conftest.err
2054 ac_status=$?
2055 if test -s conftest.err; then
2056 grep -v '^ *+' conftest.err >conftest.er1
2057 cat conftest.er1 >&5
2058 mv -f conftest.er1 conftest.err
2059 fi
2060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2061 test $ac_status = 0; } && {
2062 test -z "$ac_c_werror_flag" ||
2063 test ! -s conftest.err
2064 } && test -s conftest$ac_exeext && {
2065 test "$cross_compiling" = yes ||
2066 $as_test_x conftest$ac_exeext
2067 }; then :
2068 ac_retval=0
2069else
2070 $as_echo "$as_me: failed program was:" >&5
2071sed 's/^/| /' conftest.$ac_ext >&5
2072
2073 ac_retval=1
2074fi
2075 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2076 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2077 # interfere with the next link command; also delete a directory that is
2078 # left behind by Apple's compiler. We do this before executing the actions.
2079 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2080 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2081 return $ac_retval
2082
2083} # ac_fn_c_try_link
2084
55a8c076
YQ
2085# ac_fn_c_check_func LINENO FUNC VAR
2086# ----------------------------------
2087# Tests whether FUNC exists, setting the cache variable VAR accordingly
2088ac_fn_c_check_func ()
81ecdfbb
RW
2089{
2090 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2092$as_echo_n "checking for $2... " >&6; }
2093if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2094 $as_echo_n "(cached) " >&6
2095else
81ecdfbb
RW
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
55a8c076
YQ
2098/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2100#define $2 innocuous_$2
2101
2102/* System header to define __stub macros and hopefully few prototypes,
2103 which can conflict with char $2 (); below.
2104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2105 <limits.h> exists even on freestanding compilers. */
2106
2107#ifdef __STDC__
2108# include <limits.h>
2109#else
2110# include <assert.h>
2111#endif
2112
2113#undef $2
2114
2115/* Override any GCC internal prototype to avoid an error.
2116 Use char because int might match the return type of a GCC
2117 builtin and then its argument prototype would still apply. */
2118#ifdef __cplusplus
2119extern "C"
2120#endif
2121char $2 ();
2122/* The GNU C library defines this for functions which it implements
2123 to always fail with ENOSYS. Some functions are actually named
2124 something starting with __ and the normal name is an alias. */
2125#if defined __stub_$2 || defined __stub___$2
2126choke me
2127#endif
2128
2129int
2130main ()
2131{
2132return $2 ();
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_link "$LINENO"; then :
2138 eval "$3=yes"
2139else
2140 eval "$3=no"
2141fi
2142rm -f core conftest.err conftest.$ac_objext \
2143 conftest$ac_exeext conftest.$ac_ext
2144fi
2145eval ac_res=\$$3
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147$as_echo "$ac_res" >&6; }
2148 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2149
2150} # ac_fn_c_check_func
2151
770d76d7
PA
2152# ac_fn_c_check_decl LINENO SYMBOL VAR
2153# ------------------------------------
2154# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2155ac_fn_c_check_decl ()
2156{
2157 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2158 as_decl_name=`echo $2|sed 's/ *(.*//'`
2159 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2161$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2162if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2163 $as_echo_n "(cached) " >&6
2164else
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h. */
2167$4
2168int
2169main ()
2170{
2171#ifndef $as_decl_name
2172#ifdef __cplusplus
2173 (void) $as_decl_use;
2174#else
2175 (void) $as_decl_name;
2176#endif
2177#endif
2178
2179 ;
2180 return 0;
2181}
2182_ACEOF
2183if ac_fn_c_try_compile "$LINENO"; then :
2184 eval "$3=yes"
2185else
2186 eval "$3=no"
2187fi
2188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189fi
2190eval ac_res=\$$3
2191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2192$as_echo "$ac_res" >&6; }
2193 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2194
2195} # ac_fn_c_check_decl
2196
55a8c076
YQ
2197# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2198# ----------------------------------------------------
2199# Tries to find if the field MEMBER exists in type AGGR, after including
2200# INCLUDES, setting cache variable VAR accordingly.
2201ac_fn_c_check_member ()
2202{
2203 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2205$as_echo_n "checking for $2.$3... " >&6; }
2206if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2207 $as_echo_n "(cached) " >&6
2208else
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211$5
2212int
2213main ()
2214{
2215static $2 ac_aggr;
2216if (ac_aggr.$3)
2217return 0;
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_compile "$LINENO"; then :
2223 eval "$4=yes"
2224else
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226/* end confdefs.h. */
2227$5
2228int
2229main ()
2230{
2231static $2 ac_aggr;
2232if (sizeof ac_aggr.$3)
2233return 0;
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_compile "$LINENO"; then :
2239 eval "$4=yes"
2240else
2241 eval "$4=no"
2242fi
2243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246fi
2247eval ac_res=\$$4
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2249$as_echo "$ac_res" >&6; }
2250 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2251
2252} # ac_fn_c_check_member
2253
2254# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2255# -------------------------------------------
2256# Tests whether TYPE exists after having included INCLUDES, setting cache
2257# variable VAR accordingly.
2258ac_fn_c_check_type ()
2259{
2260 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2262$as_echo_n "checking for $2... " >&6; }
2263if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2264 $as_echo_n "(cached) " >&6
2265else
2266 eval "$3=no"
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$4
2270int
2271main ()
2272{
2273if (sizeof ($2))
2274 return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$4
2283int
2284main ()
2285{
2286if (sizeof (($2)))
2287 return 0;
2288 ;
2289 return 0;
2290}
2291_ACEOF
2292if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2293
81ecdfbb
RW
2294else
2295 eval "$3=yes"
2296fi
2297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298fi
2299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300fi
2301eval ac_res=\$$3
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
2304 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2305
81ecdfbb
RW
2306} # ac_fn_c_check_type
2307cat >config.log <<_ACEOF
2308This file contains any messages produced by compilers while
2309running configure, to aid debugging if configure makes a mistake.
d5af19ba 2310
81ecdfbb
RW
2311It was created by $as_me, which was
2312generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2313
81ecdfbb 2314 $ $0 $@
413ccac7 2315
81ecdfbb
RW
2316_ACEOF
2317exec 5>>config.log
2318{
2319cat <<_ASUNAME
2320## --------- ##
2321## Platform. ##
2322## --------- ##
413ccac7 2323
81ecdfbb
RW
2324hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2325uname -m = `(uname -m) 2>/dev/null || echo unknown`
2326uname -r = `(uname -r) 2>/dev/null || echo unknown`
2327uname -s = `(uname -s) 2>/dev/null || echo unknown`
2328uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2329
81ecdfbb
RW
2330/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2331/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2332
81ecdfbb
RW
2333/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2334/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2335/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2336/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2337/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2338/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2339/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2340
81ecdfbb 2341_ASUNAME
bec39cab 2342
bec39cab
AC
2343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2348 $as_echo "PATH: $as_dir"
2349 done
2350IFS=$as_save_IFS
bec39cab 2351
81ecdfbb 2352} >&5
bec39cab 2353
81ecdfbb 2354cat >&5 <<_ACEOF
bec39cab 2355
bec39cab 2356
81ecdfbb
RW
2357## ----------- ##
2358## Core tests. ##
2359## ----------- ##
2360
2361_ACEOF
2362
2363
2364# Keep a trace of the command line.
2365# Strip out --no-create and --no-recursion so they do not pile up.
2366# Strip out --silent because we don't want to record it for future runs.
2367# Also quote any args containing shell meta-characters.
2368# Make two passes to allow for proper duplicate-argument suppression.
2369ac_configure_args=
2370ac_configure_args0=
2371ac_configure_args1=
2372ac_must_keep_next=false
2373for ac_pass in 1 2
2374do
2375 for ac_arg
2376 do
2377 case $ac_arg in
2378 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2379 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2380 | -silent | --silent | --silen | --sile | --sil)
2381 continue ;;
2382 *\'*)
2383 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2384 esac
2385 case $ac_pass in
2386 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2387 2)
2388 as_fn_append ac_configure_args1 " '$ac_arg'"
2389 if test $ac_must_keep_next = true; then
2390 ac_must_keep_next=false # Got value, back to normal.
2391 else
2392 case $ac_arg in
2393 *=* | --config-cache | -C | -disable-* | --disable-* \
2394 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2395 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2396 | -with-* | --with-* | -without-* | --without-* | --x)
2397 case "$ac_configure_args0 " in
2398 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2399 esac
2400 ;;
2401 -* ) ac_must_keep_next=true ;;
2402 esac
2403 fi
2404 as_fn_append ac_configure_args " '$ac_arg'"
2405 ;;
2406 esac
2407 done
2408done
2409{ ac_configure_args0=; unset ac_configure_args0;}
2410{ ac_configure_args1=; unset ac_configure_args1;}
2411
2412# When interrupted or exit'd, cleanup temporary files, and complete
2413# config.log. We remove comments because anyway the quotes in there
2414# would cause problems or look ugly.
2415# WARNING: Use '\'' to represent an apostrophe within the trap.
2416# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2417trap 'exit_status=$?
2418 # Save into config.log some information that might help in debugging.
2419 {
2420 echo
2421
2422 cat <<\_ASBOX
2423## ---------------- ##
2424## Cache variables. ##
2425## ---------------- ##
2426_ASBOX
2427 echo
2428 # The following way of writing the cache mishandles newlines in values,
2429(
2430 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2431 eval ac_val=\$$ac_var
2432 case $ac_val in #(
2433 *${as_nl}*)
2434 case $ac_var in #(
2435 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2436$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2437 esac
2438 case $ac_var in #(
2439 _ | IFS | as_nl) ;; #(
2440 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2441 *) { eval $ac_var=; unset $ac_var;} ;;
2442 esac ;;
2443 esac
2444 done
2445 (set) 2>&1 |
2446 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2447 *${as_nl}ac_space=\ *)
2448 sed -n \
2449 "s/'\''/'\''\\\\'\'''\''/g;
2450 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2451 ;; #(
2452 *)
2453 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2454 ;;
2455 esac |
2456 sort
2457)
2458 echo
2459
2460 cat <<\_ASBOX
2461## ----------------- ##
2462## Output variables. ##
2463## ----------------- ##
2464_ASBOX
2465 echo
2466 for ac_var in $ac_subst_vars
2467 do
2468 eval ac_val=\$$ac_var
2469 case $ac_val in
2470 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2471 esac
2472 $as_echo "$ac_var='\''$ac_val'\''"
2473 done | sort
2474 echo
2475
2476 if test -n "$ac_subst_files"; then
2477 cat <<\_ASBOX
2478## ------------------- ##
2479## File substitutions. ##
2480## ------------------- ##
2481_ASBOX
2482 echo
2483 for ac_var in $ac_subst_files
2484 do
2485 eval ac_val=\$$ac_var
2486 case $ac_val in
2487 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2488 esac
2489 $as_echo "$ac_var='\''$ac_val'\''"
2490 done | sort
2491 echo
2492 fi
2493
2494 if test -s confdefs.h; then
2495 cat <<\_ASBOX
2496## ----------- ##
2497## confdefs.h. ##
2498## ----------- ##
2499_ASBOX
2500 echo
2501 cat confdefs.h
2502 echo
2503 fi
2504 test "$ac_signal" != 0 &&
2505 $as_echo "$as_me: caught signal $ac_signal"
2506 $as_echo "$as_me: exit $exit_status"
2507 } >&5
2508 rm -f core *.core core.conftest.* &&
2509 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2510 exit $exit_status
2511' 0
2512for ac_signal in 1 2 13 15; do
2513 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2514done
2515ac_signal=0
2516
2517# confdefs.h avoids OS command line length limits that DEFS can exceed.
2518rm -f -r conftest* confdefs.h
2519
2520$as_echo "/* confdefs.h */" > confdefs.h
2521
2522# Predefined preprocessor variables.
2523
2524cat >>confdefs.h <<_ACEOF
2525#define PACKAGE_NAME "$PACKAGE_NAME"
2526_ACEOF
2527
2528cat >>confdefs.h <<_ACEOF
2529#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2530_ACEOF
2531
2532cat >>confdefs.h <<_ACEOF
2533#define PACKAGE_VERSION "$PACKAGE_VERSION"
2534_ACEOF
2535
2536cat >>confdefs.h <<_ACEOF
2537#define PACKAGE_STRING "$PACKAGE_STRING"
2538_ACEOF
2539
2540cat >>confdefs.h <<_ACEOF
2541#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2542_ACEOF
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_URL "$PACKAGE_URL"
2546_ACEOF
2547
2548
2549# Let the site file select an alternate cache file if it wants to.
2550# Prefer an explicitly selected file to automatically selected ones.
2551ac_site_file1=NONE
2552ac_site_file2=NONE
2553if test -n "$CONFIG_SITE"; then
2554 ac_site_file1=$CONFIG_SITE
2555elif test "x$prefix" != xNONE; then
2556 ac_site_file1=$prefix/share/config.site
2557 ac_site_file2=$prefix/etc/config.site
2558else
2559 ac_site_file1=$ac_default_prefix/share/config.site
2560 ac_site_file2=$ac_default_prefix/etc/config.site
2561fi
2562for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2563do
2564 test "x$ac_site_file" = xNONE && continue
2565 if test -r "$ac_site_file"; then
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2567$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2568 sed 's/^/| /' "$ac_site_file" >&5
2569 . "$ac_site_file"
2570 fi
2571done
2572
2573if test -r "$cache_file"; then
2574 # Some versions of bash will fail to source /dev/null (special
2575 # files actually), so we avoid doing that.
2576 if test -f "$cache_file"; then
2577 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2578$as_echo "$as_me: loading cache $cache_file" >&6;}
2579 case $cache_file in
2580 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2581 *) . "./$cache_file";;
2582 esac
2583 fi
2584else
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2586$as_echo "$as_me: creating cache $cache_file" >&6;}
2587 >$cache_file
bec39cab
AC
2588fi
2589
81ecdfbb
RW
2590# Check that the precious variables saved in the cache have kept the same
2591# value.
2592ac_cache_corrupted=false
2593for ac_var in $ac_precious_vars; do
2594 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2595 eval ac_new_set=\$ac_env_${ac_var}_set
2596 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2597 eval ac_new_val=\$ac_env_${ac_var}_value
2598 case $ac_old_set,$ac_new_set in
2599 set,)
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2601$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2602 ac_cache_corrupted=: ;;
2603 ,set)
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2605$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2606 ac_cache_corrupted=: ;;
2607 ,);;
2608 *)
2609 if test "x$ac_old_val" != "x$ac_new_val"; then
2610 # differences in whitespace do not lead to failure.
2611 ac_old_val_w=`echo x $ac_old_val`
2612 ac_new_val_w=`echo x $ac_new_val`
2613 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2615$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2616 ac_cache_corrupted=:
2617 else
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2619$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2620 eval $ac_var=\$ac_old_val
2621 fi
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2623$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2625$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2626 fi;;
2627 esac
2628 # Pass precious variables to config.status.
2629 if test "$ac_new_set" = set; then
2630 case $ac_new_val in
2631 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2632 *) ac_arg=$ac_var=$ac_new_val ;;
2633 esac
2634 case " $ac_configure_args " in
2635 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2636 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2637 esac
2638 fi
2639done
2640if $ac_cache_corrupted; then
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2644$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2645 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2646fi
2647## -------------------- ##
2648## Main body of script. ##
2649## -------------------- ##
2650
2651ac_ext=c
2652ac_cpp='$CPP $CPPFLAGS'
2653ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2654ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2655ac_compiler_gnu=$ac_cv_c_compiler_gnu
2656
2657
2658
2659
2660
2661ac_config_headers="$ac_config_headers config.h:config.in"
2662
2663
2664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2665$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2666 # Check whether --enable-maintainer-mode was given.
2667if test "${enable_maintainer_mode+set}" = set; then :
2668 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2669else
2670 USE_MAINTAINER_MODE=no
2671fi
2672
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2674$as_echo "$USE_MAINTAINER_MODE" >&6; }
2675 if test $USE_MAINTAINER_MODE = yes; then
2676 MAINTAINER_MODE_TRUE=
2677 MAINTAINER_MODE_FALSE='#'
2678else
2679 MAINTAINER_MODE_TRUE='#'
2680 MAINTAINER_MODE_FALSE=
2681fi
2682
2683 MAINT=$MAINTAINER_MODE_TRUE
2684
2685
2686
2687ac_ext=c
2688ac_cpp='$CPP $CPPFLAGS'
2689ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2690ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2691ac_compiler_gnu=$ac_cv_c_compiler_gnu
2692if test -n "$ac_tool_prefix"; then
2693 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2694set dummy ${ac_tool_prefix}gcc; ac_word=$2
2695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2696$as_echo_n "checking for $ac_word... " >&6; }
2697if test "${ac_cv_prog_CC+set}" = set; then :
2698 $as_echo_n "(cached) " >&6
c906108c
SS
2699else
2700 if test -n "$CC"; then
2701 ac_cv_prog_CC="$CC" # Let the user override the test.
2702else
bec39cab
AC
2703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2704for as_dir in $PATH
2705do
2706 IFS=$as_save_IFS
2707 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2708 for ac_exec_ext in '' $ac_executable_extensions; do
2709 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2710 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2712 break 2
2713 fi
2714done
81ecdfbb
RW
2715 done
2716IFS=$as_save_IFS
bec39cab 2717
c906108c
SS
2718fi
2719fi
bec39cab 2720CC=$ac_cv_prog_CC
c906108c 2721if test -n "$CC"; then
81ecdfbb
RW
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2723$as_echo "$CC" >&6; }
c906108c 2724else
81ecdfbb
RW
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2726$as_echo "no" >&6; }
c906108c
SS
2727fi
2728
81ecdfbb 2729
b4e70030
JB
2730fi
2731if test -z "$ac_cv_prog_CC"; then
2732 ac_ct_CC=$CC
81ecdfbb
RW
2733 # Extract the first word of "gcc", so it can be a program name with args.
2734set dummy gcc; ac_word=$2
2735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2736$as_echo_n "checking for $ac_word... " >&6; }
2737if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2738 $as_echo_n "(cached) " >&6
b4e70030
JB
2739else
2740 if test -n "$ac_ct_CC"; then
2741 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2742else
2743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2744for as_dir in $PATH
2745do
2746 IFS=$as_save_IFS
2747 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2748 for ac_exec_ext in '' $ac_executable_extensions; do
2749 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2750 ac_cv_prog_ac_ct_CC="gcc"
2751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2752 break 2
4e8d927d 2753 fi
b4e70030 2754done
81ecdfbb
RW
2755 done
2756IFS=$as_save_IFS
b4e70030
JB
2757
2758fi
2759fi
2760ac_ct_CC=$ac_cv_prog_ac_ct_CC
2761if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2763$as_echo "$ac_ct_CC" >&6; }
b4e70030 2764else
81ecdfbb
RW
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2766$as_echo "no" >&6; }
b4e70030
JB
2767fi
2768
81ecdfbb
RW
2769 if test "x$ac_ct_CC" = x; then
2770 CC=""
2771 else
2772 case $cross_compiling:$ac_tool_warned in
2773yes:)
2774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2776ac_tool_warned=yes ;;
2777esac
2778 CC=$ac_ct_CC
2779 fi
b4e70030
JB
2780else
2781 CC="$ac_cv_prog_CC"
2782fi
2783
c906108c 2784if test -z "$CC"; then
81ecdfbb
RW
2785 if test -n "$ac_tool_prefix"; then
2786 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2787set dummy ${ac_tool_prefix}cc; ac_word=$2
2788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2789$as_echo_n "checking for $ac_word... " >&6; }
2790if test "${ac_cv_prog_CC+set}" = set; then :
2791 $as_echo_n "(cached) " >&6
c906108c
SS
2792else
2793 if test -n "$CC"; then
2794 ac_cv_prog_CC="$CC" # Let the user override the test.
2795else
bec39cab
AC
2796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2797for as_dir in $PATH
2798do
2799 IFS=$as_save_IFS
2800 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2801 for ac_exec_ext in '' $ac_executable_extensions; do
2802 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2803 ac_cv_prog_CC="${ac_tool_prefix}cc"
2804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2805 break 2
2806 fi
2807done
81ecdfbb
RW
2808 done
2809IFS=$as_save_IFS
2810
2811fi
2812fi
2813CC=$ac_cv_prog_CC
2814if test -n "$CC"; then
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2816$as_echo "$CC" >&6; }
2817else
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2819$as_echo "no" >&6; }
2820fi
2821
2822
2823 fi
2824fi
2825if test -z "$CC"; then
2826 # Extract the first word of "cc", so it can be a program name with args.
2827set dummy cc; ac_word=$2
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2829$as_echo_n "checking for $ac_word... " >&6; }
2830if test "${ac_cv_prog_CC+set}" = set; then :
2831 $as_echo_n "(cached) " >&6
2832else
2833 if test -n "$CC"; then
2834 ac_cv_prog_CC="$CC" # Let the user override the test.
2835else
2836 ac_prog_rejected=no
2837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2838for as_dir in $PATH
2839do
2840 IFS=$as_save_IFS
2841 test -z "$as_dir" && as_dir=.
2842 for ac_exec_ext in '' $ac_executable_extensions; do
2843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2844 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2845 ac_prog_rejected=yes
2846 continue
2847 fi
2848 ac_cv_prog_CC="cc"
2849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2850 break 2
2851 fi
2852done
2853 done
2854IFS=$as_save_IFS
bec39cab 2855
c906108c
SS
2856if test $ac_prog_rejected = yes; then
2857 # We found a bogon in the path, so make sure we never use it.
2858 set dummy $ac_cv_prog_CC
2859 shift
bec39cab 2860 if test $# != 0; then
c906108c
SS
2861 # We chose a different compiler from the bogus one.
2862 # However, it has the same basename, so the bogon will be chosen
2863 # first if we set CC to just the basename; use the full file name.
2864 shift
bec39cab 2865 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2866 fi
2867fi
2868fi
2869fi
bec39cab 2870CC=$ac_cv_prog_CC
c906108c 2871if test -n "$CC"; then
81ecdfbb
RW
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2873$as_echo "$CC" >&6; }
c906108c 2874else
81ecdfbb
RW
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2876$as_echo "no" >&6; }
c906108c
SS
2877fi
2878
81ecdfbb 2879
bec39cab
AC
2880fi
2881if test -z "$CC"; then
2882 if test -n "$ac_tool_prefix"; then
81ecdfbb 2883 for ac_prog in cl.exe
bec39cab
AC
2884 do
2885 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2886set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2888$as_echo_n "checking for $ac_word... " >&6; }
2889if test "${ac_cv_prog_CC+set}" = set; then :
2890 $as_echo_n "(cached) " >&6
c906108c
SS
2891else
2892 if test -n "$CC"; then
2893 ac_cv_prog_CC="$CC" # Let the user override the test.
2894else
bec39cab
AC
2895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896for as_dir in $PATH
2897do
2898 IFS=$as_save_IFS
2899 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2900 for ac_exec_ext in '' $ac_executable_extensions; do
2901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2902 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2904 break 2
2905 fi
2906done
81ecdfbb
RW
2907 done
2908IFS=$as_save_IFS
bec39cab 2909
c906108c
SS
2910fi
2911fi
bec39cab 2912CC=$ac_cv_prog_CC
c906108c 2913if test -n "$CC"; then
81ecdfbb
RW
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2915$as_echo "$CC" >&6; }
c906108c 2916else
81ecdfbb
RW
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2918$as_echo "no" >&6; }
c906108c 2919fi
bec39cab 2920
81ecdfbb 2921
bec39cab
AC
2922 test -n "$CC" && break
2923 done
2924fi
2925if test -z "$CC"; then
2926 ac_ct_CC=$CC
81ecdfbb 2927 for ac_prog in cl.exe
bec39cab
AC
2928do
2929 # Extract the first word of "$ac_prog", so it can be a program name with args.
2930set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2932$as_echo_n "checking for $ac_word... " >&6; }
2933if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2934 $as_echo_n "(cached) " >&6
bec39cab
AC
2935else
2936 if test -n "$ac_ct_CC"; then
2937 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2938else
2939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940for as_dir in $PATH
2941do
2942 IFS=$as_save_IFS
2943 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2944 for ac_exec_ext in '' $ac_executable_extensions; do
2945 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2946 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2948 break 2
c906108c 2949 fi
bec39cab 2950done
81ecdfbb
RW
2951 done
2952IFS=$as_save_IFS
bec39cab
AC
2953
2954fi
2955fi
2956ac_ct_CC=$ac_cv_prog_ac_ct_CC
2957if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2959$as_echo "$ac_ct_CC" >&6; }
bec39cab 2960else
81ecdfbb
RW
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2962$as_echo "no" >&6; }
c906108c
SS
2963fi
2964
81ecdfbb 2965
bec39cab
AC
2966 test -n "$ac_ct_CC" && break
2967done
c906108c 2968
81ecdfbb
RW
2969 if test "x$ac_ct_CC" = x; then
2970 CC=""
2971 else
2972 case $cross_compiling:$ac_tool_warned in
2973yes:)
2974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2976ac_tool_warned=yes ;;
2977esac
2978 CC=$ac_ct_CC
2979 fi
bec39cab
AC
2980fi
2981
2982fi
2983
2984
81ecdfbb
RW
2985test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2987as_fn_error "no acceptable C compiler found in \$PATH
2988See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
2989
2990# Provide some information about the compiler.
81ecdfbb
RW
2991$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2992set X $ac_compile
2993ac_compiler=$2
2994for ac_option in --version -v -V -qversion; do
2995 { { ac_try="$ac_compiler $ac_option >&5"
2996case "(($ac_try" in
2997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2998 *) ac_try_echo=$ac_try;;
2999esac
3000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3001$as_echo "$ac_try_echo"; } >&5
3002 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3003 ac_status=$?
81ecdfbb
RW
3004 if test -s conftest.err; then
3005 sed '10a\
3006... rest of stderr output deleted ...
3007 10q' conftest.err >conftest.er1
3008 cat conftest.er1 >&5
3009 rm -f conftest.er1 conftest.err
3010 fi
3011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3012 test $ac_status = 0; }
3013done
bec39cab 3014
81ecdfbb 3015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3016/* end confdefs.h. */
3017
3018int
3019main ()
3020{
3021
3022 ;
3023 return 0;
3024}
3025_ACEOF
3026ac_clean_files_save=$ac_clean_files
81ecdfbb 3027ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3028# Try to create an executable without -o first, disregard a.out.
3029# It will help us diagnose broken compilers, and finding out an intuition
3030# of exeext.
81ecdfbb
RW
3031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3032$as_echo_n "checking for C compiler default output file name... " >&6; }
3033ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3034
3035# The possible output files:
3036ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3037
3038ac_rmfiles=
3039for ac_file in $ac_files
3040do
3041 case $ac_file in
3042 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3043 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3044 esac
3045done
3046rm -f $ac_rmfiles
3047
3048if { { ac_try="$ac_link_default"
3049case "(($ac_try" in
3050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3051 *) ac_try_echo=$ac_try;;
3052esac
3053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3054$as_echo "$ac_try_echo"; } >&5
3055 (eval "$ac_link_default") 2>&5
3056 ac_status=$?
3057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3058 test $ac_status = 0; }; then :
3059 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3060# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3061# in a Makefile. We should not override ac_cv_exeext if it was cached,
3062# so that the user can short-circuit this test for compilers unknown to
3063# Autoconf.
3064for ac_file in $ac_files ''
bec39cab
AC
3065do
3066 test -f "$ac_file" || continue
3067 case $ac_file in
81ecdfbb 3068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3069 ;;
3070 [ab].out )
3071 # We found the default executable, but exeext='' is most
3072 # certainly right.
3073 break;;
3074 *.* )
81ecdfbb
RW
3075 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3076 then :; else
3077 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3078 fi
3079 # We set ac_cv_exeext here because the later test for it is not
3080 # safe: cross compilers may not add the suffix if given an `-o'
3081 # argument, so we may need to know it at that point already.
3082 # Even if this section looks crufty: it has the advantage of
3083 # actually working.
b4e70030
JB
3084 break;;
3085 * )
3086 break;;
bec39cab
AC
3087 esac
3088done
81ecdfbb
RW
3089test "$ac_cv_exeext" = no && ac_cv_exeext=
3090
bec39cab 3091else
81ecdfbb
RW
3092 ac_file=''
3093fi
3094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3095$as_echo "$ac_file" >&6; }
3096if test -z "$ac_file"; then :
3097 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3098sed 's/^/| /' conftest.$ac_ext >&5
3099
81ecdfbb
RW
3100{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3102{ as_fn_set_status 77
3103as_fn_error "C compiler cannot create executables
3104See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3105fi
b4e70030 3106ac_exeext=$ac_cv_exeext
b4e70030 3107
81ecdfbb 3108# Check that the compiler produces executables we can run. If not, either
bec39cab 3109# the compiler is broken, or we cross compile.
81ecdfbb
RW
3110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3111$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3112# If not cross compiling, check that we can run a simple program.
3113if test "$cross_compiling" != yes; then
3114 if { ac_try='./$ac_file'
81ecdfbb
RW
3115 { { case "(($ac_try" in
3116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117 *) ac_try_echo=$ac_try;;
3118esac
3119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3120$as_echo "$ac_try_echo"; } >&5
3121 (eval "$ac_try") 2>&5
bec39cab 3122 ac_status=$?
81ecdfbb
RW
3123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3124 test $ac_status = 0; }; }; then
bec39cab 3125 cross_compiling=no
c906108c 3126 else
bec39cab
AC
3127 if test "$cross_compiling" = maybe; then
3128 cross_compiling=yes
3129 else
81ecdfbb
RW
3130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132as_fn_error "cannot run C compiled programs.
bec39cab 3133If you meant to cross compile, use \`--host'.
81ecdfbb 3134See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3135 fi
c906108c 3136 fi
bec39cab 3137fi
81ecdfbb
RW
3138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3139$as_echo "yes" >&6; }
bec39cab 3140
81ecdfbb 3141rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3142ac_clean_files=$ac_clean_files_save
81ecdfbb 3143# Check that the compiler produces executables we can run. If not, either
b4e70030 3144# the compiler is broken, or we cross compile.
81ecdfbb
RW
3145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3146$as_echo_n "checking whether we are cross compiling... " >&6; }
3147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3148$as_echo "$cross_compiling" >&6; }
3149
3150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3151$as_echo_n "checking for suffix of executables... " >&6; }
3152if { { ac_try="$ac_link"
3153case "(($ac_try" in
3154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155 *) ac_try_echo=$ac_try;;
3156esac
3157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3158$as_echo "$ac_try_echo"; } >&5
3159 (eval "$ac_link") 2>&5
bec39cab 3160 ac_status=$?
81ecdfbb
RW
3161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3162 test $ac_status = 0; }; then :
b4e70030
JB
3163 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3164# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3165# work properly (i.e., refer to `conftest.exe'), while it won't with
3166# `rm'.
3167for ac_file in conftest.exe conftest conftest.*; do
3168 test -f "$ac_file" || continue
3169 case $ac_file in
81ecdfbb 3170 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3171 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3172 break;;
3173 * ) break;;
3174 esac
3175done
c906108c 3176else
81ecdfbb
RW
3177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3179as_fn_error "cannot compute suffix of executables: cannot compile and link
3180See \`config.log' for more details." "$LINENO" 5; }
c906108c 3181fi
b4e70030 3182rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3184$as_echo "$ac_cv_exeext" >&6; }
c906108c 3185
b4e70030 3186rm -f conftest.$ac_ext
bec39cab
AC
3187EXEEXT=$ac_cv_exeext
3188ac_exeext=$EXEEXT
81ecdfbb
RW
3189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3190$as_echo_n "checking for suffix of object files... " >&6; }
3191if test "${ac_cv_objext+set}" = set; then :
3192 $as_echo_n "(cached) " >&6
bec39cab 3193else
81ecdfbb 3194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3195/* end confdefs.h. */
3196
3197int
3198main ()
3199{
3200
3201 ;
3202 return 0;
3203}
3204_ACEOF
3205rm -f conftest.o conftest.obj
81ecdfbb
RW
3206if { { ac_try="$ac_compile"
3207case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210esac
3211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3212$as_echo "$ac_try_echo"; } >&5
3213 (eval "$ac_compile") 2>&5
3214 ac_status=$?
3215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3216 test $ac_status = 0; }; then :
3217 for ac_file in conftest.o conftest.obj conftest.*; do
3218 test -f "$ac_file" || continue;
bec39cab 3219 case $ac_file in
81ecdfbb 3220 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3221 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3222 break;;
3223 esac
3224done
c906108c 3225else
81ecdfbb 3226 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3227sed 's/^/| /' conftest.$ac_ext >&5
3228
81ecdfbb
RW
3229{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3231as_fn_error "cannot compute suffix of object files: cannot compile
3232See \`config.log' for more details." "$LINENO" 5; }
c906108c 3233fi
b4e70030 3234rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3235fi
81ecdfbb
RW
3236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3237$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3238OBJEXT=$ac_cv_objext
3239ac_objext=$OBJEXT
81ecdfbb
RW
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3241$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3242if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3243 $as_echo_n "(cached) " >&6
c906108c 3244else
81ecdfbb 3245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3246/* end confdefs.h. */
3247
3248int
3249main ()
3250{
3251#ifndef __GNUC__
3252 choke me
3253#endif
3254
3255 ;
3256 return 0;
3257}
3258_ACEOF
81ecdfbb 3259if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3260 ac_compiler_gnu=yes
3261else
81ecdfbb 3262 ac_compiler_gnu=no
bec39cab 3263fi
81ecdfbb 3264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3265ac_cv_c_compiler_gnu=$ac_compiler_gnu
3266
3267fi
81ecdfbb
RW
3268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3269$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3270if test $ac_compiler_gnu = yes; then
3271 GCC=yes
3272else
3273 GCC=
3274fi
bec39cab
AC
3275ac_test_CFLAGS=${CFLAGS+set}
3276ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3278$as_echo_n "checking whether $CC accepts -g... " >&6; }
3279if test "${ac_cv_prog_cc_g+set}" = set; then :
3280 $as_echo_n "(cached) " >&6
bec39cab 3281else
81ecdfbb
RW
3282 ac_save_c_werror_flag=$ac_c_werror_flag
3283 ac_c_werror_flag=yes
3284 ac_cv_prog_cc_g=no
3285 CFLAGS="-g"
3286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3287/* end confdefs.h. */
3288
3289int
3290main ()
3291{
3292
3293 ;
3294 return 0;
3295}
3296_ACEOF
81ecdfbb 3297if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3298 ac_cv_prog_cc_g=yes
3299else
81ecdfbb
RW
3300 CFLAGS=""
3301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3302/* end confdefs.h. */
3303
3304int
3305main ()
3306{
3307
3308 ;
3309 return 0;
3310}
3311_ACEOF
3312if ac_fn_c_try_compile "$LINENO"; then :
3313
3314else
3315 ac_c_werror_flag=$ac_save_c_werror_flag
3316 CFLAGS="-g"
3317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3318/* end confdefs.h. */
3319
3320int
3321main ()
3322{
c906108c 3323
81ecdfbb
RW
3324 ;
3325 return 0;
3326}
3327_ACEOF
3328if ac_fn_c_try_compile "$LINENO"; then :
3329 ac_cv_prog_cc_g=yes
3330fi
3331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3332fi
3333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3334fi
81ecdfbb
RW
3335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3336 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3337fi
81ecdfbb
RW
3338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3339$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3340if test "$ac_test_CFLAGS" = set; then
bec39cab 3341 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3342elif test $ac_cv_prog_cc_g = yes; then
3343 if test "$GCC" = yes; then
3344 CFLAGS="-g -O2"
3345 else
3346 CFLAGS="-g"
3347 fi
3348else
3349 if test "$GCC" = yes; then
3350 CFLAGS="-O2"
3351 else
3352 CFLAGS=
3353 fi
3354fi
81ecdfbb
RW
3355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3356$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3357if test "${ac_cv_prog_cc_c89+set}" = set; then :
3358 $as_echo_n "(cached) " >&6
bec39cab 3359else
81ecdfbb 3360 ac_cv_prog_cc_c89=no
bec39cab 3361ac_save_CC=$CC
81ecdfbb 3362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3363/* end confdefs.h. */
c906108c
SS
3364#include <stdarg.h>
3365#include <stdio.h>
3366#include <sys/types.h>
3367#include <sys/stat.h>
3368/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3369struct buf { int x; };
3370FILE * (*rcsopen) (struct buf *, struct stat *, int);
3371static char *e (p, i)
3372 char **p;
3373 int i;
3374{
3375 return p[i];
3376}
3377static char *f (char * (*g) (char **, int), char **p, ...)
3378{
3379 char *s;
3380 va_list v;
3381 va_start (v,p);
3382 s = g (p, va_arg (v,int));
3383 va_end (v);
3384 return s;
3385}
bec39cab
AC
3386
3387/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3388 function prototypes and stuff, but not '\xHH' hex character constants.
3389 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3390 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3391 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3392 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3393 that's true only with -std. */
bec39cab
AC
3394int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3395
81ecdfbb
RW
3396/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3397 inside strings and character constants. */
3398#define FOO(x) 'x'
3399int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3400
c906108c
SS
3401int test (int i, double x);
3402struct s1 {int (*f) (int a);};
3403struct s2 {int (*f) (double a);};
3404int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3405int argc;
3406char **argv;
bec39cab
AC
3407int
3408main ()
3409{
c906108c 3410return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3411 ;
3412 return 0;
3413}
3414_ACEOF
81ecdfbb
RW
3415for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3416 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3417do
3418 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3419 if ac_fn_c_try_compile "$LINENO"; then :
3420 ac_cv_prog_cc_c89=$ac_arg
c906108c 3421fi
81ecdfbb
RW
3422rm -f core conftest.err conftest.$ac_objext
3423 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3424done
81ecdfbb 3425rm -f conftest.$ac_ext
bec39cab 3426CC=$ac_save_CC
c906108c
SS
3427
3428fi
81ecdfbb
RW
3429# AC_CACHE_VAL
3430case "x$ac_cv_prog_cc_c89" in
3431 x)
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3433$as_echo "none needed" >&6; } ;;
3434 xno)
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3436$as_echo "unsupported" >&6; } ;;
bec39cab 3437 *)
81ecdfbb
RW
3438 CC="$CC $ac_cv_prog_cc_c89"
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3440$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3441esac
81ecdfbb 3442if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3443
b4e70030
JB
3444fi
3445
bec39cab
AC
3446ac_ext=c
3447ac_cpp='$CPP $CPPFLAGS'
3448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3450ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3451
60ca704f 3452
bec39cab
AC
3453ac_ext=c
3454ac_cpp='$CPP $CPPFLAGS'
3455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3457ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3459$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3460# On Suns, sometimes $CPP names a directory.
3461if test -n "$CPP" && test -d "$CPP"; then
3462 CPP=
8bb2c122 3463fi
bec39cab 3464if test -z "$CPP"; then
81ecdfbb
RW
3465 if test "${ac_cv_prog_CPP+set}" = set; then :
3466 $as_echo_n "(cached) " >&6
bec39cab
AC
3467else
3468 # Double quotes because CPP needs to be expanded
3469 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3470 do
3471 ac_preproc_ok=false
3472for ac_c_preproc_warn_flag in '' yes
3473do
3474 # Use a header file that comes with gcc, so configuring glibc
3475 # with a fresh cross-compiler works.
3476 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3477 # <limits.h> exists even on freestanding compilers.
3478 # On the NeXT, cc -E runs the code through the compiler's parser,
3479 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3481/* end confdefs.h. */
3482#ifdef __STDC__
3483# include <limits.h>
3484#else
3485# include <assert.h>
3486#endif
3487 Syntax error
3488_ACEOF
81ecdfbb 3489if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3490
81ecdfbb 3491else
bec39cab
AC
3492 # Broken: fails on valid input.
3493continue
3494fi
3495rm -f conftest.err conftest.$ac_ext
3496
81ecdfbb 3497 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3498 # can be detected and how.
81ecdfbb 3499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3500/* end confdefs.h. */
3501#include <ac_nonexistent.h>
3502_ACEOF
81ecdfbb 3503if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3504 # Broken: success on invalid input.
3505continue
8bb2c122 3506else
bec39cab
AC
3507 # Passes both tests.
3508ac_preproc_ok=:
3509break
8bb2c122 3510fi
bec39cab 3511rm -f conftest.err conftest.$ac_ext
8bb2c122 3512
bec39cab
AC
3513done
3514# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3515rm -f conftest.err conftest.$ac_ext
81ecdfbb 3516if $ac_preproc_ok; then :
bec39cab
AC
3517 break
3518fi
8bb2c122 3519
bec39cab
AC
3520 done
3521 ac_cv_prog_CPP=$CPP
ddc9cd0f 3522
c906108c 3523fi
bec39cab
AC
3524 CPP=$ac_cv_prog_CPP
3525else
3526 ac_cv_prog_CPP=$CPP
c906108c 3527fi
81ecdfbb
RW
3528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3529$as_echo "$CPP" >&6; }
bec39cab
AC
3530ac_preproc_ok=false
3531for ac_c_preproc_warn_flag in '' yes
3532do
3533 # Use a header file that comes with gcc, so configuring glibc
3534 # with a fresh cross-compiler works.
3535 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3536 # <limits.h> exists even on freestanding compilers.
3537 # On the NeXT, cc -E runs the code through the compiler's parser,
3538 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3540/* end confdefs.h. */
3541#ifdef __STDC__
3542# include <limits.h>
3543#else
3544# include <assert.h>
3545#endif
3546 Syntax error
3547_ACEOF
81ecdfbb 3548if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3549
81ecdfbb 3550else
bec39cab
AC
3551 # Broken: fails on valid input.
3552continue
3553fi
3554rm -f conftest.err conftest.$ac_ext
3555
81ecdfbb 3556 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3557 # can be detected and how.
81ecdfbb 3558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3559/* end confdefs.h. */
3560#include <ac_nonexistent.h>
3561_ACEOF
81ecdfbb 3562if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3563 # Broken: success on invalid input.
3564continue
c906108c 3565else
bec39cab
AC
3566 # Passes both tests.
3567ac_preproc_ok=:
3568break
c906108c 3569fi
bec39cab 3570rm -f conftest.err conftest.$ac_ext
c906108c 3571
bec39cab
AC
3572done
3573# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3574rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3575if $ac_preproc_ok; then :
3576
c906108c 3577else
81ecdfbb
RW
3578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3580as_fn_error "C preprocessor \"$CPP\" fails sanity check
3581See \`config.log' for more details." "$LINENO" 5; }
c906108c 3582fi
c906108c 3583
bec39cab
AC
3584ac_ext=c
3585ac_cpp='$CPP $CPPFLAGS'
3586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3588ac_compiler_gnu=$ac_cv_c_compiler_gnu
3589
3590
81ecdfbb
RW
3591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3592$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3593if test "${ac_cv_path_GREP+set}" = set; then :
3594 $as_echo_n "(cached) " >&6
4e8d927d 3595else
81ecdfbb
RW
3596 if test -z "$GREP"; then
3597 ac_path_GREP_found=false
3598 # Loop through the user's path and test for each of PROGNAME-LIST
3599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
3604 for ac_prog in grep ggrep; do
3605 for ac_exec_ext in '' $ac_executable_extensions; do
3606 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3607 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3608# Check for GNU ac_path_GREP and select it if it is found.
3609 # Check for GNU $ac_path_GREP
3610case `"$ac_path_GREP" --version 2>&1` in
3611*GNU*)
3612 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3613*)
3614 ac_count=0
3615 $as_echo_n 0123456789 >"conftest.in"
3616 while :
3617 do
3618 cat "conftest.in" "conftest.in" >"conftest.tmp"
3619 mv "conftest.tmp" "conftest.in"
3620 cp "conftest.in" "conftest.nl"
3621 $as_echo 'GREP' >> "conftest.nl"
3622 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3623 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3624 as_fn_arith $ac_count + 1 && ac_count=$as_val
3625 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3626 # Best one so far, save it but keep looking for a better one
3627 ac_cv_path_GREP="$ac_path_GREP"
3628 ac_path_GREP_max=$ac_count
bec39cab 3629 fi
81ecdfbb
RW
3630 # 10*(2^10) chars as input seems more than enough
3631 test $ac_count -gt 10 && break
3632 done
3633 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3634esac
bec39cab 3635
81ecdfbb
RW
3636 $ac_path_GREP_found && break 3
3637 done
3638 done
3639 done
3640IFS=$as_save_IFS
3641 if test -z "$ac_cv_path_GREP"; then
3642 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3643 fi
c906108c 3644else
81ecdfbb 3645 ac_cv_path_GREP=$GREP
c906108c 3646fi
c906108c 3647
81ecdfbb
RW
3648fi
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3650$as_echo "$ac_cv_path_GREP" >&6; }
3651 GREP="$ac_cv_path_GREP"
c906108c 3652
c906108c 3653
81ecdfbb
RW
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3655$as_echo_n "checking for egrep... " >&6; }
3656if test "${ac_cv_path_EGREP+set}" = set; then :
3657 $as_echo_n "(cached) " >&6
783e057b 3658else
81ecdfbb
RW
3659 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3660 then ac_cv_path_EGREP="$GREP -E"
3661 else
3662 if test -z "$EGREP"; then
3663 ac_path_EGREP_found=false
3664 # Loop through the user's path and test for each of PROGNAME-LIST
3665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3670 for ac_prog in egrep; do
3671 for ac_exec_ext in '' $ac_executable_extensions; do
3672 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3673 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3674# Check for GNU ac_path_EGREP and select it if it is found.
3675 # Check for GNU $ac_path_EGREP
3676case `"$ac_path_EGREP" --version 2>&1` in
3677*GNU*)
3678 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3679*)
3680 ac_count=0
3681 $as_echo_n 0123456789 >"conftest.in"
3682 while :
3683 do
3684 cat "conftest.in" "conftest.in" >"conftest.tmp"
3685 mv "conftest.tmp" "conftest.in"
3686 cp "conftest.in" "conftest.nl"
3687 $as_echo 'EGREP' >> "conftest.nl"
3688 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3689 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3690 as_fn_arith $ac_count + 1 && ac_count=$as_val
3691 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3692 # Best one so far, save it but keep looking for a better one
3693 ac_cv_path_EGREP="$ac_path_EGREP"
3694 ac_path_EGREP_max=$ac_count
3695 fi
3696 # 10*(2^10) chars as input seems more than enough
3697 test $ac_count -gt 10 && break
3698 done
3699 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3700esac
bec39cab 3701
81ecdfbb
RW
3702 $ac_path_EGREP_found && break 3
3703 done
3704 done
3705 done
3706IFS=$as_save_IFS
3707 if test -z "$ac_cv_path_EGREP"; then
3708 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3709 fi
783e057b 3710else
81ecdfbb 3711 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3712fi
3713
81ecdfbb 3714 fi
783e057b 3715fi
81ecdfbb
RW
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3717$as_echo "$ac_cv_path_EGREP" >&6; }
3718 EGREP="$ac_cv_path_EGREP"
3719
783e057b 3720
81ecdfbb
RW
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3722$as_echo_n "checking for ANSI C header files... " >&6; }
3723if test "${ac_cv_header_stdc+set}" = set; then :
3724 $as_echo_n "(cached) " >&6
783e057b 3725else
81ecdfbb 3726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3727/* end confdefs.h. */
783e057b 3728#include <stdlib.h>
bec39cab 3729#include <stdarg.h>
783e057b
DJ
3730#include <string.h>
3731#include <float.h>
c906108c 3732
bec39cab
AC
3733int
3734main ()
3735{
c906108c 3736
bec39cab
AC
3737 ;
3738 return 0;
3739}
3740_ACEOF
81ecdfbb 3741if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3742 ac_cv_header_stdc=yes
c906108c 3743else
81ecdfbb 3744 ac_cv_header_stdc=no
c906108c 3745fi
81ecdfbb 3746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3747
783e057b
DJ
3748if test $ac_cv_header_stdc = yes; then
3749 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3751/* end confdefs.h. */
3752#include <string.h>
c906108c 3753
783e057b
DJ
3754_ACEOF
3755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3756 $EGREP "memchr" >/dev/null 2>&1; then :
3757
c906108c 3758else
783e057b 3759 ac_cv_header_stdc=no
c906108c 3760fi
783e057b 3761rm -f conftest*
c906108c
SS
3762
3763fi
3764
783e057b
DJ
3765if test $ac_cv_header_stdc = yes; then
3766 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3768/* end confdefs.h. */
3769#include <stdlib.h>
bec39cab 3770
783e057b
DJ
3771_ACEOF
3772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3773 $EGREP "free" >/dev/null 2>&1; then :
3774
bec39cab 3775else
783e057b 3776 ac_cv_header_stdc=no
bec39cab 3777fi
783e057b 3778rm -f conftest*
bec39cab
AC
3779
3780fi
bec39cab 3781
783e057b
DJ
3782if test $ac_cv_header_stdc = yes; then
3783 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3784 if test "$cross_compiling" = yes; then :
783e057b 3785 :
bec39cab 3786else
81ecdfbb 3787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3788/* end confdefs.h. */
3789#include <ctype.h>
81ecdfbb 3790#include <stdlib.h>
783e057b
DJ
3791#if ((' ' & 0x0FF) == 0x020)
3792# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3793# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3794#else
3795# define ISLOWER(c) \
3796 (('a' <= (c) && (c) <= 'i') \
3797 || ('j' <= (c) && (c) <= 'r') \
3798 || ('s' <= (c) && (c) <= 'z'))
3799# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3800#endif
3801
3802#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3803int
3804main ()
3805{
3806 int i;
3807 for (i = 0; i < 256; i++)
3808 if (XOR (islower (i), ISLOWER (i))
3809 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3810 return 2;
3811 return 0;
783e057b
DJ
3812}
3813_ACEOF
81ecdfbb 3814if ac_fn_c_try_run "$LINENO"; then :
783e057b 3815
81ecdfbb
RW
3816else
3817 ac_cv_header_stdc=no
783e057b 3818fi
81ecdfbb
RW
3819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3820 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3821fi
81ecdfbb 3822
783e057b
DJ
3823fi
3824fi
81ecdfbb
RW
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3826$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3827if test $ac_cv_header_stdc = yes; then
3828
81ecdfbb 3829$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3830
3831fi
3832
3833# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3834for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3835 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3836do :
3837 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3838ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3839"
3840eval as_val=\$$as_ac_Header
3841 if test "x$as_val" = x""yes; then :
783e057b 3842 cat >>confdefs.h <<_ACEOF
81ecdfbb 3843#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3844_ACEOF
3845
3846fi
3847
3848done
3849
3850
3851
81ecdfbb
RW
3852 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3853if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3854 MINIX=yes
3855else
3856 MINIX=
3857fi
3858
3859
3860 if test "$MINIX" = yes; then
3861
81ecdfbb 3862$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3863
3864
81ecdfbb 3865$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3866
3867
81ecdfbb 3868$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3869
3870 fi
3871
3872
81ecdfbb
RW
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3874$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3875if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3876 $as_echo_n "(cached) " >&6
783e057b 3877else
81ecdfbb 3878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3879/* end confdefs.h. */
3880
c971b7fa
PA
3881# define __EXTENSIONS__ 1
3882 $ac_includes_default
783e057b
DJ
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
81ecdfbb 3891if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3892 ac_cv_safe_to_define___extensions__=yes
3893else
81ecdfbb 3894 ac_cv_safe_to_define___extensions__=no
783e057b 3895fi
81ecdfbb 3896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3897fi
81ecdfbb
RW
3898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3899$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3900 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3901 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3902
81ecdfbb 3903 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3904
81ecdfbb 3905 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3906
81ecdfbb 3907 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3908
81ecdfbb 3909 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3910
3911
c971b7fa
PA
3912ac_aux_dir=
3913for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3914 for ac_t in install-sh install.sh shtool; do
3915 if test -f "$ac_dir/$ac_t"; then
3916 ac_aux_dir=$ac_dir
3917 ac_install_sh="$ac_aux_dir/$ac_t -c"
3918 break 2
3919 fi
3920 done
3921done
3922if test -z "$ac_aux_dir"; then
3923 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3924fi
770d76d7 3925
c971b7fa
PA
3926# These three variables are undocumented and unsupported,
3927# and are intended to be withdrawn in a future Autoconf release.
3928# They can cause serious problems if a builder's source tree is in a directory
3929# whose full name contains unusual characters.
3930ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3931ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3932ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3933
770d76d7 3934
c971b7fa
PA
3935# Make sure we can run config.sub.
3936$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3937 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3938
c971b7fa
PA
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3940$as_echo_n "checking build system type... " >&6; }
3941if test "${ac_cv_build+set}" = set; then :
3942 $as_echo_n "(cached) " >&6
770d76d7 3943else
c971b7fa
PA
3944 ac_build_alias=$build_alias
3945test "x$ac_build_alias" = x &&
3946 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3947test "x$ac_build_alias" = x &&
3948 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3949ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3950 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3951
770d76d7 3952fi
c971b7fa
PA
3953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3954$as_echo "$ac_cv_build" >&6; }
3955case $ac_cv_build in
3956*-*-*) ;;
3957*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3958esac
c971b7fa
PA
3959build=$ac_cv_build
3960ac_save_IFS=$IFS; IFS='-'
3961set x $ac_cv_build
3962shift
3963build_cpu=$1
3964build_vendor=$2
3965shift; shift
3966# Remember, the first character of IFS is used to create $*,
3967# except with old shells:
3968build_os=$*
3969IFS=$ac_save_IFS
3970case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3971
3972
c971b7fa
PA
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3974$as_echo_n "checking host system type... " >&6; }
3975if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3976 $as_echo_n "(cached) " >&6
3977else
c971b7fa
PA
3978 if test "x$host_alias" = x; then
3979 ac_cv_host=$ac_cv_build
81ecdfbb 3980else
c971b7fa
PA
3981 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3982 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3983fi
81ecdfbb
RW
3984
3985fi
c971b7fa
PA
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3987$as_echo "$ac_cv_host" >&6; }
3988case $ac_cv_host in
3989*-*-*) ;;
3990*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 3991esac
c971b7fa
PA
3992host=$ac_cv_host
3993ac_save_IFS=$IFS; IFS='-'
3994set x $ac_cv_host
3995shift
3996host_cpu=$1
3997host_vendor=$2
3998shift; shift
3999# Remember, the first character of IFS is used to create $*,
4000# except with old shells:
4001host_os=$*
4002IFS=$ac_save_IFS
4003case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4004
4005
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4007$as_echo_n "checking target system type... " >&6; }
4008if test "${ac_cv_target+set}" = set; then :
4009 $as_echo_n "(cached) " >&6
4010else
4011 if test "x$target_alias" = x; then
4012 ac_cv_target=$ac_cv_host
4013else
4014 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4015 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4016fi
4017
4018fi
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4020$as_echo "$ac_cv_target" >&6; }
4021case $ac_cv_target in
4022*-*-*) ;;
4023*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4024esac
4025target=$ac_cv_target
4026ac_save_IFS=$IFS; IFS='-'
4027set x $ac_cv_target
4028shift
4029target_cpu=$1
4030target_vendor=$2
4031shift; shift
4032# Remember, the first character of IFS is used to create $*,
4033# except with old shells:
4034target_os=$*
4035IFS=$ac_save_IFS
4036case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4037
4038
4039# The aliases save the names the user supplied, while $host etc.
4040# will get canonicalized.
4041test -n "$target_alias" &&
4042 test "$program_prefix$program_suffix$program_transform_name" = \
4043 NONENONEs,x,x, &&
4044 program_prefix=${target_alias}-
4045
4046# The tests for host and target for $enable_largefile require
4047# canonical names.
4048
4049
81ecdfbb 4050
da2f07f1
JK
4051# As the $enable_largefile decision depends on --enable-plugins we must set it
4052# even in directories otherwise not depending on the $plugins option.
4053
4054
4055# Check whether --enable-plugins was given.
4056if test "${enable_plugins+set}" = set; then :
4057 enableval=$enable_plugins; case "${enableval}" in
4058 yes | "") plugins=yes ;;
4059 no) plugins=no ;;
4060 *) plugins=yes ;;
4061 esac
4062else
4063 plugins=no
4064fi
4065
4066
4067
4068case "${host}" in
4069 sparc-*-solaris*|i[3-7]86-*-solaris*)
4070 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4071 # are mutually exclusive; and without procfs support, the bfd/ elf module
4072 # cannot provide certain routines such as elfcore_write_prpsinfo
4073 # or elfcore_write_prstatus. So unless the user explicitly requested
4074 # large-file support through the --enable-largefile switch, disable
4075 # large-file support in favor of procfs support.
4076 test "${target}" = "${host}" -a "x$plugins" = xno \
4077 && : ${enable_largefile="no"}
4078 ;;
4079esac
4080
4081# Check whether --enable-largefile was given.
4082if test "${enable_largefile+set}" = set; then :
4083 enableval=$enable_largefile;
4084fi
4085
4086if test "$enable_largefile" != no; then
4087
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4089$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4090if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4091 $as_echo_n "(cached) " >&6
4092else
4093 ac_cv_sys_largefile_CC=no
4094 if test "$GCC" != yes; then
4095 ac_save_CC=$CC
4096 while :; do
4097 # IRIX 6.2 and later do not support large files by default,
4098 # so use the C compiler's -n32 option if that helps.
4099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100/* end confdefs.h. */
4101#include <sys/types.h>
4102 /* Check that off_t can represent 2**63 - 1 correctly.
4103 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4104 since some C++ compilers masquerading as C compilers
4105 incorrectly reject 9223372036854775807. */
4106#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4107 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4108 && LARGE_OFF_T % 2147483647 == 1)
4109 ? 1 : -1];
4110int
4111main ()
4112{
4113
4114 ;
4115 return 0;
4116}
4117_ACEOF
4118 if ac_fn_c_try_compile "$LINENO"; then :
4119 break
4120fi
4121rm -f core conftest.err conftest.$ac_objext
4122 CC="$CC -n32"
4123 if ac_fn_c_try_compile "$LINENO"; then :
4124 ac_cv_sys_largefile_CC=' -n32'; break
4125fi
4126rm -f core conftest.err conftest.$ac_objext
4127 break
4128 done
4129 CC=$ac_save_CC
4130 rm -f conftest.$ac_ext
4131 fi
4132fi
4133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4134$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4135 if test "$ac_cv_sys_largefile_CC" != no; then
4136 CC=$CC$ac_cv_sys_largefile_CC
4137 fi
4138
4139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4140$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4141if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4142 $as_echo_n "(cached) " >&6
4143else
4144 while :; do
4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4146/* end confdefs.h. */
4147#include <sys/types.h>
4148 /* Check that off_t can represent 2**63 - 1 correctly.
4149 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4150 since some C++ compilers masquerading as C compilers
4151 incorrectly reject 9223372036854775807. */
4152#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4153 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4154 && LARGE_OFF_T % 2147483647 == 1)
4155 ? 1 : -1];
4156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
4164if ac_fn_c_try_compile "$LINENO"; then :
4165 ac_cv_sys_file_offset_bits=no; break
4166fi
4167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4169/* end confdefs.h. */
4170#define _FILE_OFFSET_BITS 64
4171#include <sys/types.h>
4172 /* Check that off_t can represent 2**63 - 1 correctly.
4173 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4174 since some C++ compilers masquerading as C compilers
4175 incorrectly reject 9223372036854775807. */
4176#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4177 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4178 && LARGE_OFF_T % 2147483647 == 1)
4179 ? 1 : -1];
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
4188if ac_fn_c_try_compile "$LINENO"; then :
4189 ac_cv_sys_file_offset_bits=64; break
4190fi
4191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4192 ac_cv_sys_file_offset_bits=unknown
4193 break
4194done
4195fi
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4197$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4198case $ac_cv_sys_file_offset_bits in #(
4199 no | unknown) ;;
4200 *)
4201cat >>confdefs.h <<_ACEOF
4202#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4203_ACEOF
4204;;
4205esac
4206rm -rf conftest*
4207 if test $ac_cv_sys_file_offset_bits = unknown; then
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4209$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4210if test "${ac_cv_sys_large_files+set}" = set; then :
4211 $as_echo_n "(cached) " >&6
4212else
4213 while :; do
4214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4215/* end confdefs.h. */
4216#include <sys/types.h>
4217 /* Check that off_t can represent 2**63 - 1 correctly.
4218 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4219 since some C++ compilers masquerading as C compilers
4220 incorrectly reject 9223372036854775807. */
4221#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4222 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4223 && LARGE_OFF_T % 2147483647 == 1)
4224 ? 1 : -1];
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
4233if ac_fn_c_try_compile "$LINENO"; then :
4234 ac_cv_sys_large_files=no; break
4235fi
4236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4238/* end confdefs.h. */
4239#define _LARGE_FILES 1
4240#include <sys/types.h>
4241 /* Check that off_t can represent 2**63 - 1 correctly.
4242 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4243 since some C++ compilers masquerading as C compilers
4244 incorrectly reject 9223372036854775807. */
4245#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4246 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4247 && LARGE_OFF_T % 2147483647 == 1)
4248 ? 1 : -1];
4249int
4250main ()
4251{
4252
4253 ;
4254 return 0;
4255}
4256_ACEOF
4257if ac_fn_c_try_compile "$LINENO"; then :
4258 ac_cv_sys_large_files=1; break
4259fi
4260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4261 ac_cv_sys_large_files=unknown
4262 break
4263done
4264fi
4265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4266$as_echo "$ac_cv_sys_large_files" >&6; }
4267case $ac_cv_sys_large_files in #(
4268 no | unknown) ;;
4269 *)
4270cat >>confdefs.h <<_ACEOF
4271#define _LARGE_FILES $ac_cv_sys_large_files
4272_ACEOF
4273;;
4274esac
4275rm -rf conftest*
4276 fi
4277fi
4278
4279
4280
81ecdfbb
RW
4281
4282
4283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4284$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4285if test "${am_cv_prog_cc_stdc+set}" = set; then :
4286 $as_echo_n "(cached) " >&6
4287else
4288 am_cv_prog_cc_stdc=no
4289ac_save_CC="$CC"
4290# Don't try gcc -ansi; that turns off useful extensions and
4291# breaks some systems' header files.
4292# AIX -qlanglvl=ansi
4293# Ultrix and OSF/1 -std1
4294# HP-UX 10.20 and later -Ae
4295# HP-UX older versions -Aa -D_HPUX_SOURCE
4296# SVR4 -Xc -D__EXTENSIONS__
4297for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4298do
783e057b 4299 CC="$ac_save_CC $ac_arg"
81ecdfbb 4300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4301/* end confdefs.h. */
4302#include <stdarg.h>
4303#include <stdio.h>
4304#include <sys/types.h>
4305#include <sys/stat.h>
4306/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4307struct buf { int x; };
4308FILE * (*rcsopen) (struct buf *, struct stat *, int);
4309static char *e (p, i)
4310 char **p;
4311 int i;
4312{
4313 return p[i];
4314}
4315static char *f (char * (*g) (char **, int), char **p, ...)
4316{
4317 char *s;
4318 va_list v;
4319 va_start (v,p);
4320 s = g (p, va_arg (v,int));
4321 va_end (v);
4322 return s;
4323}
4324int test (int i, double x);
4325struct s1 {int (*f) (int a);};
4326struct s2 {int (*f) (double a);};
4327int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4328int argc;
4329char **argv;
4330
4331int
4332main ()
4333{
4334
4335return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4336
4337 ;
4338 return 0;
4339}
4340_ACEOF
81ecdfbb 4341if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4342 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4343fi
81ecdfbb 4344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4345done
4346CC="$ac_save_CC"
4347
4348fi
4349
4350if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4352$as_echo "none needed" >&6; }
783e057b 4353else
81ecdfbb
RW
4354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4355$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4356fi
4357case "x$am_cv_prog_cc_stdc" in
4358 x|xno) ;;
4359 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4360esac
4361
4362
4363ac_aux_dir=
81ecdfbb
RW
4364for ac_dir in .. "$srcdir"/..; do
4365 for ac_t in install-sh install.sh shtool; do
4366 if test -f "$ac_dir/$ac_t"; then
4367 ac_aux_dir=$ac_dir
4368 ac_install_sh="$ac_aux_dir/$ac_t -c"
4369 break 2
4370 fi
4371 done
783e057b
DJ
4372done
4373if test -z "$ac_aux_dir"; then
81ecdfbb 4374 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4375fi
81ecdfbb
RW
4376
4377# These three variables are undocumented and unsupported,
4378# and are intended to be withdrawn in a future Autoconf release.
4379# They can cause serious problems if a builder's source tree is in a directory
4380# whose full name contains unusual characters.
4381ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4382ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4383ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4384
783e057b 4385
783e057b 4386
9009e1ae
MR
4387test "$program_prefix" != NONE &&
4388 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4389# Use a double $ so make ignores it.
4390test "$program_suffix" != NONE &&
4391 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4392# Double any \ or $.
4393# By default was `s,x,x', remove it if useless.
4394ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4395program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4396
81ecdfbb 4397
a417dc56
RW
4398# Dependency checking.
4399rm -rf .tst 2>/dev/null
4400mkdir .tst 2>/dev/null
4401if test -d .tst; then
4402 am__leading_dot=.
4403else
4404 am__leading_dot=_
4405fi
4406rmdir .tst 2>/dev/null
4407
4408DEPDIR="${am__leading_dot}deps"
4409
81ecdfbb 4410ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4411
4412
4413depcc="$CC" am_compiler_list=
4414
4415am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4417$as_echo_n "checking dependency style of $depcc... " >&6; }
4418if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4419 $as_echo_n "(cached) " >&6
a417dc56
RW
4420else
4421 if test -f "$am_depcomp"; then
4422 # We make a subdir and do the tests there. Otherwise we can end up
4423 # making bogus files that we don't know about and never remove. For
4424 # instance it was reported that on HP-UX the gcc test will end up
4425 # making a dummy file named `D' -- because `-MD' means `put the output
4426 # in D'.
4427 mkdir conftest.dir
4428 # Copy depcomp to subdir because otherwise we won't find it if we're
4429 # using a relative directory.
4430 cp "$am_depcomp" conftest.dir
4431 cd conftest.dir
4432 # We will build objects and dependencies in a subdirectory because
4433 # it helps to detect inapplicable dependency modes. For instance
4434 # both Tru64's cc and ICC support -MD to output dependencies as a
4435 # side effect of compilation, but ICC will put the dependencies in
4436 # the current directory while Tru64 will put them in the object
4437 # directory.
4438 mkdir sub
4439
4440 am_cv_CC_dependencies_compiler_type=none
4441 if test "$am_compiler_list" = ""; then
4442 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4443 fi
4444 for depmode in $am_compiler_list; do
4445 if test $depmode = none; then break; fi
4446
81ecdfbb 4447 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4448 # Setup a source with many dependencies, because some compilers
4449 # like to wrap large dependency lists on column 80 (with \), and
4450 # we should not choose a depcomp mode which is confused by this.
4451 #
4452 # We need to recreate these files for each test, as the compiler may
4453 # overwrite some of them when testing with obscure command lines.
4454 # This happens at least with the AIX C compiler.
4455 : > sub/conftest.c
4456 for i in 1 2 3 4 5 6; do
4457 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4458 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4459 # Solaris 8's {/usr,}/bin/sh.
4460 touch sub/conftst$i.h
4461 done
4462 echo "include sub/conftest.Po" > confmf
4463
4464 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4465 # mode. It turns out that the SunPro C++ compiler does not properly
4466 # handle `-M -o', and we need to detect this.
4467 depcmd="depmode=$depmode \
4468 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4469 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4470 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4471 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4472 if env $depcmd > conftest.err 2>&1 &&
4473 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4474 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4475 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4476 # icc doesn't choke on unknown options, it will just issue warnings
4477 # or remarks (even with -Werror). So we grep stderr for any message
4478 # that says an option was ignored or not supported.
4479 # When given -MP, icc 7.0 and 7.1 complain thusly:
4480 # icc: Command line warning: ignoring option '-M'; no argument required
4481 # The diagnosis changed in icc 8.0:
4482 # icc: Command line remark: option '-MP' not supported
4483 if (grep 'ignoring option' conftest.err ||
4484 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4485 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4486 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4487 break
4488 fi
4489 fi
81ecdfbb 4490 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4491 sed -e 's/^/| /' < conftest.err >&5
4492 done
4493
4494 cd ..
4495 rm -rf conftest.dir
4496else
4497 am_cv_CC_dependencies_compiler_type=none
4498fi
4499
4500fi
81ecdfbb
RW
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4502$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4503if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4504then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4505else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4506
4507fi
4508
4509
4510# Check for the 'make' the user wants to use.
4511for ac_prog in make
4512do
4513 # Extract the first word of "$ac_prog", so it can be a program name with args.
4514set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4516$as_echo_n "checking for $ac_word... " >&6; }
4517if test "${ac_cv_prog_MAKE+set}" = set; then :
4518 $as_echo_n "(cached) " >&6
a417dc56
RW
4519else
4520 if test -n "$MAKE"; then
4521 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4522else
4523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524for as_dir in $PATH
4525do
4526 IFS=$as_save_IFS
4527 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4528 for ac_exec_ext in '' $ac_executable_extensions; do
4529 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4530 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4532 break 2
4533 fi
4534done
81ecdfbb
RW
4535 done
4536IFS=$as_save_IFS
a417dc56
RW
4537
4538fi
4539fi
4540MAKE=$ac_cv_prog_MAKE
4541if test -n "$MAKE"; then
81ecdfbb
RW
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4543$as_echo "$MAKE" >&6; }
a417dc56 4544else
81ecdfbb
RW
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
a417dc56
RW
4547fi
4548
81ecdfbb 4549
a417dc56
RW
4550 test -n "$MAKE" && break
4551done
4552
4553MAKE_IS_GNU=
4554case "`$MAKE --version 2>&1 | sed 1q`" in
4555 *GNU*)
4556 MAKE_IS_GNU=yes
4557 ;;
4558esac
81ecdfbb 4559 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4560 GMAKE_TRUE=
4561 GMAKE_FALSE='#'
4562else
4563 GMAKE_TRUE='#'
4564 GMAKE_FALSE=
4565fi
4566
81ecdfbb
RW
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4568$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4569set x ${MAKE-make}
4570ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4571if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4572 $as_echo_n "(cached) " >&6
a417dc56
RW
4573else
4574 cat >conftest.make <<\_ACEOF
81ecdfbb 4575SHELL = /bin/sh
a417dc56 4576all:
81ecdfbb 4577 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4578_ACEOF
4579# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4580case `${MAKE-make} -f conftest.make 2>/dev/null` in
4581 *@@@%%%=?*=@@@%%%*)
4582 eval ac_cv_prog_make_${ac_make}_set=yes;;
4583 *)
4584 eval ac_cv_prog_make_${ac_make}_set=no;;
4585esac
a417dc56
RW
4586rm -f conftest.make
4587fi
81ecdfbb
RW
4588if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4590$as_echo "yes" >&6; }
a417dc56
RW
4591 SET_MAKE=
4592else
81ecdfbb
RW
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4594$as_echo "no" >&6; }
a417dc56
RW
4595 SET_MAKE="MAKE=${MAKE-make}"
4596fi
4597
4598
c971b7fa
PA
4599# Configure gnulib. We need to build gnulib under some other
4600# directory not "gnulib", to avoid the problem of both GDB and
4601# GDBserver wanting to build it in the same directory, when building
4602# in the source dir.
783e057b 4603
c971b7fa
PA
4604 in_src="gnulib"
4605 in_build="build-gnulib"
4606
4607 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4608 # so they do not pile up.
4609 ac_sub_configure_args=
4610 ac_prev=
4611 eval "set x $ac_configure_args"
4612 shift
4613 for ac_arg
4614 do
4615 if test -n "$ac_prev"; then
4616 ac_prev=
4617 continue
4618 fi
4619 case $ac_arg in
4620 -cache-file | --cache-file | --cache-fil | --cache-fi \
4621 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4622 ac_prev=cache_file ;;
4623 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4624 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4625 | --c=*)
4626 ;;
4627 --config-cache | -C)
4628 ;;
4629 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4630 ac_prev=srcdir ;;
4631 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4632 ;;
4633 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4634 ac_prev=prefix ;;
4635 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4636 ;;
4637 --disable-option-checking)
4638 ;;
4639 *)
4640 case $ac_arg in
4641 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4642 esac
4643 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4644 esac
4645 done
4646
4647 # Always prepend --prefix to ensure using the same prefix
4648 # in subdir configurations.
4649 ac_arg="--prefix=$prefix"
4650 case $ac_arg in
4651 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4652 esac
4653 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4654
4655 # Pass --silent
4656 if test "$silent" = yes; then
4657 ac_sub_configure_args="--silent $ac_sub_configure_args"
4658 fi
4659
4660 # Always prepend --disable-option-checking to silence warnings, since
4661 # different subdirs can have different --enable and --with options.
4662 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4663
4664 ac_popdir=`pwd`
4665 ac_dir=$in_build
4666
4667 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4668 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4669 $as_echo "$ac_msg" >&6
4670 as_dir="$ac_dir"; as_fn_mkdir_p
4671
38ea300a
PA
4672 case $srcdir in
4673 [\\/]* | ?:[\\/]* )
4674 ac_srcdir=$srcdir/$in_src ;;
4675 *) # Relative name.
4676 ac_srcdir=../$srcdir/$in_src ;;
4677 esac
c971b7fa
PA
4678
4679 cd "$ac_dir"
4680
4681 ac_sub_configure=$ac_srcdir/configure
4682
4683 # Make the cache file name correct relative to the subdirectory.
4684 case $cache_file in
4685 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4686 *) # Relative name.
4687 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4688 esac
4689
4690 { $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
4691$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4692 # The eval makes quoting arguments work.
4693 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4694 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4695 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4696
4697 cd "$ac_popdir"
783e057b 4698
c971b7fa
PA
4699
4700
4701CONFIG_OBS=
4702CONFIG_DEPS=
4703CONFIG_SRCS=
4704ENABLE_CFLAGS=
4705
4706CONFIG_ALL=
4707CONFIG_CLEAN=
4708CONFIG_INSTALL=
4709CONFIG_UNINSTALL=
4710
4711# If we haven't got the data from the intl directory,
4712# assume NLS is disabled.
4713USE_NLS=no
4714LIBINTL=
4715LIBINTL_DEP=
4716INCINTL=
4717XGETTEXT=
4718GMSGFMT=
4719POSUB=
783e057b
DJ
4720
4721if test -f ../intl/config.intl; then
4722 . ../intl/config.intl
4723fi
81ecdfbb
RW
4724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4725$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4726if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4728$as_echo "no" >&6; }
783e057b 4729else
81ecdfbb
RW
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4731$as_echo "yes" >&6; }
783e057b 4732
81ecdfbb 4733$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4734
4735
81ecdfbb
RW
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4737$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4738 # Look for .po and .gmo files in the source directory.
4739 CATALOGS=
4740 XLINGUAS=
4741 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4742 # If there aren't any .gmo files the shell will give us the
4743 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4744 # weeded out.
4745 case "$cat" in *\**)
4746 continue;;
4747 esac
4748 # The quadruple backslash is collapsed to a double backslash
4749 # by the backticks, then collapsed again by the double quotes,
4750 # leaving us with one backslash in the sed expression (right
4751 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4752 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4753 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4754 # The user is allowed to set LINGUAS to a list of languages to
4755 # install catalogs for. If it's empty that means "all of them."
4756 if test "x$LINGUAS" = x; then
4757 CATALOGS="$CATALOGS $cat"
4758 XLINGUAS="$XLINGUAS $lang"
4759 else
4760 case "$LINGUAS" in *$lang*)
4761 CATALOGS="$CATALOGS $cat"
4762 XLINGUAS="$XLINGUAS $lang"
4763 ;;
4764 esac
e28b3332
DJ
4765 fi
4766 done
c971b7fa
PA
4767 LINGUAS="$XLINGUAS"
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4769$as_echo "$LINGUAS" >&6; }
4770
4771
4772 DATADIRNAME=share
4773
4774 INSTOBJEXT=.mo
4775
4776 GENCAT=gencat
4777
4778 CATOBJEXT=.gmo
e28b3332 4779
e28b3332
DJ
4780fi
4781
c971b7fa
PA
4782localedir='${datadir}/locale'
4783
4784
4785if test x"$USE_NLS" = xyes; then
4786 CONFIG_ALL="$CONFIG_ALL all-po"
4787 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4788 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4789 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4790fi
e28b3332 4791
c971b7fa
PA
4792GNULIB=build-gnulib/import
4793
4794# For Makefile dependencies.
4795GNULIB_STDINT_H=
4796if test x"$STDINT_H" != x; then
4797 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4798fi
4799
4800
c971b7fa
PA
4801PACKAGE=gdb
4802
4803cat >>confdefs.h <<_ACEOF
4804#define PACKAGE "$PACKAGE"
4805_ACEOF
4806
4807
4808
4809# We never need to detect it in this sub-configure.
4810# But preserve it for config.status --recheck.
4811
4812
4813
4814MAKEINFO_EXTRA_FLAGS=""
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4816$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4817if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4818 $as_echo_n "(cached) " >&6
4819else
4820 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4821 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4822 gdb_cv_have_makeinfo_click=yes
4823 else
4824 gdb_cv_have_makeinfo_click=no
4825 fi
4826fi
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4828$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4829if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4830 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4831fi
e28b3332
DJ
4832
4833
bec39cab
AC
4834
4835
81ecdfbb
RW
4836# Check whether --with-separate-debug-dir was given.
4837if test "${with_separate_debug_dir+set}" = set; then :
4838 withval=$with_separate_debug_dir;
b14b1491
TT
4839 DEBUGDIR=$withval
4840else
4841 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4842fi
4843
20e95c23 4844
783e057b
DJ
4845 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4846 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4847 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4848 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4849
783e057b
DJ
4850cat >>confdefs.h <<_ACEOF
4851#define DEBUGDIR "$ac_define_dir"
20e95c23 4852_ACEOF
20e95c23 4853
20e95c23 4854
20e95c23 4855
0c4a4063 4856
b14b1491
TT
4857 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4858 if test "x$prefix" = xNONE; then
4859 test_prefix=/usr/local
4860 else
4861 test_prefix=$prefix
4862 fi
783e057b 4863 else
b14b1491 4864 test_prefix=$exec_prefix
783e057b 4865 fi
b14b1491
TT
4866 value=0
4867 case ${ac_define_dir} in
4868 "${test_prefix}"|"${test_prefix}/"*|\
4869 '${exec_prefix}'|'${exec_prefix}/'*)
4870 value=1
4871 ;;
4872 esac
4873
4874cat >>confdefs.h <<_ACEOF
4875#define DEBUGDIR_RELOCATABLE $value
4876_ACEOF
4877
4878
4879
0c4a4063 4880
f83d8a90
DE
4881# We can't pass paths as command line arguments.
4882# Mingw32 tries to be clever and will convert the paths for us.
4883# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4884# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4885# This breaks GDB's relocatable path conversions since paths passed in
4886# config.h would not get so translated, the path prefixes no longer match.
4887
4888 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4889 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4890 ac_define_dir=`eval echo $bindir`
4891 ac_define_dir=`eval echo $ac_define_dir`
4892
4893cat >>confdefs.h <<_ACEOF
4894#define BINDIR "$ac_define_dir"
4895_ACEOF
4896
4897
4898
b14b1491
TT
4899# GDB's datadir relocation
4900
4901
4902
81ecdfbb
RW
4903# Check whether --with-gdb-datadir was given.
4904if test "${with_gdb_datadir+set}" = set; then :
4905 withval=$with_gdb_datadir;
b14b1491 4906 GDB_DATADIR=$withval
20e95c23 4907else
b14b1491 4908 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4909fi
4910
20e95c23 4911
b14b1491
TT
4912 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4913 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4914 ac_define_dir=`eval echo $GDB_DATADIR`
4915 ac_define_dir=`eval echo $ac_define_dir`
4916
4917cat >>confdefs.h <<_ACEOF
4918#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4919_ACEOF
4920
b14b1491
TT
4921
4922
0c4a4063 4923
b14b1491
TT
4924 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4925 if test "x$prefix" = xNONE; then
4926 test_prefix=/usr/local
4927 else
4928 test_prefix=$prefix
4929 fi
4930 else
4931 test_prefix=$exec_prefix
4932 fi
4933 value=0
4934 case ${ac_define_dir} in
4935 "${test_prefix}"|"${test_prefix}/"*|\
4936 '${exec_prefix}'|'${exec_prefix}/'*)
4937 value=1
4938 ;;
4939 esac
4940
4941cat >>confdefs.h <<_ACEOF
4942#define GDB_DATADIR_RELOCATABLE $value
4943_ACEOF
4944
4945
783e057b 4946
20e95c23 4947
0c4a4063 4948
81ecdfbb
RW
4949# Check whether --with-relocated-sources was given.
4950if test "${with_relocated_sources+set}" = set; then :
4951 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4952
4953 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4954 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4955 ac_define_dir=`eval echo $reloc_srcdir`
4956 ac_define_dir=`eval echo $ac_define_dir`
4957
4958cat >>confdefs.h <<_ACEOF
4959#define RELOC_SRCDIR "$ac_define_dir"
4960_ACEOF
4961
4962
4963
81ecdfbb
RW
4964fi
4965
29b0e8a2 4966
7349ff92
JK
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
4968$as_echo_n "checking for default auto-load directory... " >&6; }
4969
4970# Check whether --with-auto-load-dir was given.
4971if test "${with_auto_load_dir+set}" = set; then :
4972 withval=$with_auto_load_dir;
4973else
4974 with_auto_load_dir='$ddir/auto-load'
4975fi
4976
4977escape_dir=`echo $with_auto_load_dir | sed 's/[$]ddir\>/\\\\\\\\\\\\&/g'`
4978
4979 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4980 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4981 ac_define_dir=`eval echo $escape_dir`
4982 ac_define_dir=`eval echo $ac_define_dir`
4983
4984cat >>confdefs.h <<_ACEOF
4985#define AUTO_LOAD_DIR "$ac_define_dir"
4986_ACEOF
4987
4988
4989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
4990$as_echo "$with_auto_load_dir" >&6; }
4991
bccbefd2
JK
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
4993$as_echo_n "checking for default auto-load safe-path... " >&6; }
4994
4995# Check whether --with-auto-load-safe-path was given.
4996if test "${with_auto_load_safe_path+set}" = set; then :
4997 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
4998 with_auto_load_safe_path="/"
4999 fi
bccbefd2 5000else
7349ff92 5001 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5002fi
5003
6dea1fbd 5004escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]ddir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5005
5006 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5007 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5008 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5009 ac_define_dir=`eval echo $ac_define_dir`
5010
5011cat >>confdefs.h <<_ACEOF
6dea1fbd 5012#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5013_ACEOF
5014
5015
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5017$as_echo "$with_auto_load_safe_path" >&6; }
5018
29b0e8a2 5019
20e95c23 5020
5ae98d25 5021subdirs="$subdirs testsuite"
20e95c23
DJ
5022
5023
783e057b 5024# Check whether to support alternative target configurations
81ecdfbb
RW
5025# Check whether --enable-targets was given.
5026if test "${enable_targets+set}" = set; then :
5027 enableval=$enable_targets; case "${enableval}" in
5028 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5029 ;;
5030 no) enable_targets= ;;
5031 *) enable_targets=$enableval ;;
5032esac
81ecdfbb
RW
5033fi
5034
20e95c23 5035
783e057b 5036# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5037# Check whether --enable-64-bit-bfd was given.
5038if test "${enable_64_bit_bfd+set}" = set; then :
5039 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5040 yes) want64=true ;;
5041 no) want64=false ;;
81ecdfbb 5042 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5043esac
5044else
5045 want64=false
81ecdfbb
RW
5046fi
5047
783e057b
DJ
5048# Provide defaults for some variables set by the per-host and per-target
5049# configuration.
5050gdb_host_obs=posix-hdep.o
20e95c23 5051
783e057b
DJ
5052if test "${target}" = "${host}"; then
5053 gdb_native=yes
5054else
5055 gdb_native=no
5056fi
20e95c23 5057
783e057b 5058. $srcdir/configure.host
20e95c23 5059
783e057b 5060# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5061
783e057b
DJ
5062TARGET_OBS=
5063all_targets=
20e95c23 5064
783e057b 5065for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5066do
783e057b
DJ
5067 if test "$targ_alias" = "all"; then
5068 all_targets=true
5069 else
5070 # Canonicalize the secondary target names.
5071 result=`$ac_config_sub $targ_alias 2>/dev/null`
5072 if test -n "$result"; then
5073 targ=$result
5074 else
5075 targ=$targ_alias
5076 fi
20e95c23 5077
783e057b 5078 . ${srcdir}/configure.tgt
20e95c23 5079
bf307134
JB
5080 if test -z "${gdb_target_obs}"; then :
5081 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5082fi
5083
783e057b
DJ
5084 # Target-specific object files
5085 for i in ${gdb_target_obs}; do
5086 case " $TARGET_OBS " in
5087 *" ${i} "*) ;;
5088 *)
5089 TARGET_OBS="$TARGET_OBS ${i}"
5090 ;;
5091 esac
5092 done
20e95c23 5093
783e057b
DJ
5094 # Check whether this target needs 64-bit CORE_ADDR
5095 if test x${want64} = xfalse; then
5096 . ${srcdir}/../bfd/config.bfd
5097 fi
5098 fi
20e95c23
DJ
5099done
5100
783e057b
DJ
5101if test x${all_targets} = xtrue; then
5102
5103 # We want all 64-bit targets if we either:
5104 # - run on a 64-bit host or
5105 # - already require 64-bit support for some other target or
5106 # - the --enable-64-bit-bfd option was supplied
5107 # Otherwise we only support all 32-bit targets.
5108 #
5109 # NOTE: This test must be in sync with the corresponding
5110 # tests in BFD!
20e95c23 5111
783e057b 5112 if test x${want64} = xfalse; then
81ecdfbb
RW
5113 # The cast to long int works around a bug in the HP C Compiler
5114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5116# This bug is HP SR number 8606223364.
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5118$as_echo_n "checking size of long... " >&6; }
5119if test "${ac_cv_sizeof_long+set}" = set; then :
5120 $as_echo_n "(cached) " >&6
c0993dbe 5121else
81ecdfbb 5122 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5123
81ecdfbb
RW
5124else
5125 if test "$ac_cv_type_long" = yes; then
5126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5128{ as_fn_set_status 77
5129as_fn_error "cannot compute sizeof (long)
5130See \`config.log' for more details." "$LINENO" 5; }; }
5131 else
5132 ac_cv_sizeof_long=0
5133 fi
c0993dbe 5134fi
81ecdfbb 5135
c0993dbe 5136fi
81ecdfbb
RW
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5138$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5139
c0993dbe 5140
c0993dbe 5141
c0993dbe
UW
5142cat >>confdefs.h <<_ACEOF
5143#define SIZEOF_LONG $ac_cv_sizeof_long
5144_ACEOF
5145
5146
5147 if test "x${ac_cv_sizeof_long}" = "x8"; then
5148 want64=true
5149 fi
5150 fi
5151 if test x${want64} = xtrue; then
5152 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5153 else
5154 TARGET_OBS='$(ALL_TARGET_OBS)'
5155 fi
5156fi
5157
5158
5159
5160# For other settings, only the main target counts.
5161gdb_sim=
5162gdb_osabi=
5163build_gdbserver=
5164targ=$target; . ${srcdir}/configure.tgt
5165
5166# Fetch the default architecture and default target vector from BFD.
5167targ=$target; . $srcdir/../bfd/config.bfd
5168
5169# We only want the first architecture, so strip off the others if
5170# there is more than one.
5171targ_archs=`echo $targ_archs | sed 's/ .*//'`
5172
5173if test "x$targ_archs" != x; then
5174
5175cat >>confdefs.h <<_ACEOF
5176#define DEFAULT_BFD_ARCH $targ_archs
5177_ACEOF
5178
5179fi
5180if test "x$targ_defvec" != x; then
5181
5182cat >>confdefs.h <<_ACEOF
5183#define DEFAULT_BFD_VEC $targ_defvec
5184_ACEOF
5185
5186fi
5187
c0993dbe
UW
5188# The CLI cannot be disabled yet, but may be in the future.
5189
5190# Enable CLI.
81ecdfbb
RW
5191# Check whether --enable-gdbcli was given.
5192if test "${enable_gdbcli+set}" = set; then :
5193 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5194 yes)
5195 ;;
5196 no)
81ecdfbb 5197 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5198 *)
81ecdfbb 5199 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5200 esac
5201else
5202 enable_gdbcli=yes
81ecdfbb
RW
5203fi
5204
c0993dbe
UW
5205if test x"$enable_gdbcli" = xyes; then
5206 if test -d $srcdir/cli; then
5207 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5208 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5209 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5210 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5211 fi
5212fi
5213
5214# Enable MI.
81ecdfbb
RW
5215# Check whether --enable-gdbmi was given.
5216if test "${enable_gdbmi+set}" = set; then :
5217 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5218 yes | no)
5219 ;;
5220 *)
81ecdfbb 5221 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5222 esac
5223else
5224 enable_gdbmi=yes
81ecdfbb
RW
5225fi
5226
c0993dbe
UW
5227if test x"$enable_gdbmi" = xyes; then
5228 if test -d $srcdir/mi; then
5229 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5230 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5231 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5232 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5233 fi
5234fi
5235
5236# Enable TUI.
81ecdfbb
RW
5237# Check whether --enable-tui was given.
5238if test "${enable_tui+set}" = set; then :
5239 enableval=$enable_tui; case $enableval in
3ca64bd3 5240 yes | no | auto)
c0993dbe
UW
5241 ;;
5242 *)
81ecdfbb 5243 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5244 esac
5245else
3ca64bd3 5246 enable_tui=auto
81ecdfbb
RW
5247fi
5248
c0993dbe
UW
5249
5250# Enable gdbtk.
81ecdfbb
RW
5251# Check whether --enable-gdbtk was given.
5252if test "${enable_gdbtk+set}" = set; then :
5253 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5254 yes | no)
5255 ;;
5256 *)
81ecdfbb 5257 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5258 esac
5259else
5062cc19 5260 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5261 enable_gdbtk=yes
5262 else
5263 enable_gdbtk=no
5264 fi
81ecdfbb
RW
5265fi
5266
c0993dbe
UW
5267# We unconditionally disable gdbtk tests on selected platforms.
5268case $host_os in
5269 go32* | windows*)
81ecdfbb
RW
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5271$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5272 enable_gdbtk=no ;;
5273esac
5274
05e7c244 5275# Libunwind support for ia64.
bec39cab 5276
05e7c244
JK
5277
5278# Check whether --with-libunwind-ia64 was given.
5279if test "${with_libunwind_ia64+set}" = set; then :
5280 withval=$with_libunwind_ia64;
bec39cab 5281else
05e7c244
JK
5282 with_libunwind_ia64=auto
5283fi
bec39cab 5284
05e7c244
JK
5285
5286# Backward compatibility option.
5287if test "${with_libunwind+set}" = set; then
5288 if test x"$with_libunwind_ia64" != xauto; then
5289 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5290 fi
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5292$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5293 with_libunwind_ia64="$with_libunwind"
5294fi
5295
5296case "$with_libunwind_ia64" in
5297 yes | no)
5298 ;;
5299 auto)
5300 for ac_header in libunwind-ia64.h
81ecdfbb 5301do :
b54a8fd7
PA
5302 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5303if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5304 cat >>confdefs.h <<_ACEOF
b54a8fd7 5305#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5306_ACEOF
5307
5308fi
5309
5310done
5311
05e7c244
JK
5312 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5313 ;;
5314 *)
5315 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5316 ;;
5317esac
bec39cab 5318
05e7c244 5319if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5320 for ac_header in libunwind-ia64.h
81ecdfbb 5321do :
b54a8fd7
PA
5322 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5323if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5324 cat >>confdefs.h <<_ACEOF
b54a8fd7 5325#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5326_ACEOF
5327
5328fi
5329
5330done
5331
05e7c244
JK
5332 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5333 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5334 fi
5335 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5336 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5337 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5338fi
5339
cb01cfba
JB
5340opt_curses=no
5341
81ecdfbb
RW
5342# Check whether --with-curses was given.
5343if test "${with_curses+set}" = set; then :
5344 withval=$with_curses; opt_curses=$withval
5345fi
5346
cb01cfba 5347
76a39ba7 5348prefer_curses=no
cb01cfba 5349if test "$opt_curses" = "yes"; then
76a39ba7 5350 prefer_curses=yes
cb01cfba
JB
5351fi
5352
a9322a30 5353# Profiling support.
81ecdfbb
RW
5354# Check whether --enable-profiling was given.
5355if test "${enable_profiling+set}" = set; then :
5356 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5357 yes | no)
5358 ;;
5359 *)
81ecdfbb 5360 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5361 esac
5362else
5363 enable_profiling=no
81ecdfbb 5364fi
bec39cab 5365
a9322a30
TT
5366
5367for ac_func in monstartup _mcleanup
81ecdfbb
RW
5368do :
5369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5371eval as_val=\$$as_ac_var
5372 if test "x$as_val" = x""yes; then :
5373 cat >>confdefs.h <<_ACEOF
5374#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5375_ACEOF
a9322a30 5376
81ecdfbb
RW
5377fi
5378done
a9322a30 5379
81ecdfbb
RW
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5381$as_echo_n "checking for _etext... " >&6; }
5382if test "${ac_cv_var__etext+set}" = set; then :
5383 $as_echo_n "(cached) " >&6
5384else
5385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5386/* end confdefs.h. */
5387#include <stdlib.h>
5388extern char _etext;
a9322a30
TT
5389
5390int
5391main ()
5392{
5393free (&_etext);
5394 ;
5395 return 0;
5396}
bec39cab 5397_ACEOF
81ecdfbb 5398if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5399 ac_cv_var__etext=yes
bec39cab 5400else
81ecdfbb 5401 ac_cv_var__etext=no
bec39cab 5402fi
81ecdfbb
RW
5403rm -f core conftest.err conftest.$ac_objext \
5404 conftest$ac_exeext conftest.$ac_ext
bec39cab 5405fi
81ecdfbb
RW
5406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5407$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5408if test $ac_cv_var__etext = yes; then
60ca704f 5409
81ecdfbb 5410$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5411
bec39cab 5412fi
81ecdfbb
RW
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5414$as_echo_n "checking for etext... " >&6; }
5415if test "${ac_cv_var_etext+set}" = set; then :
5416 $as_echo_n "(cached) " >&6
bec39cab 5417else
81ecdfbb 5418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5419/* end confdefs.h. */
a9322a30
TT
5420#include <stdlib.h>
5421extern char etext;
bec39cab
AC
5422
5423int
5424main ()
5425{
a9322a30 5426free (&etext);
bec39cab
AC
5427 ;
5428 return 0;
5429}
5430_ACEOF
81ecdfbb 5431if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5432 ac_cv_var_etext=yes
bec39cab 5433else
81ecdfbb 5434 ac_cv_var_etext=no
bec39cab 5435fi
81ecdfbb
RW
5436rm -f core conftest.err conftest.$ac_objext \
5437 conftest$ac_exeext conftest.$ac_ext
bec39cab 5438fi
81ecdfbb
RW
5439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5440$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5441if test $ac_cv_var_etext = yes; then
5442
81ecdfbb 5443$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5444
5445fi
a9322a30
TT
5446if test "$enable_profiling" = yes ; then
5447 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5448 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5449 fi
5450 PROFILE_CFLAGS=-pg
5451 OLD_CFLAGS="$CFLAGS"
5452 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5453
81ecdfbb
RW
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5455$as_echo_n "checking whether $CC supports -pg... " >&6; }
5456if test "${ac_cv_cc_supports_pg+set}" = set; then :
5457 $as_echo_n "(cached) " >&6
bec39cab 5458else
81ecdfbb 5459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5460/* end confdefs.h. */
bec39cab
AC
5461
5462int
5463main ()
5464{
a9322a30 5465int x;
bec39cab
AC
5466 ;
5467 return 0;
5468}
5469_ACEOF
81ecdfbb 5470if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5471 ac_cv_cc_supports_pg=yes
bec39cab 5472else
81ecdfbb 5473 ac_cv_cc_supports_pg=no
bec39cab 5474fi
81ecdfbb 5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5476fi
81ecdfbb
RW
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5478$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5479
a9322a30 5480 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5481 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5482 fi
bec39cab 5483
a9322a30 5484 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5485fi
5486
c16158bc
JM
5487
5488
81ecdfbb
RW
5489# Check whether --with-pkgversion was given.
5490if test "${with_pkgversion+set}" = set; then :
5491 withval=$with_pkgversion; case "$withval" in
5492 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5493 no) PKGVERSION= ;;
5494 *) PKGVERSION="($withval) " ;;
5495 esac
5496else
5497 PKGVERSION="(GDB) "
5498
81ecdfbb 5499fi
c16158bc
JM
5500
5501
5502
5503
81ecdfbb
RW
5504
5505# Check whether --with-bugurl was given.
5506if test "${with_bugurl+set}" = set; then :
5507 withval=$with_bugurl; case "$withval" in
5508 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5509 no) BUGURL=
5510 ;;
5511 *) BUGURL="$withval"
5512 ;;
5513 esac
5514else
5515 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5516
81ecdfbb
RW
5517fi
5518
c16158bc
JM
5519 case ${BUGURL} in
5520 "")
5521 REPORT_BUGS_TO=
5522 REPORT_BUGS_TEXI=
5523 ;;
5524 *)
5525 REPORT_BUGS_TO="<$BUGURL>"
5526 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5527 ;;
5528 esac;
5529
5530
5531
5532
5533cat >>confdefs.h <<_ACEOF
5534#define PKGVERSION "$PKGVERSION"
5535_ACEOF
5536
5537
5538cat >>confdefs.h <<_ACEOF
5539#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5540_ACEOF
5541
5542
bec39cab
AC
5543# --------------------- #
5544# Checks for programs. #
5545# --------------------- #
5546
5547for ac_prog in gawk mawk nawk awk
5548do
5549 # Extract the first word of "$ac_prog", so it can be a program name with args.
5550set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5552$as_echo_n "checking for $ac_word... " >&6; }
5553if test "${ac_cv_prog_AWK+set}" = set; then :
5554 $as_echo_n "(cached) " >&6
bec39cab
AC
5555else
5556 if test -n "$AWK"; then
5557 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5558else
5559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560for as_dir in $PATH
5561do
5562 IFS=$as_save_IFS
5563 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5564 for ac_exec_ext in '' $ac_executable_extensions; do
5565 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5566 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5567 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5568 break 2
5569 fi
5570done
81ecdfbb
RW
5571 done
5572IFS=$as_save_IFS
bec39cab
AC
5573
5574fi
5575fi
5576AWK=$ac_cv_prog_AWK
5577if test -n "$AWK"; then
81ecdfbb
RW
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5579$as_echo "$AWK" >&6; }
bec39cab 5580else
81ecdfbb
RW
5581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5582$as_echo "no" >&6; }
bec39cab
AC
5583fi
5584
bec39cab 5585
81ecdfbb 5586 test -n "$AWK" && break
bec39cab
AC
5587done
5588
c971b7fa
PA
5589# Find a good install program. We prefer a C program (faster),
5590# so one script is as good as another. But avoid the broken or
5591# incompatible versions:
5592# SysV /etc/install, /usr/sbin/install
5593# SunOS /usr/etc/install
5594# IRIX /sbin/install
5595# AIX /bin/install
5596# AmigaOS /C/install, which installs bootblocks on floppy discs
5597# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5598# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5599# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5600# OS/2's system install, which has a completely different semantic
5601# ./install, which can be erroneously created by make from ./install.sh.
5602# Reject install programs that cannot install multiple files.
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5604$as_echo_n "checking for a BSD-compatible install... " >&6; }
5605if test -z "$INSTALL"; then
5606if test "${ac_cv_path_install+set}" = set; then :
5607 $as_echo_n "(cached) " >&6
5608else
5609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612 IFS=$as_save_IFS
5613 test -z "$as_dir" && as_dir=.
5614 # Account for people who put trailing slashes in PATH elements.
5615case $as_dir/ in #((
5616 ./ | .// | /[cC]/* | \
5617 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5618 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5619 /usr/ucb/* ) ;;
5620 *)
5621 # OSF1 and SCO ODT 3.0 have their own names for install.
5622 # Don't use installbsd from OSF since it installs stuff as root
5623 # by default.
5624 for ac_prog in ginstall scoinst install; do
5625 for ac_exec_ext in '' $ac_executable_extensions; do
5626 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5627 if test $ac_prog = install &&
5628 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5629 # AIX install. It has an incompatible calling convention.
5630 :
5631 elif test $ac_prog = install &&
5632 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5633 # program-specific install script used by HP pwplus--don't use.
5634 :
5635 else
5636 rm -rf conftest.one conftest.two conftest.dir
5637 echo one > conftest.one
5638 echo two > conftest.two
5639 mkdir conftest.dir
5640 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5641 test -s conftest.one && test -s conftest.two &&
5642 test -s conftest.dir/conftest.one &&
5643 test -s conftest.dir/conftest.two
5644 then
5645 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5646 break 3
5647 fi
5648 fi
5649 fi
5650 done
5651 done
5652 ;;
5653esac
5654
5655 done
5656IFS=$as_save_IFS
5657
5658rm -rf conftest.one conftest.two conftest.dir
5659
5660fi
5661 if test "${ac_cv_path_install+set}" = set; then
5662 INSTALL=$ac_cv_path_install
5663 else
5664 # As a last resort, use the slow shell script. Don't cache a
5665 # value for INSTALL within a source directory, because that will
5666 # break other packages using the cache if that directory is
5667 # removed, or if the value is a relative name.
5668 INSTALL=$ac_install_sh
5669 fi
5670fi
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5672$as_echo "$INSTALL" >&6; }
5673
5674# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5675# It thinks the first close brace ends the variable substitution.
5676test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5677
5678test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5679
5680test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5681
81ecdfbb
RW
5682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5683$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5684LN_S=$as_ln_s
5685if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5687$as_echo "yes" >&6; }
bec39cab 5688else
81ecdfbb
RW
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5690$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5691fi
5692
5693if test -n "$ac_tool_prefix"; then
5694 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5695set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697$as_echo_n "checking for $ac_word... " >&6; }
5698if test "${ac_cv_prog_RANLIB+set}" = set; then :
5699 $as_echo_n "(cached) " >&6
bec39cab
AC
5700else
5701 if test -n "$RANLIB"; then
5702 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5703else
5704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707 IFS=$as_save_IFS
5708 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5709 for ac_exec_ext in '' $ac_executable_extensions; do
5710 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5711 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5713 break 2
5714 fi
5715done
81ecdfbb
RW
5716 done
5717IFS=$as_save_IFS
bec39cab
AC
5718
5719fi
5720fi
5721RANLIB=$ac_cv_prog_RANLIB
5722if test -n "$RANLIB"; then
81ecdfbb
RW
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5724$as_echo "$RANLIB" >&6; }
bec39cab 5725else
81ecdfbb
RW
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
bec39cab
AC
5728fi
5729
81ecdfbb 5730
bec39cab
AC
5731fi
5732if test -z "$ac_cv_prog_RANLIB"; then
5733 ac_ct_RANLIB=$RANLIB
5734 # Extract the first word of "ranlib", so it can be a program name with args.
5735set dummy ranlib; ac_word=$2
81ecdfbb
RW
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737$as_echo_n "checking for $ac_word... " >&6; }
5738if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5739 $as_echo_n "(cached) " >&6
bec39cab
AC
5740else
5741 if test -n "$ac_ct_RANLIB"; then
5742 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5743else
5744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5745for as_dir in $PATH
5746do
5747 IFS=$as_save_IFS
5748 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5749 for ac_exec_ext in '' $ac_executable_extensions; do
5750 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5751 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5753 break 2
5754 fi
5755done
81ecdfbb
RW
5756 done
5757IFS=$as_save_IFS
bec39cab 5758
bec39cab
AC
5759fi
5760fi
5761ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5762if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5764$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5765else
81ecdfbb
RW
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
bec39cab
AC
5768fi
5769
81ecdfbb
RW
5770 if test "x$ac_ct_RANLIB" = x; then
5771 RANLIB=":"
5772 else
5773 case $cross_compiling:$ac_tool_warned in
5774yes:)
5775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5777ac_tool_warned=yes ;;
5778esac
5779 RANLIB=$ac_ct_RANLIB
5780 fi
bec39cab
AC
5781else
5782 RANLIB="$ac_cv_prog_RANLIB"
5783fi
5784
5785for ac_prog in 'bison -y' byacc
5786do
5787 # Extract the first word of "$ac_prog", so it can be a program name with args.
5788set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
5791if test "${ac_cv_prog_YACC+set}" = set; then :
5792 $as_echo_n "(cached) " >&6
bec39cab
AC
5793else
5794 if test -n "$YACC"; then
5795 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5796else
5797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5798for as_dir in $PATH
5799do
5800 IFS=$as_save_IFS
5801 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5802 for ac_exec_ext in '' $ac_executable_extensions; do
5803 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5804 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5806 break 2
5807 fi
5808done
81ecdfbb
RW
5809 done
5810IFS=$as_save_IFS
bec39cab
AC
5811
5812fi
5813fi
5814YACC=$ac_cv_prog_YACC
5815if test -n "$YACC"; then
81ecdfbb
RW
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5817$as_echo "$YACC" >&6; }
bec39cab 5818else
81ecdfbb
RW
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
bec39cab
AC
5821fi
5822
81ecdfbb 5823
bec39cab
AC
5824 test -n "$YACC" && break
5825done
5826test -n "$YACC" || YACC="yacc"
5827
5828
5829if test -n "$ac_tool_prefix"; then
5830 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5831set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5833$as_echo_n "checking for $ac_word... " >&6; }
5834if test "${ac_cv_prog_AR+set}" = set; then :
5835 $as_echo_n "(cached) " >&6
bec39cab
AC
5836else
5837 if test -n "$AR"; then
5838 ac_cv_prog_AR="$AR" # Let the user override the test.
5839else
5840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5841for as_dir in $PATH
5842do
5843 IFS=$as_save_IFS
5844 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5845 for ac_exec_ext in '' $ac_executable_extensions; do
5846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5847 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5849 break 2
5850 fi
5851done
81ecdfbb
RW
5852 done
5853IFS=$as_save_IFS
bec39cab
AC
5854
5855fi
5856fi
5857AR=$ac_cv_prog_AR
5858if test -n "$AR"; then
81ecdfbb
RW
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5860$as_echo "$AR" >&6; }
bec39cab 5861else
81ecdfbb
RW
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863$as_echo "no" >&6; }
bec39cab
AC
5864fi
5865
81ecdfbb 5866
bec39cab
AC
5867fi
5868if test -z "$ac_cv_prog_AR"; then
5869 ac_ct_AR=$AR
5870 # Extract the first word of "ar", so it can be a program name with args.
5871set dummy ar; ac_word=$2
81ecdfbb
RW
5872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5873$as_echo_n "checking for $ac_word... " >&6; }
5874if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5875 $as_echo_n "(cached) " >&6
bec39cab
AC
5876else
5877 if test -n "$ac_ct_AR"; then
5878 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5879else
5880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5881for as_dir in $PATH
5882do
5883 IFS=$as_save_IFS
5884 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5885 for ac_exec_ext in '' $ac_executable_extensions; do
5886 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5887 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5889 break 2
5890 fi
5891done
81ecdfbb
RW
5892 done
5893IFS=$as_save_IFS
bec39cab
AC
5894
5895fi
5896fi
5897ac_ct_AR=$ac_cv_prog_ac_ct_AR
5898if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5900$as_echo "$ac_ct_AR" >&6; }
bec39cab 5901else
81ecdfbb
RW
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903$as_echo "no" >&6; }
bec39cab
AC
5904fi
5905
81ecdfbb
RW
5906 if test "x$ac_ct_AR" = x; then
5907 AR=""
5908 else
5909 case $cross_compiling:$ac_tool_warned in
5910yes:)
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5913ac_tool_warned=yes ;;
5914esac
5915 AR=$ac_ct_AR
5916 fi
bec39cab
AC
5917else
5918 AR="$ac_cv_prog_AR"
5919fi
5920
5921if test -n "$ac_tool_prefix"; then
5922 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5923set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5925$as_echo_n "checking for $ac_word... " >&6; }
5926if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5927 $as_echo_n "(cached) " >&6
bec39cab
AC
5928else
5929 if test -n "$DLLTOOL"; then
5930 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5931else
5932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935 IFS=$as_save_IFS
5936 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5937 for ac_exec_ext in '' $ac_executable_extensions; do
5938 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5939 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5941 break 2
5942 fi
5943done
81ecdfbb
RW
5944 done
5945IFS=$as_save_IFS
bec39cab
AC
5946
5947fi
5948fi
5949DLLTOOL=$ac_cv_prog_DLLTOOL
5950if test -n "$DLLTOOL"; then
81ecdfbb
RW
5951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5952$as_echo "$DLLTOOL" >&6; }
bec39cab 5953else
81ecdfbb
RW
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955$as_echo "no" >&6; }
bec39cab
AC
5956fi
5957
81ecdfbb 5958
bec39cab
AC
5959fi
5960if test -z "$ac_cv_prog_DLLTOOL"; then
5961 ac_ct_DLLTOOL=$DLLTOOL
5962 # Extract the first word of "dlltool", so it can be a program name with args.
5963set dummy dlltool; ac_word=$2
81ecdfbb
RW
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5965$as_echo_n "checking for $ac_word... " >&6; }
5966if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5967 $as_echo_n "(cached) " >&6
bec39cab
AC
5968else
5969 if test -n "$ac_ct_DLLTOOL"; then
5970 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5971else
5972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5973for as_dir in $PATH
5974do
5975 IFS=$as_save_IFS
5976 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5977 for ac_exec_ext in '' $ac_executable_extensions; do
5978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5979 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5981 break 2
5982 fi
5983done
81ecdfbb
RW
5984 done
5985IFS=$as_save_IFS
bec39cab
AC
5986
5987fi
5988fi
5989ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5990if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5992$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 5993else
81ecdfbb
RW
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
bec39cab
AC
5996fi
5997
81ecdfbb
RW
5998 if test "x$ac_ct_DLLTOOL" = x; then
5999 DLLTOOL=""
6000 else
6001 case $cross_compiling:$ac_tool_warned in
6002yes:)
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6005ac_tool_warned=yes ;;
6006esac
6007 DLLTOOL=$ac_ct_DLLTOOL
6008 fi
bec39cab
AC
6009else
6010 DLLTOOL="$ac_cv_prog_DLLTOOL"
6011fi
6012
6013if test -n "$ac_tool_prefix"; then
6014 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6015set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
6018if test "${ac_cv_prog_WINDRES+set}" = set; then :
6019 $as_echo_n "(cached) " >&6
bec39cab
AC
6020else
6021 if test -n "$WINDRES"; then
6022 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6023else
6024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6029 for ac_exec_ext in '' $ac_executable_extensions; do
6030 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6031 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6033 break 2
6034 fi
6035done
81ecdfbb
RW
6036 done
6037IFS=$as_save_IFS
bec39cab
AC
6038
6039fi
6040fi
6041WINDRES=$ac_cv_prog_WINDRES
6042if test -n "$WINDRES"; then
81ecdfbb
RW
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6044$as_echo "$WINDRES" >&6; }
bec39cab 6045else
81ecdfbb
RW
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
bec39cab
AC
6048fi
6049
81ecdfbb 6050
bec39cab
AC
6051fi
6052if test -z "$ac_cv_prog_WINDRES"; then
6053 ac_ct_WINDRES=$WINDRES
6054 # Extract the first word of "windres", so it can be a program name with args.
6055set dummy windres; ac_word=$2
81ecdfbb
RW
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6059 $as_echo_n "(cached) " >&6
bec39cab
AC
6060else
6061 if test -n "$ac_ct_WINDRES"; then
6062 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6063else
6064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067 IFS=$as_save_IFS
6068 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6069 for ac_exec_ext in '' $ac_executable_extensions; do
6070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6071 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6073 break 2
6074 fi
6075done
81ecdfbb
RW
6076 done
6077IFS=$as_save_IFS
bec39cab
AC
6078
6079fi
6080fi
6081ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6082if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6084$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6085else
81ecdfbb
RW
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087$as_echo "no" >&6; }
c906108c 6088fi
bec39cab 6089
81ecdfbb
RW
6090 if test "x$ac_ct_WINDRES" = x; then
6091 WINDRES=""
6092 else
6093 case $cross_compiling:$ac_tool_warned in
6094yes:)
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6097ac_tool_warned=yes ;;
6098esac
6099 WINDRES=$ac_ct_WINDRES
6100 fi
c906108c 6101else
bec39cab 6102 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6103fi
6104
bec39cab
AC
6105
6106# Needed for GNU/Hurd.
6107if test -n "$ac_tool_prefix"; then
6108 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6109set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if test "${ac_cv_prog_MIG+set}" = set; then :
6113 $as_echo_n "(cached) " >&6
c906108c 6114else
bec39cab
AC
6115 if test -n "$MIG"; then
6116 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6123 for ac_exec_ext in '' $ac_executable_extensions; do
6124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6125 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6127 break 2
6128 fi
6129done
81ecdfbb
RW
6130 done
6131IFS=$as_save_IFS
bec39cab 6132
c906108c 6133fi
bec39cab
AC
6134fi
6135MIG=$ac_cv_prog_MIG
6136if test -n "$MIG"; then
81ecdfbb
RW
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6138$as_echo "$MIG" >&6; }
c906108c 6139else
81ecdfbb
RW
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
c906108c
SS
6142fi
6143
81ecdfbb 6144
bec39cab
AC
6145fi
6146if test -z "$ac_cv_prog_MIG"; then
6147 ac_ct_MIG=$MIG
6148 # Extract the first word of "mig", so it can be a program name with args.
6149set dummy mig; ac_word=$2
81ecdfbb
RW
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6151$as_echo_n "checking for $ac_word... " >&6; }
6152if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6153 $as_echo_n "(cached) " >&6
bec39cab
AC
6154else
6155 if test -n "$ac_ct_MIG"; then
6156 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6157else
6158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161 IFS=$as_save_IFS
6162 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6163 for ac_exec_ext in '' $ac_executable_extensions; do
6164 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6165 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6167 break 2
6168 fi
6169done
81ecdfbb
RW
6170 done
6171IFS=$as_save_IFS
c906108c 6172
bec39cab
AC
6173fi
6174fi
6175ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6176if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6178$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6179else
81ecdfbb
RW
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
bec39cab 6182fi
c906108c 6183
81ecdfbb
RW
6184 if test "x$ac_ct_MIG" = x; then
6185 MIG=""
6186 else
6187 case $cross_compiling:$ac_tool_warned in
6188yes:)
6189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6191ac_tool_warned=yes ;;
6192esac
6193 MIG=$ac_ct_MIG
6194 fi
bec39cab
AC
6195else
6196 MIG="$ac_cv_prog_MIG"
6197fi
c906108c 6198
c906108c 6199
bec39cab
AC
6200# ---------------------- #
6201# Checks for libraries. #
6202# ---------------------- #
c906108c 6203
bec39cab 6204# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6206$as_echo_n "checking for main in -lm... " >&6; }
6207if test "${ac_cv_lib_m_main+set}" = set; then :
6208 $as_echo_n "(cached) " >&6
bec39cab
AC
6209else
6210 ac_check_lib_save_LIBS=$LIBS
6211LIBS="-lm $LIBS"
81ecdfbb 6212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6213/* end confdefs.h. */
c906108c 6214
c906108c 6215
bec39cab
AC
6216int
6217main ()
6218{
81ecdfbb 6219return main ();
bec39cab
AC
6220 ;
6221 return 0;
6222}
6223_ACEOF
81ecdfbb 6224if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6225 ac_cv_lib_m_main=yes
6226else
81ecdfbb 6227 ac_cv_lib_m_main=no
bec39cab 6228fi
81ecdfbb
RW
6229rm -f core conftest.err conftest.$ac_objext \
6230 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6231LIBS=$ac_check_lib_save_LIBS
6232fi
81ecdfbb
RW
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6234$as_echo "$ac_cv_lib_m_main" >&6; }
6235if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6236 cat >>confdefs.h <<_ACEOF
6237#define HAVE_LIBM 1
6238_ACEOF
6239
6240 LIBS="-lm $LIBS"
c906108c 6241
c906108c 6242fi
bec39cab
AC
6243
6244
6245# We need to link with -lw to get `wctype' on Solaris before Solaris
6246# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6247# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6248# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6249ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6250if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6251
c906108c 6252else
81ecdfbb
RW
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6254$as_echo_n "checking for wctype in -lw... " >&6; }
6255if test "${ac_cv_lib_w_wctype+set}" = set; then :
6256 $as_echo_n "(cached) " >&6
bec39cab
AC
6257else
6258 ac_check_lib_save_LIBS=$LIBS
6259LIBS="-lw $LIBS"
81ecdfbb 6260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6261/* end confdefs.h. */
c906108c 6262
81ecdfbb
RW
6263/* Override any GCC internal prototype to avoid an error.
6264 Use char because int might match the return type of a GCC
6265 builtin and then its argument prototype would still apply. */
bec39cab
AC
6266#ifdef __cplusplus
6267extern "C"
6268#endif
bec39cab
AC
6269char wctype ();
6270int
6271main ()
6272{
81ecdfbb 6273return wctype ();
bec39cab
AC
6274 ;
6275 return 0;
6276}
6277_ACEOF
81ecdfbb 6278if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6279 ac_cv_lib_w_wctype=yes
6280else
81ecdfbb 6281 ac_cv_lib_w_wctype=no
bec39cab 6282fi
81ecdfbb
RW
6283rm -f core conftest.err conftest.$ac_objext \
6284 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6285LIBS=$ac_check_lib_save_LIBS
6286fi
81ecdfbb
RW
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6288$as_echo "$ac_cv_lib_w_wctype" >&6; }
6289if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6290 cat >>confdefs.h <<_ACEOF
6291#define HAVE_LIBW 1
6292_ACEOF
c906108c 6293
bec39cab 6294 LIBS="-lw $LIBS"
c906108c 6295
bec39cab 6296fi
c906108c 6297
bec39cab 6298fi
c906108c 6299
ddc9cd0f 6300
bec39cab 6301# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6303$as_echo_n "checking for library containing gethostbyname... " >&6; }
6304if test "${ac_cv_search_gethostbyname+set}" = set; then :
6305 $as_echo_n "(cached) " >&6
bec39cab
AC
6306else
6307 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6309/* end confdefs.h. */
ddc9cd0f 6310
81ecdfbb
RW
6311/* Override any GCC internal prototype to avoid an error.
6312 Use char because int might match the return type of a GCC
6313 builtin and then its argument prototype would still apply. */
bec39cab
AC
6314#ifdef __cplusplus
6315extern "C"
6316#endif
bec39cab
AC
6317char gethostbyname ();
6318int
6319main ()
6320{
81ecdfbb 6321return gethostbyname ();
bec39cab
AC
6322 ;
6323 return 0;
6324}
6325_ACEOF
81ecdfbb
RW
6326for ac_lib in '' nsl; do
6327 if test -z "$ac_lib"; then
6328 ac_res="none required"
6329 else
6330 ac_res=-l$ac_lib
b4e70030 6331 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6332 fi
6333 if ac_fn_c_try_link "$LINENO"; then :
6334 ac_cv_search_gethostbyname=$ac_res
6335fi
6336rm -f core conftest.err conftest.$ac_objext \
6337 conftest$ac_exeext
6338 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6339 break
6340fi
6341done
6342if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6343
bec39cab 6344else
81ecdfbb 6345 ac_cv_search_gethostbyname=no
bec39cab 6346fi
81ecdfbb 6347rm conftest.$ac_ext
bec39cab
AC
6348LIBS=$ac_func_search_save_LIBS
6349fi
81ecdfbb
RW
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6351$as_echo "$ac_cv_search_gethostbyname" >&6; }
6352ac_res=$ac_cv_search_gethostbyname
6353if test "$ac_res" != no; then :
6354 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6355
bec39cab 6356fi
96baa820 6357
c906108c 6358
b4e70030 6359# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6361$as_echo_n "checking for library containing socketpair... " >&6; }
6362if test "${ac_cv_search_socketpair+set}" = set; then :
6363 $as_echo_n "(cached) " >&6
b4e70030
JB
6364else
6365 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6367/* end confdefs.h. */
6368
81ecdfbb
RW
6369/* Override any GCC internal prototype to avoid an error.
6370 Use char because int might match the return type of a GCC
6371 builtin and then its argument prototype would still apply. */
b4e70030
JB
6372#ifdef __cplusplus
6373extern "C"
6374#endif
b4e70030
JB
6375char socketpair ();
6376int
6377main ()
6378{
81ecdfbb 6379return socketpair ();
b4e70030
JB
6380 ;
6381 return 0;
6382}
6383_ACEOF
81ecdfbb
RW
6384for ac_lib in '' socket; do
6385 if test -z "$ac_lib"; then
6386 ac_res="none required"
6387 else
6388 ac_res=-l$ac_lib
b4e70030 6389 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6390 fi
6391 if ac_fn_c_try_link "$LINENO"; then :
6392 ac_cv_search_socketpair=$ac_res
6393fi
6394rm -f core conftest.err conftest.$ac_objext \
6395 conftest$ac_exeext
6396 if test "${ac_cv_search_socketpair+set}" = set; then :
6397 break
6398fi
6399done
6400if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6401
b4e70030 6402else
81ecdfbb 6403 ac_cv_search_socketpair=no
b4e70030 6404fi
81ecdfbb 6405rm conftest.$ac_ext
b4e70030
JB
6406LIBS=$ac_func_search_save_LIBS
6407fi
81ecdfbb
RW
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6409$as_echo "$ac_cv_search_socketpair" >&6; }
6410ac_res=$ac_cv_search_socketpair
6411if test "$ac_res" != no; then :
6412 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6413
6414fi
6415
6416
233a11ab 6417# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6418
6419 # See if the user specified whether he wants zlib support or not.
6420
6421# Check whether --with-zlib was given.
6422if test "${with_zlib+set}" = set; then :
6423 withval=$with_zlib;
6424else
6425 with_zlib=auto
6426fi
6427
6428
6429 if test "$with_zlib" != "no"; then
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6431$as_echo_n "checking for library containing zlibVersion... " >&6; }
6432if test "${ac_cv_search_zlibVersion+set}" = set; then :
6433 $as_echo_n "(cached) " >&6
233a11ab
CS
6434else
6435 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6437/* end confdefs.h. */
6438
81ecdfbb
RW
6439/* Override any GCC internal prototype to avoid an error.
6440 Use char because int might match the return type of a GCC
233a11ab 6441 builtin and then its argument prototype would still apply. */
233a11ab
CS
6442#ifdef __cplusplus
6443extern "C"
6444#endif
233a11ab
CS
6445char zlibVersion ();
6446int
6447main ()
6448{
81ecdfbb 6449return zlibVersion ();
233a11ab
CS
6450 ;
6451 return 0;
6452}
6453_ACEOF
81ecdfbb
RW
6454for ac_lib in '' z; do
6455 if test -z "$ac_lib"; then
6456 ac_res="none required"
233a11ab 6457 else
81ecdfbb
RW
6458 ac_res=-l$ac_lib
6459 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6460 fi
81ecdfbb
RW
6461 if ac_fn_c_try_link "$LINENO"; then :
6462 ac_cv_search_zlibVersion=$ac_res
233a11ab 6463fi
81ecdfbb
RW
6464rm -f core conftest.err conftest.$ac_objext \
6465 conftest$ac_exeext
6466 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6467 break
233a11ab 6468fi
81ecdfbb
RW
6469done
6470if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6471
233a11ab 6472else
81ecdfbb 6473 ac_cv_search_zlibVersion=no
233a11ab 6474fi
81ecdfbb
RW
6475rm conftest.$ac_ext
6476LIBS=$ac_func_search_save_LIBS
233a11ab 6477fi
81ecdfbb
RW
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6479$as_echo "$ac_cv_search_zlibVersion" >&6; }
6480ac_res=$ac_cv_search_zlibVersion
6481if test "$ac_res" != no; then :
6482 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6483 for ac_header in zlib.h
6484do :
6485 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6486if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6487 cat >>confdefs.h <<_ACEOF
81ecdfbb 6488#define HAVE_ZLIB_H 1
233a11ab
CS
6489_ACEOF
6490
6491fi
6492
6493done
6494
6495fi
6496
b040ad30
JB
6497 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6498 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6499 fi
6500 fi
6501
233a11ab 6502
77f120bf 6503# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6505$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6506if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6507 $as_echo_n "(cached) " >&6
bec39cab
AC
6508else
6509 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6511/* end confdefs.h. */
c906108c 6512
81ecdfbb
RW
6513/* Override any GCC internal prototype to avoid an error.
6514 Use char because int might match the return type of a GCC
6515 builtin and then its argument prototype would still apply. */
bec39cab
AC
6516#ifdef __cplusplus
6517extern "C"
6518#endif
77f120bf 6519char dlgetmodinfo ();
bec39cab
AC
6520int
6521main ()
6522{
81ecdfbb 6523return dlgetmodinfo ();
bec39cab
AC
6524 ;
6525 return 0;
6526}
6527_ACEOF
81ecdfbb
RW
6528for ac_lib in '' dl xpdl; do
6529 if test -z "$ac_lib"; then
6530 ac_res="none required"
6531 else
6532 ac_res=-l$ac_lib
b4e70030 6533 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6534 fi
6535 if ac_fn_c_try_link "$LINENO"; then :
6536 ac_cv_search_dlgetmodinfo=$ac_res
6537fi
6538rm -f core conftest.err conftest.$ac_objext \
6539 conftest$ac_exeext
6540 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6541 break
6542fi
6543done
6544if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6545
4e8d927d 6546else
81ecdfbb 6547 ac_cv_search_dlgetmodinfo=no
1ba607ad 6548fi
81ecdfbb 6549rm conftest.$ac_ext
bec39cab
AC
6550LIBS=$ac_func_search_save_LIBS
6551fi
81ecdfbb
RW
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6553$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6554ac_res=$ac_cv_search_dlgetmodinfo
6555if test "$ac_res" != no; then :
6556 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6557
8bb2c122 6558fi
8bb2c122 6559
8bb2c122 6560
77f120bf 6561
77f120bf 6562
6c7a06a3 6563
81ecdfbb
RW
6564# Check whether --with-libiconv-prefix was given.
6565if test "${with_libiconv_prefix+set}" = set; then :
6566 withval=$with_libiconv_prefix;
6c7a06a3 6567 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6568 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6569 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6570 done
6571
81ecdfbb
RW
6572fi
6573
6c7a06a3 6574
f18c4681 6575 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6576 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6577
81ecdfbb
RW
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6579$as_echo_n "checking for iconv... " >&6; }
6580if test "${am_cv_func_iconv+set}" = set; then :
6581 $as_echo_n "(cached) " >&6
d542061a 6582else
6c7a06a3
TT
6583
6584 am_cv_func_iconv="no, consider installing GNU libiconv"
6585 am_cv_lib_iconv=no
6586 am_cv_use_build_libiconv=no
f0f20949 6587 am_cv_build_libiconv_path=
4edb1e84
JB
6588
6589 # If libiconv is part of the build tree, then try using it over
6590 # any system iconv.
6591 if test -d ../libiconv; then
f18c4681
JB
6592 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6593 am_save_LIBS="$LIBS"
6594 am_save_CPPFLAGS="$CPPFLAGS"
6595 LIBS="$LIBS $lib_dir/libiconv.a"
6596 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6598/* end confdefs.h. */
6c7a06a3
TT
6599#include <stdlib.h>
6600#include <iconv.h>
d542061a
UW
6601int
6602main ()
6603{
6c7a06a3 6604iconv_t cd = iconv_open("","");
f18c4681
JB
6605 iconv(cd,NULL,NULL,NULL,NULL);
6606 iconv_close(cd);
d542061a
UW
6607 ;
6608 return 0;
6609}
6610_ACEOF
81ecdfbb 6611if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6612 am_cv_use_build_libiconv=yes
f0f20949 6613 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6614 am_cv_lib_iconv=yes
6615 am_cv_func_iconv=yes
d542061a 6616fi
81ecdfbb
RW
6617rm -f core conftest.err conftest.$ac_objext \
6618 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6619 LIBS="$am_save_LIBS"
6620 CPPFLAGS="$am_save_CPPFLAGS"
6621 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6622 break
6623 fi
6624 done
4edb1e84 6625 fi
94ae1714 6626
4edb1e84 6627 # Next, try to find iconv in libc.
6c7a06a3 6628 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6630/* end confdefs.h. */
6c7a06a3
TT
6631#include <stdlib.h>
6632#include <iconv.h>
d542061a
UW
6633int
6634main ()
6635{
6c7a06a3
TT
6636iconv_t cd = iconv_open("","");
6637 iconv(cd,NULL,NULL,NULL,NULL);
6638 iconv_close(cd);
d542061a
UW
6639 ;
6640 return 0;
6641}
6642_ACEOF
81ecdfbb 6643if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6644 am_cv_func_iconv=yes
d542061a 6645fi
81ecdfbb
RW
6646rm -f core conftest.err conftest.$ac_objext \
6647 conftest$ac_exeext conftest.$ac_ext
77f120bf 6648 fi
94ae1714 6649
4edb1e84
JB
6650 # If iconv was not in libc, try -liconv. In this case, arrange to
6651 # look in the libiconv prefix, if it was specified by the user.
6652 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6653 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6654 am_save_LIBS="$LIBS"
6655 if test -n "$LIBICONV_INCLUDE"; then
6656 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6657 LIBS="$LIBS $LIBICONV_LIBDIR"
6658 fi
6659 LIBS="$LIBS -liconv"
81ecdfbb 6660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6661/* end confdefs.h. */
6c7a06a3
TT
6662#include <stdlib.h>
6663#include <iconv.h>
bec39cab
AC
6664int
6665main ()
6666{
6c7a06a3
TT
6667iconv_t cd = iconv_open("","");
6668 iconv(cd,NULL,NULL,NULL,NULL);
6669 iconv_close(cd);
bec39cab
AC
6670 ;
6671 return 0;
6672}
6673_ACEOF
81ecdfbb 6674if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6675 am_cv_lib_iconv=yes
6c7a06a3 6676 am_cv_func_iconv=yes
627af7ea 6677fi
81ecdfbb
RW
6678rm -f core conftest.err conftest.$ac_objext \
6679 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6680 LIBS="$am_save_LIBS"
fc3b640d 6681 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6682 fi
6683
6684fi
81ecdfbb
RW
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6686$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6687
6688 # Set the various flags based on the cache variables. We can't rely
6689 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6690 LIBICONV=
6691 if test "$am_cv_lib_iconv" = yes; then
6692 LIBICONV="-liconv"
94ae1714
TT
6693 else
6694 LIBICONV_LIBDIR=
6695 LIBICONV_INCLUDE=
fc3b640d
TT
6696 fi
6697 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6698 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6699 LIBICONV_LIBDIR=""
fc3b640d
TT
6700 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6701 fi
6702 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6703 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6704
6c7a06a3
TT
6705 if test "$am_cv_func_iconv" = yes; then
6706
81ecdfbb 6707$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6708
81ecdfbb
RW
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6710$as_echo_n "checking for iconv declaration... " >&6; }
6711 if test "${am_cv_proto_iconv+set}" = set; then :
6712 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6713else
6714
81ecdfbb 6715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6716/* end confdefs.h. */
6717
6c7a06a3
TT
6718#include <stdlib.h>
6719#include <iconv.h>
6720extern
b4e70030 6721#ifdef __cplusplus
6c7a06a3 6722"C"
b4e70030 6723#endif
6c7a06a3
TT
6724#if defined(__STDC__) || defined(__cplusplus)
6725size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6726#else
6727size_t iconv();
6728#endif
6729
b4e70030
JB
6730int
6731main ()
6732{
6c7a06a3 6733
b4e70030
JB
6734 ;
6735 return 0;
6736}
6737_ACEOF
81ecdfbb 6738if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6739 am_cv_proto_iconv_arg1=""
4e8d927d 6740else
81ecdfbb 6741 am_cv_proto_iconv_arg1="const"
b4e70030 6742fi
81ecdfbb 6743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6744 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);"
6745fi
6746
6747 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6749 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6750$as_echo "${ac_t:-
6751 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6752
6753cat >>confdefs.h <<_ACEOF
6754#define ICONV_CONST $am_cv_proto_iconv_arg1
6755_ACEOF
6756
6757 fi
6c7a06a3
TT
6758
6759
478aac75
DE
6760# GDB may fork/exec the iconv program to get the list of supported character
6761# sets. Allow the user to specify where to find it.
6762# There are several factors affecting the choice of option name:
6763# - There is already --with-libiconv-prefix but we can't use it, it specifies
6764# the build-time location of libiconv files.
6765# - The program we need to find is iconv, which comes with glibc. The user
6766# doesn't necessarily have libiconv installed. Therefore naming this
6767# --with-libiconv-foo feels wrong.
6768# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6769# defined to work on directories not files (though it really doesn't know
6770# the difference).
6771# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6772# with --with-libiconv-prefix.
6773# Putting these together is why the option name is --with-iconv-bin.
6774
6775
6776# Check whether --with-iconv-bin was given.
6777if test "${with_iconv_bin+set}" = set; then :
6778 withval=$with_iconv_bin; iconv_bin="${withval}"
6779
6780cat >>confdefs.h <<_ACEOF
6781#define ICONV_BIN "${iconv_bin}"
6782_ACEOF
6783
6784
6785 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6786 if test "x$prefix" = xNONE; then
6787 test_prefix=/usr/local
6788 else
6789 test_prefix=$prefix
6790 fi
6791 else
6792 test_prefix=$exec_prefix
6793 fi
6794 value=0
6795 case ${iconv_bin} in
6796 "${test_prefix}"|"${test_prefix}/"*|\
6797 '${exec_prefix}'|'${exec_prefix}/'*)
6798 value=1
6799 ;;
6800 esac
6801
6802cat >>confdefs.h <<_ACEOF
6803#define ICONV_BIN_RELOCATABLE $value
6804_ACEOF
6805
6806
6807
6808fi
6809
6810
6c7a06a3
TT
6811# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6812# There is a very specific comment in /usr/include/curses.h explaining that
6813# termcap routines built into libcurses must not be used.
6814#
6815# The symptoms we observed so far is GDB unexpectedly changing
6816# the terminal settings when tgetent is called - this is particularly
6817# visible as the output is missing carriage returns, and so rapidly
6818# becomes very hard to read.
6819#
6820# The readline configure script has already decided that libtermcap
6821# was enough for its purposes, and so decided to build readline using
6822# libtermcap. Since the TUI mode requires curses, building GDB with
6823# TUI enabled results in both libraries to be used at the same time,
6824# which is not allowed. This basically means that GDB with TUI is
6825# broken on alpha-osf.
6826
6827case $host_os in
6bcc772d
RO
6828 osf* )
6829 if test x"$enable_tui" = xyes; then
81ecdfbb 6830 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6831 fi
6bcc772d 6832 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6833 enable_tui=no
6834 fi
6835 ;;
6836esac
6837
cb01cfba 6838# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6839if test x"$enable_tui" != xno; then
cb01cfba
JB
6840 prefer_curses=yes
6841fi
6842
6843curses_found=no
6844if test x"$prefer_curses" = xyes; then
6845 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6846 # curses library because the latter might not provide all the
6847 # functionality we need. However, this leads to problems on systems
6848 # where the linker searches /usr/local/lib, but the compiler doesn't
6849 # search /usr/local/include, if ncurses is installed in /usr/local. A
6850 # default installation of ncurses on alpha*-dec-osf* will lead to such
6851 # a situation.
81ecdfbb
RW
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6853$as_echo_n "checking for library containing waddstr... " >&6; }
6854if test "${ac_cv_search_waddstr+set}" = set; then :
6855 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6856else
6857 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6859/* end confdefs.h. */
6860
81ecdfbb
RW
6861/* Override any GCC internal prototype to avoid an error.
6862 Use char because int might match the return type of a GCC
6863 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6864#ifdef __cplusplus
6865extern "C"
6866#endif
6c7a06a3
TT
6867char waddstr ();
6868int
6869main ()
6870{
81ecdfbb 6871return waddstr ();
6c7a06a3
TT
6872 ;
6873 return 0;
6874}
6875_ACEOF
81ecdfbb
RW
6876for ac_lib in '' ncurses cursesX curses; do
6877 if test -z "$ac_lib"; then
6878 ac_res="none required"
6879 else
6880 ac_res=-l$ac_lib
6881 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6882 fi
6883 if ac_fn_c_try_link "$LINENO"; then :
6884 ac_cv_search_waddstr=$ac_res
6885fi
6886rm -f core conftest.err conftest.$ac_objext \
6887 conftest$ac_exeext
6888 if test "${ac_cv_search_waddstr+set}" = set; then :
6889 break
6890fi
6891done
6892if test "${ac_cv_search_waddstr+set}" = set; then :
6893
6c7a06a3 6894else
81ecdfbb
RW
6895 ac_cv_search_waddstr=no
6896fi
6897rm conftest.$ac_ext
6898LIBS=$ac_func_search_save_LIBS
6899fi
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6901$as_echo "$ac_cv_search_waddstr" >&6; }
6902ac_res=$ac_cv_search_waddstr
6903if test "$ac_res" != no; then :
6904 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6905
6906fi
6907
6908
cb01cfba
JB
6909 if test "$ac_cv_search_waddstr" != no; then
6910 curses_found=yes
6911 fi
6912fi
6913
6914# Check whether we should enable the TUI, but only do so if we really
6915# can.
6916if test x"$enable_tui" != xno; then
6917 if test -d $srcdir/tui; then
6918 if test "$curses_found" != no; then
6c7a06a3
TT
6919 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6920 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6921 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6922 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6923 else
6924 if test x"$enable_tui" = xyes; then
81ecdfbb 6925 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6926 else
81ecdfbb
RW
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6928$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6929 fi
6930 fi
6931 fi
6932fi
6933
6934# Since GDB uses Readline, we need termcap functionality. In many
6935# cases this will be provided by the curses library, but some systems
6936# have a seperate termcap library, or no curses library at all.
6937
6938case $host_os in
6939 cygwin*)
6940 if test -d $srcdir/libtermcap; then
6941 LIBS="../libtermcap/libtermcap.a $LIBS"
6942 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6943 fi ;;
6944 go32* | *djgpp*)
6945 ac_cv_search_tgetent="none required"
6946 ;;
6947 *mingw32*)
6948 ac_cv_search_tgetent="none required"
6949 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6950 ;;
6951esac
6952
6953# These are the libraries checked by Readline.
81ecdfbb
RW
6954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6955$as_echo_n "checking for library containing tgetent... " >&6; }
6956if test "${ac_cv_search_tgetent+set}" = set; then :
6957 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6958else
6959 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6961/* end confdefs.h. */
6962
81ecdfbb
RW
6963/* Override any GCC internal prototype to avoid an error.
6964 Use char because int might match the return type of a GCC
6965 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6966#ifdef __cplusplus
6967extern "C"
6968#endif
6c7a06a3
TT
6969char tgetent ();
6970int
6971main ()
6972{
81ecdfbb 6973return tgetent ();
6c7a06a3
TT
6974 ;
6975 return 0;
6976}
6977_ACEOF
81ecdfbb
RW
6978for ac_lib in '' termcap tinfo curses ncurses; do
6979 if test -z "$ac_lib"; then
6980 ac_res="none required"
6981 else
6982 ac_res=-l$ac_lib
6c7a06a3 6983 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6984 fi
6985 if ac_fn_c_try_link "$LINENO"; then :
6986 ac_cv_search_tgetent=$ac_res
6987fi
6988rm -f core conftest.err conftest.$ac_objext \
6989 conftest$ac_exeext
6990 if test "${ac_cv_search_tgetent+set}" = set; then :
6991 break
6992fi
6993done
6994if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 6995
6c7a06a3 6996else
81ecdfbb 6997 ac_cv_search_tgetent=no
6c7a06a3 6998fi
81ecdfbb 6999rm conftest.$ac_ext
6c7a06a3
TT
7000LIBS=$ac_func_search_save_LIBS
7001fi
81ecdfbb
RW
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7003$as_echo "$ac_cv_search_tgetent" >&6; }
7004ac_res=$ac_cv_search_tgetent
7005if test "$ac_res" != no; then :
7006 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7007
06825bd1
MK
7008fi
7009
06825bd1 7010
bec39cab 7011if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7012 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7013fi
7014
3841debe 7015
81ecdfbb
RW
7016# Check whether --with-system-readline was given.
7017if test "${with_system_readline+set}" = set; then :
7018 withval=$with_system_readline;
7019fi
6a30b0a5 7020
6a30b0a5
AS
7021
7022if test "$with_system_readline" = yes; then
7023 READLINE=-lreadline
7024 READLINE_DEPS=
7025 READLINE_CFLAGS=
39037522 7026 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7027else
7028 READLINE='$(READLINE_DIR)/libreadline.a'
7029 READLINE_DEPS='$(READLINE)'
7030 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7031 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7032fi
7033
7034
7035
7036
7037
f997c383
SD
7038# Generate jit-reader.h
7039
7040# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7041TARGET_PTR=
7042
7043# The cast to long int works around a bug in the HP C Compiler
7044# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7045# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7046# This bug is HP SR number 8606223364.
7047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7048$as_echo_n "checking size of unsigned long long... " >&6; }
7049if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7050 $as_echo_n "(cached) " >&6
7051else
7052 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7053
7054else
7055 if test "$ac_cv_type_unsigned_long_long" = yes; then
7056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7058{ as_fn_set_status 77
7059as_fn_error "cannot compute sizeof (unsigned long long)
7060See \`config.log' for more details." "$LINENO" 5; }; }
7061 else
7062 ac_cv_sizeof_unsigned_long_long=0
7063 fi
7064fi
7065
7066fi
7067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7068$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7069
7070
7071
7072cat >>confdefs.h <<_ACEOF
7073#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7074_ACEOF
7075
7076
7077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
7081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7082$as_echo_n "checking size of unsigned long... " >&6; }
7083if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7084 $as_echo_n "(cached) " >&6
7085else
7086 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7087
7088else
7089 if test "$ac_cv_type_unsigned_long" = yes; then
7090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7092{ as_fn_set_status 77
7093as_fn_error "cannot compute sizeof (unsigned long)
7094See \`config.log' for more details." "$LINENO" 5; }; }
7095 else
7096 ac_cv_sizeof_unsigned_long=0
7097 fi
7098fi
7099
7100fi
7101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7102$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7103
7104
7105
7106cat >>confdefs.h <<_ACEOF
7107#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7108_ACEOF
7109
7110
7111# The cast to long int works around a bug in the HP C Compiler
7112# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7113# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7114# This bug is HP SR number 8606223364.
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7116$as_echo_n "checking size of unsigned __int128... " >&6; }
7117if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7118 $as_echo_n "(cached) " >&6
7119else
7120 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7121
7122else
7123 if test "$ac_cv_type_unsigned___int128" = yes; then
7124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7126{ as_fn_set_status 77
7127as_fn_error "cannot compute sizeof (unsigned __int128)
7128See \`config.log' for more details." "$LINENO" 5; }; }
7129 else
7130 ac_cv_sizeof_unsigned___int128=0
7131 fi
7132fi
7133
7134fi
7135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7136$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7137
7138
7139
7140cat >>confdefs.h <<_ACEOF
7141#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7142_ACEOF
7143
7144
7145
7146if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7147 TARGET_PTR="unsigned long"
7148elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7149 TARGET_PTR="unsigned long long"
7150elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7151 TARGET_PTR="unsigned __int128"
7152else
7153 TARGET_PTR="unsigned long"
7154fi
7155
7156
7157ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7158
7159
a2d08b9e
SD
7160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7161$as_echo_n "checking for library containing dlopen... " >&6; }
7162if test "${ac_cv_search_dlopen+set}" = set; then :
7163 $as_echo_n "(cached) " >&6
7164else
7165 ac_func_search_save_LIBS=$LIBS
7166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7167/* end confdefs.h. */
7168
7169/* Override any GCC internal prototype to avoid an error.
7170 Use char because int might match the return type of a GCC
7171 builtin and then its argument prototype would still apply. */
7172#ifdef __cplusplus
7173extern "C"
7174#endif
7175char dlopen ();
7176int
7177main ()
7178{
7179return dlopen ();
7180 ;
7181 return 0;
7182}
7183_ACEOF
7184for ac_lib in '' dl; do
7185 if test -z "$ac_lib"; then
7186 ac_res="none required"
7187 else
7188 ac_res=-l$ac_lib
7189 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7190 fi
7191 if ac_fn_c_try_link "$LINENO"; then :
7192 ac_cv_search_dlopen=$ac_res
7193fi
7194rm -f core conftest.err conftest.$ac_objext \
7195 conftest$ac_exeext
7196 if test "${ac_cv_search_dlopen+set}" = set; then :
7197 break
7198fi
7199done
7200if test "${ac_cv_search_dlopen+set}" = set; then :
7201
7202else
7203 ac_cv_search_dlopen=no
7204fi
7205rm conftest.$ac_ext
7206LIBS=$ac_func_search_save_LIBS
7207fi
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7209$as_echo "$ac_cv_search_dlopen" >&6; }
7210ac_res=$ac_cv_search_dlopen
7211if test "$ac_res" != no; then :
7212 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7213
7214fi
7215
7216
39037522 7217
b8e0a31c
SD
7218
7219# Check whether --with-jit-reader-dir was given.
7220if test "${with_jit_reader_dir+set}" = set; then :
7221 withval=$with_jit_reader_dir;
7222 JIT_READER_DIR=$withval
7223else
7224 JIT_READER_DIR=${libdir}/gdb
7225fi
7226
7227
7228 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7229 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7230 ac_define_dir=`eval echo $JIT_READER_DIR`
7231 ac_define_dir=`eval echo $ac_define_dir`
7232
7233cat >>confdefs.h <<_ACEOF
7234#define JIT_READER_DIR "$ac_define_dir"
7235_ACEOF
7236
7237
7238
7239
7240 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7241 if test "x$prefix" = xNONE; then
7242 test_prefix=/usr/local
7243 else
7244 test_prefix=$prefix
7245 fi
7246 else
7247 test_prefix=$exec_prefix
7248 fi
7249 value=0
7250 case ${ac_define_dir} in
7251 "${test_prefix}"|"${test_prefix}/"*|\
7252 '${exec_prefix}'|'${exec_prefix}/'*)
7253 value=1
7254 ;;
7255 esac
7256
7257cat >>confdefs.h <<_ACEOF
7258#define JIT_READER_DIR_RELOCATABLE $value
7259_ACEOF
7260
7261
7262
7263
7264
81ecdfbb
RW
7265# Check whether --with-expat was given.
7266if test "${with_expat+set}" = set; then :
7267 withval=$with_expat;
5c39566f
DJ
7268else
7269 with_expat=auto
81ecdfbb
RW
7270fi
7271
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7273$as_echo_n "checking whether to use expat... " >&6; }
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7275$as_echo "$with_expat" >&6; }
5c39566f
DJ
7276
7277if test "${with_expat}" = no; then
81ecdfbb
RW
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7279$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7280 HAVE_LIBEXPAT=no
7281else
7282
3841debe
DJ
7283 if test "X$prefix" = "XNONE"; then
7284 acl_final_prefix="$ac_default_prefix"
7285 else
7286 acl_final_prefix="$prefix"
7287 fi
7288 if test "X$exec_prefix" = "XNONE"; then
7289 acl_final_exec_prefix='${prefix}'
7290 else
7291 acl_final_exec_prefix="$exec_prefix"
7292 fi
7293 acl_save_prefix="$prefix"
7294 prefix="$acl_final_prefix"
7295 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7296 prefix="$acl_save_prefix"
7297
7298
81ecdfbb
RW
7299# Check whether --with-gnu-ld was given.
7300if test "${with_gnu_ld+set}" = set; then :
7301 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7302else
7303 with_gnu_ld=no
81ecdfbb
RW
7304fi
7305
3841debe
DJ
7306# Prepare PATH_SEPARATOR.
7307# The user is always right.
7308if test "${PATH_SEPARATOR+set}" != set; then
7309 echo "#! /bin/sh" >conf$$.sh
7310 echo "exit 0" >>conf$$.sh
7311 chmod +x conf$$.sh
7312 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7313 PATH_SEPARATOR=';'
7314 else
7315 PATH_SEPARATOR=:
7316 fi
7317 rm -f conf$$.sh
7318fi
7319ac_prog=ld
7320if test "$GCC" = yes; then
7321 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7323$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7324 case $host in
7325 *-*-mingw*)
7326 # gcc leaves a trailing carriage return which upsets mingw
7327 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7328 *)
7329 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7330 esac
7331 case $ac_prog in
7332 # Accept absolute paths.
7333 [\\/]* | [A-Za-z]:[\\/]*)
7334 re_direlt='/[^/][^/]*/\.\./'
7335 # Canonicalize the path of ld
7336 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7337 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7338 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7339 done
7340 test -z "$LD" && LD="$ac_prog"
7341 ;;
7342 "")
7343 # If it fails, then pretend we aren't using GCC.
7344 ac_prog=ld
7345 ;;
7346 *)
7347 # If it is relative, then search for the first ld in PATH.
7348 with_gnu_ld=unknown
7349 ;;
7350 esac
7351elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7353$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7354else
81ecdfbb
RW
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7356$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7357fi
81ecdfbb
RW
7358if test "${acl_cv_path_LD+set}" = set; then :
7359 $as_echo_n "(cached) " >&6
3841debe
DJ
7360else
7361 if test -z "$LD"; then
7362 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7363 for ac_dir in $PATH; do
7364 test -z "$ac_dir" && ac_dir=.
7365 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7366 acl_cv_path_LD="$ac_dir/$ac_prog"
7367 # Check to see if the program is GNU ld. I'd rather use --version,
7368 # but apparently some GNU ld's only accept -v.
7369 # Break only if it was the GNU/non-GNU ld that we prefer.
7370 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7371 test "$with_gnu_ld" != no && break
7372 else
7373 test "$with_gnu_ld" != yes && break
7374 fi
7375 fi
7376 done
7377 IFS="$ac_save_ifs"
7378else
7379 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7380fi
7381fi
7382
7383LD="$acl_cv_path_LD"
7384if test -n "$LD"; then
81ecdfbb
RW
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7386$as_echo "$LD" >&6; }
3841debe 7387else
81ecdfbb
RW
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389$as_echo "no" >&6; }
3841debe 7390fi
81ecdfbb
RW
7391test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7393$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7394if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7395 $as_echo_n "(cached) " >&6
3841debe
DJ
7396else
7397 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7398if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7399 acl_cv_prog_gnu_ld=yes
7400else
7401 acl_cv_prog_gnu_ld=no
7402fi
7403fi
81ecdfbb
RW
7404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7405$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7406with_gnu_ld=$acl_cv_prog_gnu_ld
7407
7408
7409
81ecdfbb
RW
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7411$as_echo_n "checking for shared library run path origin... " >&6; }
7412if test "${acl_cv_rpath+set}" = set; then :
7413 $as_echo_n "(cached) " >&6
3841debe
DJ
7414else
7415
7416 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7417 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7418 . ./conftest.sh
7419 rm -f ./conftest.sh
7420 acl_cv_rpath=done
7421
7422fi
81ecdfbb
RW
7423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7424$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7425 wl="$acl_cv_wl"
7426 libext="$acl_cv_libext"
7427 shlibext="$acl_cv_shlibext"
7428 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7429 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7430 hardcode_direct="$acl_cv_hardcode_direct"
7431 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7432 # Check whether --enable-rpath was given.
7433if test "${enable_rpath+set}" = set; then :
7434 enableval=$enable_rpath; :
3841debe
DJ
7435else
7436 enable_rpath=yes
81ecdfbb
RW
7437fi
7438
3841debe
DJ
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448 use_additional=yes
7449
7450 acl_save_prefix="$prefix"
7451 prefix="$acl_final_prefix"
7452 acl_save_exec_prefix="$exec_prefix"
7453 exec_prefix="$acl_final_exec_prefix"
7454
7455 eval additional_includedir=\"$includedir\"
7456 eval additional_libdir=\"$libdir\"
7457
7458 exec_prefix="$acl_save_exec_prefix"
7459 prefix="$acl_save_prefix"
7460
7461
81ecdfbb
RW
7462# Check whether --with-libexpat-prefix was given.
7463if test "${with_libexpat_prefix+set}" = set; then :
7464 withval=$with_libexpat_prefix;
3841debe
DJ
7465 if test "X$withval" = "Xno"; then
7466 use_additional=no
7467 else
7468 if test "X$withval" = "X"; then
7469
7470 acl_save_prefix="$prefix"
7471 prefix="$acl_final_prefix"
7472 acl_save_exec_prefix="$exec_prefix"
7473 exec_prefix="$acl_final_exec_prefix"
7474
7475 eval additional_includedir=\"$includedir\"
7476 eval additional_libdir=\"$libdir\"
7477
7478 exec_prefix="$acl_save_exec_prefix"
7479 prefix="$acl_save_prefix"
7480
7481 else
7482 additional_includedir="$withval/include"
7483 additional_libdir="$withval/lib"
7484 fi
7485 fi
7486
81ecdfbb
RW
7487fi
7488
3841debe
DJ
7489 LIBEXPAT=
7490 LTLIBEXPAT=
7491 INCEXPAT=
7492 rpathdirs=
7493 ltrpathdirs=
7494 names_already_handled=
7495 names_next_round='expat '
7496 while test -n "$names_next_round"; do
7497 names_this_round="$names_next_round"
7498 names_next_round=
7499 for name in $names_this_round; do
7500 already_handled=
7501 for n in $names_already_handled; do
7502 if test "$n" = "$name"; then
7503 already_handled=yes
7504 break
7505 fi
7506 done
7507 if test -z "$already_handled"; then
7508 names_already_handled="$names_already_handled $name"
7509 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7510 eval value=\"\$HAVE_LIB$uppername\"
7511 if test -n "$value"; then
7512 if test "$value" = yes; then
7513 eval value=\"\$LIB$uppername\"
7514 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7515 eval value=\"\$LTLIB$uppername\"
7516 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7517 else
7518 :
7519 fi
7520 else
7521 found_dir=
7522 found_la=
7523 found_so=
7524 found_a=
7525 if test $use_additional = yes; then
7526 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7527 found_dir="$additional_libdir"
7528 found_so="$additional_libdir/lib$name.$shlibext"
7529 if test -f "$additional_libdir/lib$name.la"; then
7530 found_la="$additional_libdir/lib$name.la"
7531 fi
7532 else
7533 if test -f "$additional_libdir/lib$name.$libext"; then
7534 found_dir="$additional_libdir"
7535 found_a="$additional_libdir/lib$name.$libext"
7536 if test -f "$additional_libdir/lib$name.la"; then
7537 found_la="$additional_libdir/lib$name.la"
7538 fi
7539 fi
7540 fi
7541 fi
7542 if test "X$found_dir" = "X"; then
7543 for x in $LDFLAGS $LTLIBEXPAT; do
7544
7545 acl_save_prefix="$prefix"
7546 prefix="$acl_final_prefix"
7547 acl_save_exec_prefix="$exec_prefix"
7548 exec_prefix="$acl_final_exec_prefix"
7549 eval x=\"$x\"
7550 exec_prefix="$acl_save_exec_prefix"
7551 prefix="$acl_save_prefix"
7552
7553 case "$x" in
7554 -L*)
7555 dir=`echo "X$x" | sed -e 's/^X-L//'`
7556 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7557 found_dir="$dir"
7558 found_so="$dir/lib$name.$shlibext"
7559 if test -f "$dir/lib$name.la"; then
7560 found_la="$dir/lib$name.la"
7561 fi
7562 else
7563 if test -f "$dir/lib$name.$libext"; then
7564 found_dir="$dir"
7565 found_a="$dir/lib$name.$libext"
7566 if test -f "$dir/lib$name.la"; then
7567 found_la="$dir/lib$name.la"
7568 fi
7569 fi
7570 fi
7571 ;;
7572 esac
7573 if test "X$found_dir" != "X"; then
7574 break
7575 fi
7576 done
7577 fi
7578 if test "X$found_dir" != "X"; then
7579 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7580 if test "X$found_so" != "X"; then
7581 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7582 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7583 else
7584 haveit=
7585 for x in $ltrpathdirs; do
7586 if test "X$x" = "X$found_dir"; then
7587 haveit=yes
7588 break
7589 fi
7590 done
7591 if test -z "$haveit"; then
7592 ltrpathdirs="$ltrpathdirs $found_dir"
7593 fi
7594 if test "$hardcode_direct" = yes; then
7595 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7596 else
7597 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7598 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7599 haveit=
7600 for x in $rpathdirs; do
7601 if test "X$x" = "X$found_dir"; then
7602 haveit=yes
7603 break
7604 fi
7605 done
7606 if test -z "$haveit"; then
7607 rpathdirs="$rpathdirs $found_dir"
7608 fi
7609 else
7610 haveit=
7611 for x in $LDFLAGS $LIBEXPAT; do
7612
7613 acl_save_prefix="$prefix"
7614 prefix="$acl_final_prefix"
7615 acl_save_exec_prefix="$exec_prefix"
7616 exec_prefix="$acl_final_exec_prefix"
7617 eval x=\"$x\"
7618 exec_prefix="$acl_save_exec_prefix"
7619 prefix="$acl_save_prefix"
7620
7621 if test "X$x" = "X-L$found_dir"; then
7622 haveit=yes
7623 break
7624 fi
7625 done
7626 if test -z "$haveit"; then
7627 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7628 fi
7629 if test "$hardcode_minus_L" != no; then
7630 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7631 else
7632 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7633 fi
7634 fi
7635 fi
7636 fi
7637 else
7638 if test "X$found_a" != "X"; then
7639 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7640 else
7641 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7642 fi
7643 fi
7644 additional_includedir=
7645 case "$found_dir" in
7646 */lib | */lib/)
7647 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7648 additional_includedir="$basedir/include"
7649 ;;
7650 esac
7651 if test "X$additional_includedir" != "X"; then
7652 if test "X$additional_includedir" != "X/usr/include"; then
7653 haveit=
7654 if test "X$additional_includedir" = "X/usr/local/include"; then
7655 if test -n "$GCC"; then
7656 case $host_os in
7657 linux*) haveit=yes;;
7658 esac
7659 fi
7660 fi
7661 if test -z "$haveit"; then
7662 for x in $CPPFLAGS $INCEXPAT; do
7663
7664 acl_save_prefix="$prefix"
7665 prefix="$acl_final_prefix"
7666 acl_save_exec_prefix="$exec_prefix"
7667 exec_prefix="$acl_final_exec_prefix"
7668 eval x=\"$x\"
7669 exec_prefix="$acl_save_exec_prefix"
7670 prefix="$acl_save_prefix"
7671
7672 if test "X$x" = "X-I$additional_includedir"; then
7673 haveit=yes
7674 break
7675 fi
7676 done
7677 if test -z "$haveit"; then
7678 if test -d "$additional_includedir"; then
7679 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7680 fi
7681 fi
7682 fi
7683 fi
7684 fi
7685 if test -n "$found_la"; then
7686 save_libdir="$libdir"
7687 case "$found_la" in
7688 */* | *\\*) . "$found_la" ;;
7689 *) . "./$found_la" ;;
7690 esac
7691 libdir="$save_libdir"
7692 for dep in $dependency_libs; do
7693 case "$dep" in
7694 -L*)
7695 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7696 if test "X$additional_libdir" != "X/usr/lib"; then
7697 haveit=
7698 if test "X$additional_libdir" = "X/usr/local/lib"; then
7699 if test -n "$GCC"; then
7700 case $host_os in
7701 linux*) haveit=yes;;
7702 esac
7703 fi
7704 fi
7705 if test -z "$haveit"; then
7706 haveit=
7707 for x in $LDFLAGS $LIBEXPAT; do
7708
7709 acl_save_prefix="$prefix"
7710 prefix="$acl_final_prefix"
7711 acl_save_exec_prefix="$exec_prefix"
7712 exec_prefix="$acl_final_exec_prefix"
7713 eval x=\"$x\"
7714 exec_prefix="$acl_save_exec_prefix"
7715 prefix="$acl_save_prefix"
7716
7717 if test "X$x" = "X-L$additional_libdir"; then
7718 haveit=yes
7719 break
7720 fi
7721 done
7722 if test -z "$haveit"; then
7723 if test -d "$additional_libdir"; then
7724 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7725 fi
7726 fi
7727 haveit=
7728 for x in $LDFLAGS $LTLIBEXPAT; do
7729
7730 acl_save_prefix="$prefix"
7731 prefix="$acl_final_prefix"
7732 acl_save_exec_prefix="$exec_prefix"
7733 exec_prefix="$acl_final_exec_prefix"
7734 eval x=\"$x\"
7735 exec_prefix="$acl_save_exec_prefix"
7736 prefix="$acl_save_prefix"
7737
7738 if test "X$x" = "X-L$additional_libdir"; then
7739 haveit=yes
7740 break
7741 fi
7742 done
7743 if test -z "$haveit"; then
7744 if test -d "$additional_libdir"; then
7745 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7746 fi
7747 fi
7748 fi
7749 fi
7750 ;;
7751 -R*)
7752 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7753 if test "$enable_rpath" != no; then
7754 haveit=
7755 for x in $rpathdirs; do
7756 if test "X$x" = "X$dir"; then
7757 haveit=yes
7758 break
7759 fi
7760 done
7761 if test -z "$haveit"; then
7762 rpathdirs="$rpathdirs $dir"
7763 fi
7764 haveit=
7765 for x in $ltrpathdirs; do
7766 if test "X$x" = "X$dir"; then
7767 haveit=yes
7768 break
7769 fi
7770 done
7771 if test -z "$haveit"; then
7772 ltrpathdirs="$ltrpathdirs $dir"
7773 fi
7774 fi
7775 ;;
7776 -l*)
7777 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7778 ;;
7779 *.la)
7780 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7781 ;;
7782 *)
7783 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7784 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7785 ;;
81ecdfbb
RW
7786 esac
7787 done
7788 fi
7789 else
7790 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7791 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7792 fi
7793 fi
7794 fi
7795 done
7796 done
7797 if test "X$rpathdirs" != "X"; then
7798 if test -n "$hardcode_libdir_separator"; then
7799 alldirs=
7800 for found_dir in $rpathdirs; do
7801 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7802 done
7803 acl_save_libdir="$libdir"
7804 libdir="$alldirs"
7805 eval flag=\"$hardcode_libdir_flag_spec\"
7806 libdir="$acl_save_libdir"
7807 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7808 else
7809 for found_dir in $rpathdirs; do
7810 acl_save_libdir="$libdir"
7811 libdir="$found_dir"
7812 eval flag=\"$hardcode_libdir_flag_spec\"
7813 libdir="$acl_save_libdir"
7814 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7815 done
7816 fi
7817 fi
7818 if test "X$ltrpathdirs" != "X"; then
7819 for found_dir in $ltrpathdirs; do
7820 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7821 done
7822 fi
a9322a30
TT
7823
7824
81ecdfbb 7825 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7826
81ecdfbb
RW
7827 for element in $INCEXPAT; do
7828 haveit=
7829 for x in $CPPFLAGS; do
a9322a30 7830
81ecdfbb
RW
7831 acl_save_prefix="$prefix"
7832 prefix="$acl_final_prefix"
7833 acl_save_exec_prefix="$exec_prefix"
7834 exec_prefix="$acl_final_exec_prefix"
7835 eval x=\"$x\"
7836 exec_prefix="$acl_save_exec_prefix"
7837 prefix="$acl_save_prefix"
a8111142 7838
81ecdfbb
RW
7839 if test "X$x" = "X$element"; then
7840 haveit=yes
7841 break
7842 fi
7843 done
7844 if test -z "$haveit"; then
7845 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7846 fi
7847 done
a9322a30
TT
7848
7849
81ecdfbb
RW
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7851$as_echo_n "checking for libexpat... " >&6; }
7852if test "${ac_cv_libexpat+set}" = set; then :
7853 $as_echo_n "(cached) " >&6
bec39cab 7854else
bec39cab 7855
81ecdfbb
RW
7856 ac_save_LIBS="$LIBS"
7857 LIBS="$LIBS $LIBEXPAT"
7858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7859/* end confdefs.h. */
81ecdfbb
RW
7860#include "expat.h"
7861int
7862main ()
7863{
7864XML_Parser p = XML_ParserCreate (0);
7865 ;
7866 return 0;
7867}
bec39cab 7868_ACEOF
81ecdfbb
RW
7869if ac_fn_c_try_link "$LINENO"; then :
7870 ac_cv_libexpat=yes
c906108c 7871else
81ecdfbb 7872 ac_cv_libexpat=no
bec39cab 7873fi
81ecdfbb
RW
7874rm -f core conftest.err conftest.$ac_objext \
7875 conftest$ac_exeext conftest.$ac_ext
7876 LIBS="$ac_save_LIBS"
c906108c 7877
95ca63c4 7878fi
81ecdfbb
RW
7879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7880$as_echo "$ac_cv_libexpat" >&6; }
7881 if test "$ac_cv_libexpat" = yes; then
7882 HAVE_LIBEXPAT=yes
bec39cab 7883
81ecdfbb 7884$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7885
81ecdfbb
RW
7886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7887$as_echo_n "checking how to link with libexpat... " >&6; }
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7889$as_echo "$LIBEXPAT" >&6; }
7890 else
7891 HAVE_LIBEXPAT=no
7892 CPPFLAGS="$ac_save_CPPFLAGS"
7893 LIBEXPAT=
7894 LTLIBEXPAT=
7895 fi
95ca63c4
CF
7896
7897
7898
7cb9022a
MK
7899
7900
bec39cab 7901
81ecdfbb
RW
7902 if test "$HAVE_LIBEXPAT" != yes; then
7903 if test "$with_expat" = yes; then
7904 as_fn_error "expat is missing or unusable" "$LINENO" 5
7905 else
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7907$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7908 fi
7909 else
7910 save_LIBS=$LIBS
7911 LIBS="$LIBS $LIBEXPAT"
7912 for ac_func in XML_StopParser
7913do :
7914 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7915if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7916 cat >>confdefs.h <<_ACEOF
81ecdfbb 7917#define HAVE_XML_STOPPARSER 1
bec39cab 7918_ACEOF
95ca63c4 7919
bec39cab 7920fi
bec39cab 7921done
95ca63c4 7922
81ecdfbb
RW
7923 LIBS=$save_LIBS
7924 fi
a9322a30
TT
7925fi
7926
a9322a30 7927
a9322a30
TT
7928
7929
ec685c5e 7930
0c4a4063 7931
81ecdfbb
RW
7932# Check whether --with-python was given.
7933if test "${with_python+set}" = set; then :
7934 withval=$with_python;
bec39cab 7935else
81ecdfbb 7936 with_python=auto
bec39cab 7937fi
bec39cab 7938
81ecdfbb
RW
7939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7940$as_echo_n "checking whether to use python... " >&6; }
7941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7942$as_echo "$with_python" >&6; }
9a156167 7943
81ecdfbb
RW
7944if test "${with_python}" = no; then
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7946$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7947 have_libpython=no
bec39cab 7948else
81ecdfbb 7949 case "${with_python}" in
8c85a4e2 7950 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7951 if test -d ${with_python}; then
7952 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7953 python_prog="${with_python}/bin/python"
0c4a4063 7954 python_prefix=
9c4ea6c5
JB
7955 # If python does not exit ${with_python}/bin, then try in
7956 # ${with_python}. On Windows/MinGW, this is where the Python
7957 # executable is.
7958 if test ! -x "${python_prog}"; then
7959 python_prog="${with_python}/python"
7960 python_prefix=
7961 fi
e7a30f46 7962 if test ! -x "${python_prog}"; then
ec685c5e
DE
7963 # Fall back to gdb 7.0/7.1 behaviour.
7964 python_prog=missing
0c4a4063 7965 python_prefix=${with_python}
ec685c5e 7966 fi
e7a30f46 7967 elif test -x "${with_python}"; then
ec685c5e
DE
7968 # While we can't run python compiled for $host (unless host == build),
7969 # the user could write a script that provides the needed information,
7970 # so we support that.
ec685c5e 7971 python_prog=${with_python}
0c4a4063 7972 python_prefix=
ec685c5e
DE
7973 else
7974 as_fn_error "invalid value for --with-python" "$LINENO" 5
7975 fi
81ecdfbb 7976 ;;
ec685c5e
DE
7977 */*)
7978 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7979 as_fn_error "invalid value for --with-python" "$LINENO" 5
7980 ;;
ec685c5e
DE
7981 *)
7982 # The user has either specified auto, yes, or the name of the python
7983 # program assumed to be in $PATH.
7984 python_prefix=
7985 case "${with_python}" in
7986 yes | auto)
7987 if test ${build} = ${host}; then
7988 # Extract the first word of "python", so it can be a program name with args.
7989set dummy python; ac_word=$2
7990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7991$as_echo_n "checking for $ac_word... " >&6; }
7992if test "${ac_cv_path_python_prog_path+set}" = set; then :
7993 $as_echo_n "(cached) " >&6
7994else
7995 case $python_prog_path in
7996 [\\/]* | ?:[\\/]*)
7997 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
7998 ;;
7999 *)
8000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8001for as_dir in $PATH
8002do
8003 IFS=$as_save_IFS
8004 test -z "$as_dir" && as_dir=.
8005 for ac_exec_ext in '' $ac_executable_extensions; do
8006 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8007 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8009 break 2
8010 fi
8011done
8012 done
8013IFS=$as_save_IFS
8014
8015 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8016 ;;
8017esac
8018fi
8019python_prog_path=$ac_cv_path_python_prog_path
8020if test -n "$python_prog_path"; then
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8022$as_echo "$python_prog_path" >&6; }
8023else
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8025$as_echo "no" >&6; }
8026fi
8027
8028
8029 if test "${python_prog_path}" = missing; then
8030 python_prog=missing
8031 else
8032 python_prog=${python_prog_path}
8033 fi
8034 else
8035 # Not much we can do except assume the cross-compiler will find the
8036 # right files.
8037 python_prog=missing
8038 fi
8039 ;;
8040 *)
8041 # While we can't run python compiled for $host (unless host == build),
8042 # the user could write a script that provides the needed information,
8043 # so we support that.
8044 python_prog="${with_python}"
8045 # Extract the first word of "${python_prog}", so it can be a program name with args.
8046set dummy ${python_prog}; ac_word=$2
8047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8048$as_echo_n "checking for $ac_word... " >&6; }
8049if test "${ac_cv_path_python_prog_path+set}" = set; then :
8050 $as_echo_n "(cached) " >&6
8051else
8052 case $python_prog_path in
8053 [\\/]* | ?:[\\/]*)
8054 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8055 ;;
8056 *)
8057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8058for as_dir in $PATH
8059do
8060 IFS=$as_save_IFS
8061 test -z "$as_dir" && as_dir=.
8062 for ac_exec_ext in '' $ac_executable_extensions; do
8063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8064 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8066 break 2
8067 fi
8068done
8069 done
8070IFS=$as_save_IFS
8071
8072 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8073 ;;
8074esac
8075fi
8076python_prog_path=$ac_cv_path_python_prog_path
8077if test -n "$python_prog_path"; then
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8079$as_echo "$python_prog_path" >&6; }
8080else
8081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8082$as_echo "no" >&6; }
8083fi
8084
8085
8086 if test "${python_prog_path}" = missing; then
8087 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8088 fi
8089 ;;
8090 esac
81ecdfbb
RW
8091 esac
8092
ec685c5e 8093 if test "${python_prog}" != missing; then
e7a30f46
DE
8094 # We have a python program to use, but it may be too old.
8095 # Don't flag an error for --with-python=auto (the default).
8096 have_python_config=yes
ec685c5e
DE
8097 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8098 if test $? != 0; then
e7a30f46
DE
8099 have_python_config=failed
8100 if test "${with_python}" != auto; then
8101 as_fn_error "failure running python-config --includes" "$LINENO" 5
8102 fi
ec685c5e
DE
8103 fi
8104 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8105 if test $? != 0; then
e7a30f46
DE
8106 have_python_config=failed
8107 if test "${with_python}" != auto; then
8108 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8109 fi
ec685c5e 8110 fi
0c4a4063
DE
8111 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8112 if test $? != 0; then
e7a30f46
DE
8113 have_python_config=failed
8114 if test "${with_python}" != auto; then
8115 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8116 fi
0c4a4063 8117 fi
ec685c5e 8118 else
ac534cba
JB
8119 # We do not have a python executable we can use to determine where
8120 # to find the Python headers and libs. We cannot guess the include
8121 # path from the python_prefix either, because that include path
8122 # depends on the Python version. So, there is nothing much we can
8123 # do except assume that the compiler will be able to find those files.
8124 python_includes=
8125 python_libs=
0c4a4063 8126 have_python_config=no
ec685c5e 8127 fi
bec39cab 8128
ec685c5e
DE
8129 # If we have python-config, only try the configuration it provides.
8130 # Otherwise fallback on the old way of trying different versions of
8131 # python in turn.
81ecdfbb 8132
ec685c5e
DE
8133 have_libpython=no
8134 if test "${have_python_config}" = yes; then
c1039e3c
JB
8135 # Determine the Python version by extracting "-lpython<version>"
8136 # part of the python_libs. <version> is usually X.Y with X and Y
8137 # being decimal numbers, but can also be XY (seen on Windows).
8138 #
8139 # The extraction is performed using sed with a regular expression.
8140 # Initially, the regexp used was using the '?' quantifier to make
8141 # the dot in the version number optional. Unfortunately, this
8142 # does not work with non-GNU versions of sed because, because of
8143 # what looks like a limitation (the '?' quantifier does not work
8144 # with back-references). We work around this limitation by using
8145 # the '*' quantifier instead. It means that, in theory, we might
8146 # match unexpected version strings such as "-lpython2..7", but
8147 # this seems unlikely in practice. And even if that happens,
8148 # an error will be triggered later on, when checking that version
8149 # number.
ec685c5e 8150 python_version=`echo " ${python_libs} " \
c1039e3c 8151 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8152 case "${python_version}" in
8153 python*)
ec685c5e
DE
8154
8155 version=${python_version}
8156
8157 new_CPPFLAGS=${python_includes}
8158 new_LIBS=${python_libs}
81ecdfbb
RW
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8160$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8161 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8162 save_LIBS=$LIBS
ec685c5e
DE
8163 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8164 LIBS="$LIBS $new_LIBS"
8165 found_usable_python=no
81ecdfbb 8166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8167/* end confdefs.h. */
ac534cba 8168#include "Python.h"
81ecdfbb
RW
8169int
8170main ()
8171{
8172Py_Initialize ();
8173 ;
8174 return 0;
8175}
bec39cab 8176_ACEOF
81ecdfbb 8177if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8178 have_libpython=${version}
8179 found_usable_python=yes
ac534cba
JB
8180 PYTHON_CPPFLAGS=$new_CPPFLAGS
8181 PYTHON_LIBS=$new_LIBS
9a156167 8182fi
81ecdfbb
RW
8183rm -f core conftest.err conftest.$ac_objext \
8184 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8185 CPPFLAGS=$save_CPPFLAGS
8186 LIBS=$save_LIBS
ec685c5e
DE
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8188$as_echo "${found_usable_python}" >&6; }
9a156167 8189
0c4a4063
DE
8190 ;;
8191 *)
ec685c5e 8192 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8193 ;;
8194 esac
e7a30f46 8195 elif test "${have_python_config}" != failed; then
ec685c5e 8196 if test "${have_libpython}" = no; then
9a156167 8197
420697bb
TT
8198 version=python2.7
8199
8200 new_CPPFLAGS=${python_includes}
8201 new_LIBS="${python_libs} -lpython2.7"
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8203$as_echo_n "checking for ${version}... " >&6; }
8204 save_CPPFLAGS=$CPPFLAGS
8205 save_LIBS=$LIBS
8206 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8207 LIBS="$LIBS $new_LIBS"
8208 found_usable_python=no
8209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8210/* end confdefs.h. */
ac534cba 8211#include "Python.h"
420697bb
TT
8212int
8213main ()
8214{
8215Py_Initialize ();
8216 ;
8217 return 0;
8218}
8219_ACEOF
8220if ac_fn_c_try_link "$LINENO"; then :
8221 have_libpython=${version}
8222 found_usable_python=yes
ac534cba
JB
8223 PYTHON_CPPFLAGS=$new_CPPFLAGS
8224 PYTHON_LIBS=$new_LIBS
420697bb
TT
8225fi
8226rm -f core conftest.err conftest.$ac_objext \
8227 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8228 CPPFLAGS=$save_CPPFLAGS
8229 LIBS=$save_LIBS
420697bb
TT
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8231$as_echo "${found_usable_python}" >&6; }
8232
8233 fi
8234 if test "${have_libpython}" = no; then
8235
ec685c5e
DE
8236 version=python2.6
8237
8238 new_CPPFLAGS=${python_includes}
8239 new_LIBS="${python_libs} -lpython2.6"
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8241$as_echo_n "checking for ${version}... " >&6; }
8242 save_CPPFLAGS=$CPPFLAGS
8243 save_LIBS=$LIBS
8244 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8245 LIBS="$LIBS $new_LIBS"
8246 found_usable_python=no
8247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8248/* end confdefs.h. */
ac534cba 8249#include "Python.h"
ec685c5e
DE
8250int
8251main ()
8252{
8253Py_Initialize ();
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258if ac_fn_c_try_link "$LINENO"; then :
8259 have_libpython=${version}
8260 found_usable_python=yes
ac534cba
JB
8261 PYTHON_CPPFLAGS=$new_CPPFLAGS
8262 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8263fi
8264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8266 CPPFLAGS=$save_CPPFLAGS
8267 LIBS=$save_LIBS
ec685c5e
DE
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8269$as_echo "${found_usable_python}" >&6; }
9a156167 8270
81ecdfbb 8271 fi
ec685c5e 8272 if test ${have_libpython} = no; then
9a156167 8273
81ecdfbb 8274 version=python2.5
9a156167 8275
ec685c5e
DE
8276 new_CPPFLAGS=${python_includes}
8277 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8279$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8280 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8281 save_LIBS=$LIBS
ec685c5e
DE
8282 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8283 LIBS="$LIBS $new_LIBS"
8284 found_usable_python=no
81ecdfbb 8285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8286/* end confdefs.h. */
ac534cba 8287#include "Python.h"
81ecdfbb
RW
8288int
8289main ()
8290{
8291Py_Initialize ();
8292 ;
8293 return 0;
8294}
436868fb 8295_ACEOF
81ecdfbb 8296if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8297 have_libpython=${version}
8298 found_usable_python=yes
ac534cba
JB
8299 PYTHON_CPPFLAGS=$new_CPPFLAGS
8300 PYTHON_LIBS=$new_LIBS
436868fb 8301fi
81ecdfbb
RW
8302rm -f core conftest.err conftest.$ac_objext \
8303 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8304 CPPFLAGS=$save_CPPFLAGS
8305 LIBS=$save_LIBS
ec685c5e
DE
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8307$as_echo "${found_usable_python}" >&6; }
a9322a30 8308
81ecdfbb 8309 fi
ec685c5e 8310 if test ${have_libpython} = no; then
a9322a30 8311
81ecdfbb 8312 version=python2.4
a9322a30 8313
ec685c5e
DE
8314 new_CPPFLAGS=${python_includes}
8315 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8317$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8318 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8319 save_LIBS=$LIBS
ec685c5e
DE
8320 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8321 LIBS="$LIBS $new_LIBS"
8322 found_usable_python=no
81ecdfbb 8323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8324/* end confdefs.h. */
ac534cba 8325#include "Python.h"
a9322a30
TT
8326int
8327main ()
8328{
81ecdfbb 8329Py_Initialize ();
a9322a30
TT
8330 ;
8331 return 0;
8332}
436868fb 8333_ACEOF
81ecdfbb 8334if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8335 have_libpython=${version}
8336 found_usable_python=yes
ac534cba
JB
8337 PYTHON_CPPFLAGS=$new_CPPFLAGS
8338 PYTHON_LIBS=$new_LIBS
436868fb 8339fi
81ecdfbb
RW
8340rm -f core conftest.err conftest.$ac_objext \
8341 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8342 CPPFLAGS=$save_CPPFLAGS
8343 LIBS=$save_LIBS
ec685c5e
DE
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8345$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8346
ec685c5e
DE
8347 fi
8348 fi
9c4ea6c5 8349 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8350
8351$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8352
9c4ea6c5 8353 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8354
8355$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8356
9c4ea6c5 8357 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8358
8359$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8360
9c4ea6c5 8361 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8362
8363$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8364
81ecdfbb 8365 fi
ec685c5e
DE
8366
8367 if test "${have_libpython}" = no; then
81ecdfbb
RW
8368 case "${with_python}" in
8369 yes)
8370 as_fn_error "python is missing or unusable" "$LINENO" 5
8371 ;;
8372 auto)
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8374$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8375 ;;
8376 *)
8377 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8378 ;;
8379 esac
0c4a4063
DE
8380 else
8381 if test -n "${python_prefix}"; then
8382
8383cat >>confdefs.h <<_ACEOF
8384#define WITH_PYTHON_PATH "${python_prefix}"
8385_ACEOF
8386
8387
8388 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8389 if test "x$prefix" = xNONE; then
8390 test_prefix=/usr/local
8391 else
8392 test_prefix=$prefix
8393 fi
8394 else
8395 test_prefix=$exec_prefix
8396 fi
8397 value=0
8398 case ${python_prefix} in
8399 "${test_prefix}"|"${test_prefix}/"*|\
8400 '${exec_prefix}'|'${exec_prefix}/'*)
8401 value=1
8402 ;;
8403 esac
8404
8405cat >>confdefs.h <<_ACEOF
8406#define PYTHON_PATH_RELOCATABLE $value
8407_ACEOF
8408
8409
8410 fi
81ecdfbb 8411 fi
436868fb 8412fi
436868fb 8413
ec685c5e 8414if test "${have_libpython}" != no; then
436868fb 8415
81ecdfbb 8416$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8417
81ecdfbb
RW
8418 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8419 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8420 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8421 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8422 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8423
81ecdfbb
RW
8424 # Flags needed to compile Python code (taken from python-config --cflags).
8425 # We cannot call python-config directly because it will output whatever was
8426 # used when compiling the Python interpreter itself, including flags which
8427 # would make the python-related objects be compiled differently from the
8428 # rest of GDB (e.g., -O2 and -fPIC).
8429 if test "${GCC}" = yes; then
8430 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8431 fi
436868fb 8432
81ecdfbb
RW
8433 if test "x${tentative_python_cflags}" != x; then
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8435$as_echo_n "checking compiler flags for python code... " >&6; }
8436 for flag in ${tentative_python_cflags}; do
8437 # Check that the compiler accepts it
8438 saved_CFLAGS="$CFLAGS"
8439 CFLAGS="$CFLAGS $flag"
8440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8441/* end confdefs.h. */
81ecdfbb 8442
a9322a30
TT
8443int
8444main ()
8445{
a9322a30
TT
8446
8447 ;
8448 return 0;
8449}
bec39cab 8450_ACEOF
81ecdfbb
RW
8451if ac_fn_c_try_compile "$LINENO"; then :
8452 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8453fi
81ecdfbb
RW
8454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8455 CFLAGS="$saved_CFLAGS"
8456 done
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8458$as_echo "${PYTHON_CFLAGS}" >&6; }
8459 fi
043b6510
JB
8460
8461 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8462 # #if _SGIAPI
8463 # #define siginfo __siginfo
8464 # #endif
8465 # The problem is that including Python causes some XOPEN macros to be
8466 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8467 # to false. So, we work around this issue by defining siginfo ourself
8468 # though the command-line.
8469 case "$gdb_host" in
8470 irix*) if test "${GCC}" = yes; then
8471 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8472 fi
8473 ;;
8474 esac
81ecdfbb
RW
8475else
8476 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8477 # included.
8478 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8479 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8480 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8481fi
9a156167 8482
9a156167 8483
ac534cba
JB
8484
8485
81ecdfbb
RW
8486# ------------------------- #
8487# Checks for header files. #
8488# ------------------------- #
c890192f 8489
81ecdfbb
RW
8490ac_header_dirent=no
8491for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8492 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8494$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8495if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8496 $as_echo_n "(cached) " >&6
bec39cab 8497else
81ecdfbb 8498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8499/* end confdefs.h. */
81ecdfbb
RW
8500#include <sys/types.h>
8501#include <$ac_hdr>
8502
a9322a30
TT
8503int
8504main ()
8505{
81ecdfbb
RW
8506if ((DIR *) 0)
8507return 0;
a9322a30
TT
8508 ;
8509 return 0;
8510}
bec39cab 8511_ACEOF
81ecdfbb
RW
8512if ac_fn_c_try_compile "$LINENO"; then :
8513 eval "$as_ac_Header=yes"
bec39cab 8514else
81ecdfbb 8515 eval "$as_ac_Header=no"
bec39cab 8516fi
81ecdfbb 8517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8518fi
81ecdfbb
RW
8519eval ac_res=\$$as_ac_Header
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8521$as_echo "$ac_res" >&6; }
8522eval as_val=\$$as_ac_Header
8523 if test "x$as_val" = x""yes; then :
8524 cat >>confdefs.h <<_ACEOF
8525#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8526_ACEOF
bec39cab 8527
81ecdfbb
RW
8528ac_header_dirent=$ac_hdr; break
8529fi
bec39cab 8530
81ecdfbb
RW
8531done
8532# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8533if test $ac_header_dirent = dirent.h; then
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8535$as_echo_n "checking for library containing opendir... " >&6; }
8536if test "${ac_cv_search_opendir+set}" = set; then :
8537 $as_echo_n "(cached) " >&6
c890192f 8538else
81ecdfbb
RW
8539 ac_func_search_save_LIBS=$LIBS
8540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8541/* end confdefs.h. */
8542
8543/* Override any GCC internal prototype to avoid an error.
8544 Use char because int might match the return type of a GCC
8545 builtin and then its argument prototype would still apply. */
8546#ifdef __cplusplus
8547extern "C"
8548#endif
8549char opendir ();
8550int
8551main ()
8552{
8553return opendir ();
8554 ;
8555 return 0;
8556}
bec39cab 8557_ACEOF
81ecdfbb
RW
8558for ac_lib in '' dir; do
8559 if test -z "$ac_lib"; then
8560 ac_res="none required"
8561 else
8562 ac_res=-l$ac_lib
8563 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8564 fi
8565 if ac_fn_c_try_link "$LINENO"; then :
8566 ac_cv_search_opendir=$ac_res
8567fi
8568rm -f core conftest.err conftest.$ac_objext \
8569 conftest$ac_exeext
8570 if test "${ac_cv_search_opendir+set}" = set; then :
8571 break
8572fi
8573done
8574if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8575
81ecdfbb
RW
8576else
8577 ac_cv_search_opendir=no
8578fi
8579rm conftest.$ac_ext
8580LIBS=$ac_func_search_save_LIBS
8581fi
8582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8583$as_echo "$ac_cv_search_opendir" >&6; }
8584ac_res=$ac_cv_search_opendir
8585if test "$ac_res" != no; then :
8586 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8587
bec39cab 8588fi
81ecdfbb 8589
bec39cab 8590else
81ecdfbb
RW
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8592$as_echo_n "checking for library containing opendir... " >&6; }
8593if test "${ac_cv_search_opendir+set}" = set; then :
8594 $as_echo_n "(cached) " >&6
8595else
8596 ac_func_search_save_LIBS=$LIBS
8597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8598/* end confdefs.h. */
81ecdfbb
RW
8599
8600/* Override any GCC internal prototype to avoid an error.
8601 Use char because int might match the return type of a GCC
8602 builtin and then its argument prototype would still apply. */
8603#ifdef __cplusplus
8604extern "C"
8605#endif
8606char opendir ();
a9322a30
TT
8607int
8608main ()
8609{
81ecdfbb 8610return opendir ();
a9322a30
TT
8611 ;
8612 return 0;
8613}
bec39cab 8614_ACEOF
81ecdfbb
RW
8615for ac_lib in '' x; do
8616 if test -z "$ac_lib"; then
8617 ac_res="none required"
8618 else
8619 ac_res=-l$ac_lib
8620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8621 fi
8622 if ac_fn_c_try_link "$LINENO"; then :
8623 ac_cv_search_opendir=$ac_res
8624fi
8625rm -f core conftest.err conftest.$ac_objext \
8626 conftest$ac_exeext
8627 if test "${ac_cv_search_opendir+set}" = set; then :
8628 break
8629fi
8630done
8631if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8632
81ecdfbb
RW
8633else
8634 ac_cv_search_opendir=no
bec39cab 8635fi
81ecdfbb
RW
8636rm conftest.$ac_ext
8637LIBS=$ac_func_search_save_LIBS
a9322a30 8638fi
81ecdfbb
RW
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8640$as_echo "$ac_cv_search_opendir" >&6; }
8641ac_res=$ac_cv_search_opendir
8642if test "$ac_res" != no; then :
8643 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8644
81ecdfbb 8645fi
bec39cab 8646
81ecdfbb 8647fi
bec39cab 8648
81ecdfbb
RW
8649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8650$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8651if test "${ac_cv_header_stat_broken+set}" = set; then :
8652 $as_echo_n "(cached) " >&6
9a156167 8653else
81ecdfbb
RW
8654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8655/* end confdefs.h. */
8656#include <sys/types.h>
8657#include <sys/stat.h>
8658
8659#if defined S_ISBLK && defined S_IFDIR
8660extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8661#endif
8662
8663#if defined S_ISBLK && defined S_IFCHR
8664extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8665#endif
8666
8667#if defined S_ISLNK && defined S_IFREG
8668extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8669#endif
8670
8671#if defined S_ISSOCK && defined S_IFREG
8672extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8673#endif
8674
bec39cab 8675_ACEOF
81ecdfbb
RW
8676if ac_fn_c_try_compile "$LINENO"; then :
8677 ac_cv_header_stat_broken=no
8678else
8679 ac_cv_header_stat_broken=yes
8680fi
8681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8682fi
8683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8684$as_echo "$ac_cv_header_stat_broken" >&6; }
8685if test $ac_cv_header_stat_broken = yes; then
9a156167 8686
81ecdfbb 8687$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 8688
bec39cab 8689fi
81ecdfbb
RW
8690
8691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8692$as_echo_n "checking for ANSI C header files... " >&6; }
8693if test "${ac_cv_header_stdc+set}" = set; then :
8694 $as_echo_n "(cached) " >&6
bec39cab 8695else
81ecdfbb 8696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8697/* end confdefs.h. */
81ecdfbb
RW
8698#include <stdlib.h>
8699#include <stdarg.h>
8700#include <string.h>
8701#include <float.h>
8702
a9322a30
TT
8703int
8704main ()
8705{
a9322a30
TT
8706
8707 ;
8708 return 0;
8709}
bec39cab 8710_ACEOF
81ecdfbb
RW
8711if ac_fn_c_try_compile "$LINENO"; then :
8712 ac_cv_header_stdc=yes
bec39cab 8713else
81ecdfbb 8714 ac_cv_header_stdc=no
a9322a30 8715fi
81ecdfbb 8716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8717
81ecdfbb
RW
8718if test $ac_cv_header_stdc = yes; then
8719 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8721/* end confdefs.h. */
8722#include <string.h>
bec39cab 8723
81ecdfbb
RW
8724_ACEOF
8725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8726 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8727
bec39cab 8728else
81ecdfbb
RW
8729 ac_cv_header_stdc=no
8730fi
8731rm -f conftest*
8732
8733fi
8734
8735if test $ac_cv_header_stdc = yes; then
8736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8738/* end confdefs.h. */
8739#include <stdlib.h>
8740
bec39cab 8741_ACEOF
81ecdfbb
RW
8742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8743 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8744
81ecdfbb
RW
8745else
8746 ac_cv_header_stdc=no
8747fi
8748rm -f conftest*
bec39cab 8749
bec39cab 8750fi
81ecdfbb
RW
8751
8752if test $ac_cv_header_stdc = yes; then
8753 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8754 if test "$cross_compiling" = yes; then :
8755 :
bec39cab 8756else
81ecdfbb 8757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8758/* end confdefs.h. */
81ecdfbb
RW
8759#include <ctype.h>
8760#include <stdlib.h>
8761#if ((' ' & 0x0FF) == 0x020)
8762# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8763# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8764#else
8765# define ISLOWER(c) \
8766 (('a' <= (c) && (c) <= 'i') \
8767 || ('j' <= (c) && (c) <= 'r') \
8768 || ('s' <= (c) && (c) <= 'z'))
8769# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8770#endif
8771
8772#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8773int
8774main ()
8775{
81ecdfbb
RW
8776 int i;
8777 for (i = 0; i < 256; i++)
8778 if (XOR (islower (i), ISLOWER (i))
8779 || toupper (i) != TOUPPER (i))
8780 return 2;
a9322a30
TT
8781 return 0;
8782}
bec39cab 8783_ACEOF
81ecdfbb
RW
8784if ac_fn_c_try_run "$LINENO"; then :
8785
bec39cab 8786else
81ecdfbb
RW
8787 ac_cv_header_stdc=no
8788fi
8789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8790 conftest.$ac_objext conftest.beam conftest.$ac_ext
8791fi
bec39cab 8792
bec39cab 8793fi
a9322a30 8794fi
81ecdfbb
RW
8795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8796$as_echo "$ac_cv_header_stdc" >&6; }
8797if test $ac_cv_header_stdc = yes; then
bec39cab 8798
81ecdfbb 8799$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8800
81ecdfbb 8801fi
bec39cab 8802
81ecdfbb
RW
8803# elf_hp.h is for HP/UX 64-bit shared library support.
8804# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
8805# unconditionally, so what's the point in checking these?
8806for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8807 thread_db.h gnu/libc-version.h signal.h stddef.h \
8808 stdlib.h string.h memory.h strings.h sys/fault.h \
8809 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8810 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8811 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8812 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 8813 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 8814 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
8815do :
8816 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8817ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8818eval as_val=\$$as_ac_Header
8819 if test "x$as_val" = x""yes; then :
bec39cab 8820 cat >>confdefs.h <<_ACEOF
81ecdfbb 8821#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8822_ACEOF
c906108c 8823
bec39cab 8824fi
81ecdfbb
RW
8825
8826done
8827
8828for ac_header in link.h
8829do :
8830 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8831# include <sys/types.h>
8832#endif
8833#if HAVE_NLIST_H
8834# include <nlist.h>
a9322a30
TT
8835#endif
8836
81ecdfbb
RW
8837"
8838if test "x$ac_cv_header_link_h" = x""yes; then :
8839 cat >>confdefs.h <<_ACEOF
8840#define HAVE_LINK_H 1
bec39cab 8841_ACEOF
bec39cab 8842
a9322a30 8843fi
bec39cab 8844
81ecdfbb 8845done
c906108c 8846
81ecdfbb
RW
8847for ac_header in sys/proc.h
8848do :
8849 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8850# include <sys/param.h>
8851#endif
c906108c 8852
81ecdfbb
RW
8853"
8854if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8855 cat >>confdefs.h <<_ACEOF
81ecdfbb 8856#define HAVE_SYS_PROC_H 1
bec39cab 8857_ACEOF
5ee754fc 8858
bec39cab 8859fi
81ecdfbb
RW
8860
8861done
8862
8863for ac_header in sys/user.h
8864do :
8865 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8866# include <sys/param.h>
a9322a30
TT
8867#endif
8868
81ecdfbb
RW
8869"
8870if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8871 cat >>confdefs.h <<_ACEOF
8872#define HAVE_SYS_USER_H 1
bec39cab 8873_ACEOF
bec39cab 8874
a9322a30 8875fi
bec39cab 8876
81ecdfbb 8877done
5ee754fc 8878
5ee754fc 8879
81ecdfbb
RW
8880# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8881# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8882# think that we don't have <curses.h> if we're using GCC.
8883case $host_os in
8884 solaris2.[789])
8885 if test "$GCC" = yes; then
8886
8887$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8888
8889 fi ;;
8890esac
8891for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8892do :
8893 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8894ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8895eval as_val=\$$as_ac_Header
8896 if test "x$as_val" = x""yes; then :
bec39cab 8897 cat >>confdefs.h <<_ACEOF
81ecdfbb 8898#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8899_ACEOF
5ee754fc
MK
8900
8901fi
8902
81ecdfbb 8903done
bec39cab 8904
81ecdfbb
RW
8905for ac_header in term.h
8906do :
8907 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8908# include <curses.h>
8909#endif
bec39cab 8910
81ecdfbb
RW
8911"
8912if test "x$ac_cv_header_term_h" = x""yes; then :
8913 cat >>confdefs.h <<_ACEOF
8914#define HAVE_TERM_H 1
a8111142 8915_ACEOF
a8111142 8916
a8111142 8917fi
a8111142 8918
81ecdfbb 8919done
a8111142
TT
8920
8921
81ecdfbb
RW
8922# ------------------------- #
8923# Checks for declarations. #
8924# ------------------------- #
a9322a30 8925
81ecdfbb
RW
8926ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8927if test "x$ac_cv_have_decl_free" = x""yes; then :
8928 ac_have_decl=1
bec39cab 8929else
81ecdfbb
RW
8930 ac_have_decl=0
8931fi
8932
8933cat >>confdefs.h <<_ACEOF
8934#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8935_ACEOF
81ecdfbb
RW
8936ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8937if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8938 ac_have_decl=1
8939else
8940 ac_have_decl=0
8941fi
8942
8943cat >>confdefs.h <<_ACEOF
8944#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 8945_ACEOF
81ecdfbb
RW
8946ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
8947if test "x$ac_cv_have_decl_realloc" = x""yes; then :
8948 ac_have_decl=1
bec39cab 8949else
81ecdfbb
RW
8950 ac_have_decl=0
8951fi
bec39cab 8952
81ecdfbb
RW
8953cat >>confdefs.h <<_ACEOF
8954#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 8955_ACEOF
81ecdfbb
RW
8956ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
8957if test "x$ac_cv_have_decl_strerror" = x""yes; then :
8958 ac_have_decl=1
8959else
8960 ac_have_decl=0
8961fi
8962
8963cat >>confdefs.h <<_ACEOF
8964#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 8965_ACEOF
81ecdfbb
RW
8966ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8967if test "x$ac_cv_have_decl_strstr" = x""yes; then :
8968 ac_have_decl=1
bec39cab 8969else
81ecdfbb
RW
8970 ac_have_decl=0
8971fi
5ee754fc 8972
81ecdfbb
RW
8973cat >>confdefs.h <<_ACEOF
8974#define HAVE_DECL_STRSTR $ac_have_decl
8975_ACEOF
8976ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
8977if test "x$ac_cv_have_decl_getopt" = x""yes; then :
8978 ac_have_decl=1
8979else
8980 ac_have_decl=0
5ee754fc 8981fi
81ecdfbb
RW
8982
8983cat >>confdefs.h <<_ACEOF
8984#define HAVE_DECL_GETOPT $ac_have_decl
8985_ACEOF
8986ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
8987if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
8988 ac_have_decl=1
8989else
8990 ac_have_decl=0
5ee754fc 8991fi
81ecdfbb
RW
8992
8993cat >>confdefs.h <<_ACEOF
8994#define HAVE_DECL_SNPRINTF $ac_have_decl
8995_ACEOF
8996ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
8997if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
8998 ac_have_decl=1
8999else
9000 ac_have_decl=0
5ee754fc
MK
9001fi
9002
a9322a30 9003cat >>confdefs.h <<_ACEOF
81ecdfbb 9004#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 9005_ACEOF
5ee754fc 9006
5ee754fc 9007
81ecdfbb
RW
9008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9009$as_echo_n "checking for LC_MESSAGES... " >&6; }
9010if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9011 $as_echo_n "(cached) " >&6
bec39cab 9012else
81ecdfbb 9013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9014/* end confdefs.h. */
81ecdfbb 9015#include <locale.h>
a9322a30
TT
9016int
9017main ()
9018{
81ecdfbb 9019return LC_MESSAGES
a9322a30
TT
9020 ;
9021 return 0;
9022}
bec39cab 9023_ACEOF
81ecdfbb
RW
9024if ac_fn_c_try_link "$LINENO"; then :
9025 am_cv_val_LC_MESSAGES=yes
bec39cab 9026else
81ecdfbb
RW
9027 am_cv_val_LC_MESSAGES=no
9028fi
9029rm -f core conftest.err conftest.$ac_objext \
9030 conftest$ac_exeext conftest.$ac_ext
9031fi
9032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9033$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9034 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9035
81ecdfbb
RW
9036$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9037
9038 fi
9039
9040
9041# ----------------------- #
9042# Checks for structures. #
9043# ----------------------- #
9044
9045ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9046if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9047
9048cat >>confdefs.h <<_ACEOF
9049#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9050_ACEOF
7eb368b3 9051
81ecdfbb 9052
7eb368b3 9053fi
81ecdfbb
RW
9054ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9055if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9056
a9322a30
TT
9057cat >>confdefs.h <<_ACEOF
9058#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9059_ACEOF
9060
a9322a30 9061
7eb368b3
NR
9062fi
9063
7eb368b3 9064
a9322a30
TT
9065# ------------------ #
9066# Checks for types. #
9067# ------------------ #
7eb368b3 9068
81ecdfbb
RW
9069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9070$as_echo_n "checking return type of signal handlers... " >&6; }
9071if test "${ac_cv_type_signal+set}" = set; then :
9072 $as_echo_n "(cached) " >&6
bec39cab 9073else
81ecdfbb 9074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9075/* end confdefs.h. */
a9322a30
TT
9076#include <sys/types.h>
9077#include <signal.h>
7cb9022a 9078
a9322a30
TT
9079int
9080main ()
9081{
81ecdfbb 9082return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9083 ;
9084 return 0;
9085}
bec39cab 9086_ACEOF
81ecdfbb
RW
9087if ac_fn_c_try_compile "$LINENO"; then :
9088 ac_cv_type_signal=int
bec39cab 9089else
81ecdfbb 9090 ac_cv_type_signal=void
bec39cab 9091fi
81ecdfbb 9092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9093fi
81ecdfbb
RW
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9095$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9096
a9322a30
TT
9097cat >>confdefs.h <<_ACEOF
9098#define RETSIGTYPE $ac_cv_type_signal
9099_ACEOF
5ee754fc 9100
bec39cab 9101
81ecdfbb 9102ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9103#include <sys/socket.h>
9104
81ecdfbb
RW
9105"
9106if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9107
a9322a30
TT
9108cat >>confdefs.h <<_ACEOF
9109#define HAVE_SOCKLEN_T 1
9110_ACEOF
9111
9112
9113fi
9114
9115
9116# ------------------------------------- #
9117# Checks for compiler characteristics. #
9118# ------------------------------------- #
9119
81ecdfbb
RW
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9121$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9122if test "${ac_cv_c_const+set}" = set; then :
9123 $as_echo_n "(cached) " >&6
a9322a30 9124else
81ecdfbb 9125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9126/* end confdefs.h. */
a9322a30
TT
9127
9128int
9129main ()
9130{
9131/* FIXME: Include the comments suggested by Paul. */
9132#ifndef __cplusplus
9133 /* Ultrix mips cc rejects this. */
9134 typedef int charset[2];
81ecdfbb 9135 const charset cs;
a9322a30 9136 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9137 char const *const *pcpcc;
9138 char **ppc;
a9322a30
TT
9139 /* NEC SVR4.0.2 mips cc rejects this. */
9140 struct point {int x, y;};
9141 static struct point const zero = {0,0};
9142 /* AIX XL C 1.02.0.0 rejects this.
9143 It does not let you subtract one const X* pointer from another in
9144 an arm of an if-expression whose if-part is not a constant
9145 expression */
9146 const char *g = "string";
81ecdfbb 9147 pcpcc = &g + (g ? g-g : 0);
a9322a30 9148 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9149 ++pcpcc;
9150 ppc = (char**) pcpcc;
9151 pcpcc = (char const *const *) ppc;
a9322a30
TT
9152 { /* SCO 3.2v4 cc rejects this. */
9153 char *t;
9154 char const *s = 0 ? (char *) 0 : (char const *) 0;
9155
9156 *t++ = 0;
81ecdfbb 9157 if (s) return 0;
a9322a30
TT
9158 }
9159 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9160 int x[] = {25, 17};
9161 const int *foo = &x[0];
9162 ++foo;
9163 }
9164 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9165 typedef const int *iptr;
9166 iptr p = 0;
9167 ++p;
9168 }
9169 { /* AIX XL C 1.02.0.0 rejects this saying
9170 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9171 struct s { int j; const int *ap[3]; };
9172 struct s *b; b->j = 5;
9173 }
9174 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9175 const int foo = 10;
81ecdfbb 9176 if (!foo) return 0;
a9322a30 9177 }
81ecdfbb 9178 return !cs[0] && !zero.x;
a9322a30
TT
9179#endif
9180
9181 ;
9182 return 0;
9183}
bec39cab 9184_ACEOF
81ecdfbb 9185if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9186 ac_cv_c_const=yes
5ee754fc 9187else
81ecdfbb 9188 ac_cv_c_const=no
5ee754fc 9189fi
81ecdfbb 9190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9191fi
81ecdfbb
RW
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9193$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9194if test $ac_cv_c_const = no; then
bec39cab 9195
81ecdfbb 9196$as_echo "#define const /**/" >>confdefs.h
bec39cab 9197
5ee754fc 9198fi
bec39cab 9199
81ecdfbb
RW
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9201$as_echo_n "checking for inline... " >&6; }
9202if test "${ac_cv_c_inline+set}" = set; then :
9203 $as_echo_n "(cached) " >&6
bec39cab 9204else
a9322a30
TT
9205 ac_cv_c_inline=no
9206for ac_kw in inline __inline__ __inline; do
81ecdfbb 9207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9208/* end confdefs.h. */
a9322a30
TT
9209#ifndef __cplusplus
9210typedef int foo_t;
9211static $ac_kw foo_t static_foo () {return 0; }
9212$ac_kw foo_t foo () {return 0; }
9213#endif
9214
bec39cab 9215_ACEOF
81ecdfbb
RW
9216if ac_fn_c_try_compile "$LINENO"; then :
9217 ac_cv_c_inline=$ac_kw
bec39cab 9218fi
81ecdfbb
RW
9219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9220 test "$ac_cv_c_inline" != no && break
a9322a30 9221done
bec39cab 9222
5ee754fc 9223fi
81ecdfbb
RW
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9225$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9226
a9322a30
TT
9227case $ac_cv_c_inline in
9228 inline | yes) ;;
9229 *)
9230 case $ac_cv_c_inline in
9231 no) ac_val=;;
9232 *) ac_val=$ac_cv_c_inline;;
9233 esac
9234 cat >>confdefs.h <<_ACEOF
9235#ifndef __cplusplus
9236#define inline $ac_val
9237#endif
9238_ACEOF
bec39cab
AC
9239 ;;
9240esac
bec39cab 9241
81ecdfbb
RW
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9243$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9244if test "${ac_cv_c_bigendian+set}" = set; then :
9245 $as_echo_n "(cached) " >&6
bec39cab 9246else
81ecdfbb
RW
9247 ac_cv_c_bigendian=unknown
9248 # See if we're dealing with a universal compiler.
9249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9250/* end confdefs.h. */
9251#ifndef __APPLE_CC__
9252 not a universal capable compiler
9253 #endif
9254 typedef int dummy;
9255
9256_ACEOF
9257if ac_fn_c_try_compile "$LINENO"; then :
9258
9259 # Check for potential -arch flags. It is not universal unless
9260 # there are at least two -arch flags with different values.
9261 ac_arch=
9262 ac_prev=
9263 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9264 if test -n "$ac_prev"; then
9265 case $ac_word in
9266 i?86 | x86_64 | ppc | ppc64)
9267 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9268 ac_arch=$ac_word
9269 else
9270 ac_cv_c_bigendian=universal
9271 break
9272 fi
9273 ;;
9274 esac
9275 ac_prev=
9276 elif test "x$ac_word" = "x-arch"; then
9277 ac_prev=arch
9278 fi
9279 done
9280fi
9281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9282 if test $ac_cv_c_bigendian = unknown; then
9283 # See if sys/param.h defines the BYTE_ORDER macro.
9284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9285/* end confdefs.h. */
a9322a30 9286#include <sys/types.h>
81ecdfbb 9287 #include <sys/param.h>
a9322a30
TT
9288
9289int
9290main ()
9291{
81ecdfbb
RW
9292#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9293 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9294 && LITTLE_ENDIAN)
9295 bogus endian macros
9296 #endif
a9322a30
TT
9297
9298 ;
9299 return 0;
9300}
bec39cab 9301_ACEOF
81ecdfbb 9302if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9303 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9305/* end confdefs.h. */
a9322a30 9306#include <sys/types.h>
81ecdfbb 9307 #include <sys/param.h>
a9322a30
TT
9308
9309int
9310main ()
9311{
9312#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9313 not big endian
9314 #endif
a9322a30
TT
9315
9316 ;
9317 return 0;
9318}
bec39cab 9319_ACEOF
81ecdfbb 9320if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9321 ac_cv_c_bigendian=yes
5ee754fc 9322else
81ecdfbb 9323 ac_cv_c_bigendian=no
5ee754fc 9324fi
81ecdfbb
RW
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9326fi
9327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9328 fi
9329 if test $ac_cv_c_bigendian = unknown; then
9330 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9332/* end confdefs.h. */
9333#include <limits.h>
bec39cab 9334
81ecdfbb
RW
9335int
9336main ()
9337{
9338#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9339 bogus endian macros
9340 #endif
9341
9342 ;
9343 return 0;
9344}
7eb368b3 9345_ACEOF
81ecdfbb
RW
9346if ac_fn_c_try_compile "$LINENO"; then :
9347 # It does; now see whether it defined to _BIG_ENDIAN or not.
9348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9349/* end confdefs.h. */
81ecdfbb
RW
9350#include <limits.h>
9351
7eb368b3
NR
9352int
9353main ()
9354{
81ecdfbb
RW
9355#ifndef _BIG_ENDIAN
9356 not big endian
9357 #endif
9358
7eb368b3
NR
9359 ;
9360 return 0;
9361}
9362_ACEOF
81ecdfbb 9363if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9364 ac_cv_c_bigendian=yes
81ecdfbb
RW
9365else
9366 ac_cv_c_bigendian=no
a9322a30 9367fi
81ecdfbb 9368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9369fi
81ecdfbb
RW
9370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9371 fi
9372 if test $ac_cv_c_bigendian = unknown; then
9373 # Compile a test program.
9374 if test "$cross_compiling" = yes; then :
9375 # Try to guess by grepping values from an object file.
9376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9377/* end confdefs.h. */
9378short int ascii_mm[] =
9379 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9380 short int ascii_ii[] =
9381 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9382 int use_ascii (int i) {
9383 return ascii_mm[i] + ascii_ii[i];
9384 }
9385 short int ebcdic_ii[] =
9386 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9387 short int ebcdic_mm[] =
9388 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9389 int use_ebcdic (int i) {
9390 return ebcdic_mm[i] + ebcdic_ii[i];
9391 }
9392 extern int foo;
7eb368b3 9393
81ecdfbb
RW
9394int
9395main ()
9396{
9397return use_ascii (foo) == use_ebcdic (foo);
9398 ;
9399 return 0;
9400}
9401_ACEOF
9402if ac_fn_c_try_compile "$LINENO"; then :
9403 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9404 ac_cv_c_bigendian=yes
9405 fi
9406 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9407 if test "$ac_cv_c_bigendian" = unknown; then
9408 ac_cv_c_bigendian=no
9409 else
9410 # finding both strings is unlikely to happen, but who knows?
9411 ac_cv_c_bigendian=unknown
9412 fi
9413 fi
7eb368b3 9414fi
81ecdfbb 9415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9416else
81ecdfbb 9417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9418/* end confdefs.h. */
81ecdfbb 9419$ac_includes_default
d3ea6809
MM
9420int
9421main ()
9422{
81ecdfbb
RW
9423
9424 /* Are we little or big endian? From Harbison&Steele. */
9425 union
9426 {
9427 long int l;
9428 char c[sizeof (long int)];
9429 } u;
9430 u.l = 1;
9431 return u.c[sizeof (long int) - 1] == 1;
9432
9433 ;
9434 return 0;
d3ea6809
MM
9435}
9436_ACEOF
81ecdfbb 9437if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9438 ac_cv_c_bigendian=no
d3ea6809 9439else
81ecdfbb 9440 ac_cv_c_bigendian=yes
d3ea6809 9441fi
81ecdfbb
RW
9442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9443 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9444fi
a9322a30 9445
81ecdfbb
RW
9446 fi
9447fi
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9449$as_echo "$ac_cv_c_bigendian" >&6; }
9450 case $ac_cv_c_bigendian in #(
9451 yes)
9452 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9453;; #(
9454 no)
9455 ;; #(
9456 universal)
9457
9458$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9459
9460 ;; #(
9461 *)
9462 as_fn_error "unknown endianness
9463 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9464 esac
d3ea6809
MM
9465
9466
a9322a30
TT
9467# ------------------------------ #
9468# Checks for library functions. #
9469# ------------------------------ #
d3ea6809 9470
a9322a30
TT
9471# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9472# for constant arguments. Useless!
81ecdfbb
RW
9473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9474$as_echo_n "checking for working alloca.h... " >&6; }
9475if test "${ac_cv_working_alloca_h+set}" = set; then :
9476 $as_echo_n "(cached) " >&6
d3ea6809 9477else
81ecdfbb 9478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9479/* end confdefs.h. */
a9322a30 9480#include <alloca.h>
bec39cab
AC
9481int
9482main ()
9483{
a9322a30 9484char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9485 if (p) return 0;
bec39cab
AC
9486 ;
9487 return 0;
9488}
9489_ACEOF
81ecdfbb 9490if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9491 ac_cv_working_alloca_h=yes
bec39cab 9492else
81ecdfbb 9493 ac_cv_working_alloca_h=no
bec39cab 9494fi
81ecdfbb
RW
9495rm -f core conftest.err conftest.$ac_objext \
9496 conftest$ac_exeext conftest.$ac_ext
bec39cab 9497fi
81ecdfbb
RW
9498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9499$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9500if test $ac_cv_working_alloca_h = yes; then
9501
81ecdfbb 9502$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9503
c906108c 9504fi
bec39cab 9505
81ecdfbb
RW
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9507$as_echo_n "checking for alloca... " >&6; }
9508if test "${ac_cv_func_alloca_works+set}" = set; then :
9509 $as_echo_n "(cached) " >&6
bec39cab 9510else
81ecdfbb 9511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9512/* end confdefs.h. */
a9322a30
TT
9513#ifdef __GNUC__
9514# define alloca __builtin_alloca
b4e70030 9515#else
a9322a30
TT
9516# ifdef _MSC_VER
9517# include <malloc.h>
9518# define alloca _alloca
9519# else
81ecdfbb 9520# ifdef HAVE_ALLOCA_H
a9322a30
TT
9521# include <alloca.h>
9522# else
9523# ifdef _AIX
9524 #pragma alloca
9525# else
9526# ifndef alloca /* predefined by HP cc +Olibcalls */
9527char *alloca ();
9528# endif
9529# endif
9530# endif
9531# endif
c906108c 9532#endif
97bf5e38 9533
bec39cab
AC
9534int
9535main ()
9536{
a9322a30 9537char *p = (char *) alloca (1);
81ecdfbb 9538 if (p) return 0;
bec39cab
AC
9539 ;
9540 return 0;
9541}
9542_ACEOF
81ecdfbb 9543if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9544 ac_cv_func_alloca_works=yes
bec39cab 9545else
81ecdfbb 9546 ac_cv_func_alloca_works=no
bec39cab 9547fi
81ecdfbb
RW
9548rm -f core conftest.err conftest.$ac_objext \
9549 conftest$ac_exeext conftest.$ac_ext
bec39cab 9550fi
81ecdfbb
RW
9551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9552$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9553
9554if test $ac_cv_func_alloca_works = yes; then
9555
81ecdfbb 9556$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9557
a9322a30
TT
9558else
9559 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9560# that cause trouble. Some versions do not even contain alloca or
9561# contain a buggy version. If you still want to use their alloca,
9562# use ar to extract alloca.o from them instead of compiling alloca.c.
9563
81ecdfbb 9564ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9565
81ecdfbb 9566$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9567
bec39cab 9568
81ecdfbb
RW
9569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9570$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9571if test "${ac_cv_os_cray+set}" = set; then :
9572 $as_echo_n "(cached) " >&6
a9322a30 9573else
81ecdfbb 9574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9575/* end confdefs.h. */
81ecdfbb 9576#if defined CRAY && ! defined CRAY2
a9322a30
TT
9577webecray
9578#else
9579wenotbecray
9580#endif
9581
9582_ACEOF
9583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9584 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9585 ac_cv_os_cray=yes
9586else
81ecdfbb 9587 ac_cv_os_cray=no
bec39cab 9588fi
81ecdfbb
RW
9589rm -f conftest*
9590
bec39cab 9591fi
81ecdfbb
RW
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9593$as_echo "$ac_cv_os_cray" >&6; }
9594if test $ac_cv_os_cray = yes; then
9595 for ac_func in _getb67 GETB67 getb67; do
9596 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9597ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9598eval as_val=\$$as_ac_var
9599 if test "x$as_val" = x""yes; then :
a9322a30
TT
9600
9601cat >>confdefs.h <<_ACEOF
9602#define CRAY_STACKSEG_END $ac_func
bec39cab 9603_ACEOF
c906108c 9604
a9322a30 9605 break
c906108c
SS
9606fi
9607
a9322a30
TT
9608 done
9609fi
bec39cab 9610
81ecdfbb
RW
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9612$as_echo_n "checking stack direction for C alloca... " >&6; }
9613if test "${ac_cv_c_stack_direction+set}" = set; then :
9614 $as_echo_n "(cached) " >&6
a9322a30 9615else
81ecdfbb 9616 if test "$cross_compiling" = yes; then :
a9322a30 9617 ac_cv_c_stack_direction=0
bec39cab 9618else
81ecdfbb 9619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9620/* end confdefs.h. */
81ecdfbb 9621$ac_includes_default
a9322a30
TT
9622int
9623find_stack_direction ()
b4e70030 9624{
a9322a30
TT
9625 static char *addr = 0;
9626 auto char dummy;
9627 if (addr == 0)
9628 {
9629 addr = &dummy;
9630 return find_stack_direction ();
9631 }
9632 else
9633 return (&dummy > addr) ? 1 : -1;
b4e70030 9634}
b757528f 9635
bec39cab
AC
9636int
9637main ()
9638{
81ecdfbb 9639 return find_stack_direction () < 0;
bec39cab
AC
9640}
9641_ACEOF
81ecdfbb 9642if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9643 ac_cv_c_stack_direction=1
9644else
81ecdfbb 9645 ac_cv_c_stack_direction=-1
a9322a30 9646fi
81ecdfbb
RW
9647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9648 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9649fi
a9322a30 9650
81ecdfbb
RW
9651fi
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9653$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9654cat >>confdefs.h <<_ACEOF
9655#define STACK_DIRECTION $ac_cv_c_stack_direction
9656_ACEOF
9657
9658
9659fi
9660
a9322a30 9661for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9662do :
9663 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9664ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9665eval as_val=\$$as_ac_Header
9666 if test "x$as_val" = x""yes; then :
bec39cab 9667 cat >>confdefs.h <<_ACEOF
81ecdfbb 9668#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9669_ACEOF
b757528f 9670
b757528f 9671fi
bec39cab 9672
a9322a30 9673done
a3828db0 9674
a9322a30 9675for ac_func in getpagesize
81ecdfbb
RW
9676do :
9677 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9678if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9679 cat >>confdefs.h <<_ACEOF
81ecdfbb 9680#define HAVE_GETPAGESIZE 1
bec39cab 9681_ACEOF
bcb3dc3d 9682
bcb3dc3d
MK
9683fi
9684done
9685
81ecdfbb
RW
9686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9687$as_echo_n "checking for working mmap... " >&6; }
9688if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9689 $as_echo_n "(cached) " >&6
a9322a30 9690else
81ecdfbb 9691 if test "$cross_compiling" = yes; then :
a9322a30 9692 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9693else
81ecdfbb 9694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9695/* end confdefs.h. */
a9322a30
TT
9696$ac_includes_default
9697/* malloc might have been renamed as rpl_malloc. */
9698#undef malloc
bec39cab 9699
a9322a30
TT
9700/* Thanks to Mike Haertel and Jim Avera for this test.
9701 Here is a matrix of mmap possibilities:
9702 mmap private not fixed
9703 mmap private fixed at somewhere currently unmapped
9704 mmap private fixed at somewhere already mapped
9705 mmap shared not fixed
9706 mmap shared fixed at somewhere currently unmapped
9707 mmap shared fixed at somewhere already mapped
9708 For private mappings, we should verify that changes cannot be read()
9709 back from the file, nor mmap's back from the file at a different
9710 address. (There have been systems where private was not correctly
9711 implemented like the infamous i386 svr4.0, and systems where the
9712 VM page cache was not coherent with the file system buffer cache
9713 like early versions of FreeBSD and possibly contemporary NetBSD.)
9714 For shared mappings, we should conversely verify that changes get
9715 propagated back to all the places they're supposed to be.
bec39cab 9716
a9322a30
TT
9717 Grep wants private fixed already mapped.
9718 The main things grep needs to know about mmap are:
9719 * does it exist and is it safe to write into the mmap'd area
9720 * how to use it (BSD variants) */
8b9cf735 9721
a9322a30
TT
9722#include <fcntl.h>
9723#include <sys/mman.h>
8b9cf735 9724
81ecdfbb 9725#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9726char *malloc ();
a3828db0
MK
9727#endif
9728
a9322a30 9729/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9730#ifndef HAVE_GETPAGESIZE
a9322a30 9731/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9732# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9733# define HAVE_SYS_PARAM_H 1
9734# endif
9735
9736# ifdef _SC_PAGESIZE
9737# define getpagesize() sysconf(_SC_PAGESIZE)
9738# else /* no _SC_PAGESIZE */
81ecdfbb 9739# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9740# include <sys/param.h>
9741# ifdef EXEC_PAGESIZE
9742# define getpagesize() EXEC_PAGESIZE
9743# else /* no EXEC_PAGESIZE */
9744# ifdef NBPG
9745# define getpagesize() NBPG * CLSIZE
9746# ifndef CLSIZE
9747# define CLSIZE 1
9748# endif /* no CLSIZE */
9749# else /* no NBPG */
9750# ifdef NBPC
9751# define getpagesize() NBPC
9752# else /* no NBPC */
9753# ifdef PAGESIZE
9754# define getpagesize() PAGESIZE
9755# endif /* PAGESIZE */
9756# endif /* no NBPC */
9757# endif /* no NBPG */
9758# endif /* no EXEC_PAGESIZE */
9759# else /* no HAVE_SYS_PARAM_H */
9760# define getpagesize() 8192 /* punt totally */
9761# endif /* no HAVE_SYS_PARAM_H */
9762# endif /* no _SC_PAGESIZE */
9763
9764#endif /* no HAVE_GETPAGESIZE */
9765
bec39cab
AC
9766int
9767main ()
9768{
a9322a30
TT
9769 char *data, *data2, *data3;
9770 int i, pagesize;
9771 int fd;
9772
9773 pagesize = getpagesize ();
9774
9775 /* First, make a file with some known garbage in it. */
9776 data = (char *) malloc (pagesize);
9777 if (!data)
81ecdfbb 9778 return 1;
a9322a30
TT
9779 for (i = 0; i < pagesize; ++i)
9780 *(data + i) = rand ();
9781 umask (0);
9782 fd = creat ("conftest.mmap", 0600);
9783 if (fd < 0)
81ecdfbb 9784 return 1;
a9322a30 9785 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9786 return 1;
a9322a30
TT
9787 close (fd);
9788
9789 /* Next, try to mmap the file at a fixed address which already has
9790 something else allocated at it. If we can, also make sure that
9791 we see the same garbage. */
9792 fd = open ("conftest.mmap", O_RDWR);
9793 if (fd < 0)
81ecdfbb 9794 return 1;
a9322a30
TT
9795 data2 = (char *) malloc (2 * pagesize);
9796 if (!data2)
81ecdfbb
RW
9797 return 1;
9798 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9799 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9800 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9801 return 1;
a9322a30
TT
9802 for (i = 0; i < pagesize; ++i)
9803 if (*(data + i) != *(data2 + i))
81ecdfbb 9804 return 1;
a9322a30
TT
9805
9806 /* Finally, make sure that changes to the mapped area do not
9807 percolate back to the file as seen by read(). (This is a bug on
9808 some variants of i386 svr4.0.) */
9809 for (i = 0; i < pagesize; ++i)
9810 *(data2 + i) = *(data2 + i) + 1;
9811 data3 = (char *) malloc (pagesize);
9812 if (!data3)
81ecdfbb 9813 return 1;
a9322a30 9814 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9815 return 1;
a9322a30
TT
9816 for (i = 0; i < pagesize; ++i)
9817 if (*(data + i) != *(data3 + i))
81ecdfbb 9818 return 1;
a9322a30 9819 close (fd);
81ecdfbb 9820 return 0;
bec39cab
AC
9821}
9822_ACEOF
81ecdfbb 9823if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9824 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9825else
81ecdfbb 9826 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9827fi
81ecdfbb
RW
9828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9829 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9830fi
81ecdfbb 9831
a9322a30 9832fi
81ecdfbb
RW
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9834$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9835if test $ac_cv_func_mmap_fixed_mapped = yes; then
9836
81ecdfbb 9837$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9838
086ec9eb 9839fi
a9322a30 9840rm -f conftest.mmap
a3828db0 9841
81ecdfbb
RW
9842ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9843if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9844
a9322a30
TT
9845else
9846
9847cat >>confdefs.h <<_ACEOF
9848#define pid_t int
bec39cab 9849_ACEOF
086ec9eb
MK
9850
9851fi
9852
81ecdfbb
RW
9853for ac_header in vfork.h
9854do :
9855 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9856if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9857 cat >>confdefs.h <<_ACEOF
81ecdfbb 9858#define HAVE_VFORK_H 1
bec39cab 9859_ACEOF
c906108c
SS
9860
9861fi
a9322a30 9862
a3828db0 9863done
c906108c 9864
a9322a30 9865for ac_func in fork vfork
81ecdfbb
RW
9866do :
9867 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9868ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9869eval as_val=\$$as_ac_var
9870 if test "x$as_val" = x""yes; then :
a3828db0 9871 cat >>confdefs.h <<_ACEOF
81ecdfbb 9872#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9873_ACEOF
b83266a0 9874
97bf5e38 9875fi
a3828db0 9876done
b83266a0 9877
a9322a30 9878if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9880$as_echo_n "checking for working fork... " >&6; }
9881if test "${ac_cv_func_fork_works+set}" = set; then :
9882 $as_echo_n "(cached) " >&6
a9322a30 9883else
81ecdfbb 9884 if test "$cross_compiling" = yes; then :
a9322a30
TT
9885 ac_cv_func_fork_works=cross
9886else
81ecdfbb
RW
9887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9888/* end confdefs.h. */
9889$ac_includes_default
9890int
9891main ()
9892{
9893
9894 /* By Ruediger Kuhlmann. */
9895 return fork () < 0;
9896
9897 ;
9898 return 0;
9899}
a9322a30 9900_ACEOF
81ecdfbb 9901if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9902 ac_cv_func_fork_works=yes
9903else
81ecdfbb 9904 ac_cv_func_fork_works=no
a9322a30 9905fi
81ecdfbb
RW
9906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9907 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9908fi
81ecdfbb 9909
a9322a30 9910fi
81ecdfbb
RW
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9912$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9913
9914else
9915 ac_cv_func_fork_works=$ac_cv_func_fork
9916fi
9917if test "x$ac_cv_func_fork_works" = xcross; then
9918 case $host in
9919 *-*-amigaos* | *-*-msdosdjgpp*)
9920 # Override, as these systems have only a dummy fork() stub
9921 ac_cv_func_fork_works=no
9922 ;;
9923 *)
9924 ac_cv_func_fork_works=yes
9925 ;;
9926 esac
81ecdfbb
RW
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9928$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9929fi
9930ac_cv_func_vfork_works=$ac_cv_func_vfork
9931if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9933$as_echo_n "checking for working vfork... " >&6; }
9934if test "${ac_cv_func_vfork_works+set}" = set; then :
9935 $as_echo_n "(cached) " >&6
a9322a30 9936else
81ecdfbb 9937 if test "$cross_compiling" = yes; then :
a9322a30
TT
9938 ac_cv_func_vfork_works=cross
9939else
81ecdfbb 9940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9941/* end confdefs.h. */
9942/* Thanks to Paul Eggert for this test. */
81ecdfbb 9943$ac_includes_default
a9322a30 9944#include <sys/wait.h>
81ecdfbb 9945#ifdef HAVE_VFORK_H
a9322a30
TT
9946# include <vfork.h>
9947#endif
9948/* On some sparc systems, changes by the child to local and incoming
9949 argument registers are propagated back to the parent. The compiler
9950 is told about this with #include <vfork.h>, but some compilers
9951 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9952 static variable whose address is put into a register that is
9953 clobbered by the vfork. */
9954static void
9955#ifdef __cplusplus
9956sparc_address_test (int arg)
9957# else
9958sparc_address_test (arg) int arg;
9959#endif
9960{
9961 static pid_t child;
9962 if (!child) {
9963 child = vfork ();
9964 if (child < 0) {
9965 perror ("vfork");
9966 _exit(2);
9967 }
9968 if (!child) {
9969 arg = getpid();
9970 write(-1, "", 0);
9971 _exit (arg);
9972 }
9973 }
9974}
9975
9976int
9977main ()
9978{
9979 pid_t parent = getpid ();
9980 pid_t child;
9981
9982 sparc_address_test (0);
9983
9984 child = vfork ();
9985
9986 if (child == 0) {
9987 /* Here is another test for sparc vfork register problems. This
9988 test uses lots of local variables, at least as many local
9989 variables as main has allocated so far including compiler
9990 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9991 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9992 reuse the register of parent for one of the local variables,
9993 since it will think that parent can't possibly be used any more
9994 in this routine. Assigning to the local variable will thus
9995 munge parent in the parent process. */
9996 pid_t
9997 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9998 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9999 /* Convince the compiler that p..p7 are live; otherwise, it might
10000 use the same hardware register for all 8 local variables. */
10001 if (p != p1 || p != p2 || p != p3 || p != p4
10002 || p != p5 || p != p6 || p != p7)
10003 _exit(1);
10004
10005 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10006 from child file descriptors. If the child closes a descriptor
10007 before it execs or exits, this munges the parent's descriptor
10008 as well. Test for this by closing stdout in the child. */
10009 _exit(close(fileno(stdout)) != 0);
10010 } else {
10011 int status;
10012 struct stat st;
10013
10014 while (wait(&status) != child)
10015 ;
81ecdfbb 10016 return (
a9322a30
TT
10017 /* Was there some problem with vforking? */
10018 child < 0
10019
10020 /* Did the child fail? (This shouldn't happen.) */
10021 || status
10022
10023 /* Did the vfork/compiler bug occur? */
10024 || parent != getpid()
10025
10026 /* Did the file descriptor bug occur? */
10027 || fstat(fileno(stdout), &st) != 0
10028 );
10029 }
10030}
10031_ACEOF
81ecdfbb 10032if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10033 ac_cv_func_vfork_works=yes
10034else
81ecdfbb 10035 ac_cv_func_vfork_works=no
a9322a30 10036fi
81ecdfbb
RW
10037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10038 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10039fi
81ecdfbb 10040
a9322a30 10041fi
81ecdfbb
RW
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10043$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10044
10045fi;
10046if test "x$ac_cv_func_fork_works" = xcross; then
10047 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10049$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10050fi
10051
10052if test "x$ac_cv_func_vfork_works" = xyes; then
10053
81ecdfbb 10054$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10055
10056else
10057
81ecdfbb 10058$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10059
10060fi
10061if test "x$ac_cv_func_fork_works" = xyes; then
10062
81ecdfbb 10063$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10064
10065fi
10066
7313baad 10067for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10068 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10069 sbrk setpgid setpgrp setsid \
a9322a30 10070 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10071 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10072 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10073do :
10074 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10075ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10076eval as_val=\$$as_ac_var
10077 if test "x$as_val" = x""yes; then :
6c7a06a3 10078 cat >>confdefs.h <<_ACEOF
81ecdfbb 10079#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10080_ACEOF
10081
10082fi
10083done
10084
10085
81ecdfbb
RW
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10087$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10088if test "${am_cv_langinfo_codeset+set}" = set; then :
10089 $as_echo_n "(cached) " >&6
6c7a06a3 10090else
81ecdfbb 10091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10092/* end confdefs.h. */
10093#include <langinfo.h>
10094int
10095main ()
10096{
10097char* cs = nl_langinfo(CODESET);
bec39cab
AC
10098 ;
10099 return 0;
10100}
10101_ACEOF
81ecdfbb 10102if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10103 am_cv_langinfo_codeset=yes
a4db0f07 10104else
81ecdfbb 10105 am_cv_langinfo_codeset=no
a4db0f07 10106fi
81ecdfbb
RW
10107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10109
a4db0f07 10110fi
81ecdfbb
RW
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10112$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10113 if test $am_cv_langinfo_codeset = yes; then
10114
81ecdfbb 10115$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10116
6c7a06a3 10117 fi
c906108c 10118
06825bd1 10119
a3828db0
MK
10120# Check the return and argument types of ptrace. No canned test for
10121# this, so roll our own.
10122gdb_ptrace_headers='
10123#if HAVE_SYS_TYPES_H
10124# include <sys/types.h>
10125#endif
10126#if HAVE_SYS_PTRACE_H
10127# include <sys/ptrace.h>
10128#endif
10129#if HAVE_UNISTD_H
10130# include <unistd.h>
10131#endif
10132'
10133# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10134ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10135"
10136if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10137 ac_have_decl=1
06825bd1 10138else
81ecdfbb 10139 ac_have_decl=0
06825bd1 10140fi
06825bd1 10141
a3828db0 10142cat >>confdefs.h <<_ACEOF
81ecdfbb 10143#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10144_ACEOF
81ecdfbb 10145if test $ac_have_decl = 1; then :
bec39cab 10146
a3828db0 10147else
a3828db0
MK
10148
10149 : ${gdb_cv_func_ptrace_ret='int'}
10150 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10151
06825bd1
MK
10152fi
10153
064ef605
DJ
10154# Check return type. Varargs (used on GNU/Linux) conflict with the
10155# empty argument list, so check for that explicitly.
81ecdfbb
RW
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10157$as_echo_n "checking return type of ptrace... " >&6; }
10158if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10159 $as_echo_n "(cached) " >&6
bec39cab 10160else
81ecdfbb 10161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10162/* end confdefs.h. */
a3828db0 10163$gdb_ptrace_headers
bec39cab
AC
10164int
10165main ()
10166{
064ef605
DJ
10167extern long ptrace (enum __ptrace_request, ...);
10168 ;
10169 return 0;
10170}
10171_ACEOF
81ecdfbb 10172if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10173 gdb_cv_func_ptrace_ret='long'
10174else
81ecdfbb 10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10176/* end confdefs.h. */
10177$gdb_ptrace_headers
10178int
10179main ()
10180{
a3828db0 10181extern int ptrace ();
bec39cab
AC
10182 ;
10183 return 0;
10184}
10185_ACEOF
81ecdfbb 10186if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10187 gdb_cv_func_ptrace_ret='int'
70f9f479 10188else
81ecdfbb 10189 gdb_cv_func_ptrace_ret='long'
70f9f479 10190fi
81ecdfbb 10191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10192fi
81ecdfbb 10193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10194fi
81ecdfbb
RW
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10196$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10197
a3828db0
MK
10198cat >>confdefs.h <<_ACEOF
10199#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10200_ACEOF
70f9f479 10201
a3828db0 10202# Check argument types.
81ecdfbb
RW
10203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10204$as_echo_n "checking types of arguments for ptrace... " >&6; }
10205if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10206 $as_echo_n "(cached) " >&6
bec39cab 10207else
a3828db0 10208
81ecdfbb 10209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10210/* end confdefs.h. */
10211$gdb_ptrace_headers
10212int
10213main ()
10214{
10215extern long ptrace (enum __ptrace_request, ...);
10216 ;
10217 return 0;
10218}
10219_ACEOF
81ecdfbb 10220if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10221 gdb_cv_func_ptrace_args='int,int,long,long'
10222else
064ef605 10223
a3828db0
MK
10224for gdb_arg1 in 'int' 'long'; do
10225 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10226 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10227 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10229/* end confdefs.h. */
a3828db0 10230$gdb_ptrace_headers
bec39cab
AC
10231int
10232main ()
10233{
a3828db0
MK
10234
10235extern $gdb_cv_func_ptrace_ret
10236 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10237
bec39cab
AC
10238 ;
10239 return 0;
10240}
10241_ACEOF
81ecdfbb 10242if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10243 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10244 break 4;
5c7f2947 10245fi
81ecdfbb 10246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10247 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10249/* end confdefs.h. */
a3828db0 10250$gdb_ptrace_headers
bec39cab
AC
10251int
10252main ()
10253{
a3828db0
MK
10254
10255extern $gdb_cv_func_ptrace_ret
10256 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10257
bec39cab
AC
10258 ;
10259 return 0;
10260}
10261_ACEOF
81ecdfbb 10262if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10263
10264gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10265 break 5;
78434e59 10266fi
81ecdfbb 10267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10268 done
10269 done
10270 done
10271 done
10272done
10273# Provide a safe default value.
10274: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10275
064ef605 10276fi
81ecdfbb 10277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10278fi
81ecdfbb
RW
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10280$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10281ac_save_IFS=$IFS; IFS=','
10282set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10283IFS=$ac_save_IFS
10284shift
bec39cab 10285
a3828db0
MK
10286cat >>confdefs.h <<_ACEOF
10287#define PTRACE_TYPE_ARG3 $3
10288_ACEOF
10289
10290if test -n "$5"; then
10291
10292cat >>confdefs.h <<_ACEOF
10293#define PTRACE_TYPE_ARG5 $5
bec39cab 10294_ACEOF
78434e59
MK
10295
10296fi
10297
a3828db0 10298if test "$cross_compiling" = no; then
81ecdfbb
RW
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10300$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10301if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10302 $as_echo_n "(cached) " >&6
a3828db0 10303else
81ecdfbb
RW
10304 if test "$cross_compiling" = yes; then :
10305 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10306else
81ecdfbb 10307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10308/* end confdefs.h. */
81ecdfbb 10309$ac_includes_default
bec39cab
AC
10310int
10311main ()
10312{
a3828db0
MK
10313/* If this system has a BSD-style setpgrp which takes arguments,
10314 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10315 exit successfully. */
81ecdfbb 10316 return setpgrp (1,1) != -1;
bec39cab
AC
10317 ;
10318 return 0;
10319}
10320_ACEOF
81ecdfbb 10321if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10322 ac_cv_func_setpgrp_void=no
c906108c 10323else
81ecdfbb 10324 ac_cv_func_setpgrp_void=yes
c906108c 10325fi
81ecdfbb
RW
10326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10327 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10328fi
81ecdfbb 10329
a3828db0 10330fi
81ecdfbb
RW
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10332$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10333if test $ac_cv_func_setpgrp_void = yes; then
10334
81ecdfbb 10335$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10336
10337fi
a3828db0
MK
10338
10339else
81ecdfbb
RW
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10341$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10342if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10343 $as_echo_n "(cached) " >&6
97bf5e38 10344else
81ecdfbb 10345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10346/* end confdefs.h. */
a3828db0
MK
10347
10348#include <unistd.h>
10349
bec39cab
AC
10350int
10351main ()
10352{
a3828db0
MK
10353
10354 if (setpgrp(1,1) == -1)
10355 exit (0);
10356 else
10357 exit (1);
10358
bec39cab
AC
10359 ;
10360 return 0;
10361}
10362_ACEOF
81ecdfbb 10363if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10364 ac_cv_func_setpgrp_void=no
c906108c 10365else
81ecdfbb 10366 ac_cv_func_setpgrp_void=yes
c906108c 10367fi
81ecdfbb 10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10369fi
81ecdfbb
RW
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10371$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10372if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10373 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10374
a3828db0 10375fi
c906108c
SS
10376fi
10377
a3828db0
MK
10378# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10379# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10381$as_echo_n "checking for sigsetjmp... " >&6; }
10382if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10383 $as_echo_n "(cached) " >&6
bec39cab 10384else
81ecdfbb 10385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10386/* end confdefs.h. */
a3828db0
MK
10387
10388#include <setjmp.h>
10389
bec39cab
AC
10390int
10391main ()
10392{
a3828db0 10393sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10394 ;
10395 return 0;
10396}
10397_ACEOF
81ecdfbb 10398if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10399 gdb_cv_func_sigsetjmp=yes
c906108c 10400else
81ecdfbb 10401 gdb_cv_func_sigsetjmp=no
c906108c 10402fi
81ecdfbb 10403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10404fi
81ecdfbb
RW
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10406$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10407if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10408
81ecdfbb 10409$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10410
97bf5e38 10411fi
c906108c 10412
a3828db0
MK
10413# Assume we'll default to using the included libiberty regex.
10414gdb_use_included_regex=yes
10415
10416# However, if the system regex is GNU regex, then default to *not*
10417# using the included regex.
81ecdfbb
RW
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10419$as_echo_n "checking for GNU regex... " >&6; }
10420if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10421 $as_echo_n "(cached) " >&6
bec39cab 10422else
81ecdfbb 10423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10424/* end confdefs.h. */
a3828db0 10425#include <gnu-versions.h>
bec39cab
AC
10426int
10427main ()
10428{
81ecdfbb
RW
10429#define REGEX_INTERFACE_VERSION 1
10430#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10431# error "Version mismatch"
10432#endif
5c45e068
MK
10433 ;
10434 return 0;
10435}
10436_ACEOF
81ecdfbb
RW
10437if ac_fn_c_try_compile "$LINENO"; then :
10438 gdb_cv_have_gnu_regex=yes
5c45e068 10439else
81ecdfbb
RW
10440 gdb_cv_have_gnu_regex=no
10441fi
10442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10443fi
10444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10445$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10446if test $gdb_cv_have_gnu_regex = yes; then
10447 gdb_use_included_regex=no
5c45e068 10448fi
81ecdfbb
RW
10449
10450
10451# Check whether --with-included-regex was given.
10452if test "${with_included_regex+set}" = set; then :
10453 withval=$with_included_regex; gdb_with_regex=$withval
10454else
10455 gdb_with_regex=$gdb_use_included_regex
c906108c 10456fi
81ecdfbb
RW
10457
10458if test "$gdb_with_regex" = yes; then
10459
10460$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10461
c906108c 10462fi
81ecdfbb
RW
10463
10464# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10465ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10466#include <sys/proc.h>
10467
10468"
10469if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10470
5c45e068 10471cat >>confdefs.h <<_ACEOF
a3828db0 10472#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10473_ACEOF
c906108c 10474
5c45e068 10475
97bf5e38 10476fi
c906108c 10477
5c45e068 10478
a3828db0 10479# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10481$as_echo_n "checking for struct lwp... " >&6; }
10482if test "${gdb_cv_struct_lwp+set}" = set; then :
10483 $as_echo_n "(cached) " >&6
bec39cab 10484else
81ecdfbb 10485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10486/* end confdefs.h. */
a3828db0
MK
10487#include <sys/param.h>
10488#include <sys/lwp.h>
bec39cab
AC
10489int
10490main ()
10491{
a3828db0 10492struct lwp l;
bec39cab
AC
10493 ;
10494 return 0;
10495}
10496_ACEOF
81ecdfbb 10497if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10498 gdb_cv_struct_lwp=yes
c906108c 10499else
81ecdfbb 10500 gdb_cv_struct_lwp=no
c906108c 10501fi
81ecdfbb 10502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10503fi
81ecdfbb
RW
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10505$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10506if test $gdb_cv_struct_lwp = yes; then
c906108c 10507
81ecdfbb 10508$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10509
97bf5e38 10510fi
c906108c 10511
a3828db0 10512# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10514$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10515if test "${gdb_cv_struct_reg+set}" = set; then :
10516 $as_echo_n "(cached) " >&6
bec39cab 10517else
81ecdfbb 10518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10519/* end confdefs.h. */
a3828db0
MK
10520#include <sys/types.h>
10521#include <machine/reg.h>
bec39cab
AC
10522int
10523main ()
10524{
a3828db0 10525struct reg r;
bec39cab
AC
10526 ;
10527 return 0;
10528}
10529_ACEOF
81ecdfbb 10530if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10531 gdb_cv_struct_reg=yes
27ca5dad 10532else
81ecdfbb 10533 gdb_cv_struct_reg=no
27ca5dad 10534fi
81ecdfbb 10535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10536fi
81ecdfbb
RW
10537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10538$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10539if test $gdb_cv_struct_reg = yes; then
bec39cab 10540
81ecdfbb 10541$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10542
10543fi
97bf5e38 10544
a3828db0
MK
10545# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10546# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10547ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10548"
10549if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10550
10551cat >>confdefs.h <<_ACEOF
a3828db0 10552#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10553_ACEOF
3862412b 10554
5c45e068 10555
97bf5e38 10556fi
81ecdfbb
RW
10557ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10558"
10559if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10560
10561cat >>confdefs.h <<_ACEOF
a3828db0 10562#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10563_ACEOF
3862412b 10564
5c45e068 10565
97bf5e38 10566fi
3862412b 10567
5c45e068 10568
a3828db0 10569# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10571$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10572if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10573 $as_echo_n "(cached) " >&6
451928c5 10574else
81ecdfbb 10575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10576/* end confdefs.h. */
a3828db0 10577#include <sys/ptrace.h>
bec39cab
AC
10578int
10579main ()
10580{
a3828db0 10581PTRACE_GETREGS;
bec39cab
AC
10582 ;
10583 return 0;
10584}
10585_ACEOF
81ecdfbb 10586if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10587 gdb_cv_have_ptrace_getregs=yes
451928c5 10588else
81ecdfbb 10589 gdb_cv_have_ptrace_getregs=no
451928c5 10590fi
81ecdfbb 10591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10592fi
10593
81ecdfbb
RW
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10595$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10596if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10597
81ecdfbb 10598$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10599
97bf5e38 10600fi
451928c5 10601
a3828db0 10602# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10604$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10605if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10606 $as_echo_n "(cached) " >&6
451928c5 10607else
81ecdfbb 10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10609/* end confdefs.h. */
a3828db0 10610#include <sys/ptrace.h>
bec39cab
AC
10611int
10612main ()
10613{
a3828db0 10614PTRACE_GETFPXREGS;
bec39cab
AC
10615 ;
10616 return 0;
10617}
10618_ACEOF
81ecdfbb 10619if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10620 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10621else
81ecdfbb 10622 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10623fi
81ecdfbb 10624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10625fi
10626
81ecdfbb
RW
10627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10628$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10629if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10630
81ecdfbb 10631$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10632
97bf5e38 10633fi
451928c5 10634
a3828db0 10635# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10637$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10638if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10639 $as_echo_n "(cached) " >&6
3862412b 10640else
81ecdfbb 10641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10642/* end confdefs.h. */
a3828db0
MK
10643#include <sys/types.h>
10644#include <sys/ptrace.h>
bec39cab
AC
10645int
10646main ()
10647{
a3828db0 10648PT_GETDBREGS;
bec39cab
AC
10649 ;
10650 return 0;
10651}
10652_ACEOF
81ecdfbb 10653if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10654 gdb_cv_have_pt_getdbregs=yes
3862412b 10655else
81ecdfbb 10656 gdb_cv_have_pt_getdbregs=no
3862412b 10657fi
81ecdfbb 10658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10659fi
10660
81ecdfbb
RW
10661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10662$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10663if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10664
81ecdfbb 10665$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10666
97bf5e38 10667fi
3862412b 10668
a3828db0 10669# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10671$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10672if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10673 $as_echo_n "(cached) " >&6
3862412b 10674else
81ecdfbb 10675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10676/* end confdefs.h. */
a3828db0
MK
10677#include <sys/types.h>
10678#include <sys/ptrace.h>
bec39cab
AC
10679int
10680main ()
10681{
a3828db0 10682PT_GETXMMREGS;
bec39cab
AC
10683 ;
10684 return 0;
10685}
10686_ACEOF
81ecdfbb 10687if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10688 gdb_cv_have_pt_getxmmregs=yes
3862412b 10689else
81ecdfbb 10690 gdb_cv_have_pt_getxmmregs=no
3862412b 10691fi
81ecdfbb 10692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10693fi
10694
81ecdfbb
RW
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10696$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10697if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10698
81ecdfbb 10699$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10700
97bf5e38 10701fi
3862412b 10702
eb368090 10703# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10704
10705if test "${target}" = "${host}"; then
10706 case "${host}" in
97bf5e38 10707 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10708
81ecdfbb 10709$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10710
10711 ;;
c162e8c9 10712 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10713
81ecdfbb 10714$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10715
10716 ;;
10717 mips-sgi-irix5*)
10718 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10719
81ecdfbb 10720$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10721
10722 ;;
10723 esac
10724fi
10725
10726if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10728$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10729 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10730 $as_echo_n "(cached) " >&6
bec39cab 10731else
81ecdfbb 10732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10733/* end confdefs.h. */
596c9d4b
KB
10734
10735#define _SYSCALL32
d30c5336
JK
10736/* Needed for new procfs interface on sparc-solaris. */
10737#define _STRUCTURED_PROC 1
596c9d4b 10738#include <sys/procfs.h>
bec39cab
AC
10739int
10740main ()
10741{
97bf5e38 10742pstatus_t avar
bec39cab
AC
10743 ;
10744 return 0;
10745}
10746_ACEOF
81ecdfbb 10747if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10748 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10749else
81ecdfbb 10750 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10751
596c9d4b 10752fi
81ecdfbb 10753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10754fi
10755
97bf5e38 10756 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10757
81ecdfbb 10758$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10759
10760 fi
81ecdfbb
RW
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10762$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10763
81ecdfbb
RW
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10765$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10766 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10767 $as_echo_n "(cached) " >&6
596c9d4b 10768else
81ecdfbb 10769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10770/* end confdefs.h. */
596c9d4b
KB
10771
10772#define _SYSCALL32
d30c5336
JK
10773/* Needed for new procfs interface on sparc-solaris. */
10774#define _STRUCTURED_PROC 1
596c9d4b 10775#include <sys/procfs.h>
bec39cab
AC
10776int
10777main ()
10778{
97bf5e38 10779prrun_t avar
bec39cab
AC
10780 ;
10781 return 0;
10782}
10783_ACEOF
81ecdfbb 10784if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10785 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10786else
81ecdfbb 10787 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10788
596c9d4b 10789fi
81ecdfbb 10790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10791fi
10792
97bf5e38 10793 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10794
81ecdfbb 10795$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10796
10797 fi
81ecdfbb
RW
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10799$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10800
81ecdfbb
RW
10801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10802$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10803 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10804 $as_echo_n "(cached) " >&6
596c9d4b 10805else
81ecdfbb 10806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10807/* end confdefs.h. */
596c9d4b
KB
10808
10809#define _SYSCALL32
d30c5336
JK
10810/* Needed for new procfs interface on sparc-solaris. */
10811#define _STRUCTURED_PROC 1
596c9d4b 10812#include <sys/procfs.h>
bec39cab
AC
10813int
10814main ()
10815{
97bf5e38 10816gregset_t avar
bec39cab
AC
10817 ;
10818 return 0;
10819}
10820_ACEOF
81ecdfbb 10821if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10822 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10823else
81ecdfbb 10824 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10825
596c9d4b 10826fi
81ecdfbb 10827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10828fi
10829
97bf5e38 10830 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10831
81ecdfbb 10832$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10833
10834 fi
81ecdfbb
RW
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10836$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10837
81ecdfbb
RW
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10839$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10840 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10841 $as_echo_n "(cached) " >&6
d84dd0c5 10842else
81ecdfbb 10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10844/* end confdefs.h. */
97bf5e38
MK
10845
10846#define _SYSCALL32
d30c5336
JK
10847/* Needed for new procfs interface on sparc-solaris. */
10848#define _STRUCTURED_PROC 1
d84dd0c5 10849#include <sys/procfs.h>
bec39cab
AC
10850int
10851main ()
10852{
97bf5e38 10853fpregset_t avar
bec39cab
AC
10854 ;
10855 return 0;
10856}
10857_ACEOF
81ecdfbb 10858if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10859 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10860else
81ecdfbb 10861 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10862
d84dd0c5 10863fi
81ecdfbb 10864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10865fi
10866
97bf5e38 10867 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10868
81ecdfbb 10869$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10870
97bf5e38 10871 fi
81ecdfbb
RW
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10873$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 10874
81ecdfbb
RW
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10876$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10877 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
10878 $as_echo_n "(cached) " >&6
c906108c 10879else
81ecdfbb 10880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10881/* end confdefs.h. */
c906108c 10882
97bf5e38 10883#define _SYSCALL32
d30c5336
JK
10884/* Needed for new procfs interface on sparc-solaris. */
10885#define _STRUCTURED_PROC 1
97bf5e38 10886#include <sys/procfs.h>
bec39cab
AC
10887int
10888main ()
10889{
97bf5e38 10890prgregset_t avar
bec39cab
AC
10891 ;
10892 return 0;
10893}
10894_ACEOF
81ecdfbb 10895if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10896 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 10897else
81ecdfbb 10898 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 10899
c906108c 10900fi
81ecdfbb 10901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
10902fi
10903
97bf5e38 10904 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 10905
81ecdfbb 10906$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 10907
97bf5e38 10908 fi
81ecdfbb
RW
10909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10910$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 10911
81ecdfbb
RW
10912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10913$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10914 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
10915 $as_echo_n "(cached) " >&6
d45fe813 10916else
81ecdfbb 10917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10918/* end confdefs.h. */
97bf5e38
MK
10919
10920#define _SYSCALL32
d30c5336
JK
10921/* Needed for new procfs interface on sparc-solaris. */
10922#define _STRUCTURED_PROC 1
97bf5e38 10923#include <sys/procfs.h>
bec39cab
AC
10924int
10925main ()
10926{
97bf5e38 10927prfpregset_t avar
bec39cab
AC
10928 ;
10929 return 0;
10930}
10931_ACEOF
81ecdfbb 10932if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10933 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 10934else
81ecdfbb 10935 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 10936
d45fe813 10937fi
81ecdfbb 10938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10939fi
10940
97bf5e38 10941 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 10942
81ecdfbb 10943$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 10944
97bf5e38 10945 fi
81ecdfbb
RW
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10947$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 10948
81ecdfbb
RW
10949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10950$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10951 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
10952 $as_echo_n "(cached) " >&6
d45fe813 10953else
81ecdfbb 10954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10955/* end confdefs.h. */
97bf5e38
MK
10956
10957#define _SYSCALL32
d30c5336
JK
10958/* Needed for new procfs interface on sparc-solaris. */
10959#define _STRUCTURED_PROC 1
97bf5e38 10960#include <sys/procfs.h>
bec39cab
AC
10961int
10962main ()
10963{
97bf5e38 10964prgregset32_t avar
bec39cab
AC
10965 ;
10966 return 0;
10967}
10968_ACEOF
81ecdfbb 10969if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10970 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 10971else
81ecdfbb 10972 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 10973
d45fe813 10974fi
81ecdfbb 10975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10976fi
10977
97bf5e38 10978 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 10979
81ecdfbb 10980$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 10981
97bf5e38 10982 fi
81ecdfbb
RW
10983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10984$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 10985
81ecdfbb
RW
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
10987$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
10988 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
10989 $as_echo_n "(cached) " >&6
d45fe813 10990else
81ecdfbb 10991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10992/* end confdefs.h. */
97bf5e38
MK
10993
10994#define _SYSCALL32
d30c5336
JK
10995/* Needed for new procfs interface on sparc-solaris. */
10996#define _STRUCTURED_PROC 1
97bf5e38 10997#include <sys/procfs.h>
bec39cab
AC
10998int
10999main ()
11000{
97bf5e38 11001prfpregset32_t avar
bec39cab
AC
11002 ;
11003 return 0;
11004}
11005_ACEOF
81ecdfbb 11006if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11007 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 11008else
81ecdfbb 11009 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 11010
d45fe813 11011fi
81ecdfbb 11012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11013fi
11014
97bf5e38 11015 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 11016
81ecdfbb 11017$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 11018
97bf5e38 11019 fi
81ecdfbb
RW
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
11021$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 11022
81ecdfbb
RW
11023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11024$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11025 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11026 $as_echo_n "(cached) " >&6
d45fe813 11027else
81ecdfbb 11028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11029/* end confdefs.h. */
97bf5e38 11030
d45fe813 11031#define _SYSCALL32
d30c5336
JK
11032/* Needed for new procfs interface on sparc-solaris. */
11033#define _STRUCTURED_PROC 1
97bf5e38 11034#include <sys/procfs.h>
bec39cab
AC
11035int
11036main ()
11037{
97bf5e38 11038lwpid_t avar
bec39cab
AC
11039 ;
11040 return 0;
11041}
11042_ACEOF
81ecdfbb 11043if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11044 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11045else
81ecdfbb 11046 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11047
d45fe813 11048fi
81ecdfbb 11049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11050fi
11051
97bf5e38 11052 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11053
81ecdfbb 11054$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11055
97bf5e38 11056 fi
81ecdfbb
RW
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11058$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11059
81ecdfbb
RW
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11061$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11062 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11063 $as_echo_n "(cached) " >&6
c906108c 11064else
81ecdfbb 11065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11066/* end confdefs.h. */
c906108c 11067
97bf5e38 11068#define _SYSCALL32
d30c5336
JK
11069/* Needed for new procfs interface on sparc-solaris. */
11070#define _STRUCTURED_PROC 1
97bf5e38 11071#include <sys/procfs.h>
bec39cab
AC
11072int
11073main ()
11074{
97bf5e38 11075psaddr_t avar
bec39cab
AC
11076 ;
11077 return 0;
11078}
11079_ACEOF
81ecdfbb 11080if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11081 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11082else
81ecdfbb 11083 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11084
c906108c 11085fi
81ecdfbb 11086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11087fi
11088
97bf5e38 11089 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11090
81ecdfbb 11091$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11092
97bf5e38 11093 fi
81ecdfbb
RW
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11095$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11096
81ecdfbb
RW
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11098$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11099 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11100 $as_echo_n "(cached) " >&6
c906108c 11101else
81ecdfbb 11102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11103/* end confdefs.h. */
c906108c 11104
97bf5e38 11105#define _SYSCALL32
d30c5336
JK
11106/* Needed for new procfs interface on sparc-solaris. */
11107#define _STRUCTURED_PROC 1
97bf5e38 11108#include <sys/procfs.h>
bec39cab
AC
11109int
11110main ()
11111{
97bf5e38 11112prsysent_t avar
bec39cab
AC
11113 ;
11114 return 0;
11115}
11116_ACEOF
81ecdfbb 11117if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11118 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11119else
81ecdfbb 11120 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11121
c906108c 11122fi
81ecdfbb 11123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11124fi
11125
97bf5e38 11126 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11127
81ecdfbb 11128$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11129
97bf5e38 11130 fi
81ecdfbb
RW
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11132$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11133
81ecdfbb
RW
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11135$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11136 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11137 $as_echo_n "(cached) " >&6
c906108c 11138else
81ecdfbb 11139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11140/* end confdefs.h. */
c906108c 11141
97bf5e38 11142#define _SYSCALL32
d30c5336
JK
11143/* Needed for new procfs interface on sparc-solaris. */
11144#define _STRUCTURED_PROC 1
97bf5e38 11145#include <sys/procfs.h>
bec39cab
AC
11146int
11147main ()
11148{
97bf5e38 11149pr_sigset_t avar
bec39cab
AC
11150 ;
11151 return 0;
11152}
11153_ACEOF
81ecdfbb 11154if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11155 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11156else
81ecdfbb 11157 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11158
c906108c 11159fi
81ecdfbb 11160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11161fi
11162
97bf5e38 11163 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11164
81ecdfbb 11165$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11166
97bf5e38 11167 fi
81ecdfbb
RW
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11169$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11170
81ecdfbb
RW
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11172$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11173 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11174 $as_echo_n "(cached) " >&6
c906108c 11175else
81ecdfbb 11176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11177/* end confdefs.h. */
c906108c 11178
97bf5e38 11179#define _SYSCALL32
d30c5336
JK
11180/* Needed for new procfs interface on sparc-solaris. */
11181#define _STRUCTURED_PROC 1
97bf5e38 11182#include <sys/procfs.h>
bec39cab
AC
11183int
11184main ()
11185{
97bf5e38 11186pr_sigaction64_t avar
bec39cab
AC
11187 ;
11188 return 0;
11189}
11190_ACEOF
81ecdfbb 11191if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11192 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11193else
81ecdfbb 11194 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11195
c906108c 11196fi
81ecdfbb 11197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11198fi
11199
97bf5e38 11200 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11201
81ecdfbb 11202$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11203
97bf5e38 11204 fi
81ecdfbb
RW
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11206$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11207
81ecdfbb
RW
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11209$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11210 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11211 $as_echo_n "(cached) " >&6
97bf5e38 11212else
81ecdfbb 11213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11214/* end confdefs.h. */
97bf5e38
MK
11215
11216#define _SYSCALL32
d30c5336
JK
11217/* Needed for new procfs interface on sparc-solaris. */
11218#define _STRUCTURED_PROC 1
97bf5e38 11219#include <sys/procfs.h>
bec39cab
AC
11220int
11221main ()
11222{
97bf5e38 11223pr_siginfo64_t avar
bec39cab
AC
11224 ;
11225 return 0;
11226}
11227_ACEOF
81ecdfbb 11228if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11229 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11230else
81ecdfbb 11231 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11232
97bf5e38 11233fi
81ecdfbb 11234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11235fi
c906108c 11236
97bf5e38 11237 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11238
81ecdfbb 11239$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11240
97bf5e38 11241 fi
81ecdfbb
RW
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11243$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11244
11245
97bf5e38
MK
11246
11247
11248
97bf5e38 11249 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11251$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11252 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11253 $as_echo_n "(cached) " >&6
c906108c 11254else
81ecdfbb 11255 if test "$cross_compiling" = yes; then :
97bf5e38 11256 gdb_cv_prfpregset_t_broken=yes
c906108c 11257else
81ecdfbb 11258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11259/* end confdefs.h. */
97bf5e38
MK
11260#include <sys/procfs.h>
11261 int main ()
11262 {
11263 if (sizeof (prfpregset_t) == sizeof (void *))
11264 return 1;
11265 return 0;
11266 }
bec39cab 11267_ACEOF
81ecdfbb 11268if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11269 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11270else
11271 gdb_cv_prfpregset_t_broken=yes
c906108c 11272fi
81ecdfbb
RW
11273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11274 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11275fi
81ecdfbb 11276
c906108c
SS
11277fi
11278
81ecdfbb
RW
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11280$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11281 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11282
81ecdfbb 11283$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11284
97bf5e38
MK
11285 fi
11286 fi
c906108c 11287
bec39cab 11288
81ecdfbb
RW
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11290$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11291 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11292 $as_echo_n "(cached) " >&6
c906108c 11293else
81ecdfbb 11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11295/* end confdefs.h. */
97bf5e38
MK
11296#include <unistd.h>
11297#include <sys/types.h>
11298#include <sys/procfs.h>
11299
bec39cab
AC
11300int
11301main ()
11302{
97bf5e38
MK
11303
11304 int dummy;;
11305 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11306
11307 ;
11308 return 0;
11309}
11310_ACEOF
81ecdfbb 11311if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11312 gdb_cv_have_procfs_piocset=yes
c906108c 11313else
81ecdfbb 11314 gdb_cv_have_procfs_piocset=no
c906108c 11315fi
81ecdfbb 11316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11317fi
97bf5e38 11318
81ecdfbb
RW
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11320$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11321 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11322
81ecdfbb 11323$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11324
11325 fi
c906108c 11326fi
c906108c 11327
97bf5e38 11328if test ${host} = ${target} ; then
bec39cab 11329
81ecdfbb
RW
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11331$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11332 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11333 $as_echo_n "(cached) " >&6
bec39cab 11334else
81ecdfbb 11335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11336/* end confdefs.h. */
97bf5e38 11337#include <link.h>
bec39cab
AC
11338int
11339main ()
11340{
97bf5e38 11341struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11342 ;
11343 return 0;
11344}
11345_ACEOF
81ecdfbb 11346if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11347 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11348else
81ecdfbb 11349 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11350fi
81ecdfbb 11351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11352fi
11353
81ecdfbb
RW
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11355$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11356 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11357
81ecdfbb 11358$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11359
11360 fi
11361
bec39cab 11362
81ecdfbb
RW
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11364$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11365 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11366 $as_echo_n "(cached) " >&6
c906108c 11367else
81ecdfbb 11368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11369/* end confdefs.h. */
97bf5e38
MK
11370#include <sys/types.h>
11371#include <link.h>
bec39cab
AC
11372int
11373main ()
11374{
97bf5e38 11375struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11376 ;
11377 return 0;
11378}
11379_ACEOF
81ecdfbb 11380if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11381 gdb_cv_have_struct_link_map_with_lm_members=yes
11382else
81ecdfbb 11383 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11384fi
81ecdfbb 11385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11386fi
c906108c 11387
81ecdfbb
RW
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11389$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11390 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11391
81ecdfbb 11392$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11393
11394 fi
11395
bec39cab 11396
81ecdfbb
RW
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11398$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11399 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11400 $as_echo_n "(cached) " >&6
c906108c 11401else
81ecdfbb 11402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11403/* end confdefs.h. */
97bf5e38
MK
11404#include <sys/types.h>
11405#ifdef HAVE_NLIST_H
11406#include <nlist.h>
11407#endif
11408#include <link.h>
bec39cab
AC
11409int
11410main ()
11411{
97bf5e38 11412struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11413 ;
11414 return 0;
11415}
11416_ACEOF
81ecdfbb 11417if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11418 gdb_cv_have_struct_so_map_with_som_members=yes
11419else
81ecdfbb 11420 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11421fi
81ecdfbb 11422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11423fi
c906108c 11424
81ecdfbb
RW
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11426$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11427 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11428
81ecdfbb 11429$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11430
97bf5e38 11431 fi
c906108c 11432
bec39cab 11433
81ecdfbb
RW
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11435$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11436 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11437 $as_echo_n "(cached) " >&6
97bf5e38 11438else
81ecdfbb 11439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11440/* end confdefs.h. */
97bf5e38
MK
11441#define _SYSCALL32
11442#include <sys/link.h>
bec39cab
AC
11443int
11444main ()
11445{
97bf5e38 11446struct link_map32 l;
bec39cab
AC
11447 ;
11448 return 0;
11449}
11450_ACEOF
81ecdfbb 11451if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11452 gdb_cv_have_struct_link_map32=yes
11453else
81ecdfbb 11454 gdb_cv_have_struct_link_map32=no
97bf5e38 11455fi
81ecdfbb 11456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11457fi
c906108c 11458
81ecdfbb
RW
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11460$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11461 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11462
81ecdfbb 11463$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11464
60ca704f 11465
81ecdfbb 11466$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11467
97bf5e38
MK
11468 fi
11469fi
c906108c 11470
bc8bcb4b 11471# Check if the compiler supports the `long long' type.
c906108c 11472
81ecdfbb
RW
11473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11474$as_echo_n "checking for long long support in compiler... " >&6; }
11475if test "${gdb_cv_c_long_long+set}" = set; then :
11476 $as_echo_n "(cached) " >&6
97bf5e38 11477else
81ecdfbb 11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11479/* end confdefs.h. */
bc8bcb4b 11480extern long long foo;
bec39cab
AC
11481int
11482main ()
11483{
bc8bcb4b 11484switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11485 ;
11486 return 0;
11487}
11488_ACEOF
81ecdfbb 11489if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11490 gdb_cv_c_long_long=yes
11491else
81ecdfbb 11492 gdb_cv_c_long_long=no
97bf5e38 11493fi
81ecdfbb 11494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11495fi
81ecdfbb
RW
11496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11497$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11498if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11499
81ecdfbb 11500$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11501
11502fi
11503
bc8bcb4b 11504# Check if the compiler and runtime support printing long longs.
97bf5e38 11505
81ecdfbb
RW
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11507$as_echo_n "checking for long long support in printf... " >&6; }
11508if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11509 $as_echo_n "(cached) " >&6
97bf5e38 11510else
81ecdfbb 11511 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11512 gdb_cv_printf_has_long_long=no
11513else
81ecdfbb 11514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11515/* end confdefs.h. */
bc8bcb4b
MK
11516$ac_includes_default
11517int
11518main ()
11519{
11520char buf[32];
97bf5e38
MK
11521 long long l = 0;
11522 l = (l << 16) + 0x0123;
11523 l = (l << 16) + 0x4567;
11524 l = (l << 16) + 0x89ab;
11525 l = (l << 16) + 0xcdef;
11526 sprintf (buf, "0x%016llx", l);
11527 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11528 ;
11529 return 0;
c906108c 11530}
bec39cab 11531_ACEOF
81ecdfbb 11532if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11533 gdb_cv_printf_has_long_long=yes
11534else
81ecdfbb 11535 gdb_cv_printf_has_long_long=no
97bf5e38 11536fi
81ecdfbb
RW
11537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11538 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11539fi
81ecdfbb 11540
97bf5e38 11541fi
81ecdfbb
RW
11542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11543$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11544if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11545
81ecdfbb 11546$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11547
11548fi
97bf5e38 11549
1a619819
LM
11550# Check if the compiler and runtime support printing decfloats.
11551
81ecdfbb
RW
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11553$as_echo_n "checking for decfloat support in printf... " >&6; }
11554if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11555 $as_echo_n "(cached) " >&6
1a619819 11556else
81ecdfbb 11557 if test "$cross_compiling" = yes; then :
1a619819
LM
11558 gdb_cv_printf_has_decfloat=no
11559else
81ecdfbb 11560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11561/* end confdefs.h. */
11562$ac_includes_default
11563int
11564main ()
11565{
11566char buf[64];
11567 _Decimal32 d32 = 1.2345df;
11568 _Decimal64 d64 = 1.2345dd;
11569 _Decimal128 d128 = 1.2345dl;
11570 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11571 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11572 ;
11573 return 0;
11574}
11575_ACEOF
81ecdfbb 11576if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11577 gdb_cv_printf_has_decfloat=yes
11578else
81ecdfbb 11579 gdb_cv_printf_has_decfloat=no
1a619819 11580fi
81ecdfbb
RW
11581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11582 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11583fi
81ecdfbb 11584
1a619819 11585fi
81ecdfbb
RW
11586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11587$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11588if test $gdb_cv_printf_has_decfloat = yes; then
11589
81ecdfbb 11590$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11591
11592fi
11593
bc8bcb4b
MK
11594# Check if the compiler supports the `long double' type. We can't use
11595# AC_C_LONG_DOUBLE because that one does additional checks on the
11596# constants defined in <float.h> that fail on some systems,
11597# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11598
81ecdfbb
RW
11599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11600$as_echo_n "checking for long double support in compiler... " >&6; }
11601if test "${gdb_cv_c_long_double+set}" = set; then :
11602 $as_echo_n "(cached) " >&6
97bf5e38 11603else
81ecdfbb 11604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11605/* end confdefs.h. */
97bf5e38 11606long double foo;
bec39cab 11607_ACEOF
81ecdfbb 11608if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11609 gdb_cv_c_long_double=yes
97bf5e38 11610else
81ecdfbb 11611 gdb_cv_c_long_double=no
97bf5e38 11612fi
81ecdfbb 11613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11614fi
81ecdfbb
RW
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11616$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11617if test $gdb_cv_c_long_double = yes; then
c906108c 11618
81ecdfbb 11619$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11620
11621fi
11622
bc8bcb4b 11623# Check if the compiler and runtime support printing long doubles.
97bf5e38 11624
81ecdfbb
RW
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11626$as_echo_n "checking for long double support in printf... " >&6; }
11627if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11628 $as_echo_n "(cached) " >&6
97bf5e38 11629else
81ecdfbb 11630 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11631 gdb_cv_printf_has_long_double=no
11632else
81ecdfbb 11633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11634/* end confdefs.h. */
bc8bcb4b
MK
11635$ac_includes_default
11636int
11637main ()
11638{
11639char buf[16];
97bf5e38
MK
11640 long double f = 3.141592653;
11641 sprintf (buf, "%Lg", f);
11642 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11643 ;
11644 return 0;
97bf5e38 11645}
bec39cab 11646_ACEOF
81ecdfbb 11647if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11648 gdb_cv_printf_has_long_double=yes
c906108c 11649else
81ecdfbb 11650 gdb_cv_printf_has_long_double=no
c906108c 11651fi
81ecdfbb
RW
11652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11653 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11654fi
81ecdfbb 11655
c906108c 11656fi
81ecdfbb
RW
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11658$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11659if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11660
81ecdfbb 11661$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11662
11663fi
97bf5e38 11664
bc8bcb4b 11665# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11666
81ecdfbb
RW
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11668$as_echo_n "checking for long double support in scanf... " >&6; }
11669if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11670 $as_echo_n "(cached) " >&6
97bf5e38 11671else
81ecdfbb 11672 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11673 gdb_cv_scanf_has_long_double=no
11674else
81ecdfbb 11675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11676/* end confdefs.h. */
bc8bcb4b
MK
11677#include <stdio.h>
11678int
11679main ()
11680{
11681char *buf = "3.141592653";
97bf5e38
MK
11682 long double f = 0;
11683 sscanf (buf, "%Lg", &f);
11684 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11685 ;
11686 return 0;
97bf5e38 11687}
bec39cab 11688_ACEOF
81ecdfbb 11689if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11690 gdb_cv_scanf_has_long_double=yes
11691else
81ecdfbb 11692 gdb_cv_scanf_has_long_double=no
97bf5e38 11693fi
81ecdfbb
RW
11694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11695 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11696fi
81ecdfbb 11697
c906108c 11698fi
81ecdfbb
RW
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11700$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11701if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11702
81ecdfbb 11703$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11704
11705fi
c906108c 11706
438013df
AO
11707case ${host_os} in
11708aix*)
81ecdfbb
RW
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11710$as_echo_n "checking for -bbigtoc option... " >&6; }
11711if test "${gdb_cv_bigtoc+set}" = set; then :
11712 $as_echo_n "(cached) " >&6
438013df 11713else
bec39cab 11714
438013df
AO
11715 SAVE_LDFLAGS=$LDFLAGS
11716
11717 case $GCC in
11718 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11719 *) gdb_cv_bigtoc=-bbigtoc ;;
11720 esac
11721
11722 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11724/* end confdefs.h. */
438013df 11725
bec39cab
AC
11726int
11727main ()
11728{
438013df 11729int i;
bec39cab
AC
11730 ;
11731 return 0;
11732}
11733_ACEOF
81ecdfbb 11734if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11735
81ecdfbb
RW
11736else
11737 gdb_cv_bigtoc=
438013df 11738fi
81ecdfbb
RW
11739rm -f core conftest.err conftest.$ac_objext \
11740 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11741 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11742
bec39cab 11743fi
81ecdfbb
RW
11744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11745$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11746 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11747 ;;
11748esac
11749
38f6b338 11750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11751$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11752dynamic_list=false
11753if test "${gdb_native}" = yes; then
11754 # The dynamically loaded libthread_db needs access to symbols in the gdb
11755 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11756 # may not be supported there.
11757 old_LDFLAGS="$LDFLAGS"
11758 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11759 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11760 LDFLAGS="$LDFLAGS $RDYNAMIC"
11761 if test "${have_libpython}" = no; then
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11763/* end confdefs.h. */
11764
11765int
11766main ()
11767{
11768
11769 ;
11770 return 0;
11771}
11772_ACEOF
11773if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11774 dynamic_list=true
11775fi
11776rm -f core conftest.err conftest.$ac_objext \
11777 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11778 else
11779 # Workaround http://bugs.python.org/issue4434 where static
11780 # libpythonX.Y.a would get its symbols required for
11781 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11782 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11783 old_CFLAGS="$CFLAGS"
11784 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11785 if test "$cross_compiling" = yes; then :
3bebe2f2 11786 true
f6528abd 11787else
3bebe2f2
JK
11788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11789/* end confdefs.h. */
11790#include "${have_libpython}/Python.h"
11791int
11792main ()
11793{
11794int err;
38f6b338
JK
11795 Py_Initialize ();
11796 err = PyRun_SimpleString ("import itertools\n");
11797 Py_Finalize ();
11798 return err == 0 ? 0 : 1;
3bebe2f2
JK
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803if ac_fn_c_try_run "$LINENO"; then :
11804 dynamic_list=true
11805fi
11806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11807 conftest.$ac_objext conftest.beam conftest.$ac_ext
11808fi
11809
38f6b338
JK
11810 CFLAGS="$old_CFLAGS"
11811 fi
11812 LDFLAGS="$old_LDFLAGS"
11813fi
11814if $dynamic_list; then
11815 found="-Wl,--dynamic-list"
11816 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11817else
38f6b338
JK
11818 found="-rdynamic"
11819 RDYNAMIC="-rdynamic"
f6528abd 11820fi
f6528abd 11821
38f6b338 11822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11823$as_echo "$found" >&6; }
0407b3f1 11824
f6528abd 11825
0407b3f1 11826if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11827 case ${host_os} in
c906108c 11828 solaris*)
d92419e5
JB
11829 # See if thread_db library is around for Solaris thread debugging.
11830 # Note that we must explicitly test for version 1 of the library
11831 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11832 # the same API.
81ecdfbb
RW
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11834$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11835 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11837$as_echo "yes" >&6; }
60ca704f 11838
81ecdfbb 11839$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11840
3483b318 11841 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11842 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11844$as_echo_n "checking for dlopen in -ldl... " >&6; }
11845if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11846 $as_echo_n "(cached) " >&6
c906108c 11847else
bec39cab 11848 ac_check_lib_save_LIBS=$LIBS
c906108c 11849LIBS="-ldl $LIBS"
81ecdfbb 11850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11851/* end confdefs.h. */
11852
81ecdfbb
RW
11853/* Override any GCC internal prototype to avoid an error.
11854 Use char because int might match the return type of a GCC
11855 builtin and then its argument prototype would still apply. */
bec39cab
AC
11856#ifdef __cplusplus
11857extern "C"
11858#endif
bec39cab
AC
11859char dlopen ();
11860int
11861main ()
11862{
81ecdfbb 11863return dlopen ();
bec39cab
AC
11864 ;
11865 return 0;
11866}
11867_ACEOF
81ecdfbb 11868if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11869 ac_cv_lib_dl_dlopen=yes
11870else
81ecdfbb 11871 ac_cv_lib_dl_dlopen=no
bec39cab 11872fi
81ecdfbb
RW
11873rm -f core conftest.err conftest.$ac_objext \
11874 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11875LIBS=$ac_check_lib_save_LIBS
11876fi
81ecdfbb
RW
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11878$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11879if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11880 cat >>confdefs.h <<_ACEOF
11881#define HAVE_LIBDL 1
11882_ACEOF
c906108c
SS
11883
11884 LIBS="-ldl $LIBS"
11885
c906108c
SS
11886fi
11887
f6528abd 11888 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
11889 # Sun randomly tweaked the prototypes in <proc_service.h>
11890 # at one point.
81ecdfbb
RW
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
11892$as_echo_n "checking if <proc_service.h> is old... " >&6; }
11893 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
11894 $as_echo_n "(cached) " >&6
c906108c 11895else
bec39cab 11896
81ecdfbb 11897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11898/* end confdefs.h. */
c906108c
SS
11899
11900 #include <proc_service.h>
11901 ps_err_e ps_pdwrite
11902 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 11903
bec39cab
AC
11904int
11905main ()
11906{
11907
11908 ;
11909 return 0;
11910}
11911_ACEOF
81ecdfbb 11912if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
11913 gdb_cv_proc_service_is_old=no
11914else
81ecdfbb 11915 gdb_cv_proc_service_is_old=yes
c906108c 11916fi
81ecdfbb 11917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11918
c906108c
SS
11919fi
11920
81ecdfbb
RW
11921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
11922$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 11923 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 11924
81ecdfbb 11925$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
11926
11927 fi
11928 else
81ecdfbb
RW
11929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
c906108c
SS
11931 fi
11932 ;;
d92419e5 11933 aix*)
81ecdfbb
RW
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
11935$as_echo_n "checking for AiX thread debugging library... " >&6; }
11936 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
11937 $as_echo_n "(cached) " >&6
bec39cab 11938else
81ecdfbb 11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11940/* end confdefs.h. */
d92419e5 11941#include <sys/pthdebug.h>
bec39cab
AC
11942int
11943main ()
11944{
d92419e5
JB
11945#ifndef PTHDB_VERSION_3
11946 #error
11947 #endif
bec39cab
AC
11948 ;
11949 return 0;
11950}
11951_ACEOF
81ecdfbb 11952if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
11953 gdb_cv_have_aix_thread_debug=yes
11954else
81ecdfbb 11955 gdb_cv_have_aix_thread_debug=no
d92419e5 11956fi
81ecdfbb 11957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
11958fi
11959
81ecdfbb
RW
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
11961$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
11962 if test $gdb_cv_have_aix_thread_debug = yes; then
11963 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 11964 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 11965 LIBS="$LIBS -lpthdebug"
d645e32e
JB
11966
11967 # Older versions of AIX do not provide the declaration for
11968 # the getthrds function (it appears that it was introduced
11969 # with AIX 6.x).
11970 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
11971"
11972if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
11973 ac_have_decl=1
11974else
11975 ac_have_decl=0
11976fi
11977
11978cat >>confdefs.h <<_ACEOF
11979#define HAVE_DECL_GETTHRDS $ac_have_decl
11980_ACEOF
11981
d92419e5
JB
11982 fi
11983 ;;
c906108c 11984 esac
bec39cab 11985
c906108c
SS
11986fi
11987
3f47be5c 11988if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
11990$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
11991if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
11992 $as_echo_n "(cached) " >&6
bec39cab 11993else
81ecdfbb 11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11995/* end confdefs.h. */
3f47be5c 11996#include <thread_db.h>
bec39cab
AC
11997int
11998main ()
11999{
3f47be5c 12000int i = TD_NOTALLOC;
bec39cab
AC
12001 ;
12002 return 0;
12003}
12004_ACEOF
81ecdfbb 12005if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12006 gdb_cv_thread_db_h_has_td_notalloc=yes
12007else
81ecdfbb 12008 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12009
3f47be5c 12010fi
81ecdfbb 12011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12012
bec39cab 12013fi
81ecdfbb
RW
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12015$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12017$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12018if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12019 $as_echo_n "(cached) " >&6
59f80f10 12020else
81ecdfbb 12021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12022/* end confdefs.h. */
12023#include <thread_db.h>
12024int
12025main ()
12026{
12027int i = TD_VERSION;
12028 ;
12029 return 0;
12030}
12031_ACEOF
81ecdfbb 12032if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12033 gdb_cv_thread_db_h_has_td_version=yes
12034else
81ecdfbb 12035 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12036
12037fi
81ecdfbb 12038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12039
12040fi
81ecdfbb
RW
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12042$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12044$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12045if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12046 $as_echo_n "(cached) " >&6
59f80f10 12047else
81ecdfbb 12048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12049/* end confdefs.h. */
12050#include <thread_db.h>
12051int
12052main ()
12053{
12054int i = TD_NOTLS;
12055 ;
12056 return 0;
12057}
12058_ACEOF
81ecdfbb 12059if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12060 gdb_cv_thread_db_h_has_td_notls=yes
12061else
81ecdfbb 12062 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12063
12064fi
81ecdfbb 12065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12066
12067fi
81ecdfbb
RW
12068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12069$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12070fi
12071if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12072
81ecdfbb 12073$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12074
59f80f10
DJ
12075fi
12076if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12077
81ecdfbb 12078$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12079
12080fi
12081if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12082
81ecdfbb 12083$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12084
3f47be5c
EZ
12085fi
12086
b757528f 12087if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12089$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12090if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12091 $as_echo_n "(cached) " >&6
bec39cab 12092else
81ecdfbb 12093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12094/* end confdefs.h. */
b757528f 12095#include <sys/syscall.h>
bec39cab
AC
12096int
12097main ()
12098{
b757528f 12099int i = __NR_tkill;
bec39cab
AC
12100 ;
12101 return 0;
12102}
12103_ACEOF
81ecdfbb 12104if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12105 gdb_cv_sys_syscall_h_has_tkill=yes
12106else
81ecdfbb 12107 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12108
b757528f 12109fi
81ecdfbb 12110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12111
bec39cab 12112fi
81ecdfbb
RW
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12114$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12115fi
12116if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12117
81ecdfbb 12118$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12119
12120fi
12121
81ecdfbb
RW
12122ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12123"
12124if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12125 ac_have_decl=1
10568435 12126else
81ecdfbb 12127 ac_have_decl=0
10568435 12128fi
10568435
JK
12129
12130cat >>confdefs.h <<_ACEOF
81ecdfbb 12131#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12132_ACEOF
12133
12134
81ecdfbb
RW
12135if test "$cross_compiling" = yes; then :
12136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12137/* end confdefs.h. */
12138#include <sys/personality.h>
12139int
12140main ()
12141{
12142
12143# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12144# define ADDR_NO_RANDOMIZE 0x0040000
12145# endif
12146 /* Test the flag could be set and stays set. */
12147 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12148 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12149 return 1
12150 ;
12151 return 0;
12152}
12153_ACEOF
81ecdfbb 12154if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12155 have_personality=true
12156else
81ecdfbb 12157 have_personality=false
10568435 12158fi
81ecdfbb
RW
12159rm -f core conftest.err conftest.$ac_objext \
12160 conftest$ac_exeext conftest.$ac_ext
10568435 12161else
81ecdfbb 12162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12163/* end confdefs.h. */
12164#include <sys/personality.h>
12165int
12166main ()
12167{
12168
12169# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12170# define ADDR_NO_RANDOMIZE 0x0040000
12171# endif
12172 /* Test the flag could be set and stays set. */
12173 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12174 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12175 return 1
12176 ;
12177 return 0;
12178}
12179_ACEOF
81ecdfbb 12180if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12181 have_personality=true
12182else
81ecdfbb 12183 have_personality=false
10568435 12184fi
81ecdfbb
RW
12185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12186 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12187fi
81ecdfbb 12188
10568435
JK
12189if $have_personality
12190then
12191
81ecdfbb 12192$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12193
12194fi
12195
fb40c209 12196
f83d8a90
DE
12197# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12198# except that the argument to --with-sysroot is optional.
12199# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12200if test "x$with_sysroot" = xyes; then
12201 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12202fi
bec39cab 12203
81ecdfbb
RW
12204# Check whether --with-sysroot was given.
12205if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12206 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12207else
12208 TARGET_SYSTEM_ROOT=
12209fi
030292b7 12210
030292b7 12211
f83d8a90
DE
12212 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12213 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12214 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12215 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12216
f83d8a90
DE
12217cat >>confdefs.h <<_ACEOF
12218#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12219_ACEOF
bec39cab 12220
030292b7 12221
b14b1491 12222
f83d8a90
DE
12223
12224 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12225 if test "x$prefix" = xNONE; then
12226 test_prefix=/usr/local
12227 else
12228 test_prefix=$prefix
12229 fi
12230 else
12231 test_prefix=$exec_prefix
12232 fi
12233 value=0
12234 case ${ac_define_dir} in
12235 "${test_prefix}"|"${test_prefix}/"*|\
12236 '${exec_prefix}'|'${exec_prefix}/'*)
12237 value=1
12238 ;;
12239 esac
12240
12241cat >>confdefs.h <<_ACEOF
12242#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12243_ACEOF
030292b7
DJ
12244
12245
12246
16e7150e 12247
16e7150e 12248
81ecdfbb
RW
12249# Check whether --with-system-gdbinit was given.
12250if test "${with_system_gdbinit+set}" = set; then :
12251 withval=$with_system_gdbinit;
b14b1491
TT
12252 SYSTEM_GDBINIT=$withval
12253else
12254 SYSTEM_GDBINIT=
81ecdfbb
RW
12255fi
12256
16e7150e
JG
12257
12258 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12259 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12260 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12261 ac_define_dir=`eval echo $ac_define_dir`
12262
12263cat >>confdefs.h <<_ACEOF
12264#define SYSTEM_GDBINIT "$ac_define_dir"
12265_ACEOF
12266
12267
12268
0c4a4063 12269
b14b1491
TT
12270 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12271 if test "x$prefix" = xNONE; then
12272 test_prefix=/usr/local
12273 else
12274 test_prefix=$prefix
12275 fi
12276 else
12277 test_prefix=$exec_prefix
12278 fi
12279 value=0
12280 case ${ac_define_dir} in
12281 "${test_prefix}"|"${test_prefix}/"*|\
12282 '${exec_prefix}'|'${exec_prefix}/'*)
12283 value=1
12284 ;;
12285 esac
16e7150e 12286
b14b1491
TT
12287cat >>confdefs.h <<_ACEOF
12288#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12289_ACEOF
12290
b14b1491 12291
16e7150e 12292
0c4a4063 12293
81ecdfbb
RW
12294# Check whether --enable-werror was given.
12295if test "${enable_werror+set}" = set; then :
12296 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12297 yes | y) ERROR_ON_WARNING="yes" ;;
12298 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12299 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12300 esac
81ecdfbb
RW
12301fi
12302
094a342e
MK
12303
12304# Enable -Werror by default when using gcc
12305if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
12306 ERROR_ON_WARNING=yes
12307fi
12308
12309WERROR_CFLAGS=""
12310if test "${ERROR_ON_WARNING}" = yes ; then
12311 WERROR_CFLAGS="-Werror"
12312fi
12313
aa79a185
DJ
12314# The entries after -Wno-pointer-sign are disabled warnings which may
12315# be enabled in the future, which can not currently be used to build
12316# GDB.
12317# NOTE: If you change this list, remember to update
3b851bce 12318# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12319build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12320-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12321-Wno-unused -Wunused-value -Wunused-function \
b03a2011 12322-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 12323
3526781e
DJ
12324# Enable -Wno-format by default when using gcc on mingw since many
12325# GCC versions complain about %I64.
12326case "${host}" in
12327 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12328esac
12329
81ecdfbb
RW
12330# Check whether --enable-build-warnings was given.
12331if test "${enable_build_warnings+set}" = set; then :
12332 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12333 yes) ;;
12334 no) build_warnings="-w";;
12335 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12336 build_warnings="${build_warnings} ${t}";;
12337 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12338 build_warnings="${t} ${build_warnings}";;
12339 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12340esac
d4f3574e 12341if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12342 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12343fi
81ecdfbb
RW
12344fi
12345# Check whether --enable-gdb-build-warnings was given.
12346if test "${enable_gdb_build_warnings+set}" = set; then :
12347 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12348 yes) ;;
12349 no) build_warnings="-w";;
12350 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12351 build_warnings="${build_warnings} ${t}";;
12352 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12353 build_warnings="${t} ${build_warnings}";;
12354 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12355esac
12356if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12357 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12358fi
81ecdfbb
RW
12359fi
12360WARN_CFLAGS=""
c906108c
SS
12361if test "x${build_warnings}" != x -a "x$GCC" = xyes
12362then
81ecdfbb
RW
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12364$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12365 # Separate out the -Werror flag as some files just cannot be
12366 # compiled with it enabled.
12367 for w in ${build_warnings}; do
12368 case $w in
12369 -Werr*) WERROR_CFLAGS=-Werror ;;
12370 *) # Check that GCC accepts it
4536bbc6
AC
12371 saved_CFLAGS="$CFLAGS"
12372 CFLAGS="$CFLAGS $w"
81ecdfbb 12373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12374/* end confdefs.h. */
4536bbc6 12375
bec39cab
AC
12376int
12377main ()
12378{
4536bbc6 12379
bec39cab
AC
12380 ;
12381 return 0;
12382}
12383_ACEOF
81ecdfbb 12384if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12385 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12386fi
81ecdfbb 12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12388 CFLAGS="$saved_CFLAGS"
746a987d
AC
12389 esac
12390 done
81ecdfbb
RW
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12392$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12393fi
12394
12395
104c1213 12396
7a292a7a 12397# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12399$as_echo_n "checking for cygwin... " >&6; }
12400if test "${gdb_cv_os_cygwin+set}" = set; then :
12401 $as_echo_n "(cached) " >&6
bec39cab 12402else
81ecdfbb 12403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12404/* end confdefs.h. */
7a292a7a
SS
12405
12406#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12407lose
12408#endif
bec39cab 12409_ACEOF
7a292a7a 12410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12411 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12412 gdb_cv_os_cygwin=yes
12413else
7a292a7a
SS
12414 gdb_cv_os_cygwin=no
12415fi
12416rm -f conftest*
12417
12418fi
81ecdfbb
RW
12419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12420$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12421
aff38e61 12422
3eb25fda 12423SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12424case ${host} in
95cbc983
AC
12425 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12426 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12427 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12428esac
12429
12430
cd0fc7c3
SS
12431# libreadline needs libuser32.a in a cygwin environment
12432WIN32LIBS=
12433if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12434 WIN32LIBS="-luser32"
12435 case "${target}" in
12436 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12437 ;;
12438 esac
cd0fc7c3 12439fi
c906108c 12440
b4505029
MM
12441# The ser-tcp.c module requires sockets.
12442case ${host} in
12443 *mingw32*)
12444
81ecdfbb 12445$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12446
12447 WIN32LIBS="$WIN32LIBS -lws2_32"
12448 ;;
12449esac
12450
7a292a7a 12451
31d99776
DJ
12452# Add ELF support to GDB, but only if BFD includes ELF support.
12453OLD_CFLAGS=$CFLAGS
12454OLD_LDFLAGS=$LDFLAGS
12455OLD_LIBS=$LIBS
12cd34f3
PA
12456# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12457# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12458# always want our bfd.
12459CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12460LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12461intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12462# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12463if test "$plugins" = "yes"; then
12464 LIBS="-ldl $LIBS"
12465fi
0f72fb1c 12466LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12468$as_echo_n "checking for ELF support in BFD... " >&6; }
12469if test "${gdb_cv_var_elf+set}" = set; then :
12470 $as_echo_n "(cached) " >&6
31d99776 12471else
81ecdfbb 12472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12473/* end confdefs.h. */
12474#include <stdlib.h>
12475#include "bfd.h"
12476#include "elf-bfd.h"
12477
12478int
12479main ()
12480{
12481bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12482 ;
12483 return 0;
12484}
12485_ACEOF
81ecdfbb 12486if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12487 gdb_cv_var_elf=yes
12488else
81ecdfbb 12489 gdb_cv_var_elf=no
31d99776 12490fi
81ecdfbb
RW
12491rm -f core conftest.err conftest.$ac_objext \
12492 conftest$ac_exeext conftest.$ac_ext
31d99776 12493fi
81ecdfbb
RW
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12495$as_echo "$gdb_cv_var_elf" >&6; }
31d99776 12496if test $gdb_cv_var_elf = yes; then
55aa24fb 12497 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12498
81ecdfbb 12499$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12500
075ff26d
JK
12501 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12502 if test "$plugins" = "yes"; then
12503 OLD_LIBS="-ldl $OLD_LIBS"
12504 fi
31d99776
DJ
12505fi
12506CFLAGS=$OLD_CFLAGS
12507LDFLAGS=$OLD_LDFLAGS
12508LIBS=$OLD_LIBS
12509
121ce6e5
DJ
12510# Add any host-specific objects to GDB.
12511CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12512
3fc11d3e
JM
12513LIBGUI="../libgui/src/libgui.a"
12514GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
12515
12516
7a292a7a 12517
3fc11d3e
JM
12518WIN32LDAPP=
12519
12520
12521
d91670b9 12522case "${host}" in
686a5eed 12523*-*-cygwin* | *-*-mingw* )
d91670b9
CV
12524 configdir="win"
12525 ;;
12526*)
12527 configdir="unix"
12528 ;;
12529esac
3fc11d3e
JM
12530
12531GDBTKLIBS=
12532if test "${enable_gdbtk}" = "yes"; then
12533
d1c3b63a
KS
12534 # Gdbtk must have an absolute path to srcdir in order to run
12535 # properly when not installed.
12536 here=`pwd`
12537 cd ${srcdir}
12538 GDBTK_SRC_DIR=`pwd`
12539 cd $here
12540
bec39cab 12541
5062cc19
KS
12542 #
12543 # Ok, lets find the tcl configuration
12544 # First, look for one uninstalled.
12545 # the alternative search directory is invoked by --with-tcl
12546 #
3fc11d3e 12547
5062cc19
KS
12548 if test x"${no_tcl}" = x ; then
12549 # we reset no_tcl in case something fails here
12550 no_tcl=true
bec39cab 12551
81ecdfbb
RW
12552# Check whether --with-tcl was given.
12553if test "${with_tcl+set}" = set; then :
12554 withval=$with_tcl; with_tclconfig=${withval}
12555fi
12556
12557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
12558$as_echo_n "checking for Tcl configuration... " >&6; }
12559 if test "${ac_cv_c_tclconfig+set}" = set; then :
12560 $as_echo_n "(cached) " >&6
3fc11d3e 12561else
bec39cab 12562
3fc11d3e 12563
5062cc19
KS
12564 # First check to see if --with-tcl was specified.
12565 case "${host}" in
12566 *-*-cygwin*) platDir="win" ;;
12567 *) platDir="unix" ;;
12568 esac
12569 if test x"${with_tclconfig}" != x ; then
12570 if test -f "${with_tclconfig}/tclConfig.sh" ; then
12571 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
12572 else
81ecdfbb 12573 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
12574 fi
12575 fi
12576
12577 # then check for a private Tcl installation
12578 if test x"${ac_cv_c_tclconfig}" = x ; then
12579 for i in \
12580 ../tcl \
12581 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12582 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
12583 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
12584 ../../tcl \
12585 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12586 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
12587 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
12588 ../../../tcl \
12589 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12590 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
12591 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
12592 if test -f "$i/$platDir/tclConfig.sh" ; then
12593 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12594 break
12595 fi
12596 done
12597 fi
12598
12599 # on Darwin, check in Framework installation locations
12600 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
12601 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12602 `ls -d /Library/Frameworks 2>/dev/null` \
12603 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12604 `ls -d /System/Library/Frameworks 2>/dev/null` \
12605 ; do
12606 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
12607 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
12608 break
12609 fi
12610 done
12611 fi
12612
12613 # check in a few common install locations
12614 if test x"${ac_cv_c_tclconfig}" = x ; then
12615 for i in `ls -d ${libdir} 2>/dev/null` \
12616 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12617 `ls -d ${prefix}/lib 2>/dev/null` \
12618 `ls -d /usr/local/lib 2>/dev/null` \
12619 `ls -d /usr/contrib/lib 2>/dev/null` \
12620 `ls -d /usr/lib 2>/dev/null` \
12621 ; do
12622 if test -f "$i/tclConfig.sh" ; then
12623 ac_cv_c_tclconfig=`(cd $i; pwd)`
12624 break
12625 fi
12626 done
12627 fi
3fc11d3e 12628
5062cc19
KS
12629 # check in a few other private locations
12630 if test x"${ac_cv_c_tclconfig}" = x ; then
12631 for i in \
12632 ${srcdir}/../tcl \
12633 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12634 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
12635 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
12636 if test -f "$i/$platDir/tclConfig.sh" ; then
12637 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12638 break
12639 fi
12640 done
12641 fi
bec39cab 12642
3fc11d3e
JM
12643fi
12644
5062cc19
KS
12645
12646 if test x"${ac_cv_c_tclconfig}" = x ; then
12647 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
12649$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
12650 else
12651 no_tcl=
12652 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
12653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
12654$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
12655 fi
12656 fi
3fc11d3e 12657
bec39cab 12658
85541719
DE
12659 # If $no_tk is nonempty, then we can't do Tk, and there is no
12660 # point to doing Tcl.
bec39cab 12661
5062cc19
KS
12662 #
12663 # Ok, lets find the tk configuration
12664 # First, look for one uninstalled.
12665 # the alternative search directory is invoked by --with-tk
12666 #
3fc11d3e 12667
5062cc19
KS
12668 if test x"${no_tk}" = x ; then
12669 # we reset no_tk in case something fails here
12670 no_tk=true
bec39cab 12671
81ecdfbb
RW
12672# Check whether --with-tk was given.
12673if test "${with_tk+set}" = set; then :
12674 withval=$with_tk; with_tkconfig=${withval}
12675fi
12676
12677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
12678$as_echo_n "checking for Tk configuration... " >&6; }
12679 if test "${ac_cv_c_tkconfig+set}" = set; then :
12680 $as_echo_n "(cached) " >&6
bec39cab 12681else
3fc11d3e
JM
12682
12683
5062cc19
KS
12684 # First check to see if --with-tkconfig was specified.
12685 if test x"${with_tkconfig}" != x ; then
12686 if test -f "${with_tkconfig}/tkConfig.sh" ; then
12687 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
12688 else
81ecdfbb 12689 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
12690 fi
12691 fi
3fc11d3e 12692
5062cc19
KS
12693 # then check for a private Tk library
12694 case "${host}" in
12695 *-*-cygwin*) platDir="win" ;;
12696 *) platDir="unix" ;;
12697 esac
12698 if test x"${ac_cv_c_tkconfig}" = x ; then
12699 for i in \
12700 ../tk \
12701 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12702 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
12703 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
12704 ../../tk \
12705 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12706 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
12707 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
12708 ../../../tk \
12709 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12710 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
12711 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
12712 if test -f "$i/$platDir/tkConfig.sh" ; then
12713 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12714 break
12715 fi
12716 done
12717 fi
12718
12719 # on Darwin, check in Framework installation locations
12720 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
12721 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12722 `ls -d /Library/Frameworks 2>/dev/null` \
12723 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12724 `ls -d /System/Library/Frameworks 2>/dev/null` \
12725 ; do
12726 if test -f "$i/Tk.framework/tkConfig.sh" ; then
12727 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
12728 break
12729 fi
12730 done
12731 fi
12732
12733 # check in a few common install locations
12734 if test x"${ac_cv_c_tkconfig}" = x ; then
12735 for i in `ls -d ${libdir} 2>/dev/null` \
12736 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12737 `ls -d ${prefix}/lib 2>/dev/null` \
12738 `ls -d /usr/local/lib 2>/dev/null` \
12739 `ls -d /usr/contrib/lib 2>/dev/null` \
12740 `ls -d /usr/lib 2>/dev/null` \
12741 ; do
12742 if test -f "$i/tkConfig.sh" ; then
12743 ac_cv_c_tkconfig=`(cd $i; pwd)`
12744 break
12745 fi
12746 done
12747 fi
12748 # check in a few other private locations
12749 if test x"${ac_cv_c_tkconfig}" = x ; then
12750 for i in \
12751 ${srcdir}/../tk \
12752 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12753 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
12754 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
12755 if test -f "$i/$platDir/tkConfig.sh" ; then
12756 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12757 break
12758 fi
12759 done
12760 fi
3fc11d3e 12761
3fc11d3e
JM
12762fi
12763
12764
5062cc19
KS
12765 if test x"${ac_cv_c_tkconfig}" = x ; then
12766 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
12767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
12768$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
12769 else
12770 no_tk=
12771 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
12772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
12773$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 12774 fi
3fc11d3e 12775 fi
dd2504ab 12776
dd2504ab 12777
85541719
DE
12778 if test -z "${no_tcl}" -a -z "${no_tk}"; then
12779
81ecdfbb
RW
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
12781$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
12782
12783 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
12784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12785$as_echo "loading" >&6; }
85541719
DE
12786 . ${TCL_BIN_DIR}/tclConfig.sh
12787 else
81ecdfbb
RW
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
12789$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
12790 fi
12791
12792 # eval is required to do the TCL_DBGX substitution
12793 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
12794 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
12795
12796 # If the TCL_BIN_DIR is the build directory (not the install directory),
12797 # then set the common variable name to the value of the build variables.
12798 # For example, the variable TCL_LIB_SPEC will be set to the value
12799 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
12800 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
12801 # installed and uninstalled version of Tcl.
12802 if test -f "${TCL_BIN_DIR}/Makefile" ; then
12803 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
12804 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
12805 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
12806 elif test "`uname -s`" = "Darwin"; then
12807 # If Tcl was built as a framework, attempt to use the libraries
12808 # from the framework at the given location so that linking works
12809 # against Tcl.framework installed in an arbitary location.
12810 case ${TCL_DEFS} in
12811 *TCL_FRAMEWORK*)
12812 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
12813 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
12814 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
12815 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
12816 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
12817 break
12818 fi
12819 done
12820 fi
12821 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
12822 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
12823 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
12824 fi
12825 ;;
12826 esac
12827 fi
12828
12829 # eval is required to do the TCL_DBGX substitution
12830 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
12831 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
12832 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
12833 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849 # Check for in-tree tcl
12850 here=`pwd`
12851 cd ${srcdir}/..
12852 topdir=`pwd`
12853 cd ${here}
12854
12855 intree="no"
12856 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
12857 intree="yes"
12858 fi
12859
12860 # Find Tcl private headers
12861 if test x"${intree}" = xno; then
12862
81ecdfbb
RW
12863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
12864$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
12865 private_dir=""
12866 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
12867 if test -f ${dir}/tclInt.h ; then
12868 private_dir=${dir}
12869 fi
12870
12871 if test x"${private_dir}" = x; then
81ecdfbb 12872 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
12873 else
12874 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12876$as_echo "${private_dir}" >&6; }
85541719
DE
12877 fi
12878
12879 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
12880 TCL_LIBRARY="${TCL_LIB_SPEC}"
12881 TCL_DEPS=""
12882 else
12883 # If building tcl in the same src tree, private headers
12884 # are not needed, but we need to be sure to use the right
12885 # headers library
12886 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
12887 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
12888 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
12889 fi
12890
12891
12892
12893
12894
81ecdfbb
RW
12895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
12896$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 12897
5062cc19 12898 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12900$as_echo "loading" >&6; }
5062cc19 12901 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 12902 else
81ecdfbb
RW
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
12904$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 12905 fi
bec39cab 12906
5062cc19
KS
12907 # eval is required to do the TK_DBGX substitution
12908 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
12909 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
12910
12911 # If the TK_BIN_DIR is the build directory (not the install directory),
12912 # then set the common variable name to the value of the build variables.
12913 # For example, the variable TK_LIB_SPEC will be set to the value
12914 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
12915 # instead of TK_BUILD_LIB_SPEC since it will work with both an
12916 # installed and uninstalled version of Tcl.
85541719 12917 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
12918 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
12919 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
12920 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
12921 elif test "`uname -s`" = "Darwin"; then
12922 # If Tk was built as a framework, attempt to use the libraries
12923 # from the framework at the given location so that linking works
12924 # against Tk.framework installed in an arbitary location.
12925 case ${TK_DEFS} in
12926 *TK_FRAMEWORK*)
85541719 12927 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
12928 for i in "`cd ${TK_BIN_DIR}; pwd`" \
12929 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
12930 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
12931 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
12932 break
12933 fi
12934 done
12935 fi
85541719 12936 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
12937 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
12938 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
12939 fi
12940 ;;
12941 esac
3fc11d3e
JM
12942 fi
12943
5062cc19
KS
12944 # eval is required to do the TK_DBGX substitution
12945 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
12946 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
12947 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
12948 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 12949
3fc11d3e
JM
12950
12951
bec39cab
AC
12952
12953
12954
12955
12956
12957
12958
3fc11d3e 12959
3fc11d3e 12960
bec39cab 12961
bec39cab 12962
85541719
DE
12963 # Check for in-tree Tk
12964 intree="no"
12965 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
12966 intree="yes"
12967 fi
3fc11d3e 12968
85541719
DE
12969 # Find Tk private headers
12970 if test x"${intree}" = xno; then
3fc11d3e 12971
81ecdfbb
RW
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
12973$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
12974 private_dir=""
12975 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
12976 if test -f ${dir}/tkInt.h; then
12977 private_dir=${dir}
3fc11d3e 12978 fi
bec39cab 12979
5062cc19 12980 if test x"${private_dir}" = x; then
81ecdfbb 12981 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 12982 else
5062cc19 12983 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12985$as_echo "${private_dir}" >&6; }
3fc11d3e 12986 fi
3fc11d3e 12987
85541719
DE
12988 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
12989 TK_LIBRARY=${TK_LIB_SPEC}
12990 TK_DEPS=""
12991 else
12992 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
12993 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
12994 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
12995 fi
3fc11d3e
JM
12996
12997
3fc11d3e
JM
12998
12999
3fc11d3e 13000
85541719 13001 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13002
85541719
DE
13003 # Include some libraries that Tcl and Tk want.
13004 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13005 # Yes, the ordering seems wrong here. But it isn't.
13006 # TK_LIBS is the list of libraries that need to be linked
13007 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13008 # were in LIBS then any link tests after this point would
13009 # try to include things like `$(LIBGUI)', which wouldn't work.
13010 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13011
85541719
DE
13012 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13013 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13014 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13015 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13016 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13017 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13018 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13019
85541719
DE
13020 if test x$gdb_cv_os_cygwin = xyes; then
13021 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13022 WIN32LDAPP="-Wl,--subsystem,console"
13023 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13024 fi
ffc6a242 13025
81ecdfbb 13026 subdirs="$subdirs gdbtk"
3ace7edb 13027
85541719 13028 fi
3fc11d3e
JM
13029fi
13030
13031
13032
13033
13034
13035
13036
13037
81ecdfbb
RW
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13039$as_echo_n "checking for X... " >&6; }
bec39cab 13040
c906108c 13041
81ecdfbb
RW
13042# Check whether --with-x was given.
13043if test "${with_x+set}" = set; then :
13044 withval=$with_x;
13045fi
c906108c
SS
13046
13047# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13048if test "x$with_x" = xno; then
13049 # The user explicitly disabled X.
13050 have_x=disabled
13051else
81ecdfbb
RW
13052 case $x_includes,$x_libraries in #(
13053 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13054 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13055 $as_echo_n "(cached) " >&6
c906108c
SS
13056else
13057 # One or both of the vars are not set, and there is no cached value.
bec39cab 13058ac_x_includes=no ac_x_libraries=no
81ecdfbb 13059rm -f -r conftest.dir
bec39cab
AC
13060if mkdir conftest.dir; then
13061 cd conftest.dir
bec39cab 13062 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13063incroot:
13064 @echo incroot='${INCROOT}'
13065usrlibdir:
13066 @echo usrlibdir='${USRLIBDIR}'
13067libdir:
13068 @echo libdir='${LIBDIR}'
13069_ACEOF
13070 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13071 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13072 for ac_var in incroot usrlibdir libdir; do
13073 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13074 done
c906108c 13075 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13076 for ac_extension in a so sl dylib la dll; do
13077 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13078 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13079 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13080 fi
13081 done
13082 # Screen out bogus values from the imake configuration. They are
13083 # bogus both because they are the default anyway, and because
13084 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13085 case $ac_im_incroot in
81ecdfbb 13086 /usr/include) ac_x_includes= ;;
bec39cab 13087 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13088 esac
bec39cab 13089 case $ac_im_usrlibdir in
81ecdfbb 13090 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13091 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13092 esac
13093 fi
13094 cd ..
81ecdfbb 13095 rm -f -r conftest.dir
c906108c
SS
13096fi
13097
bec39cab
AC
13098# Standard set of common directories for X headers.
13099# Check X11 before X11Rn because it is often a symlink to the current release.
13100ac_x_header_dirs='
13101/usr/X11/include
81ecdfbb 13102/usr/X11R7/include
bec39cab
AC
13103/usr/X11R6/include
13104/usr/X11R5/include
13105/usr/X11R4/include
13106
13107/usr/include/X11
81ecdfbb 13108/usr/include/X11R7
bec39cab
AC
13109/usr/include/X11R6
13110/usr/include/X11R5
13111/usr/include/X11R4
13112
13113/usr/local/X11/include
81ecdfbb 13114/usr/local/X11R7/include
bec39cab
AC
13115/usr/local/X11R6/include
13116/usr/local/X11R5/include
13117/usr/local/X11R4/include
13118
13119/usr/local/include/X11
81ecdfbb 13120/usr/local/include/X11R7
bec39cab
AC
13121/usr/local/include/X11R6
13122/usr/local/include/X11R5
13123/usr/local/include/X11R4
13124
13125/usr/X386/include
13126/usr/x386/include
13127/usr/XFree86/include/X11
13128
13129/usr/include
13130/usr/local/include
13131/usr/unsupported/include
13132/usr/athena/include
13133/usr/local/x11r5/include
13134/usr/lpp/Xamples/include
13135
13136/usr/openwin/include
13137/usr/openwin/share/include'
13138
13139if test "$ac_x_includes" = no; then
81ecdfbb 13140 # Guess where to find include files, by looking for Xlib.h.
c906108c 13141 # First, try using that file with no special directory specified.
81ecdfbb 13142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13143/* end confdefs.h. */
81ecdfbb 13144#include <X11/Xlib.h>
bec39cab 13145_ACEOF
81ecdfbb 13146if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13147 # We can compile using X headers with no special include directory.
13148ac_x_includes=
13149else
bec39cab 13150 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13151 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13152 ac_x_includes=$ac_dir
13153 break
13154 fi
13155done
c906108c 13156fi
bec39cab
AC
13157rm -f conftest.err conftest.$ac_ext
13158fi # $ac_x_includes = no
c906108c 13159
bec39cab 13160if test "$ac_x_libraries" = no; then
c906108c 13161 # Check for the libraries.
c906108c
SS
13162 # See if we find them without any special options.
13163 # Don't add to $LIBS permanently.
bec39cab 13164 ac_save_LIBS=$LIBS
81ecdfbb
RW
13165 LIBS="-lX11 $LIBS"
13166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13167/* end confdefs.h. */
81ecdfbb 13168#include <X11/Xlib.h>
bec39cab
AC
13169int
13170main ()
13171{
81ecdfbb 13172XrmInitialize ()
bec39cab
AC
13173 ;
13174 return 0;
13175}
13176_ACEOF
81ecdfbb 13177if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13178 LIBS=$ac_save_LIBS
c906108c
SS
13179# We can link X programs with no special library path.
13180ac_x_libraries=
13181else
81ecdfbb
RW
13182 LIBS=$ac_save_LIBS
13183for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13184do
bec39cab 13185 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13186 for ac_extension in a so sl dylib la dll; do
13187 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13188 ac_x_libraries=$ac_dir
13189 break 2
13190 fi
13191 done
13192done
13193fi
81ecdfbb
RW
13194rm -f core conftest.err conftest.$ac_objext \
13195 conftest$ac_exeext conftest.$ac_ext
bec39cab 13196fi # $ac_x_libraries = no
c906108c 13197
81ecdfbb
RW
13198case $ac_x_includes,$ac_x_libraries in #(
13199 no,* | *,no | *\'*)
13200 # Didn't find X, or a directory has "'" in its name.
13201 ac_cv_have_x="have_x=no";; #(
13202 *)
13203 # Record where we found X for the cache.
13204 ac_cv_have_x="have_x=yes\
13205 ac_x_includes='$ac_x_includes'\
13206 ac_x_libraries='$ac_x_libraries'"
13207esac
c906108c 13208fi
81ecdfbb
RW
13209;; #(
13210 *) have_x=yes;;
13211 esac
c906108c
SS
13212 eval "$ac_cv_have_x"
13213fi # $with_x != no
13214
13215if test "$have_x" != yes; then
81ecdfbb
RW
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13217$as_echo "$have_x" >&6; }
c906108c
SS
13218 no_x=yes
13219else
13220 # If each of the values was on the command line, it overrides each guess.
13221 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13222 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13223 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13224 ac_cv_have_x="have_x=yes\
13225 ac_x_includes='$x_includes'\
13226 ac_x_libraries='$x_libraries'"
13227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13228$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13229fi
13230
13231
bec39cab 13232# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13233# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13234# This code just checks for a few cases where we'd like to ignore those
13235# definitions, even when they're present in the '.mt' file. These cases
13236# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13237# not part of the source tree.
7a292a7a 13238#
81ecdfbb
RW
13239# Check whether --enable-sim was given.
13240if test "${enable_sim+set}" = set; then :
13241 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13242 echo "enableval = ${enableval}";
13243 case "${enableval}" in
13244 yes) ignore_sim=false ;;
13245 no) ignore_sim=true ;;
13246 *) ignore_sim=false ;;
13247 esac
13248else
13249 ignore_sim=false
81ecdfbb
RW
13250fi
13251
7a292a7a
SS
13252
13253if test ! -d "${srcdir}/../sim"; then
13254 ignore_sim=true
13255fi
13256
9b624dbe
UW
13257SIM=
13258SIM_OBS=
13259if test "${ignore_sim}" = "false"; then
13260 if test x"${gdb_sim}" != x ; then
13261 SIM="${gdb_sim}"
13262 SIM_OBS="remote-sim.o"
60ca704f 13263
81ecdfbb 13264$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13265
9b624dbe 13266 fi
7a292a7a
SS
13267fi
13268
13269
13270
c906108c
SS
13271
13272
13273
13274
13275
13276
dfcd3bfb 13277
e56ac5c3
AC
13278
13279
b3a90332
AC
13280
13281
c35f4ffc 13282# List of host floatformats.
bec39cab
AC
13283
13284cat >>confdefs.h <<_ACEOF
c35f4ffc 13285#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13286_ACEOF
c35f4ffc 13287
bec39cab
AC
13288
13289cat >>confdefs.h <<_ACEOF
c35f4ffc 13290#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13291_ACEOF
13292
c35f4ffc 13293
bec39cab 13294cat >>confdefs.h <<_ACEOF
c35f4ffc 13295#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13296_ACEOF
c35f4ffc
AC
13297
13298
c906108c
SS
13299# target_subdir is used by the testsuite to find the target libraries.
13300target_subdir=
13301if test "${host}" != "${target}"; then
13302 target_subdir="${target_alias}/"
13303fi
13304
13305
13306frags=
771b4502 13307if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13308 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13309 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13310 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13311 fi
13312 frags="$frags $host_makefile_frag"
13313else
13314 host_makefile_frag=/dev/null
c906108c 13315fi
c906108c 13316
c906108c
SS
13317
13318
13319
771b4502 13320if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13321# We pick this up from the host configuration file (.mh) because we
13322# do not have a native configuration Makefile fragment.
c906108c
SS
13323nativefile=`sed -n '
13324s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13325' ${host_makefile_frag}`
c906108c
SS
13326fi
13327
13328
b00a8037 13329if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13330
13331cat >>confdefs.h <<_ACEOF
b00a8037 13332#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13333_ACEOF
b00a8037
DJ
13334
13335fi
13336
8dcde887 13337# Enable multi-ice-gdb-server.
81ecdfbb
RW
13338# Check whether --enable-multi-ice was given.
13339if test "${enable_multi_ice+set}" = set; then :
13340 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13341 yes | no)
13342 ;;
81ecdfbb 13343 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13344 esac
81ecdfbb 13345fi
b4e70030 13346
81ecdfbb
RW
13347if test "x$enable_multi_ice" = xyes; then
13348 subdirs="$subdirs multi-ice"
3ace7edb 13349
a85f51e7
DJ
13350fi
13351
496c0e1b
JB
13352# Check whether --enable-gdbserver was given.
13353if test "${enable_gdbserver+set}" = set; then :
13354 enableval=$enable_gdbserver; case "${enableval}" in
13355 yes| no|auto) ;;
13356 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13357esac
13358else
13359 enable_gdbserver=auto
13360fi
13361
13362
13363# We only build gdbserver automatically in a native configuration, and
13364# only if the user did not explicitly disable its build.
13365if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13367$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13368 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13370$as_echo "yes" >&6; }
13371 subdirs="$subdirs gdbserver"
3ace7edb 13372
496c0e1b 13373 gdbserver_build_enabled=yes
8dcde887 13374 else
81ecdfbb
RW
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13376$as_echo "no" >&6; }
8dcde887
MK
13377 fi
13378fi
13379
496c0e1b
JB
13380# If the user explicitly request the gdbserver to be built, verify that
13381# we were in fact able to enable it.
13382if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13383 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13384fi
13385
db985757 13386# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13387# to an empty version.
c906108c
SS
13388
13389files=
13390links=
5a2402b8 13391
c906108c
SS
13392rm -f nm.h
13393if test "${nativefile}" != ""; then
0f475e27
AC
13394 case "${nativefile}" in
13395 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13396 * ) GDB_NM_FILE="${nativefile}"
13397 esac
5a2402b8
AC
13398 files="${files} ${GDB_NM_FILE}"
13399 links="${links} nm.h"
60ca704f
SE
13400
13401cat >>confdefs.h <<_ACEOF
b78960be 13402#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 13403_ACEOF
5a2402b8 13404
c906108c 13405fi
5a2402b8
AC
13406
13407
bec39cab
AC
13408ac_sources="$files"
13409ac_dests="$links"
13410while test -n "$ac_sources"; do
13411 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
13412 set $ac_sources; ac_source=$1; shift; ac_sources=$*
13413 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
13414done
81ecdfbb 13415ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
13416
13417
c906108c
SS
13418
13419
c906108c 13420
81ecdfbb 13421$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 13422
bec39cab 13423
c971b7fa 13424ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
13425
13426ac_config_commands="$ac_config_commands default"
89a34d1b 13427
bec39cab
AC
13428cat >confcache <<\_ACEOF
13429# This file is a shell script that caches the results of configure
13430# tests run on this system so they can be shared between configure
13431# scripts and configure runs, see configure's option --config-cache.
13432# It is not useful on other systems. If it contains results you don't
13433# want to keep, you may remove or edit it.
13434#
13435# config.status only pays attention to the cache file if you give it
13436# the --recheck option to rerun configure.
13437#
13438# `ac_cv_env_foo' variables (set or unset) will be overridden when
13439# loading this file, other *unset* `ac_cv_foo' will be assigned the
13440# following values.
13441
13442_ACEOF
13443
13444# The following way of writing the cache mishandles newlines in values,
13445# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 13446# So, we kill variables containing newlines.
bec39cab
AC
13447# Ultrix sh set writes to stderr and can't be redirected directly,
13448# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
13449(
13450 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13451 eval ac_val=\$$ac_var
13452 case $ac_val in #(
13453 *${as_nl}*)
13454 case $ac_var in #(
13455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13457 esac
13458 case $ac_var in #(
13459 _ | IFS | as_nl) ;; #(
13460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13461 *) { eval $ac_var=; unset $ac_var;} ;;
13462 esac ;;
13463 esac
13464 done
13465
bec39cab 13466 (set) 2>&1 |
81ecdfbb
RW
13467 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13468 *${as_nl}ac_space=\ *)
13469 # `set' does not quote correctly, so add quotes: double-quote
13470 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
13471 sed -n \
13472 "s/'/'\\\\''/g;
13473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 13474 ;; #(
bec39cab
AC
13475 *)
13476 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 13477 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 13478 ;;
81ecdfbb
RW
13479 esac |
13480 sort
13481) |
bec39cab 13482 sed '
81ecdfbb 13483 /^ac_cv_env_/b end
bec39cab 13484 t clear
81ecdfbb 13485 :clear
bec39cab
AC
13486 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13487 t end
81ecdfbb
RW
13488 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13489 :end' >>confcache
13490if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13491 if test -w "$cache_file"; then
13492 test "x$cache_file" != "x/dev/null" &&
13493 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13494$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
13495 cat confcache >$cache_file
13496 else
81ecdfbb
RW
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13498$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
13499 fi
13500fi
13501rm -f confcache
13502
13503test "x$prefix" = xNONE && prefix=$ac_default_prefix
13504# Let make expand exec_prefix.
13505test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13506
bec39cab
AC
13507DEFS=-DHAVE_CONFIG_H
13508
13509ac_libobjs=
13510ac_ltlibobjs=
13511for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13512 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
13513 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13514 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13515 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13516 # will be set to the directory where LIBOBJS objects are built.
13517 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13518 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
13519done
13520LIBOBJS=$ac_libobjs
13521
13522LTLIBOBJS=$ac_ltlibobjs
13523
13524
85981d60 13525if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
13526 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
13527Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 13528fi
a417dc56 13529if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
13530 as_fn_error "conditional \"GMAKE\" was never defined.
13531Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 13532fi
81ecdfbb
RW
13533
13534
bec39cab 13535: ${CONFIG_STATUS=./config.status}
81ecdfbb 13536ac_write_fail=0
bec39cab
AC
13537ac_clean_files_save=$ac_clean_files
13538ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
13539{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13540$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13541as_write_fail=0
13542cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
13543#! $SHELL
13544# Generated by $as_me.
13545# Run this file to recreate the current configuration.
13546# Compiler output produced by configure, useful for debugging
13547# configure, is in config.log if it exists.
13548
13549debug=false
13550ac_cs_recheck=false
13551ac_cs_silent=false
bec39cab 13552
81ecdfbb
RW
13553SHELL=\${CONFIG_SHELL-$SHELL}
13554export SHELL
13555_ASEOF
13556cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13557## -------------------- ##
13558## M4sh Initialization. ##
13559## -------------------- ##
13560
13561# Be more Bourne compatible
13562DUALCASE=1; export DUALCASE # for MKS sh
13563if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
13564 emulate sh
13565 NULLCMD=:
81ecdfbb 13566 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
13567 # is contrary to our usage. Disable this feature.
13568 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
13569 setopt NO_GLOB_SUBST
13570else
13571 case `(set -o) 2>/dev/null` in #(
13572 *posix*) :
13573 set -o posix ;; #(
13574 *) :
13575 ;;
13576esac
bec39cab 13577fi
bec39cab 13578
81ecdfbb
RW
13579
13580as_nl='
13581'
13582export as_nl
13583# Printing a long string crashes Solaris 7 /usr/bin/printf.
13584as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13585as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13586as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13587# Prefer a ksh shell builtin over an external printf program on Solaris,
13588# but without wasting forks for bash or zsh.
13589if test -z "$BASH_VERSION$ZSH_VERSION" \
13590 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13591 as_echo='print -r --'
13592 as_echo_n='print -rn --'
13593elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13594 as_echo='printf %s\n'
13595 as_echo_n='printf %s'
13596else
13597 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13598 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13599 as_echo_n='/usr/ucb/echo -n'
13600 else
13601 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13602 as_echo_n_body='eval
13603 arg=$1;
13604 case $arg in #(
13605 *"$as_nl"*)
13606 expr "X$arg" : "X\\(.*\\)$as_nl";
13607 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13608 esac;
13609 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13610 '
13611 export as_echo_n_body
13612 as_echo_n='sh -c $as_echo_n_body as_echo'
13613 fi
13614 export as_echo_body
13615 as_echo='sh -c $as_echo_body as_echo'
13616fi
13617
13618# The user is always right.
13619if test "${PATH_SEPARATOR+set}" != set; then
13620 PATH_SEPARATOR=:
13621 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13622 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13623 PATH_SEPARATOR=';'
13624 }
bec39cab
AC
13625fi
13626
13627
81ecdfbb
RW
13628# IFS
13629# We need space, tab and new line, in precisely that order. Quoting is
13630# there to prevent editors from complaining about space-tab.
13631# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13632# splitting by setting IFS to empty value.)
13633IFS=" "" $as_nl"
13634
13635# Find who we are. Look in the path if we contain no directory separator.
13636case $0 in #((
13637 *[\\/]* ) as_myself=$0 ;;
13638 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13639for as_dir in $PATH
13640do
13641 IFS=$as_save_IFS
13642 test -z "$as_dir" && as_dir=.
13643 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13644 done
13645IFS=$as_save_IFS
13646
13647 ;;
13648esac
13649# We did not find ourselves, most probably we were run as `sh COMMAND'
13650# in which case we are not to be found in the path.
13651if test "x$as_myself" = x; then
13652 as_myself=$0
13653fi
13654if test ! -f "$as_myself"; then
13655 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13656 exit 1
13657fi
13658
13659# Unset variables that we do not need and which cause bugs (e.g. in
13660# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13661# suppresses any "Segmentation fault" message there. '((' could
13662# trigger a bug in pdksh 5.2.14.
13663for as_var in BASH_ENV ENV MAIL MAILPATH
13664do eval test x\${$as_var+set} = xset \
13665 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13666done
bec39cab
AC
13667PS1='$ '
13668PS2='> '
13669PS4='+ '
13670
13671# NLS nuisances.
81ecdfbb
RW
13672LC_ALL=C
13673export LC_ALL
13674LANGUAGE=C
13675export LANGUAGE
13676
13677# CDPATH.
13678(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13679
13680
13681# as_fn_error ERROR [LINENO LOG_FD]
13682# ---------------------------------
13683# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13684# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13685# script with status $?, using 1 if that was 0.
13686as_fn_error ()
13687{
13688 as_status=$?; test $as_status -eq 0 && as_status=1
13689 if test "$3"; then
13690 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13691 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13692 fi
13693 $as_echo "$as_me: error: $1" >&2
13694 as_fn_exit $as_status
13695} # as_fn_error
13696
13697
13698# as_fn_set_status STATUS
13699# -----------------------
13700# Set $? to STATUS, without forking.
13701as_fn_set_status ()
13702{
13703 return $1
13704} # as_fn_set_status
13705
13706# as_fn_exit STATUS
13707# -----------------
13708# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13709as_fn_exit ()
13710{
13711 set +e
13712 as_fn_set_status $1
13713 exit $1
13714} # as_fn_exit
13715
13716# as_fn_unset VAR
13717# ---------------
13718# Portably unset VAR.
13719as_fn_unset ()
13720{
13721 { eval $1=; unset $1;}
13722}
13723as_unset=as_fn_unset
13724# as_fn_append VAR VALUE
13725# ----------------------
13726# Append the text in VALUE to the end of the definition contained in VAR. Take
13727# advantage of any shell optimizations that allow amortized linear growth over
13728# repeated appends, instead of the typical quadratic growth present in naive
13729# implementations.
13730if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13731 eval 'as_fn_append ()
13732 {
13733 eval $1+=\$2
13734 }'
13735else
13736 as_fn_append ()
13737 {
13738 eval $1=\$$1\$2
13739 }
13740fi # as_fn_append
13741
13742# as_fn_arith ARG...
13743# ------------------
13744# Perform arithmetic evaluation on the ARGs, and store the result in the
13745# global $as_val. Take advantage of shells that can avoid forks. The arguments
13746# must be portable across $(()) and expr.
13747if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13748 eval 'as_fn_arith ()
13749 {
13750 as_val=$(( $* ))
13751 }'
13752else
13753 as_fn_arith ()
13754 {
13755 as_val=`expr "$@" || test $? -eq 1`
13756 }
13757fi # as_fn_arith
bec39cab 13758
81ecdfbb
RW
13759
13760if expr a : '\(a\)' >/dev/null 2>&1 &&
13761 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
13762 as_expr=expr
13763else
13764 as_expr=false
13765fi
13766
81ecdfbb 13767if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
13768 as_basename=basename
13769else
13770 as_basename=false
13771fi
13772
81ecdfbb
RW
13773if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13774 as_dirname=dirname
13775else
13776 as_dirname=false
13777fi
bec39cab 13778
81ecdfbb 13779as_me=`$as_basename -- "$0" ||
bec39cab
AC
13780$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13781 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
13782 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13783$as_echo X/"$0" |
13784 sed '/^.*\/\([^/][^/]*\)\/*$/{
13785 s//\1/
13786 q
13787 }
13788 /^X\/\(\/\/\)$/{
13789 s//\1/
13790 q
13791 }
13792 /^X\/\(\/\).*/{
13793 s//\1/
13794 q
13795 }
13796 s/.*/./; q'`
b4e70030 13797
b4e70030
JB
13798# Avoid depending upon Character Ranges.
13799as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13800as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13801as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13802as_cr_digits='0123456789'
13803as_cr_alnum=$as_cr_Letters$as_cr_digits
13804
81ecdfbb
RW
13805ECHO_C= ECHO_N= ECHO_T=
13806case `echo -n x` in #(((((
13807-n*)
13808 case `echo 'xy\c'` in
13809 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13810 xy) ECHO_C='\c';;
13811 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13812 ECHO_T=' ';;
13813 esac;;
13814*)
13815 ECHO_N='-n';;
bec39cab
AC
13816esac
13817
81ecdfbb
RW
13818rm -f conf$$ conf$$.exe conf$$.file
13819if test -d conf$$.dir; then
13820 rm -f conf$$.dir/conf$$.file
bec39cab 13821else
81ecdfbb
RW
13822 rm -f conf$$.dir
13823 mkdir conf$$.dir 2>/dev/null
bec39cab 13824fi
81ecdfbb
RW
13825if (echo >conf$$.file) 2>/dev/null; then
13826 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 13827 as_ln_s='ln -s'
81ecdfbb
RW
13828 # ... but there are two gotchas:
13829 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13830 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13831 # In both cases, we have to default to `cp -p'.
13832 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13833 as_ln_s='cp -p'
13834 elif ln conf$$.file conf$$ 2>/dev/null; then
13835 as_ln_s=ln
13836 else
13837 as_ln_s='cp -p'
b4e70030 13838 fi
bec39cab
AC
13839else
13840 as_ln_s='cp -p'
13841fi
81ecdfbb
RW
13842rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13843rmdir conf$$.dir 2>/dev/null
13844
13845
13846# as_fn_mkdir_p
13847# -------------
13848# Create "$as_dir" as a directory, including parents if necessary.
13849as_fn_mkdir_p ()
13850{
13851
13852 case $as_dir in #(
13853 -*) as_dir=./$as_dir;;
13854 esac
13855 test -d "$as_dir" || eval $as_mkdir_p || {
13856 as_dirs=
13857 while :; do
13858 case $as_dir in #(
13859 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13860 *) as_qdir=$as_dir;;
13861 esac
13862 as_dirs="'$as_qdir' $as_dirs"
13863 as_dir=`$as_dirname -- "$as_dir" ||
13864$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13865 X"$as_dir" : 'X\(//\)[^/]' \| \
13866 X"$as_dir" : 'X\(//\)$' \| \
13867 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13868$as_echo X"$as_dir" |
13869 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13870 s//\1/
13871 q
13872 }
13873 /^X\(\/\/\)[^/].*/{
13874 s//\1/
13875 q
13876 }
13877 /^X\(\/\/\)$/{
13878 s//\1/
13879 q
13880 }
13881 /^X\(\/\).*/{
13882 s//\1/
13883 q
13884 }
13885 s/.*/./; q'`
13886 test -d "$as_dir" && break
13887 done
13888 test -z "$as_dirs" || eval "mkdir $as_dirs"
13889 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13890
bec39cab 13891
81ecdfbb 13892} # as_fn_mkdir_p
bec39cab 13893if mkdir -p . 2>/dev/null; then
81ecdfbb 13894 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
13895else
13896 test -d ./-p && rmdir ./-p
13897 as_mkdir_p=false
13898fi
13899
81ecdfbb
RW
13900if test -x / >/dev/null 2>&1; then
13901 as_test_x='test -x'
13902else
13903 if ls -dL / >/dev/null 2>&1; then
13904 as_ls_L_option=L
13905 else
13906 as_ls_L_option=
13907 fi
13908 as_test_x='
13909 eval sh -c '\''
13910 if test -d "$1"; then
13911 test -d "$1/.";
13912 else
13913 case $1 in #(
13914 -*)set "./$1";;
13915 esac;
13916 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
13917 ???[sx]*):;;*)false;;esac;fi
13918 '\'' sh
13919 '
13920fi
13921as_executable_p=$as_test_x
bec39cab
AC
13922
13923# Sed expression to map a string onto a valid CPP name.
13924as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13925
13926# Sed expression to map a string onto a valid variable name.
13927as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13928
13929
bec39cab 13930exec 6>&1
81ecdfbb
RW
13931## ----------------------------------- ##
13932## Main body of $CONFIG_STATUS script. ##
13933## ----------------------------------- ##
13934_ASEOF
13935test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13936
13937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13938# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 13939# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
13940# values after options handling.
13941ac_log="
bec39cab 13942This file was extended by $as_me, which was
81ecdfbb 13943generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
13944
13945 CONFIG_FILES = $CONFIG_FILES
13946 CONFIG_HEADERS = $CONFIG_HEADERS
13947 CONFIG_LINKS = $CONFIG_LINKS
13948 CONFIG_COMMANDS = $CONFIG_COMMANDS
13949 $ $0 $@
13950
81ecdfbb
RW
13951on `(hostname || uname -n) 2>/dev/null | sed 1q`
13952"
13953
bec39cab
AC
13954_ACEOF
13955
81ecdfbb
RW
13956case $ac_config_files in *"
13957"*) set x $ac_config_files; shift; ac_config_files=$*;;
13958esac
234b45d4 13959
81ecdfbb
RW
13960case $ac_config_headers in *"
13961"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13962esac
b4e70030 13963
b4e70030 13964
81ecdfbb
RW
13965cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13966# Files that config.status was made for.
13967config_files="$ac_config_files"
13968config_headers="$ac_config_headers"
13969config_links="$ac_config_links"
13970config_commands="$ac_config_commands"
234b45d4 13971
81ecdfbb 13972_ACEOF
b4e70030 13973
81ecdfbb 13974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 13975ac_cs_usage="\
81ecdfbb
RW
13976\`$as_me' instantiates files and other configuration actions
13977from templates according to the current configuration. Unless the files
13978and actions are specified as TAGs, all are instantiated by default.
234b45d4 13979
81ecdfbb 13980Usage: $0 [OPTION]... [TAG]...
234b45d4 13981
bec39cab 13982 -h, --help print this help, then exit
81ecdfbb
RW
13983 -V, --version print version number and configuration settings, then exit
13984 -q, --quiet, --silent
13985 do not print progress messages
bec39cab
AC
13986 -d, --debug don't remove temporary files
13987 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
13988 --file=FILE[:TEMPLATE]
13989 instantiate the configuration file FILE
13990 --header=FILE[:TEMPLATE]
13991 instantiate the configuration header FILE
234b45d4 13992
bec39cab
AC
13993Configuration files:
13994$config_files
234b45d4 13995
bec39cab
AC
13996Configuration headers:
13997$config_headers
234b45d4 13998
bec39cab
AC
13999Configuration links:
14000$config_links
234b45d4 14001
bec39cab
AC
14002Configuration commands:
14003$config_commands
14004
81ecdfbb 14005Report bugs to the package provider."
b4e70030 14006
81ecdfbb
RW
14007_ACEOF
14008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
14009ac_cs_version="\\
14010config.status
81ecdfbb
RW
14011configured by $0, generated by GNU Autoconf 2.64,
14012 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 14013
81ecdfbb 14014Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
14015This config.status script is free software; the Free Software Foundation
14016gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
14017
14018ac_pwd='$ac_pwd'
14019srcdir='$srcdir'
14020INSTALL='$INSTALL'
81ecdfbb
RW
14021AWK='$AWK'
14022test -n "\$AWK" || AWK=awk
bec39cab
AC
14023_ACEOF
14024
81ecdfbb
RW
14025cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14026# The default lists apply if the user does not specify any file.
bec39cab
AC
14027ac_need_defaults=:
14028while test $# != 0
14029do
14030 case $1 in
14031 --*=*)
81ecdfbb
RW
14032 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14033 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 14034 ac_shift=:
c906108c 14035 ;;
81ecdfbb 14036 *)
bec39cab
AC
14037 ac_option=$1
14038 ac_optarg=$2
14039 ac_shift=shift
c906108c 14040 ;;
bec39cab 14041 esac
c906108c 14042
bec39cab
AC
14043 case $ac_option in
14044 # Handling of the options.
bec39cab
AC
14045 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14046 ac_cs_recheck=: ;;
81ecdfbb
RW
14047 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14048 $as_echo "$ac_cs_version"; exit ;;
14049 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
14050 debug=: ;;
14051 --file | --fil | --fi | --f )
14052 $ac_shift
81ecdfbb
RW
14053 case $ac_optarg in
14054 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14055 esac
14056 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14057 ac_need_defaults=false;;
14058 --header | --heade | --head | --hea )
14059 $ac_shift
81ecdfbb
RW
14060 case $ac_optarg in
14061 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14062 esac
14063 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14064 ac_need_defaults=false;;
81ecdfbb
RW
14065 --he | --h)
14066 # Conflict between --help and --header
14067 as_fn_error "ambiguous option: \`$1'
14068Try \`$0 --help' for more information.";;
14069 --help | --hel | -h )
14070 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14072 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14073 ac_cs_silent=: ;;
c906108c 14074
bec39cab 14075 # This is an error.
81ecdfbb
RW
14076 -*) as_fn_error "unrecognized option: \`$1'
14077Try \`$0 --help' for more information." ;;
c906108c 14078
81ecdfbb
RW
14079 *) as_fn_append ac_config_targets " $1"
14080 ac_need_defaults=false ;;
c906108c 14081
bec39cab
AC
14082 esac
14083 shift
14084done
c906108c 14085
bec39cab 14086ac_configure_extra_args=
c906108c 14087
bec39cab
AC
14088if $ac_cs_silent; then
14089 exec 6>/dev/null
14090 ac_configure_extra_args="$ac_configure_extra_args --silent"
14091fi
c906108c 14092
bec39cab 14093_ACEOF
81ecdfbb 14094cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14095if \$ac_cs_recheck; then
81ecdfbb
RW
14096 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14097 shift
14098 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14099 CONFIG_SHELL='$SHELL'
14100 export CONFIG_SHELL
14101 exec "\$@"
bec39cab
AC
14102fi
14103
14104_ACEOF
81ecdfbb
RW
14105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14106exec 5>>config.log
14107{
14108 echo
14109 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14110## Running $as_me. ##
14111_ASBOX
14112 $as_echo "$ac_log"
14113} >&5
bec39cab 14114
81ecdfbb
RW
14115_ACEOF
14116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14117#
81ecdfbb 14118# INIT-COMMANDS
c906108c 14119#
a417dc56 14120ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14121
bec39cab
AC
14122_ACEOF
14123
81ecdfbb 14124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14125
81ecdfbb 14126# Handling of arguments.
bec39cab 14127for ac_config_target in $ac_config_targets
c906108c 14128do
81ecdfbb
RW
14129 case $ac_config_target in
14130 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14131 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14132 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14133 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14134 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14135 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14136 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14137 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14138 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14139
14140 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14141 esac
14142done
14143
81ecdfbb 14144
bec39cab
AC
14145# If the user did not use the arguments to specify the items to instantiate,
14146# then the envvar interface is used. Set only those that are not.
14147# We use the long form for the default assignment because of an extremely
14148# bizarre bug on SunOS 4.1.3.
14149if $ac_need_defaults; then
14150 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14151 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14152 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14153 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14154fi
14155
b4e70030 14156# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14157# simply because there is no reason against having it here, and in addition,
b4e70030 14158# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14159# Hook for its removal unless debugging.
14160# Note that there is a small window in which the directory will not be cleaned:
14161# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14162$debug ||
14163{
81ecdfbb
RW
14164 tmp=
14165 trap 'exit_status=$?
14166 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14167' 0
14168 trap 'as_fn_exit 1' 1 2 13 15
14169}
14170# Create a (secure) tmp directory for tmp files.
14171
14172{
14173 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14174 test -n "$tmp" && test -d "$tmp"
14175} ||
14176{
14177 tmp=./conf$$-$RANDOM
14178 (umask 077 && mkdir "$tmp")
14179} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14180
14181# Set up the scripts for CONFIG_FILES section.
14182# No need to generate them if there are no CONFIG_FILES.
14183# This happens for instance with `./config.status config.h'.
14184if test -n "$CONFIG_FILES"; then
14185
14186if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14187 ac_cs_awk_getline=:
14188 ac_cs_awk_pipe_init=
14189 ac_cs_awk_read_file='
14190 while ((getline aline < (F[key])) > 0)
14191 print(aline)
14192 close(F[key])'
14193 ac_cs_awk_pipe_fini=
14194else
14195 ac_cs_awk_getline=false
14196 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14197 ac_cs_awk_read_file='
14198 print "|#_!!_#|"
14199 print "cat " F[key] " &&"
14200 '$ac_cs_awk_pipe_init
14201 # The final `:' finishes the AND list.
14202 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14203fi
14204ac_cr=`echo X | tr X '\015'`
14205# On cygwin, bash can eat \r inside `` if the user requested igncr.
14206# But we know of no other shell where ac_cr would be empty at this
14207# point, so we can use a bashism as a fallback.
14208if test "x$ac_cr" = x; then
14209 eval ac_cr=\$\'\\r\'
14210fi
14211ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14212if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14213 ac_cs_awk_cr='\r'
14214else
14215 ac_cs_awk_cr=$ac_cr
14216fi
14217
14218echo 'BEGIN {' >"$tmp/subs1.awk" &&
14219_ACEOF
14220
14221# Create commands to substitute file output variables.
14222{
14223 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14224 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14225 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14226 echo "_ACAWK" &&
14227 echo "_ACEOF"
14228} >conf$$files.sh &&
14229. ./conf$$files.sh ||
14230 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14231rm -f conf$$files.sh
14232
14233{
14234 echo "cat >conf$$subs.awk <<_ACEOF" &&
14235 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14236 echo "_ACEOF"
14237} >conf$$subs.sh ||
14238 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14239ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14240ac_delim='%!_!# '
14241for ac_last_try in false false false false false :; do
14242 . ./conf$$subs.sh ||
14243 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14244
14245 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14246 if test $ac_delim_n = $ac_delim_num; then
14247 break
14248 elif $ac_last_try; then
14249 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14250 else
14251 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14252 fi
14253done
14254rm -f conf$$subs.sh
14255
14256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14257cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14258_ACEOF
14259sed -n '
14260h
14261s/^/S["/; s/!.*/"]=/
14262p
14263g
14264s/^[^!]*!//
14265:repl
14266t repl
14267s/'"$ac_delim"'$//
14268t delim
14269:nl
14270h
14271s/\(.\{148\}\).*/\1/
14272t more1
14273s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14274p
14275n
14276b repl
14277:more1
14278s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14279p
14280g
14281s/.\{148\}//
14282t nl
14283:delim
14284h
14285s/\(.\{148\}\).*/\1/
14286t more2
14287s/["\\]/\\&/g; s/^/"/; s/$/"/
14288p
14289b
14290:more2
14291s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14292p
14293g
14294s/.\{148\}//
14295t delim
14296' <conf$$subs.awk | sed '
14297/^[^""]/{
14298 N
14299 s/\n//
14300}
14301' >>$CONFIG_STATUS || ac_write_fail=1
14302rm -f conf$$subs.awk
14303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14304_ACAWK
14305cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14306 for (key in S) S_is_set[key] = 1
14307 FS = "\a"
14308 \$ac_cs_awk_pipe_init
14309}
14310{
14311 line = $ 0
14312 nfields = split(line, field, "@")
14313 substed = 0
14314 len = length(field[1])
14315 for (i = 2; i < nfields; i++) {
14316 key = field[i]
14317 keylen = length(key)
14318 if (S_is_set[key]) {
14319 value = S[key]
14320 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14321 len += length(value) + length(field[++i])
14322 substed = 1
14323 } else
14324 len += 1 + keylen
14325 }
14326 if (nfields == 3 && !substed) {
14327 key = field[2]
14328 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14329 \$ac_cs_awk_read_file
14330 next
14331 }
14332 }
14333 print line
b4e70030 14334}
81ecdfbb
RW
14335\$ac_cs_awk_pipe_fini
14336_ACAWK
14337_ACEOF
14338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14339if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14340 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14341else
14342 cat
14343fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14344 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14345_ACEOF
14346
14347# VPATH may cause trouble with some makes, so we remove $(srcdir),
14348# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14349# trailing colons and then remove the whole line if VPATH becomes empty
14350# (actually we leave an empty line to preserve line numbers).
14351if test "x$srcdir" = x.; then
14352 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14353s/:*\$(srcdir):*/:/
14354s/:*\${srcdir}:*/:/
14355s/:*@srcdir@:*/:/
14356s/^\([^=]*=[ ]*\):*/\1/
14357s/:*$//
14358s/^[^=]*=[ ]*$//
14359}'
14360fi
14361
14362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14363fi # test -n "$CONFIG_FILES"
14364
14365# Set up the scripts for CONFIG_HEADERS section.
14366# No need to generate them if there are no CONFIG_HEADERS.
14367# This happens for instance with `./config.status Makefile'.
14368if test -n "$CONFIG_HEADERS"; then
14369cat >"$tmp/defines.awk" <<\_ACAWK ||
14370BEGIN {
14371_ACEOF
14372
14373# Transform confdefs.h into an awk script `defines.awk', embedded as
14374# here-document in config.status, that substitutes the proper values into
14375# config.h.in to produce config.h.
4e8d927d 14376
81ecdfbb
RW
14377# Create a delimiter string that does not exist in confdefs.h, to ease
14378# handling of long lines.
14379ac_delim='%!_!# '
14380for ac_last_try in false false :; do
14381 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14382 if test -z "$ac_t"; then
14383 break
14384 elif $ac_last_try; then
14385 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14386 else
14387 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14388 fi
14389done
4e8d927d 14390
81ecdfbb
RW
14391# For the awk script, D is an array of macro values keyed by name,
14392# likewise P contains macro parameters if any. Preserve backslash
14393# newline sequences.
14394
14395ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14396sed -n '
14397s/.\{148\}/&'"$ac_delim"'/g
14398t rset
14399:rset
14400s/^[ ]*#[ ]*define[ ][ ]*/ /
14401t def
14402d
14403:def
14404s/\\$//
14405t bsnl
14406s/["\\]/\\&/g
14407s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14408D["\1"]=" \3"/p
14409s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14410d
14411:bsnl
14412s/["\\]/\\&/g
14413s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14414D["\1"]=" \3\\\\\\n"\\/p
14415t cont
14416s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14417t cont
14418d
14419:cont
14420n
14421s/.\{148\}/&'"$ac_delim"'/g
14422t clear
14423:clear
14424s/\\$//
14425t bsnlc
14426s/["\\]/\\&/g; s/^/"/; s/$/"/p
14427d
14428:bsnlc
14429s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14430b cont
14431' <confdefs.h | sed '
14432s/'"$ac_delim"'/"\\\
14433"/g' >>$CONFIG_STATUS || ac_write_fail=1
14434
14435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14436 for (key in D) D_is_set[key] = 1
14437 FS = "\a"
14438}
14439/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14440 line = \$ 0
14441 split(line, arg, " ")
14442 if (arg[1] == "#") {
14443 defundef = arg[2]
14444 mac1 = arg[3]
14445 } else {
14446 defundef = substr(arg[1], 2)
14447 mac1 = arg[2]
14448 }
14449 split(mac1, mac2, "(") #)
14450 macro = mac2[1]
14451 prefix = substr(line, 1, index(line, defundef) - 1)
14452 if (D_is_set[macro]) {
14453 # Preserve the white space surrounding the "#".
14454 print prefix "define", macro P[macro] D[macro]
14455 next
14456 } else {
14457 # Replace #undef with comments. This is necessary, for example,
14458 # in the case of _POSIX_SOURCE, which is predefined and required
14459 # on some systems where configure will not decide to define it.
14460 if (defundef == "undef") {
14461 print "/*", prefix defundef, macro, "*/"
14462 next
14463 }
14464 }
b4e70030 14465}
81ecdfbb
RW
14466{ print }
14467_ACAWK
b4e70030 14468_ACEOF
81ecdfbb
RW
14469cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14470 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14471fi # test -n "$CONFIG_HEADERS"
4e8d927d 14472
4e8d927d 14473
81ecdfbb
RW
14474eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
14475shift
14476for ac_tag
14477do
14478 case $ac_tag in
14479 :[FHLC]) ac_mode=$ac_tag; continue;;
14480 esac
14481 case $ac_mode$ac_tag in
14482 :[FHL]*:*);;
14483 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
14484 :[FH]-) ac_tag=-:-;;
14485 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14486 esac
14487 ac_save_IFS=$IFS
14488 IFS=:
14489 set x $ac_tag
14490 IFS=$ac_save_IFS
14491 shift
14492 ac_file=$1
14493 shift
4e8d927d 14494
81ecdfbb
RW
14495 case $ac_mode in
14496 :L) ac_source=$1;;
14497 :[FH])
14498 ac_file_inputs=
14499 for ac_f
14500 do
14501 case $ac_f in
14502 -) ac_f="$tmp/stdin";;
14503 *) # Look for the file first in the build tree, then in the source tree
14504 # (if the path is not absolute). The absolute path cannot be DOS-style,
14505 # because $ac_f cannot contain `:'.
14506 test -f "$ac_f" ||
14507 case $ac_f in
14508 [\\/$]*) false;;
14509 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14510 esac ||
14511 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14512 esac
14513 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14514 as_fn_append ac_file_inputs " '$ac_f'"
14515 done
14516
14517 # Let's still pretend it is `configure' which instantiates (i.e., don't
14518 # use $as_me), people would be surprised to read:
14519 # /* config.h. Generated by config.status. */
14520 configure_input='Generated from '`
14521 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14522 `' by configure.'
14523 if test x"$ac_file" != x-; then
14524 configure_input="$ac_file. $configure_input"
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14526$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 14527 fi
81ecdfbb
RW
14528 # Neutralize special characters interpreted by sed in replacement strings.
14529 case $configure_input in #(
14530 *\&* | *\|* | *\\* )
14531 ac_sed_conf_input=`$as_echo "$configure_input" |
14532 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14533 *) ac_sed_conf_input=$configure_input;;
14534 esac
4e8d927d 14535
81ecdfbb
RW
14536 case $ac_tag in
14537 *:-:* | *:-) cat >"$tmp/stdin" \
14538 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
14539 esac
14540 ;;
c906108c
SS
14541 esac
14542
81ecdfbb 14543 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
14544$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14545 X"$ac_file" : 'X\(//\)[^/]' \| \
14546 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
14547 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14548$as_echo X"$ac_file" |
14549 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14550 s//\1/
14551 q
14552 }
14553 /^X\(\/\/\)[^/].*/{
14554 s//\1/
14555 q
14556 }
14557 /^X\(\/\/\)$/{
14558 s//\1/
14559 q
14560 }
14561 /^X\(\/\).*/{
14562 s//\1/
14563 q
14564 }
14565 s/.*/./; q'`
14566 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14567 ac_builddir=.
14568
81ecdfbb
RW
14569case "$ac_dir" in
14570.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14571*)
14572 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14573 # A ".." for each directory in $ac_dir_suffix.
14574 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14575 case $ac_top_builddir_sub in
14576 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14577 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14578 esac ;;
14579esac
14580ac_abs_top_builddir=$ac_pwd
14581ac_abs_builddir=$ac_pwd$ac_dir_suffix
14582# for backward compatibility:
14583ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14584
14585case $srcdir in
81ecdfbb 14586 .) # We are building in place.
bec39cab 14587 ac_srcdir=.
81ecdfbb
RW
14588 ac_top_srcdir=$ac_top_builddir_sub
14589 ac_abs_top_srcdir=$ac_pwd ;;
14590 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14591 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14592 ac_top_srcdir=$srcdir
14593 ac_abs_top_srcdir=$srcdir ;;
14594 *) # Relative name.
14595 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14596 ac_top_srcdir=$ac_top_build_prefix$srcdir
14597 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14598esac
81ecdfbb 14599ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 14600
c906108c 14601
81ecdfbb
RW
14602 case $ac_mode in
14603 :F)
14604 #
14605 # CONFIG_FILE
14606 #
c906108c 14607
bec39cab
AC
14608 case $INSTALL in
14609 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 14610 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 14611 esac
81ecdfbb 14612_ACEOF
121ce6e5 14613
81ecdfbb
RW
14614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14615# If the template does not know about datarootdir, expand it.
14616# FIXME: This hack should be removed a few years after 2.60.
14617ac_datarootdir_hack=; ac_datarootdir_seen=
14618ac_sed_dataroot='
14619/datarootdir/ {
14620 p
14621 q
14622}
14623/@datadir@/p
14624/@docdir@/p
14625/@infodir@/p
14626/@localedir@/p
14627/@mandir@/p'
14628case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14629*datarootdir*) ac_datarootdir_seen=yes;;
14630*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14632$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14633_ACEOF
14634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14635 ac_datarootdir_hack='
14636 s&@datadir@&$datadir&g
14637 s&@docdir@&$docdir&g
14638 s&@infodir@&$infodir&g
14639 s&@localedir@&$localedir&g
14640 s&@mandir@&$mandir&g
14641 s&\\\${datarootdir}&$datarootdir&g' ;;
14642esac
4e8d927d 14643_ACEOF
81ecdfbb
RW
14644
14645# Neutralize VPATH when `$srcdir' = `.'.
14646# Shell code in configure.ac might set extrasub.
14647# FIXME: do we really want to maintain this feature?
14648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14649ac_sed_extra="$ac_vpsub
bec39cab
AC
14650$extrasub
14651_ACEOF
81ecdfbb 14652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
14653:t
14654/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
14655s|@configure_input@|$ac_sed_conf_input|;t t
14656s&@top_builddir@&$ac_top_builddir_sub&;t t
14657s&@top_build_prefix@&$ac_top_build_prefix&;t t
14658s&@srcdir@&$ac_srcdir&;t t
14659s&@abs_srcdir@&$ac_abs_srcdir&;t t
14660s&@top_srcdir@&$ac_top_srcdir&;t t
14661s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14662s&@builddir@&$ac_builddir&;t t
14663s&@abs_builddir@&$ac_abs_builddir&;t t
14664s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14665s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
14666$ac_datarootdir_hack
14667"
14668eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
14669if $ac_cs_awk_getline; then
14670 $AWK -f "$tmp/subs.awk"
14671else
14672 $AWK -f "$tmp/subs.awk" | $SHELL
14673fi >$tmp/out \
14674 || as_fn_error "could not create $ac_file" "$LINENO" 5
14675
14676test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14677 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14678 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14680which seems to be undefined. Please make sure it is defined." >&5
14681$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14682which seems to be undefined. Please make sure it is defined." >&2;}
14683
14684 rm -f "$tmp/stdin"
bec39cab 14685 case $ac_file in
81ecdfbb
RW
14686 -) cat "$tmp/out" && rm -f "$tmp/out";;
14687 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14688 esac \
14689 || as_fn_error "could not create $ac_file" "$LINENO" 5
14690 ;;
14691 :H)
14692 #
14693 # CONFIG_HEADER
14694 #
bec39cab 14695 if test x"$ac_file" != x-; then
81ecdfbb
RW
14696 {
14697 $as_echo "/* $configure_input */" \
14698 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14699 } >"$tmp/config.h" \
14700 || as_fn_error "could not create $ac_file" "$LINENO" 5
14701 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14703$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 14704 else
81ecdfbb
RW
14705 rm -f "$ac_file"
14706 mv "$tmp/config.h" "$ac_file" \
14707 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
14708 fi
14709 else
81ecdfbb
RW
14710 $as_echo "/* $configure_input */" \
14711 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14712 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 14713 fi
81ecdfbb
RW
14714 ;;
14715 :L)
14716 #
14717 # CONFIG_LINK
14718 #
c906108c 14719
81ecdfbb
RW
14720 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
14721 :
b4e70030 14722 else
81ecdfbb
RW
14723 # Prefer the file from the source tree if names are identical.
14724 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
14725 ac_source=$srcdir/$ac_source
14726 fi
b4e70030 14727
81ecdfbb
RW
14728 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
14729$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 14730
81ecdfbb
RW
14731 if test ! -r "$ac_source"; then
14732 as_fn_error "$ac_source: file not found" "$LINENO" 5
14733 fi
14734 rm -f "$ac_file"
bec39cab 14735
81ecdfbb
RW
14736 # Try a relative symlink, then a hard link, then a copy.
14737 case $srcdir in
14738 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
14739 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
14740 esac
14741 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
14742 ln "$ac_source" "$ac_file" 2>/dev/null ||
14743 cp -p "$ac_source" "$ac_file" ||
14744 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
14745 fi
14746 ;;
14747 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14748$as_echo "$as_me: executing $ac_file commands" >&6;}
14749 ;;
c906108c 14750 esac
b4e70030 14751
bec39cab 14752
81ecdfbb
RW
14753 case $ac_file$ac_mode in
14754 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 14755 "default":C)
c906108c
SS
14756case x$CONFIG_HEADERS in
14757xconfig.h:config.in)
14758echo > stamp-h ;;
14759esac
bec39cab 14760 ;;
81ecdfbb 14761
bec39cab 14762 esac
81ecdfbb 14763done # for ac_tag
c906108c 14764
bec39cab 14765
81ecdfbb 14766as_fn_exit 0
bec39cab 14767_ACEOF
bec39cab
AC
14768ac_clean_files=$ac_clean_files_save
14769
81ecdfbb
RW
14770test $ac_write_fail = 0 ||
14771 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14772
bec39cab
AC
14773
14774# configure is writing to config.log, and then calls config.status.
14775# config.status does its own redirection, appending to config.log.
14776# Unfortunately, on DOS this fails, as config.log is still kept open
14777# by configure, so config.status won't be able to write to it; its
14778# output is simply discarded. So we exec the FD to /dev/null,
14779# effectively closing config.log, so it can be properly (re)opened and
14780# appended to by config.status. When coming back to configure, we
14781# need to make the FD available again.
14782if test "$no_create" != yes; then
14783 ac_cs_success=:
14784 ac_config_status_args=
14785 test "$silent" = yes &&
14786 ac_config_status_args="$ac_config_status_args --quiet"
14787 exec 5>/dev/null
14788 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14789 exec 5>>config.log
14790 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14791 # would make configure fail if this is the last instruction.
81ecdfbb 14792 $ac_cs_success || as_fn_exit $?
bec39cab 14793fi
c906108c 14794
bec39cab 14795#
81ecdfbb 14796# CONFIG_SUBDIRS section.
bec39cab 14797#
c906108c
SS
14798if test "$no_recursion" != yes; then
14799
81ecdfbb
RW
14800 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
14801 # so they do not pile up.
c906108c
SS
14802 ac_sub_configure_args=
14803 ac_prev=
fdc59709
PB
14804 eval "set x $ac_configure_args"
14805 shift
14806 for ac_arg
14807 do
c906108c
SS
14808 if test -n "$ac_prev"; then
14809 ac_prev=
14810 continue
14811 fi
bec39cab 14812 case $ac_arg in
c906108c
SS
14813 -cache-file | --cache-file | --cache-fil | --cache-fi \
14814 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14815 ac_prev=cache_file ;;
14816 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
14817 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14818 | --c=*)
14819 ;;
14820 --config-cache | -C)
c906108c
SS
14821 ;;
14822 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14823 ac_prev=srcdir ;;
14824 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14825 ;;
bec39cab
AC
14826 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14827 ac_prev=prefix ;;
14828 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14829 ;;
81ecdfbb
RW
14830 --disable-option-checking)
14831 ;;
fdc59709
PB
14832 *)
14833 case $ac_arg in
81ecdfbb 14834 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14835 esac
81ecdfbb 14836 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
14837 esac
14838 done
14839
bec39cab
AC
14840 # Always prepend --prefix to ensure using the same prefix
14841 # in subdir configurations.
fdc59709
PB
14842 ac_arg="--prefix=$prefix"
14843 case $ac_arg in
81ecdfbb 14844 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14845 esac
81ecdfbb
RW
14846 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14847
14848 # Pass --silent
14849 if test "$silent" = yes; then
14850 ac_sub_configure_args="--silent $ac_sub_configure_args"
14851 fi
14852
14853 # Always prepend --disable-option-checking to silence warnings, since
14854 # different subdirs can have different --enable and --with options.
14855 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 14856
b4e70030 14857 ac_popdir=`pwd`
bec39cab 14858 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
14859
14860 # Do not complain, so a configure script can configure whichever
14861 # parts of a large source tree are present.
fdc59709 14862 test -d "$srcdir/$ac_dir" || continue
c906108c 14863
81ecdfbb
RW
14864 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14865 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14866 $as_echo "$ac_msg" >&6
14867 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14868 ac_builddir=.
14869
81ecdfbb
RW
14870case "$ac_dir" in
14871.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14872*)
14873 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14874 # A ".." for each directory in $ac_dir_suffix.
14875 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14876 case $ac_top_builddir_sub in
14877 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14878 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14879 esac ;;
14880esac
14881ac_abs_top_builddir=$ac_pwd
14882ac_abs_builddir=$ac_pwd$ac_dir_suffix
14883# for backward compatibility:
14884ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14885
14886case $srcdir in
81ecdfbb 14887 .) # We are building in place.
bec39cab 14888 ac_srcdir=.
81ecdfbb
RW
14889 ac_top_srcdir=$ac_top_builddir_sub
14890 ac_abs_top_srcdir=$ac_pwd ;;
14891 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14892 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14893 ac_top_srcdir=$srcdir
14894 ac_abs_top_srcdir=$srcdir ;;
14895 *) # Relative name.
14896 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14897 ac_top_srcdir=$ac_top_build_prefix$srcdir
14898 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14899esac
81ecdfbb 14900ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 14901
c906108c 14902
fdc59709 14903 cd "$ac_dir"
c906108c
SS
14904
14905 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
14906 if test -f "$ac_srcdir/configure.gnu"; then
14907 ac_sub_configure=$ac_srcdir/configure.gnu
14908 elif test -f "$ac_srcdir/configure"; then
14909 ac_sub_configure=$ac_srcdir/configure
14910 elif test -f "$ac_srcdir/configure.in"; then
14911 # This should be Cygnus configure.
14912 ac_sub_configure=$ac_aux_dir/configure
c906108c 14913 else
81ecdfbb
RW
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14915$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
14916 ac_sub_configure=
14917 fi
14918
14919 # The recursion is here.
14920 if test -n "$ac_sub_configure"; then
c906108c 14921 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
14922 case $cache_file in
14923 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
14924 *) # Relative name.
14925 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 14926 esac
c906108c 14927
81ecdfbb
RW
14928 { $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
14929$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 14930 # The eval makes quoting arguments work.
fdc59709
PB
14931 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14932 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 14933 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
14934 fi
14935
fdc59709 14936 cd "$ac_popdir"
c906108c
SS
14937 done
14938fi
81ecdfbb
RW
14939if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14941$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14942fi
c906108c
SS
14943
14944
14945exit 0
This page took 2.095986 seconds and 4 git commands to generate.