2012-04-20 Sergio Durigan Junior <sergiodj@redhat.com>
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb
RW
593LIBOBJS
594GDB_NM_FILE
595frags
596target_subdir
597CONFIG_UNINSTALL
598CONFIG_INSTALL
599CONFIG_CLEAN
600CONFIG_ALL
601CONFIG_SRCS
602CONFIG_DEPS
603CONFIG_OBS
604PROFILE_CFLAGS
605ENABLE_CFLAGS
606SIM_OBS
607SIM
608XMKMF
609GDBTK_SRC_DIR
610GDBTK_CFLAGS
611GDBTKLIBS
612X_LIBS
613X_LDFLAGS
614X_CFLAGS
615TK_XINCLUDES
616TK_DEPS
617TK_LIBRARY
618TK_INCLUDE
619TK_STUB_LIB_SPEC
620TK_STUB_LIB_FLAG
621TK_STUB_LIB_FILE
622TK_LIB_SPEC
623TK_LIB_FLAG
624TK_LIB_FILE
625TK_SRC_DIR
626TK_BIN_DIR
627TK_VERSION
628TCL_DEPS
629TCL_LIBRARY
630TCL_INCLUDE
631TCL_STUB_LIB_SPEC
632TCL_STUB_LIB_FLAG
633TCL_STUB_LIB_FILE
634TCL_LIB_SPEC
635TCL_LIB_FLAG
636TCL_LIB_FILE
637TCL_SRC_DIR
638TCL_BIN_DIR
639TCL_PATCH_LEVEL
640TCL_VERSION
641WIN32LDAPP
642GUI_CFLAGS_X
643LIBGUI
644WIN32LIBS
645SER_HARDWIRE
646WERROR_CFLAGS
647WARN_CFLAGS
648SYSTEM_GDBINIT
81ecdfbb
RW
649TARGET_SYSTEM_ROOT
650CONFIG_LDFLAGS
f6528abd 651RDYNAMIC
81ecdfbb 652ALLOCA
ac534cba
JB
653PYTHON_LIBS
654PYTHON_CPPFLAGS
81ecdfbb 655PYTHON_CFLAGS
ec685c5e 656python_prog_path
81ecdfbb
RW
657LTLIBEXPAT
658LIBEXPAT
659HAVE_LIBEXPAT
b8e0a31c 660JIT_READER_DIR
f997c383 661TARGET_PTR
39037522 662READLINE_TEXI_INCFLAG
81ecdfbb
RW
663READLINE_CFLAGS
664READLINE_DEPS
665READLINE
666MIG
667WINDRES
668DLLTOOL
c971b7fa 669AR
81ecdfbb
RW
670YFLAGS
671YACC
c971b7fa 672RANLIB
81ecdfbb 673LN_S
c971b7fa
PA
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677AWK
81ecdfbb
RW
678REPORT_BUGS_TEXI
679REPORT_BUGS_TO
680PKGVERSION
681TARGET_OBS
682subdirs
683GDB_DATADIR
684DEBUGDIR
5048e516
JK
685MAKEINFO_EXTRA_FLAGS
686MAKEINFOFLAGS
687MAKEINFO
81ecdfbb
RW
688PACKAGE
689GNULIB_STDINT_H
81ecdfbb
RW
690CATOBJEXT
691GENCAT
692INSTOBJEXT
693DATADIRNAME
694CATALOGS
695POSUB
696GMSGFMT
697XGETTEXT
698INCINTL
699LIBINTL_DEP
700LIBINTL
701USE_NLS
702SET_MAKE
703GMAKE_FALSE
704GMAKE_TRUE
705MAKE
706CCDEPMODE
707DEPDIR
708am__leading_dot
709target_os
710target_vendor
711target_cpu
712target
713host_os
714host_vendor
715host_cpu
716host
717build_os
718build_vendor
719build_cpu
720build
c971b7fa
PA
721EGREP
722GREP
723CPP
81ecdfbb
RW
724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731MAINT
732MAINTAINER_MODE_FALSE
733MAINTAINER_MODE_TRUE
734target_alias
735host_alias
736build_alias
737LIBS
738ECHO_T
739ECHO_N
740ECHO_C
741DEFS
742mandir
743localedir
744libdir
745psdir
746pdfdir
747dvidir
748htmldir
749infodir
750docdir
751oldincludedir
752includedir
753localstatedir
754sharedstatedir
755sysconfdir
756datadir
757datarootdir
758libexecdir
759sbindir
760bindir
761program_transform_name
762prefix
763exec_prefix
764PACKAGE_URL
765PACKAGE_BUGREPORT
766PACKAGE_STRING
767PACKAGE_VERSION
768PACKAGE_TARNAME
769PACKAGE_NAME
770PATH_SEPARATOR
771SHELL'
a4ce5b0d 772ac_subst_files='host_makefile_frag'
81ecdfbb
RW
773ac_user_opts='
774enable_option_checking
775enable_maintainer_mode
da2f07f1
JK
776enable_plugins
777enable_largefile
81ecdfbb
RW
778with_separate_debug_dir
779with_gdb_datadir
780with_relocated_sources
bccbefd2 781with_auto_load_safe_path
81ecdfbb
RW
782enable_targets
783enable_64_bit_bfd
784enable_gdbcli
785enable_gdbmi
786enable_tui
787enable_gdbtk
05e7c244 788with_libunwind_ia64
81ecdfbb
RW
789with_curses
790enable_profiling
791with_pkgversion
792with_bugurl
b040ad30 793with_zlib
81ecdfbb 794with_libiconv_prefix
478aac75 795with_iconv_bin
81ecdfbb 796with_system_readline
b8e0a31c 797with_jit_reader_dir
81ecdfbb
RW
798with_expat
799with_gnu_ld
800enable_rpath
801with_libexpat_prefix
802with_python
803with_included_regex
804with_sysroot
805with_system_gdbinit
806enable_werror
807enable_build_warnings
808enable_gdb_build_warnings
809with_tcl
810with_tk
811with_x
812enable_sim
813enable_multi_ice
496c0e1b 814enable_gdbserver
81ecdfbb
RW
815'
816 ac_precious_vars='build_alias
817host_alias
818target_alias
819CC
820CFLAGS
821LDFLAGS
822LIBS
823CPPFLAGS
824CPP
f06e05e0
JK
825MAKEINFO
826MAKEINFOFLAGS
81ecdfbb
RW
827YACC
828YFLAGS
829XMKMF'
5ae98d25 830ac_subdirs_all='testsuite
81ecdfbb
RW
831gdbtk
832multi-ice
833gdbserver'
c906108c
SS
834
835# Initialize some variables set by options.
bec39cab
AC
836ac_init_help=
837ac_init_version=false
81ecdfbb
RW
838ac_unrecognized_opts=
839ac_unrecognized_sep=
c906108c
SS
840# The variables have the same names as the options, with
841# dashes changed to underlines.
bec39cab 842cache_file=/dev/null
c906108c 843exec_prefix=NONE
c906108c 844no_create=
c906108c
SS
845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
850silent=
851site=
852srcdir=
c906108c
SS
853verbose=
854x_includes=NONE
855x_libraries=NONE
bec39cab
AC
856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 862# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
c906108c
SS
868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
c906108c
SS
871includedir='${prefix}/include'
872oldincludedir='/usr/include'
81ecdfbb
RW
873docdir='${datarootdir}/doc/${PACKAGE}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
c906108c 882
c906108c 883ac_prev=
81ecdfbb 884ac_dashdash=
c906108c
SS
885for ac_option
886do
c906108c
SS
887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
81ecdfbb 889 eval $ac_prev=\$ac_option
c906108c
SS
890 ac_prev=
891 continue
892 fi
893
81ecdfbb
RW
894 case $ac_option in
895 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *) ac_optarg=yes ;;
897 esac
c906108c
SS
898
899 # Accept the important Cygnus configure options, so we can diagnose typos.
900
81ecdfbb
RW
901 case $ac_dashdash$ac_option in
902 --)
903 ac_dashdash=yes ;;
c906108c
SS
904
905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
906 ac_prev=bindir ;;
907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 908 bindir=$ac_optarg ;;
c906108c
SS
909
910 -build | --build | --buil | --bui | --bu)
bec39cab 911 ac_prev=build_alias ;;
c906108c 912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 913 build_alias=$ac_optarg ;;
c906108c
SS
914
915 -cache-file | --cache-file | --cache-fil | --cache-fi \
916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
917 ac_prev=cache_file ;;
918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
920 cache_file=$ac_optarg ;;
921
922 --config-cache | -C)
923 cache_file=config.cache ;;
c906108c 924
81ecdfbb 925 -datadir | --datadir | --datadi | --datad)
c906108c 926 ac_prev=datadir ;;
81ecdfbb 927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 928 datadir=$ac_optarg ;;
c906108c 929
81ecdfbb
RW
930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
931 | --dataroo | --dataro | --datar)
932 ac_prev=datarootdir ;;
933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
935 datarootdir=$ac_optarg ;;
936
c906108c 937 -disable-* | --disable-*)
81ecdfbb 938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 939 # Reject names that are not valid shell variable names.
81ecdfbb
RW
940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
941 as_fn_error "invalid feature name: $ac_useropt"
942 ac_useropt_orig=$ac_useropt
943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
944 case $ac_user_opts in
945 *"
946"enable_$ac_useropt"
947"*) ;;
948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
949 ac_unrecognized_sep=', ';;
950 esac
951 eval enable_$ac_useropt=no ;;
952
953 -docdir | --docdir | --docdi | --doc | --do)
954 ac_prev=docdir ;;
955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
956 docdir=$ac_optarg ;;
957
958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
959 ac_prev=dvidir ;;
960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
961 dvidir=$ac_optarg ;;
c906108c
SS
962
963 -enable-* | --enable-*)
81ecdfbb 964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 965 # Reject names that are not valid shell variable names.
81ecdfbb
RW
966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
967 as_fn_error "invalid feature name: $ac_useropt"
968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
b4e70030 976 esac
81ecdfbb 977 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
978
979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
981 | --exec | --exe | --ex)
982 ac_prev=exec_prefix ;;
983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
985 | --exec=* | --exe=* | --ex=*)
bec39cab 986 exec_prefix=$ac_optarg ;;
c906108c
SS
987
988 -gas | --gas | --ga | --g)
989 # Obsolete; use --with-gas.
990 with_gas=yes ;;
991
bec39cab
AC
992 -help | --help | --hel | --he | -h)
993 ac_init_help=long ;;
994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
995 ac_init_help=recursive ;;
996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
997 ac_init_help=short ;;
c906108c
SS
998
999 -host | --host | --hos | --ho)
bec39cab 1000 ac_prev=host_alias ;;
c906108c 1001 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1002 host_alias=$ac_optarg ;;
c906108c 1003
81ecdfbb
RW
1004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1005 ac_prev=htmldir ;;
1006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1007 | --ht=*)
1008 htmldir=$ac_optarg ;;
1009
c906108c
SS
1010 -includedir | --includedir | --includedi | --included | --include \
1011 | --includ | --inclu | --incl | --inc)
1012 ac_prev=includedir ;;
1013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1014 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1015 includedir=$ac_optarg ;;
c906108c
SS
1016
1017 -infodir | --infodir | --infodi | --infod | --info | --inf)
1018 ac_prev=infodir ;;
1019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1020 infodir=$ac_optarg ;;
c906108c
SS
1021
1022 -libdir | --libdir | --libdi | --libd)
1023 ac_prev=libdir ;;
1024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1025 libdir=$ac_optarg ;;
c906108c
SS
1026
1027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1028 | --libexe | --libex | --libe)
1029 ac_prev=libexecdir ;;
1030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1031 | --libexe=* | --libex=* | --libe=*)
bec39cab 1032 libexecdir=$ac_optarg ;;
c906108c 1033
81ecdfbb
RW
1034 -localedir | --localedir | --localedi | --localed | --locale)
1035 ac_prev=localedir ;;
1036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1037 localedir=$ac_optarg ;;
1038
c906108c 1039 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1040 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1041 ac_prev=localstatedir ;;
1042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1044 localstatedir=$ac_optarg ;;
c906108c
SS
1045
1046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1047 ac_prev=mandir ;;
1048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1049 mandir=$ac_optarg ;;
c906108c
SS
1050
1051 -nfp | --nfp | --nf)
1052 # Obsolete; use --without-fp.
1053 with_fp=no ;;
1054
1055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1056 | --no-cr | --no-c | -n)
c906108c
SS
1057 no_create=yes ;;
1058
1059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1061 no_recursion=yes ;;
1062
1063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1065 | --oldin | --oldi | --old | --ol | --o)
1066 ac_prev=oldincludedir ;;
1067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1070 oldincludedir=$ac_optarg ;;
c906108c
SS
1071
1072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1073 ac_prev=prefix ;;
1074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1075 prefix=$ac_optarg ;;
c906108c
SS
1076
1077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1078 | --program-pre | --program-pr | --program-p)
1079 ac_prev=program_prefix ;;
1080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1082 program_prefix=$ac_optarg ;;
c906108c
SS
1083
1084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1085 | --program-suf | --program-su | --program-s)
1086 ac_prev=program_suffix ;;
1087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1089 program_suffix=$ac_optarg ;;
c906108c
SS
1090
1091 -program-transform-name | --program-transform-name \
1092 | --program-transform-nam | --program-transform-na \
1093 | --program-transform-n | --program-transform- \
1094 | --program-transform | --program-transfor \
1095 | --program-transfo | --program-transf \
1096 | --program-trans | --program-tran \
1097 | --progr-tra | --program-tr | --program-t)
1098 ac_prev=program_transform_name ;;
1099 -program-transform-name=* | --program-transform-name=* \
1100 | --program-transform-nam=* | --program-transform-na=* \
1101 | --program-transform-n=* | --program-transform-=* \
1102 | --program-transform=* | --program-transfor=* \
1103 | --program-transfo=* | --program-transf=* \
1104 | --program-trans=* | --program-tran=* \
1105 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1106 program_transform_name=$ac_optarg ;;
c906108c 1107
81ecdfbb
RW
1108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1109 ac_prev=pdfdir ;;
1110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1111 pdfdir=$ac_optarg ;;
1112
1113 -psdir | --psdir | --psdi | --psd | --ps)
1114 ac_prev=psdir ;;
1115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1116 psdir=$ac_optarg ;;
1117
c906108c
SS
1118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 silent=yes ;;
1121
1122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1123 ac_prev=sbindir ;;
1124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1125 | --sbi=* | --sb=*)
bec39cab 1126 sbindir=$ac_optarg ;;
c906108c
SS
1127
1128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1130 | --sharedst | --shareds | --shared | --share | --shar \
1131 | --sha | --sh)
1132 ac_prev=sharedstatedir ;;
1133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1136 | --sha=* | --sh=*)
bec39cab 1137 sharedstatedir=$ac_optarg ;;
c906108c
SS
1138
1139 -site | --site | --sit)
1140 ac_prev=site ;;
1141 -site=* | --site=* | --sit=*)
bec39cab 1142 site=$ac_optarg ;;
3ace7edb 1143
c906108c
SS
1144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1145 ac_prev=srcdir ;;
1146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1147 srcdir=$ac_optarg ;;
c906108c
SS
1148
1149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1150 | --syscon | --sysco | --sysc | --sys | --sy)
1151 ac_prev=sysconfdir ;;
1152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1154 sysconfdir=$ac_optarg ;;
c906108c
SS
1155
1156 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1157 ac_prev=target_alias ;;
c906108c 1158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1159 target_alias=$ac_optarg ;;
c906108c
SS
1160
1161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1162 verbose=yes ;;
1163
bec39cab
AC
1164 -version | --version | --versio | --versi | --vers | -V)
1165 ac_init_version=: ;;
c906108c
SS
1166
1167 -with-* | --with-*)
81ecdfbb 1168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1169 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1171 as_fn_error "invalid package name: $ac_useropt"
1172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
b4e70030 1180 esac
81ecdfbb 1181 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1182
1183 -without-* | --without-*)
81ecdfbb 1184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1185 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1187 as_fn_error "invalid package name: $ac_useropt"
1188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=no ;;
c906108c
SS
1198
1199 --x)
1200 # Obsolete; use --with-x.
1201 with_x=yes ;;
1202
1203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1204 | --x-incl | --x-inc | --x-in | --x-i)
1205 ac_prev=x_includes ;;
1206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1208 x_includes=$ac_optarg ;;
c906108c
SS
1209
1210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1212 ac_prev=x_libraries ;;
1213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1215 x_libraries=$ac_optarg ;;
c906108c 1216
81ecdfbb
RW
1217 -*) as_fn_error "unrecognized option: \`$ac_option'
1218Try \`$0 --help' for more information."
c906108c
SS
1219 ;;
1220
bec39cab
AC
1221 *=*)
1222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1223 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1224 case $ac_envvar in #(
1225 '' | [0-9]* | *[!_$as_cr_alnum]* )
1226 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1227 esac
1228 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1229 export $ac_envvar ;;
1230
c906108c 1231 *)
bec39cab 1232 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1236 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1237 ;;
1238
1239 esac
1240done
1241
1242if test -n "$ac_prev"; then
bec39cab 1243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1244 as_fn_error "missing argument to $ac_option"
c906108c 1245fi
c906108c 1246
81ecdfbb
RW
1247if test -n "$ac_unrecognized_opts"; then
1248 case $enable_option_checking in
1249 no) ;;
1250 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1252 esac
81ecdfbb 1253fi
b4e70030 1254
81ecdfbb
RW
1255# Check all directory arguments for consistency.
1256for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1257 datadir sysconfdir sharedstatedir localstatedir includedir \
1258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1259 libdir localedir mandir
b4e70030 1260do
81ecdfbb
RW
1261 eval ac_val=\$$ac_var
1262 # Remove trailing slashes.
1263 case $ac_val in
1264 */ )
1265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1266 eval $ac_var=\$ac_val;;
1267 esac
1268 # Be sure to have absolute directory names.
b4e70030 1269 case $ac_val in
81ecdfbb
RW
1270 [\\/$]* | ?:[\\/]* ) continue;;
1271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1272 esac
81ecdfbb 1273 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1274done
1275
bec39cab
AC
1276# There might be people who depend on the old broken behavior: `$host'
1277# used to hold the argument of --host etc.
1278# FIXME: To remove some day.
1279build=$build_alias
1280host=$host_alias
1281target=$target_alias
1282
1283# FIXME: To remove some day.
1284if test "x$host_alias" != x; then
1285 if test "x$build_alias" = x; then
1286 cross_compiling=maybe
81ecdfbb 1287 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1288 If a cross compiler is detected then cross compile mode will be used." >&2
1289 elif test "x$build_alias" != "x$host_alias"; then
1290 cross_compiling=yes
1291 fi
1292fi
c906108c 1293
bec39cab
AC
1294ac_tool_prefix=
1295test -n "$host_alias" && ac_tool_prefix=$host_alias-
1296
1297test "$silent" = yes && exec 6>/dev/null
c906108c 1298
c906108c 1299
81ecdfbb
RW
1300ac_pwd=`pwd` && test -n "$ac_pwd" &&
1301ac_ls_di=`ls -di .` &&
1302ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1303 as_fn_error "working directory cannot be determined"
1304test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1305 as_fn_error "pwd does not report name of working directory"
1306
1307
c906108c
SS
1308# Find the source files, if location was not specified.
1309if test -z "$srcdir"; then
1310 ac_srcdir_defaulted=yes
81ecdfbb
RW
1311 # Try the directory containing this script, then the parent directory.
1312 ac_confdir=`$as_dirname -- "$as_myself" ||
1313$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1314 X"$as_myself" : 'X\(//\)[^/]' \| \
1315 X"$as_myself" : 'X\(//\)$' \| \
1316 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1317$as_echo X"$as_myself" |
1318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1319 s//\1/
1320 q
1321 }
1322 /^X\(\/\/\)[^/].*/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\).*/{
1331 s//\1/
1332 q
1333 }
1334 s/.*/./; q'`
c906108c 1335 srcdir=$ac_confdir
81ecdfbb 1336 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1337 srcdir=..
1338 fi
1339else
1340 ac_srcdir_defaulted=no
1341fi
81ecdfbb
RW
1342if test ! -r "$srcdir/$ac_unique_file"; then
1343 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1344 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1345fi
1346ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1347ac_abs_confdir=`(
1348 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1349 pwd)`
1350# When building in place, set srcdir=.
1351if test "$ac_abs_confdir" = "$ac_pwd"; then
1352 srcdir=.
1353fi
1354# Remove unnecessary trailing slashes from srcdir.
1355# Double slashes in file names in object file debugging info
1356# mess up M-x gdb in Emacs.
1357case $srcdir in
1358*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1359esac
1360for ac_var in $ac_precious_vars; do
1361 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_env_${ac_var}_value=\$${ac_var}
1363 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1365done
c906108c 1366
bec39cab
AC
1367#
1368# Report the --help message.
1369#
1370if test "$ac_init_help" = "long"; then
1371 # Omit some internal or obsolete options to make the list less imposing.
1372 # This message is too long to be a string in the A/UX 3.1 sh.
1373 cat <<_ACEOF
1374\`configure' configures this package to adapt to many kinds of systems.
1375
1376Usage: $0 [OPTION]... [VAR=VALUE]...
1377
1378To assign environment variables (e.g., CC, CFLAGS...), specify them as
1379VAR=VALUE. See below for descriptions of some of the useful variables.
1380
1381Defaults for the options are specified in brackets.
1382
1383Configuration:
1384 -h, --help display this help and exit
1385 --help=short display options specific to this package
1386 --help=recursive display the short help of all the included packages
1387 -V, --version display version information and exit
1388 -q, --quiet, --silent do not print \`checking...' messages
1389 --cache-file=FILE cache test results in FILE [disabled]
1390 -C, --config-cache alias for \`--cache-file=config.cache'
1391 -n, --no-create do not create output files
1392 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1393
bec39cab
AC
1394Installation directories:
1395 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1396 [$ac_default_prefix]
bec39cab 1397 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1398 [PREFIX]
bec39cab
AC
1399
1400By default, \`make install' will install all the files in
1401\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1402an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1403for instance \`--prefix=\$HOME'.
1404
1405For better control, use the options below.
1406
1407Fine tuning of the installation directories:
81ecdfbb
RW
1408 --bindir=DIR user executables [EPREFIX/bin]
1409 --sbindir=DIR system admin executables [EPREFIX/sbin]
1410 --libexecdir=DIR program executables [EPREFIX/libexec]
1411 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1412 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1413 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1414 --libdir=DIR object code libraries [EPREFIX/lib]
1415 --includedir=DIR C header files [PREFIX/include]
1416 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1417 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1418 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1419 --infodir=DIR info documentation [DATAROOTDIR/info]
1420 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1421 --mandir=DIR man documentation [DATAROOTDIR/man]
1422 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1423 --htmldir=DIR html documentation [DOCDIR]
1424 --dvidir=DIR dvi documentation [DOCDIR]
1425 --pdfdir=DIR pdf documentation [DOCDIR]
1426 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1427_ACEOF
1428
1429 cat <<\_ACEOF
1430
bec39cab
AC
1431X features:
1432 --x-includes=DIR X include files are in DIR
1433 --x-libraries=DIR X library files are in DIR
1434
1435System types:
1436 --build=BUILD configure for building on BUILD [guessed]
1437 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1438 --target=TARGET configure for building compilers for TARGET [HOST]
1439_ACEOF
1440fi
1441
1442if test -n "$ac_init_help"; then
1443
1444 cat <<\_ACEOF
1445
1446Optional Features:
81ecdfbb 1447 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1448 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1449 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1450 --enable-maintainer-mode enable make rules and dependencies not useful
1451 (and sometimes confusing) to the casual installer
da2f07f1
JK
1452 --enable-plugins Enable support for plugins (defaults no)
1453 --disable-largefile omit support for large files
a1220294
TT
1454 --enable-targets=TARGETS
1455 alternative target configurations
c0993dbe 1456 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1457 --disable-gdbcli disable command-line interface (CLI)
1458 --disable-gdbmi disable machine-interface (MI)
1459 --enable-tui enable full-screen terminal user interface (TUI)
1460 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1461 --enable-profiling enable profiling of GDB
3841debe 1462 --disable-rpath do not hardcode runtime library paths
a1220294 1463 --enable-werror treat compile warnings as errors
32c1c914 1464 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1465 --enable-gdb-build-warnings
32c1c914 1466 enable GDB specific build-time compiler warnings if
a1220294 1467 gcc is used
32c1c914 1468 --enable-sim link gdb with simulator
bec39cab 1469 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1470 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1471 is auto)
bec39cab
AC
1472
1473Optional Packages:
1474 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1475 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1476 --with-separate-debug-dir=PATH
32c1c914 1477 look for global separate debug info in this path
62e4f60c 1478 [LIBDIR/debug]
b14b1491
TT
1479 --with-gdb-datadir=PATH look for global separate data files in this path
1480 [DATADIR/gdb]
29b0e8a2 1481 --with-relocated-sources=PATH
32c1c914 1482 automatically relocate this path for source files
bccbefd2
JK
1483 --with-auto-load-safe-path=PATH
1484 directories safe to hold auto-loaded files
1485 --without-auto-load-safe-path
1486 do not restrict auto-loaded files locations
05e7c244 1487 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1488 --with-curses use the curses library instead of the termcap
1489 library
c16158bc
JM
1490 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1491 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1492 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1493 --with-libiconv-prefix=DIR
1494 search for libiconv in DIR/include and DIR/lib
478aac75 1495 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1496 --with-system-readline use installed readline library
b8e0a31c
SD
1497 --with-jit-reader-dir=PATH
1498 directory to load the JIT readers from
5c39566f 1499 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1500 --with-gnu-ld assume the C compiler uses GNU ld default=no
1501 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1502 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1503 --with-python[=PYTHON] include python support
1504 (auto/yes/no/<python-program>)
a1220294
TT
1505 --without-included-regex
1506 don't use included regex; this is the default on
1507 systems with version 2 of the GNU C library (use
1508 with caution on other system)
81ecdfbb 1509 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1510 --with-system-gdbinit=PATH
32c1c914 1511 automatically load a system-wide gdbinit file
5062cc19
KS
1512 --with-tcl directory containing tcl configuration (tclConfig.sh)
1513 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1514 --with-x use the X Window System
bec39cab
AC
1515
1516Some influential environment variables:
1517 CC C compiler command
1518 CFLAGS C compiler flags
1519 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1520 nonstandard directory <lib dir>
81ecdfbb
RW
1521 LIBS libraries to pass to the linker, e.g. -l<library>
1522 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1523 you have headers in a nonstandard directory <include dir>
bec39cab 1524 CPP C preprocessor
f06e05e0
JK
1525 MAKEINFO Parent configure detects if it is of sufficient version.
1526 MAKEINFOFLAGS
1527 Parameters for MAKEINFO.
81ecdfbb
RW
1528 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1529 the first program found out of: `bison -y', `byacc', `yacc'.
1530 YFLAGS The list of arguments that will be passed by default to $YACC.
1531 This script will default YFLAGS to the empty string to avoid a
1532 default value of `-d' given by some make applications.
1533 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1534
1535Use these variables to override the choices made by `configure' or to help
1536it to find libraries and programs with nonstandard names/locations.
1537
81ecdfbb 1538Report bugs to the package provider.
bec39cab 1539_ACEOF
81ecdfbb 1540ac_status=$?
bec39cab
AC
1541fi
1542
1543if test "$ac_init_help" = "recursive"; then
1544 # If there are subdirs, report their specific --help.
bec39cab 1545 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1546 test -d "$ac_dir" ||
1547 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1548 continue
bec39cab
AC
1549 ac_builddir=.
1550
81ecdfbb
RW
1551case "$ac_dir" in
1552.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1553*)
1554 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1555 # A ".." for each directory in $ac_dir_suffix.
1556 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1557 case $ac_top_builddir_sub in
1558 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1559 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1560 esac ;;
1561esac
1562ac_abs_top_builddir=$ac_pwd
1563ac_abs_builddir=$ac_pwd$ac_dir_suffix
1564# for backward compatibility:
1565ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1566
1567case $srcdir in
81ecdfbb 1568 .) # We are building in place.
bec39cab 1569 ac_srcdir=.
81ecdfbb
RW
1570 ac_top_srcdir=$ac_top_builddir_sub
1571 ac_abs_top_srcdir=$ac_pwd ;;
1572 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1573 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1574 ac_top_srcdir=$srcdir
1575 ac_abs_top_srcdir=$srcdir ;;
1576 *) # Relative name.
1577 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1578 ac_top_srcdir=$ac_top_build_prefix$srcdir
1579 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1580esac
81ecdfbb 1581ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1582
81ecdfbb
RW
1583 cd "$ac_dir" || { ac_status=$?; continue; }
1584 # Check for guested configure.
1585 if test -f "$ac_srcdir/configure.gnu"; then
1586 echo &&
1587 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1588 elif test -f "$ac_srcdir/configure"; then
1589 echo &&
1590 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1591 else
81ecdfbb
RW
1592 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1593 fi || ac_status=$?
1594 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1595 done
1596fi
1597
81ecdfbb 1598test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1599if $ac_init_version; then
1600 cat <<\_ACEOF
81ecdfbb
RW
1601configure
1602generated by GNU Autoconf 2.64
bec39cab 1603
81ecdfbb 1604Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1605This configure script is free software; the Free Software Foundation
1606gives unlimited permission to copy, distribute and modify it.
1607_ACEOF
81ecdfbb 1608 exit
bec39cab 1609fi
bec39cab 1610
81ecdfbb
RW
1611## ------------------------ ##
1612## Autoconf initialization. ##
1613## ------------------------ ##
bec39cab 1614
81ecdfbb
RW
1615# ac_fn_c_try_compile LINENO
1616# --------------------------
1617# Try to compile conftest.$ac_ext, and return whether this succeeded.
1618ac_fn_c_try_compile ()
1619{
1620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1621 rm -f conftest.$ac_objext
1622 if { { ac_try="$ac_compile"
1623case "(($ac_try" in
1624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1625 *) ac_try_echo=$ac_try;;
1626esac
1627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1628$as_echo "$ac_try_echo"; } >&5
1629 (eval "$ac_compile") 2>conftest.err
1630 ac_status=$?
1631 if test -s conftest.err; then
1632 grep -v '^ *+' conftest.err >conftest.er1
1633 cat conftest.er1 >&5
1634 mv -f conftest.er1 conftest.err
1635 fi
1636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1637 test $ac_status = 0; } && {
1638 test -z "$ac_c_werror_flag" ||
1639 test ! -s conftest.err
1640 } && test -s conftest.$ac_objext; then :
1641 ac_retval=0
1642else
1643 $as_echo "$as_me: failed program was:" >&5
1644sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1645
81ecdfbb
RW
1646 ac_retval=1
1647fi
1648 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1649 return $ac_retval
1650
1651} # ac_fn_c_try_compile
1652
1653# ac_fn_c_try_cpp LINENO
1654# ----------------------
1655# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1656ac_fn_c_try_cpp ()
bec39cab 1657{
81ecdfbb
RW
1658 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1659 if { { ac_try="$ac_cpp conftest.$ac_ext"
1660case "(($ac_try" in
1661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662 *) ac_try_echo=$ac_try;;
1663esac
1664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665$as_echo "$ac_try_echo"; } >&5
1666 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1667 ac_status=$?
1668 if test -s conftest.err; then
1669 grep -v '^ *+' conftest.err >conftest.er1
1670 cat conftest.er1 >&5
1671 mv -f conftest.er1 conftest.err
1672 fi
1673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674 test $ac_status = 0; } >/dev/null && {
1675 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1676 test ! -s conftest.err
1677 }; then :
1678 ac_retval=0
1679else
1680 $as_echo "$as_me: failed program was:" >&5
1681sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1682
81ecdfbb
RW
1683 ac_retval=1
1684fi
1685 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1686 return $ac_retval
bec39cab 1687
81ecdfbb 1688} # ac_fn_c_try_cpp
bec39cab 1689
81ecdfbb
RW
1690# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1691# -------------------------------------------------------
1692# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1693# the include files in INCLUDES and setting the cache variable VAR
1694# accordingly.
1695ac_fn_c_check_header_mongrel ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1700$as_echo_n "checking for $2... " >&6; }
1701if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1702 $as_echo_n "(cached) " >&6
1703fi
1704eval ac_res=\$$3
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1706$as_echo "$ac_res" >&6; }
1707else
1708 # Is the header compilable?
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1710$as_echo_n "checking $2 usability... " >&6; }
1711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1712/* end confdefs.h. */
1713$4
1714#include <$2>
1715_ACEOF
1716if ac_fn_c_try_compile "$LINENO"; then :
1717 ac_header_compiler=yes
1718else
1719 ac_header_compiler=no
1720fi
1721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1723$as_echo "$ac_header_compiler" >&6; }
bec39cab 1724
81ecdfbb
RW
1725# Is the header present?
1726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1727$as_echo_n "checking $2 presence... " >&6; }
1728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1729/* end confdefs.h. */
1730#include <$2>
1731_ACEOF
1732if ac_fn_c_try_cpp "$LINENO"; then :
1733 ac_header_preproc=yes
1734else
1735 ac_header_preproc=no
1736fi
1737rm -f conftest.err conftest.$ac_ext
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1739$as_echo "$ac_header_preproc" >&6; }
bec39cab 1740
81ecdfbb
RW
1741# So? What about this header?
1742case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1743 yes:no: )
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1745$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1747$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1748 ;;
1749 no:yes:* )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1751$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1753$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1755$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1757$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1759$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1760 ;;
1761esac
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1763$as_echo_n "checking for $2... " >&6; }
1764if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1765 $as_echo_n "(cached) " >&6
1766else
1767 eval "$3=\$ac_header_compiler"
1768fi
1769eval ac_res=\$$3
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1771$as_echo "$ac_res" >&6; }
1772fi
1773 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1774
81ecdfbb 1775} # ac_fn_c_check_header_mongrel
bec39cab 1776
81ecdfbb
RW
1777# ac_fn_c_try_run LINENO
1778# ----------------------
1779# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1780# that executables *can* be run.
1781ac_fn_c_try_run ()
1782{
1783 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1784 if { { ac_try="$ac_link"
1785case "(($ac_try" in
1786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787 *) ac_try_echo=$ac_try;;
1788esac
1789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790$as_echo "$ac_try_echo"; } >&5
1791 (eval "$ac_link") 2>&5
1792 ac_status=$?
1793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1795 { { case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_try") 2>&5
1802 ac_status=$?
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; }; }; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: program exited with status $ac_status" >&5
1808 $as_echo "$as_me: failed program was:" >&5
1809sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1810
81ecdfbb
RW
1811 ac_retval=$ac_status
1812fi
1813 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1814 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1815 return $ac_retval
bec39cab 1816
81ecdfbb 1817} # ac_fn_c_try_run
bec39cab 1818
81ecdfbb
RW
1819# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1820# -------------------------------------------------------
1821# Tests whether HEADER exists and can be compiled using the include files in
1822# INCLUDES, setting the cache variable VAR accordingly.
1823ac_fn_c_check_header_compile ()
1824{
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
1828if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1829 $as_echo_n "(cached) " >&6
1830else
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834#include <$2>
bec39cab 1835_ACEOF
81ecdfbb
RW
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 eval "$3=yes"
1838else
1839 eval "$3=no"
1840fi
1841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842fi
1843eval ac_res=\$$3
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1845$as_echo "$ac_res" >&6; }
1846 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1847
81ecdfbb 1848} # ac_fn_c_check_header_compile
bec39cab 1849
81ecdfbb
RW
1850# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1851# --------------------------------------------
1852# Tries to find the compile-time value of EXPR in a program that includes
1853# INCLUDES, setting VAR accordingly. Returns whether the value could be
1854# computed
1855ac_fn_c_compute_int ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 if test "$cross_compiling" = yes; then
1859 # Depending upon the size, compute the lo and hi bounds.
1860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862$4
1863int
1864main ()
1865{
1866static int test_array [1 - 2 * !(($2) >= 0)];
1867test_array [0] = 0
bec39cab 1868
81ecdfbb
RW
1869 ;
1870 return 0;
1871}
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874 ac_lo=0 ac_mid=0
1875 while :; do
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879int
1880main ()
1881{
1882static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1883test_array [0] = 0
bec39cab 1884
81ecdfbb
RW
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 ac_hi=$ac_mid; break
1891else
1892 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1893 if test $ac_lo -le $ac_mid; then
1894 ac_lo= ac_hi=
1895 break
1896 fi
1897 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1898fi
81ecdfbb
RW
1899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1900 done
c906108c 1901else
81ecdfbb
RW
1902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1903/* end confdefs.h. */
1904$4
1905int
1906main ()
1907{
1908static int test_array [1 - 2 * !(($2) < 0)];
1909test_array [0] = 0
bec39cab 1910
81ecdfbb
RW
1911 ;
1912 return 0;
1913}
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916 ac_hi=-1 ac_mid=-1
1917 while :; do
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920$4
1921int
1922main ()
1923{
1924static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1925test_array [0] = 0
bec39cab 1926
81ecdfbb
RW
1927 ;
1928 return 0;
1929}
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 ac_lo=$ac_mid; break
1933else
1934 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1935 if test $ac_mid -le $ac_hi; then
1936 ac_lo= ac_hi=
1937 break
1938 fi
1939 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1940fi
1941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1942 done
1943else
1944 ac_lo= ac_hi=
1945fi
1946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949# Binary search between lo and hi bounds.
1950while test "x$ac_lo" != "x$ac_hi"; do
1951 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1959test_array [0] = 0
bec39cab 1960
81ecdfbb
RW
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 ac_hi=$ac_mid
1967else
1968 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971done
1972case $ac_lo in #((
1973?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1974'') ac_retval=1 ;;
1975esac
1976 else
1977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1978/* end confdefs.h. */
1979$4
1980static long int longval () { return $2; }
1981static unsigned long int ulongval () { return $2; }
1982#include <stdio.h>
1983#include <stdlib.h>
1984int
1985main ()
1986{
bec39cab 1987
81ecdfbb
RW
1988 FILE *f = fopen ("conftest.val", "w");
1989 if (! f)
1990 return 1;
1991 if (($2) < 0)
1992 {
1993 long int i = longval ();
1994 if (i != ($2))
1995 return 1;
1996 fprintf (f, "%ld", i);
1997 }
1998 else
1999 {
2000 unsigned long int i = ulongval ();
2001 if (i != ($2))
2002 return 1;
2003 fprintf (f, "%lu", i);
2004 }
2005 /* Do not output a trailing newline, as this causes \r\n confusion
2006 on some platforms. */
2007 return ferror (f) || fclose (f) != 0;
bec39cab 2008
81ecdfbb
RW
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_run "$LINENO"; then :
2014 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2015else
2016 ac_retval=1
2017fi
2018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2019 conftest.$ac_objext conftest.beam conftest.$ac_ext
2020rm -f conftest.val
bec39cab 2021
81ecdfbb
RW
2022 fi
2023 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2024 return $ac_retval
bec39cab 2025
81ecdfbb 2026} # ac_fn_c_compute_int
bec39cab 2027
c971b7fa
PA
2028# ac_fn_c_try_link LINENO
2029# -----------------------
2030# Try to link conftest.$ac_ext, and return whether this succeeded.
2031ac_fn_c_try_link ()
2032{
2033 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2034 rm -f conftest.$ac_objext conftest$ac_exeext
2035 if { { ac_try="$ac_link"
2036case "(($ac_try" in
2037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2038 *) ac_try_echo=$ac_try;;
2039esac
2040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2041$as_echo "$ac_try_echo"; } >&5
2042 (eval "$ac_link") 2>conftest.err
2043 ac_status=$?
2044 if test -s conftest.err; then
2045 grep -v '^ *+' conftest.err >conftest.er1
2046 cat conftest.er1 >&5
2047 mv -f conftest.er1 conftest.err
2048 fi
2049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2050 test $ac_status = 0; } && {
2051 test -z "$ac_c_werror_flag" ||
2052 test ! -s conftest.err
2053 } && test -s conftest$ac_exeext && {
2054 test "$cross_compiling" = yes ||
2055 $as_test_x conftest$ac_exeext
2056 }; then :
2057 ac_retval=0
2058else
2059 $as_echo "$as_me: failed program was:" >&5
2060sed 's/^/| /' conftest.$ac_ext >&5
2061
2062 ac_retval=1
2063fi
2064 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2065 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2066 # interfere with the next link command; also delete a directory that is
2067 # left behind by Apple's compiler. We do this before executing the actions.
2068 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2069 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2070 return $ac_retval
2071
2072} # ac_fn_c_try_link
2073
55a8c076
YQ
2074# ac_fn_c_check_func LINENO FUNC VAR
2075# ----------------------------------
2076# Tests whether FUNC exists, setting the cache variable VAR accordingly
2077ac_fn_c_check_func ()
81ecdfbb
RW
2078{
2079 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2081$as_echo_n "checking for $2... " >&6; }
2082if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2083 $as_echo_n "(cached) " >&6
2084else
81ecdfbb
RW
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
55a8c076
YQ
2087/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2088 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2089#define $2 innocuous_$2
2090
2091/* System header to define __stub macros and hopefully few prototypes,
2092 which can conflict with char $2 (); below.
2093 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2094 <limits.h> exists even on freestanding compilers. */
2095
2096#ifdef __STDC__
2097# include <limits.h>
2098#else
2099# include <assert.h>
2100#endif
2101
2102#undef $2
2103
2104/* Override any GCC internal prototype to avoid an error.
2105 Use char because int might match the return type of a GCC
2106 builtin and then its argument prototype would still apply. */
2107#ifdef __cplusplus
2108extern "C"
2109#endif
2110char $2 ();
2111/* The GNU C library defines this for functions which it implements
2112 to always fail with ENOSYS. Some functions are actually named
2113 something starting with __ and the normal name is an alias. */
2114#if defined __stub_$2 || defined __stub___$2
2115choke me
2116#endif
2117
2118int
2119main ()
2120{
2121return $2 ();
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_link "$LINENO"; then :
2127 eval "$3=yes"
2128else
2129 eval "$3=no"
2130fi
2131rm -f core conftest.err conftest.$ac_objext \
2132 conftest$ac_exeext conftest.$ac_ext
2133fi
2134eval ac_res=\$$3
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2136$as_echo "$ac_res" >&6; }
2137 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2138
2139} # ac_fn_c_check_func
2140
770d76d7
PA
2141# ac_fn_c_check_decl LINENO SYMBOL VAR
2142# ------------------------------------
2143# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2144ac_fn_c_check_decl ()
2145{
2146 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2147 as_decl_name=`echo $2|sed 's/ *(.*//'`
2148 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2150$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2151if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2152 $as_echo_n "(cached) " >&6
2153else
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160#ifndef $as_decl_name
2161#ifdef __cplusplus
2162 (void) $as_decl_use;
2163#else
2164 (void) $as_decl_name;
2165#endif
2166#endif
2167
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 eval "$3=yes"
2174else
2175 eval "$3=no"
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178fi
2179eval ac_res=\$$3
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181$as_echo "$ac_res" >&6; }
2182 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2183
2184} # ac_fn_c_check_decl
2185
55a8c076
YQ
2186# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2187# ----------------------------------------------------
2188# Tries to find if the field MEMBER exists in type AGGR, after including
2189# INCLUDES, setting cache variable VAR accordingly.
2190ac_fn_c_check_member ()
2191{
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2194$as_echo_n "checking for $2.$3... " >&6; }
2195if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2196 $as_echo_n "(cached) " >&6
2197else
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$5
2201int
2202main ()
2203{
2204static $2 ac_aggr;
2205if (ac_aggr.$3)
2206return 0;
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 eval "$4=yes"
2213else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$5
2217int
2218main ()
2219{
2220static $2 ac_aggr;
2221if (sizeof ac_aggr.$3)
2222return 0;
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228 eval "$4=yes"
2229else
2230 eval "$4=no"
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235fi
2236eval ac_res=\$$4
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238$as_echo "$ac_res" >&6; }
2239 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2240
2241} # ac_fn_c_check_member
2242
2243# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2244# -------------------------------------------
2245# Tests whether TYPE exists after having included INCLUDES, setting cache
2246# variable VAR accordingly.
2247ac_fn_c_check_type ()
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2251$as_echo_n "checking for $2... " >&6; }
2252if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2253 $as_echo_n "(cached) " >&6
2254else
2255 eval "$3=no"
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258$4
2259int
2260main ()
2261{
2262if (sizeof ($2))
2263 return 0;
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2270/* end confdefs.h. */
2271$4
2272int
2273main ()
2274{
2275if (sizeof (($2)))
2276 return 0;
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2282
81ecdfbb
RW
2283else
2284 eval "$3=yes"
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
2293 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2294
81ecdfbb
RW
2295} # ac_fn_c_check_type
2296cat >config.log <<_ACEOF
2297This file contains any messages produced by compilers while
2298running configure, to aid debugging if configure makes a mistake.
d5af19ba 2299
81ecdfbb
RW
2300It was created by $as_me, which was
2301generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2302
81ecdfbb 2303 $ $0 $@
413ccac7 2304
81ecdfbb
RW
2305_ACEOF
2306exec 5>>config.log
2307{
2308cat <<_ASUNAME
2309## --------- ##
2310## Platform. ##
2311## --------- ##
413ccac7 2312
81ecdfbb
RW
2313hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2314uname -m = `(uname -m) 2>/dev/null || echo unknown`
2315uname -r = `(uname -r) 2>/dev/null || echo unknown`
2316uname -s = `(uname -s) 2>/dev/null || echo unknown`
2317uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2318
81ecdfbb
RW
2319/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2320/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2321
81ecdfbb
RW
2322/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2323/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2324/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2325/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2326/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2327/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2328/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2329
81ecdfbb 2330_ASUNAME
bec39cab 2331
bec39cab
AC
2332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2337 $as_echo "PATH: $as_dir"
2338 done
2339IFS=$as_save_IFS
bec39cab 2340
81ecdfbb 2341} >&5
bec39cab 2342
81ecdfbb 2343cat >&5 <<_ACEOF
bec39cab 2344
bec39cab 2345
81ecdfbb
RW
2346## ----------- ##
2347## Core tests. ##
2348## ----------- ##
2349
2350_ACEOF
2351
2352
2353# Keep a trace of the command line.
2354# Strip out --no-create and --no-recursion so they do not pile up.
2355# Strip out --silent because we don't want to record it for future runs.
2356# Also quote any args containing shell meta-characters.
2357# Make two passes to allow for proper duplicate-argument suppression.
2358ac_configure_args=
2359ac_configure_args0=
2360ac_configure_args1=
2361ac_must_keep_next=false
2362for ac_pass in 1 2
2363do
2364 for ac_arg
2365 do
2366 case $ac_arg in
2367 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2369 | -silent | --silent | --silen | --sile | --sil)
2370 continue ;;
2371 *\'*)
2372 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2373 esac
2374 case $ac_pass in
2375 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2376 2)
2377 as_fn_append ac_configure_args1 " '$ac_arg'"
2378 if test $ac_must_keep_next = true; then
2379 ac_must_keep_next=false # Got value, back to normal.
2380 else
2381 case $ac_arg in
2382 *=* | --config-cache | -C | -disable-* | --disable-* \
2383 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2384 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2385 | -with-* | --with-* | -without-* | --without-* | --x)
2386 case "$ac_configure_args0 " in
2387 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2388 esac
2389 ;;
2390 -* ) ac_must_keep_next=true ;;
2391 esac
2392 fi
2393 as_fn_append ac_configure_args " '$ac_arg'"
2394 ;;
2395 esac
2396 done
2397done
2398{ ac_configure_args0=; unset ac_configure_args0;}
2399{ ac_configure_args1=; unset ac_configure_args1;}
2400
2401# When interrupted or exit'd, cleanup temporary files, and complete
2402# config.log. We remove comments because anyway the quotes in there
2403# would cause problems or look ugly.
2404# WARNING: Use '\'' to represent an apostrophe within the trap.
2405# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2406trap 'exit_status=$?
2407 # Save into config.log some information that might help in debugging.
2408 {
2409 echo
2410
2411 cat <<\_ASBOX
2412## ---------------- ##
2413## Cache variables. ##
2414## ---------------- ##
2415_ASBOX
2416 echo
2417 # The following way of writing the cache mishandles newlines in values,
2418(
2419 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2420 eval ac_val=\$$ac_var
2421 case $ac_val in #(
2422 *${as_nl}*)
2423 case $ac_var in #(
2424 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2425$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2426 esac
2427 case $ac_var in #(
2428 _ | IFS | as_nl) ;; #(
2429 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2430 *) { eval $ac_var=; unset $ac_var;} ;;
2431 esac ;;
2432 esac
2433 done
2434 (set) 2>&1 |
2435 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2436 *${as_nl}ac_space=\ *)
2437 sed -n \
2438 "s/'\''/'\''\\\\'\'''\''/g;
2439 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2440 ;; #(
2441 *)
2442 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2443 ;;
2444 esac |
2445 sort
2446)
2447 echo
2448
2449 cat <<\_ASBOX
2450## ----------------- ##
2451## Output variables. ##
2452## ----------------- ##
2453_ASBOX
2454 echo
2455 for ac_var in $ac_subst_vars
2456 do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in
2459 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2460 esac
2461 $as_echo "$ac_var='\''$ac_val'\''"
2462 done | sort
2463 echo
2464
2465 if test -n "$ac_subst_files"; then
2466 cat <<\_ASBOX
2467## ------------------- ##
2468## File substitutions. ##
2469## ------------------- ##
2470_ASBOX
2471 echo
2472 for ac_var in $ac_subst_files
2473 do
2474 eval ac_val=\$$ac_var
2475 case $ac_val in
2476 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2477 esac
2478 $as_echo "$ac_var='\''$ac_val'\''"
2479 done | sort
2480 echo
2481 fi
2482
2483 if test -s confdefs.h; then
2484 cat <<\_ASBOX
2485## ----------- ##
2486## confdefs.h. ##
2487## ----------- ##
2488_ASBOX
2489 echo
2490 cat confdefs.h
2491 echo
2492 fi
2493 test "$ac_signal" != 0 &&
2494 $as_echo "$as_me: caught signal $ac_signal"
2495 $as_echo "$as_me: exit $exit_status"
2496 } >&5
2497 rm -f core *.core core.conftest.* &&
2498 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2499 exit $exit_status
2500' 0
2501for ac_signal in 1 2 13 15; do
2502 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2503done
2504ac_signal=0
2505
2506# confdefs.h avoids OS command line length limits that DEFS can exceed.
2507rm -f -r conftest* confdefs.h
2508
2509$as_echo "/* confdefs.h */" > confdefs.h
2510
2511# Predefined preprocessor variables.
2512
2513cat >>confdefs.h <<_ACEOF
2514#define PACKAGE_NAME "$PACKAGE_NAME"
2515_ACEOF
2516
2517cat >>confdefs.h <<_ACEOF
2518#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2519_ACEOF
2520
2521cat >>confdefs.h <<_ACEOF
2522#define PACKAGE_VERSION "$PACKAGE_VERSION"
2523_ACEOF
2524
2525cat >>confdefs.h <<_ACEOF
2526#define PACKAGE_STRING "$PACKAGE_STRING"
2527_ACEOF
2528
2529cat >>confdefs.h <<_ACEOF
2530#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2531_ACEOF
2532
2533cat >>confdefs.h <<_ACEOF
2534#define PACKAGE_URL "$PACKAGE_URL"
2535_ACEOF
2536
2537
2538# Let the site file select an alternate cache file if it wants to.
2539# Prefer an explicitly selected file to automatically selected ones.
2540ac_site_file1=NONE
2541ac_site_file2=NONE
2542if test -n "$CONFIG_SITE"; then
2543 ac_site_file1=$CONFIG_SITE
2544elif test "x$prefix" != xNONE; then
2545 ac_site_file1=$prefix/share/config.site
2546 ac_site_file2=$prefix/etc/config.site
2547else
2548 ac_site_file1=$ac_default_prefix/share/config.site
2549 ac_site_file2=$ac_default_prefix/etc/config.site
2550fi
2551for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2552do
2553 test "x$ac_site_file" = xNONE && continue
2554 if test -r "$ac_site_file"; then
2555 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2556$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2557 sed 's/^/| /' "$ac_site_file" >&5
2558 . "$ac_site_file"
2559 fi
2560done
2561
2562if test -r "$cache_file"; then
2563 # Some versions of bash will fail to source /dev/null (special
2564 # files actually), so we avoid doing that.
2565 if test -f "$cache_file"; then
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2567$as_echo "$as_me: loading cache $cache_file" >&6;}
2568 case $cache_file in
2569 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2570 *) . "./$cache_file";;
2571 esac
2572 fi
2573else
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2575$as_echo "$as_me: creating cache $cache_file" >&6;}
2576 >$cache_file
bec39cab
AC
2577fi
2578
81ecdfbb
RW
2579# Check that the precious variables saved in the cache have kept the same
2580# value.
2581ac_cache_corrupted=false
2582for ac_var in $ac_precious_vars; do
2583 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2584 eval ac_new_set=\$ac_env_${ac_var}_set
2585 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2586 eval ac_new_val=\$ac_env_${ac_var}_value
2587 case $ac_old_set,$ac_new_set in
2588 set,)
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2590$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2591 ac_cache_corrupted=: ;;
2592 ,set)
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2594$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2595 ac_cache_corrupted=: ;;
2596 ,);;
2597 *)
2598 if test "x$ac_old_val" != "x$ac_new_val"; then
2599 # differences in whitespace do not lead to failure.
2600 ac_old_val_w=`echo x $ac_old_val`
2601 ac_new_val_w=`echo x $ac_new_val`
2602 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2604$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2605 ac_cache_corrupted=:
2606 else
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2608$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2609 eval $ac_var=\$ac_old_val
2610 fi
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2612$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2614$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2615 fi;;
2616 esac
2617 # Pass precious variables to config.status.
2618 if test "$ac_new_set" = set; then
2619 case $ac_new_val in
2620 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2621 *) ac_arg=$ac_var=$ac_new_val ;;
2622 esac
2623 case " $ac_configure_args " in
2624 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2625 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2626 esac
2627 fi
2628done
2629if $ac_cache_corrupted; then
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2633$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2634 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2635fi
2636## -------------------- ##
2637## Main body of script. ##
2638## -------------------- ##
2639
2640ac_ext=c
2641ac_cpp='$CPP $CPPFLAGS'
2642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2644ac_compiler_gnu=$ac_cv_c_compiler_gnu
2645
2646
2647
2648
2649
2650ac_config_headers="$ac_config_headers config.h:config.in"
2651
2652
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2654$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2655 # Check whether --enable-maintainer-mode was given.
2656if test "${enable_maintainer_mode+set}" = set; then :
2657 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2658else
2659 USE_MAINTAINER_MODE=no
2660fi
2661
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2663$as_echo "$USE_MAINTAINER_MODE" >&6; }
2664 if test $USE_MAINTAINER_MODE = yes; then
2665 MAINTAINER_MODE_TRUE=
2666 MAINTAINER_MODE_FALSE='#'
2667else
2668 MAINTAINER_MODE_TRUE='#'
2669 MAINTAINER_MODE_FALSE=
2670fi
2671
2672 MAINT=$MAINTAINER_MODE_TRUE
2673
2674
2675
2676ac_ext=c
2677ac_cpp='$CPP $CPPFLAGS'
2678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2680ac_compiler_gnu=$ac_cv_c_compiler_gnu
2681if test -n "$ac_tool_prefix"; then
2682 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2683set dummy ${ac_tool_prefix}gcc; ac_word=$2
2684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2685$as_echo_n "checking for $ac_word... " >&6; }
2686if test "${ac_cv_prog_CC+set}" = set; then :
2687 $as_echo_n "(cached) " >&6
c906108c
SS
2688else
2689 if test -n "$CC"; then
2690 ac_cv_prog_CC="$CC" # Let the user override the test.
2691else
bec39cab
AC
2692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2693for as_dir in $PATH
2694do
2695 IFS=$as_save_IFS
2696 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2697 for ac_exec_ext in '' $ac_executable_extensions; do
2698 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2699 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2701 break 2
2702 fi
2703done
81ecdfbb
RW
2704 done
2705IFS=$as_save_IFS
bec39cab 2706
c906108c
SS
2707fi
2708fi
bec39cab 2709CC=$ac_cv_prog_CC
c906108c 2710if test -n "$CC"; then
81ecdfbb
RW
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2712$as_echo "$CC" >&6; }
c906108c 2713else
81ecdfbb
RW
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2715$as_echo "no" >&6; }
c906108c
SS
2716fi
2717
81ecdfbb 2718
b4e70030
JB
2719fi
2720if test -z "$ac_cv_prog_CC"; then
2721 ac_ct_CC=$CC
81ecdfbb
RW
2722 # Extract the first word of "gcc", so it can be a program name with args.
2723set dummy gcc; ac_word=$2
2724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2725$as_echo_n "checking for $ac_word... " >&6; }
2726if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2727 $as_echo_n "(cached) " >&6
b4e70030
JB
2728else
2729 if test -n "$ac_ct_CC"; then
2730 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2731else
2732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2733for as_dir in $PATH
2734do
2735 IFS=$as_save_IFS
2736 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2737 for ac_exec_ext in '' $ac_executable_extensions; do
2738 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2739 ac_cv_prog_ac_ct_CC="gcc"
2740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2741 break 2
4e8d927d 2742 fi
b4e70030 2743done
81ecdfbb
RW
2744 done
2745IFS=$as_save_IFS
b4e70030
JB
2746
2747fi
2748fi
2749ac_ct_CC=$ac_cv_prog_ac_ct_CC
2750if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2752$as_echo "$ac_ct_CC" >&6; }
b4e70030 2753else
81ecdfbb
RW
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2755$as_echo "no" >&6; }
b4e70030
JB
2756fi
2757
81ecdfbb
RW
2758 if test "x$ac_ct_CC" = x; then
2759 CC=""
2760 else
2761 case $cross_compiling:$ac_tool_warned in
2762yes:)
2763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2765ac_tool_warned=yes ;;
2766esac
2767 CC=$ac_ct_CC
2768 fi
b4e70030
JB
2769else
2770 CC="$ac_cv_prog_CC"
2771fi
2772
c906108c 2773if test -z "$CC"; then
81ecdfbb
RW
2774 if test -n "$ac_tool_prefix"; then
2775 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2776set dummy ${ac_tool_prefix}cc; ac_word=$2
2777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2778$as_echo_n "checking for $ac_word... " >&6; }
2779if test "${ac_cv_prog_CC+set}" = set; then :
2780 $as_echo_n "(cached) " >&6
c906108c
SS
2781else
2782 if test -n "$CC"; then
2783 ac_cv_prog_CC="$CC" # Let the user override the test.
2784else
bec39cab
AC
2785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2786for as_dir in $PATH
2787do
2788 IFS=$as_save_IFS
2789 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2790 for ac_exec_ext in '' $ac_executable_extensions; do
2791 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2792 ac_cv_prog_CC="${ac_tool_prefix}cc"
2793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2794 break 2
2795 fi
2796done
81ecdfbb
RW
2797 done
2798IFS=$as_save_IFS
2799
2800fi
2801fi
2802CC=$ac_cv_prog_CC
2803if test -n "$CC"; then
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2805$as_echo "$CC" >&6; }
2806else
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
2809fi
2810
2811
2812 fi
2813fi
2814if test -z "$CC"; then
2815 # Extract the first word of "cc", so it can be a program name with args.
2816set dummy cc; ac_word=$2
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2818$as_echo_n "checking for $ac_word... " >&6; }
2819if test "${ac_cv_prog_CC+set}" = set; then :
2820 $as_echo_n "(cached) " >&6
2821else
2822 if test -n "$CC"; then
2823 ac_cv_prog_CC="$CC" # Let the user override the test.
2824else
2825 ac_prog_rejected=no
2826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2827for as_dir in $PATH
2828do
2829 IFS=$as_save_IFS
2830 test -z "$as_dir" && as_dir=.
2831 for ac_exec_ext in '' $ac_executable_extensions; do
2832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2833 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2834 ac_prog_rejected=yes
2835 continue
2836 fi
2837 ac_cv_prog_CC="cc"
2838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2839 break 2
2840 fi
2841done
2842 done
2843IFS=$as_save_IFS
bec39cab 2844
c906108c
SS
2845if test $ac_prog_rejected = yes; then
2846 # We found a bogon in the path, so make sure we never use it.
2847 set dummy $ac_cv_prog_CC
2848 shift
bec39cab 2849 if test $# != 0; then
c906108c
SS
2850 # We chose a different compiler from the bogus one.
2851 # However, it has the same basename, so the bogon will be chosen
2852 # first if we set CC to just the basename; use the full file name.
2853 shift
bec39cab 2854 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2855 fi
2856fi
2857fi
2858fi
bec39cab 2859CC=$ac_cv_prog_CC
c906108c 2860if test -n "$CC"; then
81ecdfbb
RW
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2862$as_echo "$CC" >&6; }
c906108c 2863else
81ecdfbb
RW
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2865$as_echo "no" >&6; }
c906108c
SS
2866fi
2867
81ecdfbb 2868
bec39cab
AC
2869fi
2870if test -z "$CC"; then
2871 if test -n "$ac_tool_prefix"; then
81ecdfbb 2872 for ac_prog in cl.exe
bec39cab
AC
2873 do
2874 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2877$as_echo_n "checking for $ac_word... " >&6; }
2878if test "${ac_cv_prog_CC+set}" = set; then :
2879 $as_echo_n "(cached) " >&6
c906108c
SS
2880else
2881 if test -n "$CC"; then
2882 ac_cv_prog_CC="$CC" # Let the user override the test.
2883else
bec39cab
AC
2884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2885for as_dir in $PATH
2886do
2887 IFS=$as_save_IFS
2888 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2889 for ac_exec_ext in '' $ac_executable_extensions; do
2890 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2891 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2893 break 2
2894 fi
2895done
81ecdfbb
RW
2896 done
2897IFS=$as_save_IFS
bec39cab 2898
c906108c
SS
2899fi
2900fi
bec39cab 2901CC=$ac_cv_prog_CC
c906108c 2902if test -n "$CC"; then
81ecdfbb
RW
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2904$as_echo "$CC" >&6; }
c906108c 2905else
81ecdfbb
RW
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2907$as_echo "no" >&6; }
c906108c 2908fi
bec39cab 2909
81ecdfbb 2910
bec39cab
AC
2911 test -n "$CC" && break
2912 done
2913fi
2914if test -z "$CC"; then
2915 ac_ct_CC=$CC
81ecdfbb 2916 for ac_prog in cl.exe
bec39cab
AC
2917do
2918 # Extract the first word of "$ac_prog", so it can be a program name with args.
2919set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2921$as_echo_n "checking for $ac_word... " >&6; }
2922if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2923 $as_echo_n "(cached) " >&6
bec39cab
AC
2924else
2925 if test -n "$ac_ct_CC"; then
2926 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2927else
2928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2929for as_dir in $PATH
2930do
2931 IFS=$as_save_IFS
2932 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2933 for ac_exec_ext in '' $ac_executable_extensions; do
2934 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2935 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2937 break 2
c906108c 2938 fi
bec39cab 2939done
81ecdfbb
RW
2940 done
2941IFS=$as_save_IFS
bec39cab
AC
2942
2943fi
2944fi
2945ac_ct_CC=$ac_cv_prog_ac_ct_CC
2946if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2948$as_echo "$ac_ct_CC" >&6; }
bec39cab 2949else
81ecdfbb
RW
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2951$as_echo "no" >&6; }
c906108c
SS
2952fi
2953
81ecdfbb 2954
bec39cab
AC
2955 test -n "$ac_ct_CC" && break
2956done
c906108c 2957
81ecdfbb
RW
2958 if test "x$ac_ct_CC" = x; then
2959 CC=""
2960 else
2961 case $cross_compiling:$ac_tool_warned in
2962yes:)
2963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2965ac_tool_warned=yes ;;
2966esac
2967 CC=$ac_ct_CC
2968 fi
bec39cab
AC
2969fi
2970
2971fi
2972
2973
81ecdfbb
RW
2974test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2976as_fn_error "no acceptable C compiler found in \$PATH
2977See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
2978
2979# Provide some information about the compiler.
81ecdfbb
RW
2980$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2981set X $ac_compile
2982ac_compiler=$2
2983for ac_option in --version -v -V -qversion; do
2984 { { ac_try="$ac_compiler $ac_option >&5"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
2989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2990$as_echo "$ac_try_echo"; } >&5
2991 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 2992 ac_status=$?
81ecdfbb
RW
2993 if test -s conftest.err; then
2994 sed '10a\
2995... rest of stderr output deleted ...
2996 10q' conftest.err >conftest.er1
2997 cat conftest.er1 >&5
2998 rm -f conftest.er1 conftest.err
2999 fi
3000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3001 test $ac_status = 0; }
3002done
bec39cab 3003
81ecdfbb 3004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015ac_clean_files_save=$ac_clean_files
81ecdfbb 3016ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3017# Try to create an executable without -o first, disregard a.out.
3018# It will help us diagnose broken compilers, and finding out an intuition
3019# of exeext.
81ecdfbb
RW
3020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3021$as_echo_n "checking for C compiler default output file name... " >&6; }
3022ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3023
3024# The possible output files:
3025ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3026
3027ac_rmfiles=
3028for ac_file in $ac_files
3029do
3030 case $ac_file in
3031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3032 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3033 esac
3034done
3035rm -f $ac_rmfiles
3036
3037if { { ac_try="$ac_link_default"
3038case "(($ac_try" in
3039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3040 *) ac_try_echo=$ac_try;;
3041esac
3042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3043$as_echo "$ac_try_echo"; } >&5
3044 (eval "$ac_link_default") 2>&5
3045 ac_status=$?
3046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3047 test $ac_status = 0; }; then :
3048 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3049# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3050# in a Makefile. We should not override ac_cv_exeext if it was cached,
3051# so that the user can short-circuit this test for compilers unknown to
3052# Autoconf.
3053for ac_file in $ac_files ''
bec39cab
AC
3054do
3055 test -f "$ac_file" || continue
3056 case $ac_file in
81ecdfbb 3057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3058 ;;
3059 [ab].out )
3060 # We found the default executable, but exeext='' is most
3061 # certainly right.
3062 break;;
3063 *.* )
81ecdfbb
RW
3064 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3065 then :; else
3066 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3067 fi
3068 # We set ac_cv_exeext here because the later test for it is not
3069 # safe: cross compilers may not add the suffix if given an `-o'
3070 # argument, so we may need to know it at that point already.
3071 # Even if this section looks crufty: it has the advantage of
3072 # actually working.
b4e70030
JB
3073 break;;
3074 * )
3075 break;;
bec39cab
AC
3076 esac
3077done
81ecdfbb
RW
3078test "$ac_cv_exeext" = no && ac_cv_exeext=
3079
bec39cab 3080else
81ecdfbb
RW
3081 ac_file=''
3082fi
3083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3084$as_echo "$ac_file" >&6; }
3085if test -z "$ac_file"; then :
3086 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3087sed 's/^/| /' conftest.$ac_ext >&5
3088
81ecdfbb
RW
3089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3091{ as_fn_set_status 77
3092as_fn_error "C compiler cannot create executables
3093See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3094fi
b4e70030 3095ac_exeext=$ac_cv_exeext
b4e70030 3096
81ecdfbb 3097# Check that the compiler produces executables we can run. If not, either
bec39cab 3098# the compiler is broken, or we cross compile.
81ecdfbb
RW
3099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3100$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3101# If not cross compiling, check that we can run a simple program.
3102if test "$cross_compiling" != yes; then
3103 if { ac_try='./$ac_file'
81ecdfbb
RW
3104 { { case "(($ac_try" in
3105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106 *) ac_try_echo=$ac_try;;
3107esac
3108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3109$as_echo "$ac_try_echo"; } >&5
3110 (eval "$ac_try") 2>&5
bec39cab 3111 ac_status=$?
81ecdfbb
RW
3112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113 test $ac_status = 0; }; }; then
bec39cab 3114 cross_compiling=no
c906108c 3115 else
bec39cab
AC
3116 if test "$cross_compiling" = maybe; then
3117 cross_compiling=yes
3118 else
81ecdfbb
RW
3119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3121as_fn_error "cannot run C compiled programs.
bec39cab 3122If you meant to cross compile, use \`--host'.
81ecdfbb 3123See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3124 fi
c906108c 3125 fi
bec39cab 3126fi
81ecdfbb
RW
3127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3128$as_echo "yes" >&6; }
bec39cab 3129
81ecdfbb 3130rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3131ac_clean_files=$ac_clean_files_save
81ecdfbb 3132# Check that the compiler produces executables we can run. If not, either
b4e70030 3133# the compiler is broken, or we cross compile.
81ecdfbb
RW
3134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3135$as_echo_n "checking whether we are cross compiling... " >&6; }
3136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3137$as_echo "$cross_compiling" >&6; }
3138
3139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3140$as_echo_n "checking for suffix of executables... " >&6; }
3141if { { ac_try="$ac_link"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
3146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3147$as_echo "$ac_try_echo"; } >&5
3148 (eval "$ac_link") 2>&5
bec39cab 3149 ac_status=$?
81ecdfbb
RW
3150 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3151 test $ac_status = 0; }; then :
b4e70030
JB
3152 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3153# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3154# work properly (i.e., refer to `conftest.exe'), while it won't with
3155# `rm'.
3156for ac_file in conftest.exe conftest conftest.*; do
3157 test -f "$ac_file" || continue
3158 case $ac_file in
81ecdfbb 3159 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3160 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3161 break;;
3162 * ) break;;
3163 esac
3164done
c906108c 3165else
81ecdfbb
RW
3166 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168as_fn_error "cannot compute suffix of executables: cannot compile and link
3169See \`config.log' for more details." "$LINENO" 5; }
c906108c 3170fi
b4e70030 3171rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3173$as_echo "$ac_cv_exeext" >&6; }
c906108c 3174
b4e70030 3175rm -f conftest.$ac_ext
bec39cab
AC
3176EXEEXT=$ac_cv_exeext
3177ac_exeext=$EXEEXT
81ecdfbb
RW
3178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3179$as_echo_n "checking for suffix of object files... " >&6; }
3180if test "${ac_cv_objext+set}" = set; then :
3181 $as_echo_n "(cached) " >&6
bec39cab 3182else
81ecdfbb 3183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3184/* end confdefs.h. */
3185
3186int
3187main ()
3188{
3189
3190 ;
3191 return 0;
3192}
3193_ACEOF
3194rm -f conftest.o conftest.obj
81ecdfbb
RW
3195if { { ac_try="$ac_compile"
3196case "(($ac_try" in
3197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3198 *) ac_try_echo=$ac_try;;
3199esac
3200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3201$as_echo "$ac_try_echo"; } >&5
3202 (eval "$ac_compile") 2>&5
3203 ac_status=$?
3204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3205 test $ac_status = 0; }; then :
3206 for ac_file in conftest.o conftest.obj conftest.*; do
3207 test -f "$ac_file" || continue;
bec39cab 3208 case $ac_file in
81ecdfbb 3209 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3210 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3211 break;;
3212 esac
3213done
c906108c 3214else
81ecdfbb 3215 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3216sed 's/^/| /' conftest.$ac_ext >&5
3217
81ecdfbb
RW
3218{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error "cannot compute suffix of object files: cannot compile
3221See \`config.log' for more details." "$LINENO" 5; }
c906108c 3222fi
b4e70030 3223rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3224fi
81ecdfbb
RW
3225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3226$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3227OBJEXT=$ac_cv_objext
3228ac_objext=$OBJEXT
81ecdfbb
RW
3229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3230$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3231if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3232 $as_echo_n "(cached) " >&6
c906108c 3233else
81ecdfbb 3234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3235/* end confdefs.h. */
3236
3237int
3238main ()
3239{
3240#ifndef __GNUC__
3241 choke me
3242#endif
3243
3244 ;
3245 return 0;
3246}
3247_ACEOF
81ecdfbb 3248if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3249 ac_compiler_gnu=yes
3250else
81ecdfbb 3251 ac_compiler_gnu=no
bec39cab 3252fi
81ecdfbb 3253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3254ac_cv_c_compiler_gnu=$ac_compiler_gnu
3255
3256fi
81ecdfbb
RW
3257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3258$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3259if test $ac_compiler_gnu = yes; then
3260 GCC=yes
3261else
3262 GCC=
3263fi
bec39cab
AC
3264ac_test_CFLAGS=${CFLAGS+set}
3265ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3267$as_echo_n "checking whether $CC accepts -g... " >&6; }
3268if test "${ac_cv_prog_cc_g+set}" = set; then :
3269 $as_echo_n "(cached) " >&6
bec39cab 3270else
81ecdfbb
RW
3271 ac_save_c_werror_flag=$ac_c_werror_flag
3272 ac_c_werror_flag=yes
3273 ac_cv_prog_cc_g=no
3274 CFLAGS="-g"
3275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3276/* end confdefs.h. */
3277
3278int
3279main ()
3280{
3281
3282 ;
3283 return 0;
3284}
3285_ACEOF
81ecdfbb 3286if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3287 ac_cv_prog_cc_g=yes
3288else
81ecdfbb
RW
3289 CFLAGS=""
3290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3291/* end confdefs.h. */
3292
3293int
3294main ()
3295{
3296
3297 ;
3298 return 0;
3299}
3300_ACEOF
3301if ac_fn_c_try_compile "$LINENO"; then :
3302
3303else
3304 ac_c_werror_flag=$ac_save_c_werror_flag
3305 CFLAGS="-g"
3306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3307/* end confdefs.h. */
3308
3309int
3310main ()
3311{
c906108c 3312
81ecdfbb
RW
3313 ;
3314 return 0;
3315}
3316_ACEOF
3317if ac_fn_c_try_compile "$LINENO"; then :
3318 ac_cv_prog_cc_g=yes
3319fi
3320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3321fi
3322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3323fi
81ecdfbb
RW
3324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3325 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3326fi
81ecdfbb
RW
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3328$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3329if test "$ac_test_CFLAGS" = set; then
bec39cab 3330 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3331elif test $ac_cv_prog_cc_g = yes; then
3332 if test "$GCC" = yes; then
3333 CFLAGS="-g -O2"
3334 else
3335 CFLAGS="-g"
3336 fi
3337else
3338 if test "$GCC" = yes; then
3339 CFLAGS="-O2"
3340 else
3341 CFLAGS=
3342 fi
3343fi
81ecdfbb
RW
3344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3345$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3346if test "${ac_cv_prog_cc_c89+set}" = set; then :
3347 $as_echo_n "(cached) " >&6
bec39cab 3348else
81ecdfbb 3349 ac_cv_prog_cc_c89=no
bec39cab 3350ac_save_CC=$CC
81ecdfbb 3351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3352/* end confdefs.h. */
c906108c
SS
3353#include <stdarg.h>
3354#include <stdio.h>
3355#include <sys/types.h>
3356#include <sys/stat.h>
3357/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3358struct buf { int x; };
3359FILE * (*rcsopen) (struct buf *, struct stat *, int);
3360static char *e (p, i)
3361 char **p;
3362 int i;
3363{
3364 return p[i];
3365}
3366static char *f (char * (*g) (char **, int), char **p, ...)
3367{
3368 char *s;
3369 va_list v;
3370 va_start (v,p);
3371 s = g (p, va_arg (v,int));
3372 va_end (v);
3373 return s;
3374}
bec39cab
AC
3375
3376/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3377 function prototypes and stuff, but not '\xHH' hex character constants.
3378 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3379 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3380 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3381 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3382 that's true only with -std. */
bec39cab
AC
3383int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3384
81ecdfbb
RW
3385/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3386 inside strings and character constants. */
3387#define FOO(x) 'x'
3388int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3389
c906108c
SS
3390int test (int i, double x);
3391struct s1 {int (*f) (int a);};
3392struct s2 {int (*f) (double a);};
3393int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3394int argc;
3395char **argv;
bec39cab
AC
3396int
3397main ()
3398{
c906108c 3399return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3400 ;
3401 return 0;
3402}
3403_ACEOF
81ecdfbb
RW
3404for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3405 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3406do
3407 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3408 if ac_fn_c_try_compile "$LINENO"; then :
3409 ac_cv_prog_cc_c89=$ac_arg
c906108c 3410fi
81ecdfbb
RW
3411rm -f core conftest.err conftest.$ac_objext
3412 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3413done
81ecdfbb 3414rm -f conftest.$ac_ext
bec39cab 3415CC=$ac_save_CC
c906108c
SS
3416
3417fi
81ecdfbb
RW
3418# AC_CACHE_VAL
3419case "x$ac_cv_prog_cc_c89" in
3420 x)
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3422$as_echo "none needed" >&6; } ;;
3423 xno)
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3425$as_echo "unsupported" >&6; } ;;
bec39cab 3426 *)
81ecdfbb
RW
3427 CC="$CC $ac_cv_prog_cc_c89"
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3429$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3430esac
81ecdfbb 3431if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3432
b4e70030
JB
3433fi
3434
bec39cab
AC
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3440
60ca704f 3441
bec39cab
AC
3442ac_ext=c
3443ac_cpp='$CPP $CPPFLAGS'
3444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3446ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3448$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3449# On Suns, sometimes $CPP names a directory.
3450if test -n "$CPP" && test -d "$CPP"; then
3451 CPP=
8bb2c122 3452fi
bec39cab 3453if test -z "$CPP"; then
81ecdfbb
RW
3454 if test "${ac_cv_prog_CPP+set}" = set; then :
3455 $as_echo_n "(cached) " >&6
bec39cab
AC
3456else
3457 # Double quotes because CPP needs to be expanded
3458 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3459 do
3460 ac_preproc_ok=false
3461for ac_c_preproc_warn_flag in '' yes
3462do
3463 # Use a header file that comes with gcc, so configuring glibc
3464 # with a fresh cross-compiler works.
3465 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3466 # <limits.h> exists even on freestanding compilers.
3467 # On the NeXT, cc -E runs the code through the compiler's parser,
3468 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3470/* end confdefs.h. */
3471#ifdef __STDC__
3472# include <limits.h>
3473#else
3474# include <assert.h>
3475#endif
3476 Syntax error
3477_ACEOF
81ecdfbb 3478if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3479
81ecdfbb 3480else
bec39cab
AC
3481 # Broken: fails on valid input.
3482continue
3483fi
3484rm -f conftest.err conftest.$ac_ext
3485
81ecdfbb 3486 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3487 # can be detected and how.
81ecdfbb 3488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3489/* end confdefs.h. */
3490#include <ac_nonexistent.h>
3491_ACEOF
81ecdfbb 3492if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3493 # Broken: success on invalid input.
3494continue
8bb2c122 3495else
bec39cab
AC
3496 # Passes both tests.
3497ac_preproc_ok=:
3498break
8bb2c122 3499fi
bec39cab 3500rm -f conftest.err conftest.$ac_ext
8bb2c122 3501
bec39cab
AC
3502done
3503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3504rm -f conftest.err conftest.$ac_ext
81ecdfbb 3505if $ac_preproc_ok; then :
bec39cab
AC
3506 break
3507fi
8bb2c122 3508
bec39cab
AC
3509 done
3510 ac_cv_prog_CPP=$CPP
ddc9cd0f 3511
c906108c 3512fi
bec39cab
AC
3513 CPP=$ac_cv_prog_CPP
3514else
3515 ac_cv_prog_CPP=$CPP
c906108c 3516fi
81ecdfbb
RW
3517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3518$as_echo "$CPP" >&6; }
bec39cab
AC
3519ac_preproc_ok=false
3520for ac_c_preproc_warn_flag in '' yes
3521do
3522 # Use a header file that comes with gcc, so configuring glibc
3523 # with a fresh cross-compiler works.
3524 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3525 # <limits.h> exists even on freestanding compilers.
3526 # On the NeXT, cc -E runs the code through the compiler's parser,
3527 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3529/* end confdefs.h. */
3530#ifdef __STDC__
3531# include <limits.h>
3532#else
3533# include <assert.h>
3534#endif
3535 Syntax error
3536_ACEOF
81ecdfbb 3537if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3538
81ecdfbb 3539else
bec39cab
AC
3540 # Broken: fails on valid input.
3541continue
3542fi
3543rm -f conftest.err conftest.$ac_ext
3544
81ecdfbb 3545 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3546 # can be detected and how.
81ecdfbb 3547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3548/* end confdefs.h. */
3549#include <ac_nonexistent.h>
3550_ACEOF
81ecdfbb 3551if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3552 # Broken: success on invalid input.
3553continue
c906108c 3554else
bec39cab
AC
3555 # Passes both tests.
3556ac_preproc_ok=:
3557break
c906108c 3558fi
bec39cab 3559rm -f conftest.err conftest.$ac_ext
c906108c 3560
bec39cab
AC
3561done
3562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3563rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3564if $ac_preproc_ok; then :
3565
c906108c 3566else
81ecdfbb
RW
3567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3569as_fn_error "C preprocessor \"$CPP\" fails sanity check
3570See \`config.log' for more details." "$LINENO" 5; }
c906108c 3571fi
c906108c 3572
bec39cab
AC
3573ac_ext=c
3574ac_cpp='$CPP $CPPFLAGS'
3575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578
3579
81ecdfbb
RW
3580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3581$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3582if test "${ac_cv_path_GREP+set}" = set; then :
3583 $as_echo_n "(cached) " >&6
4e8d927d 3584else
81ecdfbb
RW
3585 if test -z "$GREP"; then
3586 ac_path_GREP_found=false
3587 # Loop through the user's path and test for each of PROGNAME-LIST
3588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
3593 for ac_prog in grep ggrep; do
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3596 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3597# Check for GNU ac_path_GREP and select it if it is found.
3598 # Check for GNU $ac_path_GREP
3599case `"$ac_path_GREP" --version 2>&1` in
3600*GNU*)
3601 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3602*)
3603 ac_count=0
3604 $as_echo_n 0123456789 >"conftest.in"
3605 while :
3606 do
3607 cat "conftest.in" "conftest.in" >"conftest.tmp"
3608 mv "conftest.tmp" "conftest.in"
3609 cp "conftest.in" "conftest.nl"
3610 $as_echo 'GREP' >> "conftest.nl"
3611 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3612 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3613 as_fn_arith $ac_count + 1 && ac_count=$as_val
3614 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3615 # Best one so far, save it but keep looking for a better one
3616 ac_cv_path_GREP="$ac_path_GREP"
3617 ac_path_GREP_max=$ac_count
bec39cab 3618 fi
81ecdfbb
RW
3619 # 10*(2^10) chars as input seems more than enough
3620 test $ac_count -gt 10 && break
3621 done
3622 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3623esac
bec39cab 3624
81ecdfbb
RW
3625 $ac_path_GREP_found && break 3
3626 done
3627 done
3628 done
3629IFS=$as_save_IFS
3630 if test -z "$ac_cv_path_GREP"; then
3631 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3632 fi
c906108c 3633else
81ecdfbb 3634 ac_cv_path_GREP=$GREP
c906108c 3635fi
c906108c 3636
81ecdfbb
RW
3637fi
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3639$as_echo "$ac_cv_path_GREP" >&6; }
3640 GREP="$ac_cv_path_GREP"
c906108c 3641
c906108c 3642
81ecdfbb
RW
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3644$as_echo_n "checking for egrep... " >&6; }
3645if test "${ac_cv_path_EGREP+set}" = set; then :
3646 $as_echo_n "(cached) " >&6
783e057b 3647else
81ecdfbb
RW
3648 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3649 then ac_cv_path_EGREP="$GREP -E"
3650 else
3651 if test -z "$EGREP"; then
3652 ac_path_EGREP_found=false
3653 # Loop through the user's path and test for each of PROGNAME-LIST
3654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3656do
3657 IFS=$as_save_IFS
3658 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3659 for ac_prog in egrep; do
3660 for ac_exec_ext in '' $ac_executable_extensions; do
3661 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3662 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3663# Check for GNU ac_path_EGREP and select it if it is found.
3664 # Check for GNU $ac_path_EGREP
3665case `"$ac_path_EGREP" --version 2>&1` in
3666*GNU*)
3667 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3668*)
3669 ac_count=0
3670 $as_echo_n 0123456789 >"conftest.in"
3671 while :
3672 do
3673 cat "conftest.in" "conftest.in" >"conftest.tmp"
3674 mv "conftest.tmp" "conftest.in"
3675 cp "conftest.in" "conftest.nl"
3676 $as_echo 'EGREP' >> "conftest.nl"
3677 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3678 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3679 as_fn_arith $ac_count + 1 && ac_count=$as_val
3680 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3681 # Best one so far, save it but keep looking for a better one
3682 ac_cv_path_EGREP="$ac_path_EGREP"
3683 ac_path_EGREP_max=$ac_count
3684 fi
3685 # 10*(2^10) chars as input seems more than enough
3686 test $ac_count -gt 10 && break
3687 done
3688 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3689esac
bec39cab 3690
81ecdfbb
RW
3691 $ac_path_EGREP_found && break 3
3692 done
3693 done
3694 done
3695IFS=$as_save_IFS
3696 if test -z "$ac_cv_path_EGREP"; then
3697 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3698 fi
783e057b 3699else
81ecdfbb 3700 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3701fi
3702
81ecdfbb 3703 fi
783e057b 3704fi
81ecdfbb
RW
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3706$as_echo "$ac_cv_path_EGREP" >&6; }
3707 EGREP="$ac_cv_path_EGREP"
3708
783e057b 3709
81ecdfbb
RW
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3711$as_echo_n "checking for ANSI C header files... " >&6; }
3712if test "${ac_cv_header_stdc+set}" = set; then :
3713 $as_echo_n "(cached) " >&6
783e057b 3714else
81ecdfbb 3715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3716/* end confdefs.h. */
783e057b 3717#include <stdlib.h>
bec39cab 3718#include <stdarg.h>
783e057b
DJ
3719#include <string.h>
3720#include <float.h>
c906108c 3721
bec39cab
AC
3722int
3723main ()
3724{
c906108c 3725
bec39cab
AC
3726 ;
3727 return 0;
3728}
3729_ACEOF
81ecdfbb 3730if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3731 ac_cv_header_stdc=yes
c906108c 3732else
81ecdfbb 3733 ac_cv_header_stdc=no
c906108c 3734fi
81ecdfbb 3735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3736
783e057b
DJ
3737if test $ac_cv_header_stdc = yes; then
3738 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3740/* end confdefs.h. */
3741#include <string.h>
c906108c 3742
783e057b
DJ
3743_ACEOF
3744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3745 $EGREP "memchr" >/dev/null 2>&1; then :
3746
c906108c 3747else
783e057b 3748 ac_cv_header_stdc=no
c906108c 3749fi
783e057b 3750rm -f conftest*
c906108c
SS
3751
3752fi
3753
783e057b
DJ
3754if test $ac_cv_header_stdc = yes; then
3755 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3757/* end confdefs.h. */
3758#include <stdlib.h>
bec39cab 3759
783e057b
DJ
3760_ACEOF
3761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3762 $EGREP "free" >/dev/null 2>&1; then :
3763
bec39cab 3764else
783e057b 3765 ac_cv_header_stdc=no
bec39cab 3766fi
783e057b 3767rm -f conftest*
bec39cab
AC
3768
3769fi
bec39cab 3770
783e057b
DJ
3771if test $ac_cv_header_stdc = yes; then
3772 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3773 if test "$cross_compiling" = yes; then :
783e057b 3774 :
bec39cab 3775else
81ecdfbb 3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3777/* end confdefs.h. */
3778#include <ctype.h>
81ecdfbb 3779#include <stdlib.h>
783e057b
DJ
3780#if ((' ' & 0x0FF) == 0x020)
3781# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3782# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3783#else
3784# define ISLOWER(c) \
3785 (('a' <= (c) && (c) <= 'i') \
3786 || ('j' <= (c) && (c) <= 'r') \
3787 || ('s' <= (c) && (c) <= 'z'))
3788# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3789#endif
3790
3791#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3792int
3793main ()
3794{
3795 int i;
3796 for (i = 0; i < 256; i++)
3797 if (XOR (islower (i), ISLOWER (i))
3798 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3799 return 2;
3800 return 0;
783e057b
DJ
3801}
3802_ACEOF
81ecdfbb 3803if ac_fn_c_try_run "$LINENO"; then :
783e057b 3804
81ecdfbb
RW
3805else
3806 ac_cv_header_stdc=no
783e057b 3807fi
81ecdfbb
RW
3808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3809 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3810fi
81ecdfbb 3811
783e057b
DJ
3812fi
3813fi
81ecdfbb
RW
3814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3815$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3816if test $ac_cv_header_stdc = yes; then
3817
81ecdfbb 3818$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3819
3820fi
3821
3822# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3823for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3824 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3825do :
3826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3827ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3828"
3829eval as_val=\$$as_ac_Header
3830 if test "x$as_val" = x""yes; then :
783e057b 3831 cat >>confdefs.h <<_ACEOF
81ecdfbb 3832#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3833_ACEOF
3834
3835fi
3836
3837done
3838
3839
3840
81ecdfbb
RW
3841 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3842if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3843 MINIX=yes
3844else
3845 MINIX=
3846fi
3847
3848
3849 if test "$MINIX" = yes; then
3850
81ecdfbb 3851$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3852
3853
81ecdfbb 3854$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3855
3856
81ecdfbb 3857$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3858
3859 fi
3860
3861
81ecdfbb
RW
3862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3863$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3864if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3865 $as_echo_n "(cached) " >&6
783e057b 3866else
81ecdfbb 3867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3868/* end confdefs.h. */
3869
c971b7fa
PA
3870# define __EXTENSIONS__ 1
3871 $ac_includes_default
783e057b
DJ
3872int
3873main ()
3874{
3875
3876 ;
3877 return 0;
3878}
3879_ACEOF
81ecdfbb 3880if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3881 ac_cv_safe_to_define___extensions__=yes
3882else
81ecdfbb 3883 ac_cv_safe_to_define___extensions__=no
783e057b 3884fi
81ecdfbb 3885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3886fi
81ecdfbb
RW
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3888$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3889 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3890 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3891
81ecdfbb 3892 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3893
81ecdfbb 3894 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3895
81ecdfbb 3896 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3897
81ecdfbb 3898 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3899
3900
c971b7fa
PA
3901ac_aux_dir=
3902for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3903 for ac_t in install-sh install.sh shtool; do
3904 if test -f "$ac_dir/$ac_t"; then
3905 ac_aux_dir=$ac_dir
3906 ac_install_sh="$ac_aux_dir/$ac_t -c"
3907 break 2
3908 fi
3909 done
3910done
3911if test -z "$ac_aux_dir"; then
3912 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3913fi
770d76d7 3914
c971b7fa
PA
3915# These three variables are undocumented and unsupported,
3916# and are intended to be withdrawn in a future Autoconf release.
3917# They can cause serious problems if a builder's source tree is in a directory
3918# whose full name contains unusual characters.
3919ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3920ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3921ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3922
770d76d7 3923
c971b7fa
PA
3924# Make sure we can run config.sub.
3925$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3926 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3927
c971b7fa
PA
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3929$as_echo_n "checking build system type... " >&6; }
3930if test "${ac_cv_build+set}" = set; then :
3931 $as_echo_n "(cached) " >&6
770d76d7 3932else
c971b7fa
PA
3933 ac_build_alias=$build_alias
3934test "x$ac_build_alias" = x &&
3935 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3936test "x$ac_build_alias" = x &&
3937 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3938ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3939 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3940
770d76d7 3941fi
c971b7fa
PA
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3943$as_echo "$ac_cv_build" >&6; }
3944case $ac_cv_build in
3945*-*-*) ;;
3946*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3947esac
c971b7fa
PA
3948build=$ac_cv_build
3949ac_save_IFS=$IFS; IFS='-'
3950set x $ac_cv_build
3951shift
3952build_cpu=$1
3953build_vendor=$2
3954shift; shift
3955# Remember, the first character of IFS is used to create $*,
3956# except with old shells:
3957build_os=$*
3958IFS=$ac_save_IFS
3959case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3960
3961
c971b7fa
PA
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3963$as_echo_n "checking host system type... " >&6; }
3964if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3965 $as_echo_n "(cached) " >&6
3966else
c971b7fa
PA
3967 if test "x$host_alias" = x; then
3968 ac_cv_host=$ac_cv_build
81ecdfbb 3969else
c971b7fa
PA
3970 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3971 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3972fi
81ecdfbb
RW
3973
3974fi
c971b7fa
PA
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3976$as_echo "$ac_cv_host" >&6; }
3977case $ac_cv_host in
3978*-*-*) ;;
3979*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 3980esac
c971b7fa
PA
3981host=$ac_cv_host
3982ac_save_IFS=$IFS; IFS='-'
3983set x $ac_cv_host
3984shift
3985host_cpu=$1
3986host_vendor=$2
3987shift; shift
3988# Remember, the first character of IFS is used to create $*,
3989# except with old shells:
3990host_os=$*
3991IFS=$ac_save_IFS
3992case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
3993
3994
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3996$as_echo_n "checking target system type... " >&6; }
3997if test "${ac_cv_target+set}" = set; then :
3998 $as_echo_n "(cached) " >&6
3999else
4000 if test "x$target_alias" = x; then
4001 ac_cv_target=$ac_cv_host
4002else
4003 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4004 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4005fi
4006
4007fi
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4009$as_echo "$ac_cv_target" >&6; }
4010case $ac_cv_target in
4011*-*-*) ;;
4012*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4013esac
4014target=$ac_cv_target
4015ac_save_IFS=$IFS; IFS='-'
4016set x $ac_cv_target
4017shift
4018target_cpu=$1
4019target_vendor=$2
4020shift; shift
4021# Remember, the first character of IFS is used to create $*,
4022# except with old shells:
4023target_os=$*
4024IFS=$ac_save_IFS
4025case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4026
4027
4028# The aliases save the names the user supplied, while $host etc.
4029# will get canonicalized.
4030test -n "$target_alias" &&
4031 test "$program_prefix$program_suffix$program_transform_name" = \
4032 NONENONEs,x,x, &&
4033 program_prefix=${target_alias}-
4034
4035# The tests for host and target for $enable_largefile require
4036# canonical names.
4037
4038
81ecdfbb 4039
da2f07f1
JK
4040# As the $enable_largefile decision depends on --enable-plugins we must set it
4041# even in directories otherwise not depending on the $plugins option.
4042
4043
4044# Check whether --enable-plugins was given.
4045if test "${enable_plugins+set}" = set; then :
4046 enableval=$enable_plugins; case "${enableval}" in
4047 yes | "") plugins=yes ;;
4048 no) plugins=no ;;
4049 *) plugins=yes ;;
4050 esac
4051else
4052 plugins=no
4053fi
4054
4055
4056
4057case "${host}" in
4058 sparc-*-solaris*|i[3-7]86-*-solaris*)
4059 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4060 # are mutually exclusive; and without procfs support, the bfd/ elf module
4061 # cannot provide certain routines such as elfcore_write_prpsinfo
4062 # or elfcore_write_prstatus. So unless the user explicitly requested
4063 # large-file support through the --enable-largefile switch, disable
4064 # large-file support in favor of procfs support.
4065 test "${target}" = "${host}" -a "x$plugins" = xno \
4066 && : ${enable_largefile="no"}
4067 ;;
4068esac
4069
4070# Check whether --enable-largefile was given.
4071if test "${enable_largefile+set}" = set; then :
4072 enableval=$enable_largefile;
4073fi
4074
4075if test "$enable_largefile" != no; then
4076
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4078$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4079if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4080 $as_echo_n "(cached) " >&6
4081else
4082 ac_cv_sys_largefile_CC=no
4083 if test "$GCC" != yes; then
4084 ac_save_CC=$CC
4085 while :; do
4086 # IRIX 6.2 and later do not support large files by default,
4087 # so use the C compiler's -n32 option if that helps.
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4089/* end confdefs.h. */
4090#include <sys/types.h>
4091 /* Check that off_t can represent 2**63 - 1 correctly.
4092 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4093 since some C++ compilers masquerading as C compilers
4094 incorrectly reject 9223372036854775807. */
4095#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4096 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4097 && LARGE_OFF_T % 2147483647 == 1)
4098 ? 1 : -1];
4099int
4100main ()
4101{
4102
4103 ;
4104 return 0;
4105}
4106_ACEOF
4107 if ac_fn_c_try_compile "$LINENO"; then :
4108 break
4109fi
4110rm -f core conftest.err conftest.$ac_objext
4111 CC="$CC -n32"
4112 if ac_fn_c_try_compile "$LINENO"; then :
4113 ac_cv_sys_largefile_CC=' -n32'; break
4114fi
4115rm -f core conftest.err conftest.$ac_objext
4116 break
4117 done
4118 CC=$ac_save_CC
4119 rm -f conftest.$ac_ext
4120 fi
4121fi
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4123$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4124 if test "$ac_cv_sys_largefile_CC" != no; then
4125 CC=$CC$ac_cv_sys_largefile_CC
4126 fi
4127
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4129$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4130if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4131 $as_echo_n "(cached) " >&6
4132else
4133 while :; do
4134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4135/* end confdefs.h. */
4136#include <sys/types.h>
4137 /* Check that off_t can represent 2**63 - 1 correctly.
4138 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4139 since some C++ compilers masquerading as C compilers
4140 incorrectly reject 9223372036854775807. */
4141#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4142 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4143 && LARGE_OFF_T % 2147483647 == 1)
4144 ? 1 : -1];
4145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153if ac_fn_c_try_compile "$LINENO"; then :
4154 ac_cv_sys_file_offset_bits=no; break
4155fi
4156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4158/* end confdefs.h. */
4159#define _FILE_OFFSET_BITS 64
4160#include <sys/types.h>
4161 /* Check that off_t can represent 2**63 - 1 correctly.
4162 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4163 since some C++ compilers masquerading as C compilers
4164 incorrectly reject 9223372036854775807. */
4165#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4166 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4167 && LARGE_OFF_T % 2147483647 == 1)
4168 ? 1 : -1];
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
4177if ac_fn_c_try_compile "$LINENO"; then :
4178 ac_cv_sys_file_offset_bits=64; break
4179fi
4180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4181 ac_cv_sys_file_offset_bits=unknown
4182 break
4183done
4184fi
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4186$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4187case $ac_cv_sys_file_offset_bits in #(
4188 no | unknown) ;;
4189 *)
4190cat >>confdefs.h <<_ACEOF
4191#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4192_ACEOF
4193;;
4194esac
4195rm -rf conftest*
4196 if test $ac_cv_sys_file_offset_bits = unknown; then
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4198$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4199if test "${ac_cv_sys_large_files+set}" = set; then :
4200 $as_echo_n "(cached) " >&6
4201else
4202 while :; do
4203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4204/* end confdefs.h. */
4205#include <sys/types.h>
4206 /* Check that off_t can represent 2**63 - 1 correctly.
4207 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4208 since some C++ compilers masquerading as C compilers
4209 incorrectly reject 9223372036854775807. */
4210#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4211 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4212 && LARGE_OFF_T % 2147483647 == 1)
4213 ? 1 : -1];
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
4222if ac_fn_c_try_compile "$LINENO"; then :
4223 ac_cv_sys_large_files=no; break
4224fi
4225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228#define _LARGE_FILES 1
4229#include <sys/types.h>
4230 /* Check that off_t can represent 2**63 - 1 correctly.
4231 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4232 since some C++ compilers masquerading as C compilers
4233 incorrectly reject 9223372036854775807. */
4234#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4235 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4236 && LARGE_OFF_T % 2147483647 == 1)
4237 ? 1 : -1];
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246if ac_fn_c_try_compile "$LINENO"; then :
4247 ac_cv_sys_large_files=1; break
4248fi
4249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250 ac_cv_sys_large_files=unknown
4251 break
4252done
4253fi
4254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4255$as_echo "$ac_cv_sys_large_files" >&6; }
4256case $ac_cv_sys_large_files in #(
4257 no | unknown) ;;
4258 *)
4259cat >>confdefs.h <<_ACEOF
4260#define _LARGE_FILES $ac_cv_sys_large_files
4261_ACEOF
4262;;
4263esac
4264rm -rf conftest*
4265 fi
4266fi
4267
4268
4269
81ecdfbb
RW
4270
4271
4272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4273$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4274if test "${am_cv_prog_cc_stdc+set}" = set; then :
4275 $as_echo_n "(cached) " >&6
4276else
4277 am_cv_prog_cc_stdc=no
4278ac_save_CC="$CC"
4279# Don't try gcc -ansi; that turns off useful extensions and
4280# breaks some systems' header files.
4281# AIX -qlanglvl=ansi
4282# Ultrix and OSF/1 -std1
4283# HP-UX 10.20 and later -Ae
4284# HP-UX older versions -Aa -D_HPUX_SOURCE
4285# SVR4 -Xc -D__EXTENSIONS__
4286for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4287do
783e057b 4288 CC="$ac_save_CC $ac_arg"
81ecdfbb 4289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4290/* end confdefs.h. */
4291#include <stdarg.h>
4292#include <stdio.h>
4293#include <sys/types.h>
4294#include <sys/stat.h>
4295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
4313int test (int i, double x);
4314struct s1 {int (*f) (int a);};
4315struct s2 {int (*f) (double a);};
4316int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4317int argc;
4318char **argv;
4319
4320int
4321main ()
4322{
4323
4324return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4325
4326 ;
4327 return 0;
4328}
4329_ACEOF
81ecdfbb 4330if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4331 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4332fi
81ecdfbb 4333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4334done
4335CC="$ac_save_CC"
4336
4337fi
4338
4339if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; }
783e057b 4342else
81ecdfbb
RW
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4344$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4345fi
4346case "x$am_cv_prog_cc_stdc" in
4347 x|xno) ;;
4348 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4349esac
4350
4351
4352ac_aux_dir=
81ecdfbb
RW
4353for ac_dir in .. "$srcdir"/..; do
4354 for ac_t in install-sh install.sh shtool; do
4355 if test -f "$ac_dir/$ac_t"; then
4356 ac_aux_dir=$ac_dir
4357 ac_install_sh="$ac_aux_dir/$ac_t -c"
4358 break 2
4359 fi
4360 done
783e057b
DJ
4361done
4362if test -z "$ac_aux_dir"; then
81ecdfbb 4363 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4364fi
81ecdfbb
RW
4365
4366# These three variables are undocumented and unsupported,
4367# and are intended to be withdrawn in a future Autoconf release.
4368# They can cause serious problems if a builder's source tree is in a directory
4369# whose full name contains unusual characters.
4370ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4371ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4372ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4373
783e057b 4374
783e057b 4375
81ecdfbb 4376
a417dc56
RW
4377# Dependency checking.
4378rm -rf .tst 2>/dev/null
4379mkdir .tst 2>/dev/null
4380if test -d .tst; then
4381 am__leading_dot=.
4382else
4383 am__leading_dot=_
4384fi
4385rmdir .tst 2>/dev/null
4386
4387DEPDIR="${am__leading_dot}deps"
4388
81ecdfbb 4389ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4390
4391
4392depcc="$CC" am_compiler_list=
4393
4394am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4396$as_echo_n "checking dependency style of $depcc... " >&6; }
4397if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4398 $as_echo_n "(cached) " >&6
a417dc56
RW
4399else
4400 if test -f "$am_depcomp"; then
4401 # We make a subdir and do the tests there. Otherwise we can end up
4402 # making bogus files that we don't know about and never remove. For
4403 # instance it was reported that on HP-UX the gcc test will end up
4404 # making a dummy file named `D' -- because `-MD' means `put the output
4405 # in D'.
4406 mkdir conftest.dir
4407 # Copy depcomp to subdir because otherwise we won't find it if we're
4408 # using a relative directory.
4409 cp "$am_depcomp" conftest.dir
4410 cd conftest.dir
4411 # We will build objects and dependencies in a subdirectory because
4412 # it helps to detect inapplicable dependency modes. For instance
4413 # both Tru64's cc and ICC support -MD to output dependencies as a
4414 # side effect of compilation, but ICC will put the dependencies in
4415 # the current directory while Tru64 will put them in the object
4416 # directory.
4417 mkdir sub
4418
4419 am_cv_CC_dependencies_compiler_type=none
4420 if test "$am_compiler_list" = ""; then
4421 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4422 fi
4423 for depmode in $am_compiler_list; do
4424 if test $depmode = none; then break; fi
4425
81ecdfbb 4426 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4427 # Setup a source with many dependencies, because some compilers
4428 # like to wrap large dependency lists on column 80 (with \), and
4429 # we should not choose a depcomp mode which is confused by this.
4430 #
4431 # We need to recreate these files for each test, as the compiler may
4432 # overwrite some of them when testing with obscure command lines.
4433 # This happens at least with the AIX C compiler.
4434 : > sub/conftest.c
4435 for i in 1 2 3 4 5 6; do
4436 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4437 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4438 # Solaris 8's {/usr,}/bin/sh.
4439 touch sub/conftst$i.h
4440 done
4441 echo "include sub/conftest.Po" > confmf
4442
4443 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4444 # mode. It turns out that the SunPro C++ compiler does not properly
4445 # handle `-M -o', and we need to detect this.
4446 depcmd="depmode=$depmode \
4447 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4448 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4449 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4450 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4451 if env $depcmd > conftest.err 2>&1 &&
4452 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4453 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4454 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4455 # icc doesn't choke on unknown options, it will just issue warnings
4456 # or remarks (even with -Werror). So we grep stderr for any message
4457 # that says an option was ignored or not supported.
4458 # When given -MP, icc 7.0 and 7.1 complain thusly:
4459 # icc: Command line warning: ignoring option '-M'; no argument required
4460 # The diagnosis changed in icc 8.0:
4461 # icc: Command line remark: option '-MP' not supported
4462 if (grep 'ignoring option' conftest.err ||
4463 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4464 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4465 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4466 break
4467 fi
4468 fi
81ecdfbb 4469 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4470 sed -e 's/^/| /' < conftest.err >&5
4471 done
4472
4473 cd ..
4474 rm -rf conftest.dir
4475else
4476 am_cv_CC_dependencies_compiler_type=none
4477fi
4478
4479fi
81ecdfbb
RW
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4481$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4482if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4483then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4484else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4485
4486fi
4487
4488
4489# Check for the 'make' the user wants to use.
4490for ac_prog in make
4491do
4492 # Extract the first word of "$ac_prog", so it can be a program name with args.
4493set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4495$as_echo_n "checking for $ac_word... " >&6; }
4496if test "${ac_cv_prog_MAKE+set}" = set; then :
4497 $as_echo_n "(cached) " >&6
a417dc56
RW
4498else
4499 if test -n "$MAKE"; then
4500 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4501else
4502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH
4504do
4505 IFS=$as_save_IFS
4506 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4507 for ac_exec_ext in '' $ac_executable_extensions; do
4508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4509 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4511 break 2
4512 fi
4513done
81ecdfbb
RW
4514 done
4515IFS=$as_save_IFS
a417dc56
RW
4516
4517fi
4518fi
4519MAKE=$ac_cv_prog_MAKE
4520if test -n "$MAKE"; then
81ecdfbb
RW
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4522$as_echo "$MAKE" >&6; }
a417dc56 4523else
81ecdfbb
RW
4524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4525$as_echo "no" >&6; }
a417dc56
RW
4526fi
4527
81ecdfbb 4528
a417dc56
RW
4529 test -n "$MAKE" && break
4530done
4531
4532MAKE_IS_GNU=
4533case "`$MAKE --version 2>&1 | sed 1q`" in
4534 *GNU*)
4535 MAKE_IS_GNU=yes
4536 ;;
4537esac
81ecdfbb 4538 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4539 GMAKE_TRUE=
4540 GMAKE_FALSE='#'
4541else
4542 GMAKE_TRUE='#'
4543 GMAKE_FALSE=
4544fi
4545
81ecdfbb
RW
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4547$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4548set x ${MAKE-make}
4549ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4550if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4551 $as_echo_n "(cached) " >&6
a417dc56
RW
4552else
4553 cat >conftest.make <<\_ACEOF
81ecdfbb 4554SHELL = /bin/sh
a417dc56 4555all:
81ecdfbb 4556 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4557_ACEOF
4558# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4559case `${MAKE-make} -f conftest.make 2>/dev/null` in
4560 *@@@%%%=?*=@@@%%%*)
4561 eval ac_cv_prog_make_${ac_make}_set=yes;;
4562 *)
4563 eval ac_cv_prog_make_${ac_make}_set=no;;
4564esac
a417dc56
RW
4565rm -f conftest.make
4566fi
81ecdfbb
RW
4567if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4569$as_echo "yes" >&6; }
a417dc56
RW
4570 SET_MAKE=
4571else
81ecdfbb
RW
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
a417dc56
RW
4574 SET_MAKE="MAKE=${MAKE-make}"
4575fi
4576
4577
c971b7fa
PA
4578# Configure gnulib. We need to build gnulib under some other
4579# directory not "gnulib", to avoid the problem of both GDB and
4580# GDBserver wanting to build it in the same directory, when building
4581# in the source dir.
783e057b 4582
c971b7fa
PA
4583 in_src="gnulib"
4584 in_build="build-gnulib"
4585
4586 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4587 # so they do not pile up.
4588 ac_sub_configure_args=
4589 ac_prev=
4590 eval "set x $ac_configure_args"
4591 shift
4592 for ac_arg
4593 do
4594 if test -n "$ac_prev"; then
4595 ac_prev=
4596 continue
4597 fi
4598 case $ac_arg in
4599 -cache-file | --cache-file | --cache-fil | --cache-fi \
4600 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4601 ac_prev=cache_file ;;
4602 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4603 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4604 | --c=*)
4605 ;;
4606 --config-cache | -C)
4607 ;;
4608 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4609 ac_prev=srcdir ;;
4610 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4611 ;;
4612 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4613 ac_prev=prefix ;;
4614 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4615 ;;
4616 --disable-option-checking)
4617 ;;
4618 *)
4619 case $ac_arg in
4620 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4621 esac
4622 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4623 esac
4624 done
4625
4626 # Always prepend --prefix to ensure using the same prefix
4627 # in subdir configurations.
4628 ac_arg="--prefix=$prefix"
4629 case $ac_arg in
4630 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4631 esac
4632 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4633
4634 # Pass --silent
4635 if test "$silent" = yes; then
4636 ac_sub_configure_args="--silent $ac_sub_configure_args"
4637 fi
4638
4639 # Always prepend --disable-option-checking to silence warnings, since
4640 # different subdirs can have different --enable and --with options.
4641 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4642
4643 ac_popdir=`pwd`
4644 ac_dir=$in_build
4645
4646 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4648 $as_echo "$ac_msg" >&6
4649 as_dir="$ac_dir"; as_fn_mkdir_p
4650
4651 ac_srcdir=../$srcdir/$in_src
4652
4653 cd "$ac_dir"
4654
4655 ac_sub_configure=$ac_srcdir/configure
4656
4657 # Make the cache file name correct relative to the subdirectory.
4658 case $cache_file in
4659 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4660 *) # Relative name.
4661 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4662 esac
4663
4664 { $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
4665$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4666 # The eval makes quoting arguments work.
4667 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4668 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4669 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4670
4671 cd "$ac_popdir"
783e057b 4672
c971b7fa
PA
4673
4674
4675CONFIG_OBS=
4676CONFIG_DEPS=
4677CONFIG_SRCS=
4678ENABLE_CFLAGS=
4679
4680CONFIG_ALL=
4681CONFIG_CLEAN=
4682CONFIG_INSTALL=
4683CONFIG_UNINSTALL=
4684
4685# If we haven't got the data from the intl directory,
4686# assume NLS is disabled.
4687USE_NLS=no
4688LIBINTL=
4689LIBINTL_DEP=
4690INCINTL=
4691XGETTEXT=
4692GMSGFMT=
4693POSUB=
783e057b
DJ
4694
4695if test -f ../intl/config.intl; then
4696 . ../intl/config.intl
4697fi
81ecdfbb
RW
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4699$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4700if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
783e057b 4703else
81ecdfbb
RW
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4705$as_echo "yes" >&6; }
783e057b 4706
81ecdfbb 4707$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4708
4709
81ecdfbb
RW
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4711$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4712 # Look for .po and .gmo files in the source directory.
4713 CATALOGS=
4714 XLINGUAS=
4715 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4716 # If there aren't any .gmo files the shell will give us the
4717 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4718 # weeded out.
4719 case "$cat" in *\**)
4720 continue;;
4721 esac
4722 # The quadruple backslash is collapsed to a double backslash
4723 # by the backticks, then collapsed again by the double quotes,
4724 # leaving us with one backslash in the sed expression (right
4725 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4726 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4727 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4728 # The user is allowed to set LINGUAS to a list of languages to
4729 # install catalogs for. If it's empty that means "all of them."
4730 if test "x$LINGUAS" = x; then
4731 CATALOGS="$CATALOGS $cat"
4732 XLINGUAS="$XLINGUAS $lang"
4733 else
4734 case "$LINGUAS" in *$lang*)
4735 CATALOGS="$CATALOGS $cat"
4736 XLINGUAS="$XLINGUAS $lang"
4737 ;;
4738 esac
e28b3332
DJ
4739 fi
4740 done
c971b7fa
PA
4741 LINGUAS="$XLINGUAS"
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4743$as_echo "$LINGUAS" >&6; }
4744
4745
4746 DATADIRNAME=share
4747
4748 INSTOBJEXT=.mo
4749
4750 GENCAT=gencat
4751
4752 CATOBJEXT=.gmo
e28b3332 4753
e28b3332
DJ
4754fi
4755
c971b7fa
PA
4756localedir='${datadir}/locale'
4757
4758
4759if test x"$USE_NLS" = xyes; then
4760 CONFIG_ALL="$CONFIG_ALL all-po"
4761 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4762 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4763 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4764fi
e28b3332 4765
c971b7fa
PA
4766GNULIB=build-gnulib/import
4767
4768# For Makefile dependencies.
4769GNULIB_STDINT_H=
4770if test x"$STDINT_H" != x; then
4771 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4772fi
4773
4774
c971b7fa
PA
4775PACKAGE=gdb
4776
4777cat >>confdefs.h <<_ACEOF
4778#define PACKAGE "$PACKAGE"
4779_ACEOF
4780
4781
4782
4783# We never need to detect it in this sub-configure.
4784# But preserve it for config.status --recheck.
4785
4786
4787
4788MAKEINFO_EXTRA_FLAGS=""
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4790$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4791if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4792 $as_echo_n "(cached) " >&6
4793else
4794 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4795 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4796 gdb_cv_have_makeinfo_click=yes
4797 else
4798 gdb_cv_have_makeinfo_click=no
4799 fi
4800fi
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4802$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4803if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4804 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4805fi
e28b3332
DJ
4806
4807
bec39cab
AC
4808
4809
81ecdfbb
RW
4810# Check whether --with-separate-debug-dir was given.
4811if test "${with_separate_debug_dir+set}" = set; then :
4812 withval=$with_separate_debug_dir;
b14b1491
TT
4813 DEBUGDIR=$withval
4814else
4815 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4816fi
4817
20e95c23 4818
783e057b
DJ
4819 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4820 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4821 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4822 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4823
783e057b
DJ
4824cat >>confdefs.h <<_ACEOF
4825#define DEBUGDIR "$ac_define_dir"
20e95c23 4826_ACEOF
20e95c23 4827
20e95c23 4828
20e95c23 4829
0c4a4063 4830
b14b1491
TT
4831 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4832 if test "x$prefix" = xNONE; then
4833 test_prefix=/usr/local
4834 else
4835 test_prefix=$prefix
4836 fi
783e057b 4837 else
b14b1491 4838 test_prefix=$exec_prefix
783e057b 4839 fi
b14b1491
TT
4840 value=0
4841 case ${ac_define_dir} in
4842 "${test_prefix}"|"${test_prefix}/"*|\
4843 '${exec_prefix}'|'${exec_prefix}/'*)
4844 value=1
4845 ;;
4846 esac
4847
4848cat >>confdefs.h <<_ACEOF
4849#define DEBUGDIR_RELOCATABLE $value
4850_ACEOF
4851
4852
4853
0c4a4063 4854
f83d8a90
DE
4855# We can't pass paths as command line arguments.
4856# Mingw32 tries to be clever and will convert the paths for us.
4857# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4858# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4859# This breaks GDB's relocatable path conversions since paths passed in
4860# config.h would not get so translated, the path prefixes no longer match.
4861
4862 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4863 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4864 ac_define_dir=`eval echo $bindir`
4865 ac_define_dir=`eval echo $ac_define_dir`
4866
4867cat >>confdefs.h <<_ACEOF
4868#define BINDIR "$ac_define_dir"
4869_ACEOF
4870
4871
4872
b14b1491
TT
4873# GDB's datadir relocation
4874
4875
4876
81ecdfbb
RW
4877# Check whether --with-gdb-datadir was given.
4878if test "${with_gdb_datadir+set}" = set; then :
4879 withval=$with_gdb_datadir;
b14b1491 4880 GDB_DATADIR=$withval
20e95c23 4881else
b14b1491 4882 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4883fi
4884
20e95c23 4885
b14b1491
TT
4886 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4887 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4888 ac_define_dir=`eval echo $GDB_DATADIR`
4889 ac_define_dir=`eval echo $ac_define_dir`
4890
4891cat >>confdefs.h <<_ACEOF
4892#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4893_ACEOF
4894
b14b1491
TT
4895
4896
0c4a4063 4897
b14b1491
TT
4898 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4899 if test "x$prefix" = xNONE; then
4900 test_prefix=/usr/local
4901 else
4902 test_prefix=$prefix
4903 fi
4904 else
4905 test_prefix=$exec_prefix
4906 fi
4907 value=0
4908 case ${ac_define_dir} in
4909 "${test_prefix}"|"${test_prefix}/"*|\
4910 '${exec_prefix}'|'${exec_prefix}/'*)
4911 value=1
4912 ;;
4913 esac
4914
4915cat >>confdefs.h <<_ACEOF
4916#define GDB_DATADIR_RELOCATABLE $value
4917_ACEOF
4918
4919
783e057b 4920
20e95c23 4921
0c4a4063 4922
81ecdfbb
RW
4923# Check whether --with-relocated-sources was given.
4924if test "${with_relocated_sources+set}" = set; then :
4925 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4926
4927 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4928 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4929 ac_define_dir=`eval echo $reloc_srcdir`
4930 ac_define_dir=`eval echo $ac_define_dir`
4931
4932cat >>confdefs.h <<_ACEOF
4933#define RELOC_SRCDIR "$ac_define_dir"
4934_ACEOF
4935
4936
4937
81ecdfbb
RW
4938fi
4939
29b0e8a2 4940
bccbefd2
JK
4941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
4942$as_echo_n "checking for default auto-load safe-path... " >&6; }
4943
4944# Check whether --with-auto-load-safe-path was given.
4945if test "${with_auto_load_safe_path+set}" = set; then :
4946 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
4947 with_auto_load_safe_path=""
4948 fi
4949else
4950 with_auto_load_safe_path="$prefix"
4951fi
4952
4953
4954 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4955 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4956 ac_define_dir=`eval echo $with_auto_load_safe_path`
4957 ac_define_dir=`eval echo $ac_define_dir`
4958
4959cat >>confdefs.h <<_ACEOF
4960#define DEFAULT_AUTO_LOAD_SAFE_PATH "$ac_define_dir"
4961_ACEOF
4962
4963
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
4965$as_echo "$with_auto_load_safe_path" >&6; }
4966
29b0e8a2 4967
20e95c23 4968
5ae98d25 4969subdirs="$subdirs testsuite"
20e95c23
DJ
4970
4971
783e057b 4972# Check whether to support alternative target configurations
81ecdfbb
RW
4973# Check whether --enable-targets was given.
4974if test "${enable_targets+set}" = set; then :
4975 enableval=$enable_targets; case "${enableval}" in
4976 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
4977 ;;
4978 no) enable_targets= ;;
4979 *) enable_targets=$enableval ;;
4980esac
81ecdfbb
RW
4981fi
4982
20e95c23 4983
783e057b 4984# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
4985# Check whether --enable-64-bit-bfd was given.
4986if test "${enable_64_bit_bfd+set}" = set; then :
4987 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
4988 yes) want64=true ;;
4989 no) want64=false ;;
81ecdfbb 4990 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
4991esac
4992else
4993 want64=false
81ecdfbb
RW
4994fi
4995
783e057b
DJ
4996# Provide defaults for some variables set by the per-host and per-target
4997# configuration.
4998gdb_host_obs=posix-hdep.o
20e95c23 4999
783e057b
DJ
5000if test "${target}" = "${host}"; then
5001 gdb_native=yes
5002else
5003 gdb_native=no
5004fi
20e95c23 5005
783e057b 5006. $srcdir/configure.host
20e95c23 5007
783e057b 5008# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5009
783e057b
DJ
5010TARGET_OBS=
5011all_targets=
20e95c23 5012
783e057b 5013for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5014do
783e057b
DJ
5015 if test "$targ_alias" = "all"; then
5016 all_targets=true
5017 else
5018 # Canonicalize the secondary target names.
5019 result=`$ac_config_sub $targ_alias 2>/dev/null`
5020 if test -n "$result"; then
5021 targ=$result
5022 else
5023 targ=$targ_alias
5024 fi
20e95c23 5025
783e057b 5026 . ${srcdir}/configure.tgt
20e95c23 5027
bf307134
JB
5028 if test -z "${gdb_target_obs}"; then :
5029 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5030fi
5031
783e057b
DJ
5032 # Target-specific object files
5033 for i in ${gdb_target_obs}; do
5034 case " $TARGET_OBS " in
5035 *" ${i} "*) ;;
5036 *)
5037 TARGET_OBS="$TARGET_OBS ${i}"
5038 ;;
5039 esac
5040 done
20e95c23 5041
783e057b
DJ
5042 # Check whether this target needs 64-bit CORE_ADDR
5043 if test x${want64} = xfalse; then
5044 . ${srcdir}/../bfd/config.bfd
5045 fi
5046 fi
20e95c23
DJ
5047done
5048
783e057b
DJ
5049if test x${all_targets} = xtrue; then
5050
5051 # We want all 64-bit targets if we either:
5052 # - run on a 64-bit host or
5053 # - already require 64-bit support for some other target or
5054 # - the --enable-64-bit-bfd option was supplied
5055 # Otherwise we only support all 32-bit targets.
5056 #
5057 # NOTE: This test must be in sync with the corresponding
5058 # tests in BFD!
20e95c23 5059
783e057b 5060 if test x${want64} = xfalse; then
81ecdfbb
RW
5061 # The cast to long int works around a bug in the HP C Compiler
5062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5064# This bug is HP SR number 8606223364.
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5066$as_echo_n "checking size of long... " >&6; }
5067if test "${ac_cv_sizeof_long+set}" = set; then :
5068 $as_echo_n "(cached) " >&6
c0993dbe 5069else
81ecdfbb 5070 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5071
81ecdfbb
RW
5072else
5073 if test "$ac_cv_type_long" = yes; then
5074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5076{ as_fn_set_status 77
5077as_fn_error "cannot compute sizeof (long)
5078See \`config.log' for more details." "$LINENO" 5; }; }
5079 else
5080 ac_cv_sizeof_long=0
5081 fi
c0993dbe 5082fi
81ecdfbb 5083
c0993dbe 5084fi
81ecdfbb
RW
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5086$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5087
c0993dbe 5088
c0993dbe 5089
c0993dbe
UW
5090cat >>confdefs.h <<_ACEOF
5091#define SIZEOF_LONG $ac_cv_sizeof_long
5092_ACEOF
5093
5094
5095 if test "x${ac_cv_sizeof_long}" = "x8"; then
5096 want64=true
5097 fi
5098 fi
5099 if test x${want64} = xtrue; then
5100 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5101 else
5102 TARGET_OBS='$(ALL_TARGET_OBS)'
5103 fi
5104fi
5105
5106
5107
5108# For other settings, only the main target counts.
5109gdb_sim=
5110gdb_osabi=
5111build_gdbserver=
5112targ=$target; . ${srcdir}/configure.tgt
5113
5114# Fetch the default architecture and default target vector from BFD.
5115targ=$target; . $srcdir/../bfd/config.bfd
5116
5117# We only want the first architecture, so strip off the others if
5118# there is more than one.
5119targ_archs=`echo $targ_archs | sed 's/ .*//'`
5120
5121if test "x$targ_archs" != x; then
5122
5123cat >>confdefs.h <<_ACEOF
5124#define DEFAULT_BFD_ARCH $targ_archs
5125_ACEOF
5126
5127fi
5128if test "x$targ_defvec" != x; then
5129
5130cat >>confdefs.h <<_ACEOF
5131#define DEFAULT_BFD_VEC $targ_defvec
5132_ACEOF
5133
5134fi
5135
c0993dbe
UW
5136# The CLI cannot be disabled yet, but may be in the future.
5137
5138# Enable CLI.
81ecdfbb
RW
5139# Check whether --enable-gdbcli was given.
5140if test "${enable_gdbcli+set}" = set; then :
5141 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5142 yes)
5143 ;;
5144 no)
81ecdfbb 5145 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5146 *)
81ecdfbb 5147 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5148 esac
5149else
5150 enable_gdbcli=yes
81ecdfbb
RW
5151fi
5152
c0993dbe
UW
5153if test x"$enable_gdbcli" = xyes; then
5154 if test -d $srcdir/cli; then
5155 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5156 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5157 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5158 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5159 fi
5160fi
5161
5162# Enable MI.
81ecdfbb
RW
5163# Check whether --enable-gdbmi was given.
5164if test "${enable_gdbmi+set}" = set; then :
5165 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5166 yes | no)
5167 ;;
5168 *)
81ecdfbb 5169 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5170 esac
5171else
5172 enable_gdbmi=yes
81ecdfbb
RW
5173fi
5174
c0993dbe
UW
5175if test x"$enable_gdbmi" = xyes; then
5176 if test -d $srcdir/mi; then
5177 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5178 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5179 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5180 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5181 fi
5182fi
5183
5184# Enable TUI.
81ecdfbb
RW
5185# Check whether --enable-tui was given.
5186if test "${enable_tui+set}" = set; then :
5187 enableval=$enable_tui; case $enableval in
3ca64bd3 5188 yes | no | auto)
c0993dbe
UW
5189 ;;
5190 *)
81ecdfbb 5191 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5192 esac
5193else
3ca64bd3 5194 enable_tui=auto
81ecdfbb
RW
5195fi
5196
c0993dbe
UW
5197
5198# Enable gdbtk.
81ecdfbb
RW
5199# Check whether --enable-gdbtk was given.
5200if test "${enable_gdbtk+set}" = set; then :
5201 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5202 yes | no)
5203 ;;
5204 *)
81ecdfbb 5205 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5206 esac
5207else
5062cc19 5208 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5209 enable_gdbtk=yes
5210 else
5211 enable_gdbtk=no
5212 fi
81ecdfbb
RW
5213fi
5214
c0993dbe
UW
5215# We unconditionally disable gdbtk tests on selected platforms.
5216case $host_os in
5217 go32* | windows*)
81ecdfbb
RW
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5219$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5220 enable_gdbtk=no ;;
5221esac
5222
05e7c244 5223# Libunwind support for ia64.
bec39cab 5224
05e7c244
JK
5225
5226# Check whether --with-libunwind-ia64 was given.
5227if test "${with_libunwind_ia64+set}" = set; then :
5228 withval=$with_libunwind_ia64;
bec39cab 5229else
05e7c244
JK
5230 with_libunwind_ia64=auto
5231fi
bec39cab 5232
05e7c244
JK
5233
5234# Backward compatibility option.
5235if test "${with_libunwind+set}" = set; then
5236 if test x"$with_libunwind_ia64" != xauto; then
5237 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5238 fi
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5240$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5241 with_libunwind_ia64="$with_libunwind"
5242fi
5243
5244case "$with_libunwind_ia64" in
5245 yes | no)
5246 ;;
5247 auto)
5248 for ac_header in libunwind-ia64.h
81ecdfbb 5249do :
b54a8fd7
PA
5250 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5251if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5252 cat >>confdefs.h <<_ACEOF
b54a8fd7 5253#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5254_ACEOF
5255
5256fi
5257
5258done
5259
05e7c244
JK
5260 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5261 ;;
5262 *)
5263 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5264 ;;
5265esac
bec39cab 5266
05e7c244 5267if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5268 for ac_header in libunwind-ia64.h
81ecdfbb 5269do :
b54a8fd7
PA
5270 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5271if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5272 cat >>confdefs.h <<_ACEOF
b54a8fd7 5273#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5274_ACEOF
5275
5276fi
5277
5278done
5279
05e7c244
JK
5280 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5281 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5282 fi
5283 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5284 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5285 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5286fi
5287
cb01cfba
JB
5288opt_curses=no
5289
81ecdfbb
RW
5290# Check whether --with-curses was given.
5291if test "${with_curses+set}" = set; then :
5292 withval=$with_curses; opt_curses=$withval
5293fi
5294
cb01cfba 5295
76a39ba7 5296prefer_curses=no
cb01cfba 5297if test "$opt_curses" = "yes"; then
76a39ba7 5298 prefer_curses=yes
cb01cfba
JB
5299fi
5300
a9322a30 5301# Profiling support.
81ecdfbb
RW
5302# Check whether --enable-profiling was given.
5303if test "${enable_profiling+set}" = set; then :
5304 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5305 yes | no)
5306 ;;
5307 *)
81ecdfbb 5308 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5309 esac
5310else
5311 enable_profiling=no
81ecdfbb 5312fi
bec39cab 5313
a9322a30
TT
5314
5315for ac_func in monstartup _mcleanup
81ecdfbb
RW
5316do :
5317 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5318ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5319eval as_val=\$$as_ac_var
5320 if test "x$as_val" = x""yes; then :
5321 cat >>confdefs.h <<_ACEOF
5322#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5323_ACEOF
a9322a30 5324
81ecdfbb
RW
5325fi
5326done
a9322a30 5327
81ecdfbb
RW
5328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5329$as_echo_n "checking for _etext... " >&6; }
5330if test "${ac_cv_var__etext+set}" = set; then :
5331 $as_echo_n "(cached) " >&6
5332else
5333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5334/* end confdefs.h. */
5335#include <stdlib.h>
5336extern char _etext;
a9322a30
TT
5337
5338int
5339main ()
5340{
5341free (&_etext);
5342 ;
5343 return 0;
5344}
bec39cab 5345_ACEOF
81ecdfbb 5346if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5347 ac_cv_var__etext=yes
bec39cab 5348else
81ecdfbb 5349 ac_cv_var__etext=no
bec39cab 5350fi
81ecdfbb
RW
5351rm -f core conftest.err conftest.$ac_objext \
5352 conftest$ac_exeext conftest.$ac_ext
bec39cab 5353fi
81ecdfbb
RW
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5355$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5356if test $ac_cv_var__etext = yes; then
60ca704f 5357
81ecdfbb 5358$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5359
bec39cab 5360fi
81ecdfbb
RW
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5362$as_echo_n "checking for etext... " >&6; }
5363if test "${ac_cv_var_etext+set}" = set; then :
5364 $as_echo_n "(cached) " >&6
bec39cab 5365else
81ecdfbb 5366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5367/* end confdefs.h. */
a9322a30
TT
5368#include <stdlib.h>
5369extern char etext;
bec39cab
AC
5370
5371int
5372main ()
5373{
a9322a30 5374free (&etext);
bec39cab
AC
5375 ;
5376 return 0;
5377}
5378_ACEOF
81ecdfbb 5379if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5380 ac_cv_var_etext=yes
bec39cab 5381else
81ecdfbb 5382 ac_cv_var_etext=no
bec39cab 5383fi
81ecdfbb
RW
5384rm -f core conftest.err conftest.$ac_objext \
5385 conftest$ac_exeext conftest.$ac_ext
bec39cab 5386fi
81ecdfbb
RW
5387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5388$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5389if test $ac_cv_var_etext = yes; then
5390
81ecdfbb 5391$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5392
5393fi
a9322a30
TT
5394if test "$enable_profiling" = yes ; then
5395 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5396 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5397 fi
5398 PROFILE_CFLAGS=-pg
5399 OLD_CFLAGS="$CFLAGS"
5400 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5401
81ecdfbb
RW
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5403$as_echo_n "checking whether $CC supports -pg... " >&6; }
5404if test "${ac_cv_cc_supports_pg+set}" = set; then :
5405 $as_echo_n "(cached) " >&6
bec39cab 5406else
81ecdfbb 5407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5408/* end confdefs.h. */
bec39cab
AC
5409
5410int
5411main ()
5412{
a9322a30 5413int x;
bec39cab
AC
5414 ;
5415 return 0;
5416}
5417_ACEOF
81ecdfbb 5418if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5419 ac_cv_cc_supports_pg=yes
bec39cab 5420else
81ecdfbb 5421 ac_cv_cc_supports_pg=no
bec39cab 5422fi
81ecdfbb 5423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5424fi
81ecdfbb
RW
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5426$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5427
a9322a30 5428 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5429 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5430 fi
bec39cab 5431
a9322a30 5432 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5433fi
5434
c16158bc
JM
5435
5436
81ecdfbb
RW
5437# Check whether --with-pkgversion was given.
5438if test "${with_pkgversion+set}" = set; then :
5439 withval=$with_pkgversion; case "$withval" in
5440 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5441 no) PKGVERSION= ;;
5442 *) PKGVERSION="($withval) " ;;
5443 esac
5444else
5445 PKGVERSION="(GDB) "
5446
81ecdfbb 5447fi
c16158bc
JM
5448
5449
5450
5451
81ecdfbb
RW
5452
5453# Check whether --with-bugurl was given.
5454if test "${with_bugurl+set}" = set; then :
5455 withval=$with_bugurl; case "$withval" in
5456 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5457 no) BUGURL=
5458 ;;
5459 *) BUGURL="$withval"
5460 ;;
5461 esac
5462else
5463 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5464
81ecdfbb
RW
5465fi
5466
c16158bc
JM
5467 case ${BUGURL} in
5468 "")
5469 REPORT_BUGS_TO=
5470 REPORT_BUGS_TEXI=
5471 ;;
5472 *)
5473 REPORT_BUGS_TO="<$BUGURL>"
5474 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5475 ;;
5476 esac;
5477
5478
5479
5480
5481cat >>confdefs.h <<_ACEOF
5482#define PKGVERSION "$PKGVERSION"
5483_ACEOF
5484
5485
5486cat >>confdefs.h <<_ACEOF
5487#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5488_ACEOF
5489
5490
bec39cab
AC
5491# --------------------- #
5492# Checks for programs. #
5493# --------------------- #
5494
5495for ac_prog in gawk mawk nawk awk
5496do
5497 # Extract the first word of "$ac_prog", so it can be a program name with args.
5498set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5500$as_echo_n "checking for $ac_word... " >&6; }
5501if test "${ac_cv_prog_AWK+set}" = set; then :
5502 $as_echo_n "(cached) " >&6
bec39cab
AC
5503else
5504 if test -n "$AWK"; then
5505 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5506else
5507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510 IFS=$as_save_IFS
5511 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5512 for ac_exec_ext in '' $ac_executable_extensions; do
5513 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5514 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5516 break 2
5517 fi
5518done
81ecdfbb
RW
5519 done
5520IFS=$as_save_IFS
bec39cab
AC
5521
5522fi
5523fi
5524AWK=$ac_cv_prog_AWK
5525if test -n "$AWK"; then
81ecdfbb
RW
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5527$as_echo "$AWK" >&6; }
bec39cab 5528else
81ecdfbb
RW
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
bec39cab
AC
5531fi
5532
bec39cab 5533
81ecdfbb 5534 test -n "$AWK" && break
bec39cab
AC
5535done
5536
c971b7fa
PA
5537# Find a good install program. We prefer a C program (faster),
5538# so one script is as good as another. But avoid the broken or
5539# incompatible versions:
5540# SysV /etc/install, /usr/sbin/install
5541# SunOS /usr/etc/install
5542# IRIX /sbin/install
5543# AIX /bin/install
5544# AmigaOS /C/install, which installs bootblocks on floppy discs
5545# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5546# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5547# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5548# OS/2's system install, which has a completely different semantic
5549# ./install, which can be erroneously created by make from ./install.sh.
5550# Reject install programs that cannot install multiple files.
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5552$as_echo_n "checking for a BSD-compatible install... " >&6; }
5553if test -z "$INSTALL"; then
5554if test "${ac_cv_path_install+set}" = set; then :
5555 $as_echo_n "(cached) " >&6
5556else
5557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560 IFS=$as_save_IFS
5561 test -z "$as_dir" && as_dir=.
5562 # Account for people who put trailing slashes in PATH elements.
5563case $as_dir/ in #((
5564 ./ | .// | /[cC]/* | \
5565 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5566 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5567 /usr/ucb/* ) ;;
5568 *)
5569 # OSF1 and SCO ODT 3.0 have their own names for install.
5570 # Don't use installbsd from OSF since it installs stuff as root
5571 # by default.
5572 for ac_prog in ginstall scoinst install; do
5573 for ac_exec_ext in '' $ac_executable_extensions; do
5574 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5575 if test $ac_prog = install &&
5576 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5577 # AIX install. It has an incompatible calling convention.
5578 :
5579 elif test $ac_prog = install &&
5580 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5581 # program-specific install script used by HP pwplus--don't use.
5582 :
5583 else
5584 rm -rf conftest.one conftest.two conftest.dir
5585 echo one > conftest.one
5586 echo two > conftest.two
5587 mkdir conftest.dir
5588 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5589 test -s conftest.one && test -s conftest.two &&
5590 test -s conftest.dir/conftest.one &&
5591 test -s conftest.dir/conftest.two
5592 then
5593 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5594 break 3
5595 fi
5596 fi
5597 fi
5598 done
5599 done
5600 ;;
5601esac
5602
5603 done
5604IFS=$as_save_IFS
5605
5606rm -rf conftest.one conftest.two conftest.dir
5607
5608fi
5609 if test "${ac_cv_path_install+set}" = set; then
5610 INSTALL=$ac_cv_path_install
5611 else
5612 # As a last resort, use the slow shell script. Don't cache a
5613 # value for INSTALL within a source directory, because that will
5614 # break other packages using the cache if that directory is
5615 # removed, or if the value is a relative name.
5616 INSTALL=$ac_install_sh
5617 fi
5618fi
5619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5620$as_echo "$INSTALL" >&6; }
5621
5622# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5623# It thinks the first close brace ends the variable substitution.
5624test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5625
5626test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5627
5628test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5629
81ecdfbb
RW
5630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5631$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5632LN_S=$as_ln_s
5633if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5635$as_echo "yes" >&6; }
bec39cab 5636else
81ecdfbb
RW
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5638$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5639fi
5640
5641if test -n "$ac_tool_prefix"; then
5642 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5643set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if test "${ac_cv_prog_RANLIB+set}" = set; then :
5647 $as_echo_n "(cached) " >&6
bec39cab
AC
5648else
5649 if test -n "$RANLIB"; then
5650 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5651else
5652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655 IFS=$as_save_IFS
5656 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5657 for ac_exec_ext in '' $ac_executable_extensions; do
5658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5659 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5661 break 2
5662 fi
5663done
81ecdfbb
RW
5664 done
5665IFS=$as_save_IFS
bec39cab
AC
5666
5667fi
5668fi
5669RANLIB=$ac_cv_prog_RANLIB
5670if test -n "$RANLIB"; then
81ecdfbb
RW
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5672$as_echo "$RANLIB" >&6; }
bec39cab 5673else
81ecdfbb
RW
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
bec39cab
AC
5676fi
5677
81ecdfbb 5678
bec39cab
AC
5679fi
5680if test -z "$ac_cv_prog_RANLIB"; then
5681 ac_ct_RANLIB=$RANLIB
5682 # Extract the first word of "ranlib", so it can be a program name with args.
5683set dummy ranlib; ac_word=$2
81ecdfbb
RW
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5685$as_echo_n "checking for $ac_word... " >&6; }
5686if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5687 $as_echo_n "(cached) " >&6
bec39cab
AC
5688else
5689 if test -n "$ac_ct_RANLIB"; then
5690 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5691else
5692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5693for as_dir in $PATH
5694do
5695 IFS=$as_save_IFS
5696 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5697 for ac_exec_ext in '' $ac_executable_extensions; do
5698 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5699 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5701 break 2
5702 fi
5703done
81ecdfbb
RW
5704 done
5705IFS=$as_save_IFS
bec39cab 5706
bec39cab
AC
5707fi
5708fi
5709ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5710if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5712$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5713else
81ecdfbb
RW
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
bec39cab
AC
5716fi
5717
81ecdfbb
RW
5718 if test "x$ac_ct_RANLIB" = x; then
5719 RANLIB=":"
5720 else
5721 case $cross_compiling:$ac_tool_warned in
5722yes:)
5723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5725ac_tool_warned=yes ;;
5726esac
5727 RANLIB=$ac_ct_RANLIB
5728 fi
bec39cab
AC
5729else
5730 RANLIB="$ac_cv_prog_RANLIB"
5731fi
5732
5733for ac_prog in 'bison -y' byacc
5734do
5735 # Extract the first word of "$ac_prog", so it can be a program name with args.
5736set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
5739if test "${ac_cv_prog_YACC+set}" = set; then :
5740 $as_echo_n "(cached) " >&6
bec39cab
AC
5741else
5742 if test -n "$YACC"; then
5743 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5744else
5745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748 IFS=$as_save_IFS
5749 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5750 for ac_exec_ext in '' $ac_executable_extensions; do
5751 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5752 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5754 break 2
5755 fi
5756done
81ecdfbb
RW
5757 done
5758IFS=$as_save_IFS
bec39cab
AC
5759
5760fi
5761fi
5762YACC=$ac_cv_prog_YACC
5763if test -n "$YACC"; then
81ecdfbb
RW
5764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5765$as_echo "$YACC" >&6; }
bec39cab 5766else
81ecdfbb
RW
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
bec39cab
AC
5769fi
5770
81ecdfbb 5771
bec39cab
AC
5772 test -n "$YACC" && break
5773done
5774test -n "$YACC" || YACC="yacc"
5775
5776
5777if test -n "$ac_tool_prefix"; then
5778 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5779set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if test "${ac_cv_prog_AR+set}" = set; then :
5783 $as_echo_n "(cached) " >&6
bec39cab
AC
5784else
5785 if test -n "$AR"; then
5786 ac_cv_prog_AR="$AR" # Let the user override the test.
5787else
5788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791 IFS=$as_save_IFS
5792 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5793 for ac_exec_ext in '' $ac_executable_extensions; do
5794 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5795 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5797 break 2
5798 fi
5799done
81ecdfbb
RW
5800 done
5801IFS=$as_save_IFS
bec39cab
AC
5802
5803fi
5804fi
5805AR=$ac_cv_prog_AR
5806if test -n "$AR"; then
81ecdfbb
RW
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5808$as_echo "$AR" >&6; }
bec39cab 5809else
81ecdfbb
RW
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811$as_echo "no" >&6; }
bec39cab
AC
5812fi
5813
81ecdfbb 5814
bec39cab
AC
5815fi
5816if test -z "$ac_cv_prog_AR"; then
5817 ac_ct_AR=$AR
5818 # Extract the first word of "ar", so it can be a program name with args.
5819set dummy ar; ac_word=$2
81ecdfbb
RW
5820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5821$as_echo_n "checking for $ac_word... " >&6; }
5822if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5823 $as_echo_n "(cached) " >&6
bec39cab
AC
5824else
5825 if test -n "$ac_ct_AR"; then
5826 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5827else
5828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH
5830do
5831 IFS=$as_save_IFS
5832 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5833 for ac_exec_ext in '' $ac_executable_extensions; do
5834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5835 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5837 break 2
5838 fi
5839done
81ecdfbb
RW
5840 done
5841IFS=$as_save_IFS
bec39cab
AC
5842
5843fi
5844fi
5845ac_ct_AR=$ac_cv_prog_ac_ct_AR
5846if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5848$as_echo "$ac_ct_AR" >&6; }
bec39cab 5849else
81ecdfbb
RW
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5851$as_echo "no" >&6; }
bec39cab
AC
5852fi
5853
81ecdfbb
RW
5854 if test "x$ac_ct_AR" = x; then
5855 AR=""
5856 else
5857 case $cross_compiling:$ac_tool_warned in
5858yes:)
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5861ac_tool_warned=yes ;;
5862esac
5863 AR=$ac_ct_AR
5864 fi
bec39cab
AC
5865else
5866 AR="$ac_cv_prog_AR"
5867fi
5868
5869if test -n "$ac_tool_prefix"; then
5870 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5871set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+set}" = set; then :
5875 $as_echo_n "(cached) " >&6
bec39cab
AC
5876else
5877 if test -n "$DLLTOOL"; then
5878 ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool"
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
5897DLLTOOL=$ac_cv_prog_DLLTOOL
5898if test -n "$DLLTOOL"; then
81ecdfbb
RW
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5900$as_echo "$DLLTOOL" >&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 5906
bec39cab
AC
5907fi
5908if test -z "$ac_cv_prog_DLLTOOL"; then
5909 ac_ct_DLLTOOL=$DLLTOOL
5910 # Extract the first word of "dlltool", so it can be a program name with args.
5911set dummy dlltool; ac_word=$2
81ecdfbb
RW
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913$as_echo_n "checking for $ac_word... " >&6; }
5914if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5915 $as_echo_n "(cached) " >&6
bec39cab
AC
5916else
5917 if test -n "$ac_ct_DLLTOOL"; then
5918 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5919else
5920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH
5922do
5923 IFS=$as_save_IFS
5924 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5925 for ac_exec_ext in '' $ac_executable_extensions; do
5926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5927 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5929 break 2
5930 fi
5931done
81ecdfbb
RW
5932 done
5933IFS=$as_save_IFS
bec39cab
AC
5934
5935fi
5936fi
5937ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5938if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5940$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 5941else
81ecdfbb
RW
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5943$as_echo "no" >&6; }
bec39cab
AC
5944fi
5945
81ecdfbb
RW
5946 if test "x$ac_ct_DLLTOOL" = x; then
5947 DLLTOOL=""
5948 else
5949 case $cross_compiling:$ac_tool_warned in
5950yes:)
5951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5953ac_tool_warned=yes ;;
5954esac
5955 DLLTOOL=$ac_ct_DLLTOOL
5956 fi
bec39cab
AC
5957else
5958 DLLTOOL="$ac_cv_prog_DLLTOOL"
5959fi
5960
5961if test -n "$ac_tool_prefix"; then
5962 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
5963set dummy ${ac_tool_prefix}windres; 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_WINDRES+set}" = set; then :
5967 $as_echo_n "(cached) " >&6
bec39cab
AC
5968else
5969 if test -n "$WINDRES"; then
5970 ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres"
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
5989WINDRES=$ac_cv_prog_WINDRES
5990if test -n "$WINDRES"; then
81ecdfbb
RW
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
5992$as_echo "$WINDRES" >&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 5998
bec39cab
AC
5999fi
6000if test -z "$ac_cv_prog_WINDRES"; then
6001 ac_ct_WINDRES=$WINDRES
6002 # Extract the first word of "windres", so it can be a program name with args.
6003set dummy windres; ac_word=$2
81ecdfbb
RW
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6005$as_echo_n "checking for $ac_word... " >&6; }
6006if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6007 $as_echo_n "(cached) " >&6
bec39cab
AC
6008else
6009 if test -n "$ac_ct_WINDRES"; then
6010 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6011else
6012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013for as_dir in $PATH
6014do
6015 IFS=$as_save_IFS
6016 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6017 for ac_exec_ext in '' $ac_executable_extensions; do
6018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6019 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6021 break 2
6022 fi
6023done
81ecdfbb
RW
6024 done
6025IFS=$as_save_IFS
bec39cab
AC
6026
6027fi
6028fi
6029ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6030if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6032$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6033else
81ecdfbb
RW
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6035$as_echo "no" >&6; }
c906108c 6036fi
bec39cab 6037
81ecdfbb
RW
6038 if test "x$ac_ct_WINDRES" = x; then
6039 WINDRES=""
6040 else
6041 case $cross_compiling:$ac_tool_warned in
6042yes:)
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6045ac_tool_warned=yes ;;
6046esac
6047 WINDRES=$ac_ct_WINDRES
6048 fi
c906108c 6049else
bec39cab 6050 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6051fi
6052
bec39cab
AC
6053
6054# Needed for GNU/Hurd.
6055if test -n "$ac_tool_prefix"; then
6056 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6057set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6059$as_echo_n "checking for $ac_word... " >&6; }
6060if test "${ac_cv_prog_MIG+set}" = set; then :
6061 $as_echo_n "(cached) " >&6
c906108c 6062else
bec39cab
AC
6063 if test -n "$MIG"; then
6064 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6065else
6066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067for as_dir in $PATH
6068do
6069 IFS=$as_save_IFS
6070 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6071 for ac_exec_ext in '' $ac_executable_extensions; do
6072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6073 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6075 break 2
6076 fi
6077done
81ecdfbb
RW
6078 done
6079IFS=$as_save_IFS
bec39cab 6080
c906108c 6081fi
bec39cab
AC
6082fi
6083MIG=$ac_cv_prog_MIG
6084if test -n "$MIG"; then
81ecdfbb
RW
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6086$as_echo "$MIG" >&6; }
c906108c 6087else
81ecdfbb
RW
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6089$as_echo "no" >&6; }
c906108c
SS
6090fi
6091
81ecdfbb 6092
bec39cab
AC
6093fi
6094if test -z "$ac_cv_prog_MIG"; then
6095 ac_ct_MIG=$MIG
6096 # Extract the first word of "mig", so it can be a program name with args.
6097set dummy mig; ac_word=$2
81ecdfbb
RW
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6101 $as_echo_n "(cached) " >&6
bec39cab
AC
6102else
6103 if test -n "$ac_ct_MIG"; then
6104 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6105else
6106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6111 for ac_exec_ext in '' $ac_executable_extensions; do
6112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6113 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6115 break 2
6116 fi
6117done
81ecdfbb
RW
6118 done
6119IFS=$as_save_IFS
c906108c 6120
bec39cab
AC
6121fi
6122fi
6123ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6124if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6126$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6127else
81ecdfbb
RW
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
bec39cab 6130fi
c906108c 6131
81ecdfbb
RW
6132 if test "x$ac_ct_MIG" = x; then
6133 MIG=""
6134 else
6135 case $cross_compiling:$ac_tool_warned in
6136yes:)
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6139ac_tool_warned=yes ;;
6140esac
6141 MIG=$ac_ct_MIG
6142 fi
bec39cab
AC
6143else
6144 MIG="$ac_cv_prog_MIG"
6145fi
c906108c 6146
c906108c 6147
bec39cab
AC
6148# ---------------------- #
6149# Checks for libraries. #
6150# ---------------------- #
c906108c 6151
bec39cab 6152# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6154$as_echo_n "checking for main in -lm... " >&6; }
6155if test "${ac_cv_lib_m_main+set}" = set; then :
6156 $as_echo_n "(cached) " >&6
bec39cab
AC
6157else
6158 ac_check_lib_save_LIBS=$LIBS
6159LIBS="-lm $LIBS"
81ecdfbb 6160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6161/* end confdefs.h. */
c906108c 6162
c906108c 6163
bec39cab
AC
6164int
6165main ()
6166{
81ecdfbb 6167return main ();
bec39cab
AC
6168 ;
6169 return 0;
6170}
6171_ACEOF
81ecdfbb 6172if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6173 ac_cv_lib_m_main=yes
6174else
81ecdfbb 6175 ac_cv_lib_m_main=no
bec39cab 6176fi
81ecdfbb
RW
6177rm -f core conftest.err conftest.$ac_objext \
6178 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6179LIBS=$ac_check_lib_save_LIBS
6180fi
81ecdfbb
RW
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6182$as_echo "$ac_cv_lib_m_main" >&6; }
6183if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6184 cat >>confdefs.h <<_ACEOF
6185#define HAVE_LIBM 1
6186_ACEOF
6187
6188 LIBS="-lm $LIBS"
c906108c 6189
c906108c 6190fi
bec39cab
AC
6191
6192
6193# We need to link with -lw to get `wctype' on Solaris before Solaris
6194# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6195# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6196# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6197ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6198if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6199
c906108c 6200else
81ecdfbb
RW
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6202$as_echo_n "checking for wctype in -lw... " >&6; }
6203if test "${ac_cv_lib_w_wctype+set}" = set; then :
6204 $as_echo_n "(cached) " >&6
bec39cab
AC
6205else
6206 ac_check_lib_save_LIBS=$LIBS
6207LIBS="-lw $LIBS"
81ecdfbb 6208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6209/* end confdefs.h. */
c906108c 6210
81ecdfbb
RW
6211/* Override any GCC internal prototype to avoid an error.
6212 Use char because int might match the return type of a GCC
6213 builtin and then its argument prototype would still apply. */
bec39cab
AC
6214#ifdef __cplusplus
6215extern "C"
6216#endif
bec39cab
AC
6217char wctype ();
6218int
6219main ()
6220{
81ecdfbb 6221return wctype ();
bec39cab
AC
6222 ;
6223 return 0;
6224}
6225_ACEOF
81ecdfbb 6226if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6227 ac_cv_lib_w_wctype=yes
6228else
81ecdfbb 6229 ac_cv_lib_w_wctype=no
bec39cab 6230fi
81ecdfbb
RW
6231rm -f core conftest.err conftest.$ac_objext \
6232 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6233LIBS=$ac_check_lib_save_LIBS
6234fi
81ecdfbb
RW
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6236$as_echo "$ac_cv_lib_w_wctype" >&6; }
6237if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6238 cat >>confdefs.h <<_ACEOF
6239#define HAVE_LIBW 1
6240_ACEOF
c906108c 6241
bec39cab 6242 LIBS="-lw $LIBS"
c906108c 6243
bec39cab 6244fi
c906108c 6245
bec39cab 6246fi
c906108c 6247
ddc9cd0f 6248
bec39cab 6249# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6251$as_echo_n "checking for library containing gethostbyname... " >&6; }
6252if test "${ac_cv_search_gethostbyname+set}" = set; then :
6253 $as_echo_n "(cached) " >&6
bec39cab
AC
6254else
6255 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6257/* end confdefs.h. */
ddc9cd0f 6258
81ecdfbb
RW
6259/* Override any GCC internal prototype to avoid an error.
6260 Use char because int might match the return type of a GCC
6261 builtin and then its argument prototype would still apply. */
bec39cab
AC
6262#ifdef __cplusplus
6263extern "C"
6264#endif
bec39cab
AC
6265char gethostbyname ();
6266int
6267main ()
6268{
81ecdfbb 6269return gethostbyname ();
bec39cab
AC
6270 ;
6271 return 0;
6272}
6273_ACEOF
81ecdfbb
RW
6274for ac_lib in '' nsl; do
6275 if test -z "$ac_lib"; then
6276 ac_res="none required"
6277 else
6278 ac_res=-l$ac_lib
b4e70030 6279 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6280 fi
6281 if ac_fn_c_try_link "$LINENO"; then :
6282 ac_cv_search_gethostbyname=$ac_res
6283fi
6284rm -f core conftest.err conftest.$ac_objext \
6285 conftest$ac_exeext
6286 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6287 break
6288fi
6289done
6290if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6291
bec39cab 6292else
81ecdfbb 6293 ac_cv_search_gethostbyname=no
bec39cab 6294fi
81ecdfbb 6295rm conftest.$ac_ext
bec39cab
AC
6296LIBS=$ac_func_search_save_LIBS
6297fi
81ecdfbb
RW
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6299$as_echo "$ac_cv_search_gethostbyname" >&6; }
6300ac_res=$ac_cv_search_gethostbyname
6301if test "$ac_res" != no; then :
6302 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6303
bec39cab 6304fi
96baa820 6305
c906108c 6306
b4e70030 6307# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6309$as_echo_n "checking for library containing socketpair... " >&6; }
6310if test "${ac_cv_search_socketpair+set}" = set; then :
6311 $as_echo_n "(cached) " >&6
b4e70030
JB
6312else
6313 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6315/* end confdefs.h. */
6316
81ecdfbb
RW
6317/* Override any GCC internal prototype to avoid an error.
6318 Use char because int might match the return type of a GCC
6319 builtin and then its argument prototype would still apply. */
b4e70030
JB
6320#ifdef __cplusplus
6321extern "C"
6322#endif
b4e70030
JB
6323char socketpair ();
6324int
6325main ()
6326{
81ecdfbb 6327return socketpair ();
b4e70030
JB
6328 ;
6329 return 0;
6330}
6331_ACEOF
81ecdfbb
RW
6332for ac_lib in '' socket; do
6333 if test -z "$ac_lib"; then
6334 ac_res="none required"
6335 else
6336 ac_res=-l$ac_lib
b4e70030 6337 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6338 fi
6339 if ac_fn_c_try_link "$LINENO"; then :
6340 ac_cv_search_socketpair=$ac_res
6341fi
6342rm -f core conftest.err conftest.$ac_objext \
6343 conftest$ac_exeext
6344 if test "${ac_cv_search_socketpair+set}" = set; then :
6345 break
6346fi
6347done
6348if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6349
b4e70030 6350else
81ecdfbb 6351 ac_cv_search_socketpair=no
b4e70030 6352fi
81ecdfbb 6353rm conftest.$ac_ext
b4e70030
JB
6354LIBS=$ac_func_search_save_LIBS
6355fi
81ecdfbb
RW
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6357$as_echo "$ac_cv_search_socketpair" >&6; }
6358ac_res=$ac_cv_search_socketpair
6359if test "$ac_res" != no; then :
6360 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6361
6362fi
6363
6364
233a11ab 6365# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6366
6367 # See if the user specified whether he wants zlib support or not.
6368
6369# Check whether --with-zlib was given.
6370if test "${with_zlib+set}" = set; then :
6371 withval=$with_zlib;
6372else
6373 with_zlib=auto
6374fi
6375
6376
6377 if test "$with_zlib" != "no"; then
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6379$as_echo_n "checking for library containing zlibVersion... " >&6; }
6380if test "${ac_cv_search_zlibVersion+set}" = set; then :
6381 $as_echo_n "(cached) " >&6
233a11ab
CS
6382else
6383 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6385/* end confdefs.h. */
6386
81ecdfbb
RW
6387/* Override any GCC internal prototype to avoid an error.
6388 Use char because int might match the return type of a GCC
233a11ab 6389 builtin and then its argument prototype would still apply. */
233a11ab
CS
6390#ifdef __cplusplus
6391extern "C"
6392#endif
233a11ab
CS
6393char zlibVersion ();
6394int
6395main ()
6396{
81ecdfbb 6397return zlibVersion ();
233a11ab
CS
6398 ;
6399 return 0;
6400}
6401_ACEOF
81ecdfbb
RW
6402for ac_lib in '' z; do
6403 if test -z "$ac_lib"; then
6404 ac_res="none required"
233a11ab 6405 else
81ecdfbb
RW
6406 ac_res=-l$ac_lib
6407 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6408 fi
81ecdfbb
RW
6409 if ac_fn_c_try_link "$LINENO"; then :
6410 ac_cv_search_zlibVersion=$ac_res
233a11ab 6411fi
81ecdfbb
RW
6412rm -f core conftest.err conftest.$ac_objext \
6413 conftest$ac_exeext
6414 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6415 break
233a11ab 6416fi
81ecdfbb
RW
6417done
6418if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6419
233a11ab 6420else
81ecdfbb 6421 ac_cv_search_zlibVersion=no
233a11ab 6422fi
81ecdfbb
RW
6423rm conftest.$ac_ext
6424LIBS=$ac_func_search_save_LIBS
233a11ab 6425fi
81ecdfbb
RW
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6427$as_echo "$ac_cv_search_zlibVersion" >&6; }
6428ac_res=$ac_cv_search_zlibVersion
6429if test "$ac_res" != no; then :
6430 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6431 for ac_header in zlib.h
6432do :
6433 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6434if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6435 cat >>confdefs.h <<_ACEOF
81ecdfbb 6436#define HAVE_ZLIB_H 1
233a11ab
CS
6437_ACEOF
6438
6439fi
6440
6441done
6442
6443fi
6444
b040ad30
JB
6445 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6446 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6447 fi
6448 fi
6449
233a11ab 6450
77f120bf 6451# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6453$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6454if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6455 $as_echo_n "(cached) " >&6
bec39cab
AC
6456else
6457 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6459/* end confdefs.h. */
c906108c 6460
81ecdfbb
RW
6461/* Override any GCC internal prototype to avoid an error.
6462 Use char because int might match the return type of a GCC
6463 builtin and then its argument prototype would still apply. */
bec39cab
AC
6464#ifdef __cplusplus
6465extern "C"
6466#endif
77f120bf 6467char dlgetmodinfo ();
bec39cab
AC
6468int
6469main ()
6470{
81ecdfbb 6471return dlgetmodinfo ();
bec39cab
AC
6472 ;
6473 return 0;
6474}
6475_ACEOF
81ecdfbb
RW
6476for ac_lib in '' dl xpdl; do
6477 if test -z "$ac_lib"; then
6478 ac_res="none required"
6479 else
6480 ac_res=-l$ac_lib
b4e70030 6481 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6482 fi
6483 if ac_fn_c_try_link "$LINENO"; then :
6484 ac_cv_search_dlgetmodinfo=$ac_res
6485fi
6486rm -f core conftest.err conftest.$ac_objext \
6487 conftest$ac_exeext
6488 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6489 break
6490fi
6491done
6492if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6493
4e8d927d 6494else
81ecdfbb 6495 ac_cv_search_dlgetmodinfo=no
1ba607ad 6496fi
81ecdfbb 6497rm conftest.$ac_ext
bec39cab
AC
6498LIBS=$ac_func_search_save_LIBS
6499fi
81ecdfbb
RW
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6501$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6502ac_res=$ac_cv_search_dlgetmodinfo
6503if test "$ac_res" != no; then :
6504 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6505
8bb2c122 6506fi
8bb2c122 6507
8bb2c122 6508
77f120bf 6509
77f120bf 6510
6c7a06a3 6511
81ecdfbb
RW
6512# Check whether --with-libiconv-prefix was given.
6513if test "${with_libiconv_prefix+set}" = set; then :
6514 withval=$with_libiconv_prefix;
6c7a06a3 6515 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6516 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6517 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6518 done
6519
81ecdfbb
RW
6520fi
6521
6c7a06a3 6522
f18c4681 6523 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6524 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6525
81ecdfbb
RW
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6527$as_echo_n "checking for iconv... " >&6; }
6528if test "${am_cv_func_iconv+set}" = set; then :
6529 $as_echo_n "(cached) " >&6
d542061a 6530else
6c7a06a3
TT
6531
6532 am_cv_func_iconv="no, consider installing GNU libiconv"
6533 am_cv_lib_iconv=no
6534 am_cv_use_build_libiconv=no
f0f20949 6535 am_cv_build_libiconv_path=
4edb1e84
JB
6536
6537 # If libiconv is part of the build tree, then try using it over
6538 # any system iconv.
6539 if test -d ../libiconv; then
f18c4681
JB
6540 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6541 am_save_LIBS="$LIBS"
6542 am_save_CPPFLAGS="$CPPFLAGS"
6543 LIBS="$LIBS $lib_dir/libiconv.a"
6544 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6546/* end confdefs.h. */
6c7a06a3
TT
6547#include <stdlib.h>
6548#include <iconv.h>
d542061a
UW
6549int
6550main ()
6551{
6c7a06a3 6552iconv_t cd = iconv_open("","");
f18c4681
JB
6553 iconv(cd,NULL,NULL,NULL,NULL);
6554 iconv_close(cd);
d542061a
UW
6555 ;
6556 return 0;
6557}
6558_ACEOF
81ecdfbb 6559if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6560 am_cv_use_build_libiconv=yes
f0f20949 6561 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6562 am_cv_lib_iconv=yes
6563 am_cv_func_iconv=yes
d542061a 6564fi
81ecdfbb
RW
6565rm -f core conftest.err conftest.$ac_objext \
6566 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6567 LIBS="$am_save_LIBS"
6568 CPPFLAGS="$am_save_CPPFLAGS"
6569 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6570 break
6571 fi
6572 done
4edb1e84 6573 fi
94ae1714 6574
4edb1e84 6575 # Next, try to find iconv in libc.
6c7a06a3 6576 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6578/* end confdefs.h. */
6c7a06a3
TT
6579#include <stdlib.h>
6580#include <iconv.h>
d542061a
UW
6581int
6582main ()
6583{
6c7a06a3
TT
6584iconv_t cd = iconv_open("","");
6585 iconv(cd,NULL,NULL,NULL,NULL);
6586 iconv_close(cd);
d542061a
UW
6587 ;
6588 return 0;
6589}
6590_ACEOF
81ecdfbb 6591if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6592 am_cv_func_iconv=yes
d542061a 6593fi
81ecdfbb
RW
6594rm -f core conftest.err conftest.$ac_objext \
6595 conftest$ac_exeext conftest.$ac_ext
77f120bf 6596 fi
94ae1714 6597
4edb1e84
JB
6598 # If iconv was not in libc, try -liconv. In this case, arrange to
6599 # look in the libiconv prefix, if it was specified by the user.
6600 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6601 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6602 am_save_LIBS="$LIBS"
6603 if test -n "$LIBICONV_INCLUDE"; then
6604 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6605 LIBS="$LIBS $LIBICONV_LIBDIR"
6606 fi
6607 LIBS="$LIBS -liconv"
81ecdfbb 6608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6609/* end confdefs.h. */
6c7a06a3
TT
6610#include <stdlib.h>
6611#include <iconv.h>
bec39cab
AC
6612int
6613main ()
6614{
6c7a06a3
TT
6615iconv_t cd = iconv_open("","");
6616 iconv(cd,NULL,NULL,NULL,NULL);
6617 iconv_close(cd);
bec39cab
AC
6618 ;
6619 return 0;
6620}
6621_ACEOF
81ecdfbb 6622if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6623 am_cv_lib_iconv=yes
6c7a06a3 6624 am_cv_func_iconv=yes
627af7ea 6625fi
81ecdfbb
RW
6626rm -f core conftest.err conftest.$ac_objext \
6627 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6628 LIBS="$am_save_LIBS"
fc3b640d 6629 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6630 fi
6631
6632fi
81ecdfbb
RW
6633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6634$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6635
6636 # Set the various flags based on the cache variables. We can't rely
6637 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6638 LIBICONV=
6639 if test "$am_cv_lib_iconv" = yes; then
6640 LIBICONV="-liconv"
94ae1714
TT
6641 else
6642 LIBICONV_LIBDIR=
6643 LIBICONV_INCLUDE=
fc3b640d
TT
6644 fi
6645 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6646 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6647 LIBICONV_LIBDIR=""
fc3b640d
TT
6648 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6649 fi
6650 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6651 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6652
6c7a06a3
TT
6653 if test "$am_cv_func_iconv" = yes; then
6654
81ecdfbb 6655$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6656
81ecdfbb
RW
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6658$as_echo_n "checking for iconv declaration... " >&6; }
6659 if test "${am_cv_proto_iconv+set}" = set; then :
6660 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6661else
6662
81ecdfbb 6663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6664/* end confdefs.h. */
6665
6c7a06a3
TT
6666#include <stdlib.h>
6667#include <iconv.h>
6668extern
b4e70030 6669#ifdef __cplusplus
6c7a06a3 6670"C"
b4e70030 6671#endif
6c7a06a3
TT
6672#if defined(__STDC__) || defined(__cplusplus)
6673size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6674#else
6675size_t iconv();
6676#endif
6677
b4e70030
JB
6678int
6679main ()
6680{
6c7a06a3 6681
b4e70030
JB
6682 ;
6683 return 0;
6684}
6685_ACEOF
81ecdfbb 6686if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6687 am_cv_proto_iconv_arg1=""
4e8d927d 6688else
81ecdfbb 6689 am_cv_proto_iconv_arg1="const"
b4e70030 6690fi
81ecdfbb 6691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6692 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);"
6693fi
6694
6695 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6697 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6698$as_echo "${ac_t:-
6699 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6700
6701cat >>confdefs.h <<_ACEOF
6702#define ICONV_CONST $am_cv_proto_iconv_arg1
6703_ACEOF
6704
6705 fi
6c7a06a3
TT
6706
6707
478aac75
DE
6708# GDB may fork/exec the iconv program to get the list of supported character
6709# sets. Allow the user to specify where to find it.
6710# There are several factors affecting the choice of option name:
6711# - There is already --with-libiconv-prefix but we can't use it, it specifies
6712# the build-time location of libiconv files.
6713# - The program we need to find is iconv, which comes with glibc. The user
6714# doesn't necessarily have libiconv installed. Therefore naming this
6715# --with-libiconv-foo feels wrong.
6716# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6717# defined to work on directories not files (though it really doesn't know
6718# the difference).
6719# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6720# with --with-libiconv-prefix.
6721# Putting these together is why the option name is --with-iconv-bin.
6722
6723
6724# Check whether --with-iconv-bin was given.
6725if test "${with_iconv_bin+set}" = set; then :
6726 withval=$with_iconv_bin; iconv_bin="${withval}"
6727
6728cat >>confdefs.h <<_ACEOF
6729#define ICONV_BIN "${iconv_bin}"
6730_ACEOF
6731
6732
6733 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6734 if test "x$prefix" = xNONE; then
6735 test_prefix=/usr/local
6736 else
6737 test_prefix=$prefix
6738 fi
6739 else
6740 test_prefix=$exec_prefix
6741 fi
6742 value=0
6743 case ${iconv_bin} in
6744 "${test_prefix}"|"${test_prefix}/"*|\
6745 '${exec_prefix}'|'${exec_prefix}/'*)
6746 value=1
6747 ;;
6748 esac
6749
6750cat >>confdefs.h <<_ACEOF
6751#define ICONV_BIN_RELOCATABLE $value
6752_ACEOF
6753
6754
6755
6756fi
6757
6758
6c7a06a3
TT
6759# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6760# There is a very specific comment in /usr/include/curses.h explaining that
6761# termcap routines built into libcurses must not be used.
6762#
6763# The symptoms we observed so far is GDB unexpectedly changing
6764# the terminal settings when tgetent is called - this is particularly
6765# visible as the output is missing carriage returns, and so rapidly
6766# becomes very hard to read.
6767#
6768# The readline configure script has already decided that libtermcap
6769# was enough for its purposes, and so decided to build readline using
6770# libtermcap. Since the TUI mode requires curses, building GDB with
6771# TUI enabled results in both libraries to be used at the same time,
6772# which is not allowed. This basically means that GDB with TUI is
6773# broken on alpha-osf.
6774
6775case $host_os in
6bcc772d
RO
6776 osf* )
6777 if test x"$enable_tui" = xyes; then
81ecdfbb 6778 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6779 fi
6bcc772d 6780 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6781 enable_tui=no
6782 fi
6783 ;;
6784esac
6785
cb01cfba 6786# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6787if test x"$enable_tui" != xno; then
cb01cfba
JB
6788 prefer_curses=yes
6789fi
6790
6791curses_found=no
6792if test x"$prefer_curses" = xyes; then
6793 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6794 # curses library because the latter might not provide all the
6795 # functionality we need. However, this leads to problems on systems
6796 # where the linker searches /usr/local/lib, but the compiler doesn't
6797 # search /usr/local/include, if ncurses is installed in /usr/local. A
6798 # default installation of ncurses on alpha*-dec-osf* will lead to such
6799 # a situation.
81ecdfbb
RW
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6801$as_echo_n "checking for library containing waddstr... " >&6; }
6802if test "${ac_cv_search_waddstr+set}" = set; then :
6803 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6804else
6805 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6807/* end confdefs.h. */
6808
81ecdfbb
RW
6809/* Override any GCC internal prototype to avoid an error.
6810 Use char because int might match the return type of a GCC
6811 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6812#ifdef __cplusplus
6813extern "C"
6814#endif
6c7a06a3
TT
6815char waddstr ();
6816int
6817main ()
6818{
81ecdfbb 6819return waddstr ();
6c7a06a3
TT
6820 ;
6821 return 0;
6822}
6823_ACEOF
81ecdfbb
RW
6824for ac_lib in '' ncurses cursesX curses; do
6825 if test -z "$ac_lib"; then
6826 ac_res="none required"
6827 else
6828 ac_res=-l$ac_lib
6829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6830 fi
6831 if ac_fn_c_try_link "$LINENO"; then :
6832 ac_cv_search_waddstr=$ac_res
6833fi
6834rm -f core conftest.err conftest.$ac_objext \
6835 conftest$ac_exeext
6836 if test "${ac_cv_search_waddstr+set}" = set; then :
6837 break
6838fi
6839done
6840if test "${ac_cv_search_waddstr+set}" = set; then :
6841
6c7a06a3 6842else
81ecdfbb
RW
6843 ac_cv_search_waddstr=no
6844fi
6845rm conftest.$ac_ext
6846LIBS=$ac_func_search_save_LIBS
6847fi
6848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6849$as_echo "$ac_cv_search_waddstr" >&6; }
6850ac_res=$ac_cv_search_waddstr
6851if test "$ac_res" != no; then :
6852 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6853
6854fi
6855
6856
cb01cfba
JB
6857 if test "$ac_cv_search_waddstr" != no; then
6858 curses_found=yes
6859 fi
6860fi
6861
6862# Check whether we should enable the TUI, but only do so if we really
6863# can.
6864if test x"$enable_tui" != xno; then
6865 if test -d $srcdir/tui; then
6866 if test "$curses_found" != no; then
6c7a06a3
TT
6867 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6868 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6869 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6870 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6871 else
6872 if test x"$enable_tui" = xyes; then
81ecdfbb 6873 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6874 else
81ecdfbb
RW
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6876$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6877 fi
6878 fi
6879 fi
6880fi
6881
6882# Since GDB uses Readline, we need termcap functionality. In many
6883# cases this will be provided by the curses library, but some systems
6884# have a seperate termcap library, or no curses library at all.
6885
6886case $host_os in
6887 cygwin*)
6888 if test -d $srcdir/libtermcap; then
6889 LIBS="../libtermcap/libtermcap.a $LIBS"
6890 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6891 fi ;;
6892 go32* | *djgpp*)
6893 ac_cv_search_tgetent="none required"
6894 ;;
6895 *mingw32*)
6896 ac_cv_search_tgetent="none required"
6897 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6898 ;;
6899esac
6900
6901# These are the libraries checked by Readline.
81ecdfbb
RW
6902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6903$as_echo_n "checking for library containing tgetent... " >&6; }
6904if test "${ac_cv_search_tgetent+set}" = set; then :
6905 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6906else
6907 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6909/* end confdefs.h. */
6910
81ecdfbb
RW
6911/* Override any GCC internal prototype to avoid an error.
6912 Use char because int might match the return type of a GCC
6913 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6914#ifdef __cplusplus
6915extern "C"
6916#endif
6c7a06a3
TT
6917char tgetent ();
6918int
6919main ()
6920{
81ecdfbb 6921return tgetent ();
6c7a06a3
TT
6922 ;
6923 return 0;
6924}
6925_ACEOF
81ecdfbb
RW
6926for ac_lib in '' termcap tinfo curses ncurses; do
6927 if test -z "$ac_lib"; then
6928 ac_res="none required"
6929 else
6930 ac_res=-l$ac_lib
6c7a06a3 6931 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6932 fi
6933 if ac_fn_c_try_link "$LINENO"; then :
6934 ac_cv_search_tgetent=$ac_res
6935fi
6936rm -f core conftest.err conftest.$ac_objext \
6937 conftest$ac_exeext
6938 if test "${ac_cv_search_tgetent+set}" = set; then :
6939 break
6940fi
6941done
6942if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 6943
6c7a06a3 6944else
81ecdfbb 6945 ac_cv_search_tgetent=no
6c7a06a3 6946fi
81ecdfbb 6947rm conftest.$ac_ext
6c7a06a3
TT
6948LIBS=$ac_func_search_save_LIBS
6949fi
81ecdfbb
RW
6950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
6951$as_echo "$ac_cv_search_tgetent" >&6; }
6952ac_res=$ac_cv_search_tgetent
6953if test "$ac_res" != no; then :
6954 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 6955
06825bd1
MK
6956fi
6957
06825bd1 6958
bec39cab 6959if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 6960 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
6961fi
6962
3841debe 6963
81ecdfbb
RW
6964# Check whether --with-system-readline was given.
6965if test "${with_system_readline+set}" = set; then :
6966 withval=$with_system_readline;
6967fi
6a30b0a5 6968
6a30b0a5
AS
6969
6970if test "$with_system_readline" = yes; then
6971 READLINE=-lreadline
6972 READLINE_DEPS=
6973 READLINE_CFLAGS=
39037522 6974 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
6975else
6976 READLINE='$(READLINE_DIR)/libreadline.a'
6977 READLINE_DEPS='$(READLINE)'
6978 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 6979 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
6980fi
6981
6982
6983
6984
6985
f997c383
SD
6986# Generate jit-reader.h
6987
6988# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
6989TARGET_PTR=
6990
6991# The cast to long int works around a bug in the HP C Compiler
6992# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6993# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6994# This bug is HP SR number 8606223364.
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
6996$as_echo_n "checking size of unsigned long long... " >&6; }
6997if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
6998 $as_echo_n "(cached) " >&6
6999else
7000 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7001
7002else
7003 if test "$ac_cv_type_unsigned_long_long" = yes; then
7004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7006{ as_fn_set_status 77
7007as_fn_error "cannot compute sizeof (unsigned long long)
7008See \`config.log' for more details." "$LINENO" 5; }; }
7009 else
7010 ac_cv_sizeof_unsigned_long_long=0
7011 fi
7012fi
7013
7014fi
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7016$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7017
7018
7019
7020cat >>confdefs.h <<_ACEOF
7021#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7022_ACEOF
7023
7024
7025# The cast to long int works around a bug in the HP C Compiler
7026# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7027# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7028# This bug is HP SR number 8606223364.
7029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7030$as_echo_n "checking size of unsigned long... " >&6; }
7031if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7032 $as_echo_n "(cached) " >&6
7033else
7034 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7035
7036else
7037 if test "$ac_cv_type_unsigned_long" = yes; then
7038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7040{ as_fn_set_status 77
7041as_fn_error "cannot compute sizeof (unsigned long)
7042See \`config.log' for more details." "$LINENO" 5; }; }
7043 else
7044 ac_cv_sizeof_unsigned_long=0
7045 fi
7046fi
7047
7048fi
7049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7050$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7051
7052
7053
7054cat >>confdefs.h <<_ACEOF
7055#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7056_ACEOF
7057
7058
7059# The cast to long int works around a bug in the HP C Compiler
7060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7062# This bug is HP SR number 8606223364.
7063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7064$as_echo_n "checking size of unsigned __int128... " >&6; }
7065if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7066 $as_echo_n "(cached) " >&6
7067else
7068 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7069
7070else
7071 if test "$ac_cv_type_unsigned___int128" = yes; then
7072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7074{ as_fn_set_status 77
7075as_fn_error "cannot compute sizeof (unsigned __int128)
7076See \`config.log' for more details." "$LINENO" 5; }; }
7077 else
7078 ac_cv_sizeof_unsigned___int128=0
7079 fi
7080fi
7081
7082fi
7083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7084$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7085
7086
7087
7088cat >>confdefs.h <<_ACEOF
7089#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7090_ACEOF
7091
7092
7093
7094if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7095 TARGET_PTR="unsigned long"
7096elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7097 TARGET_PTR="unsigned long long"
7098elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7099 TARGET_PTR="unsigned __int128"
7100else
7101 TARGET_PTR="unsigned long"
7102fi
7103
7104
7105ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7106
7107
a2d08b9e
SD
7108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7109$as_echo_n "checking for library containing dlopen... " >&6; }
7110if test "${ac_cv_search_dlopen+set}" = set; then :
7111 $as_echo_n "(cached) " >&6
7112else
7113 ac_func_search_save_LIBS=$LIBS
7114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117/* Override any GCC internal prototype to avoid an error.
7118 Use char because int might match the return type of a GCC
7119 builtin and then its argument prototype would still apply. */
7120#ifdef __cplusplus
7121extern "C"
7122#endif
7123char dlopen ();
7124int
7125main ()
7126{
7127return dlopen ();
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132for ac_lib in '' dl; do
7133 if test -z "$ac_lib"; then
7134 ac_res="none required"
7135 else
7136 ac_res=-l$ac_lib
7137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7138 fi
7139 if ac_fn_c_try_link "$LINENO"; then :
7140 ac_cv_search_dlopen=$ac_res
7141fi
7142rm -f core conftest.err conftest.$ac_objext \
7143 conftest$ac_exeext
7144 if test "${ac_cv_search_dlopen+set}" = set; then :
7145 break
7146fi
7147done
7148if test "${ac_cv_search_dlopen+set}" = set; then :
7149
7150else
7151 ac_cv_search_dlopen=no
7152fi
7153rm conftest.$ac_ext
7154LIBS=$ac_func_search_save_LIBS
7155fi
7156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7157$as_echo "$ac_cv_search_dlopen" >&6; }
7158ac_res=$ac_cv_search_dlopen
7159if test "$ac_res" != no; then :
7160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7161
7162fi
7163
7164
39037522 7165
b8e0a31c
SD
7166
7167# Check whether --with-jit-reader-dir was given.
7168if test "${with_jit_reader_dir+set}" = set; then :
7169 withval=$with_jit_reader_dir;
7170 JIT_READER_DIR=$withval
7171else
7172 JIT_READER_DIR=${libdir}/gdb
7173fi
7174
7175
7176 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7177 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7178 ac_define_dir=`eval echo $JIT_READER_DIR`
7179 ac_define_dir=`eval echo $ac_define_dir`
7180
7181cat >>confdefs.h <<_ACEOF
7182#define JIT_READER_DIR "$ac_define_dir"
7183_ACEOF
7184
7185
7186
7187
7188 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7189 if test "x$prefix" = xNONE; then
7190 test_prefix=/usr/local
7191 else
7192 test_prefix=$prefix
7193 fi
7194 else
7195 test_prefix=$exec_prefix
7196 fi
7197 value=0
7198 case ${ac_define_dir} in
7199 "${test_prefix}"|"${test_prefix}/"*|\
7200 '${exec_prefix}'|'${exec_prefix}/'*)
7201 value=1
7202 ;;
7203 esac
7204
7205cat >>confdefs.h <<_ACEOF
7206#define JIT_READER_DIR_RELOCATABLE $value
7207_ACEOF
7208
7209
7210
7211
7212
81ecdfbb
RW
7213# Check whether --with-expat was given.
7214if test "${with_expat+set}" = set; then :
7215 withval=$with_expat;
5c39566f
DJ
7216else
7217 with_expat=auto
81ecdfbb
RW
7218fi
7219
7220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7221$as_echo_n "checking whether to use expat... " >&6; }
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7223$as_echo "$with_expat" >&6; }
5c39566f
DJ
7224
7225if test "${with_expat}" = no; then
81ecdfbb
RW
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7227$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7228 HAVE_LIBEXPAT=no
7229else
7230
3841debe
DJ
7231 if test "X$prefix" = "XNONE"; then
7232 acl_final_prefix="$ac_default_prefix"
7233 else
7234 acl_final_prefix="$prefix"
7235 fi
7236 if test "X$exec_prefix" = "XNONE"; then
7237 acl_final_exec_prefix='${prefix}'
7238 else
7239 acl_final_exec_prefix="$exec_prefix"
7240 fi
7241 acl_save_prefix="$prefix"
7242 prefix="$acl_final_prefix"
7243 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7244 prefix="$acl_save_prefix"
7245
7246
81ecdfbb
RW
7247# Check whether --with-gnu-ld was given.
7248if test "${with_gnu_ld+set}" = set; then :
7249 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7250else
7251 with_gnu_ld=no
81ecdfbb
RW
7252fi
7253
3841debe
DJ
7254# Prepare PATH_SEPARATOR.
7255# The user is always right.
7256if test "${PATH_SEPARATOR+set}" != set; then
7257 echo "#! /bin/sh" >conf$$.sh
7258 echo "exit 0" >>conf$$.sh
7259 chmod +x conf$$.sh
7260 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7261 PATH_SEPARATOR=';'
7262 else
7263 PATH_SEPARATOR=:
7264 fi
7265 rm -f conf$$.sh
7266fi
7267ac_prog=ld
7268if test "$GCC" = yes; then
7269 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7271$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7272 case $host in
7273 *-*-mingw*)
7274 # gcc leaves a trailing carriage return which upsets mingw
7275 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7276 *)
7277 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7278 esac
7279 case $ac_prog in
7280 # Accept absolute paths.
7281 [\\/]* | [A-Za-z]:[\\/]*)
7282 re_direlt='/[^/][^/]*/\.\./'
7283 # Canonicalize the path of ld
7284 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7285 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7286 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7287 done
7288 test -z "$LD" && LD="$ac_prog"
7289 ;;
7290 "")
7291 # If it fails, then pretend we aren't using GCC.
7292 ac_prog=ld
7293 ;;
7294 *)
7295 # If it is relative, then search for the first ld in PATH.
7296 with_gnu_ld=unknown
7297 ;;
7298 esac
7299elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7301$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7302else
81ecdfbb
RW
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7304$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7305fi
81ecdfbb
RW
7306if test "${acl_cv_path_LD+set}" = set; then :
7307 $as_echo_n "(cached) " >&6
3841debe
DJ
7308else
7309 if test -z "$LD"; then
7310 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7311 for ac_dir in $PATH; do
7312 test -z "$ac_dir" && ac_dir=.
7313 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7314 acl_cv_path_LD="$ac_dir/$ac_prog"
7315 # Check to see if the program is GNU ld. I'd rather use --version,
7316 # but apparently some GNU ld's only accept -v.
7317 # Break only if it was the GNU/non-GNU ld that we prefer.
7318 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7319 test "$with_gnu_ld" != no && break
7320 else
7321 test "$with_gnu_ld" != yes && break
7322 fi
7323 fi
7324 done
7325 IFS="$ac_save_ifs"
7326else
7327 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7328fi
7329fi
7330
7331LD="$acl_cv_path_LD"
7332if test -n "$LD"; then
81ecdfbb
RW
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7334$as_echo "$LD" >&6; }
3841debe 7335else
81ecdfbb
RW
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337$as_echo "no" >&6; }
3841debe 7338fi
81ecdfbb
RW
7339test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7341$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7342if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7343 $as_echo_n "(cached) " >&6
3841debe
DJ
7344else
7345 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7346if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7347 acl_cv_prog_gnu_ld=yes
7348else
7349 acl_cv_prog_gnu_ld=no
7350fi
7351fi
81ecdfbb
RW
7352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7353$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7354with_gnu_ld=$acl_cv_prog_gnu_ld
7355
7356
7357
81ecdfbb
RW
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7359$as_echo_n "checking for shared library run path origin... " >&6; }
7360if test "${acl_cv_rpath+set}" = set; then :
7361 $as_echo_n "(cached) " >&6
3841debe
DJ
7362else
7363
7364 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7365 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7366 . ./conftest.sh
7367 rm -f ./conftest.sh
7368 acl_cv_rpath=done
7369
7370fi
81ecdfbb
RW
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7372$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7373 wl="$acl_cv_wl"
7374 libext="$acl_cv_libext"
7375 shlibext="$acl_cv_shlibext"
7376 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7377 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7378 hardcode_direct="$acl_cv_hardcode_direct"
7379 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7380 # Check whether --enable-rpath was given.
7381if test "${enable_rpath+set}" = set; then :
7382 enableval=$enable_rpath; :
3841debe
DJ
7383else
7384 enable_rpath=yes
81ecdfbb
RW
7385fi
7386
3841debe
DJ
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396 use_additional=yes
7397
7398 acl_save_prefix="$prefix"
7399 prefix="$acl_final_prefix"
7400 acl_save_exec_prefix="$exec_prefix"
7401 exec_prefix="$acl_final_exec_prefix"
7402
7403 eval additional_includedir=\"$includedir\"
7404 eval additional_libdir=\"$libdir\"
7405
7406 exec_prefix="$acl_save_exec_prefix"
7407 prefix="$acl_save_prefix"
7408
7409
81ecdfbb
RW
7410# Check whether --with-libexpat-prefix was given.
7411if test "${with_libexpat_prefix+set}" = set; then :
7412 withval=$with_libexpat_prefix;
3841debe
DJ
7413 if test "X$withval" = "Xno"; then
7414 use_additional=no
7415 else
7416 if test "X$withval" = "X"; then
7417
7418 acl_save_prefix="$prefix"
7419 prefix="$acl_final_prefix"
7420 acl_save_exec_prefix="$exec_prefix"
7421 exec_prefix="$acl_final_exec_prefix"
7422
7423 eval additional_includedir=\"$includedir\"
7424 eval additional_libdir=\"$libdir\"
7425
7426 exec_prefix="$acl_save_exec_prefix"
7427 prefix="$acl_save_prefix"
7428
7429 else
7430 additional_includedir="$withval/include"
7431 additional_libdir="$withval/lib"
7432 fi
7433 fi
7434
81ecdfbb
RW
7435fi
7436
3841debe
DJ
7437 LIBEXPAT=
7438 LTLIBEXPAT=
7439 INCEXPAT=
7440 rpathdirs=
7441 ltrpathdirs=
7442 names_already_handled=
7443 names_next_round='expat '
7444 while test -n "$names_next_round"; do
7445 names_this_round="$names_next_round"
7446 names_next_round=
7447 for name in $names_this_round; do
7448 already_handled=
7449 for n in $names_already_handled; do
7450 if test "$n" = "$name"; then
7451 already_handled=yes
7452 break
7453 fi
7454 done
7455 if test -z "$already_handled"; then
7456 names_already_handled="$names_already_handled $name"
7457 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7458 eval value=\"\$HAVE_LIB$uppername\"
7459 if test -n "$value"; then
7460 if test "$value" = yes; then
7461 eval value=\"\$LIB$uppername\"
7462 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7463 eval value=\"\$LTLIB$uppername\"
7464 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7465 else
7466 :
7467 fi
7468 else
7469 found_dir=
7470 found_la=
7471 found_so=
7472 found_a=
7473 if test $use_additional = yes; then
7474 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7475 found_dir="$additional_libdir"
7476 found_so="$additional_libdir/lib$name.$shlibext"
7477 if test -f "$additional_libdir/lib$name.la"; then
7478 found_la="$additional_libdir/lib$name.la"
7479 fi
7480 else
7481 if test -f "$additional_libdir/lib$name.$libext"; then
7482 found_dir="$additional_libdir"
7483 found_a="$additional_libdir/lib$name.$libext"
7484 if test -f "$additional_libdir/lib$name.la"; then
7485 found_la="$additional_libdir/lib$name.la"
7486 fi
7487 fi
7488 fi
7489 fi
7490 if test "X$found_dir" = "X"; then
7491 for x in $LDFLAGS $LTLIBEXPAT; do
7492
7493 acl_save_prefix="$prefix"
7494 prefix="$acl_final_prefix"
7495 acl_save_exec_prefix="$exec_prefix"
7496 exec_prefix="$acl_final_exec_prefix"
7497 eval x=\"$x\"
7498 exec_prefix="$acl_save_exec_prefix"
7499 prefix="$acl_save_prefix"
7500
7501 case "$x" in
7502 -L*)
7503 dir=`echo "X$x" | sed -e 's/^X-L//'`
7504 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7505 found_dir="$dir"
7506 found_so="$dir/lib$name.$shlibext"
7507 if test -f "$dir/lib$name.la"; then
7508 found_la="$dir/lib$name.la"
7509 fi
7510 else
7511 if test -f "$dir/lib$name.$libext"; then
7512 found_dir="$dir"
7513 found_a="$dir/lib$name.$libext"
7514 if test -f "$dir/lib$name.la"; then
7515 found_la="$dir/lib$name.la"
7516 fi
7517 fi
7518 fi
7519 ;;
7520 esac
7521 if test "X$found_dir" != "X"; then
7522 break
7523 fi
7524 done
7525 fi
7526 if test "X$found_dir" != "X"; then
7527 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7528 if test "X$found_so" != "X"; then
7529 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7530 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7531 else
7532 haveit=
7533 for x in $ltrpathdirs; do
7534 if test "X$x" = "X$found_dir"; then
7535 haveit=yes
7536 break
7537 fi
7538 done
7539 if test -z "$haveit"; then
7540 ltrpathdirs="$ltrpathdirs $found_dir"
7541 fi
7542 if test "$hardcode_direct" = yes; then
7543 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7544 else
7545 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7546 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7547 haveit=
7548 for x in $rpathdirs; do
7549 if test "X$x" = "X$found_dir"; then
7550 haveit=yes
7551 break
7552 fi
7553 done
7554 if test -z "$haveit"; then
7555 rpathdirs="$rpathdirs $found_dir"
7556 fi
7557 else
7558 haveit=
7559 for x in $LDFLAGS $LIBEXPAT; do
7560
7561 acl_save_prefix="$prefix"
7562 prefix="$acl_final_prefix"
7563 acl_save_exec_prefix="$exec_prefix"
7564 exec_prefix="$acl_final_exec_prefix"
7565 eval x=\"$x\"
7566 exec_prefix="$acl_save_exec_prefix"
7567 prefix="$acl_save_prefix"
7568
7569 if test "X$x" = "X-L$found_dir"; then
7570 haveit=yes
7571 break
7572 fi
7573 done
7574 if test -z "$haveit"; then
7575 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7576 fi
7577 if test "$hardcode_minus_L" != no; then
7578 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7579 else
7580 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7581 fi
7582 fi
7583 fi
7584 fi
7585 else
7586 if test "X$found_a" != "X"; then
7587 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7588 else
7589 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7590 fi
7591 fi
7592 additional_includedir=
7593 case "$found_dir" in
7594 */lib | */lib/)
7595 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7596 additional_includedir="$basedir/include"
7597 ;;
7598 esac
7599 if test "X$additional_includedir" != "X"; then
7600 if test "X$additional_includedir" != "X/usr/include"; then
7601 haveit=
7602 if test "X$additional_includedir" = "X/usr/local/include"; then
7603 if test -n "$GCC"; then
7604 case $host_os in
7605 linux*) haveit=yes;;
7606 esac
7607 fi
7608 fi
7609 if test -z "$haveit"; then
7610 for x in $CPPFLAGS $INCEXPAT; do
7611
7612 acl_save_prefix="$prefix"
7613 prefix="$acl_final_prefix"
7614 acl_save_exec_prefix="$exec_prefix"
7615 exec_prefix="$acl_final_exec_prefix"
7616 eval x=\"$x\"
7617 exec_prefix="$acl_save_exec_prefix"
7618 prefix="$acl_save_prefix"
7619
7620 if test "X$x" = "X-I$additional_includedir"; then
7621 haveit=yes
7622 break
7623 fi
7624 done
7625 if test -z "$haveit"; then
7626 if test -d "$additional_includedir"; then
7627 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7628 fi
7629 fi
7630 fi
7631 fi
7632 fi
7633 if test -n "$found_la"; then
7634 save_libdir="$libdir"
7635 case "$found_la" in
7636 */* | *\\*) . "$found_la" ;;
7637 *) . "./$found_la" ;;
7638 esac
7639 libdir="$save_libdir"
7640 for dep in $dependency_libs; do
7641 case "$dep" in
7642 -L*)
7643 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7644 if test "X$additional_libdir" != "X/usr/lib"; then
7645 haveit=
7646 if test "X$additional_libdir" = "X/usr/local/lib"; then
7647 if test -n "$GCC"; then
7648 case $host_os in
7649 linux*) haveit=yes;;
7650 esac
7651 fi
7652 fi
7653 if test -z "$haveit"; then
7654 haveit=
7655 for x in $LDFLAGS $LIBEXPAT; do
7656
7657 acl_save_prefix="$prefix"
7658 prefix="$acl_final_prefix"
7659 acl_save_exec_prefix="$exec_prefix"
7660 exec_prefix="$acl_final_exec_prefix"
7661 eval x=\"$x\"
7662 exec_prefix="$acl_save_exec_prefix"
7663 prefix="$acl_save_prefix"
7664
7665 if test "X$x" = "X-L$additional_libdir"; then
7666 haveit=yes
7667 break
7668 fi
7669 done
7670 if test -z "$haveit"; then
7671 if test -d "$additional_libdir"; then
7672 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7673 fi
7674 fi
7675 haveit=
7676 for x in $LDFLAGS $LTLIBEXPAT; do
7677
7678 acl_save_prefix="$prefix"
7679 prefix="$acl_final_prefix"
7680 acl_save_exec_prefix="$exec_prefix"
7681 exec_prefix="$acl_final_exec_prefix"
7682 eval x=\"$x\"
7683 exec_prefix="$acl_save_exec_prefix"
7684 prefix="$acl_save_prefix"
7685
7686 if test "X$x" = "X-L$additional_libdir"; then
7687 haveit=yes
7688 break
7689 fi
7690 done
7691 if test -z "$haveit"; then
7692 if test -d "$additional_libdir"; then
7693 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7694 fi
7695 fi
7696 fi
7697 fi
7698 ;;
7699 -R*)
7700 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7701 if test "$enable_rpath" != no; then
7702 haveit=
7703 for x in $rpathdirs; do
7704 if test "X$x" = "X$dir"; then
7705 haveit=yes
7706 break
7707 fi
7708 done
7709 if test -z "$haveit"; then
7710 rpathdirs="$rpathdirs $dir"
7711 fi
7712 haveit=
7713 for x in $ltrpathdirs; do
7714 if test "X$x" = "X$dir"; then
7715 haveit=yes
7716 break
7717 fi
7718 done
7719 if test -z "$haveit"; then
7720 ltrpathdirs="$ltrpathdirs $dir"
7721 fi
7722 fi
7723 ;;
7724 -l*)
7725 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7726 ;;
7727 *.la)
7728 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7729 ;;
7730 *)
7731 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7732 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7733 ;;
81ecdfbb
RW
7734 esac
7735 done
7736 fi
7737 else
7738 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7739 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7740 fi
7741 fi
7742 fi
7743 done
7744 done
7745 if test "X$rpathdirs" != "X"; then
7746 if test -n "$hardcode_libdir_separator"; then
7747 alldirs=
7748 for found_dir in $rpathdirs; do
7749 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7750 done
7751 acl_save_libdir="$libdir"
7752 libdir="$alldirs"
7753 eval flag=\"$hardcode_libdir_flag_spec\"
7754 libdir="$acl_save_libdir"
7755 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7756 else
7757 for found_dir in $rpathdirs; do
7758 acl_save_libdir="$libdir"
7759 libdir="$found_dir"
7760 eval flag=\"$hardcode_libdir_flag_spec\"
7761 libdir="$acl_save_libdir"
7762 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7763 done
7764 fi
7765 fi
7766 if test "X$ltrpathdirs" != "X"; then
7767 for found_dir in $ltrpathdirs; do
7768 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7769 done
7770 fi
a9322a30
TT
7771
7772
81ecdfbb 7773 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7774
81ecdfbb
RW
7775 for element in $INCEXPAT; do
7776 haveit=
7777 for x in $CPPFLAGS; do
a9322a30 7778
81ecdfbb
RW
7779 acl_save_prefix="$prefix"
7780 prefix="$acl_final_prefix"
7781 acl_save_exec_prefix="$exec_prefix"
7782 exec_prefix="$acl_final_exec_prefix"
7783 eval x=\"$x\"
7784 exec_prefix="$acl_save_exec_prefix"
7785 prefix="$acl_save_prefix"
a8111142 7786
81ecdfbb
RW
7787 if test "X$x" = "X$element"; then
7788 haveit=yes
7789 break
7790 fi
7791 done
7792 if test -z "$haveit"; then
7793 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7794 fi
7795 done
a9322a30
TT
7796
7797
81ecdfbb
RW
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7799$as_echo_n "checking for libexpat... " >&6; }
7800if test "${ac_cv_libexpat+set}" = set; then :
7801 $as_echo_n "(cached) " >&6
bec39cab 7802else
bec39cab 7803
81ecdfbb
RW
7804 ac_save_LIBS="$LIBS"
7805 LIBS="$LIBS $LIBEXPAT"
7806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7807/* end confdefs.h. */
81ecdfbb
RW
7808#include "expat.h"
7809int
7810main ()
7811{
7812XML_Parser p = XML_ParserCreate (0);
7813 ;
7814 return 0;
7815}
bec39cab 7816_ACEOF
81ecdfbb
RW
7817if ac_fn_c_try_link "$LINENO"; then :
7818 ac_cv_libexpat=yes
c906108c 7819else
81ecdfbb 7820 ac_cv_libexpat=no
bec39cab 7821fi
81ecdfbb
RW
7822rm -f core conftest.err conftest.$ac_objext \
7823 conftest$ac_exeext conftest.$ac_ext
7824 LIBS="$ac_save_LIBS"
c906108c 7825
95ca63c4 7826fi
81ecdfbb
RW
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7828$as_echo "$ac_cv_libexpat" >&6; }
7829 if test "$ac_cv_libexpat" = yes; then
7830 HAVE_LIBEXPAT=yes
bec39cab 7831
81ecdfbb 7832$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7833
81ecdfbb
RW
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7835$as_echo_n "checking how to link with libexpat... " >&6; }
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7837$as_echo "$LIBEXPAT" >&6; }
7838 else
7839 HAVE_LIBEXPAT=no
7840 CPPFLAGS="$ac_save_CPPFLAGS"
7841 LIBEXPAT=
7842 LTLIBEXPAT=
7843 fi
95ca63c4
CF
7844
7845
7846
7cb9022a
MK
7847
7848
bec39cab 7849
81ecdfbb
RW
7850 if test "$HAVE_LIBEXPAT" != yes; then
7851 if test "$with_expat" = yes; then
7852 as_fn_error "expat is missing or unusable" "$LINENO" 5
7853 else
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7855$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7856 fi
7857 else
7858 save_LIBS=$LIBS
7859 LIBS="$LIBS $LIBEXPAT"
7860 for ac_func in XML_StopParser
7861do :
7862 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7863if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7864 cat >>confdefs.h <<_ACEOF
81ecdfbb 7865#define HAVE_XML_STOPPARSER 1
bec39cab 7866_ACEOF
95ca63c4 7867
bec39cab 7868fi
bec39cab 7869done
95ca63c4 7870
81ecdfbb
RW
7871 LIBS=$save_LIBS
7872 fi
a9322a30
TT
7873fi
7874
a9322a30 7875
a9322a30
TT
7876
7877
ec685c5e 7878
0c4a4063 7879
81ecdfbb
RW
7880# Check whether --with-python was given.
7881if test "${with_python+set}" = set; then :
7882 withval=$with_python;
bec39cab 7883else
81ecdfbb 7884 with_python=auto
bec39cab 7885fi
bec39cab 7886
81ecdfbb
RW
7887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7888$as_echo_n "checking whether to use python... " >&6; }
7889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7890$as_echo "$with_python" >&6; }
9a156167 7891
81ecdfbb
RW
7892if test "${with_python}" = no; then
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7894$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7895 have_libpython=no
bec39cab 7896else
81ecdfbb 7897 case "${with_python}" in
8c85a4e2 7898 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7899 if test -d ${with_python}; then
7900 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7901 python_prog="${with_python}/bin/python"
0c4a4063 7902 python_prefix=
9c4ea6c5
JB
7903 # If python does not exit ${with_python}/bin, then try in
7904 # ${with_python}. On Windows/MinGW, this is where the Python
7905 # executable is.
7906 if test ! -x "${python_prog}"; then
7907 python_prog="${with_python}/python"
7908 python_prefix=
7909 fi
e7a30f46 7910 if test ! -x "${python_prog}"; then
ec685c5e
DE
7911 # Fall back to gdb 7.0/7.1 behaviour.
7912 python_prog=missing
0c4a4063 7913 python_prefix=${with_python}
ec685c5e 7914 fi
e7a30f46 7915 elif test -x "${with_python}"; then
ec685c5e
DE
7916 # While we can't run python compiled for $host (unless host == build),
7917 # the user could write a script that provides the needed information,
7918 # so we support that.
ec685c5e 7919 python_prog=${with_python}
0c4a4063 7920 python_prefix=
ec685c5e
DE
7921 else
7922 as_fn_error "invalid value for --with-python" "$LINENO" 5
7923 fi
81ecdfbb 7924 ;;
ec685c5e
DE
7925 */*)
7926 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7927 as_fn_error "invalid value for --with-python" "$LINENO" 5
7928 ;;
ec685c5e
DE
7929 *)
7930 # The user has either specified auto, yes, or the name of the python
7931 # program assumed to be in $PATH.
7932 python_prefix=
7933 case "${with_python}" in
7934 yes | auto)
7935 if test ${build} = ${host}; then
7936 # Extract the first word of "python", so it can be a program name with args.
7937set dummy python; ac_word=$2
7938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7939$as_echo_n "checking for $ac_word... " >&6; }
7940if test "${ac_cv_path_python_prog_path+set}" = set; then :
7941 $as_echo_n "(cached) " >&6
7942else
7943 case $python_prog_path in
7944 [\\/]* | ?:[\\/]*)
7945 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
7946 ;;
7947 *)
7948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7949for as_dir in $PATH
7950do
7951 IFS=$as_save_IFS
7952 test -z "$as_dir" && as_dir=.
7953 for ac_exec_ext in '' $ac_executable_extensions; do
7954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7955 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
7956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7957 break 2
7958 fi
7959done
7960 done
7961IFS=$as_save_IFS
7962
7963 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
7964 ;;
7965esac
7966fi
7967python_prog_path=$ac_cv_path_python_prog_path
7968if test -n "$python_prog_path"; then
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
7970$as_echo "$python_prog_path" >&6; }
7971else
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7973$as_echo "no" >&6; }
7974fi
7975
7976
7977 if test "${python_prog_path}" = missing; then
7978 python_prog=missing
7979 else
7980 python_prog=${python_prog_path}
7981 fi
7982 else
7983 # Not much we can do except assume the cross-compiler will find the
7984 # right files.
7985 python_prog=missing
7986 fi
7987 ;;
7988 *)
7989 # While we can't run python compiled for $host (unless host == build),
7990 # the user could write a script that provides the needed information,
7991 # so we support that.
7992 python_prog="${with_python}"
7993 # Extract the first word of "${python_prog}", so it can be a program name with args.
7994set dummy ${python_prog}; ac_word=$2
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7996$as_echo_n "checking for $ac_word... " >&6; }
7997if test "${ac_cv_path_python_prog_path+set}" = set; then :
7998 $as_echo_n "(cached) " >&6
7999else
8000 case $python_prog_path in
8001 [\\/]* | ?:[\\/]*)
8002 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8003 ;;
8004 *)
8005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8006for as_dir in $PATH
8007do
8008 IFS=$as_save_IFS
8009 test -z "$as_dir" && as_dir=.
8010 for ac_exec_ext in '' $ac_executable_extensions; do
8011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8012 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8014 break 2
8015 fi
8016done
8017 done
8018IFS=$as_save_IFS
8019
8020 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8021 ;;
8022esac
8023fi
8024python_prog_path=$ac_cv_path_python_prog_path
8025if test -n "$python_prog_path"; then
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8027$as_echo "$python_prog_path" >&6; }
8028else
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8030$as_echo "no" >&6; }
8031fi
8032
8033
8034 if test "${python_prog_path}" = missing; then
8035 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8036 fi
8037 ;;
8038 esac
81ecdfbb
RW
8039 esac
8040
ec685c5e 8041 if test "${python_prog}" != missing; then
e7a30f46
DE
8042 # We have a python program to use, but it may be too old.
8043 # Don't flag an error for --with-python=auto (the default).
8044 have_python_config=yes
ec685c5e
DE
8045 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8046 if test $? != 0; then
e7a30f46
DE
8047 have_python_config=failed
8048 if test "${with_python}" != auto; then
8049 as_fn_error "failure running python-config --includes" "$LINENO" 5
8050 fi
ec685c5e
DE
8051 fi
8052 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8053 if test $? != 0; then
e7a30f46
DE
8054 have_python_config=failed
8055 if test "${with_python}" != auto; then
8056 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8057 fi
ec685c5e 8058 fi
0c4a4063
DE
8059 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8060 if test $? != 0; then
e7a30f46
DE
8061 have_python_config=failed
8062 if test "${with_python}" != auto; then
8063 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8064 fi
0c4a4063 8065 fi
ec685c5e 8066 else
ac534cba
JB
8067 # We do not have a python executable we can use to determine where
8068 # to find the Python headers and libs. We cannot guess the include
8069 # path from the python_prefix either, because that include path
8070 # depends on the Python version. So, there is nothing much we can
8071 # do except assume that the compiler will be able to find those files.
8072 python_includes=
8073 python_libs=
0c4a4063 8074 have_python_config=no
ec685c5e 8075 fi
bec39cab 8076
ec685c5e
DE
8077 # If we have python-config, only try the configuration it provides.
8078 # Otherwise fallback on the old way of trying different versions of
8079 # python in turn.
81ecdfbb 8080
ec685c5e
DE
8081 have_libpython=no
8082 if test "${have_python_config}" = yes; then
c1039e3c
JB
8083 # Determine the Python version by extracting "-lpython<version>"
8084 # part of the python_libs. <version> is usually X.Y with X and Y
8085 # being decimal numbers, but can also be XY (seen on Windows).
8086 #
8087 # The extraction is performed using sed with a regular expression.
8088 # Initially, the regexp used was using the '?' quantifier to make
8089 # the dot in the version number optional. Unfortunately, this
8090 # does not work with non-GNU versions of sed because, because of
8091 # what looks like a limitation (the '?' quantifier does not work
8092 # with back-references). We work around this limitation by using
8093 # the '*' quantifier instead. It means that, in theory, we might
8094 # match unexpected version strings such as "-lpython2..7", but
8095 # this seems unlikely in practice. And even if that happens,
8096 # an error will be triggered later on, when checking that version
8097 # number.
ec685c5e 8098 python_version=`echo " ${python_libs} " \
c1039e3c 8099 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8100 case "${python_version}" in
8101 python*)
ec685c5e
DE
8102
8103 version=${python_version}
8104
8105 new_CPPFLAGS=${python_includes}
8106 new_LIBS=${python_libs}
81ecdfbb
RW
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8108$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8109 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8110 save_LIBS=$LIBS
ec685c5e
DE
8111 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8112 LIBS="$LIBS $new_LIBS"
8113 found_usable_python=no
81ecdfbb 8114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8115/* end confdefs.h. */
ac534cba 8116#include "Python.h"
81ecdfbb
RW
8117int
8118main ()
8119{
8120Py_Initialize ();
8121 ;
8122 return 0;
8123}
bec39cab 8124_ACEOF
81ecdfbb 8125if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8126 have_libpython=${version}
8127 found_usable_python=yes
ac534cba
JB
8128 PYTHON_CPPFLAGS=$new_CPPFLAGS
8129 PYTHON_LIBS=$new_LIBS
9a156167 8130fi
81ecdfbb
RW
8131rm -f core conftest.err conftest.$ac_objext \
8132 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8133 CPPFLAGS=$save_CPPFLAGS
8134 LIBS=$save_LIBS
ec685c5e
DE
8135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8136$as_echo "${found_usable_python}" >&6; }
9a156167 8137
0c4a4063
DE
8138 ;;
8139 *)
ec685c5e 8140 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8141 ;;
8142 esac
e7a30f46 8143 elif test "${have_python_config}" != failed; then
ec685c5e 8144 if test "${have_libpython}" = no; then
9a156167 8145
420697bb
TT
8146 version=python2.7
8147
8148 new_CPPFLAGS=${python_includes}
8149 new_LIBS="${python_libs} -lpython2.7"
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8151$as_echo_n "checking for ${version}... " >&6; }
8152 save_CPPFLAGS=$CPPFLAGS
8153 save_LIBS=$LIBS
8154 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8155 LIBS="$LIBS $new_LIBS"
8156 found_usable_python=no
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158/* end confdefs.h. */
ac534cba 8159#include "Python.h"
420697bb
TT
8160int
8161main ()
8162{
8163Py_Initialize ();
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168if ac_fn_c_try_link "$LINENO"; then :
8169 have_libpython=${version}
8170 found_usable_python=yes
ac534cba
JB
8171 PYTHON_CPPFLAGS=$new_CPPFLAGS
8172 PYTHON_LIBS=$new_LIBS
420697bb
TT
8173fi
8174rm -f core conftest.err conftest.$ac_objext \
8175 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8176 CPPFLAGS=$save_CPPFLAGS
8177 LIBS=$save_LIBS
420697bb
TT
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8179$as_echo "${found_usable_python}" >&6; }
8180
8181 fi
8182 if test "${have_libpython}" = no; then
8183
ec685c5e
DE
8184 version=python2.6
8185
8186 new_CPPFLAGS=${python_includes}
8187 new_LIBS="${python_libs} -lpython2.6"
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8189$as_echo_n "checking for ${version}... " >&6; }
8190 save_CPPFLAGS=$CPPFLAGS
8191 save_LIBS=$LIBS
8192 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8193 LIBS="$LIBS $new_LIBS"
8194 found_usable_python=no
8195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8196/* end confdefs.h. */
ac534cba 8197#include "Python.h"
ec685c5e
DE
8198int
8199main ()
8200{
8201Py_Initialize ();
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206if ac_fn_c_try_link "$LINENO"; then :
8207 have_libpython=${version}
8208 found_usable_python=yes
ac534cba
JB
8209 PYTHON_CPPFLAGS=$new_CPPFLAGS
8210 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8211fi
8212rm -f core conftest.err conftest.$ac_objext \
8213 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8214 CPPFLAGS=$save_CPPFLAGS
8215 LIBS=$save_LIBS
ec685c5e
DE
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8217$as_echo "${found_usable_python}" >&6; }
9a156167 8218
81ecdfbb 8219 fi
ec685c5e 8220 if test ${have_libpython} = no; then
9a156167 8221
81ecdfbb 8222 version=python2.5
9a156167 8223
ec685c5e
DE
8224 new_CPPFLAGS=${python_includes}
8225 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8227$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8228 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8229 save_LIBS=$LIBS
ec685c5e
DE
8230 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8231 LIBS="$LIBS $new_LIBS"
8232 found_usable_python=no
81ecdfbb 8233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8234/* end confdefs.h. */
ac534cba 8235#include "Python.h"
81ecdfbb
RW
8236int
8237main ()
8238{
8239Py_Initialize ();
8240 ;
8241 return 0;
8242}
436868fb 8243_ACEOF
81ecdfbb 8244if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8245 have_libpython=${version}
8246 found_usable_python=yes
ac534cba
JB
8247 PYTHON_CPPFLAGS=$new_CPPFLAGS
8248 PYTHON_LIBS=$new_LIBS
436868fb 8249fi
81ecdfbb
RW
8250rm -f core conftest.err conftest.$ac_objext \
8251 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8252 CPPFLAGS=$save_CPPFLAGS
8253 LIBS=$save_LIBS
ec685c5e
DE
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8255$as_echo "${found_usable_python}" >&6; }
a9322a30 8256
81ecdfbb 8257 fi
ec685c5e 8258 if test ${have_libpython} = no; then
a9322a30 8259
81ecdfbb 8260 version=python2.4
a9322a30 8261
ec685c5e
DE
8262 new_CPPFLAGS=${python_includes}
8263 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8265$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8266 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8267 save_LIBS=$LIBS
ec685c5e
DE
8268 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8269 LIBS="$LIBS $new_LIBS"
8270 found_usable_python=no
81ecdfbb 8271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8272/* end confdefs.h. */
ac534cba 8273#include "Python.h"
a9322a30
TT
8274int
8275main ()
8276{
81ecdfbb 8277Py_Initialize ();
a9322a30
TT
8278 ;
8279 return 0;
8280}
436868fb 8281_ACEOF
81ecdfbb 8282if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8283 have_libpython=${version}
8284 found_usable_python=yes
ac534cba
JB
8285 PYTHON_CPPFLAGS=$new_CPPFLAGS
8286 PYTHON_LIBS=$new_LIBS
436868fb 8287fi
81ecdfbb
RW
8288rm -f core conftest.err conftest.$ac_objext \
8289 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8290 CPPFLAGS=$save_CPPFLAGS
8291 LIBS=$save_LIBS
ec685c5e
DE
8292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8293$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8294
ec685c5e
DE
8295 fi
8296 fi
9c4ea6c5 8297 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8298
8299$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8300
9c4ea6c5 8301 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8302
8303$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8304
9c4ea6c5 8305 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8306
8307$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8308
9c4ea6c5 8309 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8310
8311$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8312
81ecdfbb 8313 fi
ec685c5e
DE
8314
8315 if test "${have_libpython}" = no; then
81ecdfbb
RW
8316 case "${with_python}" in
8317 yes)
8318 as_fn_error "python is missing or unusable" "$LINENO" 5
8319 ;;
8320 auto)
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8322$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8323 ;;
8324 *)
8325 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8326 ;;
8327 esac
0c4a4063
DE
8328 else
8329 if test -n "${python_prefix}"; then
8330
8331cat >>confdefs.h <<_ACEOF
8332#define WITH_PYTHON_PATH "${python_prefix}"
8333_ACEOF
8334
8335
8336 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8337 if test "x$prefix" = xNONE; then
8338 test_prefix=/usr/local
8339 else
8340 test_prefix=$prefix
8341 fi
8342 else
8343 test_prefix=$exec_prefix
8344 fi
8345 value=0
8346 case ${python_prefix} in
8347 "${test_prefix}"|"${test_prefix}/"*|\
8348 '${exec_prefix}'|'${exec_prefix}/'*)
8349 value=1
8350 ;;
8351 esac
8352
8353cat >>confdefs.h <<_ACEOF
8354#define PYTHON_PATH_RELOCATABLE $value
8355_ACEOF
8356
8357
8358 fi
81ecdfbb 8359 fi
436868fb 8360fi
436868fb 8361
ec685c5e 8362if test "${have_libpython}" != no; then
436868fb 8363
81ecdfbb 8364$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8365
81ecdfbb
RW
8366 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8367 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8368 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8369 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8370 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8371
81ecdfbb
RW
8372 # Flags needed to compile Python code (taken from python-config --cflags).
8373 # We cannot call python-config directly because it will output whatever was
8374 # used when compiling the Python interpreter itself, including flags which
8375 # would make the python-related objects be compiled differently from the
8376 # rest of GDB (e.g., -O2 and -fPIC).
8377 if test "${GCC}" = yes; then
8378 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8379 fi
436868fb 8380
81ecdfbb
RW
8381 if test "x${tentative_python_cflags}" != x; then
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8383$as_echo_n "checking compiler flags for python code... " >&6; }
8384 for flag in ${tentative_python_cflags}; do
8385 # Check that the compiler accepts it
8386 saved_CFLAGS="$CFLAGS"
8387 CFLAGS="$CFLAGS $flag"
8388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8389/* end confdefs.h. */
81ecdfbb 8390
a9322a30
TT
8391int
8392main ()
8393{
a9322a30
TT
8394
8395 ;
8396 return 0;
8397}
bec39cab 8398_ACEOF
81ecdfbb
RW
8399if ac_fn_c_try_compile "$LINENO"; then :
8400 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8401fi
81ecdfbb
RW
8402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8403 CFLAGS="$saved_CFLAGS"
8404 done
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8406$as_echo "${PYTHON_CFLAGS}" >&6; }
8407 fi
043b6510
JB
8408
8409 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8410 # #if _SGIAPI
8411 # #define siginfo __siginfo
8412 # #endif
8413 # The problem is that including Python causes some XOPEN macros to be
8414 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8415 # to false. So, we work around this issue by defining siginfo ourself
8416 # though the command-line.
8417 case "$gdb_host" in
8418 irix*) if test "${GCC}" = yes; then
8419 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8420 fi
8421 ;;
8422 esac
81ecdfbb
RW
8423else
8424 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8425 # included.
8426 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8427 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8428 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8429fi
9a156167 8430
9a156167 8431
ac534cba
JB
8432
8433
81ecdfbb
RW
8434# ------------------------- #
8435# Checks for header files. #
8436# ------------------------- #
c890192f 8437
81ecdfbb
RW
8438ac_header_dirent=no
8439for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8440 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8442$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8443if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8444 $as_echo_n "(cached) " >&6
bec39cab 8445else
81ecdfbb 8446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8447/* end confdefs.h. */
81ecdfbb
RW
8448#include <sys/types.h>
8449#include <$ac_hdr>
8450
a9322a30
TT
8451int
8452main ()
8453{
81ecdfbb
RW
8454if ((DIR *) 0)
8455return 0;
a9322a30
TT
8456 ;
8457 return 0;
8458}
bec39cab 8459_ACEOF
81ecdfbb
RW
8460if ac_fn_c_try_compile "$LINENO"; then :
8461 eval "$as_ac_Header=yes"
bec39cab 8462else
81ecdfbb 8463 eval "$as_ac_Header=no"
bec39cab 8464fi
81ecdfbb 8465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8466fi
81ecdfbb
RW
8467eval ac_res=\$$as_ac_Header
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8469$as_echo "$ac_res" >&6; }
8470eval as_val=\$$as_ac_Header
8471 if test "x$as_val" = x""yes; then :
8472 cat >>confdefs.h <<_ACEOF
8473#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8474_ACEOF
bec39cab 8475
81ecdfbb
RW
8476ac_header_dirent=$ac_hdr; break
8477fi
bec39cab 8478
81ecdfbb
RW
8479done
8480# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8481if test $ac_header_dirent = dirent.h; then
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8483$as_echo_n "checking for library containing opendir... " >&6; }
8484if test "${ac_cv_search_opendir+set}" = set; then :
8485 $as_echo_n "(cached) " >&6
c890192f 8486else
81ecdfbb
RW
8487 ac_func_search_save_LIBS=$LIBS
8488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8489/* end confdefs.h. */
8490
8491/* Override any GCC internal prototype to avoid an error.
8492 Use char because int might match the return type of a GCC
8493 builtin and then its argument prototype would still apply. */
8494#ifdef __cplusplus
8495extern "C"
8496#endif
8497char opendir ();
8498int
8499main ()
8500{
8501return opendir ();
8502 ;
8503 return 0;
8504}
bec39cab 8505_ACEOF
81ecdfbb
RW
8506for ac_lib in '' dir; do
8507 if test -z "$ac_lib"; then
8508 ac_res="none required"
8509 else
8510 ac_res=-l$ac_lib
8511 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8512 fi
8513 if ac_fn_c_try_link "$LINENO"; then :
8514 ac_cv_search_opendir=$ac_res
8515fi
8516rm -f core conftest.err conftest.$ac_objext \
8517 conftest$ac_exeext
8518 if test "${ac_cv_search_opendir+set}" = set; then :
8519 break
8520fi
8521done
8522if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8523
81ecdfbb
RW
8524else
8525 ac_cv_search_opendir=no
8526fi
8527rm conftest.$ac_ext
8528LIBS=$ac_func_search_save_LIBS
8529fi
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8531$as_echo "$ac_cv_search_opendir" >&6; }
8532ac_res=$ac_cv_search_opendir
8533if test "$ac_res" != no; then :
8534 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8535
bec39cab 8536fi
81ecdfbb 8537
bec39cab 8538else
81ecdfbb
RW
8539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8540$as_echo_n "checking for library containing opendir... " >&6; }
8541if test "${ac_cv_search_opendir+set}" = set; then :
8542 $as_echo_n "(cached) " >&6
8543else
8544 ac_func_search_save_LIBS=$LIBS
8545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8546/* end confdefs.h. */
81ecdfbb
RW
8547
8548/* Override any GCC internal prototype to avoid an error.
8549 Use char because int might match the return type of a GCC
8550 builtin and then its argument prototype would still apply. */
8551#ifdef __cplusplus
8552extern "C"
8553#endif
8554char opendir ();
a9322a30
TT
8555int
8556main ()
8557{
81ecdfbb 8558return opendir ();
a9322a30
TT
8559 ;
8560 return 0;
8561}
bec39cab 8562_ACEOF
81ecdfbb
RW
8563for ac_lib in '' x; do
8564 if test -z "$ac_lib"; then
8565 ac_res="none required"
8566 else
8567 ac_res=-l$ac_lib
8568 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8569 fi
8570 if ac_fn_c_try_link "$LINENO"; then :
8571 ac_cv_search_opendir=$ac_res
8572fi
8573rm -f core conftest.err conftest.$ac_objext \
8574 conftest$ac_exeext
8575 if test "${ac_cv_search_opendir+set}" = set; then :
8576 break
8577fi
8578done
8579if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8580
81ecdfbb
RW
8581else
8582 ac_cv_search_opendir=no
bec39cab 8583fi
81ecdfbb
RW
8584rm conftest.$ac_ext
8585LIBS=$ac_func_search_save_LIBS
a9322a30 8586fi
81ecdfbb
RW
8587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8588$as_echo "$ac_cv_search_opendir" >&6; }
8589ac_res=$ac_cv_search_opendir
8590if test "$ac_res" != no; then :
8591 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8592
81ecdfbb 8593fi
bec39cab 8594
81ecdfbb 8595fi
bec39cab 8596
81ecdfbb
RW
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8598$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8599if test "${ac_cv_header_stat_broken+set}" = set; then :
8600 $as_echo_n "(cached) " >&6
9a156167 8601else
81ecdfbb
RW
8602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8603/* end confdefs.h. */
8604#include <sys/types.h>
8605#include <sys/stat.h>
8606
8607#if defined S_ISBLK && defined S_IFDIR
8608extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8609#endif
8610
8611#if defined S_ISBLK && defined S_IFCHR
8612extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8613#endif
8614
8615#if defined S_ISLNK && defined S_IFREG
8616extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8617#endif
8618
8619#if defined S_ISSOCK && defined S_IFREG
8620extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8621#endif
8622
bec39cab 8623_ACEOF
81ecdfbb
RW
8624if ac_fn_c_try_compile "$LINENO"; then :
8625 ac_cv_header_stat_broken=no
8626else
8627 ac_cv_header_stat_broken=yes
8628fi
8629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8630fi
8631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8632$as_echo "$ac_cv_header_stat_broken" >&6; }
8633if test $ac_cv_header_stat_broken = yes; then
9a156167 8634
81ecdfbb 8635$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 8636
bec39cab 8637fi
81ecdfbb
RW
8638
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8640$as_echo_n "checking for ANSI C header files... " >&6; }
8641if test "${ac_cv_header_stdc+set}" = set; then :
8642 $as_echo_n "(cached) " >&6
bec39cab 8643else
81ecdfbb 8644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8645/* end confdefs.h. */
81ecdfbb
RW
8646#include <stdlib.h>
8647#include <stdarg.h>
8648#include <string.h>
8649#include <float.h>
8650
a9322a30
TT
8651int
8652main ()
8653{
a9322a30
TT
8654
8655 ;
8656 return 0;
8657}
bec39cab 8658_ACEOF
81ecdfbb
RW
8659if ac_fn_c_try_compile "$LINENO"; then :
8660 ac_cv_header_stdc=yes
bec39cab 8661else
81ecdfbb 8662 ac_cv_header_stdc=no
a9322a30 8663fi
81ecdfbb 8664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8665
81ecdfbb
RW
8666if test $ac_cv_header_stdc = yes; then
8667 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h. */
8670#include <string.h>
bec39cab 8671
81ecdfbb
RW
8672_ACEOF
8673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8674 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8675
bec39cab 8676else
81ecdfbb
RW
8677 ac_cv_header_stdc=no
8678fi
8679rm -f conftest*
8680
8681fi
8682
8683if test $ac_cv_header_stdc = yes; then
8684 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8686/* end confdefs.h. */
8687#include <stdlib.h>
8688
bec39cab 8689_ACEOF
81ecdfbb
RW
8690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8691 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8692
81ecdfbb
RW
8693else
8694 ac_cv_header_stdc=no
8695fi
8696rm -f conftest*
bec39cab 8697
bec39cab 8698fi
81ecdfbb
RW
8699
8700if test $ac_cv_header_stdc = yes; then
8701 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8702 if test "$cross_compiling" = yes; then :
8703 :
bec39cab 8704else
81ecdfbb 8705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8706/* end confdefs.h. */
81ecdfbb
RW
8707#include <ctype.h>
8708#include <stdlib.h>
8709#if ((' ' & 0x0FF) == 0x020)
8710# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8711# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8712#else
8713# define ISLOWER(c) \
8714 (('a' <= (c) && (c) <= 'i') \
8715 || ('j' <= (c) && (c) <= 'r') \
8716 || ('s' <= (c) && (c) <= 'z'))
8717# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8718#endif
8719
8720#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8721int
8722main ()
8723{
81ecdfbb
RW
8724 int i;
8725 for (i = 0; i < 256; i++)
8726 if (XOR (islower (i), ISLOWER (i))
8727 || toupper (i) != TOUPPER (i))
8728 return 2;
a9322a30
TT
8729 return 0;
8730}
bec39cab 8731_ACEOF
81ecdfbb
RW
8732if ac_fn_c_try_run "$LINENO"; then :
8733
bec39cab 8734else
81ecdfbb
RW
8735 ac_cv_header_stdc=no
8736fi
8737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8738 conftest.$ac_objext conftest.beam conftest.$ac_ext
8739fi
bec39cab 8740
bec39cab 8741fi
a9322a30 8742fi
81ecdfbb
RW
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8744$as_echo "$ac_cv_header_stdc" >&6; }
8745if test $ac_cv_header_stdc = yes; then
bec39cab 8746
81ecdfbb 8747$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8748
81ecdfbb 8749fi
bec39cab 8750
81ecdfbb
RW
8751# elf_hp.h is for HP/UX 64-bit shared library support.
8752# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
8753# unconditionally, so what's the point in checking these?
8754for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8755 thread_db.h gnu/libc-version.h signal.h stddef.h \
8756 stdlib.h string.h memory.h strings.h sys/fault.h \
8757 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8758 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8759 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8760 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 8761 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 8762 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
8763do :
8764 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8765ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8766eval as_val=\$$as_ac_Header
8767 if test "x$as_val" = x""yes; then :
bec39cab 8768 cat >>confdefs.h <<_ACEOF
81ecdfbb 8769#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8770_ACEOF
c906108c 8771
bec39cab 8772fi
81ecdfbb
RW
8773
8774done
8775
8776for ac_header in link.h
8777do :
8778 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8779# include <sys/types.h>
8780#endif
8781#if HAVE_NLIST_H
8782# include <nlist.h>
a9322a30
TT
8783#endif
8784
81ecdfbb
RW
8785"
8786if test "x$ac_cv_header_link_h" = x""yes; then :
8787 cat >>confdefs.h <<_ACEOF
8788#define HAVE_LINK_H 1
bec39cab 8789_ACEOF
bec39cab 8790
a9322a30 8791fi
bec39cab 8792
81ecdfbb 8793done
c906108c 8794
81ecdfbb
RW
8795for ac_header in sys/proc.h
8796do :
8797 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8798# include <sys/param.h>
8799#endif
c906108c 8800
81ecdfbb
RW
8801"
8802if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8803 cat >>confdefs.h <<_ACEOF
81ecdfbb 8804#define HAVE_SYS_PROC_H 1
bec39cab 8805_ACEOF
5ee754fc 8806
bec39cab 8807fi
81ecdfbb
RW
8808
8809done
8810
8811for ac_header in sys/user.h
8812do :
8813 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8814# include <sys/param.h>
a9322a30
TT
8815#endif
8816
81ecdfbb
RW
8817"
8818if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8819 cat >>confdefs.h <<_ACEOF
8820#define HAVE_SYS_USER_H 1
bec39cab 8821_ACEOF
bec39cab 8822
a9322a30 8823fi
bec39cab 8824
81ecdfbb 8825done
5ee754fc 8826
5ee754fc 8827
81ecdfbb
RW
8828# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8829# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8830# think that we don't have <curses.h> if we're using GCC.
8831case $host_os in
8832 solaris2.[789])
8833 if test "$GCC" = yes; then
8834
8835$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8836
8837 fi ;;
8838esac
8839for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8840do :
8841 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8842ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8843eval as_val=\$$as_ac_Header
8844 if test "x$as_val" = x""yes; then :
bec39cab 8845 cat >>confdefs.h <<_ACEOF
81ecdfbb 8846#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8847_ACEOF
5ee754fc
MK
8848
8849fi
8850
81ecdfbb 8851done
bec39cab 8852
81ecdfbb
RW
8853for ac_header in term.h
8854do :
8855 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8856# include <curses.h>
8857#endif
bec39cab 8858
81ecdfbb
RW
8859"
8860if test "x$ac_cv_header_term_h" = x""yes; then :
8861 cat >>confdefs.h <<_ACEOF
8862#define HAVE_TERM_H 1
a8111142 8863_ACEOF
a8111142 8864
a8111142 8865fi
a8111142 8866
81ecdfbb 8867done
a8111142
TT
8868
8869
81ecdfbb
RW
8870# ------------------------- #
8871# Checks for declarations. #
8872# ------------------------- #
a9322a30 8873
81ecdfbb
RW
8874ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8875if test "x$ac_cv_have_decl_free" = x""yes; then :
8876 ac_have_decl=1
bec39cab 8877else
81ecdfbb
RW
8878 ac_have_decl=0
8879fi
8880
8881cat >>confdefs.h <<_ACEOF
8882#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8883_ACEOF
81ecdfbb
RW
8884ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8885if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8886 ac_have_decl=1
8887else
8888 ac_have_decl=0
8889fi
8890
8891cat >>confdefs.h <<_ACEOF
8892#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 8893_ACEOF
81ecdfbb
RW
8894ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
8895if test "x$ac_cv_have_decl_realloc" = x""yes; then :
8896 ac_have_decl=1
bec39cab 8897else
81ecdfbb
RW
8898 ac_have_decl=0
8899fi
bec39cab 8900
81ecdfbb
RW
8901cat >>confdefs.h <<_ACEOF
8902#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 8903_ACEOF
81ecdfbb
RW
8904ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
8905if test "x$ac_cv_have_decl_strerror" = x""yes; then :
8906 ac_have_decl=1
8907else
8908 ac_have_decl=0
8909fi
8910
8911cat >>confdefs.h <<_ACEOF
8912#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 8913_ACEOF
81ecdfbb
RW
8914ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8915if test "x$ac_cv_have_decl_strstr" = x""yes; then :
8916 ac_have_decl=1
bec39cab 8917else
81ecdfbb
RW
8918 ac_have_decl=0
8919fi
5ee754fc 8920
81ecdfbb
RW
8921cat >>confdefs.h <<_ACEOF
8922#define HAVE_DECL_STRSTR $ac_have_decl
8923_ACEOF
8924ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
8925if test "x$ac_cv_have_decl_getopt" = x""yes; then :
8926 ac_have_decl=1
8927else
8928 ac_have_decl=0
5ee754fc 8929fi
81ecdfbb
RW
8930
8931cat >>confdefs.h <<_ACEOF
8932#define HAVE_DECL_GETOPT $ac_have_decl
8933_ACEOF
8934ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
8935if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
8936 ac_have_decl=1
8937else
8938 ac_have_decl=0
5ee754fc 8939fi
81ecdfbb
RW
8940
8941cat >>confdefs.h <<_ACEOF
8942#define HAVE_DECL_SNPRINTF $ac_have_decl
8943_ACEOF
8944ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
8945if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
8946 ac_have_decl=1
8947else
8948 ac_have_decl=0
5ee754fc
MK
8949fi
8950
a9322a30 8951cat >>confdefs.h <<_ACEOF
81ecdfbb 8952#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 8953_ACEOF
5ee754fc 8954
5ee754fc 8955
81ecdfbb
RW
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
8957$as_echo_n "checking for LC_MESSAGES... " >&6; }
8958if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
8959 $as_echo_n "(cached) " >&6
bec39cab 8960else
81ecdfbb 8961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8962/* end confdefs.h. */
81ecdfbb 8963#include <locale.h>
a9322a30
TT
8964int
8965main ()
8966{
81ecdfbb 8967return LC_MESSAGES
a9322a30
TT
8968 ;
8969 return 0;
8970}
bec39cab 8971_ACEOF
81ecdfbb
RW
8972if ac_fn_c_try_link "$LINENO"; then :
8973 am_cv_val_LC_MESSAGES=yes
bec39cab 8974else
81ecdfbb
RW
8975 am_cv_val_LC_MESSAGES=no
8976fi
8977rm -f core conftest.err conftest.$ac_objext \
8978 conftest$ac_exeext conftest.$ac_ext
8979fi
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
8981$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
8982 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 8983
81ecdfbb
RW
8984$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
8985
8986 fi
8987
8988
8989# ----------------------- #
8990# Checks for structures. #
8991# ----------------------- #
8992
8993ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8994if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
8995
8996cat >>confdefs.h <<_ACEOF
8997#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 8998_ACEOF
7eb368b3 8999
81ecdfbb 9000
7eb368b3 9001fi
81ecdfbb
RW
9002ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9003if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9004
a9322a30
TT
9005cat >>confdefs.h <<_ACEOF
9006#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9007_ACEOF
9008
a9322a30 9009
7eb368b3
NR
9010fi
9011
7eb368b3 9012
a9322a30
TT
9013# ------------------ #
9014# Checks for types. #
9015# ------------------ #
7eb368b3 9016
81ecdfbb
RW
9017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9018$as_echo_n "checking return type of signal handlers... " >&6; }
9019if test "${ac_cv_type_signal+set}" = set; then :
9020 $as_echo_n "(cached) " >&6
bec39cab 9021else
81ecdfbb 9022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9023/* end confdefs.h. */
a9322a30
TT
9024#include <sys/types.h>
9025#include <signal.h>
7cb9022a 9026
a9322a30
TT
9027int
9028main ()
9029{
81ecdfbb 9030return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9031 ;
9032 return 0;
9033}
bec39cab 9034_ACEOF
81ecdfbb
RW
9035if ac_fn_c_try_compile "$LINENO"; then :
9036 ac_cv_type_signal=int
bec39cab 9037else
81ecdfbb 9038 ac_cv_type_signal=void
bec39cab 9039fi
81ecdfbb 9040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9041fi
81ecdfbb
RW
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9043$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9044
a9322a30
TT
9045cat >>confdefs.h <<_ACEOF
9046#define RETSIGTYPE $ac_cv_type_signal
9047_ACEOF
5ee754fc 9048
bec39cab 9049
81ecdfbb 9050ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9051#include <sys/socket.h>
9052
81ecdfbb
RW
9053"
9054if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9055
a9322a30
TT
9056cat >>confdefs.h <<_ACEOF
9057#define HAVE_SOCKLEN_T 1
9058_ACEOF
9059
9060
9061fi
9062
9063
9064# ------------------------------------- #
9065# Checks for compiler characteristics. #
9066# ------------------------------------- #
9067
81ecdfbb
RW
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9069$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9070if test "${ac_cv_c_const+set}" = set; then :
9071 $as_echo_n "(cached) " >&6
a9322a30 9072else
81ecdfbb 9073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9074/* end confdefs.h. */
a9322a30
TT
9075
9076int
9077main ()
9078{
9079/* FIXME: Include the comments suggested by Paul. */
9080#ifndef __cplusplus
9081 /* Ultrix mips cc rejects this. */
9082 typedef int charset[2];
81ecdfbb 9083 const charset cs;
a9322a30 9084 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9085 char const *const *pcpcc;
9086 char **ppc;
a9322a30
TT
9087 /* NEC SVR4.0.2 mips cc rejects this. */
9088 struct point {int x, y;};
9089 static struct point const zero = {0,0};
9090 /* AIX XL C 1.02.0.0 rejects this.
9091 It does not let you subtract one const X* pointer from another in
9092 an arm of an if-expression whose if-part is not a constant
9093 expression */
9094 const char *g = "string";
81ecdfbb 9095 pcpcc = &g + (g ? g-g : 0);
a9322a30 9096 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9097 ++pcpcc;
9098 ppc = (char**) pcpcc;
9099 pcpcc = (char const *const *) ppc;
a9322a30
TT
9100 { /* SCO 3.2v4 cc rejects this. */
9101 char *t;
9102 char const *s = 0 ? (char *) 0 : (char const *) 0;
9103
9104 *t++ = 0;
81ecdfbb 9105 if (s) return 0;
a9322a30
TT
9106 }
9107 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9108 int x[] = {25, 17};
9109 const int *foo = &x[0];
9110 ++foo;
9111 }
9112 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9113 typedef const int *iptr;
9114 iptr p = 0;
9115 ++p;
9116 }
9117 { /* AIX XL C 1.02.0.0 rejects this saying
9118 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9119 struct s { int j; const int *ap[3]; };
9120 struct s *b; b->j = 5;
9121 }
9122 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9123 const int foo = 10;
81ecdfbb 9124 if (!foo) return 0;
a9322a30 9125 }
81ecdfbb 9126 return !cs[0] && !zero.x;
a9322a30
TT
9127#endif
9128
9129 ;
9130 return 0;
9131}
bec39cab 9132_ACEOF
81ecdfbb 9133if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9134 ac_cv_c_const=yes
5ee754fc 9135else
81ecdfbb 9136 ac_cv_c_const=no
5ee754fc 9137fi
81ecdfbb 9138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9139fi
81ecdfbb
RW
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9141$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9142if test $ac_cv_c_const = no; then
bec39cab 9143
81ecdfbb 9144$as_echo "#define const /**/" >>confdefs.h
bec39cab 9145
5ee754fc 9146fi
bec39cab 9147
81ecdfbb
RW
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9149$as_echo_n "checking for inline... " >&6; }
9150if test "${ac_cv_c_inline+set}" = set; then :
9151 $as_echo_n "(cached) " >&6
bec39cab 9152else
a9322a30
TT
9153 ac_cv_c_inline=no
9154for ac_kw in inline __inline__ __inline; do
81ecdfbb 9155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9156/* end confdefs.h. */
a9322a30
TT
9157#ifndef __cplusplus
9158typedef int foo_t;
9159static $ac_kw foo_t static_foo () {return 0; }
9160$ac_kw foo_t foo () {return 0; }
9161#endif
9162
bec39cab 9163_ACEOF
81ecdfbb
RW
9164if ac_fn_c_try_compile "$LINENO"; then :
9165 ac_cv_c_inline=$ac_kw
bec39cab 9166fi
81ecdfbb
RW
9167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9168 test "$ac_cv_c_inline" != no && break
a9322a30 9169done
bec39cab 9170
5ee754fc 9171fi
81ecdfbb
RW
9172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9173$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9174
a9322a30
TT
9175case $ac_cv_c_inline in
9176 inline | yes) ;;
9177 *)
9178 case $ac_cv_c_inline in
9179 no) ac_val=;;
9180 *) ac_val=$ac_cv_c_inline;;
9181 esac
9182 cat >>confdefs.h <<_ACEOF
9183#ifndef __cplusplus
9184#define inline $ac_val
9185#endif
9186_ACEOF
bec39cab
AC
9187 ;;
9188esac
bec39cab 9189
81ecdfbb
RW
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9191$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9192if test "${ac_cv_c_bigendian+set}" = set; then :
9193 $as_echo_n "(cached) " >&6
bec39cab 9194else
81ecdfbb
RW
9195 ac_cv_c_bigendian=unknown
9196 # See if we're dealing with a universal compiler.
9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9198/* end confdefs.h. */
9199#ifndef __APPLE_CC__
9200 not a universal capable compiler
9201 #endif
9202 typedef int dummy;
9203
9204_ACEOF
9205if ac_fn_c_try_compile "$LINENO"; then :
9206
9207 # Check for potential -arch flags. It is not universal unless
9208 # there are at least two -arch flags with different values.
9209 ac_arch=
9210 ac_prev=
9211 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9212 if test -n "$ac_prev"; then
9213 case $ac_word in
9214 i?86 | x86_64 | ppc | ppc64)
9215 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9216 ac_arch=$ac_word
9217 else
9218 ac_cv_c_bigendian=universal
9219 break
9220 fi
9221 ;;
9222 esac
9223 ac_prev=
9224 elif test "x$ac_word" = "x-arch"; then
9225 ac_prev=arch
9226 fi
9227 done
9228fi
9229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9230 if test $ac_cv_c_bigendian = unknown; then
9231 # See if sys/param.h defines the BYTE_ORDER macro.
9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9233/* end confdefs.h. */
a9322a30 9234#include <sys/types.h>
81ecdfbb 9235 #include <sys/param.h>
a9322a30
TT
9236
9237int
9238main ()
9239{
81ecdfbb
RW
9240#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9241 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9242 && LITTLE_ENDIAN)
9243 bogus endian macros
9244 #endif
a9322a30
TT
9245
9246 ;
9247 return 0;
9248}
bec39cab 9249_ACEOF
81ecdfbb 9250if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9251 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9253/* end confdefs.h. */
a9322a30 9254#include <sys/types.h>
81ecdfbb 9255 #include <sys/param.h>
a9322a30
TT
9256
9257int
9258main ()
9259{
9260#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9261 not big endian
9262 #endif
a9322a30
TT
9263
9264 ;
9265 return 0;
9266}
bec39cab 9267_ACEOF
81ecdfbb 9268if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9269 ac_cv_c_bigendian=yes
5ee754fc 9270else
81ecdfbb 9271 ac_cv_c_bigendian=no
5ee754fc 9272fi
81ecdfbb
RW
9273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9274fi
9275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9276 fi
9277 if test $ac_cv_c_bigendian = unknown; then
9278 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9280/* end confdefs.h. */
9281#include <limits.h>
bec39cab 9282
81ecdfbb
RW
9283int
9284main ()
9285{
9286#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9287 bogus endian macros
9288 #endif
9289
9290 ;
9291 return 0;
9292}
7eb368b3 9293_ACEOF
81ecdfbb
RW
9294if ac_fn_c_try_compile "$LINENO"; then :
9295 # It does; now see whether it defined to _BIG_ENDIAN or not.
9296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9297/* end confdefs.h. */
81ecdfbb
RW
9298#include <limits.h>
9299
7eb368b3
NR
9300int
9301main ()
9302{
81ecdfbb
RW
9303#ifndef _BIG_ENDIAN
9304 not big endian
9305 #endif
9306
7eb368b3
NR
9307 ;
9308 return 0;
9309}
9310_ACEOF
81ecdfbb 9311if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9312 ac_cv_c_bigendian=yes
81ecdfbb
RW
9313else
9314 ac_cv_c_bigendian=no
a9322a30 9315fi
81ecdfbb 9316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9317fi
81ecdfbb
RW
9318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9319 fi
9320 if test $ac_cv_c_bigendian = unknown; then
9321 # Compile a test program.
9322 if test "$cross_compiling" = yes; then :
9323 # Try to guess by grepping values from an object file.
9324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9325/* end confdefs.h. */
9326short int ascii_mm[] =
9327 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9328 short int ascii_ii[] =
9329 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9330 int use_ascii (int i) {
9331 return ascii_mm[i] + ascii_ii[i];
9332 }
9333 short int ebcdic_ii[] =
9334 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9335 short int ebcdic_mm[] =
9336 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9337 int use_ebcdic (int i) {
9338 return ebcdic_mm[i] + ebcdic_ii[i];
9339 }
9340 extern int foo;
7eb368b3 9341
81ecdfbb
RW
9342int
9343main ()
9344{
9345return use_ascii (foo) == use_ebcdic (foo);
9346 ;
9347 return 0;
9348}
9349_ACEOF
9350if ac_fn_c_try_compile "$LINENO"; then :
9351 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9352 ac_cv_c_bigendian=yes
9353 fi
9354 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9355 if test "$ac_cv_c_bigendian" = unknown; then
9356 ac_cv_c_bigendian=no
9357 else
9358 # finding both strings is unlikely to happen, but who knows?
9359 ac_cv_c_bigendian=unknown
9360 fi
9361 fi
7eb368b3 9362fi
81ecdfbb 9363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9364else
81ecdfbb 9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9366/* end confdefs.h. */
81ecdfbb 9367$ac_includes_default
d3ea6809
MM
9368int
9369main ()
9370{
81ecdfbb
RW
9371
9372 /* Are we little or big endian? From Harbison&Steele. */
9373 union
9374 {
9375 long int l;
9376 char c[sizeof (long int)];
9377 } u;
9378 u.l = 1;
9379 return u.c[sizeof (long int) - 1] == 1;
9380
9381 ;
9382 return 0;
d3ea6809
MM
9383}
9384_ACEOF
81ecdfbb 9385if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9386 ac_cv_c_bigendian=no
d3ea6809 9387else
81ecdfbb 9388 ac_cv_c_bigendian=yes
d3ea6809 9389fi
81ecdfbb
RW
9390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9391 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9392fi
a9322a30 9393
81ecdfbb
RW
9394 fi
9395fi
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9397$as_echo "$ac_cv_c_bigendian" >&6; }
9398 case $ac_cv_c_bigendian in #(
9399 yes)
9400 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9401;; #(
9402 no)
9403 ;; #(
9404 universal)
9405
9406$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9407
9408 ;; #(
9409 *)
9410 as_fn_error "unknown endianness
9411 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9412 esac
d3ea6809
MM
9413
9414
a9322a30
TT
9415# ------------------------------ #
9416# Checks for library functions. #
9417# ------------------------------ #
d3ea6809 9418
a9322a30
TT
9419# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9420# for constant arguments. Useless!
81ecdfbb
RW
9421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9422$as_echo_n "checking for working alloca.h... " >&6; }
9423if test "${ac_cv_working_alloca_h+set}" = set; then :
9424 $as_echo_n "(cached) " >&6
d3ea6809 9425else
81ecdfbb 9426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9427/* end confdefs.h. */
a9322a30 9428#include <alloca.h>
bec39cab
AC
9429int
9430main ()
9431{
a9322a30 9432char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9433 if (p) return 0;
bec39cab
AC
9434 ;
9435 return 0;
9436}
9437_ACEOF
81ecdfbb 9438if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9439 ac_cv_working_alloca_h=yes
bec39cab 9440else
81ecdfbb 9441 ac_cv_working_alloca_h=no
bec39cab 9442fi
81ecdfbb
RW
9443rm -f core conftest.err conftest.$ac_objext \
9444 conftest$ac_exeext conftest.$ac_ext
bec39cab 9445fi
81ecdfbb
RW
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9447$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9448if test $ac_cv_working_alloca_h = yes; then
9449
81ecdfbb 9450$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9451
c906108c 9452fi
bec39cab 9453
81ecdfbb
RW
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9455$as_echo_n "checking for alloca... " >&6; }
9456if test "${ac_cv_func_alloca_works+set}" = set; then :
9457 $as_echo_n "(cached) " >&6
bec39cab 9458else
81ecdfbb 9459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9460/* end confdefs.h. */
a9322a30
TT
9461#ifdef __GNUC__
9462# define alloca __builtin_alloca
b4e70030 9463#else
a9322a30
TT
9464# ifdef _MSC_VER
9465# include <malloc.h>
9466# define alloca _alloca
9467# else
81ecdfbb 9468# ifdef HAVE_ALLOCA_H
a9322a30
TT
9469# include <alloca.h>
9470# else
9471# ifdef _AIX
9472 #pragma alloca
9473# else
9474# ifndef alloca /* predefined by HP cc +Olibcalls */
9475char *alloca ();
9476# endif
9477# endif
9478# endif
9479# endif
c906108c 9480#endif
97bf5e38 9481
bec39cab
AC
9482int
9483main ()
9484{
a9322a30 9485char *p = (char *) alloca (1);
81ecdfbb 9486 if (p) return 0;
bec39cab
AC
9487 ;
9488 return 0;
9489}
9490_ACEOF
81ecdfbb 9491if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9492 ac_cv_func_alloca_works=yes
bec39cab 9493else
81ecdfbb 9494 ac_cv_func_alloca_works=no
bec39cab 9495fi
81ecdfbb
RW
9496rm -f core conftest.err conftest.$ac_objext \
9497 conftest$ac_exeext conftest.$ac_ext
bec39cab 9498fi
81ecdfbb
RW
9499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9500$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9501
9502if test $ac_cv_func_alloca_works = yes; then
9503
81ecdfbb 9504$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9505
a9322a30
TT
9506else
9507 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9508# that cause trouble. Some versions do not even contain alloca or
9509# contain a buggy version. If you still want to use their alloca,
9510# use ar to extract alloca.o from them instead of compiling alloca.c.
9511
81ecdfbb 9512ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9513
81ecdfbb 9514$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9515
bec39cab 9516
81ecdfbb
RW
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9518$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9519if test "${ac_cv_os_cray+set}" = set; then :
9520 $as_echo_n "(cached) " >&6
a9322a30 9521else
81ecdfbb 9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9523/* end confdefs.h. */
81ecdfbb 9524#if defined CRAY && ! defined CRAY2
a9322a30
TT
9525webecray
9526#else
9527wenotbecray
9528#endif
9529
9530_ACEOF
9531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9532 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9533 ac_cv_os_cray=yes
9534else
81ecdfbb 9535 ac_cv_os_cray=no
bec39cab 9536fi
81ecdfbb
RW
9537rm -f conftest*
9538
bec39cab 9539fi
81ecdfbb
RW
9540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9541$as_echo "$ac_cv_os_cray" >&6; }
9542if test $ac_cv_os_cray = yes; then
9543 for ac_func in _getb67 GETB67 getb67; do
9544 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9545ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9546eval as_val=\$$as_ac_var
9547 if test "x$as_val" = x""yes; then :
a9322a30
TT
9548
9549cat >>confdefs.h <<_ACEOF
9550#define CRAY_STACKSEG_END $ac_func
bec39cab 9551_ACEOF
c906108c 9552
a9322a30 9553 break
c906108c
SS
9554fi
9555
a9322a30
TT
9556 done
9557fi
bec39cab 9558
81ecdfbb
RW
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9560$as_echo_n "checking stack direction for C alloca... " >&6; }
9561if test "${ac_cv_c_stack_direction+set}" = set; then :
9562 $as_echo_n "(cached) " >&6
a9322a30 9563else
81ecdfbb 9564 if test "$cross_compiling" = yes; then :
a9322a30 9565 ac_cv_c_stack_direction=0
bec39cab 9566else
81ecdfbb 9567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9568/* end confdefs.h. */
81ecdfbb 9569$ac_includes_default
a9322a30
TT
9570int
9571find_stack_direction ()
b4e70030 9572{
a9322a30
TT
9573 static char *addr = 0;
9574 auto char dummy;
9575 if (addr == 0)
9576 {
9577 addr = &dummy;
9578 return find_stack_direction ();
9579 }
9580 else
9581 return (&dummy > addr) ? 1 : -1;
b4e70030 9582}
b757528f 9583
bec39cab
AC
9584int
9585main ()
9586{
81ecdfbb 9587 return find_stack_direction () < 0;
bec39cab
AC
9588}
9589_ACEOF
81ecdfbb 9590if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9591 ac_cv_c_stack_direction=1
9592else
81ecdfbb 9593 ac_cv_c_stack_direction=-1
a9322a30 9594fi
81ecdfbb
RW
9595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9596 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9597fi
a9322a30 9598
81ecdfbb
RW
9599fi
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9601$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9602cat >>confdefs.h <<_ACEOF
9603#define STACK_DIRECTION $ac_cv_c_stack_direction
9604_ACEOF
9605
9606
9607fi
9608
a9322a30 9609for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9610do :
9611 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9612ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9613eval as_val=\$$as_ac_Header
9614 if test "x$as_val" = x""yes; then :
bec39cab 9615 cat >>confdefs.h <<_ACEOF
81ecdfbb 9616#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9617_ACEOF
b757528f 9618
b757528f 9619fi
bec39cab 9620
a9322a30 9621done
a3828db0 9622
a9322a30 9623for ac_func in getpagesize
81ecdfbb
RW
9624do :
9625 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9626if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9627 cat >>confdefs.h <<_ACEOF
81ecdfbb 9628#define HAVE_GETPAGESIZE 1
bec39cab 9629_ACEOF
bcb3dc3d 9630
bcb3dc3d
MK
9631fi
9632done
9633
81ecdfbb
RW
9634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9635$as_echo_n "checking for working mmap... " >&6; }
9636if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9637 $as_echo_n "(cached) " >&6
a9322a30 9638else
81ecdfbb 9639 if test "$cross_compiling" = yes; then :
a9322a30 9640 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9641else
81ecdfbb 9642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9643/* end confdefs.h. */
a9322a30
TT
9644$ac_includes_default
9645/* malloc might have been renamed as rpl_malloc. */
9646#undef malloc
bec39cab 9647
a9322a30
TT
9648/* Thanks to Mike Haertel and Jim Avera for this test.
9649 Here is a matrix of mmap possibilities:
9650 mmap private not fixed
9651 mmap private fixed at somewhere currently unmapped
9652 mmap private fixed at somewhere already mapped
9653 mmap shared not fixed
9654 mmap shared fixed at somewhere currently unmapped
9655 mmap shared fixed at somewhere already mapped
9656 For private mappings, we should verify that changes cannot be read()
9657 back from the file, nor mmap's back from the file at a different
9658 address. (There have been systems where private was not correctly
9659 implemented like the infamous i386 svr4.0, and systems where the
9660 VM page cache was not coherent with the file system buffer cache
9661 like early versions of FreeBSD and possibly contemporary NetBSD.)
9662 For shared mappings, we should conversely verify that changes get
9663 propagated back to all the places they're supposed to be.
bec39cab 9664
a9322a30
TT
9665 Grep wants private fixed already mapped.
9666 The main things grep needs to know about mmap are:
9667 * does it exist and is it safe to write into the mmap'd area
9668 * how to use it (BSD variants) */
8b9cf735 9669
a9322a30
TT
9670#include <fcntl.h>
9671#include <sys/mman.h>
8b9cf735 9672
81ecdfbb 9673#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9674char *malloc ();
a3828db0
MK
9675#endif
9676
a9322a30 9677/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9678#ifndef HAVE_GETPAGESIZE
a9322a30 9679/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9680# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9681# define HAVE_SYS_PARAM_H 1
9682# endif
9683
9684# ifdef _SC_PAGESIZE
9685# define getpagesize() sysconf(_SC_PAGESIZE)
9686# else /* no _SC_PAGESIZE */
81ecdfbb 9687# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9688# include <sys/param.h>
9689# ifdef EXEC_PAGESIZE
9690# define getpagesize() EXEC_PAGESIZE
9691# else /* no EXEC_PAGESIZE */
9692# ifdef NBPG
9693# define getpagesize() NBPG * CLSIZE
9694# ifndef CLSIZE
9695# define CLSIZE 1
9696# endif /* no CLSIZE */
9697# else /* no NBPG */
9698# ifdef NBPC
9699# define getpagesize() NBPC
9700# else /* no NBPC */
9701# ifdef PAGESIZE
9702# define getpagesize() PAGESIZE
9703# endif /* PAGESIZE */
9704# endif /* no NBPC */
9705# endif /* no NBPG */
9706# endif /* no EXEC_PAGESIZE */
9707# else /* no HAVE_SYS_PARAM_H */
9708# define getpagesize() 8192 /* punt totally */
9709# endif /* no HAVE_SYS_PARAM_H */
9710# endif /* no _SC_PAGESIZE */
9711
9712#endif /* no HAVE_GETPAGESIZE */
9713
bec39cab
AC
9714int
9715main ()
9716{
a9322a30
TT
9717 char *data, *data2, *data3;
9718 int i, pagesize;
9719 int fd;
9720
9721 pagesize = getpagesize ();
9722
9723 /* First, make a file with some known garbage in it. */
9724 data = (char *) malloc (pagesize);
9725 if (!data)
81ecdfbb 9726 return 1;
a9322a30
TT
9727 for (i = 0; i < pagesize; ++i)
9728 *(data + i) = rand ();
9729 umask (0);
9730 fd = creat ("conftest.mmap", 0600);
9731 if (fd < 0)
81ecdfbb 9732 return 1;
a9322a30 9733 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9734 return 1;
a9322a30
TT
9735 close (fd);
9736
9737 /* Next, try to mmap the file at a fixed address which already has
9738 something else allocated at it. If we can, also make sure that
9739 we see the same garbage. */
9740 fd = open ("conftest.mmap", O_RDWR);
9741 if (fd < 0)
81ecdfbb 9742 return 1;
a9322a30
TT
9743 data2 = (char *) malloc (2 * pagesize);
9744 if (!data2)
81ecdfbb
RW
9745 return 1;
9746 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9747 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9748 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9749 return 1;
a9322a30
TT
9750 for (i = 0; i < pagesize; ++i)
9751 if (*(data + i) != *(data2 + i))
81ecdfbb 9752 return 1;
a9322a30
TT
9753
9754 /* Finally, make sure that changes to the mapped area do not
9755 percolate back to the file as seen by read(). (This is a bug on
9756 some variants of i386 svr4.0.) */
9757 for (i = 0; i < pagesize; ++i)
9758 *(data2 + i) = *(data2 + i) + 1;
9759 data3 = (char *) malloc (pagesize);
9760 if (!data3)
81ecdfbb 9761 return 1;
a9322a30 9762 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9763 return 1;
a9322a30
TT
9764 for (i = 0; i < pagesize; ++i)
9765 if (*(data + i) != *(data3 + i))
81ecdfbb 9766 return 1;
a9322a30 9767 close (fd);
81ecdfbb 9768 return 0;
bec39cab
AC
9769}
9770_ACEOF
81ecdfbb 9771if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9772 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9773else
81ecdfbb 9774 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9775fi
81ecdfbb
RW
9776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9777 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9778fi
81ecdfbb 9779
a9322a30 9780fi
81ecdfbb
RW
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9782$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9783if test $ac_cv_func_mmap_fixed_mapped = yes; then
9784
81ecdfbb 9785$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9786
086ec9eb 9787fi
a9322a30 9788rm -f conftest.mmap
a3828db0 9789
81ecdfbb
RW
9790ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9791if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9792
a9322a30
TT
9793else
9794
9795cat >>confdefs.h <<_ACEOF
9796#define pid_t int
bec39cab 9797_ACEOF
086ec9eb
MK
9798
9799fi
9800
81ecdfbb
RW
9801for ac_header in vfork.h
9802do :
9803 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9804if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9805 cat >>confdefs.h <<_ACEOF
81ecdfbb 9806#define HAVE_VFORK_H 1
bec39cab 9807_ACEOF
c906108c
SS
9808
9809fi
a9322a30 9810
a3828db0 9811done
c906108c 9812
a9322a30 9813for ac_func in fork vfork
81ecdfbb
RW
9814do :
9815 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9816ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9817eval as_val=\$$as_ac_var
9818 if test "x$as_val" = x""yes; then :
a3828db0 9819 cat >>confdefs.h <<_ACEOF
81ecdfbb 9820#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9821_ACEOF
b83266a0 9822
97bf5e38 9823fi
a3828db0 9824done
b83266a0 9825
a9322a30 9826if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9828$as_echo_n "checking for working fork... " >&6; }
9829if test "${ac_cv_func_fork_works+set}" = set; then :
9830 $as_echo_n "(cached) " >&6
a9322a30 9831else
81ecdfbb 9832 if test "$cross_compiling" = yes; then :
a9322a30
TT
9833 ac_cv_func_fork_works=cross
9834else
81ecdfbb
RW
9835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9836/* end confdefs.h. */
9837$ac_includes_default
9838int
9839main ()
9840{
9841
9842 /* By Ruediger Kuhlmann. */
9843 return fork () < 0;
9844
9845 ;
9846 return 0;
9847}
a9322a30 9848_ACEOF
81ecdfbb 9849if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9850 ac_cv_func_fork_works=yes
9851else
81ecdfbb 9852 ac_cv_func_fork_works=no
a9322a30 9853fi
81ecdfbb
RW
9854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9855 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9856fi
81ecdfbb 9857
a9322a30 9858fi
81ecdfbb
RW
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9860$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9861
9862else
9863 ac_cv_func_fork_works=$ac_cv_func_fork
9864fi
9865if test "x$ac_cv_func_fork_works" = xcross; then
9866 case $host in
9867 *-*-amigaos* | *-*-msdosdjgpp*)
9868 # Override, as these systems have only a dummy fork() stub
9869 ac_cv_func_fork_works=no
9870 ;;
9871 *)
9872 ac_cv_func_fork_works=yes
9873 ;;
9874 esac
81ecdfbb
RW
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9876$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9877fi
9878ac_cv_func_vfork_works=$ac_cv_func_vfork
9879if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9881$as_echo_n "checking for working vfork... " >&6; }
9882if test "${ac_cv_func_vfork_works+set}" = set; then :
9883 $as_echo_n "(cached) " >&6
a9322a30 9884else
81ecdfbb 9885 if test "$cross_compiling" = yes; then :
a9322a30
TT
9886 ac_cv_func_vfork_works=cross
9887else
81ecdfbb 9888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9889/* end confdefs.h. */
9890/* Thanks to Paul Eggert for this test. */
81ecdfbb 9891$ac_includes_default
a9322a30 9892#include <sys/wait.h>
81ecdfbb 9893#ifdef HAVE_VFORK_H
a9322a30
TT
9894# include <vfork.h>
9895#endif
9896/* On some sparc systems, changes by the child to local and incoming
9897 argument registers are propagated back to the parent. The compiler
9898 is told about this with #include <vfork.h>, but some compilers
9899 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9900 static variable whose address is put into a register that is
9901 clobbered by the vfork. */
9902static void
9903#ifdef __cplusplus
9904sparc_address_test (int arg)
9905# else
9906sparc_address_test (arg) int arg;
9907#endif
9908{
9909 static pid_t child;
9910 if (!child) {
9911 child = vfork ();
9912 if (child < 0) {
9913 perror ("vfork");
9914 _exit(2);
9915 }
9916 if (!child) {
9917 arg = getpid();
9918 write(-1, "", 0);
9919 _exit (arg);
9920 }
9921 }
9922}
9923
9924int
9925main ()
9926{
9927 pid_t parent = getpid ();
9928 pid_t child;
9929
9930 sparc_address_test (0);
9931
9932 child = vfork ();
9933
9934 if (child == 0) {
9935 /* Here is another test for sparc vfork register problems. This
9936 test uses lots of local variables, at least as many local
9937 variables as main has allocated so far including compiler
9938 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9939 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9940 reuse the register of parent for one of the local variables,
9941 since it will think that parent can't possibly be used any more
9942 in this routine. Assigning to the local variable will thus
9943 munge parent in the parent process. */
9944 pid_t
9945 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9946 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9947 /* Convince the compiler that p..p7 are live; otherwise, it might
9948 use the same hardware register for all 8 local variables. */
9949 if (p != p1 || p != p2 || p != p3 || p != p4
9950 || p != p5 || p != p6 || p != p7)
9951 _exit(1);
9952
9953 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9954 from child file descriptors. If the child closes a descriptor
9955 before it execs or exits, this munges the parent's descriptor
9956 as well. Test for this by closing stdout in the child. */
9957 _exit(close(fileno(stdout)) != 0);
9958 } else {
9959 int status;
9960 struct stat st;
9961
9962 while (wait(&status) != child)
9963 ;
81ecdfbb 9964 return (
a9322a30
TT
9965 /* Was there some problem with vforking? */
9966 child < 0
9967
9968 /* Did the child fail? (This shouldn't happen.) */
9969 || status
9970
9971 /* Did the vfork/compiler bug occur? */
9972 || parent != getpid()
9973
9974 /* Did the file descriptor bug occur? */
9975 || fstat(fileno(stdout), &st) != 0
9976 );
9977 }
9978}
9979_ACEOF
81ecdfbb 9980if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9981 ac_cv_func_vfork_works=yes
9982else
81ecdfbb 9983 ac_cv_func_vfork_works=no
a9322a30 9984fi
81ecdfbb
RW
9985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9986 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9987fi
81ecdfbb 9988
a9322a30 9989fi
81ecdfbb
RW
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9991$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
9992
9993fi;
9994if test "x$ac_cv_func_fork_works" = xcross; then
9995 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9997$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9998fi
9999
10000if test "x$ac_cv_func_vfork_works" = xyes; then
10001
81ecdfbb 10002$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10003
10004else
10005
81ecdfbb 10006$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10007
10008fi
10009if test "x$ac_cv_func_fork_works" = xyes; then
10010
81ecdfbb 10011$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10012
10013fi
10014
7313baad 10015for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10016 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10017 sbrk setpgid setpgrp setsid \
a9322a30 10018 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10019 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10020 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10021do :
10022 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10023ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10024eval as_val=\$$as_ac_var
10025 if test "x$as_val" = x""yes; then :
6c7a06a3 10026 cat >>confdefs.h <<_ACEOF
81ecdfbb 10027#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10028_ACEOF
10029
10030fi
10031done
10032
10033
81ecdfbb
RW
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10035$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10036if test "${am_cv_langinfo_codeset+set}" = set; then :
10037 $as_echo_n "(cached) " >&6
6c7a06a3 10038else
81ecdfbb 10039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10040/* end confdefs.h. */
10041#include <langinfo.h>
10042int
10043main ()
10044{
10045char* cs = nl_langinfo(CODESET);
bec39cab
AC
10046 ;
10047 return 0;
10048}
10049_ACEOF
81ecdfbb 10050if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10051 am_cv_langinfo_codeset=yes
a4db0f07 10052else
81ecdfbb 10053 am_cv_langinfo_codeset=no
a4db0f07 10054fi
81ecdfbb
RW
10055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10057
a4db0f07 10058fi
81ecdfbb
RW
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10060$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10061 if test $am_cv_langinfo_codeset = yes; then
10062
81ecdfbb 10063$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10064
6c7a06a3 10065 fi
c906108c 10066
06825bd1 10067
a3828db0
MK
10068# Check the return and argument types of ptrace. No canned test for
10069# this, so roll our own.
10070gdb_ptrace_headers='
10071#if HAVE_SYS_TYPES_H
10072# include <sys/types.h>
10073#endif
10074#if HAVE_SYS_PTRACE_H
10075# include <sys/ptrace.h>
10076#endif
10077#if HAVE_UNISTD_H
10078# include <unistd.h>
10079#endif
10080'
10081# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10082ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10083"
10084if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10085 ac_have_decl=1
06825bd1 10086else
81ecdfbb 10087 ac_have_decl=0
06825bd1 10088fi
06825bd1 10089
a3828db0 10090cat >>confdefs.h <<_ACEOF
81ecdfbb 10091#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10092_ACEOF
81ecdfbb 10093if test $ac_have_decl = 1; then :
bec39cab 10094
a3828db0 10095else
a3828db0
MK
10096
10097 : ${gdb_cv_func_ptrace_ret='int'}
10098 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10099
06825bd1
MK
10100fi
10101
064ef605
DJ
10102# Check return type. Varargs (used on GNU/Linux) conflict with the
10103# empty argument list, so check for that explicitly.
81ecdfbb
RW
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10105$as_echo_n "checking return type of ptrace... " >&6; }
10106if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10107 $as_echo_n "(cached) " >&6
bec39cab 10108else
81ecdfbb 10109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10110/* end confdefs.h. */
a3828db0 10111$gdb_ptrace_headers
bec39cab
AC
10112int
10113main ()
10114{
064ef605
DJ
10115extern long ptrace (enum __ptrace_request, ...);
10116 ;
10117 return 0;
10118}
10119_ACEOF
81ecdfbb 10120if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10121 gdb_cv_func_ptrace_ret='long'
10122else
81ecdfbb 10123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10124/* end confdefs.h. */
10125$gdb_ptrace_headers
10126int
10127main ()
10128{
a3828db0 10129extern int ptrace ();
bec39cab
AC
10130 ;
10131 return 0;
10132}
10133_ACEOF
81ecdfbb 10134if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10135 gdb_cv_func_ptrace_ret='int'
70f9f479 10136else
81ecdfbb 10137 gdb_cv_func_ptrace_ret='long'
70f9f479 10138fi
81ecdfbb 10139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10140fi
81ecdfbb 10141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10142fi
81ecdfbb
RW
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10144$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10145
a3828db0
MK
10146cat >>confdefs.h <<_ACEOF
10147#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10148_ACEOF
70f9f479 10149
a3828db0 10150# Check argument types.
81ecdfbb
RW
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10152$as_echo_n "checking types of arguments for ptrace... " >&6; }
10153if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10154 $as_echo_n "(cached) " >&6
bec39cab 10155else
a3828db0 10156
81ecdfbb 10157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10158/* end confdefs.h. */
10159$gdb_ptrace_headers
10160int
10161main ()
10162{
10163extern long ptrace (enum __ptrace_request, ...);
10164 ;
10165 return 0;
10166}
10167_ACEOF
81ecdfbb 10168if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10169 gdb_cv_func_ptrace_args='int,int,long,long'
10170else
064ef605 10171
a3828db0
MK
10172for gdb_arg1 in 'int' 'long'; do
10173 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10174 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10175 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10177/* end confdefs.h. */
a3828db0 10178$gdb_ptrace_headers
bec39cab
AC
10179int
10180main ()
10181{
a3828db0
MK
10182
10183extern $gdb_cv_func_ptrace_ret
10184 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10185
bec39cab
AC
10186 ;
10187 return 0;
10188}
10189_ACEOF
81ecdfbb 10190if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10191 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10192 break 4;
5c7f2947 10193fi
81ecdfbb 10194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10195 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10197/* end confdefs.h. */
a3828db0 10198$gdb_ptrace_headers
bec39cab
AC
10199int
10200main ()
10201{
a3828db0
MK
10202
10203extern $gdb_cv_func_ptrace_ret
10204 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10205
bec39cab
AC
10206 ;
10207 return 0;
10208}
10209_ACEOF
81ecdfbb 10210if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10211
10212gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10213 break 5;
78434e59 10214fi
81ecdfbb 10215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10216 done
10217 done
10218 done
10219 done
10220done
10221# Provide a safe default value.
10222: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10223
064ef605 10224fi
81ecdfbb 10225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10226fi
81ecdfbb
RW
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10228$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10229ac_save_IFS=$IFS; IFS=','
10230set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10231IFS=$ac_save_IFS
10232shift
bec39cab 10233
a3828db0
MK
10234cat >>confdefs.h <<_ACEOF
10235#define PTRACE_TYPE_ARG3 $3
10236_ACEOF
10237
10238if test -n "$5"; then
10239
10240cat >>confdefs.h <<_ACEOF
10241#define PTRACE_TYPE_ARG5 $5
bec39cab 10242_ACEOF
78434e59
MK
10243
10244fi
10245
a3828db0 10246if test "$cross_compiling" = no; then
81ecdfbb
RW
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10248$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10249if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10250 $as_echo_n "(cached) " >&6
a3828db0 10251else
81ecdfbb
RW
10252 if test "$cross_compiling" = yes; then :
10253 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10254else
81ecdfbb 10255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10256/* end confdefs.h. */
81ecdfbb 10257$ac_includes_default
bec39cab
AC
10258int
10259main ()
10260{
a3828db0
MK
10261/* If this system has a BSD-style setpgrp which takes arguments,
10262 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10263 exit successfully. */
81ecdfbb 10264 return setpgrp (1,1) != -1;
bec39cab
AC
10265 ;
10266 return 0;
10267}
10268_ACEOF
81ecdfbb 10269if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10270 ac_cv_func_setpgrp_void=no
c906108c 10271else
81ecdfbb 10272 ac_cv_func_setpgrp_void=yes
c906108c 10273fi
81ecdfbb
RW
10274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10275 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10276fi
81ecdfbb 10277
a3828db0 10278fi
81ecdfbb
RW
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10280$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10281if test $ac_cv_func_setpgrp_void = yes; then
10282
81ecdfbb 10283$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10284
10285fi
a3828db0
MK
10286
10287else
81ecdfbb
RW
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10289$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10290if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10291 $as_echo_n "(cached) " >&6
97bf5e38 10292else
81ecdfbb 10293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10294/* end confdefs.h. */
a3828db0
MK
10295
10296#include <unistd.h>
10297
bec39cab
AC
10298int
10299main ()
10300{
a3828db0
MK
10301
10302 if (setpgrp(1,1) == -1)
10303 exit (0);
10304 else
10305 exit (1);
10306
bec39cab
AC
10307 ;
10308 return 0;
10309}
10310_ACEOF
81ecdfbb 10311if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10312 ac_cv_func_setpgrp_void=no
c906108c 10313else
81ecdfbb 10314 ac_cv_func_setpgrp_void=yes
c906108c 10315fi
81ecdfbb 10316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10317fi
81ecdfbb
RW
10318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10319$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10320if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10321 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10322
a3828db0 10323fi
c906108c
SS
10324fi
10325
a3828db0
MK
10326# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10327# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10329$as_echo_n "checking for sigsetjmp... " >&6; }
10330if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10331 $as_echo_n "(cached) " >&6
bec39cab 10332else
81ecdfbb 10333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10334/* end confdefs.h. */
a3828db0
MK
10335
10336#include <setjmp.h>
10337
bec39cab
AC
10338int
10339main ()
10340{
a3828db0 10341sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10342 ;
10343 return 0;
10344}
10345_ACEOF
81ecdfbb 10346if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10347 gdb_cv_func_sigsetjmp=yes
c906108c 10348else
81ecdfbb 10349 gdb_cv_func_sigsetjmp=no
c906108c 10350fi
81ecdfbb 10351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10352fi
81ecdfbb
RW
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10354$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10355if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10356
81ecdfbb 10357$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10358
97bf5e38 10359fi
c906108c 10360
a3828db0
MK
10361# Assume we'll default to using the included libiberty regex.
10362gdb_use_included_regex=yes
10363
10364# However, if the system regex is GNU regex, then default to *not*
10365# using the included regex.
81ecdfbb
RW
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10367$as_echo_n "checking for GNU regex... " >&6; }
10368if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10369 $as_echo_n "(cached) " >&6
bec39cab 10370else
81ecdfbb 10371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10372/* end confdefs.h. */
a3828db0 10373#include <gnu-versions.h>
bec39cab
AC
10374int
10375main ()
10376{
81ecdfbb
RW
10377#define REGEX_INTERFACE_VERSION 1
10378#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10379# error "Version mismatch"
10380#endif
5c45e068
MK
10381 ;
10382 return 0;
10383}
10384_ACEOF
81ecdfbb
RW
10385if ac_fn_c_try_compile "$LINENO"; then :
10386 gdb_cv_have_gnu_regex=yes
5c45e068 10387else
81ecdfbb
RW
10388 gdb_cv_have_gnu_regex=no
10389fi
10390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10391fi
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10393$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10394if test $gdb_cv_have_gnu_regex = yes; then
10395 gdb_use_included_regex=no
5c45e068 10396fi
81ecdfbb
RW
10397
10398
10399# Check whether --with-included-regex was given.
10400if test "${with_included_regex+set}" = set; then :
10401 withval=$with_included_regex; gdb_with_regex=$withval
10402else
10403 gdb_with_regex=$gdb_use_included_regex
c906108c 10404fi
81ecdfbb
RW
10405
10406if test "$gdb_with_regex" = yes; then
10407
10408$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10409
c906108c 10410fi
81ecdfbb
RW
10411
10412# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10413ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10414#include <sys/proc.h>
10415
10416"
10417if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10418
5c45e068 10419cat >>confdefs.h <<_ACEOF
a3828db0 10420#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10421_ACEOF
c906108c 10422
5c45e068 10423
97bf5e38 10424fi
c906108c 10425
5c45e068 10426
a3828db0 10427# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10429$as_echo_n "checking for struct lwp... " >&6; }
10430if test "${gdb_cv_struct_lwp+set}" = set; then :
10431 $as_echo_n "(cached) " >&6
bec39cab 10432else
81ecdfbb 10433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10434/* end confdefs.h. */
a3828db0
MK
10435#include <sys/param.h>
10436#include <sys/lwp.h>
bec39cab
AC
10437int
10438main ()
10439{
a3828db0 10440struct lwp l;
bec39cab
AC
10441 ;
10442 return 0;
10443}
10444_ACEOF
81ecdfbb 10445if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10446 gdb_cv_struct_lwp=yes
c906108c 10447else
81ecdfbb 10448 gdb_cv_struct_lwp=no
c906108c 10449fi
81ecdfbb 10450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10451fi
81ecdfbb
RW
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10453$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10454if test $gdb_cv_struct_lwp = yes; then
c906108c 10455
81ecdfbb 10456$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10457
97bf5e38 10458fi
c906108c 10459
a3828db0 10460# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10462$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10463if test "${gdb_cv_struct_reg+set}" = set; then :
10464 $as_echo_n "(cached) " >&6
bec39cab 10465else
81ecdfbb 10466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10467/* end confdefs.h. */
a3828db0
MK
10468#include <sys/types.h>
10469#include <machine/reg.h>
bec39cab
AC
10470int
10471main ()
10472{
a3828db0 10473struct reg r;
bec39cab
AC
10474 ;
10475 return 0;
10476}
10477_ACEOF
81ecdfbb 10478if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10479 gdb_cv_struct_reg=yes
27ca5dad 10480else
81ecdfbb 10481 gdb_cv_struct_reg=no
27ca5dad 10482fi
81ecdfbb 10483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10484fi
81ecdfbb
RW
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10486$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10487if test $gdb_cv_struct_reg = yes; then
bec39cab 10488
81ecdfbb 10489$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10490
10491fi
97bf5e38 10492
a3828db0
MK
10493# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10494# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10495ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10496"
10497if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10498
10499cat >>confdefs.h <<_ACEOF
a3828db0 10500#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10501_ACEOF
3862412b 10502
5c45e068 10503
97bf5e38 10504fi
81ecdfbb
RW
10505ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10506"
10507if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10508
10509cat >>confdefs.h <<_ACEOF
a3828db0 10510#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10511_ACEOF
3862412b 10512
5c45e068 10513
97bf5e38 10514fi
3862412b 10515
5c45e068 10516
a3828db0 10517# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10519$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10520if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10521 $as_echo_n "(cached) " >&6
451928c5 10522else
81ecdfbb 10523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10524/* end confdefs.h. */
a3828db0 10525#include <sys/ptrace.h>
bec39cab
AC
10526int
10527main ()
10528{
a3828db0 10529PTRACE_GETREGS;
bec39cab
AC
10530 ;
10531 return 0;
10532}
10533_ACEOF
81ecdfbb 10534if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10535 gdb_cv_have_ptrace_getregs=yes
451928c5 10536else
81ecdfbb 10537 gdb_cv_have_ptrace_getregs=no
451928c5 10538fi
81ecdfbb 10539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10540fi
10541
81ecdfbb
RW
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10543$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10544if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10545
81ecdfbb 10546$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10547
97bf5e38 10548fi
451928c5 10549
a3828db0 10550# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10552$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10553if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10554 $as_echo_n "(cached) " >&6
451928c5 10555else
81ecdfbb 10556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10557/* end confdefs.h. */
a3828db0 10558#include <sys/ptrace.h>
bec39cab
AC
10559int
10560main ()
10561{
a3828db0 10562PTRACE_GETFPXREGS;
bec39cab
AC
10563 ;
10564 return 0;
10565}
10566_ACEOF
81ecdfbb 10567if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10568 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10569else
81ecdfbb 10570 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10571fi
81ecdfbb 10572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10573fi
10574
81ecdfbb
RW
10575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10576$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10577if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10578
81ecdfbb 10579$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10580
97bf5e38 10581fi
451928c5 10582
a3828db0 10583# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10585$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10586if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10587 $as_echo_n "(cached) " >&6
3862412b 10588else
81ecdfbb 10589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10590/* end confdefs.h. */
a3828db0
MK
10591#include <sys/types.h>
10592#include <sys/ptrace.h>
bec39cab
AC
10593int
10594main ()
10595{
a3828db0 10596PT_GETDBREGS;
bec39cab
AC
10597 ;
10598 return 0;
10599}
10600_ACEOF
81ecdfbb 10601if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10602 gdb_cv_have_pt_getdbregs=yes
3862412b 10603else
81ecdfbb 10604 gdb_cv_have_pt_getdbregs=no
3862412b 10605fi
81ecdfbb 10606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10607fi
10608
81ecdfbb
RW
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10610$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10611if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10612
81ecdfbb 10613$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10614
97bf5e38 10615fi
3862412b 10616
a3828db0 10617# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10619$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10620if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10621 $as_echo_n "(cached) " >&6
3862412b 10622else
81ecdfbb 10623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10624/* end confdefs.h. */
a3828db0
MK
10625#include <sys/types.h>
10626#include <sys/ptrace.h>
bec39cab
AC
10627int
10628main ()
10629{
a3828db0 10630PT_GETXMMREGS;
bec39cab
AC
10631 ;
10632 return 0;
10633}
10634_ACEOF
81ecdfbb 10635if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10636 gdb_cv_have_pt_getxmmregs=yes
3862412b 10637else
81ecdfbb 10638 gdb_cv_have_pt_getxmmregs=no
3862412b 10639fi
81ecdfbb 10640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10641fi
10642
81ecdfbb
RW
10643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10644$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10645if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10646
81ecdfbb 10647$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10648
97bf5e38 10649fi
3862412b 10650
eb368090 10651# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10652
10653if test "${target}" = "${host}"; then
10654 case "${host}" in
97bf5e38 10655 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10656
81ecdfbb 10657$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10658
10659 ;;
c162e8c9 10660 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10661
81ecdfbb 10662$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10663
10664 ;;
10665 mips-sgi-irix5*)
10666 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10667
81ecdfbb 10668$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10669
10670 ;;
10671 esac
10672fi
10673
10674if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10676$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10677 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10678 $as_echo_n "(cached) " >&6
bec39cab 10679else
81ecdfbb 10680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10681/* end confdefs.h. */
596c9d4b
KB
10682
10683#define _SYSCALL32
d30c5336
JK
10684/* Needed for new procfs interface on sparc-solaris. */
10685#define _STRUCTURED_PROC 1
596c9d4b 10686#include <sys/procfs.h>
bec39cab
AC
10687int
10688main ()
10689{
97bf5e38 10690pstatus_t avar
bec39cab
AC
10691 ;
10692 return 0;
10693}
10694_ACEOF
81ecdfbb 10695if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10696 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10697else
81ecdfbb 10698 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10699
596c9d4b 10700fi
81ecdfbb 10701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10702fi
10703
97bf5e38 10704 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10705
81ecdfbb 10706$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10707
10708 fi
81ecdfbb
RW
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10710$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10711
81ecdfbb
RW
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10713$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10714 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10715 $as_echo_n "(cached) " >&6
596c9d4b 10716else
81ecdfbb 10717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10718/* end confdefs.h. */
596c9d4b
KB
10719
10720#define _SYSCALL32
d30c5336
JK
10721/* Needed for new procfs interface on sparc-solaris. */
10722#define _STRUCTURED_PROC 1
596c9d4b 10723#include <sys/procfs.h>
bec39cab
AC
10724int
10725main ()
10726{
97bf5e38 10727prrun_t avar
bec39cab
AC
10728 ;
10729 return 0;
10730}
10731_ACEOF
81ecdfbb 10732if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10733 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10734else
81ecdfbb 10735 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10736
596c9d4b 10737fi
81ecdfbb 10738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10739fi
10740
97bf5e38 10741 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10742
81ecdfbb 10743$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10744
10745 fi
81ecdfbb
RW
10746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10747$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10748
81ecdfbb
RW
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10750$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10751 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10752 $as_echo_n "(cached) " >&6
596c9d4b 10753else
81ecdfbb 10754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10755/* end confdefs.h. */
596c9d4b
KB
10756
10757#define _SYSCALL32
d30c5336
JK
10758/* Needed for new procfs interface on sparc-solaris. */
10759#define _STRUCTURED_PROC 1
596c9d4b 10760#include <sys/procfs.h>
bec39cab
AC
10761int
10762main ()
10763{
97bf5e38 10764gregset_t avar
bec39cab
AC
10765 ;
10766 return 0;
10767}
10768_ACEOF
81ecdfbb 10769if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10770 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10771else
81ecdfbb 10772 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10773
596c9d4b 10774fi
81ecdfbb 10775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10776fi
10777
97bf5e38 10778 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10779
81ecdfbb 10780$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10781
10782 fi
81ecdfbb
RW
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10784$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10785
81ecdfbb
RW
10786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10787$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10788 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10789 $as_echo_n "(cached) " >&6
d84dd0c5 10790else
81ecdfbb 10791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10792/* end confdefs.h. */
97bf5e38
MK
10793
10794#define _SYSCALL32
d30c5336
JK
10795/* Needed for new procfs interface on sparc-solaris. */
10796#define _STRUCTURED_PROC 1
d84dd0c5 10797#include <sys/procfs.h>
bec39cab
AC
10798int
10799main ()
10800{
97bf5e38 10801fpregset_t avar
bec39cab
AC
10802 ;
10803 return 0;
10804}
10805_ACEOF
81ecdfbb 10806if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10807 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10808else
81ecdfbb 10809 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10810
d84dd0c5 10811fi
81ecdfbb 10812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10813fi
10814
97bf5e38 10815 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10816
81ecdfbb 10817$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10818
97bf5e38 10819 fi
81ecdfbb
RW
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10821$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 10822
81ecdfbb
RW
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10824$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10825 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
10826 $as_echo_n "(cached) " >&6
c906108c 10827else
81ecdfbb 10828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10829/* end confdefs.h. */
c906108c 10830
97bf5e38 10831#define _SYSCALL32
d30c5336
JK
10832/* Needed for new procfs interface on sparc-solaris. */
10833#define _STRUCTURED_PROC 1
97bf5e38 10834#include <sys/procfs.h>
bec39cab
AC
10835int
10836main ()
10837{
97bf5e38 10838prgregset_t avar
bec39cab
AC
10839 ;
10840 return 0;
10841}
10842_ACEOF
81ecdfbb 10843if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10844 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 10845else
81ecdfbb 10846 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 10847
c906108c 10848fi
81ecdfbb 10849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
10850fi
10851
97bf5e38 10852 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 10853
81ecdfbb 10854$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 10855
97bf5e38 10856 fi
81ecdfbb
RW
10857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10858$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 10859
81ecdfbb
RW
10860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10861$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10862 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
10863 $as_echo_n "(cached) " >&6
d45fe813 10864else
81ecdfbb 10865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10866/* end confdefs.h. */
97bf5e38
MK
10867
10868#define _SYSCALL32
d30c5336
JK
10869/* Needed for new procfs interface on sparc-solaris. */
10870#define _STRUCTURED_PROC 1
97bf5e38 10871#include <sys/procfs.h>
bec39cab
AC
10872int
10873main ()
10874{
97bf5e38 10875prfpregset_t avar
bec39cab
AC
10876 ;
10877 return 0;
10878}
10879_ACEOF
81ecdfbb 10880if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10881 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 10882else
81ecdfbb 10883 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 10884
d45fe813 10885fi
81ecdfbb 10886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10887fi
10888
97bf5e38 10889 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 10890
81ecdfbb 10891$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 10892
97bf5e38 10893 fi
81ecdfbb
RW
10894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10895$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 10896
81ecdfbb
RW
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10898$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10899 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
10900 $as_echo_n "(cached) " >&6
d45fe813 10901else
81ecdfbb 10902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10903/* end confdefs.h. */
97bf5e38
MK
10904
10905#define _SYSCALL32
d30c5336
JK
10906/* Needed for new procfs interface on sparc-solaris. */
10907#define _STRUCTURED_PROC 1
97bf5e38 10908#include <sys/procfs.h>
bec39cab
AC
10909int
10910main ()
10911{
97bf5e38 10912prgregset32_t avar
bec39cab
AC
10913 ;
10914 return 0;
10915}
10916_ACEOF
81ecdfbb 10917if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10918 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 10919else
81ecdfbb 10920 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 10921
d45fe813 10922fi
81ecdfbb 10923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10924fi
10925
97bf5e38 10926 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 10927
81ecdfbb 10928$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 10929
97bf5e38 10930 fi
81ecdfbb
RW
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10932$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 10933
81ecdfbb
RW
10934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
10935$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
10936 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
10937 $as_echo_n "(cached) " >&6
d45fe813 10938else
81ecdfbb 10939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10940/* end confdefs.h. */
97bf5e38
MK
10941
10942#define _SYSCALL32
d30c5336
JK
10943/* Needed for new procfs interface on sparc-solaris. */
10944#define _STRUCTURED_PROC 1
97bf5e38 10945#include <sys/procfs.h>
bec39cab
AC
10946int
10947main ()
10948{
97bf5e38 10949prfpregset32_t avar
bec39cab
AC
10950 ;
10951 return 0;
10952}
10953_ACEOF
81ecdfbb 10954if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10955 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 10956else
81ecdfbb 10957 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 10958
d45fe813 10959fi
81ecdfbb 10960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10961fi
10962
97bf5e38 10963 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 10964
81ecdfbb 10965$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 10966
97bf5e38 10967 fi
81ecdfbb
RW
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
10969$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 10970
81ecdfbb
RW
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10972$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10973 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
10974 $as_echo_n "(cached) " >&6
d45fe813 10975else
81ecdfbb 10976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10977/* end confdefs.h. */
97bf5e38 10978
d45fe813 10979#define _SYSCALL32
d30c5336
JK
10980/* Needed for new procfs interface on sparc-solaris. */
10981#define _STRUCTURED_PROC 1
97bf5e38 10982#include <sys/procfs.h>
bec39cab
AC
10983int
10984main ()
10985{
97bf5e38 10986lwpid_t avar
bec39cab
AC
10987 ;
10988 return 0;
10989}
10990_ACEOF
81ecdfbb 10991if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10992 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 10993else
81ecdfbb 10994 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 10995
d45fe813 10996fi
81ecdfbb 10997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10998fi
10999
97bf5e38 11000 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11001
81ecdfbb 11002$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11003
97bf5e38 11004 fi
81ecdfbb
RW
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11006$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11007
81ecdfbb
RW
11008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11009$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11010 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11011 $as_echo_n "(cached) " >&6
c906108c 11012else
81ecdfbb 11013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11014/* end confdefs.h. */
c906108c 11015
97bf5e38 11016#define _SYSCALL32
d30c5336
JK
11017/* Needed for new procfs interface on sparc-solaris. */
11018#define _STRUCTURED_PROC 1
97bf5e38 11019#include <sys/procfs.h>
bec39cab
AC
11020int
11021main ()
11022{
97bf5e38 11023psaddr_t avar
bec39cab
AC
11024 ;
11025 return 0;
11026}
11027_ACEOF
81ecdfbb 11028if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11029 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11030else
81ecdfbb 11031 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11032
c906108c 11033fi
81ecdfbb 11034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11035fi
11036
97bf5e38 11037 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11038
81ecdfbb 11039$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11040
97bf5e38 11041 fi
81ecdfbb
RW
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11043$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11044
81ecdfbb
RW
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11046$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11047 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11048 $as_echo_n "(cached) " >&6
c906108c 11049else
81ecdfbb 11050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11051/* end confdefs.h. */
c906108c 11052
97bf5e38 11053#define _SYSCALL32
d30c5336
JK
11054/* Needed for new procfs interface on sparc-solaris. */
11055#define _STRUCTURED_PROC 1
97bf5e38 11056#include <sys/procfs.h>
bec39cab
AC
11057int
11058main ()
11059{
97bf5e38 11060prsysent_t avar
bec39cab
AC
11061 ;
11062 return 0;
11063}
11064_ACEOF
81ecdfbb 11065if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11066 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11067else
81ecdfbb 11068 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11069
c906108c 11070fi
81ecdfbb 11071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11072fi
11073
97bf5e38 11074 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11075
81ecdfbb 11076$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11077
97bf5e38 11078 fi
81ecdfbb
RW
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11080$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11081
81ecdfbb
RW
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11083$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11084 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11085 $as_echo_n "(cached) " >&6
c906108c 11086else
81ecdfbb 11087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11088/* end confdefs.h. */
c906108c 11089
97bf5e38 11090#define _SYSCALL32
d30c5336
JK
11091/* Needed for new procfs interface on sparc-solaris. */
11092#define _STRUCTURED_PROC 1
97bf5e38 11093#include <sys/procfs.h>
bec39cab
AC
11094int
11095main ()
11096{
97bf5e38 11097pr_sigset_t avar
bec39cab
AC
11098 ;
11099 return 0;
11100}
11101_ACEOF
81ecdfbb 11102if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11103 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11104else
81ecdfbb 11105 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11106
c906108c 11107fi
81ecdfbb 11108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11109fi
11110
97bf5e38 11111 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11112
81ecdfbb 11113$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11114
97bf5e38 11115 fi
81ecdfbb
RW
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11117$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11118
81ecdfbb
RW
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11120$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11121 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11122 $as_echo_n "(cached) " >&6
c906108c 11123else
81ecdfbb 11124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11125/* end confdefs.h. */
c906108c 11126
97bf5e38 11127#define _SYSCALL32
d30c5336
JK
11128/* Needed for new procfs interface on sparc-solaris. */
11129#define _STRUCTURED_PROC 1
97bf5e38 11130#include <sys/procfs.h>
bec39cab
AC
11131int
11132main ()
11133{
97bf5e38 11134pr_sigaction64_t avar
bec39cab
AC
11135 ;
11136 return 0;
11137}
11138_ACEOF
81ecdfbb 11139if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11140 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11141else
81ecdfbb 11142 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11143
c906108c 11144fi
81ecdfbb 11145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11146fi
11147
97bf5e38 11148 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11149
81ecdfbb 11150$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11151
97bf5e38 11152 fi
81ecdfbb
RW
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11154$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11155
81ecdfbb
RW
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11157$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11158 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11159 $as_echo_n "(cached) " >&6
97bf5e38 11160else
81ecdfbb 11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11162/* end confdefs.h. */
97bf5e38
MK
11163
11164#define _SYSCALL32
d30c5336
JK
11165/* Needed for new procfs interface on sparc-solaris. */
11166#define _STRUCTURED_PROC 1
97bf5e38 11167#include <sys/procfs.h>
bec39cab
AC
11168int
11169main ()
11170{
97bf5e38 11171pr_siginfo64_t avar
bec39cab
AC
11172 ;
11173 return 0;
11174}
11175_ACEOF
81ecdfbb 11176if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11177 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11178else
81ecdfbb 11179 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11180
97bf5e38 11181fi
81ecdfbb 11182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11183fi
c906108c 11184
97bf5e38 11185 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11186
81ecdfbb 11187$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11188
97bf5e38 11189 fi
81ecdfbb
RW
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11191$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11192
11193
97bf5e38
MK
11194
11195
11196
97bf5e38 11197 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11199$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11200 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11201 $as_echo_n "(cached) " >&6
c906108c 11202else
81ecdfbb 11203 if test "$cross_compiling" = yes; then :
97bf5e38 11204 gdb_cv_prfpregset_t_broken=yes
c906108c 11205else
81ecdfbb 11206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11207/* end confdefs.h. */
97bf5e38
MK
11208#include <sys/procfs.h>
11209 int main ()
11210 {
11211 if (sizeof (prfpregset_t) == sizeof (void *))
11212 return 1;
11213 return 0;
11214 }
bec39cab 11215_ACEOF
81ecdfbb 11216if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11217 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11218else
11219 gdb_cv_prfpregset_t_broken=yes
c906108c 11220fi
81ecdfbb
RW
11221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11222 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11223fi
81ecdfbb 11224
c906108c
SS
11225fi
11226
81ecdfbb
RW
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11228$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11229 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11230
81ecdfbb 11231$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11232
97bf5e38
MK
11233 fi
11234 fi
c906108c 11235
bec39cab 11236
81ecdfbb
RW
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11238$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11239 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11240 $as_echo_n "(cached) " >&6
c906108c 11241else
81ecdfbb 11242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11243/* end confdefs.h. */
97bf5e38
MK
11244#include <unistd.h>
11245#include <sys/types.h>
11246#include <sys/procfs.h>
11247
bec39cab
AC
11248int
11249main ()
11250{
97bf5e38
MK
11251
11252 int dummy;;
11253 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11254
11255 ;
11256 return 0;
11257}
11258_ACEOF
81ecdfbb 11259if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11260 gdb_cv_have_procfs_piocset=yes
c906108c 11261else
81ecdfbb 11262 gdb_cv_have_procfs_piocset=no
c906108c 11263fi
81ecdfbb 11264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11265fi
97bf5e38 11266
81ecdfbb
RW
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11268$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11269 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11270
81ecdfbb 11271$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11272
11273 fi
c906108c 11274fi
c906108c 11275
97bf5e38 11276if test ${host} = ${target} ; then
bec39cab 11277
81ecdfbb
RW
11278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11279$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11280 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11281 $as_echo_n "(cached) " >&6
bec39cab 11282else
81ecdfbb 11283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11284/* end confdefs.h. */
97bf5e38 11285#include <link.h>
bec39cab
AC
11286int
11287main ()
11288{
97bf5e38 11289struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11290 ;
11291 return 0;
11292}
11293_ACEOF
81ecdfbb 11294if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11295 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11296else
81ecdfbb 11297 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11298fi
81ecdfbb 11299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11300fi
11301
81ecdfbb
RW
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11303$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11304 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11305
81ecdfbb 11306$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11307
11308 fi
11309
bec39cab 11310
81ecdfbb
RW
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11312$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11313 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11314 $as_echo_n "(cached) " >&6
c906108c 11315else
81ecdfbb 11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11317/* end confdefs.h. */
97bf5e38
MK
11318#include <sys/types.h>
11319#include <link.h>
bec39cab
AC
11320int
11321main ()
11322{
97bf5e38 11323struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11324 ;
11325 return 0;
11326}
11327_ACEOF
81ecdfbb 11328if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11329 gdb_cv_have_struct_link_map_with_lm_members=yes
11330else
81ecdfbb 11331 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11332fi
81ecdfbb 11333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11334fi
c906108c 11335
81ecdfbb
RW
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11337$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11338 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11339
81ecdfbb 11340$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11341
11342 fi
11343
bec39cab 11344
81ecdfbb
RW
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11346$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11347 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11348 $as_echo_n "(cached) " >&6
c906108c 11349else
81ecdfbb 11350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11351/* end confdefs.h. */
97bf5e38
MK
11352#include <sys/types.h>
11353#ifdef HAVE_NLIST_H
11354#include <nlist.h>
11355#endif
11356#include <link.h>
bec39cab
AC
11357int
11358main ()
11359{
97bf5e38 11360struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11361 ;
11362 return 0;
11363}
11364_ACEOF
81ecdfbb 11365if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11366 gdb_cv_have_struct_so_map_with_som_members=yes
11367else
81ecdfbb 11368 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11369fi
81ecdfbb 11370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11371fi
c906108c 11372
81ecdfbb
RW
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11374$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11375 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11376
81ecdfbb 11377$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11378
97bf5e38 11379 fi
c906108c 11380
bec39cab 11381
81ecdfbb
RW
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11383$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11384 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11385 $as_echo_n "(cached) " >&6
97bf5e38 11386else
81ecdfbb 11387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11388/* end confdefs.h. */
97bf5e38
MK
11389#define _SYSCALL32
11390#include <sys/link.h>
bec39cab
AC
11391int
11392main ()
11393{
97bf5e38 11394struct link_map32 l;
bec39cab
AC
11395 ;
11396 return 0;
11397}
11398_ACEOF
81ecdfbb 11399if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11400 gdb_cv_have_struct_link_map32=yes
11401else
81ecdfbb 11402 gdb_cv_have_struct_link_map32=no
97bf5e38 11403fi
81ecdfbb 11404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11405fi
c906108c 11406
81ecdfbb
RW
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11408$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11409 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11410
81ecdfbb 11411$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11412
60ca704f 11413
81ecdfbb 11414$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11415
97bf5e38
MK
11416 fi
11417fi
c906108c 11418
bc8bcb4b 11419# Check if the compiler supports the `long long' type.
c906108c 11420
81ecdfbb
RW
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11422$as_echo_n "checking for long long support in compiler... " >&6; }
11423if test "${gdb_cv_c_long_long+set}" = set; then :
11424 $as_echo_n "(cached) " >&6
97bf5e38 11425else
81ecdfbb 11426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11427/* end confdefs.h. */
bc8bcb4b 11428extern long long foo;
bec39cab
AC
11429int
11430main ()
11431{
bc8bcb4b 11432switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11433 ;
11434 return 0;
11435}
11436_ACEOF
81ecdfbb 11437if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11438 gdb_cv_c_long_long=yes
11439else
81ecdfbb 11440 gdb_cv_c_long_long=no
97bf5e38 11441fi
81ecdfbb 11442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11443fi
81ecdfbb
RW
11444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11445$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11446if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11447
81ecdfbb 11448$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11449
11450fi
11451
bc8bcb4b 11452# Check if the compiler and runtime support printing long longs.
97bf5e38 11453
81ecdfbb
RW
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11455$as_echo_n "checking for long long support in printf... " >&6; }
11456if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11457 $as_echo_n "(cached) " >&6
97bf5e38 11458else
81ecdfbb 11459 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11460 gdb_cv_printf_has_long_long=no
11461else
81ecdfbb 11462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11463/* end confdefs.h. */
bc8bcb4b
MK
11464$ac_includes_default
11465int
11466main ()
11467{
11468char buf[32];
97bf5e38
MK
11469 long long l = 0;
11470 l = (l << 16) + 0x0123;
11471 l = (l << 16) + 0x4567;
11472 l = (l << 16) + 0x89ab;
11473 l = (l << 16) + 0xcdef;
11474 sprintf (buf, "0x%016llx", l);
11475 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11476 ;
11477 return 0;
c906108c 11478}
bec39cab 11479_ACEOF
81ecdfbb 11480if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11481 gdb_cv_printf_has_long_long=yes
11482else
81ecdfbb 11483 gdb_cv_printf_has_long_long=no
97bf5e38 11484fi
81ecdfbb
RW
11485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11486 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11487fi
81ecdfbb 11488
97bf5e38 11489fi
81ecdfbb
RW
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11491$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11492if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11493
81ecdfbb 11494$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11495
11496fi
97bf5e38 11497
1a619819
LM
11498# Check if the compiler and runtime support printing decfloats.
11499
81ecdfbb
RW
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11501$as_echo_n "checking for decfloat support in printf... " >&6; }
11502if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11503 $as_echo_n "(cached) " >&6
1a619819 11504else
81ecdfbb 11505 if test "$cross_compiling" = yes; then :
1a619819
LM
11506 gdb_cv_printf_has_decfloat=no
11507else
81ecdfbb 11508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11509/* end confdefs.h. */
11510$ac_includes_default
11511int
11512main ()
11513{
11514char buf[64];
11515 _Decimal32 d32 = 1.2345df;
11516 _Decimal64 d64 = 1.2345dd;
11517 _Decimal128 d128 = 1.2345dl;
11518 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11519 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11520 ;
11521 return 0;
11522}
11523_ACEOF
81ecdfbb 11524if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11525 gdb_cv_printf_has_decfloat=yes
11526else
81ecdfbb 11527 gdb_cv_printf_has_decfloat=no
1a619819 11528fi
81ecdfbb
RW
11529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11530 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11531fi
81ecdfbb 11532
1a619819 11533fi
81ecdfbb
RW
11534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11535$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11536if test $gdb_cv_printf_has_decfloat = yes; then
11537
81ecdfbb 11538$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11539
11540fi
11541
bc8bcb4b
MK
11542# Check if the compiler supports the `long double' type. We can't use
11543# AC_C_LONG_DOUBLE because that one does additional checks on the
11544# constants defined in <float.h> that fail on some systems,
11545# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11546
81ecdfbb
RW
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11548$as_echo_n "checking for long double support in compiler... " >&6; }
11549if test "${gdb_cv_c_long_double+set}" = set; then :
11550 $as_echo_n "(cached) " >&6
97bf5e38 11551else
81ecdfbb 11552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11553/* end confdefs.h. */
97bf5e38 11554long double foo;
bec39cab 11555_ACEOF
81ecdfbb 11556if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11557 gdb_cv_c_long_double=yes
97bf5e38 11558else
81ecdfbb 11559 gdb_cv_c_long_double=no
97bf5e38 11560fi
81ecdfbb 11561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11562fi
81ecdfbb
RW
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11564$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11565if test $gdb_cv_c_long_double = yes; then
c906108c 11566
81ecdfbb 11567$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11568
11569fi
11570
bc8bcb4b 11571# Check if the compiler and runtime support printing long doubles.
97bf5e38 11572
81ecdfbb
RW
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11574$as_echo_n "checking for long double support in printf... " >&6; }
11575if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11576 $as_echo_n "(cached) " >&6
97bf5e38 11577else
81ecdfbb 11578 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11579 gdb_cv_printf_has_long_double=no
11580else
81ecdfbb 11581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11582/* end confdefs.h. */
bc8bcb4b
MK
11583$ac_includes_default
11584int
11585main ()
11586{
11587char buf[16];
97bf5e38
MK
11588 long double f = 3.141592653;
11589 sprintf (buf, "%Lg", f);
11590 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11591 ;
11592 return 0;
97bf5e38 11593}
bec39cab 11594_ACEOF
81ecdfbb 11595if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11596 gdb_cv_printf_has_long_double=yes
c906108c 11597else
81ecdfbb 11598 gdb_cv_printf_has_long_double=no
c906108c 11599fi
81ecdfbb
RW
11600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11601 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11602fi
81ecdfbb 11603
c906108c 11604fi
81ecdfbb
RW
11605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11606$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11607if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11608
81ecdfbb 11609$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11610
11611fi
97bf5e38 11612
bc8bcb4b 11613# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11614
81ecdfbb
RW
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11616$as_echo_n "checking for long double support in scanf... " >&6; }
11617if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11618 $as_echo_n "(cached) " >&6
97bf5e38 11619else
81ecdfbb 11620 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11621 gdb_cv_scanf_has_long_double=no
11622else
81ecdfbb 11623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11624/* end confdefs.h. */
bc8bcb4b
MK
11625#include <stdio.h>
11626int
11627main ()
11628{
11629char *buf = "3.141592653";
97bf5e38
MK
11630 long double f = 0;
11631 sscanf (buf, "%Lg", &f);
11632 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11633 ;
11634 return 0;
97bf5e38 11635}
bec39cab 11636_ACEOF
81ecdfbb 11637if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11638 gdb_cv_scanf_has_long_double=yes
11639else
81ecdfbb 11640 gdb_cv_scanf_has_long_double=no
97bf5e38 11641fi
81ecdfbb
RW
11642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11643 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11644fi
81ecdfbb 11645
c906108c 11646fi
81ecdfbb
RW
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11648$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11649if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11650
81ecdfbb 11651$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11652
11653fi
c906108c 11654
438013df
AO
11655case ${host_os} in
11656aix*)
81ecdfbb
RW
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11658$as_echo_n "checking for -bbigtoc option... " >&6; }
11659if test "${gdb_cv_bigtoc+set}" = set; then :
11660 $as_echo_n "(cached) " >&6
438013df 11661else
bec39cab 11662
438013df
AO
11663 SAVE_LDFLAGS=$LDFLAGS
11664
11665 case $GCC in
11666 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11667 *) gdb_cv_bigtoc=-bbigtoc ;;
11668 esac
11669
11670 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11672/* end confdefs.h. */
438013df 11673
bec39cab
AC
11674int
11675main ()
11676{
438013df 11677int i;
bec39cab
AC
11678 ;
11679 return 0;
11680}
11681_ACEOF
81ecdfbb 11682if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11683
81ecdfbb
RW
11684else
11685 gdb_cv_bigtoc=
438013df 11686fi
81ecdfbb
RW
11687rm -f core conftest.err conftest.$ac_objext \
11688 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11689 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11690
bec39cab 11691fi
81ecdfbb
RW
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11693$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11694 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11695 ;;
11696esac
11697
38f6b338 11698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11699$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11700dynamic_list=false
11701if test "${gdb_native}" = yes; then
11702 # The dynamically loaded libthread_db needs access to symbols in the gdb
11703 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11704 # may not be supported there.
11705 old_LDFLAGS="$LDFLAGS"
11706 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11707 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11708 LDFLAGS="$LDFLAGS $RDYNAMIC"
11709 if test "${have_libpython}" = no; then
11710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11711/* end confdefs.h. */
11712
11713int
11714main ()
11715{
11716
11717 ;
11718 return 0;
11719}
11720_ACEOF
11721if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11722 dynamic_list=true
11723fi
11724rm -f core conftest.err conftest.$ac_objext \
11725 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11726 else
11727 # Workaround http://bugs.python.org/issue4434 where static
11728 # libpythonX.Y.a would get its symbols required for
11729 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11730 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11731 old_CFLAGS="$CFLAGS"
11732 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11733 if test "$cross_compiling" = yes; then :
3bebe2f2 11734 true
f6528abd 11735else
3bebe2f2
JK
11736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11737/* end confdefs.h. */
11738#include "${have_libpython}/Python.h"
11739int
11740main ()
11741{
11742int err;
38f6b338
JK
11743 Py_Initialize ();
11744 err = PyRun_SimpleString ("import itertools\n");
11745 Py_Finalize ();
11746 return err == 0 ? 0 : 1;
3bebe2f2
JK
11747 ;
11748 return 0;
11749}
11750_ACEOF
11751if ac_fn_c_try_run "$LINENO"; then :
11752 dynamic_list=true
11753fi
11754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11755 conftest.$ac_objext conftest.beam conftest.$ac_ext
11756fi
11757
38f6b338
JK
11758 CFLAGS="$old_CFLAGS"
11759 fi
11760 LDFLAGS="$old_LDFLAGS"
11761fi
11762if $dynamic_list; then
11763 found="-Wl,--dynamic-list"
11764 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11765else
38f6b338
JK
11766 found="-rdynamic"
11767 RDYNAMIC="-rdynamic"
f6528abd 11768fi
f6528abd 11769
38f6b338 11770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11771$as_echo "$found" >&6; }
0407b3f1 11772
f6528abd 11773
0407b3f1 11774if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11775 case ${host_os} in
c906108c 11776 solaris*)
d92419e5
JB
11777 # See if thread_db library is around for Solaris thread debugging.
11778 # Note that we must explicitly test for version 1 of the library
11779 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11780 # the same API.
81ecdfbb
RW
11781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11782$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11783 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11785$as_echo "yes" >&6; }
60ca704f 11786
81ecdfbb 11787$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11788
3483b318 11789 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11790 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11792$as_echo_n "checking for dlopen in -ldl... " >&6; }
11793if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11794 $as_echo_n "(cached) " >&6
c906108c 11795else
bec39cab 11796 ac_check_lib_save_LIBS=$LIBS
c906108c 11797LIBS="-ldl $LIBS"
81ecdfbb 11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11799/* end confdefs.h. */
11800
81ecdfbb
RW
11801/* Override any GCC internal prototype to avoid an error.
11802 Use char because int might match the return type of a GCC
11803 builtin and then its argument prototype would still apply. */
bec39cab
AC
11804#ifdef __cplusplus
11805extern "C"
11806#endif
bec39cab
AC
11807char dlopen ();
11808int
11809main ()
11810{
81ecdfbb 11811return dlopen ();
bec39cab
AC
11812 ;
11813 return 0;
11814}
11815_ACEOF
81ecdfbb 11816if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11817 ac_cv_lib_dl_dlopen=yes
11818else
81ecdfbb 11819 ac_cv_lib_dl_dlopen=no
bec39cab 11820fi
81ecdfbb
RW
11821rm -f core conftest.err conftest.$ac_objext \
11822 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11823LIBS=$ac_check_lib_save_LIBS
11824fi
81ecdfbb
RW
11825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11826$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11827if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11828 cat >>confdefs.h <<_ACEOF
11829#define HAVE_LIBDL 1
11830_ACEOF
c906108c
SS
11831
11832 LIBS="-ldl $LIBS"
11833
c906108c
SS
11834fi
11835
f6528abd 11836 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
11837 # Sun randomly tweaked the prototypes in <proc_service.h>
11838 # at one point.
81ecdfbb
RW
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
11840$as_echo_n "checking if <proc_service.h> is old... " >&6; }
11841 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
11842 $as_echo_n "(cached) " >&6
c906108c 11843else
bec39cab 11844
81ecdfbb 11845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11846/* end confdefs.h. */
c906108c
SS
11847
11848 #include <proc_service.h>
11849 ps_err_e ps_pdwrite
11850 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 11851
bec39cab
AC
11852int
11853main ()
11854{
11855
11856 ;
11857 return 0;
11858}
11859_ACEOF
81ecdfbb 11860if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
11861 gdb_cv_proc_service_is_old=no
11862else
81ecdfbb 11863 gdb_cv_proc_service_is_old=yes
c906108c 11864fi
81ecdfbb 11865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11866
c906108c
SS
11867fi
11868
81ecdfbb
RW
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
11870$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 11871 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 11872
81ecdfbb 11873$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
11874
11875 fi
11876 else
81ecdfbb
RW
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
c906108c
SS
11879 fi
11880 ;;
d92419e5 11881 aix*)
81ecdfbb
RW
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
11883$as_echo_n "checking for AiX thread debugging library... " >&6; }
11884 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
11885 $as_echo_n "(cached) " >&6
bec39cab 11886else
81ecdfbb 11887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11888/* end confdefs.h. */
d92419e5 11889#include <sys/pthdebug.h>
bec39cab
AC
11890int
11891main ()
11892{
d92419e5
JB
11893#ifndef PTHDB_VERSION_3
11894 #error
11895 #endif
bec39cab
AC
11896 ;
11897 return 0;
11898}
11899_ACEOF
81ecdfbb 11900if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
11901 gdb_cv_have_aix_thread_debug=yes
11902else
81ecdfbb 11903 gdb_cv_have_aix_thread_debug=no
d92419e5 11904fi
81ecdfbb 11905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
11906fi
11907
81ecdfbb
RW
11908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
11909$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
11910 if test $gdb_cv_have_aix_thread_debug = yes; then
11911 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 11912 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 11913 LIBS="$LIBS -lpthdebug"
d645e32e
JB
11914
11915 # Older versions of AIX do not provide the declaration for
11916 # the getthrds function (it appears that it was introduced
11917 # with AIX 6.x).
11918 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
11919"
11920if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
11921 ac_have_decl=1
11922else
11923 ac_have_decl=0
11924fi
11925
11926cat >>confdefs.h <<_ACEOF
11927#define HAVE_DECL_GETTHRDS $ac_have_decl
11928_ACEOF
11929
d92419e5
JB
11930 fi
11931 ;;
c906108c 11932 esac
bec39cab 11933
c906108c
SS
11934fi
11935
3f47be5c 11936if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
11938$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
11939if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
11940 $as_echo_n "(cached) " >&6
bec39cab 11941else
81ecdfbb 11942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11943/* end confdefs.h. */
3f47be5c 11944#include <thread_db.h>
bec39cab
AC
11945int
11946main ()
11947{
3f47be5c 11948int i = TD_NOTALLOC;
bec39cab
AC
11949 ;
11950 return 0;
11951}
11952_ACEOF
81ecdfbb 11953if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
11954 gdb_cv_thread_db_h_has_td_notalloc=yes
11955else
81ecdfbb 11956 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 11957
3f47be5c 11958fi
81ecdfbb 11959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 11960
bec39cab 11961fi
81ecdfbb
RW
11962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
11963$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
11965$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
11966if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
11967 $as_echo_n "(cached) " >&6
59f80f10 11968else
81ecdfbb 11969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
11970/* end confdefs.h. */
11971#include <thread_db.h>
11972int
11973main ()
11974{
11975int i = TD_VERSION;
11976 ;
11977 return 0;
11978}
11979_ACEOF
81ecdfbb 11980if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
11981 gdb_cv_thread_db_h_has_td_version=yes
11982else
81ecdfbb 11983 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
11984
11985fi
81ecdfbb 11986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
11987
11988fi
81ecdfbb
RW
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
11990$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
11992$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
11993if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
11994 $as_echo_n "(cached) " >&6
59f80f10 11995else
81ecdfbb 11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
11997/* end confdefs.h. */
11998#include <thread_db.h>
11999int
12000main ()
12001{
12002int i = TD_NOTLS;
12003 ;
12004 return 0;
12005}
12006_ACEOF
81ecdfbb 12007if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12008 gdb_cv_thread_db_h_has_td_notls=yes
12009else
81ecdfbb 12010 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12011
12012fi
81ecdfbb 12013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12014
12015fi
81ecdfbb
RW
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12017$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12018fi
12019if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12020
81ecdfbb 12021$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12022
59f80f10
DJ
12023fi
12024if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12025
81ecdfbb 12026$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12027
12028fi
12029if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12030
81ecdfbb 12031$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12032
3f47be5c
EZ
12033fi
12034
b757528f 12035if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12037$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12038if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12039 $as_echo_n "(cached) " >&6
bec39cab 12040else
81ecdfbb 12041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12042/* end confdefs.h. */
b757528f 12043#include <sys/syscall.h>
bec39cab
AC
12044int
12045main ()
12046{
b757528f 12047int i = __NR_tkill;
bec39cab
AC
12048 ;
12049 return 0;
12050}
12051_ACEOF
81ecdfbb 12052if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12053 gdb_cv_sys_syscall_h_has_tkill=yes
12054else
81ecdfbb 12055 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12056
b757528f 12057fi
81ecdfbb 12058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12059
bec39cab 12060fi
81ecdfbb
RW
12061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12062$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12063fi
12064if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12065
81ecdfbb 12066$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12067
12068fi
12069
81ecdfbb
RW
12070ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12071"
12072if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12073 ac_have_decl=1
10568435 12074else
81ecdfbb 12075 ac_have_decl=0
10568435 12076fi
10568435
JK
12077
12078cat >>confdefs.h <<_ACEOF
81ecdfbb 12079#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12080_ACEOF
12081
12082
81ecdfbb
RW
12083if test "$cross_compiling" = yes; then :
12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12085/* end confdefs.h. */
12086#include <sys/personality.h>
12087int
12088main ()
12089{
12090
12091# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12092# define ADDR_NO_RANDOMIZE 0x0040000
12093# endif
12094 /* Test the flag could be set and stays set. */
12095 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12096 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12097 return 1
12098 ;
12099 return 0;
12100}
12101_ACEOF
81ecdfbb 12102if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12103 have_personality=true
12104else
81ecdfbb 12105 have_personality=false
10568435 12106fi
81ecdfbb
RW
12107rm -f core conftest.err conftest.$ac_objext \
12108 conftest$ac_exeext conftest.$ac_ext
10568435 12109else
81ecdfbb 12110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12111/* end confdefs.h. */
12112#include <sys/personality.h>
12113int
12114main ()
12115{
12116
12117# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12118# define ADDR_NO_RANDOMIZE 0x0040000
12119# endif
12120 /* Test the flag could be set and stays set. */
12121 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12122 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12123 return 1
12124 ;
12125 return 0;
12126}
12127_ACEOF
81ecdfbb 12128if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12129 have_personality=true
12130else
81ecdfbb 12131 have_personality=false
10568435 12132fi
81ecdfbb
RW
12133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12134 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12135fi
81ecdfbb 12136
10568435
JK
12137if $have_personality
12138then
12139
81ecdfbb 12140$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12141
12142fi
12143
fb40c209 12144
f83d8a90
DE
12145# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12146# except that the argument to --with-sysroot is optional.
12147# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12148if test "x$with_sysroot" = xyes; then
12149 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12150fi
bec39cab 12151
81ecdfbb
RW
12152# Check whether --with-sysroot was given.
12153if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12154 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12155else
12156 TARGET_SYSTEM_ROOT=
12157fi
030292b7 12158
030292b7 12159
f83d8a90
DE
12160 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12161 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12162 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12163 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12164
f83d8a90
DE
12165cat >>confdefs.h <<_ACEOF
12166#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12167_ACEOF
bec39cab 12168
030292b7 12169
b14b1491 12170
f83d8a90
DE
12171
12172 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12173 if test "x$prefix" = xNONE; then
12174 test_prefix=/usr/local
12175 else
12176 test_prefix=$prefix
12177 fi
12178 else
12179 test_prefix=$exec_prefix
12180 fi
12181 value=0
12182 case ${ac_define_dir} in
12183 "${test_prefix}"|"${test_prefix}/"*|\
12184 '${exec_prefix}'|'${exec_prefix}/'*)
12185 value=1
12186 ;;
12187 esac
12188
12189cat >>confdefs.h <<_ACEOF
12190#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12191_ACEOF
030292b7
DJ
12192
12193
12194
16e7150e 12195
16e7150e 12196
81ecdfbb
RW
12197# Check whether --with-system-gdbinit was given.
12198if test "${with_system_gdbinit+set}" = set; then :
12199 withval=$with_system_gdbinit;
b14b1491
TT
12200 SYSTEM_GDBINIT=$withval
12201else
12202 SYSTEM_GDBINIT=
81ecdfbb
RW
12203fi
12204
16e7150e
JG
12205
12206 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12208 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12209 ac_define_dir=`eval echo $ac_define_dir`
12210
12211cat >>confdefs.h <<_ACEOF
12212#define SYSTEM_GDBINIT "$ac_define_dir"
12213_ACEOF
12214
12215
12216
0c4a4063 12217
b14b1491
TT
12218 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12219 if test "x$prefix" = xNONE; then
12220 test_prefix=/usr/local
12221 else
12222 test_prefix=$prefix
12223 fi
12224 else
12225 test_prefix=$exec_prefix
12226 fi
12227 value=0
12228 case ${ac_define_dir} in
12229 "${test_prefix}"|"${test_prefix}/"*|\
12230 '${exec_prefix}'|'${exec_prefix}/'*)
12231 value=1
12232 ;;
12233 esac
16e7150e 12234
b14b1491
TT
12235cat >>confdefs.h <<_ACEOF
12236#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12237_ACEOF
12238
b14b1491 12239
16e7150e 12240
0c4a4063 12241
81ecdfbb
RW
12242# Check whether --enable-werror was given.
12243if test "${enable_werror+set}" = set; then :
12244 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12245 yes | y) ERROR_ON_WARNING="yes" ;;
12246 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12247 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12248 esac
81ecdfbb
RW
12249fi
12250
094a342e
MK
12251
12252# Enable -Werror by default when using gcc
12253if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
12254 ERROR_ON_WARNING=yes
12255fi
12256
12257WERROR_CFLAGS=""
12258if test "${ERROR_ON_WARNING}" = yes ; then
12259 WERROR_CFLAGS="-Werror"
12260fi
12261
aa79a185
DJ
12262# The entries after -Wno-pointer-sign are disabled warnings which may
12263# be enabled in the future, which can not currently be used to build
12264# GDB.
12265# NOTE: If you change this list, remember to update
3b851bce 12266# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12267build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12268-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12269-Wno-unused -Wunused-value -Wunused-function \
b03a2011 12270-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 12271
3526781e
DJ
12272# Enable -Wno-format by default when using gcc on mingw since many
12273# GCC versions complain about %I64.
12274case "${host}" in
12275 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12276esac
12277
81ecdfbb
RW
12278# Check whether --enable-build-warnings was given.
12279if test "${enable_build_warnings+set}" = set; then :
12280 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12281 yes) ;;
12282 no) build_warnings="-w";;
12283 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12284 build_warnings="${build_warnings} ${t}";;
12285 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12286 build_warnings="${t} ${build_warnings}";;
12287 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12288esac
d4f3574e 12289if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12290 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12291fi
81ecdfbb
RW
12292fi
12293# Check whether --enable-gdb-build-warnings was given.
12294if test "${enable_gdb_build_warnings+set}" = set; then :
12295 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12296 yes) ;;
12297 no) build_warnings="-w";;
12298 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12299 build_warnings="${build_warnings} ${t}";;
12300 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12301 build_warnings="${t} ${build_warnings}";;
12302 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12303esac
12304if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12305 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12306fi
81ecdfbb
RW
12307fi
12308WARN_CFLAGS=""
c906108c
SS
12309if test "x${build_warnings}" != x -a "x$GCC" = xyes
12310then
81ecdfbb
RW
12311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12312$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12313 # Separate out the -Werror flag as some files just cannot be
12314 # compiled with it enabled.
12315 for w in ${build_warnings}; do
12316 case $w in
12317 -Werr*) WERROR_CFLAGS=-Werror ;;
12318 *) # Check that GCC accepts it
4536bbc6
AC
12319 saved_CFLAGS="$CFLAGS"
12320 CFLAGS="$CFLAGS $w"
81ecdfbb 12321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12322/* end confdefs.h. */
4536bbc6 12323
bec39cab
AC
12324int
12325main ()
12326{
4536bbc6 12327
bec39cab
AC
12328 ;
12329 return 0;
12330}
12331_ACEOF
81ecdfbb 12332if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12333 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12334fi
81ecdfbb 12335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12336 CFLAGS="$saved_CFLAGS"
746a987d
AC
12337 esac
12338 done
81ecdfbb
RW
12339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12340$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12341fi
12342
12343
104c1213 12344
7a292a7a 12345# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12347$as_echo_n "checking for cygwin... " >&6; }
12348if test "${gdb_cv_os_cygwin+set}" = set; then :
12349 $as_echo_n "(cached) " >&6
bec39cab 12350else
81ecdfbb 12351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12352/* end confdefs.h. */
7a292a7a
SS
12353
12354#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12355lose
12356#endif
bec39cab 12357_ACEOF
7a292a7a 12358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12359 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12360 gdb_cv_os_cygwin=yes
12361else
7a292a7a
SS
12362 gdb_cv_os_cygwin=no
12363fi
12364rm -f conftest*
12365
12366fi
81ecdfbb
RW
12367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12368$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12369
aff38e61 12370
3eb25fda 12371SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12372case ${host} in
95cbc983
AC
12373 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12374 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12375 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12376esac
12377
12378
cd0fc7c3
SS
12379# libreadline needs libuser32.a in a cygwin environment
12380WIN32LIBS=
12381if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12382 WIN32LIBS="-luser32"
12383 case "${target}" in
12384 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12385 ;;
12386 esac
cd0fc7c3 12387fi
c906108c 12388
b4505029
MM
12389# The ser-tcp.c module requires sockets.
12390case ${host} in
12391 *mingw32*)
12392
81ecdfbb 12393$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12394
12395 WIN32LIBS="$WIN32LIBS -lws2_32"
12396 ;;
12397esac
12398
7a292a7a 12399
31d99776
DJ
12400# Add ELF support to GDB, but only if BFD includes ELF support.
12401OLD_CFLAGS=$CFLAGS
12402OLD_LDFLAGS=$LDFLAGS
12403OLD_LIBS=$LIBS
12cd34f3
PA
12404# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12405# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12406# always want our bfd.
12407CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12408LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12409intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12410# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12411if test "$plugins" = "yes"; then
12412 LIBS="-ldl $LIBS"
12413fi
0f72fb1c 12414LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12416$as_echo_n "checking for ELF support in BFD... " >&6; }
12417if test "${gdb_cv_var_elf+set}" = set; then :
12418 $as_echo_n "(cached) " >&6
31d99776 12419else
81ecdfbb 12420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12421/* end confdefs.h. */
12422#include <stdlib.h>
12423#include "bfd.h"
12424#include "elf-bfd.h"
12425
12426int
12427main ()
12428{
12429bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12430 ;
12431 return 0;
12432}
12433_ACEOF
81ecdfbb 12434if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12435 gdb_cv_var_elf=yes
12436else
81ecdfbb 12437 gdb_cv_var_elf=no
31d99776 12438fi
81ecdfbb
RW
12439rm -f core conftest.err conftest.$ac_objext \
12440 conftest$ac_exeext conftest.$ac_ext
31d99776 12441fi
81ecdfbb
RW
12442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12443$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
12444if test $gdb_cv_var_elf = yes; then
12445 CONFIG_OBS="$CONFIG_OBS elfread.o"
12446
81ecdfbb 12447$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12448
075ff26d
JK
12449 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12450 if test "$plugins" = "yes"; then
12451 OLD_LIBS="-ldl $OLD_LIBS"
12452 fi
31d99776
DJ
12453fi
12454CFLAGS=$OLD_CFLAGS
12455LDFLAGS=$OLD_LDFLAGS
12456LIBS=$OLD_LIBS
12457
121ce6e5
DJ
12458# Add any host-specific objects to GDB.
12459CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12460
3fc11d3e
JM
12461LIBGUI="../libgui/src/libgui.a"
12462GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
12463
12464
7a292a7a 12465
3fc11d3e
JM
12466WIN32LDAPP=
12467
12468
12469
d91670b9 12470case "${host}" in
686a5eed 12471*-*-cygwin* | *-*-mingw* )
d91670b9
CV
12472 configdir="win"
12473 ;;
12474*)
12475 configdir="unix"
12476 ;;
12477esac
3fc11d3e
JM
12478
12479GDBTKLIBS=
12480if test "${enable_gdbtk}" = "yes"; then
12481
d1c3b63a
KS
12482 # Gdbtk must have an absolute path to srcdir in order to run
12483 # properly when not installed.
12484 here=`pwd`
12485 cd ${srcdir}
12486 GDBTK_SRC_DIR=`pwd`
12487 cd $here
12488
bec39cab 12489
5062cc19
KS
12490 #
12491 # Ok, lets find the tcl configuration
12492 # First, look for one uninstalled.
12493 # the alternative search directory is invoked by --with-tcl
12494 #
3fc11d3e 12495
5062cc19
KS
12496 if test x"${no_tcl}" = x ; then
12497 # we reset no_tcl in case something fails here
12498 no_tcl=true
bec39cab 12499
81ecdfbb
RW
12500# Check whether --with-tcl was given.
12501if test "${with_tcl+set}" = set; then :
12502 withval=$with_tcl; with_tclconfig=${withval}
12503fi
12504
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
12506$as_echo_n "checking for Tcl configuration... " >&6; }
12507 if test "${ac_cv_c_tclconfig+set}" = set; then :
12508 $as_echo_n "(cached) " >&6
3fc11d3e 12509else
bec39cab 12510
3fc11d3e 12511
5062cc19
KS
12512 # First check to see if --with-tcl was specified.
12513 case "${host}" in
12514 *-*-cygwin*) platDir="win" ;;
12515 *) platDir="unix" ;;
12516 esac
12517 if test x"${with_tclconfig}" != x ; then
12518 if test -f "${with_tclconfig}/tclConfig.sh" ; then
12519 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
12520 else
81ecdfbb 12521 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
12522 fi
12523 fi
12524
12525 # then check for a private Tcl installation
12526 if test x"${ac_cv_c_tclconfig}" = x ; then
12527 for i in \
12528 ../tcl \
12529 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12530 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
12531 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
12532 ../../tcl \
12533 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12534 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
12535 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
12536 ../../../tcl \
12537 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12538 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
12539 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
12540 if test -f "$i/$platDir/tclConfig.sh" ; then
12541 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12542 break
12543 fi
12544 done
12545 fi
12546
12547 # on Darwin, check in Framework installation locations
12548 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
12549 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12550 `ls -d /Library/Frameworks 2>/dev/null` \
12551 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12552 `ls -d /System/Library/Frameworks 2>/dev/null` \
12553 ; do
12554 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
12555 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
12556 break
12557 fi
12558 done
12559 fi
12560
12561 # check in a few common install locations
12562 if test x"${ac_cv_c_tclconfig}" = x ; then
12563 for i in `ls -d ${libdir} 2>/dev/null` \
12564 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12565 `ls -d ${prefix}/lib 2>/dev/null` \
12566 `ls -d /usr/local/lib 2>/dev/null` \
12567 `ls -d /usr/contrib/lib 2>/dev/null` \
12568 `ls -d /usr/lib 2>/dev/null` \
12569 ; do
12570 if test -f "$i/tclConfig.sh" ; then
12571 ac_cv_c_tclconfig=`(cd $i; pwd)`
12572 break
12573 fi
12574 done
12575 fi
3fc11d3e 12576
5062cc19
KS
12577 # check in a few other private locations
12578 if test x"${ac_cv_c_tclconfig}" = x ; then
12579 for i in \
12580 ${srcdir}/../tcl \
12581 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12582 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
12583 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
12584 if test -f "$i/$platDir/tclConfig.sh" ; then
12585 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12586 break
12587 fi
12588 done
12589 fi
bec39cab 12590
3fc11d3e
JM
12591fi
12592
5062cc19
KS
12593
12594 if test x"${ac_cv_c_tclconfig}" = x ; then
12595 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
12597$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
12598 else
12599 no_tcl=
12600 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
12602$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
12603 fi
12604 fi
3fc11d3e 12605
bec39cab 12606
85541719
DE
12607 # If $no_tk is nonempty, then we can't do Tk, and there is no
12608 # point to doing Tcl.
bec39cab 12609
5062cc19
KS
12610 #
12611 # Ok, lets find the tk configuration
12612 # First, look for one uninstalled.
12613 # the alternative search directory is invoked by --with-tk
12614 #
3fc11d3e 12615
5062cc19
KS
12616 if test x"${no_tk}" = x ; then
12617 # we reset no_tk in case something fails here
12618 no_tk=true
bec39cab 12619
81ecdfbb
RW
12620# Check whether --with-tk was given.
12621if test "${with_tk+set}" = set; then :
12622 withval=$with_tk; with_tkconfig=${withval}
12623fi
12624
12625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
12626$as_echo_n "checking for Tk configuration... " >&6; }
12627 if test "${ac_cv_c_tkconfig+set}" = set; then :
12628 $as_echo_n "(cached) " >&6
bec39cab 12629else
3fc11d3e
JM
12630
12631
5062cc19
KS
12632 # First check to see if --with-tkconfig was specified.
12633 if test x"${with_tkconfig}" != x ; then
12634 if test -f "${with_tkconfig}/tkConfig.sh" ; then
12635 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
12636 else
81ecdfbb 12637 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
12638 fi
12639 fi
3fc11d3e 12640
5062cc19
KS
12641 # then check for a private Tk library
12642 case "${host}" in
12643 *-*-cygwin*) platDir="win" ;;
12644 *) platDir="unix" ;;
12645 esac
12646 if test x"${ac_cv_c_tkconfig}" = x ; then
12647 for i in \
12648 ../tk \
12649 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12650 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
12651 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
12652 ../../tk \
12653 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12654 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
12655 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
12656 ../../../tk \
12657 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12658 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
12659 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
12660 if test -f "$i/$platDir/tkConfig.sh" ; then
12661 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12662 break
12663 fi
12664 done
12665 fi
12666
12667 # on Darwin, check in Framework installation locations
12668 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
12669 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12670 `ls -d /Library/Frameworks 2>/dev/null` \
12671 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12672 `ls -d /System/Library/Frameworks 2>/dev/null` \
12673 ; do
12674 if test -f "$i/Tk.framework/tkConfig.sh" ; then
12675 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
12676 break
12677 fi
12678 done
12679 fi
12680
12681 # check in a few common install locations
12682 if test x"${ac_cv_c_tkconfig}" = x ; then
12683 for i in `ls -d ${libdir} 2>/dev/null` \
12684 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12685 `ls -d ${prefix}/lib 2>/dev/null` \
12686 `ls -d /usr/local/lib 2>/dev/null` \
12687 `ls -d /usr/contrib/lib 2>/dev/null` \
12688 `ls -d /usr/lib 2>/dev/null` \
12689 ; do
12690 if test -f "$i/tkConfig.sh" ; then
12691 ac_cv_c_tkconfig=`(cd $i; pwd)`
12692 break
12693 fi
12694 done
12695 fi
12696 # check in a few other private locations
12697 if test x"${ac_cv_c_tkconfig}" = x ; then
12698 for i in \
12699 ${srcdir}/../tk \
12700 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12701 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
12702 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
12703 if test -f "$i/$platDir/tkConfig.sh" ; then
12704 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12705 break
12706 fi
12707 done
12708 fi
3fc11d3e 12709
3fc11d3e
JM
12710fi
12711
12712
5062cc19
KS
12713 if test x"${ac_cv_c_tkconfig}" = x ; then
12714 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
12716$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
12717 else
12718 no_tk=
12719 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
12721$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 12722 fi
3fc11d3e 12723 fi
dd2504ab 12724
dd2504ab 12725
85541719
DE
12726 if test -z "${no_tcl}" -a -z "${no_tk}"; then
12727
81ecdfbb
RW
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
12729$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
12730
12731 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12733$as_echo "loading" >&6; }
85541719
DE
12734 . ${TCL_BIN_DIR}/tclConfig.sh
12735 else
81ecdfbb
RW
12736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
12737$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
12738 fi
12739
12740 # eval is required to do the TCL_DBGX substitution
12741 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
12742 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
12743
12744 # If the TCL_BIN_DIR is the build directory (not the install directory),
12745 # then set the common variable name to the value of the build variables.
12746 # For example, the variable TCL_LIB_SPEC will be set to the value
12747 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
12748 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
12749 # installed and uninstalled version of Tcl.
12750 if test -f "${TCL_BIN_DIR}/Makefile" ; then
12751 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
12752 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
12753 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
12754 elif test "`uname -s`" = "Darwin"; then
12755 # If Tcl was built as a framework, attempt to use the libraries
12756 # from the framework at the given location so that linking works
12757 # against Tcl.framework installed in an arbitary location.
12758 case ${TCL_DEFS} in
12759 *TCL_FRAMEWORK*)
12760 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
12761 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
12762 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
12763 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
12764 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
12765 break
12766 fi
12767 done
12768 fi
12769 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
12770 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
12771 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
12772 fi
12773 ;;
12774 esac
12775 fi
12776
12777 # eval is required to do the TCL_DBGX substitution
12778 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
12779 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
12780 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
12781 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797 # Check for in-tree tcl
12798 here=`pwd`
12799 cd ${srcdir}/..
12800 topdir=`pwd`
12801 cd ${here}
12802
12803 intree="no"
12804 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
12805 intree="yes"
12806 fi
12807
12808 # Find Tcl private headers
12809 if test x"${intree}" = xno; then
12810
81ecdfbb
RW
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
12812$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
12813 private_dir=""
12814 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
12815 if test -f ${dir}/tclInt.h ; then
12816 private_dir=${dir}
12817 fi
12818
12819 if test x"${private_dir}" = x; then
81ecdfbb 12820 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
12821 else
12822 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12824$as_echo "${private_dir}" >&6; }
85541719
DE
12825 fi
12826
12827 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
12828 TCL_LIBRARY="${TCL_LIB_SPEC}"
12829 TCL_DEPS=""
12830 else
12831 # If building tcl in the same src tree, private headers
12832 # are not needed, but we need to be sure to use the right
12833 # headers library
12834 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
12835 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
12836 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
12837 fi
12838
12839
12840
12841
12842
81ecdfbb
RW
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
12844$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 12845
5062cc19 12846 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
12847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12848$as_echo "loading" >&6; }
5062cc19 12849 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 12850 else
81ecdfbb
RW
12851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
12852$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 12853 fi
bec39cab 12854
5062cc19
KS
12855 # eval is required to do the TK_DBGX substitution
12856 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
12857 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
12858
12859 # If the TK_BIN_DIR is the build directory (not the install directory),
12860 # then set the common variable name to the value of the build variables.
12861 # For example, the variable TK_LIB_SPEC will be set to the value
12862 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
12863 # instead of TK_BUILD_LIB_SPEC since it will work with both an
12864 # installed and uninstalled version of Tcl.
85541719 12865 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
12866 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
12867 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
12868 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
12869 elif test "`uname -s`" = "Darwin"; then
12870 # If Tk was built as a framework, attempt to use the libraries
12871 # from the framework at the given location so that linking works
12872 # against Tk.framework installed in an arbitary location.
12873 case ${TK_DEFS} in
12874 *TK_FRAMEWORK*)
85541719 12875 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
12876 for i in "`cd ${TK_BIN_DIR}; pwd`" \
12877 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
12878 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
12879 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
12880 break
12881 fi
12882 done
12883 fi
85541719 12884 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
12885 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
12886 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
12887 fi
12888 ;;
12889 esac
3fc11d3e
JM
12890 fi
12891
5062cc19
KS
12892 # eval is required to do the TK_DBGX substitution
12893 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
12894 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
12895 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
12896 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 12897
3fc11d3e
JM
12898
12899
bec39cab
AC
12900
12901
12902
12903
12904
12905
12906
3fc11d3e 12907
3fc11d3e 12908
bec39cab 12909
bec39cab 12910
85541719
DE
12911 # Check for in-tree Tk
12912 intree="no"
12913 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
12914 intree="yes"
12915 fi
3fc11d3e 12916
85541719
DE
12917 # Find Tk private headers
12918 if test x"${intree}" = xno; then
3fc11d3e 12919
81ecdfbb
RW
12920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
12921$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
12922 private_dir=""
12923 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
12924 if test -f ${dir}/tkInt.h; then
12925 private_dir=${dir}
3fc11d3e 12926 fi
bec39cab 12927
5062cc19 12928 if test x"${private_dir}" = x; then
81ecdfbb 12929 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 12930 else
5062cc19 12931 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12933$as_echo "${private_dir}" >&6; }
3fc11d3e 12934 fi
3fc11d3e 12935
85541719
DE
12936 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
12937 TK_LIBRARY=${TK_LIB_SPEC}
12938 TK_DEPS=""
12939 else
12940 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
12941 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
12942 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
12943 fi
3fc11d3e
JM
12944
12945
3fc11d3e
JM
12946
12947
3fc11d3e 12948
85541719 12949 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 12950
85541719
DE
12951 # Include some libraries that Tcl and Tk want.
12952 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
12953 # Yes, the ordering seems wrong here. But it isn't.
12954 # TK_LIBS is the list of libraries that need to be linked
12955 # after Tcl/Tk. Note that this isn't put into LIBS. If it
12956 # were in LIBS then any link tests after this point would
12957 # try to include things like `$(LIBGUI)', which wouldn't work.
12958 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 12959
85541719
DE
12960 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
12961 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
12962 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
12963 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
12964 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
12965 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
12966 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 12967
85541719
DE
12968 if test x$gdb_cv_os_cygwin = xyes; then
12969 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
12970 WIN32LDAPP="-Wl,--subsystem,console"
12971 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 12972 fi
ffc6a242 12973
81ecdfbb 12974 subdirs="$subdirs gdbtk"
3ace7edb 12975
85541719 12976 fi
3fc11d3e
JM
12977fi
12978
12979
12980
12981
12982
12983
12984
12985
81ecdfbb
RW
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
12987$as_echo_n "checking for X... " >&6; }
bec39cab 12988
c906108c 12989
81ecdfbb
RW
12990# Check whether --with-x was given.
12991if test "${with_x+set}" = set; then :
12992 withval=$with_x;
12993fi
c906108c
SS
12994
12995# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12996if test "x$with_x" = xno; then
12997 # The user explicitly disabled X.
12998 have_x=disabled
12999else
81ecdfbb
RW
13000 case $x_includes,$x_libraries in #(
13001 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13002 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13003 $as_echo_n "(cached) " >&6
c906108c
SS
13004else
13005 # One or both of the vars are not set, and there is no cached value.
bec39cab 13006ac_x_includes=no ac_x_libraries=no
81ecdfbb 13007rm -f -r conftest.dir
bec39cab
AC
13008if mkdir conftest.dir; then
13009 cd conftest.dir
bec39cab 13010 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13011incroot:
13012 @echo incroot='${INCROOT}'
13013usrlibdir:
13014 @echo usrlibdir='${USRLIBDIR}'
13015libdir:
13016 @echo libdir='${LIBDIR}'
13017_ACEOF
13018 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13019 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13020 for ac_var in incroot usrlibdir libdir; do
13021 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13022 done
c906108c 13023 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13024 for ac_extension in a so sl dylib la dll; do
13025 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13026 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13027 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13028 fi
13029 done
13030 # Screen out bogus values from the imake configuration. They are
13031 # bogus both because they are the default anyway, and because
13032 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13033 case $ac_im_incroot in
81ecdfbb 13034 /usr/include) ac_x_includes= ;;
bec39cab 13035 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13036 esac
bec39cab 13037 case $ac_im_usrlibdir in
81ecdfbb 13038 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13039 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13040 esac
13041 fi
13042 cd ..
81ecdfbb 13043 rm -f -r conftest.dir
c906108c
SS
13044fi
13045
bec39cab
AC
13046# Standard set of common directories for X headers.
13047# Check X11 before X11Rn because it is often a symlink to the current release.
13048ac_x_header_dirs='
13049/usr/X11/include
81ecdfbb 13050/usr/X11R7/include
bec39cab
AC
13051/usr/X11R6/include
13052/usr/X11R5/include
13053/usr/X11R4/include
13054
13055/usr/include/X11
81ecdfbb 13056/usr/include/X11R7
bec39cab
AC
13057/usr/include/X11R6
13058/usr/include/X11R5
13059/usr/include/X11R4
13060
13061/usr/local/X11/include
81ecdfbb 13062/usr/local/X11R7/include
bec39cab
AC
13063/usr/local/X11R6/include
13064/usr/local/X11R5/include
13065/usr/local/X11R4/include
13066
13067/usr/local/include/X11
81ecdfbb 13068/usr/local/include/X11R7
bec39cab
AC
13069/usr/local/include/X11R6
13070/usr/local/include/X11R5
13071/usr/local/include/X11R4
13072
13073/usr/X386/include
13074/usr/x386/include
13075/usr/XFree86/include/X11
13076
13077/usr/include
13078/usr/local/include
13079/usr/unsupported/include
13080/usr/athena/include
13081/usr/local/x11r5/include
13082/usr/lpp/Xamples/include
13083
13084/usr/openwin/include
13085/usr/openwin/share/include'
13086
13087if test "$ac_x_includes" = no; then
81ecdfbb 13088 # Guess where to find include files, by looking for Xlib.h.
c906108c 13089 # First, try using that file with no special directory specified.
81ecdfbb 13090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13091/* end confdefs.h. */
81ecdfbb 13092#include <X11/Xlib.h>
bec39cab 13093_ACEOF
81ecdfbb 13094if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13095 # We can compile using X headers with no special include directory.
13096ac_x_includes=
13097else
bec39cab 13098 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13099 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13100 ac_x_includes=$ac_dir
13101 break
13102 fi
13103done
c906108c 13104fi
bec39cab
AC
13105rm -f conftest.err conftest.$ac_ext
13106fi # $ac_x_includes = no
c906108c 13107
bec39cab 13108if test "$ac_x_libraries" = no; then
c906108c 13109 # Check for the libraries.
c906108c
SS
13110 # See if we find them without any special options.
13111 # Don't add to $LIBS permanently.
bec39cab 13112 ac_save_LIBS=$LIBS
81ecdfbb
RW
13113 LIBS="-lX11 $LIBS"
13114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13115/* end confdefs.h. */
81ecdfbb 13116#include <X11/Xlib.h>
bec39cab
AC
13117int
13118main ()
13119{
81ecdfbb 13120XrmInitialize ()
bec39cab
AC
13121 ;
13122 return 0;
13123}
13124_ACEOF
81ecdfbb 13125if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13126 LIBS=$ac_save_LIBS
c906108c
SS
13127# We can link X programs with no special library path.
13128ac_x_libraries=
13129else
81ecdfbb
RW
13130 LIBS=$ac_save_LIBS
13131for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13132do
bec39cab 13133 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13134 for ac_extension in a so sl dylib la dll; do
13135 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13136 ac_x_libraries=$ac_dir
13137 break 2
13138 fi
13139 done
13140done
13141fi
81ecdfbb
RW
13142rm -f core conftest.err conftest.$ac_objext \
13143 conftest$ac_exeext conftest.$ac_ext
bec39cab 13144fi # $ac_x_libraries = no
c906108c 13145
81ecdfbb
RW
13146case $ac_x_includes,$ac_x_libraries in #(
13147 no,* | *,no | *\'*)
13148 # Didn't find X, or a directory has "'" in its name.
13149 ac_cv_have_x="have_x=no";; #(
13150 *)
13151 # Record where we found X for the cache.
13152 ac_cv_have_x="have_x=yes\
13153 ac_x_includes='$ac_x_includes'\
13154 ac_x_libraries='$ac_x_libraries'"
13155esac
c906108c 13156fi
81ecdfbb
RW
13157;; #(
13158 *) have_x=yes;;
13159 esac
c906108c
SS
13160 eval "$ac_cv_have_x"
13161fi # $with_x != no
13162
13163if test "$have_x" != yes; then
81ecdfbb
RW
13164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13165$as_echo "$have_x" >&6; }
c906108c
SS
13166 no_x=yes
13167else
13168 # If each of the values was on the command line, it overrides each guess.
13169 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13170 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13171 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13172 ac_cv_have_x="have_x=yes\
13173 ac_x_includes='$x_includes'\
13174 ac_x_libraries='$x_libraries'"
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13176$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13177fi
13178
13179
bec39cab 13180# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13181# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13182# This code just checks for a few cases where we'd like to ignore those
13183# definitions, even when they're present in the '.mt' file. These cases
13184# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13185# not part of the source tree.
7a292a7a 13186#
81ecdfbb
RW
13187# Check whether --enable-sim was given.
13188if test "${enable_sim+set}" = set; then :
13189 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13190 echo "enableval = ${enableval}";
13191 case "${enableval}" in
13192 yes) ignore_sim=false ;;
13193 no) ignore_sim=true ;;
13194 *) ignore_sim=false ;;
13195 esac
13196else
13197 ignore_sim=false
81ecdfbb
RW
13198fi
13199
7a292a7a
SS
13200
13201if test ! -d "${srcdir}/../sim"; then
13202 ignore_sim=true
13203fi
13204
9b624dbe
UW
13205SIM=
13206SIM_OBS=
13207if test "${ignore_sim}" = "false"; then
13208 if test x"${gdb_sim}" != x ; then
13209 SIM="${gdb_sim}"
13210 SIM_OBS="remote-sim.o"
60ca704f 13211
81ecdfbb 13212$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13213
9b624dbe 13214 fi
7a292a7a
SS
13215fi
13216
13217
13218
c906108c
SS
13219
13220
13221
13222
13223
13224
dfcd3bfb 13225
e56ac5c3
AC
13226
13227
b3a90332
AC
13228
13229
c35f4ffc 13230# List of host floatformats.
bec39cab
AC
13231
13232cat >>confdefs.h <<_ACEOF
c35f4ffc 13233#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13234_ACEOF
c35f4ffc 13235
bec39cab
AC
13236
13237cat >>confdefs.h <<_ACEOF
c35f4ffc 13238#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13239_ACEOF
13240
c35f4ffc 13241
bec39cab 13242cat >>confdefs.h <<_ACEOF
c35f4ffc 13243#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13244_ACEOF
c35f4ffc
AC
13245
13246
c906108c
SS
13247# target_subdir is used by the testsuite to find the target libraries.
13248target_subdir=
13249if test "${host}" != "${target}"; then
13250 target_subdir="${target_alias}/"
13251fi
13252
13253
13254frags=
771b4502 13255if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13256 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13257 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13258 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13259 fi
13260 frags="$frags $host_makefile_frag"
13261else
13262 host_makefile_frag=/dev/null
c906108c 13263fi
c906108c 13264
c906108c
SS
13265
13266
13267
771b4502 13268if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13269# We pick this up from the host configuration file (.mh) because we
13270# do not have a native configuration Makefile fragment.
c906108c
SS
13271nativefile=`sed -n '
13272s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13273' ${host_makefile_frag}`
c906108c
SS
13274fi
13275
13276
b00a8037 13277if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13278
13279cat >>confdefs.h <<_ACEOF
b00a8037 13280#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13281_ACEOF
b00a8037
DJ
13282
13283fi
13284
8dcde887 13285# Enable multi-ice-gdb-server.
81ecdfbb
RW
13286# Check whether --enable-multi-ice was given.
13287if test "${enable_multi_ice+set}" = set; then :
13288 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13289 yes | no)
13290 ;;
81ecdfbb 13291 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13292 esac
81ecdfbb 13293fi
b4e70030 13294
81ecdfbb
RW
13295if test "x$enable_multi_ice" = xyes; then
13296 subdirs="$subdirs multi-ice"
3ace7edb 13297
a85f51e7
DJ
13298fi
13299
496c0e1b
JB
13300# Check whether --enable-gdbserver was given.
13301if test "${enable_gdbserver+set}" = set; then :
13302 enableval=$enable_gdbserver; case "${enableval}" in
13303 yes| no|auto) ;;
13304 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13305esac
13306else
13307 enable_gdbserver=auto
13308fi
13309
13310
13311# We only build gdbserver automatically in a native configuration, and
13312# only if the user did not explicitly disable its build.
13313if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13315$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13316 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13318$as_echo "yes" >&6; }
13319 subdirs="$subdirs gdbserver"
3ace7edb 13320
496c0e1b 13321 gdbserver_build_enabled=yes
8dcde887 13322 else
81ecdfbb
RW
13323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13324$as_echo "no" >&6; }
8dcde887
MK
13325 fi
13326fi
13327
496c0e1b
JB
13328# If the user explicitly request the gdbserver to be built, verify that
13329# we were in fact able to enable it.
13330if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13331 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13332fi
13333
db985757 13334# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13335# to an empty version.
c906108c
SS
13336
13337files=
13338links=
5a2402b8 13339
c906108c
SS
13340rm -f nm.h
13341if test "${nativefile}" != ""; then
0f475e27
AC
13342 case "${nativefile}" in
13343 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13344 * ) GDB_NM_FILE="${nativefile}"
13345 esac
5a2402b8
AC
13346 files="${files} ${GDB_NM_FILE}"
13347 links="${links} nm.h"
60ca704f
SE
13348
13349cat >>confdefs.h <<_ACEOF
b78960be 13350#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 13351_ACEOF
5a2402b8 13352
c906108c 13353fi
5a2402b8
AC
13354
13355
bec39cab
AC
13356ac_sources="$files"
13357ac_dests="$links"
13358while test -n "$ac_sources"; do
13359 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
13360 set $ac_sources; ac_source=$1; shift; ac_sources=$*
13361 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
13362done
81ecdfbb 13363ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
13364
13365
c906108c
SS
13366
13367
c906108c 13368
81ecdfbb 13369$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 13370
bec39cab 13371
c971b7fa 13372ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
13373
13374ac_config_commands="$ac_config_commands default"
89a34d1b 13375
bec39cab
AC
13376cat >confcache <<\_ACEOF
13377# This file is a shell script that caches the results of configure
13378# tests run on this system so they can be shared between configure
13379# scripts and configure runs, see configure's option --config-cache.
13380# It is not useful on other systems. If it contains results you don't
13381# want to keep, you may remove or edit it.
13382#
13383# config.status only pays attention to the cache file if you give it
13384# the --recheck option to rerun configure.
13385#
13386# `ac_cv_env_foo' variables (set or unset) will be overridden when
13387# loading this file, other *unset* `ac_cv_foo' will be assigned the
13388# following values.
13389
13390_ACEOF
13391
13392# The following way of writing the cache mishandles newlines in values,
13393# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 13394# So, we kill variables containing newlines.
bec39cab
AC
13395# Ultrix sh set writes to stderr and can't be redirected directly,
13396# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
13397(
13398 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13399 eval ac_val=\$$ac_var
13400 case $ac_val in #(
13401 *${as_nl}*)
13402 case $ac_var in #(
13403 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13404$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13405 esac
13406 case $ac_var in #(
13407 _ | IFS | as_nl) ;; #(
13408 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13409 *) { eval $ac_var=; unset $ac_var;} ;;
13410 esac ;;
13411 esac
13412 done
13413
bec39cab 13414 (set) 2>&1 |
81ecdfbb
RW
13415 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13416 *${as_nl}ac_space=\ *)
13417 # `set' does not quote correctly, so add quotes: double-quote
13418 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
13419 sed -n \
13420 "s/'/'\\\\''/g;
13421 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 13422 ;; #(
bec39cab
AC
13423 *)
13424 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 13425 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 13426 ;;
81ecdfbb
RW
13427 esac |
13428 sort
13429) |
bec39cab 13430 sed '
81ecdfbb 13431 /^ac_cv_env_/b end
bec39cab 13432 t clear
81ecdfbb 13433 :clear
bec39cab
AC
13434 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13435 t end
81ecdfbb
RW
13436 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13437 :end' >>confcache
13438if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13439 if test -w "$cache_file"; then
13440 test "x$cache_file" != "x/dev/null" &&
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13442$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
13443 cat confcache >$cache_file
13444 else
81ecdfbb
RW
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13446$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
13447 fi
13448fi
13449rm -f confcache
13450
13451test "x$prefix" = xNONE && prefix=$ac_default_prefix
13452# Let make expand exec_prefix.
13453test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13454
bec39cab
AC
13455DEFS=-DHAVE_CONFIG_H
13456
13457ac_libobjs=
13458ac_ltlibobjs=
13459for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13460 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
13461 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13462 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13463 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13464 # will be set to the directory where LIBOBJS objects are built.
13465 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13466 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
13467done
13468LIBOBJS=$ac_libobjs
13469
13470LTLIBOBJS=$ac_ltlibobjs
13471
13472
85981d60 13473if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
13474 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
13475Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 13476fi
a417dc56 13477if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
13478 as_fn_error "conditional \"GMAKE\" was never defined.
13479Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 13480fi
81ecdfbb
RW
13481
13482
bec39cab 13483: ${CONFIG_STATUS=./config.status}
81ecdfbb 13484ac_write_fail=0
bec39cab
AC
13485ac_clean_files_save=$ac_clean_files
13486ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
13487{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13488$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13489as_write_fail=0
13490cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
13491#! $SHELL
13492# Generated by $as_me.
13493# Run this file to recreate the current configuration.
13494# Compiler output produced by configure, useful for debugging
13495# configure, is in config.log if it exists.
13496
13497debug=false
13498ac_cs_recheck=false
13499ac_cs_silent=false
bec39cab 13500
81ecdfbb
RW
13501SHELL=\${CONFIG_SHELL-$SHELL}
13502export SHELL
13503_ASEOF
13504cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13505## -------------------- ##
13506## M4sh Initialization. ##
13507## -------------------- ##
13508
13509# Be more Bourne compatible
13510DUALCASE=1; export DUALCASE # for MKS sh
13511if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
13512 emulate sh
13513 NULLCMD=:
81ecdfbb 13514 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
13515 # is contrary to our usage. Disable this feature.
13516 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
13517 setopt NO_GLOB_SUBST
13518else
13519 case `(set -o) 2>/dev/null` in #(
13520 *posix*) :
13521 set -o posix ;; #(
13522 *) :
13523 ;;
13524esac
bec39cab 13525fi
bec39cab 13526
81ecdfbb
RW
13527
13528as_nl='
13529'
13530export as_nl
13531# Printing a long string crashes Solaris 7 /usr/bin/printf.
13532as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13533as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13534as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13535# Prefer a ksh shell builtin over an external printf program on Solaris,
13536# but without wasting forks for bash or zsh.
13537if test -z "$BASH_VERSION$ZSH_VERSION" \
13538 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13539 as_echo='print -r --'
13540 as_echo_n='print -rn --'
13541elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13542 as_echo='printf %s\n'
13543 as_echo_n='printf %s'
13544else
13545 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13546 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13547 as_echo_n='/usr/ucb/echo -n'
13548 else
13549 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13550 as_echo_n_body='eval
13551 arg=$1;
13552 case $arg in #(
13553 *"$as_nl"*)
13554 expr "X$arg" : "X\\(.*\\)$as_nl";
13555 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13556 esac;
13557 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13558 '
13559 export as_echo_n_body
13560 as_echo_n='sh -c $as_echo_n_body as_echo'
13561 fi
13562 export as_echo_body
13563 as_echo='sh -c $as_echo_body as_echo'
13564fi
13565
13566# The user is always right.
13567if test "${PATH_SEPARATOR+set}" != set; then
13568 PATH_SEPARATOR=:
13569 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13570 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13571 PATH_SEPARATOR=';'
13572 }
bec39cab
AC
13573fi
13574
13575
81ecdfbb
RW
13576# IFS
13577# We need space, tab and new line, in precisely that order. Quoting is
13578# there to prevent editors from complaining about space-tab.
13579# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13580# splitting by setting IFS to empty value.)
13581IFS=" "" $as_nl"
13582
13583# Find who we are. Look in the path if we contain no directory separator.
13584case $0 in #((
13585 *[\\/]* ) as_myself=$0 ;;
13586 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13587for as_dir in $PATH
13588do
13589 IFS=$as_save_IFS
13590 test -z "$as_dir" && as_dir=.
13591 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13592 done
13593IFS=$as_save_IFS
13594
13595 ;;
13596esac
13597# We did not find ourselves, most probably we were run as `sh COMMAND'
13598# in which case we are not to be found in the path.
13599if test "x$as_myself" = x; then
13600 as_myself=$0
13601fi
13602if test ! -f "$as_myself"; then
13603 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13604 exit 1
13605fi
13606
13607# Unset variables that we do not need and which cause bugs (e.g. in
13608# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13609# suppresses any "Segmentation fault" message there. '((' could
13610# trigger a bug in pdksh 5.2.14.
13611for as_var in BASH_ENV ENV MAIL MAILPATH
13612do eval test x\${$as_var+set} = xset \
13613 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13614done
bec39cab
AC
13615PS1='$ '
13616PS2='> '
13617PS4='+ '
13618
13619# NLS nuisances.
81ecdfbb
RW
13620LC_ALL=C
13621export LC_ALL
13622LANGUAGE=C
13623export LANGUAGE
13624
13625# CDPATH.
13626(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13627
13628
13629# as_fn_error ERROR [LINENO LOG_FD]
13630# ---------------------------------
13631# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13632# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13633# script with status $?, using 1 if that was 0.
13634as_fn_error ()
13635{
13636 as_status=$?; test $as_status -eq 0 && as_status=1
13637 if test "$3"; then
13638 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13639 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13640 fi
13641 $as_echo "$as_me: error: $1" >&2
13642 as_fn_exit $as_status
13643} # as_fn_error
13644
13645
13646# as_fn_set_status STATUS
13647# -----------------------
13648# Set $? to STATUS, without forking.
13649as_fn_set_status ()
13650{
13651 return $1
13652} # as_fn_set_status
13653
13654# as_fn_exit STATUS
13655# -----------------
13656# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13657as_fn_exit ()
13658{
13659 set +e
13660 as_fn_set_status $1
13661 exit $1
13662} # as_fn_exit
13663
13664# as_fn_unset VAR
13665# ---------------
13666# Portably unset VAR.
13667as_fn_unset ()
13668{
13669 { eval $1=; unset $1;}
13670}
13671as_unset=as_fn_unset
13672# as_fn_append VAR VALUE
13673# ----------------------
13674# Append the text in VALUE to the end of the definition contained in VAR. Take
13675# advantage of any shell optimizations that allow amortized linear growth over
13676# repeated appends, instead of the typical quadratic growth present in naive
13677# implementations.
13678if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13679 eval 'as_fn_append ()
13680 {
13681 eval $1+=\$2
13682 }'
13683else
13684 as_fn_append ()
13685 {
13686 eval $1=\$$1\$2
13687 }
13688fi # as_fn_append
13689
13690# as_fn_arith ARG...
13691# ------------------
13692# Perform arithmetic evaluation on the ARGs, and store the result in the
13693# global $as_val. Take advantage of shells that can avoid forks. The arguments
13694# must be portable across $(()) and expr.
13695if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13696 eval 'as_fn_arith ()
13697 {
13698 as_val=$(( $* ))
13699 }'
13700else
13701 as_fn_arith ()
13702 {
13703 as_val=`expr "$@" || test $? -eq 1`
13704 }
13705fi # as_fn_arith
bec39cab 13706
81ecdfbb
RW
13707
13708if expr a : '\(a\)' >/dev/null 2>&1 &&
13709 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
13710 as_expr=expr
13711else
13712 as_expr=false
13713fi
13714
81ecdfbb 13715if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
13716 as_basename=basename
13717else
13718 as_basename=false
13719fi
13720
81ecdfbb
RW
13721if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13722 as_dirname=dirname
13723else
13724 as_dirname=false
13725fi
bec39cab 13726
81ecdfbb 13727as_me=`$as_basename -- "$0" ||
bec39cab
AC
13728$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13729 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
13730 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13731$as_echo X/"$0" |
13732 sed '/^.*\/\([^/][^/]*\)\/*$/{
13733 s//\1/
13734 q
13735 }
13736 /^X\/\(\/\/\)$/{
13737 s//\1/
13738 q
13739 }
13740 /^X\/\(\/\).*/{
13741 s//\1/
13742 q
13743 }
13744 s/.*/./; q'`
b4e70030 13745
b4e70030
JB
13746# Avoid depending upon Character Ranges.
13747as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13748as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13749as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13750as_cr_digits='0123456789'
13751as_cr_alnum=$as_cr_Letters$as_cr_digits
13752
81ecdfbb
RW
13753ECHO_C= ECHO_N= ECHO_T=
13754case `echo -n x` in #(((((
13755-n*)
13756 case `echo 'xy\c'` in
13757 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13758 xy) ECHO_C='\c';;
13759 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13760 ECHO_T=' ';;
13761 esac;;
13762*)
13763 ECHO_N='-n';;
bec39cab
AC
13764esac
13765
81ecdfbb
RW
13766rm -f conf$$ conf$$.exe conf$$.file
13767if test -d conf$$.dir; then
13768 rm -f conf$$.dir/conf$$.file
bec39cab 13769else
81ecdfbb
RW
13770 rm -f conf$$.dir
13771 mkdir conf$$.dir 2>/dev/null
bec39cab 13772fi
81ecdfbb
RW
13773if (echo >conf$$.file) 2>/dev/null; then
13774 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 13775 as_ln_s='ln -s'
81ecdfbb
RW
13776 # ... but there are two gotchas:
13777 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13778 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13779 # In both cases, we have to default to `cp -p'.
13780 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13781 as_ln_s='cp -p'
13782 elif ln conf$$.file conf$$ 2>/dev/null; then
13783 as_ln_s=ln
13784 else
13785 as_ln_s='cp -p'
b4e70030 13786 fi
bec39cab
AC
13787else
13788 as_ln_s='cp -p'
13789fi
81ecdfbb
RW
13790rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13791rmdir conf$$.dir 2>/dev/null
13792
13793
13794# as_fn_mkdir_p
13795# -------------
13796# Create "$as_dir" as a directory, including parents if necessary.
13797as_fn_mkdir_p ()
13798{
13799
13800 case $as_dir in #(
13801 -*) as_dir=./$as_dir;;
13802 esac
13803 test -d "$as_dir" || eval $as_mkdir_p || {
13804 as_dirs=
13805 while :; do
13806 case $as_dir in #(
13807 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13808 *) as_qdir=$as_dir;;
13809 esac
13810 as_dirs="'$as_qdir' $as_dirs"
13811 as_dir=`$as_dirname -- "$as_dir" ||
13812$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13813 X"$as_dir" : 'X\(//\)[^/]' \| \
13814 X"$as_dir" : 'X\(//\)$' \| \
13815 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13816$as_echo X"$as_dir" |
13817 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13818 s//\1/
13819 q
13820 }
13821 /^X\(\/\/\)[^/].*/{
13822 s//\1/
13823 q
13824 }
13825 /^X\(\/\/\)$/{
13826 s//\1/
13827 q
13828 }
13829 /^X\(\/\).*/{
13830 s//\1/
13831 q
13832 }
13833 s/.*/./; q'`
13834 test -d "$as_dir" && break
13835 done
13836 test -z "$as_dirs" || eval "mkdir $as_dirs"
13837 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13838
bec39cab 13839
81ecdfbb 13840} # as_fn_mkdir_p
bec39cab 13841if mkdir -p . 2>/dev/null; then
81ecdfbb 13842 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
13843else
13844 test -d ./-p && rmdir ./-p
13845 as_mkdir_p=false
13846fi
13847
81ecdfbb
RW
13848if test -x / >/dev/null 2>&1; then
13849 as_test_x='test -x'
13850else
13851 if ls -dL / >/dev/null 2>&1; then
13852 as_ls_L_option=L
13853 else
13854 as_ls_L_option=
13855 fi
13856 as_test_x='
13857 eval sh -c '\''
13858 if test -d "$1"; then
13859 test -d "$1/.";
13860 else
13861 case $1 in #(
13862 -*)set "./$1";;
13863 esac;
13864 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
13865 ???[sx]*):;;*)false;;esac;fi
13866 '\'' sh
13867 '
13868fi
13869as_executable_p=$as_test_x
bec39cab
AC
13870
13871# Sed expression to map a string onto a valid CPP name.
13872as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13873
13874# Sed expression to map a string onto a valid variable name.
13875as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13876
13877
bec39cab 13878exec 6>&1
81ecdfbb
RW
13879## ----------------------------------- ##
13880## Main body of $CONFIG_STATUS script. ##
13881## ----------------------------------- ##
13882_ASEOF
13883test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13884
13885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13886# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 13887# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
13888# values after options handling.
13889ac_log="
bec39cab 13890This file was extended by $as_me, which was
81ecdfbb 13891generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
13892
13893 CONFIG_FILES = $CONFIG_FILES
13894 CONFIG_HEADERS = $CONFIG_HEADERS
13895 CONFIG_LINKS = $CONFIG_LINKS
13896 CONFIG_COMMANDS = $CONFIG_COMMANDS
13897 $ $0 $@
13898
81ecdfbb
RW
13899on `(hostname || uname -n) 2>/dev/null | sed 1q`
13900"
13901
bec39cab
AC
13902_ACEOF
13903
81ecdfbb
RW
13904case $ac_config_files in *"
13905"*) set x $ac_config_files; shift; ac_config_files=$*;;
13906esac
234b45d4 13907
81ecdfbb
RW
13908case $ac_config_headers in *"
13909"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13910esac
b4e70030 13911
b4e70030 13912
81ecdfbb
RW
13913cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13914# Files that config.status was made for.
13915config_files="$ac_config_files"
13916config_headers="$ac_config_headers"
13917config_links="$ac_config_links"
13918config_commands="$ac_config_commands"
234b45d4 13919
81ecdfbb 13920_ACEOF
b4e70030 13921
81ecdfbb 13922cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 13923ac_cs_usage="\
81ecdfbb
RW
13924\`$as_me' instantiates files and other configuration actions
13925from templates according to the current configuration. Unless the files
13926and actions are specified as TAGs, all are instantiated by default.
234b45d4 13927
81ecdfbb 13928Usage: $0 [OPTION]... [TAG]...
234b45d4 13929
bec39cab 13930 -h, --help print this help, then exit
81ecdfbb
RW
13931 -V, --version print version number and configuration settings, then exit
13932 -q, --quiet, --silent
13933 do not print progress messages
bec39cab
AC
13934 -d, --debug don't remove temporary files
13935 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
13936 --file=FILE[:TEMPLATE]
13937 instantiate the configuration file FILE
13938 --header=FILE[:TEMPLATE]
13939 instantiate the configuration header FILE
234b45d4 13940
bec39cab
AC
13941Configuration files:
13942$config_files
234b45d4 13943
bec39cab
AC
13944Configuration headers:
13945$config_headers
234b45d4 13946
bec39cab
AC
13947Configuration links:
13948$config_links
234b45d4 13949
bec39cab
AC
13950Configuration commands:
13951$config_commands
13952
81ecdfbb 13953Report bugs to the package provider."
b4e70030 13954
81ecdfbb
RW
13955_ACEOF
13956cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
13957ac_cs_version="\\
13958config.status
81ecdfbb
RW
13959configured by $0, generated by GNU Autoconf 2.64,
13960 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 13961
81ecdfbb 13962Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
13963This config.status script is free software; the Free Software Foundation
13964gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
13965
13966ac_pwd='$ac_pwd'
13967srcdir='$srcdir'
13968INSTALL='$INSTALL'
81ecdfbb
RW
13969AWK='$AWK'
13970test -n "\$AWK" || AWK=awk
bec39cab
AC
13971_ACEOF
13972
81ecdfbb
RW
13973cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13974# The default lists apply if the user does not specify any file.
bec39cab
AC
13975ac_need_defaults=:
13976while test $# != 0
13977do
13978 case $1 in
13979 --*=*)
81ecdfbb
RW
13980 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13981 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 13982 ac_shift=:
c906108c 13983 ;;
81ecdfbb 13984 *)
bec39cab
AC
13985 ac_option=$1
13986 ac_optarg=$2
13987 ac_shift=shift
c906108c 13988 ;;
bec39cab 13989 esac
c906108c 13990
bec39cab
AC
13991 case $ac_option in
13992 # Handling of the options.
bec39cab
AC
13993 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13994 ac_cs_recheck=: ;;
81ecdfbb
RW
13995 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13996 $as_echo "$ac_cs_version"; exit ;;
13997 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
13998 debug=: ;;
13999 --file | --fil | --fi | --f )
14000 $ac_shift
81ecdfbb
RW
14001 case $ac_optarg in
14002 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14003 esac
14004 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14005 ac_need_defaults=false;;
14006 --header | --heade | --head | --hea )
14007 $ac_shift
81ecdfbb
RW
14008 case $ac_optarg in
14009 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14010 esac
14011 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14012 ac_need_defaults=false;;
81ecdfbb
RW
14013 --he | --h)
14014 # Conflict between --help and --header
14015 as_fn_error "ambiguous option: \`$1'
14016Try \`$0 --help' for more information.";;
14017 --help | --hel | -h )
14018 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14020 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14021 ac_cs_silent=: ;;
c906108c 14022
bec39cab 14023 # This is an error.
81ecdfbb
RW
14024 -*) as_fn_error "unrecognized option: \`$1'
14025Try \`$0 --help' for more information." ;;
c906108c 14026
81ecdfbb
RW
14027 *) as_fn_append ac_config_targets " $1"
14028 ac_need_defaults=false ;;
c906108c 14029
bec39cab
AC
14030 esac
14031 shift
14032done
c906108c 14033
bec39cab 14034ac_configure_extra_args=
c906108c 14035
bec39cab
AC
14036if $ac_cs_silent; then
14037 exec 6>/dev/null
14038 ac_configure_extra_args="$ac_configure_extra_args --silent"
14039fi
c906108c 14040
bec39cab 14041_ACEOF
81ecdfbb 14042cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14043if \$ac_cs_recheck; then
81ecdfbb
RW
14044 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14045 shift
14046 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14047 CONFIG_SHELL='$SHELL'
14048 export CONFIG_SHELL
14049 exec "\$@"
bec39cab
AC
14050fi
14051
14052_ACEOF
81ecdfbb
RW
14053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14054exec 5>>config.log
14055{
14056 echo
14057 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14058## Running $as_me. ##
14059_ASBOX
14060 $as_echo "$ac_log"
14061} >&5
bec39cab 14062
81ecdfbb
RW
14063_ACEOF
14064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14065#
81ecdfbb 14066# INIT-COMMANDS
c906108c 14067#
a417dc56 14068ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14069
bec39cab
AC
14070_ACEOF
14071
81ecdfbb 14072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14073
81ecdfbb 14074# Handling of arguments.
bec39cab 14075for ac_config_target in $ac_config_targets
c906108c 14076do
81ecdfbb
RW
14077 case $ac_config_target in
14078 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14079 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14080 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14081 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14082 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14083 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14084 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14085 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14086 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14087
14088 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14089 esac
14090done
14091
81ecdfbb 14092
bec39cab
AC
14093# If the user did not use the arguments to specify the items to instantiate,
14094# then the envvar interface is used. Set only those that are not.
14095# We use the long form for the default assignment because of an extremely
14096# bizarre bug on SunOS 4.1.3.
14097if $ac_need_defaults; then
14098 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14099 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14100 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14101 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14102fi
14103
b4e70030 14104# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14105# simply because there is no reason against having it here, and in addition,
b4e70030 14106# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14107# Hook for its removal unless debugging.
14108# Note that there is a small window in which the directory will not be cleaned:
14109# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14110$debug ||
14111{
81ecdfbb
RW
14112 tmp=
14113 trap 'exit_status=$?
14114 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14115' 0
14116 trap 'as_fn_exit 1' 1 2 13 15
14117}
14118# Create a (secure) tmp directory for tmp files.
14119
14120{
14121 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14122 test -n "$tmp" && test -d "$tmp"
14123} ||
14124{
14125 tmp=./conf$$-$RANDOM
14126 (umask 077 && mkdir "$tmp")
14127} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14128
14129# Set up the scripts for CONFIG_FILES section.
14130# No need to generate them if there are no CONFIG_FILES.
14131# This happens for instance with `./config.status config.h'.
14132if test -n "$CONFIG_FILES"; then
14133
14134if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14135 ac_cs_awk_getline=:
14136 ac_cs_awk_pipe_init=
14137 ac_cs_awk_read_file='
14138 while ((getline aline < (F[key])) > 0)
14139 print(aline)
14140 close(F[key])'
14141 ac_cs_awk_pipe_fini=
14142else
14143 ac_cs_awk_getline=false
14144 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14145 ac_cs_awk_read_file='
14146 print "|#_!!_#|"
14147 print "cat " F[key] " &&"
14148 '$ac_cs_awk_pipe_init
14149 # The final `:' finishes the AND list.
14150 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14151fi
14152ac_cr=`echo X | tr X '\015'`
14153# On cygwin, bash can eat \r inside `` if the user requested igncr.
14154# But we know of no other shell where ac_cr would be empty at this
14155# point, so we can use a bashism as a fallback.
14156if test "x$ac_cr" = x; then
14157 eval ac_cr=\$\'\\r\'
14158fi
14159ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14160if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14161 ac_cs_awk_cr='\r'
14162else
14163 ac_cs_awk_cr=$ac_cr
14164fi
14165
14166echo 'BEGIN {' >"$tmp/subs1.awk" &&
14167_ACEOF
14168
14169# Create commands to substitute file output variables.
14170{
14171 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14172 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14173 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14174 echo "_ACAWK" &&
14175 echo "_ACEOF"
14176} >conf$$files.sh &&
14177. ./conf$$files.sh ||
14178 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14179rm -f conf$$files.sh
14180
14181{
14182 echo "cat >conf$$subs.awk <<_ACEOF" &&
14183 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14184 echo "_ACEOF"
14185} >conf$$subs.sh ||
14186 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14187ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14188ac_delim='%!_!# '
14189for ac_last_try in false false false false false :; do
14190 . ./conf$$subs.sh ||
14191 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14192
14193 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14194 if test $ac_delim_n = $ac_delim_num; then
14195 break
14196 elif $ac_last_try; then
14197 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14198 else
14199 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14200 fi
14201done
14202rm -f conf$$subs.sh
14203
14204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14205cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14206_ACEOF
14207sed -n '
14208h
14209s/^/S["/; s/!.*/"]=/
14210p
14211g
14212s/^[^!]*!//
14213:repl
14214t repl
14215s/'"$ac_delim"'$//
14216t delim
14217:nl
14218h
14219s/\(.\{148\}\).*/\1/
14220t more1
14221s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14222p
14223n
14224b repl
14225:more1
14226s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14227p
14228g
14229s/.\{148\}//
14230t nl
14231:delim
14232h
14233s/\(.\{148\}\).*/\1/
14234t more2
14235s/["\\]/\\&/g; s/^/"/; s/$/"/
14236p
14237b
14238:more2
14239s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14240p
14241g
14242s/.\{148\}//
14243t delim
14244' <conf$$subs.awk | sed '
14245/^[^""]/{
14246 N
14247 s/\n//
14248}
14249' >>$CONFIG_STATUS || ac_write_fail=1
14250rm -f conf$$subs.awk
14251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14252_ACAWK
14253cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14254 for (key in S) S_is_set[key] = 1
14255 FS = "\a"
14256 \$ac_cs_awk_pipe_init
14257}
14258{
14259 line = $ 0
14260 nfields = split(line, field, "@")
14261 substed = 0
14262 len = length(field[1])
14263 for (i = 2; i < nfields; i++) {
14264 key = field[i]
14265 keylen = length(key)
14266 if (S_is_set[key]) {
14267 value = S[key]
14268 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14269 len += length(value) + length(field[++i])
14270 substed = 1
14271 } else
14272 len += 1 + keylen
14273 }
14274 if (nfields == 3 && !substed) {
14275 key = field[2]
14276 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14277 \$ac_cs_awk_read_file
14278 next
14279 }
14280 }
14281 print line
b4e70030 14282}
81ecdfbb
RW
14283\$ac_cs_awk_pipe_fini
14284_ACAWK
14285_ACEOF
14286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14287if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14288 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14289else
14290 cat
14291fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14292 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14293_ACEOF
14294
14295# VPATH may cause trouble with some makes, so we remove $(srcdir),
14296# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14297# trailing colons and then remove the whole line if VPATH becomes empty
14298# (actually we leave an empty line to preserve line numbers).
14299if test "x$srcdir" = x.; then
14300 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14301s/:*\$(srcdir):*/:/
14302s/:*\${srcdir}:*/:/
14303s/:*@srcdir@:*/:/
14304s/^\([^=]*=[ ]*\):*/\1/
14305s/:*$//
14306s/^[^=]*=[ ]*$//
14307}'
14308fi
14309
14310cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14311fi # test -n "$CONFIG_FILES"
14312
14313# Set up the scripts for CONFIG_HEADERS section.
14314# No need to generate them if there are no CONFIG_HEADERS.
14315# This happens for instance with `./config.status Makefile'.
14316if test -n "$CONFIG_HEADERS"; then
14317cat >"$tmp/defines.awk" <<\_ACAWK ||
14318BEGIN {
14319_ACEOF
14320
14321# Transform confdefs.h into an awk script `defines.awk', embedded as
14322# here-document in config.status, that substitutes the proper values into
14323# config.h.in to produce config.h.
4e8d927d 14324
81ecdfbb
RW
14325# Create a delimiter string that does not exist in confdefs.h, to ease
14326# handling of long lines.
14327ac_delim='%!_!# '
14328for ac_last_try in false false :; do
14329 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14330 if test -z "$ac_t"; then
14331 break
14332 elif $ac_last_try; then
14333 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14334 else
14335 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14336 fi
14337done
4e8d927d 14338
81ecdfbb
RW
14339# For the awk script, D is an array of macro values keyed by name,
14340# likewise P contains macro parameters if any. Preserve backslash
14341# newline sequences.
14342
14343ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14344sed -n '
14345s/.\{148\}/&'"$ac_delim"'/g
14346t rset
14347:rset
14348s/^[ ]*#[ ]*define[ ][ ]*/ /
14349t def
14350d
14351:def
14352s/\\$//
14353t bsnl
14354s/["\\]/\\&/g
14355s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14356D["\1"]=" \3"/p
14357s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14358d
14359:bsnl
14360s/["\\]/\\&/g
14361s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14362D["\1"]=" \3\\\\\\n"\\/p
14363t cont
14364s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14365t cont
14366d
14367:cont
14368n
14369s/.\{148\}/&'"$ac_delim"'/g
14370t clear
14371:clear
14372s/\\$//
14373t bsnlc
14374s/["\\]/\\&/g; s/^/"/; s/$/"/p
14375d
14376:bsnlc
14377s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14378b cont
14379' <confdefs.h | sed '
14380s/'"$ac_delim"'/"\\\
14381"/g' >>$CONFIG_STATUS || ac_write_fail=1
14382
14383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14384 for (key in D) D_is_set[key] = 1
14385 FS = "\a"
14386}
14387/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14388 line = \$ 0
14389 split(line, arg, " ")
14390 if (arg[1] == "#") {
14391 defundef = arg[2]
14392 mac1 = arg[3]
14393 } else {
14394 defundef = substr(arg[1], 2)
14395 mac1 = arg[2]
14396 }
14397 split(mac1, mac2, "(") #)
14398 macro = mac2[1]
14399 prefix = substr(line, 1, index(line, defundef) - 1)
14400 if (D_is_set[macro]) {
14401 # Preserve the white space surrounding the "#".
14402 print prefix "define", macro P[macro] D[macro]
14403 next
14404 } else {
14405 # Replace #undef with comments. This is necessary, for example,
14406 # in the case of _POSIX_SOURCE, which is predefined and required
14407 # on some systems where configure will not decide to define it.
14408 if (defundef == "undef") {
14409 print "/*", prefix defundef, macro, "*/"
14410 next
14411 }
14412 }
b4e70030 14413}
81ecdfbb
RW
14414{ print }
14415_ACAWK
b4e70030 14416_ACEOF
81ecdfbb
RW
14417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14418 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14419fi # test -n "$CONFIG_HEADERS"
4e8d927d 14420
4e8d927d 14421
81ecdfbb
RW
14422eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
14423shift
14424for ac_tag
14425do
14426 case $ac_tag in
14427 :[FHLC]) ac_mode=$ac_tag; continue;;
14428 esac
14429 case $ac_mode$ac_tag in
14430 :[FHL]*:*);;
14431 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
14432 :[FH]-) ac_tag=-:-;;
14433 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14434 esac
14435 ac_save_IFS=$IFS
14436 IFS=:
14437 set x $ac_tag
14438 IFS=$ac_save_IFS
14439 shift
14440 ac_file=$1
14441 shift
4e8d927d 14442
81ecdfbb
RW
14443 case $ac_mode in
14444 :L) ac_source=$1;;
14445 :[FH])
14446 ac_file_inputs=
14447 for ac_f
14448 do
14449 case $ac_f in
14450 -) ac_f="$tmp/stdin";;
14451 *) # Look for the file first in the build tree, then in the source tree
14452 # (if the path is not absolute). The absolute path cannot be DOS-style,
14453 # because $ac_f cannot contain `:'.
14454 test -f "$ac_f" ||
14455 case $ac_f in
14456 [\\/$]*) false;;
14457 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14458 esac ||
14459 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14460 esac
14461 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14462 as_fn_append ac_file_inputs " '$ac_f'"
14463 done
14464
14465 # Let's still pretend it is `configure' which instantiates (i.e., don't
14466 # use $as_me), people would be surprised to read:
14467 # /* config.h. Generated by config.status. */
14468 configure_input='Generated from '`
14469 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14470 `' by configure.'
14471 if test x"$ac_file" != x-; then
14472 configure_input="$ac_file. $configure_input"
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14474$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 14475 fi
81ecdfbb
RW
14476 # Neutralize special characters interpreted by sed in replacement strings.
14477 case $configure_input in #(
14478 *\&* | *\|* | *\\* )
14479 ac_sed_conf_input=`$as_echo "$configure_input" |
14480 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14481 *) ac_sed_conf_input=$configure_input;;
14482 esac
4e8d927d 14483
81ecdfbb
RW
14484 case $ac_tag in
14485 *:-:* | *:-) cat >"$tmp/stdin" \
14486 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
14487 esac
14488 ;;
c906108c
SS
14489 esac
14490
81ecdfbb 14491 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
14492$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14493 X"$ac_file" : 'X\(//\)[^/]' \| \
14494 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
14495 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14496$as_echo X"$ac_file" |
14497 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14498 s//\1/
14499 q
14500 }
14501 /^X\(\/\/\)[^/].*/{
14502 s//\1/
14503 q
14504 }
14505 /^X\(\/\/\)$/{
14506 s//\1/
14507 q
14508 }
14509 /^X\(\/\).*/{
14510 s//\1/
14511 q
14512 }
14513 s/.*/./; q'`
14514 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14515 ac_builddir=.
14516
81ecdfbb
RW
14517case "$ac_dir" in
14518.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14519*)
14520 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14521 # A ".." for each directory in $ac_dir_suffix.
14522 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14523 case $ac_top_builddir_sub in
14524 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14525 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14526 esac ;;
14527esac
14528ac_abs_top_builddir=$ac_pwd
14529ac_abs_builddir=$ac_pwd$ac_dir_suffix
14530# for backward compatibility:
14531ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14532
14533case $srcdir in
81ecdfbb 14534 .) # We are building in place.
bec39cab 14535 ac_srcdir=.
81ecdfbb
RW
14536 ac_top_srcdir=$ac_top_builddir_sub
14537 ac_abs_top_srcdir=$ac_pwd ;;
14538 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14539 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14540 ac_top_srcdir=$srcdir
14541 ac_abs_top_srcdir=$srcdir ;;
14542 *) # Relative name.
14543 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14544 ac_top_srcdir=$ac_top_build_prefix$srcdir
14545 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14546esac
81ecdfbb 14547ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 14548
c906108c 14549
81ecdfbb
RW
14550 case $ac_mode in
14551 :F)
14552 #
14553 # CONFIG_FILE
14554 #
c906108c 14555
bec39cab
AC
14556 case $INSTALL in
14557 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 14558 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 14559 esac
81ecdfbb 14560_ACEOF
121ce6e5 14561
81ecdfbb
RW
14562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14563# If the template does not know about datarootdir, expand it.
14564# FIXME: This hack should be removed a few years after 2.60.
14565ac_datarootdir_hack=; ac_datarootdir_seen=
14566ac_sed_dataroot='
14567/datarootdir/ {
14568 p
14569 q
14570}
14571/@datadir@/p
14572/@docdir@/p
14573/@infodir@/p
14574/@localedir@/p
14575/@mandir@/p'
14576case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14577*datarootdir*) ac_datarootdir_seen=yes;;
14578*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14580$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14581_ACEOF
14582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14583 ac_datarootdir_hack='
14584 s&@datadir@&$datadir&g
14585 s&@docdir@&$docdir&g
14586 s&@infodir@&$infodir&g
14587 s&@localedir@&$localedir&g
14588 s&@mandir@&$mandir&g
14589 s&\\\${datarootdir}&$datarootdir&g' ;;
14590esac
4e8d927d 14591_ACEOF
81ecdfbb
RW
14592
14593# Neutralize VPATH when `$srcdir' = `.'.
14594# Shell code in configure.ac might set extrasub.
14595# FIXME: do we really want to maintain this feature?
14596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14597ac_sed_extra="$ac_vpsub
bec39cab
AC
14598$extrasub
14599_ACEOF
81ecdfbb 14600cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
14601:t
14602/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
14603s|@configure_input@|$ac_sed_conf_input|;t t
14604s&@top_builddir@&$ac_top_builddir_sub&;t t
14605s&@top_build_prefix@&$ac_top_build_prefix&;t t
14606s&@srcdir@&$ac_srcdir&;t t
14607s&@abs_srcdir@&$ac_abs_srcdir&;t t
14608s&@top_srcdir@&$ac_top_srcdir&;t t
14609s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14610s&@builddir@&$ac_builddir&;t t
14611s&@abs_builddir@&$ac_abs_builddir&;t t
14612s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14613s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
14614$ac_datarootdir_hack
14615"
14616eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
14617if $ac_cs_awk_getline; then
14618 $AWK -f "$tmp/subs.awk"
14619else
14620 $AWK -f "$tmp/subs.awk" | $SHELL
14621fi >$tmp/out \
14622 || as_fn_error "could not create $ac_file" "$LINENO" 5
14623
14624test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14625 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14626 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14628which seems to be undefined. Please make sure it is defined." >&5
14629$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14630which seems to be undefined. Please make sure it is defined." >&2;}
14631
14632 rm -f "$tmp/stdin"
bec39cab 14633 case $ac_file in
81ecdfbb
RW
14634 -) cat "$tmp/out" && rm -f "$tmp/out";;
14635 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14636 esac \
14637 || as_fn_error "could not create $ac_file" "$LINENO" 5
14638 ;;
14639 :H)
14640 #
14641 # CONFIG_HEADER
14642 #
bec39cab 14643 if test x"$ac_file" != x-; then
81ecdfbb
RW
14644 {
14645 $as_echo "/* $configure_input */" \
14646 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14647 } >"$tmp/config.h" \
14648 || as_fn_error "could not create $ac_file" "$LINENO" 5
14649 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14651$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 14652 else
81ecdfbb
RW
14653 rm -f "$ac_file"
14654 mv "$tmp/config.h" "$ac_file" \
14655 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
14656 fi
14657 else
81ecdfbb
RW
14658 $as_echo "/* $configure_input */" \
14659 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14660 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 14661 fi
81ecdfbb
RW
14662 ;;
14663 :L)
14664 #
14665 # CONFIG_LINK
14666 #
c906108c 14667
81ecdfbb
RW
14668 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
14669 :
b4e70030 14670 else
81ecdfbb
RW
14671 # Prefer the file from the source tree if names are identical.
14672 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
14673 ac_source=$srcdir/$ac_source
14674 fi
b4e70030 14675
81ecdfbb
RW
14676 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
14677$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 14678
81ecdfbb
RW
14679 if test ! -r "$ac_source"; then
14680 as_fn_error "$ac_source: file not found" "$LINENO" 5
14681 fi
14682 rm -f "$ac_file"
bec39cab 14683
81ecdfbb
RW
14684 # Try a relative symlink, then a hard link, then a copy.
14685 case $srcdir in
14686 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
14687 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
14688 esac
14689 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
14690 ln "$ac_source" "$ac_file" 2>/dev/null ||
14691 cp -p "$ac_source" "$ac_file" ||
14692 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
14693 fi
14694 ;;
14695 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14696$as_echo "$as_me: executing $ac_file commands" >&6;}
14697 ;;
c906108c 14698 esac
b4e70030 14699
bec39cab 14700
81ecdfbb
RW
14701 case $ac_file$ac_mode in
14702 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 14703 "default":C)
c906108c
SS
14704case x$CONFIG_HEADERS in
14705xconfig.h:config.in)
14706echo > stamp-h ;;
14707esac
bec39cab 14708 ;;
81ecdfbb 14709
bec39cab 14710 esac
81ecdfbb 14711done # for ac_tag
c906108c 14712
bec39cab 14713
81ecdfbb 14714as_fn_exit 0
bec39cab 14715_ACEOF
bec39cab
AC
14716ac_clean_files=$ac_clean_files_save
14717
81ecdfbb
RW
14718test $ac_write_fail = 0 ||
14719 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14720
bec39cab
AC
14721
14722# configure is writing to config.log, and then calls config.status.
14723# config.status does its own redirection, appending to config.log.
14724# Unfortunately, on DOS this fails, as config.log is still kept open
14725# by configure, so config.status won't be able to write to it; its
14726# output is simply discarded. So we exec the FD to /dev/null,
14727# effectively closing config.log, so it can be properly (re)opened and
14728# appended to by config.status. When coming back to configure, we
14729# need to make the FD available again.
14730if test "$no_create" != yes; then
14731 ac_cs_success=:
14732 ac_config_status_args=
14733 test "$silent" = yes &&
14734 ac_config_status_args="$ac_config_status_args --quiet"
14735 exec 5>/dev/null
14736 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14737 exec 5>>config.log
14738 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14739 # would make configure fail if this is the last instruction.
81ecdfbb 14740 $ac_cs_success || as_fn_exit $?
bec39cab 14741fi
c906108c 14742
bec39cab 14743#
81ecdfbb 14744# CONFIG_SUBDIRS section.
bec39cab 14745#
c906108c
SS
14746if test "$no_recursion" != yes; then
14747
81ecdfbb
RW
14748 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
14749 # so they do not pile up.
c906108c
SS
14750 ac_sub_configure_args=
14751 ac_prev=
fdc59709
PB
14752 eval "set x $ac_configure_args"
14753 shift
14754 for ac_arg
14755 do
c906108c
SS
14756 if test -n "$ac_prev"; then
14757 ac_prev=
14758 continue
14759 fi
bec39cab 14760 case $ac_arg in
c906108c
SS
14761 -cache-file | --cache-file | --cache-fil | --cache-fi \
14762 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14763 ac_prev=cache_file ;;
14764 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
14765 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14766 | --c=*)
14767 ;;
14768 --config-cache | -C)
c906108c
SS
14769 ;;
14770 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14771 ac_prev=srcdir ;;
14772 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14773 ;;
bec39cab
AC
14774 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14775 ac_prev=prefix ;;
14776 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14777 ;;
81ecdfbb
RW
14778 --disable-option-checking)
14779 ;;
fdc59709
PB
14780 *)
14781 case $ac_arg in
81ecdfbb 14782 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14783 esac
81ecdfbb 14784 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
14785 esac
14786 done
14787
bec39cab
AC
14788 # Always prepend --prefix to ensure using the same prefix
14789 # in subdir configurations.
fdc59709
PB
14790 ac_arg="--prefix=$prefix"
14791 case $ac_arg in
81ecdfbb 14792 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14793 esac
81ecdfbb
RW
14794 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14795
14796 # Pass --silent
14797 if test "$silent" = yes; then
14798 ac_sub_configure_args="--silent $ac_sub_configure_args"
14799 fi
14800
14801 # Always prepend --disable-option-checking to silence warnings, since
14802 # different subdirs can have different --enable and --with options.
14803 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 14804
b4e70030 14805 ac_popdir=`pwd`
bec39cab 14806 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
14807
14808 # Do not complain, so a configure script can configure whichever
14809 # parts of a large source tree are present.
fdc59709 14810 test -d "$srcdir/$ac_dir" || continue
c906108c 14811
81ecdfbb
RW
14812 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14813 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14814 $as_echo "$ac_msg" >&6
14815 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14816 ac_builddir=.
14817
81ecdfbb
RW
14818case "$ac_dir" in
14819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14820*)
14821 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14822 # A ".." for each directory in $ac_dir_suffix.
14823 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14824 case $ac_top_builddir_sub in
14825 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14826 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14827 esac ;;
14828esac
14829ac_abs_top_builddir=$ac_pwd
14830ac_abs_builddir=$ac_pwd$ac_dir_suffix
14831# for backward compatibility:
14832ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14833
14834case $srcdir in
81ecdfbb 14835 .) # We are building in place.
bec39cab 14836 ac_srcdir=.
81ecdfbb
RW
14837 ac_top_srcdir=$ac_top_builddir_sub
14838 ac_abs_top_srcdir=$ac_pwd ;;
14839 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14840 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14841 ac_top_srcdir=$srcdir
14842 ac_abs_top_srcdir=$srcdir ;;
14843 *) # Relative name.
14844 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14845 ac_top_srcdir=$ac_top_build_prefix$srcdir
14846 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14847esac
81ecdfbb 14848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 14849
c906108c 14850
fdc59709 14851 cd "$ac_dir"
c906108c
SS
14852
14853 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
14854 if test -f "$ac_srcdir/configure.gnu"; then
14855 ac_sub_configure=$ac_srcdir/configure.gnu
14856 elif test -f "$ac_srcdir/configure"; then
14857 ac_sub_configure=$ac_srcdir/configure
14858 elif test -f "$ac_srcdir/configure.in"; then
14859 # This should be Cygnus configure.
14860 ac_sub_configure=$ac_aux_dir/configure
c906108c 14861 else
81ecdfbb
RW
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14863$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
14864 ac_sub_configure=
14865 fi
14866
14867 # The recursion is here.
14868 if test -n "$ac_sub_configure"; then
c906108c 14869 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
14870 case $cache_file in
14871 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
14872 *) # Relative name.
14873 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 14874 esac
c906108c 14875
81ecdfbb
RW
14876 { $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
14877$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 14878 # The eval makes quoting arguments work.
fdc59709
PB
14879 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14880 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 14881 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
14882 fi
14883
fdc59709 14884 cd "$ac_popdir"
c906108c
SS
14885 done
14886fi
81ecdfbb
RW
14887if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14889$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14890fi
c906108c
SS
14891
14892
14893exit 0
This page took 2.706514 seconds and 4 git commands to generate.