Document sparc's %l34 and %h34
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb
RW
593LIBOBJS
594GDB_NM_FILE
595frags
596target_subdir
597CONFIG_UNINSTALL
598CONFIG_INSTALL
599CONFIG_CLEAN
600CONFIG_ALL
601CONFIG_SRCS
602CONFIG_DEPS
603CONFIG_OBS
604PROFILE_CFLAGS
605ENABLE_CFLAGS
606SIM_OBS
607SIM
608XMKMF
609GDBTK_SRC_DIR
610GDBTK_CFLAGS
611GDBTKLIBS
612X_LIBS
613X_LDFLAGS
614X_CFLAGS
615TK_XINCLUDES
616TK_DEPS
617TK_LIBRARY
618TK_INCLUDE
619TK_STUB_LIB_SPEC
620TK_STUB_LIB_FLAG
621TK_STUB_LIB_FILE
622TK_LIB_SPEC
623TK_LIB_FLAG
624TK_LIB_FILE
625TK_SRC_DIR
626TK_BIN_DIR
627TK_VERSION
628TCL_DEPS
629TCL_LIBRARY
630TCL_INCLUDE
631TCL_STUB_LIB_SPEC
632TCL_STUB_LIB_FLAG
633TCL_STUB_LIB_FILE
634TCL_LIB_SPEC
635TCL_LIB_FLAG
636TCL_LIB_FILE
637TCL_SRC_DIR
638TCL_BIN_DIR
639TCL_PATCH_LEVEL
640TCL_VERSION
641WIN32LDAPP
642GUI_CFLAGS_X
643LIBGUI
644WIN32LIBS
645SER_HARDWIRE
646WERROR_CFLAGS
647WARN_CFLAGS
648SYSTEM_GDBINIT
81ecdfbb
RW
649TARGET_SYSTEM_ROOT
650CONFIG_LDFLAGS
f6528abd 651RDYNAMIC
81ecdfbb 652ALLOCA
ac534cba
JB
653PYTHON_LIBS
654PYTHON_CPPFLAGS
81ecdfbb 655PYTHON_CFLAGS
ec685c5e 656python_prog_path
81ecdfbb
RW
657LTLIBEXPAT
658LIBEXPAT
659HAVE_LIBEXPAT
b8e0a31c 660JIT_READER_DIR
f997c383 661TARGET_PTR
39037522 662READLINE_TEXI_INCFLAG
81ecdfbb
RW
663READLINE_CFLAGS
664READLINE_DEPS
665READLINE
666MIG
667WINDRES
668DLLTOOL
c971b7fa 669AR
81ecdfbb
RW
670YFLAGS
671YACC
c971b7fa 672RANLIB
81ecdfbb 673LN_S
c971b7fa
PA
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677AWK
81ecdfbb
RW
678REPORT_BUGS_TEXI
679REPORT_BUGS_TO
680PKGVERSION
681TARGET_OBS
682subdirs
683GDB_DATADIR
684DEBUGDIR
5048e516
JK
685MAKEINFO_EXTRA_FLAGS
686MAKEINFOFLAGS
687MAKEINFO
81ecdfbb
RW
688PACKAGE
689GNULIB_STDINT_H
81ecdfbb
RW
690CATOBJEXT
691GENCAT
692INSTOBJEXT
693DATADIRNAME
694CATALOGS
695POSUB
696GMSGFMT
697XGETTEXT
698INCINTL
699LIBINTL_DEP
700LIBINTL
701USE_NLS
702SET_MAKE
703GMAKE_FALSE
704GMAKE_TRUE
705MAKE
706CCDEPMODE
707DEPDIR
708am__leading_dot
709target_os
710target_vendor
711target_cpu
712target
713host_os
714host_vendor
715host_cpu
716host
717build_os
718build_vendor
719build_cpu
720build
c971b7fa
PA
721EGREP
722GREP
723CPP
81ecdfbb
RW
724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731MAINT
732MAINTAINER_MODE_FALSE
733MAINTAINER_MODE_TRUE
734target_alias
735host_alias
736build_alias
737LIBS
738ECHO_T
739ECHO_N
740ECHO_C
741DEFS
742mandir
743localedir
744libdir
745psdir
746pdfdir
747dvidir
748htmldir
749infodir
750docdir
751oldincludedir
752includedir
753localstatedir
754sharedstatedir
755sysconfdir
756datadir
757datarootdir
758libexecdir
759sbindir
760bindir
761program_transform_name
762prefix
763exec_prefix
764PACKAGE_URL
765PACKAGE_BUGREPORT
766PACKAGE_STRING
767PACKAGE_VERSION
768PACKAGE_TARNAME
769PACKAGE_NAME
770PATH_SEPARATOR
771SHELL'
a4ce5b0d 772ac_subst_files='host_makefile_frag'
81ecdfbb
RW
773ac_user_opts='
774enable_option_checking
775enable_maintainer_mode
da2f07f1
JK
776enable_plugins
777enable_largefile
81ecdfbb
RW
778with_separate_debug_dir
779with_gdb_datadir
780with_relocated_sources
bccbefd2 781with_auto_load_safe_path
81ecdfbb
RW
782enable_targets
783enable_64_bit_bfd
784enable_gdbcli
785enable_gdbmi
786enable_tui
787enable_gdbtk
05e7c244 788with_libunwind_ia64
81ecdfbb
RW
789with_curses
790enable_profiling
791with_pkgversion
792with_bugurl
b040ad30 793with_zlib
81ecdfbb 794with_libiconv_prefix
478aac75 795with_iconv_bin
81ecdfbb 796with_system_readline
b8e0a31c 797with_jit_reader_dir
81ecdfbb
RW
798with_expat
799with_gnu_ld
800enable_rpath
801with_libexpat_prefix
802with_python
803with_included_regex
804with_sysroot
805with_system_gdbinit
806enable_werror
807enable_build_warnings
808enable_gdb_build_warnings
809with_tcl
810with_tk
811with_x
812enable_sim
813enable_multi_ice
496c0e1b 814enable_gdbserver
81ecdfbb
RW
815'
816 ac_precious_vars='build_alias
817host_alias
818target_alias
819CC
820CFLAGS
821LDFLAGS
822LIBS
823CPPFLAGS
824CPP
f06e05e0
JK
825MAKEINFO
826MAKEINFOFLAGS
81ecdfbb
RW
827YACC
828YFLAGS
829XMKMF'
5ae98d25 830ac_subdirs_all='testsuite
81ecdfbb
RW
831gdbtk
832multi-ice
833gdbserver'
c906108c
SS
834
835# Initialize some variables set by options.
bec39cab
AC
836ac_init_help=
837ac_init_version=false
81ecdfbb
RW
838ac_unrecognized_opts=
839ac_unrecognized_sep=
c906108c
SS
840# The variables have the same names as the options, with
841# dashes changed to underlines.
bec39cab 842cache_file=/dev/null
c906108c 843exec_prefix=NONE
c906108c 844no_create=
c906108c
SS
845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
850silent=
851site=
852srcdir=
c906108c
SS
853verbose=
854x_includes=NONE
855x_libraries=NONE
bec39cab
AC
856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 862# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
c906108c
SS
868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
c906108c
SS
871includedir='${prefix}/include'
872oldincludedir='/usr/include'
81ecdfbb
RW
873docdir='${datarootdir}/doc/${PACKAGE}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
c906108c 882
c906108c 883ac_prev=
81ecdfbb 884ac_dashdash=
c906108c
SS
885for ac_option
886do
c906108c
SS
887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
81ecdfbb 889 eval $ac_prev=\$ac_option
c906108c
SS
890 ac_prev=
891 continue
892 fi
893
81ecdfbb
RW
894 case $ac_option in
895 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *) ac_optarg=yes ;;
897 esac
c906108c
SS
898
899 # Accept the important Cygnus configure options, so we can diagnose typos.
900
81ecdfbb
RW
901 case $ac_dashdash$ac_option in
902 --)
903 ac_dashdash=yes ;;
c906108c
SS
904
905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
906 ac_prev=bindir ;;
907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 908 bindir=$ac_optarg ;;
c906108c
SS
909
910 -build | --build | --buil | --bui | --bu)
bec39cab 911 ac_prev=build_alias ;;
c906108c 912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 913 build_alias=$ac_optarg ;;
c906108c
SS
914
915 -cache-file | --cache-file | --cache-fil | --cache-fi \
916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
917 ac_prev=cache_file ;;
918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
920 cache_file=$ac_optarg ;;
921
922 --config-cache | -C)
923 cache_file=config.cache ;;
c906108c 924
81ecdfbb 925 -datadir | --datadir | --datadi | --datad)
c906108c 926 ac_prev=datadir ;;
81ecdfbb 927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 928 datadir=$ac_optarg ;;
c906108c 929
81ecdfbb
RW
930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
931 | --dataroo | --dataro | --datar)
932 ac_prev=datarootdir ;;
933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
935 datarootdir=$ac_optarg ;;
936
c906108c 937 -disable-* | --disable-*)
81ecdfbb 938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 939 # Reject names that are not valid shell variable names.
81ecdfbb
RW
940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
941 as_fn_error "invalid feature name: $ac_useropt"
942 ac_useropt_orig=$ac_useropt
943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
944 case $ac_user_opts in
945 *"
946"enable_$ac_useropt"
947"*) ;;
948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
949 ac_unrecognized_sep=', ';;
950 esac
951 eval enable_$ac_useropt=no ;;
952
953 -docdir | --docdir | --docdi | --doc | --do)
954 ac_prev=docdir ;;
955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
956 docdir=$ac_optarg ;;
957
958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
959 ac_prev=dvidir ;;
960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
961 dvidir=$ac_optarg ;;
c906108c
SS
962
963 -enable-* | --enable-*)
81ecdfbb 964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 965 # Reject names that are not valid shell variable names.
81ecdfbb
RW
966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
967 as_fn_error "invalid feature name: $ac_useropt"
968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
b4e70030 976 esac
81ecdfbb 977 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
978
979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
981 | --exec | --exe | --ex)
982 ac_prev=exec_prefix ;;
983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
985 | --exec=* | --exe=* | --ex=*)
bec39cab 986 exec_prefix=$ac_optarg ;;
c906108c
SS
987
988 -gas | --gas | --ga | --g)
989 # Obsolete; use --with-gas.
990 with_gas=yes ;;
991
bec39cab
AC
992 -help | --help | --hel | --he | -h)
993 ac_init_help=long ;;
994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
995 ac_init_help=recursive ;;
996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
997 ac_init_help=short ;;
c906108c
SS
998
999 -host | --host | --hos | --ho)
bec39cab 1000 ac_prev=host_alias ;;
c906108c 1001 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1002 host_alias=$ac_optarg ;;
c906108c 1003
81ecdfbb
RW
1004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1005 ac_prev=htmldir ;;
1006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1007 | --ht=*)
1008 htmldir=$ac_optarg ;;
1009
c906108c
SS
1010 -includedir | --includedir | --includedi | --included | --include \
1011 | --includ | --inclu | --incl | --inc)
1012 ac_prev=includedir ;;
1013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1014 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1015 includedir=$ac_optarg ;;
c906108c
SS
1016
1017 -infodir | --infodir | --infodi | --infod | --info | --inf)
1018 ac_prev=infodir ;;
1019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1020 infodir=$ac_optarg ;;
c906108c
SS
1021
1022 -libdir | --libdir | --libdi | --libd)
1023 ac_prev=libdir ;;
1024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1025 libdir=$ac_optarg ;;
c906108c
SS
1026
1027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1028 | --libexe | --libex | --libe)
1029 ac_prev=libexecdir ;;
1030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1031 | --libexe=* | --libex=* | --libe=*)
bec39cab 1032 libexecdir=$ac_optarg ;;
c906108c 1033
81ecdfbb
RW
1034 -localedir | --localedir | --localedi | --localed | --locale)
1035 ac_prev=localedir ;;
1036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1037 localedir=$ac_optarg ;;
1038
c906108c 1039 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1040 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1041 ac_prev=localstatedir ;;
1042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1044 localstatedir=$ac_optarg ;;
c906108c
SS
1045
1046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1047 ac_prev=mandir ;;
1048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1049 mandir=$ac_optarg ;;
c906108c
SS
1050
1051 -nfp | --nfp | --nf)
1052 # Obsolete; use --without-fp.
1053 with_fp=no ;;
1054
1055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1056 | --no-cr | --no-c | -n)
c906108c
SS
1057 no_create=yes ;;
1058
1059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1061 no_recursion=yes ;;
1062
1063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1065 | --oldin | --oldi | --old | --ol | --o)
1066 ac_prev=oldincludedir ;;
1067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1070 oldincludedir=$ac_optarg ;;
c906108c
SS
1071
1072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1073 ac_prev=prefix ;;
1074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1075 prefix=$ac_optarg ;;
c906108c
SS
1076
1077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1078 | --program-pre | --program-pr | --program-p)
1079 ac_prev=program_prefix ;;
1080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1082 program_prefix=$ac_optarg ;;
c906108c
SS
1083
1084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1085 | --program-suf | --program-su | --program-s)
1086 ac_prev=program_suffix ;;
1087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1089 program_suffix=$ac_optarg ;;
c906108c
SS
1090
1091 -program-transform-name | --program-transform-name \
1092 | --program-transform-nam | --program-transform-na \
1093 | --program-transform-n | --program-transform- \
1094 | --program-transform | --program-transfor \
1095 | --program-transfo | --program-transf \
1096 | --program-trans | --program-tran \
1097 | --progr-tra | --program-tr | --program-t)
1098 ac_prev=program_transform_name ;;
1099 -program-transform-name=* | --program-transform-name=* \
1100 | --program-transform-nam=* | --program-transform-na=* \
1101 | --program-transform-n=* | --program-transform-=* \
1102 | --program-transform=* | --program-transfor=* \
1103 | --program-transfo=* | --program-transf=* \
1104 | --program-trans=* | --program-tran=* \
1105 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1106 program_transform_name=$ac_optarg ;;
c906108c 1107
81ecdfbb
RW
1108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1109 ac_prev=pdfdir ;;
1110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1111 pdfdir=$ac_optarg ;;
1112
1113 -psdir | --psdir | --psdi | --psd | --ps)
1114 ac_prev=psdir ;;
1115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1116 psdir=$ac_optarg ;;
1117
c906108c
SS
1118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 silent=yes ;;
1121
1122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1123 ac_prev=sbindir ;;
1124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1125 | --sbi=* | --sb=*)
bec39cab 1126 sbindir=$ac_optarg ;;
c906108c
SS
1127
1128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1130 | --sharedst | --shareds | --shared | --share | --shar \
1131 | --sha | --sh)
1132 ac_prev=sharedstatedir ;;
1133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1136 | --sha=* | --sh=*)
bec39cab 1137 sharedstatedir=$ac_optarg ;;
c906108c
SS
1138
1139 -site | --site | --sit)
1140 ac_prev=site ;;
1141 -site=* | --site=* | --sit=*)
bec39cab 1142 site=$ac_optarg ;;
3ace7edb 1143
c906108c
SS
1144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1145 ac_prev=srcdir ;;
1146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1147 srcdir=$ac_optarg ;;
c906108c
SS
1148
1149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1150 | --syscon | --sysco | --sysc | --sys | --sy)
1151 ac_prev=sysconfdir ;;
1152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1154 sysconfdir=$ac_optarg ;;
c906108c
SS
1155
1156 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1157 ac_prev=target_alias ;;
c906108c 1158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1159 target_alias=$ac_optarg ;;
c906108c
SS
1160
1161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1162 verbose=yes ;;
1163
bec39cab
AC
1164 -version | --version | --versio | --versi | --vers | -V)
1165 ac_init_version=: ;;
c906108c
SS
1166
1167 -with-* | --with-*)
81ecdfbb 1168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1169 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1171 as_fn_error "invalid package name: $ac_useropt"
1172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
b4e70030 1180 esac
81ecdfbb 1181 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1182
1183 -without-* | --without-*)
81ecdfbb 1184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1185 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1187 as_fn_error "invalid package name: $ac_useropt"
1188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=no ;;
c906108c
SS
1198
1199 --x)
1200 # Obsolete; use --with-x.
1201 with_x=yes ;;
1202
1203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1204 | --x-incl | --x-inc | --x-in | --x-i)
1205 ac_prev=x_includes ;;
1206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1208 x_includes=$ac_optarg ;;
c906108c
SS
1209
1210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1212 ac_prev=x_libraries ;;
1213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1215 x_libraries=$ac_optarg ;;
c906108c 1216
81ecdfbb
RW
1217 -*) as_fn_error "unrecognized option: \`$ac_option'
1218Try \`$0 --help' for more information."
c906108c
SS
1219 ;;
1220
bec39cab
AC
1221 *=*)
1222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1223 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1224 case $ac_envvar in #(
1225 '' | [0-9]* | *[!_$as_cr_alnum]* )
1226 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1227 esac
1228 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1229 export $ac_envvar ;;
1230
c906108c 1231 *)
bec39cab 1232 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1236 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1237 ;;
1238
1239 esac
1240done
1241
1242if test -n "$ac_prev"; then
bec39cab 1243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1244 as_fn_error "missing argument to $ac_option"
c906108c 1245fi
c906108c 1246
81ecdfbb
RW
1247if test -n "$ac_unrecognized_opts"; then
1248 case $enable_option_checking in
1249 no) ;;
1250 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1252 esac
81ecdfbb 1253fi
b4e70030 1254
81ecdfbb
RW
1255# Check all directory arguments for consistency.
1256for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1257 datadir sysconfdir sharedstatedir localstatedir includedir \
1258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1259 libdir localedir mandir
b4e70030 1260do
81ecdfbb
RW
1261 eval ac_val=\$$ac_var
1262 # Remove trailing slashes.
1263 case $ac_val in
1264 */ )
1265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1266 eval $ac_var=\$ac_val;;
1267 esac
1268 # Be sure to have absolute directory names.
b4e70030 1269 case $ac_val in
81ecdfbb
RW
1270 [\\/$]* | ?:[\\/]* ) continue;;
1271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1272 esac
81ecdfbb 1273 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1274done
1275
bec39cab
AC
1276# There might be people who depend on the old broken behavior: `$host'
1277# used to hold the argument of --host etc.
1278# FIXME: To remove some day.
1279build=$build_alias
1280host=$host_alias
1281target=$target_alias
1282
1283# FIXME: To remove some day.
1284if test "x$host_alias" != x; then
1285 if test "x$build_alias" = x; then
1286 cross_compiling=maybe
81ecdfbb 1287 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1288 If a cross compiler is detected then cross compile mode will be used." >&2
1289 elif test "x$build_alias" != "x$host_alias"; then
1290 cross_compiling=yes
1291 fi
1292fi
c906108c 1293
bec39cab
AC
1294ac_tool_prefix=
1295test -n "$host_alias" && ac_tool_prefix=$host_alias-
1296
1297test "$silent" = yes && exec 6>/dev/null
c906108c 1298
c906108c 1299
81ecdfbb
RW
1300ac_pwd=`pwd` && test -n "$ac_pwd" &&
1301ac_ls_di=`ls -di .` &&
1302ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1303 as_fn_error "working directory cannot be determined"
1304test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1305 as_fn_error "pwd does not report name of working directory"
1306
1307
c906108c
SS
1308# Find the source files, if location was not specified.
1309if test -z "$srcdir"; then
1310 ac_srcdir_defaulted=yes
81ecdfbb
RW
1311 # Try the directory containing this script, then the parent directory.
1312 ac_confdir=`$as_dirname -- "$as_myself" ||
1313$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1314 X"$as_myself" : 'X\(//\)[^/]' \| \
1315 X"$as_myself" : 'X\(//\)$' \| \
1316 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1317$as_echo X"$as_myself" |
1318 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1319 s//\1/
1320 q
1321 }
1322 /^X\(\/\/\)[^/].*/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\).*/{
1331 s//\1/
1332 q
1333 }
1334 s/.*/./; q'`
c906108c 1335 srcdir=$ac_confdir
81ecdfbb 1336 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1337 srcdir=..
1338 fi
1339else
1340 ac_srcdir_defaulted=no
1341fi
81ecdfbb
RW
1342if test ! -r "$srcdir/$ac_unique_file"; then
1343 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1344 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1345fi
1346ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1347ac_abs_confdir=`(
1348 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1349 pwd)`
1350# When building in place, set srcdir=.
1351if test "$ac_abs_confdir" = "$ac_pwd"; then
1352 srcdir=.
1353fi
1354# Remove unnecessary trailing slashes from srcdir.
1355# Double slashes in file names in object file debugging info
1356# mess up M-x gdb in Emacs.
1357case $srcdir in
1358*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1359esac
1360for ac_var in $ac_precious_vars; do
1361 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_env_${ac_var}_value=\$${ac_var}
1363 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1365done
c906108c 1366
bec39cab
AC
1367#
1368# Report the --help message.
1369#
1370if test "$ac_init_help" = "long"; then
1371 # Omit some internal or obsolete options to make the list less imposing.
1372 # This message is too long to be a string in the A/UX 3.1 sh.
1373 cat <<_ACEOF
1374\`configure' configures this package to adapt to many kinds of systems.
1375
1376Usage: $0 [OPTION]... [VAR=VALUE]...
1377
1378To assign environment variables (e.g., CC, CFLAGS...), specify them as
1379VAR=VALUE. See below for descriptions of some of the useful variables.
1380
1381Defaults for the options are specified in brackets.
1382
1383Configuration:
1384 -h, --help display this help and exit
1385 --help=short display options specific to this package
1386 --help=recursive display the short help of all the included packages
1387 -V, --version display version information and exit
1388 -q, --quiet, --silent do not print \`checking...' messages
1389 --cache-file=FILE cache test results in FILE [disabled]
1390 -C, --config-cache alias for \`--cache-file=config.cache'
1391 -n, --no-create do not create output files
1392 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1393
bec39cab
AC
1394Installation directories:
1395 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1396 [$ac_default_prefix]
bec39cab 1397 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1398 [PREFIX]
bec39cab
AC
1399
1400By default, \`make install' will install all the files in
1401\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1402an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1403for instance \`--prefix=\$HOME'.
1404
1405For better control, use the options below.
1406
1407Fine tuning of the installation directories:
81ecdfbb
RW
1408 --bindir=DIR user executables [EPREFIX/bin]
1409 --sbindir=DIR system admin executables [EPREFIX/sbin]
1410 --libexecdir=DIR program executables [EPREFIX/libexec]
1411 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1412 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1413 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1414 --libdir=DIR object code libraries [EPREFIX/lib]
1415 --includedir=DIR C header files [PREFIX/include]
1416 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1417 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1418 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1419 --infodir=DIR info documentation [DATAROOTDIR/info]
1420 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1421 --mandir=DIR man documentation [DATAROOTDIR/man]
1422 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1423 --htmldir=DIR html documentation [DOCDIR]
1424 --dvidir=DIR dvi documentation [DOCDIR]
1425 --pdfdir=DIR pdf documentation [DOCDIR]
1426 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1427_ACEOF
1428
1429 cat <<\_ACEOF
1430
9009e1ae
MR
1431Program names:
1432 --program-prefix=PREFIX prepend PREFIX to installed program names
1433 --program-suffix=SUFFIX append SUFFIX to installed program names
1434 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1435
bec39cab
AC
1436X features:
1437 --x-includes=DIR X include files are in DIR
1438 --x-libraries=DIR X library files are in DIR
1439
1440System types:
1441 --build=BUILD configure for building on BUILD [guessed]
1442 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1443 --target=TARGET configure for building compilers for TARGET [HOST]
1444_ACEOF
1445fi
1446
1447if test -n "$ac_init_help"; then
1448
1449 cat <<\_ACEOF
1450
1451Optional Features:
81ecdfbb 1452 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1453 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1454 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1455 --enable-maintainer-mode enable make rules and dependencies not useful
1456 (and sometimes confusing) to the casual installer
da2f07f1
JK
1457 --enable-plugins Enable support for plugins (defaults no)
1458 --disable-largefile omit support for large files
a1220294
TT
1459 --enable-targets=TARGETS
1460 alternative target configurations
c0993dbe 1461 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1462 --disable-gdbcli disable command-line interface (CLI)
1463 --disable-gdbmi disable machine-interface (MI)
1464 --enable-tui enable full-screen terminal user interface (TUI)
1465 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1466 --enable-profiling enable profiling of GDB
3841debe 1467 --disable-rpath do not hardcode runtime library paths
a1220294 1468 --enable-werror treat compile warnings as errors
32c1c914 1469 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1470 --enable-gdb-build-warnings
32c1c914 1471 enable GDB specific build-time compiler warnings if
a1220294 1472 gcc is used
32c1c914 1473 --enable-sim link gdb with simulator
bec39cab 1474 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1475 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1476 is auto)
bec39cab
AC
1477
1478Optional Packages:
1479 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1480 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1481 --with-separate-debug-dir=PATH
32c1c914 1482 look for global separate debug info in this path
62e4f60c 1483 [LIBDIR/debug]
b14b1491
TT
1484 --with-gdb-datadir=PATH look for global separate data files in this path
1485 [DATADIR/gdb]
29b0e8a2 1486 --with-relocated-sources=PATH
32c1c914 1487 automatically relocate this path for source files
bccbefd2
JK
1488 --with-auto-load-safe-path=PATH
1489 directories safe to hold auto-loaded files
1490 --without-auto-load-safe-path
1491 do not restrict auto-loaded files locations
05e7c244 1492 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1493 --with-curses use the curses library instead of the termcap
1494 library
c16158bc
JM
1495 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1496 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1497 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1498 --with-libiconv-prefix=DIR
1499 search for libiconv in DIR/include and DIR/lib
478aac75 1500 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1501 --with-system-readline use installed readline library
b8e0a31c
SD
1502 --with-jit-reader-dir=PATH
1503 directory to load the JIT readers from
5c39566f 1504 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1505 --with-gnu-ld assume the C compiler uses GNU ld default=no
1506 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1507 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1508 --with-python[=PYTHON] include python support
1509 (auto/yes/no/<python-program>)
a1220294
TT
1510 --without-included-regex
1511 don't use included regex; this is the default on
1512 systems with version 2 of the GNU C library (use
1513 with caution on other system)
81ecdfbb 1514 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1515 --with-system-gdbinit=PATH
32c1c914 1516 automatically load a system-wide gdbinit file
5062cc19
KS
1517 --with-tcl directory containing tcl configuration (tclConfig.sh)
1518 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1519 --with-x use the X Window System
bec39cab
AC
1520
1521Some influential environment variables:
1522 CC C compiler command
1523 CFLAGS C compiler flags
1524 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1525 nonstandard directory <lib dir>
81ecdfbb
RW
1526 LIBS libraries to pass to the linker, e.g. -l<library>
1527 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1528 you have headers in a nonstandard directory <include dir>
bec39cab 1529 CPP C preprocessor
f06e05e0
JK
1530 MAKEINFO Parent configure detects if it is of sufficient version.
1531 MAKEINFOFLAGS
1532 Parameters for MAKEINFO.
81ecdfbb
RW
1533 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1534 the first program found out of: `bison -y', `byacc', `yacc'.
1535 YFLAGS The list of arguments that will be passed by default to $YACC.
1536 This script will default YFLAGS to the empty string to avoid a
1537 default value of `-d' given by some make applications.
1538 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1539
1540Use these variables to override the choices made by `configure' or to help
1541it to find libraries and programs with nonstandard names/locations.
1542
81ecdfbb 1543Report bugs to the package provider.
bec39cab 1544_ACEOF
81ecdfbb 1545ac_status=$?
bec39cab
AC
1546fi
1547
1548if test "$ac_init_help" = "recursive"; then
1549 # If there are subdirs, report their specific --help.
bec39cab 1550 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1551 test -d "$ac_dir" ||
1552 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1553 continue
bec39cab
AC
1554 ac_builddir=.
1555
81ecdfbb
RW
1556case "$ac_dir" in
1557.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558*)
1559 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1560 # A ".." for each directory in $ac_dir_suffix.
1561 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1562 case $ac_top_builddir_sub in
1563 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1565 esac ;;
1566esac
1567ac_abs_top_builddir=$ac_pwd
1568ac_abs_builddir=$ac_pwd$ac_dir_suffix
1569# for backward compatibility:
1570ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1571
1572case $srcdir in
81ecdfbb 1573 .) # We are building in place.
bec39cab 1574 ac_srcdir=.
81ecdfbb
RW
1575 ac_top_srcdir=$ac_top_builddir_sub
1576 ac_abs_top_srcdir=$ac_pwd ;;
1577 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1578 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1579 ac_top_srcdir=$srcdir
1580 ac_abs_top_srcdir=$srcdir ;;
1581 *) # Relative name.
1582 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1583 ac_top_srcdir=$ac_top_build_prefix$srcdir
1584 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1585esac
81ecdfbb 1586ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1587
81ecdfbb
RW
1588 cd "$ac_dir" || { ac_status=$?; continue; }
1589 # Check for guested configure.
1590 if test -f "$ac_srcdir/configure.gnu"; then
1591 echo &&
1592 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1593 elif test -f "$ac_srcdir/configure"; then
1594 echo &&
1595 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1596 else
81ecdfbb
RW
1597 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1598 fi || ac_status=$?
1599 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1600 done
1601fi
1602
81ecdfbb 1603test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1604if $ac_init_version; then
1605 cat <<\_ACEOF
81ecdfbb
RW
1606configure
1607generated by GNU Autoconf 2.64
bec39cab 1608
81ecdfbb 1609Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1610This configure script is free software; the Free Software Foundation
1611gives unlimited permission to copy, distribute and modify it.
1612_ACEOF
81ecdfbb 1613 exit
bec39cab 1614fi
bec39cab 1615
81ecdfbb
RW
1616## ------------------------ ##
1617## Autoconf initialization. ##
1618## ------------------------ ##
bec39cab 1619
81ecdfbb
RW
1620# ac_fn_c_try_compile LINENO
1621# --------------------------
1622# Try to compile conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_compile ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 rm -f conftest.$ac_objext
1627 if { { ac_try="$ac_compile"
1628case "(($ac_try" in
1629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630 *) ac_try_echo=$ac_try;;
1631esac
1632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633$as_echo "$ac_try_echo"; } >&5
1634 (eval "$ac_compile") 2>conftest.err
1635 ac_status=$?
1636 if test -s conftest.err; then
1637 grep -v '^ *+' conftest.err >conftest.er1
1638 cat conftest.er1 >&5
1639 mv -f conftest.er1 conftest.err
1640 fi
1641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642 test $ac_status = 0; } && {
1643 test -z "$ac_c_werror_flag" ||
1644 test ! -s conftest.err
1645 } && test -s conftest.$ac_objext; then :
1646 ac_retval=0
1647else
1648 $as_echo "$as_me: failed program was:" >&5
1649sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1650
81ecdfbb
RW
1651 ac_retval=1
1652fi
1653 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1654 return $ac_retval
1655
1656} # ac_fn_c_try_compile
1657
1658# ac_fn_c_try_cpp LINENO
1659# ----------------------
1660# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1661ac_fn_c_try_cpp ()
bec39cab 1662{
81ecdfbb
RW
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664 if { { ac_try="$ac_cpp conftest.$ac_ext"
1665case "(($ac_try" in
1666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667 *) ac_try_echo=$ac_try;;
1668esac
1669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670$as_echo "$ac_try_echo"; } >&5
1671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1672 ac_status=$?
1673 if test -s conftest.err; then
1674 grep -v '^ *+' conftest.err >conftest.er1
1675 cat conftest.er1 >&5
1676 mv -f conftest.er1 conftest.err
1677 fi
1678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679 test $ac_status = 0; } >/dev/null && {
1680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1681 test ! -s conftest.err
1682 }; then :
1683 ac_retval=0
1684else
1685 $as_echo "$as_me: failed program was:" >&5
1686sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1687
81ecdfbb
RW
1688 ac_retval=1
1689fi
1690 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1691 return $ac_retval
bec39cab 1692
81ecdfbb 1693} # ac_fn_c_try_cpp
bec39cab 1694
81ecdfbb
RW
1695# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1696# -------------------------------------------------------
1697# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1698# the include files in INCLUDES and setting the cache variable VAR
1699# accordingly.
1700ac_fn_c_check_header_mongrel ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1705$as_echo_n "checking for $2... " >&6; }
1706if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1707 $as_echo_n "(cached) " >&6
1708fi
1709eval ac_res=\$$3
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1711$as_echo "$ac_res" >&6; }
1712else
1713 # Is the header compilable?
1714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1715$as_echo_n "checking $2 usability... " >&6; }
1716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717/* end confdefs.h. */
1718$4
1719#include <$2>
1720_ACEOF
1721if ac_fn_c_try_compile "$LINENO"; then :
1722 ac_header_compiler=yes
1723else
1724 ac_header_compiler=no
1725fi
1726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1728$as_echo "$ac_header_compiler" >&6; }
bec39cab 1729
81ecdfbb
RW
1730# Is the header present?
1731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1732$as_echo_n "checking $2 presence... " >&6; }
1733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1734/* end confdefs.h. */
1735#include <$2>
1736_ACEOF
1737if ac_fn_c_try_cpp "$LINENO"; then :
1738 ac_header_preproc=yes
1739else
1740 ac_header_preproc=no
1741fi
1742rm -f conftest.err conftest.$ac_ext
1743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1744$as_echo "$ac_header_preproc" >&6; }
bec39cab 1745
81ecdfbb
RW
1746# So? What about this header?
1747case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1748 yes:no: )
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1750$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1752$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1753 ;;
1754 no:yes:* )
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1756$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1758$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1760$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1762$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1764$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1765 ;;
1766esac
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
1769if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1770 $as_echo_n "(cached) " >&6
1771else
1772 eval "$3=\$ac_header_compiler"
1773fi
1774eval ac_res=\$$3
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1776$as_echo "$ac_res" >&6; }
1777fi
1778 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1779
81ecdfbb 1780} # ac_fn_c_check_header_mongrel
bec39cab 1781
81ecdfbb
RW
1782# ac_fn_c_try_run LINENO
1783# ----------------------
1784# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1785# that executables *can* be run.
1786ac_fn_c_try_run ()
1787{
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 if { { ac_try="$ac_link"
1790case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793esac
1794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795$as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_link") 2>&5
1797 ac_status=$?
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1800 { { case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803esac
1804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805$as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_try") 2>&5
1807 ac_status=$?
1808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1809 test $ac_status = 0; }; }; then :
1810 ac_retval=0
1811else
1812 $as_echo "$as_me: program exited with status $ac_status" >&5
1813 $as_echo "$as_me: failed program was:" >&5
1814sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1815
81ecdfbb
RW
1816 ac_retval=$ac_status
1817fi
1818 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1819 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1820 return $ac_retval
bec39cab 1821
81ecdfbb 1822} # ac_fn_c_try_run
bec39cab 1823
81ecdfbb
RW
1824# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1825# -------------------------------------------------------
1826# Tests whether HEADER exists and can be compiled using the include files in
1827# INCLUDES, setting the cache variable VAR accordingly.
1828ac_fn_c_check_header_compile ()
1829{
1830 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1832$as_echo_n "checking for $2... " >&6; }
1833if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1834 $as_echo_n "(cached) " >&6
1835else
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838$4
1839#include <$2>
bec39cab 1840_ACEOF
81ecdfbb
RW
1841if ac_fn_c_try_compile "$LINENO"; then :
1842 eval "$3=yes"
1843else
1844 eval "$3=no"
1845fi
1846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1847fi
1848eval ac_res=\$$3
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1850$as_echo "$ac_res" >&6; }
1851 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1852
81ecdfbb 1853} # ac_fn_c_check_header_compile
bec39cab 1854
81ecdfbb
RW
1855# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1856# --------------------------------------------
1857# Tries to find the compile-time value of EXPR in a program that includes
1858# INCLUDES, setting VAR accordingly. Returns whether the value could be
1859# computed
1860ac_fn_c_compute_int ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 if test "$cross_compiling" = yes; then
1864 # Depending upon the size, compute the lo and hi bounds.
1865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866/* end confdefs.h. */
1867$4
1868int
1869main ()
1870{
1871static int test_array [1 - 2 * !(($2) >= 0)];
1872test_array [0] = 0
bec39cab 1873
81ecdfbb
RW
1874 ;
1875 return 0;
1876}
1877_ACEOF
1878if ac_fn_c_try_compile "$LINENO"; then :
1879 ac_lo=0 ac_mid=0
1880 while :; do
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$4
1884int
1885main ()
1886{
1887static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1888test_array [0] = 0
bec39cab 1889
81ecdfbb
RW
1890 ;
1891 return 0;
1892}
1893_ACEOF
1894if ac_fn_c_try_compile "$LINENO"; then :
1895 ac_hi=$ac_mid; break
1896else
1897 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1898 if test $ac_lo -le $ac_mid; then
1899 ac_lo= ac_hi=
1900 break
1901 fi
1902 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1903fi
81ecdfbb
RW
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1905 done
c906108c 1906else
81ecdfbb
RW
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913static int test_array [1 - 2 * !(($2) < 0)];
1914test_array [0] = 0
bec39cab 1915
81ecdfbb
RW
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 ac_hi=-1 ac_mid=-1
1922 while :; do
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926int
1927main ()
1928{
1929static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1930test_array [0] = 0
bec39cab 1931
81ecdfbb
RW
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937 ac_lo=$ac_mid; break
1938else
1939 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1940 if test $ac_mid -le $ac_hi; then
1941 ac_lo= ac_hi=
1942 break
1943 fi
1944 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1945fi
1946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1947 done
1948else
1949 ac_lo= ac_hi=
1950fi
1951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954# Binary search between lo and hi bounds.
1955while test "x$ac_lo" != "x$ac_hi"; do
1956 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1964test_array [0] = 0
bec39cab 1965
81ecdfbb
RW
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971 ac_hi=$ac_mid
1972else
1973 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976done
1977case $ac_lo in #((
1978?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1979'') ac_retval=1 ;;
1980esac
1981 else
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$4
1985static long int longval () { return $2; }
1986static unsigned long int ulongval () { return $2; }
1987#include <stdio.h>
1988#include <stdlib.h>
1989int
1990main ()
1991{
bec39cab 1992
81ecdfbb
RW
1993 FILE *f = fopen ("conftest.val", "w");
1994 if (! f)
1995 return 1;
1996 if (($2) < 0)
1997 {
1998 long int i = longval ();
1999 if (i != ($2))
2000 return 1;
2001 fprintf (f, "%ld", i);
2002 }
2003 else
2004 {
2005 unsigned long int i = ulongval ();
2006 if (i != ($2))
2007 return 1;
2008 fprintf (f, "%lu", i);
2009 }
2010 /* Do not output a trailing newline, as this causes \r\n confusion
2011 on some platforms. */
2012 return ferror (f) || fclose (f) != 0;
bec39cab 2013
81ecdfbb
RW
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_run "$LINENO"; then :
2019 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2020else
2021 ac_retval=1
2022fi
2023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2024 conftest.$ac_objext conftest.beam conftest.$ac_ext
2025rm -f conftest.val
bec39cab 2026
81ecdfbb
RW
2027 fi
2028 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2029 return $ac_retval
bec39cab 2030
81ecdfbb 2031} # ac_fn_c_compute_int
bec39cab 2032
c971b7fa
PA
2033# ac_fn_c_try_link LINENO
2034# -----------------------
2035# Try to link conftest.$ac_ext, and return whether this succeeded.
2036ac_fn_c_try_link ()
2037{
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 rm -f conftest.$ac_objext conftest$ac_exeext
2040 if { { ac_try="$ac_link"
2041case "(($ac_try" in
2042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2043 *) ac_try_echo=$ac_try;;
2044esac
2045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2046$as_echo "$ac_try_echo"; } >&5
2047 (eval "$ac_link") 2>conftest.err
2048 ac_status=$?
2049 if test -s conftest.err; then
2050 grep -v '^ *+' conftest.err >conftest.er1
2051 cat conftest.er1 >&5
2052 mv -f conftest.er1 conftest.err
2053 fi
2054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2055 test $ac_status = 0; } && {
2056 test -z "$ac_c_werror_flag" ||
2057 test ! -s conftest.err
2058 } && test -s conftest$ac_exeext && {
2059 test "$cross_compiling" = yes ||
2060 $as_test_x conftest$ac_exeext
2061 }; then :
2062 ac_retval=0
2063else
2064 $as_echo "$as_me: failed program was:" >&5
2065sed 's/^/| /' conftest.$ac_ext >&5
2066
2067 ac_retval=1
2068fi
2069 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2070 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2071 # interfere with the next link command; also delete a directory that is
2072 # left behind by Apple's compiler. We do this before executing the actions.
2073 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2074 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2075 return $ac_retval
2076
2077} # ac_fn_c_try_link
2078
55a8c076
YQ
2079# ac_fn_c_check_func LINENO FUNC VAR
2080# ----------------------------------
2081# Tests whether FUNC exists, setting the cache variable VAR accordingly
2082ac_fn_c_check_func ()
81ecdfbb
RW
2083{
2084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2086$as_echo_n "checking for $2... " >&6; }
2087if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2088 $as_echo_n "(cached) " >&6
2089else
81ecdfbb
RW
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
55a8c076
YQ
2092/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2093 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2094#define $2 innocuous_$2
2095
2096/* System header to define __stub macros and hopefully few prototypes,
2097 which can conflict with char $2 (); below.
2098 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2099 <limits.h> exists even on freestanding compilers. */
2100
2101#ifdef __STDC__
2102# include <limits.h>
2103#else
2104# include <assert.h>
2105#endif
2106
2107#undef $2
2108
2109/* Override any GCC internal prototype to avoid an error.
2110 Use char because int might match the return type of a GCC
2111 builtin and then its argument prototype would still apply. */
2112#ifdef __cplusplus
2113extern "C"
2114#endif
2115char $2 ();
2116/* The GNU C library defines this for functions which it implements
2117 to always fail with ENOSYS. Some functions are actually named
2118 something starting with __ and the normal name is an alias. */
2119#if defined __stub_$2 || defined __stub___$2
2120choke me
2121#endif
2122
2123int
2124main ()
2125{
2126return $2 ();
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_link "$LINENO"; then :
2132 eval "$3=yes"
2133else
2134 eval "$3=no"
2135fi
2136rm -f core conftest.err conftest.$ac_objext \
2137 conftest$ac_exeext conftest.$ac_ext
2138fi
2139eval ac_res=\$$3
2140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2141$as_echo "$ac_res" >&6; }
2142 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2143
2144} # ac_fn_c_check_func
2145
770d76d7
PA
2146# ac_fn_c_check_decl LINENO SYMBOL VAR
2147# ------------------------------------
2148# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2149ac_fn_c_check_decl ()
2150{
2151 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152 as_decl_name=`echo $2|sed 's/ *(.*//'`
2153 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2155$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2156if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2157 $as_echo_n "(cached) " >&6
2158else
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
2163main ()
2164{
2165#ifndef $as_decl_name
2166#ifdef __cplusplus
2167 (void) $as_decl_use;
2168#else
2169 (void) $as_decl_name;
2170#endif
2171#endif
2172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$3=yes"
2179else
2180 eval "$3=no"
2181fi
2182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183fi
2184eval ac_res=\$$3
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2186$as_echo "$ac_res" >&6; }
2187 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188
2189} # ac_fn_c_check_decl
2190
55a8c076
YQ
2191# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2192# ----------------------------------------------------
2193# Tries to find if the field MEMBER exists in type AGGR, after including
2194# INCLUDES, setting cache variable VAR accordingly.
2195ac_fn_c_check_member ()
2196{
2197 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2199$as_echo_n "checking for $2.$3... " >&6; }
2200if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2201 $as_echo_n "(cached) " >&6
2202else
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
2205$5
2206int
2207main ()
2208{
2209static $2 ac_aggr;
2210if (ac_aggr.$3)
2211return 0;
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217 eval "$4=yes"
2218else
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220/* end confdefs.h. */
2221$5
2222int
2223main ()
2224{
2225static $2 ac_aggr;
2226if (sizeof ac_aggr.$3)
2227return 0;
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_compile "$LINENO"; then :
2233 eval "$4=yes"
2234else
2235 eval "$4=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238fi
2239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2240fi
2241eval ac_res=\$$4
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
2244 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2245
2246} # ac_fn_c_check_member
2247
2248# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2249# -------------------------------------------
2250# Tests whether TYPE exists after having included INCLUDES, setting cache
2251# variable VAR accordingly.
2252ac_fn_c_check_type ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
2257if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 eval "$3=no"
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$4
2264int
2265main ()
2266{
2267if (sizeof ($2))
2268 return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$4
2277int
2278main ()
2279{
2280if (sizeof (($2)))
2281 return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2287
81ecdfbb
RW
2288else
2289 eval "$3=yes"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2299
81ecdfbb
RW
2300} # ac_fn_c_check_type
2301cat >config.log <<_ACEOF
2302This file contains any messages produced by compilers while
2303running configure, to aid debugging if configure makes a mistake.
d5af19ba 2304
81ecdfbb
RW
2305It was created by $as_me, which was
2306generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2307
81ecdfbb 2308 $ $0 $@
413ccac7 2309
81ecdfbb
RW
2310_ACEOF
2311exec 5>>config.log
2312{
2313cat <<_ASUNAME
2314## --------- ##
2315## Platform. ##
2316## --------- ##
413ccac7 2317
81ecdfbb
RW
2318hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2319uname -m = `(uname -m) 2>/dev/null || echo unknown`
2320uname -r = `(uname -r) 2>/dev/null || echo unknown`
2321uname -s = `(uname -s) 2>/dev/null || echo unknown`
2322uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2323
81ecdfbb
RW
2324/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2325/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2326
81ecdfbb
RW
2327/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2328/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2329/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2330/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2331/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2332/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2333/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2334
81ecdfbb 2335_ASUNAME
bec39cab 2336
bec39cab
AC
2337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2338for as_dir in $PATH
2339do
2340 IFS=$as_save_IFS
2341 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2342 $as_echo "PATH: $as_dir"
2343 done
2344IFS=$as_save_IFS
bec39cab 2345
81ecdfbb 2346} >&5
bec39cab 2347
81ecdfbb 2348cat >&5 <<_ACEOF
bec39cab 2349
bec39cab 2350
81ecdfbb
RW
2351## ----------- ##
2352## Core tests. ##
2353## ----------- ##
2354
2355_ACEOF
2356
2357
2358# Keep a trace of the command line.
2359# Strip out --no-create and --no-recursion so they do not pile up.
2360# Strip out --silent because we don't want to record it for future runs.
2361# Also quote any args containing shell meta-characters.
2362# Make two passes to allow for proper duplicate-argument suppression.
2363ac_configure_args=
2364ac_configure_args0=
2365ac_configure_args1=
2366ac_must_keep_next=false
2367for ac_pass in 1 2
2368do
2369 for ac_arg
2370 do
2371 case $ac_arg in
2372 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2373 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2374 | -silent | --silent | --silen | --sile | --sil)
2375 continue ;;
2376 *\'*)
2377 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2378 esac
2379 case $ac_pass in
2380 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2381 2)
2382 as_fn_append ac_configure_args1 " '$ac_arg'"
2383 if test $ac_must_keep_next = true; then
2384 ac_must_keep_next=false # Got value, back to normal.
2385 else
2386 case $ac_arg in
2387 *=* | --config-cache | -C | -disable-* | --disable-* \
2388 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2389 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2390 | -with-* | --with-* | -without-* | --without-* | --x)
2391 case "$ac_configure_args0 " in
2392 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2393 esac
2394 ;;
2395 -* ) ac_must_keep_next=true ;;
2396 esac
2397 fi
2398 as_fn_append ac_configure_args " '$ac_arg'"
2399 ;;
2400 esac
2401 done
2402done
2403{ ac_configure_args0=; unset ac_configure_args0;}
2404{ ac_configure_args1=; unset ac_configure_args1;}
2405
2406# When interrupted or exit'd, cleanup temporary files, and complete
2407# config.log. We remove comments because anyway the quotes in there
2408# would cause problems or look ugly.
2409# WARNING: Use '\'' to represent an apostrophe within the trap.
2410# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2411trap 'exit_status=$?
2412 # Save into config.log some information that might help in debugging.
2413 {
2414 echo
2415
2416 cat <<\_ASBOX
2417## ---------------- ##
2418## Cache variables. ##
2419## ---------------- ##
2420_ASBOX
2421 echo
2422 # The following way of writing the cache mishandles newlines in values,
2423(
2424 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2425 eval ac_val=\$$ac_var
2426 case $ac_val in #(
2427 *${as_nl}*)
2428 case $ac_var in #(
2429 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2430$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2431 esac
2432 case $ac_var in #(
2433 _ | IFS | as_nl) ;; #(
2434 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2435 *) { eval $ac_var=; unset $ac_var;} ;;
2436 esac ;;
2437 esac
2438 done
2439 (set) 2>&1 |
2440 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2441 *${as_nl}ac_space=\ *)
2442 sed -n \
2443 "s/'\''/'\''\\\\'\'''\''/g;
2444 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2445 ;; #(
2446 *)
2447 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2448 ;;
2449 esac |
2450 sort
2451)
2452 echo
2453
2454 cat <<\_ASBOX
2455## ----------------- ##
2456## Output variables. ##
2457## ----------------- ##
2458_ASBOX
2459 echo
2460 for ac_var in $ac_subst_vars
2461 do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in
2464 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2465 esac
2466 $as_echo "$ac_var='\''$ac_val'\''"
2467 done | sort
2468 echo
2469
2470 if test -n "$ac_subst_files"; then
2471 cat <<\_ASBOX
2472## ------------------- ##
2473## File substitutions. ##
2474## ------------------- ##
2475_ASBOX
2476 echo
2477 for ac_var in $ac_subst_files
2478 do
2479 eval ac_val=\$$ac_var
2480 case $ac_val in
2481 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2482 esac
2483 $as_echo "$ac_var='\''$ac_val'\''"
2484 done | sort
2485 echo
2486 fi
2487
2488 if test -s confdefs.h; then
2489 cat <<\_ASBOX
2490## ----------- ##
2491## confdefs.h. ##
2492## ----------- ##
2493_ASBOX
2494 echo
2495 cat confdefs.h
2496 echo
2497 fi
2498 test "$ac_signal" != 0 &&
2499 $as_echo "$as_me: caught signal $ac_signal"
2500 $as_echo "$as_me: exit $exit_status"
2501 } >&5
2502 rm -f core *.core core.conftest.* &&
2503 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2504 exit $exit_status
2505' 0
2506for ac_signal in 1 2 13 15; do
2507 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2508done
2509ac_signal=0
2510
2511# confdefs.h avoids OS command line length limits that DEFS can exceed.
2512rm -f -r conftest* confdefs.h
2513
2514$as_echo "/* confdefs.h */" > confdefs.h
2515
2516# Predefined preprocessor variables.
2517
2518cat >>confdefs.h <<_ACEOF
2519#define PACKAGE_NAME "$PACKAGE_NAME"
2520_ACEOF
2521
2522cat >>confdefs.h <<_ACEOF
2523#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2524_ACEOF
2525
2526cat >>confdefs.h <<_ACEOF
2527#define PACKAGE_VERSION "$PACKAGE_VERSION"
2528_ACEOF
2529
2530cat >>confdefs.h <<_ACEOF
2531#define PACKAGE_STRING "$PACKAGE_STRING"
2532_ACEOF
2533
2534cat >>confdefs.h <<_ACEOF
2535#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2536_ACEOF
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_URL "$PACKAGE_URL"
2540_ACEOF
2541
2542
2543# Let the site file select an alternate cache file if it wants to.
2544# Prefer an explicitly selected file to automatically selected ones.
2545ac_site_file1=NONE
2546ac_site_file2=NONE
2547if test -n "$CONFIG_SITE"; then
2548 ac_site_file1=$CONFIG_SITE
2549elif test "x$prefix" != xNONE; then
2550 ac_site_file1=$prefix/share/config.site
2551 ac_site_file2=$prefix/etc/config.site
2552else
2553 ac_site_file1=$ac_default_prefix/share/config.site
2554 ac_site_file2=$ac_default_prefix/etc/config.site
2555fi
2556for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2557do
2558 test "x$ac_site_file" = xNONE && continue
2559 if test -r "$ac_site_file"; then
2560 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2561$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2562 sed 's/^/| /' "$ac_site_file" >&5
2563 . "$ac_site_file"
2564 fi
2565done
2566
2567if test -r "$cache_file"; then
2568 # Some versions of bash will fail to source /dev/null (special
2569 # files actually), so we avoid doing that.
2570 if test -f "$cache_file"; then
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2572$as_echo "$as_me: loading cache $cache_file" >&6;}
2573 case $cache_file in
2574 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2575 *) . "./$cache_file";;
2576 esac
2577 fi
2578else
2579 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2580$as_echo "$as_me: creating cache $cache_file" >&6;}
2581 >$cache_file
bec39cab
AC
2582fi
2583
81ecdfbb
RW
2584# Check that the precious variables saved in the cache have kept the same
2585# value.
2586ac_cache_corrupted=false
2587for ac_var in $ac_precious_vars; do
2588 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2589 eval ac_new_set=\$ac_env_${ac_var}_set
2590 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2591 eval ac_new_val=\$ac_env_${ac_var}_value
2592 case $ac_old_set,$ac_new_set in
2593 set,)
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2595$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2596 ac_cache_corrupted=: ;;
2597 ,set)
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2599$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2600 ac_cache_corrupted=: ;;
2601 ,);;
2602 *)
2603 if test "x$ac_old_val" != "x$ac_new_val"; then
2604 # differences in whitespace do not lead to failure.
2605 ac_old_val_w=`echo x $ac_old_val`
2606 ac_new_val_w=`echo x $ac_new_val`
2607 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2609$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2610 ac_cache_corrupted=:
2611 else
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2613$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2614 eval $ac_var=\$ac_old_val
2615 fi
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2617$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2619$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2620 fi;;
2621 esac
2622 # Pass precious variables to config.status.
2623 if test "$ac_new_set" = set; then
2624 case $ac_new_val in
2625 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2626 *) ac_arg=$ac_var=$ac_new_val ;;
2627 esac
2628 case " $ac_configure_args " in
2629 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2630 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2631 esac
2632 fi
2633done
2634if $ac_cache_corrupted; then
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2638$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2639 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2640fi
2641## -------------------- ##
2642## Main body of script. ##
2643## -------------------- ##
2644
2645ac_ext=c
2646ac_cpp='$CPP $CPPFLAGS'
2647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2649ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650
2651
2652
2653
2654
2655ac_config_headers="$ac_config_headers config.h:config.in"
2656
2657
2658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2659$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2660 # Check whether --enable-maintainer-mode was given.
2661if test "${enable_maintainer_mode+set}" = set; then :
2662 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2663else
2664 USE_MAINTAINER_MODE=no
2665fi
2666
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2668$as_echo "$USE_MAINTAINER_MODE" >&6; }
2669 if test $USE_MAINTAINER_MODE = yes; then
2670 MAINTAINER_MODE_TRUE=
2671 MAINTAINER_MODE_FALSE='#'
2672else
2673 MAINTAINER_MODE_TRUE='#'
2674 MAINTAINER_MODE_FALSE=
2675fi
2676
2677 MAINT=$MAINTAINER_MODE_TRUE
2678
2679
2680
2681ac_ext=c
2682ac_cpp='$CPP $CPPFLAGS'
2683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
2686if test -n "$ac_tool_prefix"; then
2687 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2688set dummy ${ac_tool_prefix}gcc; ac_word=$2
2689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2690$as_echo_n "checking for $ac_word... " >&6; }
2691if test "${ac_cv_prog_CC+set}" = set; then :
2692 $as_echo_n "(cached) " >&6
c906108c
SS
2693else
2694 if test -n "$CC"; then
2695 ac_cv_prog_CC="$CC" # Let the user override the test.
2696else
bec39cab
AC
2697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2698for as_dir in $PATH
2699do
2700 IFS=$as_save_IFS
2701 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2702 for ac_exec_ext in '' $ac_executable_extensions; do
2703 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2704 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2706 break 2
2707 fi
2708done
81ecdfbb
RW
2709 done
2710IFS=$as_save_IFS
bec39cab 2711
c906108c
SS
2712fi
2713fi
bec39cab 2714CC=$ac_cv_prog_CC
c906108c 2715if test -n "$CC"; then
81ecdfbb
RW
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2717$as_echo "$CC" >&6; }
c906108c 2718else
81ecdfbb
RW
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2720$as_echo "no" >&6; }
c906108c
SS
2721fi
2722
81ecdfbb 2723
b4e70030
JB
2724fi
2725if test -z "$ac_cv_prog_CC"; then
2726 ac_ct_CC=$CC
81ecdfbb
RW
2727 # Extract the first word of "gcc", so it can be a program name with args.
2728set dummy gcc; ac_word=$2
2729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2730$as_echo_n "checking for $ac_word... " >&6; }
2731if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2732 $as_echo_n "(cached) " >&6
b4e70030
JB
2733else
2734 if test -n "$ac_ct_CC"; then
2735 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2736else
2737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738for as_dir in $PATH
2739do
2740 IFS=$as_save_IFS
2741 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2742 for ac_exec_ext in '' $ac_executable_extensions; do
2743 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2744 ac_cv_prog_ac_ct_CC="gcc"
2745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2746 break 2
4e8d927d 2747 fi
b4e70030 2748done
81ecdfbb
RW
2749 done
2750IFS=$as_save_IFS
b4e70030
JB
2751
2752fi
2753fi
2754ac_ct_CC=$ac_cv_prog_ac_ct_CC
2755if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2757$as_echo "$ac_ct_CC" >&6; }
b4e70030 2758else
81ecdfbb
RW
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2760$as_echo "no" >&6; }
b4e70030
JB
2761fi
2762
81ecdfbb
RW
2763 if test "x$ac_ct_CC" = x; then
2764 CC=""
2765 else
2766 case $cross_compiling:$ac_tool_warned in
2767yes:)
2768{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2769$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2770ac_tool_warned=yes ;;
2771esac
2772 CC=$ac_ct_CC
2773 fi
b4e70030
JB
2774else
2775 CC="$ac_cv_prog_CC"
2776fi
2777
c906108c 2778if test -z "$CC"; then
81ecdfbb
RW
2779 if test -n "$ac_tool_prefix"; then
2780 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2781set dummy ${ac_tool_prefix}cc; ac_word=$2
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2783$as_echo_n "checking for $ac_word... " >&6; }
2784if test "${ac_cv_prog_CC+set}" = set; then :
2785 $as_echo_n "(cached) " >&6
c906108c
SS
2786else
2787 if test -n "$CC"; then
2788 ac_cv_prog_CC="$CC" # Let the user override the test.
2789else
bec39cab
AC
2790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2791for as_dir in $PATH
2792do
2793 IFS=$as_save_IFS
2794 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2795 for ac_exec_ext in '' $ac_executable_extensions; do
2796 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2797 ac_cv_prog_CC="${ac_tool_prefix}cc"
2798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2799 break 2
2800 fi
2801done
81ecdfbb
RW
2802 done
2803IFS=$as_save_IFS
2804
2805fi
2806fi
2807CC=$ac_cv_prog_CC
2808if test -n "$CC"; then
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2810$as_echo "$CC" >&6; }
2811else
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2813$as_echo "no" >&6; }
2814fi
2815
2816
2817 fi
2818fi
2819if test -z "$CC"; then
2820 # Extract the first word of "cc", so it can be a program name with args.
2821set dummy cc; ac_word=$2
2822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2823$as_echo_n "checking for $ac_word... " >&6; }
2824if test "${ac_cv_prog_CC+set}" = set; then :
2825 $as_echo_n "(cached) " >&6
2826else
2827 if test -n "$CC"; then
2828 ac_cv_prog_CC="$CC" # Let the user override the test.
2829else
2830 ac_prog_rejected=no
2831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2832for as_dir in $PATH
2833do
2834 IFS=$as_save_IFS
2835 test -z "$as_dir" && as_dir=.
2836 for ac_exec_ext in '' $ac_executable_extensions; do
2837 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2838 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2839 ac_prog_rejected=yes
2840 continue
2841 fi
2842 ac_cv_prog_CC="cc"
2843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2844 break 2
2845 fi
2846done
2847 done
2848IFS=$as_save_IFS
bec39cab 2849
c906108c
SS
2850if test $ac_prog_rejected = yes; then
2851 # We found a bogon in the path, so make sure we never use it.
2852 set dummy $ac_cv_prog_CC
2853 shift
bec39cab 2854 if test $# != 0; then
c906108c
SS
2855 # We chose a different compiler from the bogus one.
2856 # However, it has the same basename, so the bogon will be chosen
2857 # first if we set CC to just the basename; use the full file name.
2858 shift
bec39cab 2859 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2860 fi
2861fi
2862fi
2863fi
bec39cab 2864CC=$ac_cv_prog_CC
c906108c 2865if test -n "$CC"; then
81ecdfbb
RW
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2867$as_echo "$CC" >&6; }
c906108c 2868else
81ecdfbb
RW
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
c906108c
SS
2871fi
2872
81ecdfbb 2873
bec39cab
AC
2874fi
2875if test -z "$CC"; then
2876 if test -n "$ac_tool_prefix"; then
81ecdfbb 2877 for ac_prog in cl.exe
bec39cab
AC
2878 do
2879 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2880set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
2883if test "${ac_cv_prog_CC+set}" = set; then :
2884 $as_echo_n "(cached) " >&6
c906108c
SS
2885else
2886 if test -n "$CC"; then
2887 ac_cv_prog_CC="$CC" # Let the user override the test.
2888else
bec39cab
AC
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2896 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2898 break 2
2899 fi
2900done
81ecdfbb
RW
2901 done
2902IFS=$as_save_IFS
bec39cab 2903
c906108c
SS
2904fi
2905fi
bec39cab 2906CC=$ac_cv_prog_CC
c906108c 2907if test -n "$CC"; then
81ecdfbb
RW
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2909$as_echo "$CC" >&6; }
c906108c 2910else
81ecdfbb
RW
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
c906108c 2913fi
bec39cab 2914
81ecdfbb 2915
bec39cab
AC
2916 test -n "$CC" && break
2917 done
2918fi
2919if test -z "$CC"; then
2920 ac_ct_CC=$CC
81ecdfbb 2921 for ac_prog in cl.exe
bec39cab
AC
2922do
2923 # Extract the first word of "$ac_prog", so it can be a program name with args.
2924set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926$as_echo_n "checking for $ac_word... " >&6; }
2927if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2928 $as_echo_n "(cached) " >&6
bec39cab
AC
2929else
2930 if test -n "$ac_ct_CC"; then
2931 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2932else
2933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934for as_dir in $PATH
2935do
2936 IFS=$as_save_IFS
2937 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2938 for ac_exec_ext in '' $ac_executable_extensions; do
2939 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2940 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2942 break 2
c906108c 2943 fi
bec39cab 2944done
81ecdfbb
RW
2945 done
2946IFS=$as_save_IFS
bec39cab
AC
2947
2948fi
2949fi
2950ac_ct_CC=$ac_cv_prog_ac_ct_CC
2951if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2953$as_echo "$ac_ct_CC" >&6; }
bec39cab 2954else
81ecdfbb
RW
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956$as_echo "no" >&6; }
c906108c
SS
2957fi
2958
81ecdfbb 2959
bec39cab
AC
2960 test -n "$ac_ct_CC" && break
2961done
c906108c 2962
81ecdfbb
RW
2963 if test "x$ac_ct_CC" = x; then
2964 CC=""
2965 else
2966 case $cross_compiling:$ac_tool_warned in
2967yes:)
2968{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2969$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2970ac_tool_warned=yes ;;
2971esac
2972 CC=$ac_ct_CC
2973 fi
bec39cab
AC
2974fi
2975
2976fi
2977
2978
81ecdfbb
RW
2979test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2981as_fn_error "no acceptable C compiler found in \$PATH
2982See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
2983
2984# Provide some information about the compiler.
81ecdfbb
RW
2985$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2986set X $ac_compile
2987ac_compiler=$2
2988for ac_option in --version -v -V -qversion; do
2989 { { ac_try="$ac_compiler $ac_option >&5"
2990case "(($ac_try" in
2991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2992 *) ac_try_echo=$ac_try;;
2993esac
2994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2995$as_echo "$ac_try_echo"; } >&5
2996 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 2997 ac_status=$?
81ecdfbb
RW
2998 if test -s conftest.err; then
2999 sed '10a\
3000... rest of stderr output deleted ...
3001 10q' conftest.err >conftest.er1
3002 cat conftest.er1 >&5
3003 rm -f conftest.er1 conftest.err
3004 fi
3005 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3006 test $ac_status = 0; }
3007done
bec39cab 3008
81ecdfbb 3009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3010/* end confdefs.h. */
3011
3012int
3013main ()
3014{
3015
3016 ;
3017 return 0;
3018}
3019_ACEOF
3020ac_clean_files_save=$ac_clean_files
81ecdfbb 3021ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3022# Try to create an executable without -o first, disregard a.out.
3023# It will help us diagnose broken compilers, and finding out an intuition
3024# of exeext.
81ecdfbb
RW
3025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3026$as_echo_n "checking for C compiler default output file name... " >&6; }
3027ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3028
3029# The possible output files:
3030ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3031
3032ac_rmfiles=
3033for ac_file in $ac_files
3034do
3035 case $ac_file in
3036 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3037 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3038 esac
3039done
3040rm -f $ac_rmfiles
3041
3042if { { ac_try="$ac_link_default"
3043case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046esac
3047eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3048$as_echo "$ac_try_echo"; } >&5
3049 (eval "$ac_link_default") 2>&5
3050 ac_status=$?
3051 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3052 test $ac_status = 0; }; then :
3053 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3054# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3055# in a Makefile. We should not override ac_cv_exeext if it was cached,
3056# so that the user can short-circuit this test for compilers unknown to
3057# Autoconf.
3058for ac_file in $ac_files ''
bec39cab
AC
3059do
3060 test -f "$ac_file" || continue
3061 case $ac_file in
81ecdfbb 3062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3063 ;;
3064 [ab].out )
3065 # We found the default executable, but exeext='' is most
3066 # certainly right.
3067 break;;
3068 *.* )
81ecdfbb
RW
3069 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3070 then :; else
3071 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3072 fi
3073 # We set ac_cv_exeext here because the later test for it is not
3074 # safe: cross compilers may not add the suffix if given an `-o'
3075 # argument, so we may need to know it at that point already.
3076 # Even if this section looks crufty: it has the advantage of
3077 # actually working.
b4e70030
JB
3078 break;;
3079 * )
3080 break;;
bec39cab
AC
3081 esac
3082done
81ecdfbb
RW
3083test "$ac_cv_exeext" = no && ac_cv_exeext=
3084
bec39cab 3085else
81ecdfbb
RW
3086 ac_file=''
3087fi
3088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3089$as_echo "$ac_file" >&6; }
3090if test -z "$ac_file"; then :
3091 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3092sed 's/^/| /' conftest.$ac_ext >&5
3093
81ecdfbb
RW
3094{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3096{ as_fn_set_status 77
3097as_fn_error "C compiler cannot create executables
3098See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3099fi
b4e70030 3100ac_exeext=$ac_cv_exeext
b4e70030 3101
81ecdfbb 3102# Check that the compiler produces executables we can run. If not, either
bec39cab 3103# the compiler is broken, or we cross compile.
81ecdfbb
RW
3104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3105$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3106# If not cross compiling, check that we can run a simple program.
3107if test "$cross_compiling" != yes; then
3108 if { ac_try='./$ac_file'
81ecdfbb
RW
3109 { { case "(($ac_try" in
3110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3111 *) ac_try_echo=$ac_try;;
3112esac
3113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3114$as_echo "$ac_try_echo"; } >&5
3115 (eval "$ac_try") 2>&5
bec39cab 3116 ac_status=$?
81ecdfbb
RW
3117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3118 test $ac_status = 0; }; }; then
bec39cab 3119 cross_compiling=no
c906108c 3120 else
bec39cab
AC
3121 if test "$cross_compiling" = maybe; then
3122 cross_compiling=yes
3123 else
81ecdfbb
RW
3124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3126as_fn_error "cannot run C compiled programs.
bec39cab 3127If you meant to cross compile, use \`--host'.
81ecdfbb 3128See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3129 fi
c906108c 3130 fi
bec39cab 3131fi
81ecdfbb
RW
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3133$as_echo "yes" >&6; }
bec39cab 3134
81ecdfbb 3135rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3136ac_clean_files=$ac_clean_files_save
81ecdfbb 3137# Check that the compiler produces executables we can run. If not, either
b4e70030 3138# the compiler is broken, or we cross compile.
81ecdfbb
RW
3139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3140$as_echo_n "checking whether we are cross compiling... " >&6; }
3141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3142$as_echo "$cross_compiling" >&6; }
3143
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3145$as_echo_n "checking for suffix of executables... " >&6; }
3146if { { ac_try="$ac_link"
3147case "(($ac_try" in
3148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3149 *) ac_try_echo=$ac_try;;
3150esac
3151eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3152$as_echo "$ac_try_echo"; } >&5
3153 (eval "$ac_link") 2>&5
bec39cab 3154 ac_status=$?
81ecdfbb
RW
3155 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3156 test $ac_status = 0; }; then :
b4e70030
JB
3157 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3158# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3159# work properly (i.e., refer to `conftest.exe'), while it won't with
3160# `rm'.
3161for ac_file in conftest.exe conftest conftest.*; do
3162 test -f "$ac_file" || continue
3163 case $ac_file in
81ecdfbb 3164 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3165 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3166 break;;
3167 * ) break;;
3168 esac
3169done
c906108c 3170else
81ecdfbb
RW
3171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3173as_fn_error "cannot compute suffix of executables: cannot compile and link
3174See \`config.log' for more details." "$LINENO" 5; }
c906108c 3175fi
b4e70030 3176rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3178$as_echo "$ac_cv_exeext" >&6; }
c906108c 3179
b4e70030 3180rm -f conftest.$ac_ext
bec39cab
AC
3181EXEEXT=$ac_cv_exeext
3182ac_exeext=$EXEEXT
81ecdfbb
RW
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3184$as_echo_n "checking for suffix of object files... " >&6; }
3185if test "${ac_cv_objext+set}" = set; then :
3186 $as_echo_n "(cached) " >&6
bec39cab 3187else
81ecdfbb 3188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3189/* end confdefs.h. */
3190
3191int
3192main ()
3193{
3194
3195 ;
3196 return 0;
3197}
3198_ACEOF
3199rm -f conftest.o conftest.obj
81ecdfbb
RW
3200if { { ac_try="$ac_compile"
3201case "(($ac_try" in
3202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3203 *) ac_try_echo=$ac_try;;
3204esac
3205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3206$as_echo "$ac_try_echo"; } >&5
3207 (eval "$ac_compile") 2>&5
3208 ac_status=$?
3209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3210 test $ac_status = 0; }; then :
3211 for ac_file in conftest.o conftest.obj conftest.*; do
3212 test -f "$ac_file" || continue;
bec39cab 3213 case $ac_file in
81ecdfbb 3214 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3215 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3216 break;;
3217 esac
3218done
c906108c 3219else
81ecdfbb 3220 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3221sed 's/^/| /' conftest.$ac_ext >&5
3222
81ecdfbb
RW
3223{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3225as_fn_error "cannot compute suffix of object files: cannot compile
3226See \`config.log' for more details." "$LINENO" 5; }
c906108c 3227fi
b4e70030 3228rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3229fi
81ecdfbb
RW
3230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3231$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3232OBJEXT=$ac_cv_objext
3233ac_objext=$OBJEXT
81ecdfbb
RW
3234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3235$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3236if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3237 $as_echo_n "(cached) " >&6
c906108c 3238else
81ecdfbb 3239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3240/* end confdefs.h. */
3241
3242int
3243main ()
3244{
3245#ifndef __GNUC__
3246 choke me
3247#endif
3248
3249 ;
3250 return 0;
3251}
3252_ACEOF
81ecdfbb 3253if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3254 ac_compiler_gnu=yes
3255else
81ecdfbb 3256 ac_compiler_gnu=no
bec39cab 3257fi
81ecdfbb 3258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3259ac_cv_c_compiler_gnu=$ac_compiler_gnu
3260
3261fi
81ecdfbb
RW
3262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3263$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3264if test $ac_compiler_gnu = yes; then
3265 GCC=yes
3266else
3267 GCC=
3268fi
bec39cab
AC
3269ac_test_CFLAGS=${CFLAGS+set}
3270ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3272$as_echo_n "checking whether $CC accepts -g... " >&6; }
3273if test "${ac_cv_prog_cc_g+set}" = set; then :
3274 $as_echo_n "(cached) " >&6
bec39cab 3275else
81ecdfbb
RW
3276 ac_save_c_werror_flag=$ac_c_werror_flag
3277 ac_c_werror_flag=yes
3278 ac_cv_prog_cc_g=no
3279 CFLAGS="-g"
3280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3281/* end confdefs.h. */
3282
3283int
3284main ()
3285{
3286
3287 ;
3288 return 0;
3289}
3290_ACEOF
81ecdfbb 3291if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3292 ac_cv_prog_cc_g=yes
3293else
81ecdfbb
RW
3294 CFLAGS=""
3295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3296/* end confdefs.h. */
3297
3298int
3299main ()
3300{
3301
3302 ;
3303 return 0;
3304}
3305_ACEOF
3306if ac_fn_c_try_compile "$LINENO"; then :
3307
3308else
3309 ac_c_werror_flag=$ac_save_c_werror_flag
3310 CFLAGS="-g"
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3312/* end confdefs.h. */
3313
3314int
3315main ()
3316{
c906108c 3317
81ecdfbb
RW
3318 ;
3319 return 0;
3320}
3321_ACEOF
3322if ac_fn_c_try_compile "$LINENO"; then :
3323 ac_cv_prog_cc_g=yes
3324fi
3325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3326fi
3327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3328fi
81ecdfbb
RW
3329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3330 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3331fi
81ecdfbb
RW
3332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3333$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3334if test "$ac_test_CFLAGS" = set; then
bec39cab 3335 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3336elif test $ac_cv_prog_cc_g = yes; then
3337 if test "$GCC" = yes; then
3338 CFLAGS="-g -O2"
3339 else
3340 CFLAGS="-g"
3341 fi
3342else
3343 if test "$GCC" = yes; then
3344 CFLAGS="-O2"
3345 else
3346 CFLAGS=
3347 fi
3348fi
81ecdfbb
RW
3349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3350$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3351if test "${ac_cv_prog_cc_c89+set}" = set; then :
3352 $as_echo_n "(cached) " >&6
bec39cab 3353else
81ecdfbb 3354 ac_cv_prog_cc_c89=no
bec39cab 3355ac_save_CC=$CC
81ecdfbb 3356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3357/* end confdefs.h. */
c906108c
SS
3358#include <stdarg.h>
3359#include <stdio.h>
3360#include <sys/types.h>
3361#include <sys/stat.h>
3362/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3363struct buf { int x; };
3364FILE * (*rcsopen) (struct buf *, struct stat *, int);
3365static char *e (p, i)
3366 char **p;
3367 int i;
3368{
3369 return p[i];
3370}
3371static char *f (char * (*g) (char **, int), char **p, ...)
3372{
3373 char *s;
3374 va_list v;
3375 va_start (v,p);
3376 s = g (p, va_arg (v,int));
3377 va_end (v);
3378 return s;
3379}
bec39cab
AC
3380
3381/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3382 function prototypes and stuff, but not '\xHH' hex character constants.
3383 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3384 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3385 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3386 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3387 that's true only with -std. */
bec39cab
AC
3388int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3389
81ecdfbb
RW
3390/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3391 inside strings and character constants. */
3392#define FOO(x) 'x'
3393int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3394
c906108c
SS
3395int test (int i, double x);
3396struct s1 {int (*f) (int a);};
3397struct s2 {int (*f) (double a);};
3398int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3399int argc;
3400char **argv;
bec39cab
AC
3401int
3402main ()
3403{
c906108c 3404return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3405 ;
3406 return 0;
3407}
3408_ACEOF
81ecdfbb
RW
3409for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3410 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3411do
3412 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3413 if ac_fn_c_try_compile "$LINENO"; then :
3414 ac_cv_prog_cc_c89=$ac_arg
c906108c 3415fi
81ecdfbb
RW
3416rm -f core conftest.err conftest.$ac_objext
3417 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3418done
81ecdfbb 3419rm -f conftest.$ac_ext
bec39cab 3420CC=$ac_save_CC
c906108c
SS
3421
3422fi
81ecdfbb
RW
3423# AC_CACHE_VAL
3424case "x$ac_cv_prog_cc_c89" in
3425 x)
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3427$as_echo "none needed" >&6; } ;;
3428 xno)
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3430$as_echo "unsupported" >&6; } ;;
bec39cab 3431 *)
81ecdfbb
RW
3432 CC="$CC $ac_cv_prog_cc_c89"
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3434$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3435esac
81ecdfbb 3436if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3437
b4e70030
JB
3438fi
3439
bec39cab
AC
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3445
60ca704f 3446
bec39cab
AC
3447ac_ext=c
3448ac_cpp='$CPP $CPPFLAGS'
3449ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3450ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3451ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3453$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3454# On Suns, sometimes $CPP names a directory.
3455if test -n "$CPP" && test -d "$CPP"; then
3456 CPP=
8bb2c122 3457fi
bec39cab 3458if test -z "$CPP"; then
81ecdfbb
RW
3459 if test "${ac_cv_prog_CPP+set}" = set; then :
3460 $as_echo_n "(cached) " >&6
bec39cab
AC
3461else
3462 # Double quotes because CPP needs to be expanded
3463 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3464 do
3465 ac_preproc_ok=false
3466for ac_c_preproc_warn_flag in '' yes
3467do
3468 # Use a header file that comes with gcc, so configuring glibc
3469 # with a fresh cross-compiler works.
3470 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3471 # <limits.h> exists even on freestanding compilers.
3472 # On the NeXT, cc -E runs the code through the compiler's parser,
3473 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3475/* end confdefs.h. */
3476#ifdef __STDC__
3477# include <limits.h>
3478#else
3479# include <assert.h>
3480#endif
3481 Syntax error
3482_ACEOF
81ecdfbb 3483if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3484
81ecdfbb 3485else
bec39cab
AC
3486 # Broken: fails on valid input.
3487continue
3488fi
3489rm -f conftest.err conftest.$ac_ext
3490
81ecdfbb 3491 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3492 # can be detected and how.
81ecdfbb 3493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3494/* end confdefs.h. */
3495#include <ac_nonexistent.h>
3496_ACEOF
81ecdfbb 3497if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3498 # Broken: success on invalid input.
3499continue
8bb2c122 3500else
bec39cab
AC
3501 # Passes both tests.
3502ac_preproc_ok=:
3503break
8bb2c122 3504fi
bec39cab 3505rm -f conftest.err conftest.$ac_ext
8bb2c122 3506
bec39cab
AC
3507done
3508# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3509rm -f conftest.err conftest.$ac_ext
81ecdfbb 3510if $ac_preproc_ok; then :
bec39cab
AC
3511 break
3512fi
8bb2c122 3513
bec39cab
AC
3514 done
3515 ac_cv_prog_CPP=$CPP
ddc9cd0f 3516
c906108c 3517fi
bec39cab
AC
3518 CPP=$ac_cv_prog_CPP
3519else
3520 ac_cv_prog_CPP=$CPP
c906108c 3521fi
81ecdfbb
RW
3522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3523$as_echo "$CPP" >&6; }
bec39cab
AC
3524ac_preproc_ok=false
3525for ac_c_preproc_warn_flag in '' yes
3526do
3527 # Use a header file that comes with gcc, so configuring glibc
3528 # with a fresh cross-compiler works.
3529 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3530 # <limits.h> exists even on freestanding compilers.
3531 # On the NeXT, cc -E runs the code through the compiler's parser,
3532 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3534/* end confdefs.h. */
3535#ifdef __STDC__
3536# include <limits.h>
3537#else
3538# include <assert.h>
3539#endif
3540 Syntax error
3541_ACEOF
81ecdfbb 3542if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3543
81ecdfbb 3544else
bec39cab
AC
3545 # Broken: fails on valid input.
3546continue
3547fi
3548rm -f conftest.err conftest.$ac_ext
3549
81ecdfbb 3550 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3551 # can be detected and how.
81ecdfbb 3552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3553/* end confdefs.h. */
3554#include <ac_nonexistent.h>
3555_ACEOF
81ecdfbb 3556if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3557 # Broken: success on invalid input.
3558continue
c906108c 3559else
bec39cab
AC
3560 # Passes both tests.
3561ac_preproc_ok=:
3562break
c906108c 3563fi
bec39cab 3564rm -f conftest.err conftest.$ac_ext
c906108c 3565
bec39cab
AC
3566done
3567# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3568rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3569if $ac_preproc_ok; then :
3570
c906108c 3571else
81ecdfbb
RW
3572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3574as_fn_error "C preprocessor \"$CPP\" fails sanity check
3575See \`config.log' for more details." "$LINENO" 5; }
c906108c 3576fi
c906108c 3577
bec39cab
AC
3578ac_ext=c
3579ac_cpp='$CPP $CPPFLAGS'
3580ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3581ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3582ac_compiler_gnu=$ac_cv_c_compiler_gnu
3583
3584
81ecdfbb
RW
3585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3586$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3587if test "${ac_cv_path_GREP+set}" = set; then :
3588 $as_echo_n "(cached) " >&6
4e8d927d 3589else
81ecdfbb
RW
3590 if test -z "$GREP"; then
3591 ac_path_GREP_found=false
3592 # Loop through the user's path and test for each of PROGNAME-LIST
3593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3594for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3595do
3596 IFS=$as_save_IFS
3597 test -z "$as_dir" && as_dir=.
3598 for ac_prog in grep ggrep; do
3599 for ac_exec_ext in '' $ac_executable_extensions; do
3600 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3601 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3602# Check for GNU ac_path_GREP and select it if it is found.
3603 # Check for GNU $ac_path_GREP
3604case `"$ac_path_GREP" --version 2>&1` in
3605*GNU*)
3606 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3607*)
3608 ac_count=0
3609 $as_echo_n 0123456789 >"conftest.in"
3610 while :
3611 do
3612 cat "conftest.in" "conftest.in" >"conftest.tmp"
3613 mv "conftest.tmp" "conftest.in"
3614 cp "conftest.in" "conftest.nl"
3615 $as_echo 'GREP' >> "conftest.nl"
3616 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3617 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3618 as_fn_arith $ac_count + 1 && ac_count=$as_val
3619 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3620 # Best one so far, save it but keep looking for a better one
3621 ac_cv_path_GREP="$ac_path_GREP"
3622 ac_path_GREP_max=$ac_count
bec39cab 3623 fi
81ecdfbb
RW
3624 # 10*(2^10) chars as input seems more than enough
3625 test $ac_count -gt 10 && break
3626 done
3627 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3628esac
bec39cab 3629
81ecdfbb
RW
3630 $ac_path_GREP_found && break 3
3631 done
3632 done
3633 done
3634IFS=$as_save_IFS
3635 if test -z "$ac_cv_path_GREP"; then
3636 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3637 fi
c906108c 3638else
81ecdfbb 3639 ac_cv_path_GREP=$GREP
c906108c 3640fi
c906108c 3641
81ecdfbb
RW
3642fi
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3644$as_echo "$ac_cv_path_GREP" >&6; }
3645 GREP="$ac_cv_path_GREP"
c906108c 3646
c906108c 3647
81ecdfbb
RW
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3649$as_echo_n "checking for egrep... " >&6; }
3650if test "${ac_cv_path_EGREP+set}" = set; then :
3651 $as_echo_n "(cached) " >&6
783e057b 3652else
81ecdfbb
RW
3653 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3654 then ac_cv_path_EGREP="$GREP -E"
3655 else
3656 if test -z "$EGREP"; then
3657 ac_path_EGREP_found=false
3658 # Loop through the user's path and test for each of PROGNAME-LIST
3659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3664 for ac_prog in egrep; do
3665 for ac_exec_ext in '' $ac_executable_extensions; do
3666 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3667 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3668# Check for GNU ac_path_EGREP and select it if it is found.
3669 # Check for GNU $ac_path_EGREP
3670case `"$ac_path_EGREP" --version 2>&1` in
3671*GNU*)
3672 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3673*)
3674 ac_count=0
3675 $as_echo_n 0123456789 >"conftest.in"
3676 while :
3677 do
3678 cat "conftest.in" "conftest.in" >"conftest.tmp"
3679 mv "conftest.tmp" "conftest.in"
3680 cp "conftest.in" "conftest.nl"
3681 $as_echo 'EGREP' >> "conftest.nl"
3682 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3683 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3684 as_fn_arith $ac_count + 1 && ac_count=$as_val
3685 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3686 # Best one so far, save it but keep looking for a better one
3687 ac_cv_path_EGREP="$ac_path_EGREP"
3688 ac_path_EGREP_max=$ac_count
3689 fi
3690 # 10*(2^10) chars as input seems more than enough
3691 test $ac_count -gt 10 && break
3692 done
3693 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3694esac
bec39cab 3695
81ecdfbb
RW
3696 $ac_path_EGREP_found && break 3
3697 done
3698 done
3699 done
3700IFS=$as_save_IFS
3701 if test -z "$ac_cv_path_EGREP"; then
3702 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3703 fi
783e057b 3704else
81ecdfbb 3705 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3706fi
3707
81ecdfbb 3708 fi
783e057b 3709fi
81ecdfbb
RW
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3711$as_echo "$ac_cv_path_EGREP" >&6; }
3712 EGREP="$ac_cv_path_EGREP"
3713
783e057b 3714
81ecdfbb
RW
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3716$as_echo_n "checking for ANSI C header files... " >&6; }
3717if test "${ac_cv_header_stdc+set}" = set; then :
3718 $as_echo_n "(cached) " >&6
783e057b 3719else
81ecdfbb 3720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3721/* end confdefs.h. */
783e057b 3722#include <stdlib.h>
bec39cab 3723#include <stdarg.h>
783e057b
DJ
3724#include <string.h>
3725#include <float.h>
c906108c 3726
bec39cab
AC
3727int
3728main ()
3729{
c906108c 3730
bec39cab
AC
3731 ;
3732 return 0;
3733}
3734_ACEOF
81ecdfbb 3735if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3736 ac_cv_header_stdc=yes
c906108c 3737else
81ecdfbb 3738 ac_cv_header_stdc=no
c906108c 3739fi
81ecdfbb 3740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3741
783e057b
DJ
3742if test $ac_cv_header_stdc = yes; then
3743 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3745/* end confdefs.h. */
3746#include <string.h>
c906108c 3747
783e057b
DJ
3748_ACEOF
3749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3750 $EGREP "memchr" >/dev/null 2>&1; then :
3751
c906108c 3752else
783e057b 3753 ac_cv_header_stdc=no
c906108c 3754fi
783e057b 3755rm -f conftest*
c906108c
SS
3756
3757fi
3758
783e057b
DJ
3759if test $ac_cv_header_stdc = yes; then
3760 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3762/* end confdefs.h. */
3763#include <stdlib.h>
bec39cab 3764
783e057b
DJ
3765_ACEOF
3766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3767 $EGREP "free" >/dev/null 2>&1; then :
3768
bec39cab 3769else
783e057b 3770 ac_cv_header_stdc=no
bec39cab 3771fi
783e057b 3772rm -f conftest*
bec39cab
AC
3773
3774fi
bec39cab 3775
783e057b
DJ
3776if test $ac_cv_header_stdc = yes; then
3777 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3778 if test "$cross_compiling" = yes; then :
783e057b 3779 :
bec39cab 3780else
81ecdfbb 3781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3782/* end confdefs.h. */
3783#include <ctype.h>
81ecdfbb 3784#include <stdlib.h>
783e057b
DJ
3785#if ((' ' & 0x0FF) == 0x020)
3786# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3787# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3788#else
3789# define ISLOWER(c) \
3790 (('a' <= (c) && (c) <= 'i') \
3791 || ('j' <= (c) && (c) <= 'r') \
3792 || ('s' <= (c) && (c) <= 'z'))
3793# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3794#endif
3795
3796#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3797int
3798main ()
3799{
3800 int i;
3801 for (i = 0; i < 256; i++)
3802 if (XOR (islower (i), ISLOWER (i))
3803 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3804 return 2;
3805 return 0;
783e057b
DJ
3806}
3807_ACEOF
81ecdfbb 3808if ac_fn_c_try_run "$LINENO"; then :
783e057b 3809
81ecdfbb
RW
3810else
3811 ac_cv_header_stdc=no
783e057b 3812fi
81ecdfbb
RW
3813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3814 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3815fi
81ecdfbb 3816
783e057b
DJ
3817fi
3818fi
81ecdfbb
RW
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3820$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3821if test $ac_cv_header_stdc = yes; then
3822
81ecdfbb 3823$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3824
3825fi
3826
3827# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3828for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3829 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3830do :
3831 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3832ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3833"
3834eval as_val=\$$as_ac_Header
3835 if test "x$as_val" = x""yes; then :
783e057b 3836 cat >>confdefs.h <<_ACEOF
81ecdfbb 3837#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3838_ACEOF
3839
3840fi
3841
3842done
3843
3844
3845
81ecdfbb
RW
3846 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3847if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3848 MINIX=yes
3849else
3850 MINIX=
3851fi
3852
3853
3854 if test "$MINIX" = yes; then
3855
81ecdfbb 3856$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3857
3858
81ecdfbb 3859$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3860
3861
81ecdfbb 3862$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3863
3864 fi
3865
3866
81ecdfbb
RW
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3868$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3869if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3870 $as_echo_n "(cached) " >&6
783e057b 3871else
81ecdfbb 3872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3873/* end confdefs.h. */
3874
c971b7fa
PA
3875# define __EXTENSIONS__ 1
3876 $ac_includes_default
783e057b
DJ
3877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
81ecdfbb 3885if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3886 ac_cv_safe_to_define___extensions__=yes
3887else
81ecdfbb 3888 ac_cv_safe_to_define___extensions__=no
783e057b 3889fi
81ecdfbb 3890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3891fi
81ecdfbb
RW
3892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3893$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3894 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3895 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3896
81ecdfbb 3897 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3898
81ecdfbb 3899 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3900
81ecdfbb 3901 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3902
81ecdfbb 3903 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3904
3905
c971b7fa
PA
3906ac_aux_dir=
3907for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3908 for ac_t in install-sh install.sh shtool; do
3909 if test -f "$ac_dir/$ac_t"; then
3910 ac_aux_dir=$ac_dir
3911 ac_install_sh="$ac_aux_dir/$ac_t -c"
3912 break 2
3913 fi
3914 done
3915done
3916if test -z "$ac_aux_dir"; then
3917 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3918fi
770d76d7 3919
c971b7fa
PA
3920# These three variables are undocumented and unsupported,
3921# and are intended to be withdrawn in a future Autoconf release.
3922# They can cause serious problems if a builder's source tree is in a directory
3923# whose full name contains unusual characters.
3924ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3925ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3926ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3927
770d76d7 3928
c971b7fa
PA
3929# Make sure we can run config.sub.
3930$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3931 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3932
c971b7fa
PA
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3934$as_echo_n "checking build system type... " >&6; }
3935if test "${ac_cv_build+set}" = set; then :
3936 $as_echo_n "(cached) " >&6
770d76d7 3937else
c971b7fa
PA
3938 ac_build_alias=$build_alias
3939test "x$ac_build_alias" = x &&
3940 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3941test "x$ac_build_alias" = x &&
3942 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3943ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3944 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3945
770d76d7 3946fi
c971b7fa
PA
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3948$as_echo "$ac_cv_build" >&6; }
3949case $ac_cv_build in
3950*-*-*) ;;
3951*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3952esac
c971b7fa
PA
3953build=$ac_cv_build
3954ac_save_IFS=$IFS; IFS='-'
3955set x $ac_cv_build
3956shift
3957build_cpu=$1
3958build_vendor=$2
3959shift; shift
3960# Remember, the first character of IFS is used to create $*,
3961# except with old shells:
3962build_os=$*
3963IFS=$ac_save_IFS
3964case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3965
3966
c971b7fa
PA
3967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3968$as_echo_n "checking host system type... " >&6; }
3969if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3970 $as_echo_n "(cached) " >&6
3971else
c971b7fa
PA
3972 if test "x$host_alias" = x; then
3973 ac_cv_host=$ac_cv_build
81ecdfbb 3974else
c971b7fa
PA
3975 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3976 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 3977fi
81ecdfbb
RW
3978
3979fi
c971b7fa
PA
3980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3981$as_echo "$ac_cv_host" >&6; }
3982case $ac_cv_host in
3983*-*-*) ;;
3984*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 3985esac
c971b7fa
PA
3986host=$ac_cv_host
3987ac_save_IFS=$IFS; IFS='-'
3988set x $ac_cv_host
3989shift
3990host_cpu=$1
3991host_vendor=$2
3992shift; shift
3993# Remember, the first character of IFS is used to create $*,
3994# except with old shells:
3995host_os=$*
3996IFS=$ac_save_IFS
3997case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
3998
3999
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4001$as_echo_n "checking target system type... " >&6; }
4002if test "${ac_cv_target+set}" = set; then :
4003 $as_echo_n "(cached) " >&6
4004else
4005 if test "x$target_alias" = x; then
4006 ac_cv_target=$ac_cv_host
4007else
4008 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4009 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4010fi
4011
4012fi
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4014$as_echo "$ac_cv_target" >&6; }
4015case $ac_cv_target in
4016*-*-*) ;;
4017*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4018esac
4019target=$ac_cv_target
4020ac_save_IFS=$IFS; IFS='-'
4021set x $ac_cv_target
4022shift
4023target_cpu=$1
4024target_vendor=$2
4025shift; shift
4026# Remember, the first character of IFS is used to create $*,
4027# except with old shells:
4028target_os=$*
4029IFS=$ac_save_IFS
4030case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4031
4032
4033# The aliases save the names the user supplied, while $host etc.
4034# will get canonicalized.
4035test -n "$target_alias" &&
4036 test "$program_prefix$program_suffix$program_transform_name" = \
4037 NONENONEs,x,x, &&
4038 program_prefix=${target_alias}-
4039
4040# The tests for host and target for $enable_largefile require
4041# canonical names.
4042
4043
81ecdfbb 4044
da2f07f1
JK
4045# As the $enable_largefile decision depends on --enable-plugins we must set it
4046# even in directories otherwise not depending on the $plugins option.
4047
4048
4049# Check whether --enable-plugins was given.
4050if test "${enable_plugins+set}" = set; then :
4051 enableval=$enable_plugins; case "${enableval}" in
4052 yes | "") plugins=yes ;;
4053 no) plugins=no ;;
4054 *) plugins=yes ;;
4055 esac
4056else
4057 plugins=no
4058fi
4059
4060
4061
4062case "${host}" in
4063 sparc-*-solaris*|i[3-7]86-*-solaris*)
4064 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4065 # are mutually exclusive; and without procfs support, the bfd/ elf module
4066 # cannot provide certain routines such as elfcore_write_prpsinfo
4067 # or elfcore_write_prstatus. So unless the user explicitly requested
4068 # large-file support through the --enable-largefile switch, disable
4069 # large-file support in favor of procfs support.
4070 test "${target}" = "${host}" -a "x$plugins" = xno \
4071 && : ${enable_largefile="no"}
4072 ;;
4073esac
4074
4075# Check whether --enable-largefile was given.
4076if test "${enable_largefile+set}" = set; then :
4077 enableval=$enable_largefile;
4078fi
4079
4080if test "$enable_largefile" != no; then
4081
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4083$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4084if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4085 $as_echo_n "(cached) " >&6
4086else
4087 ac_cv_sys_largefile_CC=no
4088 if test "$GCC" != yes; then
4089 ac_save_CC=$CC
4090 while :; do
4091 # IRIX 6.2 and later do not support large files by default,
4092 # so use the C compiler's -n32 option if that helps.
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094/* end confdefs.h. */
4095#include <sys/types.h>
4096 /* Check that off_t can represent 2**63 - 1 correctly.
4097 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4098 since some C++ compilers masquerading as C compilers
4099 incorrectly reject 9223372036854775807. */
4100#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4101 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4102 && LARGE_OFF_T % 2147483647 == 1)
4103 ? 1 : -1];
4104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112 if ac_fn_c_try_compile "$LINENO"; then :
4113 break
4114fi
4115rm -f core conftest.err conftest.$ac_objext
4116 CC="$CC -n32"
4117 if ac_fn_c_try_compile "$LINENO"; then :
4118 ac_cv_sys_largefile_CC=' -n32'; break
4119fi
4120rm -f core conftest.err conftest.$ac_objext
4121 break
4122 done
4123 CC=$ac_save_CC
4124 rm -f conftest.$ac_ext
4125 fi
4126fi
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4128$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4129 if test "$ac_cv_sys_largefile_CC" != no; then
4130 CC=$CC$ac_cv_sys_largefile_CC
4131 fi
4132
4133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4134$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4135if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4136 $as_echo_n "(cached) " >&6
4137else
4138 while :; do
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4140/* end confdefs.h. */
4141#include <sys/types.h>
4142 /* Check that off_t can represent 2**63 - 1 correctly.
4143 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4144 since some C++ compilers masquerading as C compilers
4145 incorrectly reject 9223372036854775807. */
4146#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4147 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4148 && LARGE_OFF_T % 2147483647 == 1)
4149 ? 1 : -1];
4150int
4151main ()
4152{
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
4158if ac_fn_c_try_compile "$LINENO"; then :
4159 ac_cv_sys_file_offset_bits=no; break
4160fi
4161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4163/* end confdefs.h. */
4164#define _FILE_OFFSET_BITS 64
4165#include <sys/types.h>
4166 /* Check that off_t can represent 2**63 - 1 correctly.
4167 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4168 since some C++ compilers masquerading as C compilers
4169 incorrectly reject 9223372036854775807. */
4170#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4171 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4172 && LARGE_OFF_T % 2147483647 == 1)
4173 ? 1 : -1];
4174int
4175main ()
4176{
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
4182if ac_fn_c_try_compile "$LINENO"; then :
4183 ac_cv_sys_file_offset_bits=64; break
4184fi
4185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4186 ac_cv_sys_file_offset_bits=unknown
4187 break
4188done
4189fi
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4191$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4192case $ac_cv_sys_file_offset_bits in #(
4193 no | unknown) ;;
4194 *)
4195cat >>confdefs.h <<_ACEOF
4196#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4197_ACEOF
4198;;
4199esac
4200rm -rf conftest*
4201 if test $ac_cv_sys_file_offset_bits = unknown; then
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4203$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4204if test "${ac_cv_sys_large_files+set}" = set; then :
4205 $as_echo_n "(cached) " >&6
4206else
4207 while :; do
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4209/* end confdefs.h. */
4210#include <sys/types.h>
4211 /* Check that off_t can represent 2**63 - 1 correctly.
4212 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4213 since some C++ compilers masquerading as C compilers
4214 incorrectly reject 9223372036854775807. */
4215#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4216 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4217 && LARGE_OFF_T % 2147483647 == 1)
4218 ? 1 : -1];
4219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
4227if ac_fn_c_try_compile "$LINENO"; then :
4228 ac_cv_sys_large_files=no; break
4229fi
4230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4232/* end confdefs.h. */
4233#define _LARGE_FILES 1
4234#include <sys/types.h>
4235 /* Check that off_t can represent 2**63 - 1 correctly.
4236 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4237 since some C++ compilers masquerading as C compilers
4238 incorrectly reject 9223372036854775807. */
4239#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4240 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4241 && LARGE_OFF_T % 2147483647 == 1)
4242 ? 1 : -1];
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
4251if ac_fn_c_try_compile "$LINENO"; then :
4252 ac_cv_sys_large_files=1; break
4253fi
4254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255 ac_cv_sys_large_files=unknown
4256 break
4257done
4258fi
4259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4260$as_echo "$ac_cv_sys_large_files" >&6; }
4261case $ac_cv_sys_large_files in #(
4262 no | unknown) ;;
4263 *)
4264cat >>confdefs.h <<_ACEOF
4265#define _LARGE_FILES $ac_cv_sys_large_files
4266_ACEOF
4267;;
4268esac
4269rm -rf conftest*
4270 fi
4271fi
4272
4273
4274
81ecdfbb
RW
4275
4276
4277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4278$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4279if test "${am_cv_prog_cc_stdc+set}" = set; then :
4280 $as_echo_n "(cached) " >&6
4281else
4282 am_cv_prog_cc_stdc=no
4283ac_save_CC="$CC"
4284# Don't try gcc -ansi; that turns off useful extensions and
4285# breaks some systems' header files.
4286# AIX -qlanglvl=ansi
4287# Ultrix and OSF/1 -std1
4288# HP-UX 10.20 and later -Ae
4289# HP-UX older versions -Aa -D_HPUX_SOURCE
4290# SVR4 -Xc -D__EXTENSIONS__
4291for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4292do
783e057b 4293 CC="$ac_save_CC $ac_arg"
81ecdfbb 4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4295/* end confdefs.h. */
4296#include <stdarg.h>
4297#include <stdio.h>
4298#include <sys/types.h>
4299#include <sys/stat.h>
4300/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4301struct buf { int x; };
4302FILE * (*rcsopen) (struct buf *, struct stat *, int);
4303static char *e (p, i)
4304 char **p;
4305 int i;
4306{
4307 return p[i];
4308}
4309static char *f (char * (*g) (char **, int), char **p, ...)
4310{
4311 char *s;
4312 va_list v;
4313 va_start (v,p);
4314 s = g (p, va_arg (v,int));
4315 va_end (v);
4316 return s;
4317}
4318int test (int i, double x);
4319struct s1 {int (*f) (int a);};
4320struct s2 {int (*f) (double a);};
4321int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4322int argc;
4323char **argv;
4324
4325int
4326main ()
4327{
4328
4329return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4330
4331 ;
4332 return 0;
4333}
4334_ACEOF
81ecdfbb 4335if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4336 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4337fi
81ecdfbb 4338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4339done
4340CC="$ac_save_CC"
4341
4342fi
4343
4344if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4346$as_echo "none needed" >&6; }
783e057b 4347else
81ecdfbb
RW
4348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4349$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4350fi
4351case "x$am_cv_prog_cc_stdc" in
4352 x|xno) ;;
4353 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4354esac
4355
4356
4357ac_aux_dir=
81ecdfbb
RW
4358for ac_dir in .. "$srcdir"/..; do
4359 for ac_t in install-sh install.sh shtool; do
4360 if test -f "$ac_dir/$ac_t"; then
4361 ac_aux_dir=$ac_dir
4362 ac_install_sh="$ac_aux_dir/$ac_t -c"
4363 break 2
4364 fi
4365 done
783e057b
DJ
4366done
4367if test -z "$ac_aux_dir"; then
81ecdfbb 4368 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4369fi
81ecdfbb
RW
4370
4371# These three variables are undocumented and unsupported,
4372# and are intended to be withdrawn in a future Autoconf release.
4373# They can cause serious problems if a builder's source tree is in a directory
4374# whose full name contains unusual characters.
4375ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4376ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4377ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4378
783e057b 4379
783e057b 4380
9009e1ae
MR
4381test "$program_prefix" != NONE &&
4382 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4383# Use a double $ so make ignores it.
4384test "$program_suffix" != NONE &&
4385 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4386# Double any \ or $.
4387# By default was `s,x,x', remove it if useless.
4388ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4389program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4390
81ecdfbb 4391
a417dc56
RW
4392# Dependency checking.
4393rm -rf .tst 2>/dev/null
4394mkdir .tst 2>/dev/null
4395if test -d .tst; then
4396 am__leading_dot=.
4397else
4398 am__leading_dot=_
4399fi
4400rmdir .tst 2>/dev/null
4401
4402DEPDIR="${am__leading_dot}deps"
4403
81ecdfbb 4404ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4405
4406
4407depcc="$CC" am_compiler_list=
4408
4409am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4411$as_echo_n "checking dependency style of $depcc... " >&6; }
4412if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4413 $as_echo_n "(cached) " >&6
a417dc56
RW
4414else
4415 if test -f "$am_depcomp"; then
4416 # We make a subdir and do the tests there. Otherwise we can end up
4417 # making bogus files that we don't know about and never remove. For
4418 # instance it was reported that on HP-UX the gcc test will end up
4419 # making a dummy file named `D' -- because `-MD' means `put the output
4420 # in D'.
4421 mkdir conftest.dir
4422 # Copy depcomp to subdir because otherwise we won't find it if we're
4423 # using a relative directory.
4424 cp "$am_depcomp" conftest.dir
4425 cd conftest.dir
4426 # We will build objects and dependencies in a subdirectory because
4427 # it helps to detect inapplicable dependency modes. For instance
4428 # both Tru64's cc and ICC support -MD to output dependencies as a
4429 # side effect of compilation, but ICC will put the dependencies in
4430 # the current directory while Tru64 will put them in the object
4431 # directory.
4432 mkdir sub
4433
4434 am_cv_CC_dependencies_compiler_type=none
4435 if test "$am_compiler_list" = ""; then
4436 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4437 fi
4438 for depmode in $am_compiler_list; do
4439 if test $depmode = none; then break; fi
4440
81ecdfbb 4441 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4442 # Setup a source with many dependencies, because some compilers
4443 # like to wrap large dependency lists on column 80 (with \), and
4444 # we should not choose a depcomp mode which is confused by this.
4445 #
4446 # We need to recreate these files for each test, as the compiler may
4447 # overwrite some of them when testing with obscure command lines.
4448 # This happens at least with the AIX C compiler.
4449 : > sub/conftest.c
4450 for i in 1 2 3 4 5 6; do
4451 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4452 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4453 # Solaris 8's {/usr,}/bin/sh.
4454 touch sub/conftst$i.h
4455 done
4456 echo "include sub/conftest.Po" > confmf
4457
4458 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4459 # mode. It turns out that the SunPro C++ compiler does not properly
4460 # handle `-M -o', and we need to detect this.
4461 depcmd="depmode=$depmode \
4462 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4463 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4464 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4465 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4466 if env $depcmd > conftest.err 2>&1 &&
4467 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4468 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4469 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4470 # icc doesn't choke on unknown options, it will just issue warnings
4471 # or remarks (even with -Werror). So we grep stderr for any message
4472 # that says an option was ignored or not supported.
4473 # When given -MP, icc 7.0 and 7.1 complain thusly:
4474 # icc: Command line warning: ignoring option '-M'; no argument required
4475 # The diagnosis changed in icc 8.0:
4476 # icc: Command line remark: option '-MP' not supported
4477 if (grep 'ignoring option' conftest.err ||
4478 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4479 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4480 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4481 break
4482 fi
4483 fi
81ecdfbb 4484 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4485 sed -e 's/^/| /' < conftest.err >&5
4486 done
4487
4488 cd ..
4489 rm -rf conftest.dir
4490else
4491 am_cv_CC_dependencies_compiler_type=none
4492fi
4493
4494fi
81ecdfbb
RW
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4496$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4497if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4498then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4499else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4500
4501fi
4502
4503
4504# Check for the 'make' the user wants to use.
4505for ac_prog in make
4506do
4507 # Extract the first word of "$ac_prog", so it can be a program name with args.
4508set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510$as_echo_n "checking for $ac_word... " >&6; }
4511if test "${ac_cv_prog_MAKE+set}" = set; then :
4512 $as_echo_n "(cached) " >&6
a417dc56
RW
4513else
4514 if test -n "$MAKE"; then
4515 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4516else
4517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4522 for ac_exec_ext in '' $ac_executable_extensions; do
4523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4524 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4526 break 2
4527 fi
4528done
81ecdfbb
RW
4529 done
4530IFS=$as_save_IFS
a417dc56
RW
4531
4532fi
4533fi
4534MAKE=$ac_cv_prog_MAKE
4535if test -n "$MAKE"; then
81ecdfbb
RW
4536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4537$as_echo "$MAKE" >&6; }
a417dc56 4538else
81ecdfbb
RW
4539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
a417dc56
RW
4541fi
4542
81ecdfbb 4543
a417dc56
RW
4544 test -n "$MAKE" && break
4545done
4546
4547MAKE_IS_GNU=
4548case "`$MAKE --version 2>&1 | sed 1q`" in
4549 *GNU*)
4550 MAKE_IS_GNU=yes
4551 ;;
4552esac
81ecdfbb 4553 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4554 GMAKE_TRUE=
4555 GMAKE_FALSE='#'
4556else
4557 GMAKE_TRUE='#'
4558 GMAKE_FALSE=
4559fi
4560
81ecdfbb
RW
4561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4562$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4563set x ${MAKE-make}
4564ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4565if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4566 $as_echo_n "(cached) " >&6
a417dc56
RW
4567else
4568 cat >conftest.make <<\_ACEOF
81ecdfbb 4569SHELL = /bin/sh
a417dc56 4570all:
81ecdfbb 4571 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4572_ACEOF
4573# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4574case `${MAKE-make} -f conftest.make 2>/dev/null` in
4575 *@@@%%%=?*=@@@%%%*)
4576 eval ac_cv_prog_make_${ac_make}_set=yes;;
4577 *)
4578 eval ac_cv_prog_make_${ac_make}_set=no;;
4579esac
a417dc56
RW
4580rm -f conftest.make
4581fi
81ecdfbb
RW
4582if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4584$as_echo "yes" >&6; }
a417dc56
RW
4585 SET_MAKE=
4586else
81ecdfbb
RW
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4588$as_echo "no" >&6; }
a417dc56
RW
4589 SET_MAKE="MAKE=${MAKE-make}"
4590fi
4591
4592
c971b7fa
PA
4593# Configure gnulib. We need to build gnulib under some other
4594# directory not "gnulib", to avoid the problem of both GDB and
4595# GDBserver wanting to build it in the same directory, when building
4596# in the source dir.
783e057b 4597
c971b7fa
PA
4598 in_src="gnulib"
4599 in_build="build-gnulib"
4600
4601 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4602 # so they do not pile up.
4603 ac_sub_configure_args=
4604 ac_prev=
4605 eval "set x $ac_configure_args"
4606 shift
4607 for ac_arg
4608 do
4609 if test -n "$ac_prev"; then
4610 ac_prev=
4611 continue
4612 fi
4613 case $ac_arg in
4614 -cache-file | --cache-file | --cache-fil | --cache-fi \
4615 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4616 ac_prev=cache_file ;;
4617 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4618 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4619 | --c=*)
4620 ;;
4621 --config-cache | -C)
4622 ;;
4623 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4624 ac_prev=srcdir ;;
4625 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4626 ;;
4627 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4628 ac_prev=prefix ;;
4629 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4630 ;;
4631 --disable-option-checking)
4632 ;;
4633 *)
4634 case $ac_arg in
4635 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4636 esac
4637 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4638 esac
4639 done
4640
4641 # Always prepend --prefix to ensure using the same prefix
4642 # in subdir configurations.
4643 ac_arg="--prefix=$prefix"
4644 case $ac_arg in
4645 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4646 esac
4647 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4648
4649 # Pass --silent
4650 if test "$silent" = yes; then
4651 ac_sub_configure_args="--silent $ac_sub_configure_args"
4652 fi
4653
4654 # Always prepend --disable-option-checking to silence warnings, since
4655 # different subdirs can have different --enable and --with options.
4656 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4657
4658 ac_popdir=`pwd`
4659 ac_dir=$in_build
4660
4661 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4662 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4663 $as_echo "$ac_msg" >&6
4664 as_dir="$ac_dir"; as_fn_mkdir_p
4665
38ea300a
PA
4666 case $srcdir in
4667 [\\/]* | ?:[\\/]* )
4668 ac_srcdir=$srcdir/$in_src ;;
4669 *) # Relative name.
4670 ac_srcdir=../$srcdir/$in_src ;;
4671 esac
c971b7fa
PA
4672
4673 cd "$ac_dir"
4674
4675 ac_sub_configure=$ac_srcdir/configure
4676
4677 # Make the cache file name correct relative to the subdirectory.
4678 case $cache_file in
4679 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4680 *) # Relative name.
4681 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4682 esac
4683
4684 { $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
4685$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4686 # The eval makes quoting arguments work.
4687 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4688 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4689 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4690
4691 cd "$ac_popdir"
783e057b 4692
c971b7fa
PA
4693
4694
4695CONFIG_OBS=
4696CONFIG_DEPS=
4697CONFIG_SRCS=
4698ENABLE_CFLAGS=
4699
4700CONFIG_ALL=
4701CONFIG_CLEAN=
4702CONFIG_INSTALL=
4703CONFIG_UNINSTALL=
4704
4705# If we haven't got the data from the intl directory,
4706# assume NLS is disabled.
4707USE_NLS=no
4708LIBINTL=
4709LIBINTL_DEP=
4710INCINTL=
4711XGETTEXT=
4712GMSGFMT=
4713POSUB=
783e057b
DJ
4714
4715if test -f ../intl/config.intl; then
4716 . ../intl/config.intl
4717fi
81ecdfbb
RW
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4719$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4720if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
783e057b 4723else
81ecdfbb
RW
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4725$as_echo "yes" >&6; }
783e057b 4726
81ecdfbb 4727$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4728
4729
81ecdfbb
RW
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4731$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4732 # Look for .po and .gmo files in the source directory.
4733 CATALOGS=
4734 XLINGUAS=
4735 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4736 # If there aren't any .gmo files the shell will give us the
4737 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4738 # weeded out.
4739 case "$cat" in *\**)
4740 continue;;
4741 esac
4742 # The quadruple backslash is collapsed to a double backslash
4743 # by the backticks, then collapsed again by the double quotes,
4744 # leaving us with one backslash in the sed expression (right
4745 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4746 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4747 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4748 # The user is allowed to set LINGUAS to a list of languages to
4749 # install catalogs for. If it's empty that means "all of them."
4750 if test "x$LINGUAS" = x; then
4751 CATALOGS="$CATALOGS $cat"
4752 XLINGUAS="$XLINGUAS $lang"
4753 else
4754 case "$LINGUAS" in *$lang*)
4755 CATALOGS="$CATALOGS $cat"
4756 XLINGUAS="$XLINGUAS $lang"
4757 ;;
4758 esac
e28b3332
DJ
4759 fi
4760 done
c971b7fa
PA
4761 LINGUAS="$XLINGUAS"
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4763$as_echo "$LINGUAS" >&6; }
4764
4765
4766 DATADIRNAME=share
4767
4768 INSTOBJEXT=.mo
4769
4770 GENCAT=gencat
4771
4772 CATOBJEXT=.gmo
e28b3332 4773
e28b3332
DJ
4774fi
4775
c971b7fa
PA
4776localedir='${datadir}/locale'
4777
4778
4779if test x"$USE_NLS" = xyes; then
4780 CONFIG_ALL="$CONFIG_ALL all-po"
4781 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4782 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4783 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4784fi
e28b3332 4785
c971b7fa
PA
4786GNULIB=build-gnulib/import
4787
4788# For Makefile dependencies.
4789GNULIB_STDINT_H=
4790if test x"$STDINT_H" != x; then
4791 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4792fi
4793
4794
c971b7fa
PA
4795PACKAGE=gdb
4796
4797cat >>confdefs.h <<_ACEOF
4798#define PACKAGE "$PACKAGE"
4799_ACEOF
4800
4801
4802
4803# We never need to detect it in this sub-configure.
4804# But preserve it for config.status --recheck.
4805
4806
4807
4808MAKEINFO_EXTRA_FLAGS=""
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4810$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4811if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4812 $as_echo_n "(cached) " >&6
4813else
4814 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4815 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4816 gdb_cv_have_makeinfo_click=yes
4817 else
4818 gdb_cv_have_makeinfo_click=no
4819 fi
4820fi
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4822$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4823if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4824 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4825fi
e28b3332
DJ
4826
4827
bec39cab
AC
4828
4829
81ecdfbb
RW
4830# Check whether --with-separate-debug-dir was given.
4831if test "${with_separate_debug_dir+set}" = set; then :
4832 withval=$with_separate_debug_dir;
b14b1491
TT
4833 DEBUGDIR=$withval
4834else
4835 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4836fi
4837
20e95c23 4838
783e057b
DJ
4839 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4840 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4841 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4842 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4843
783e057b
DJ
4844cat >>confdefs.h <<_ACEOF
4845#define DEBUGDIR "$ac_define_dir"
20e95c23 4846_ACEOF
20e95c23 4847
20e95c23 4848
20e95c23 4849
0c4a4063 4850
b14b1491
TT
4851 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4852 if test "x$prefix" = xNONE; then
4853 test_prefix=/usr/local
4854 else
4855 test_prefix=$prefix
4856 fi
783e057b 4857 else
b14b1491 4858 test_prefix=$exec_prefix
783e057b 4859 fi
b14b1491
TT
4860 value=0
4861 case ${ac_define_dir} in
4862 "${test_prefix}"|"${test_prefix}/"*|\
4863 '${exec_prefix}'|'${exec_prefix}/'*)
4864 value=1
4865 ;;
4866 esac
4867
4868cat >>confdefs.h <<_ACEOF
4869#define DEBUGDIR_RELOCATABLE $value
4870_ACEOF
4871
4872
4873
0c4a4063 4874
f83d8a90
DE
4875# We can't pass paths as command line arguments.
4876# Mingw32 tries to be clever and will convert the paths for us.
4877# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4878# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4879# This breaks GDB's relocatable path conversions since paths passed in
4880# config.h would not get so translated, the path prefixes no longer match.
4881
4882 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4883 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4884 ac_define_dir=`eval echo $bindir`
4885 ac_define_dir=`eval echo $ac_define_dir`
4886
4887cat >>confdefs.h <<_ACEOF
4888#define BINDIR "$ac_define_dir"
4889_ACEOF
4890
4891
4892
b14b1491
TT
4893# GDB's datadir relocation
4894
4895
4896
81ecdfbb
RW
4897# Check whether --with-gdb-datadir was given.
4898if test "${with_gdb_datadir+set}" = set; then :
4899 withval=$with_gdb_datadir;
b14b1491 4900 GDB_DATADIR=$withval
20e95c23 4901else
b14b1491 4902 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4903fi
4904
20e95c23 4905
b14b1491
TT
4906 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4907 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4908 ac_define_dir=`eval echo $GDB_DATADIR`
4909 ac_define_dir=`eval echo $ac_define_dir`
4910
4911cat >>confdefs.h <<_ACEOF
4912#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4913_ACEOF
4914
b14b1491
TT
4915
4916
0c4a4063 4917
b14b1491
TT
4918 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4919 if test "x$prefix" = xNONE; then
4920 test_prefix=/usr/local
4921 else
4922 test_prefix=$prefix
4923 fi
4924 else
4925 test_prefix=$exec_prefix
4926 fi
4927 value=0
4928 case ${ac_define_dir} in
4929 "${test_prefix}"|"${test_prefix}/"*|\
4930 '${exec_prefix}'|'${exec_prefix}/'*)
4931 value=1
4932 ;;
4933 esac
4934
4935cat >>confdefs.h <<_ACEOF
4936#define GDB_DATADIR_RELOCATABLE $value
4937_ACEOF
4938
4939
783e057b 4940
20e95c23 4941
0c4a4063 4942
81ecdfbb
RW
4943# Check whether --with-relocated-sources was given.
4944if test "${with_relocated_sources+set}" = set; then :
4945 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4946
4947 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4948 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4949 ac_define_dir=`eval echo $reloc_srcdir`
4950 ac_define_dir=`eval echo $ac_define_dir`
4951
4952cat >>confdefs.h <<_ACEOF
4953#define RELOC_SRCDIR "$ac_define_dir"
4954_ACEOF
4955
4956
4957
81ecdfbb
RW
4958fi
4959
29b0e8a2 4960
bccbefd2
JK
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
4962$as_echo_n "checking for default auto-load safe-path... " >&6; }
4963
4964# Check whether --with-auto-load-safe-path was given.
4965if test "${with_auto_load_safe_path+set}" = set; then :
4966 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
4967 with_auto_load_safe_path=""
4968 fi
4969else
4970 with_auto_load_safe_path="$prefix"
4971fi
4972
4973
4974 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4975 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4976 ac_define_dir=`eval echo $with_auto_load_safe_path`
4977 ac_define_dir=`eval echo $ac_define_dir`
4978
4979cat >>confdefs.h <<_ACEOF
4980#define DEFAULT_AUTO_LOAD_SAFE_PATH "$ac_define_dir"
4981_ACEOF
4982
4983
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
4985$as_echo "$with_auto_load_safe_path" >&6; }
4986
29b0e8a2 4987
20e95c23 4988
5ae98d25 4989subdirs="$subdirs testsuite"
20e95c23
DJ
4990
4991
783e057b 4992# Check whether to support alternative target configurations
81ecdfbb
RW
4993# Check whether --enable-targets was given.
4994if test "${enable_targets+set}" = set; then :
4995 enableval=$enable_targets; case "${enableval}" in
4996 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
4997 ;;
4998 no) enable_targets= ;;
4999 *) enable_targets=$enableval ;;
5000esac
81ecdfbb
RW
5001fi
5002
20e95c23 5003
783e057b 5004# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5005# Check whether --enable-64-bit-bfd was given.
5006if test "${enable_64_bit_bfd+set}" = set; then :
5007 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5008 yes) want64=true ;;
5009 no) want64=false ;;
81ecdfbb 5010 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5011esac
5012else
5013 want64=false
81ecdfbb
RW
5014fi
5015
783e057b
DJ
5016# Provide defaults for some variables set by the per-host and per-target
5017# configuration.
5018gdb_host_obs=posix-hdep.o
20e95c23 5019
783e057b
DJ
5020if test "${target}" = "${host}"; then
5021 gdb_native=yes
5022else
5023 gdb_native=no
5024fi
20e95c23 5025
783e057b 5026. $srcdir/configure.host
20e95c23 5027
783e057b 5028# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5029
783e057b
DJ
5030TARGET_OBS=
5031all_targets=
20e95c23 5032
783e057b 5033for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5034do
783e057b
DJ
5035 if test "$targ_alias" = "all"; then
5036 all_targets=true
5037 else
5038 # Canonicalize the secondary target names.
5039 result=`$ac_config_sub $targ_alias 2>/dev/null`
5040 if test -n "$result"; then
5041 targ=$result
5042 else
5043 targ=$targ_alias
5044 fi
20e95c23 5045
783e057b 5046 . ${srcdir}/configure.tgt
20e95c23 5047
bf307134
JB
5048 if test -z "${gdb_target_obs}"; then :
5049 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5050fi
5051
783e057b
DJ
5052 # Target-specific object files
5053 for i in ${gdb_target_obs}; do
5054 case " $TARGET_OBS " in
5055 *" ${i} "*) ;;
5056 *)
5057 TARGET_OBS="$TARGET_OBS ${i}"
5058 ;;
5059 esac
5060 done
20e95c23 5061
783e057b
DJ
5062 # Check whether this target needs 64-bit CORE_ADDR
5063 if test x${want64} = xfalse; then
5064 . ${srcdir}/../bfd/config.bfd
5065 fi
5066 fi
20e95c23
DJ
5067done
5068
783e057b
DJ
5069if test x${all_targets} = xtrue; then
5070
5071 # We want all 64-bit targets if we either:
5072 # - run on a 64-bit host or
5073 # - already require 64-bit support for some other target or
5074 # - the --enable-64-bit-bfd option was supplied
5075 # Otherwise we only support all 32-bit targets.
5076 #
5077 # NOTE: This test must be in sync with the corresponding
5078 # tests in BFD!
20e95c23 5079
783e057b 5080 if test x${want64} = xfalse; then
81ecdfbb
RW
5081 # The cast to long int works around a bug in the HP C Compiler
5082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5084# This bug is HP SR number 8606223364.
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5086$as_echo_n "checking size of long... " >&6; }
5087if test "${ac_cv_sizeof_long+set}" = set; then :
5088 $as_echo_n "(cached) " >&6
c0993dbe 5089else
81ecdfbb 5090 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5091
81ecdfbb
RW
5092else
5093 if test "$ac_cv_type_long" = yes; then
5094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5096{ as_fn_set_status 77
5097as_fn_error "cannot compute sizeof (long)
5098See \`config.log' for more details." "$LINENO" 5; }; }
5099 else
5100 ac_cv_sizeof_long=0
5101 fi
c0993dbe 5102fi
81ecdfbb 5103
c0993dbe 5104fi
81ecdfbb
RW
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5106$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5107
c0993dbe 5108
c0993dbe 5109
c0993dbe
UW
5110cat >>confdefs.h <<_ACEOF
5111#define SIZEOF_LONG $ac_cv_sizeof_long
5112_ACEOF
5113
5114
5115 if test "x${ac_cv_sizeof_long}" = "x8"; then
5116 want64=true
5117 fi
5118 fi
5119 if test x${want64} = xtrue; then
5120 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5121 else
5122 TARGET_OBS='$(ALL_TARGET_OBS)'
5123 fi
5124fi
5125
5126
5127
5128# For other settings, only the main target counts.
5129gdb_sim=
5130gdb_osabi=
5131build_gdbserver=
5132targ=$target; . ${srcdir}/configure.tgt
5133
5134# Fetch the default architecture and default target vector from BFD.
5135targ=$target; . $srcdir/../bfd/config.bfd
5136
5137# We only want the first architecture, so strip off the others if
5138# there is more than one.
5139targ_archs=`echo $targ_archs | sed 's/ .*//'`
5140
5141if test "x$targ_archs" != x; then
5142
5143cat >>confdefs.h <<_ACEOF
5144#define DEFAULT_BFD_ARCH $targ_archs
5145_ACEOF
5146
5147fi
5148if test "x$targ_defvec" != x; then
5149
5150cat >>confdefs.h <<_ACEOF
5151#define DEFAULT_BFD_VEC $targ_defvec
5152_ACEOF
5153
5154fi
5155
c0993dbe
UW
5156# The CLI cannot be disabled yet, but may be in the future.
5157
5158# Enable CLI.
81ecdfbb
RW
5159# Check whether --enable-gdbcli was given.
5160if test "${enable_gdbcli+set}" = set; then :
5161 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5162 yes)
5163 ;;
5164 no)
81ecdfbb 5165 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5166 *)
81ecdfbb 5167 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5168 esac
5169else
5170 enable_gdbcli=yes
81ecdfbb
RW
5171fi
5172
c0993dbe
UW
5173if test x"$enable_gdbcli" = xyes; then
5174 if test -d $srcdir/cli; then
5175 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5176 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5177 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5178 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5179 fi
5180fi
5181
5182# Enable MI.
81ecdfbb
RW
5183# Check whether --enable-gdbmi was given.
5184if test "${enable_gdbmi+set}" = set; then :
5185 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5186 yes | no)
5187 ;;
5188 *)
81ecdfbb 5189 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5190 esac
5191else
5192 enable_gdbmi=yes
81ecdfbb
RW
5193fi
5194
c0993dbe
UW
5195if test x"$enable_gdbmi" = xyes; then
5196 if test -d $srcdir/mi; then
5197 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5198 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5199 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5200 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5201 fi
5202fi
5203
5204# Enable TUI.
81ecdfbb
RW
5205# Check whether --enable-tui was given.
5206if test "${enable_tui+set}" = set; then :
5207 enableval=$enable_tui; case $enableval in
3ca64bd3 5208 yes | no | auto)
c0993dbe
UW
5209 ;;
5210 *)
81ecdfbb 5211 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5212 esac
5213else
3ca64bd3 5214 enable_tui=auto
81ecdfbb
RW
5215fi
5216
c0993dbe
UW
5217
5218# Enable gdbtk.
81ecdfbb
RW
5219# Check whether --enable-gdbtk was given.
5220if test "${enable_gdbtk+set}" = set; then :
5221 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5222 yes | no)
5223 ;;
5224 *)
81ecdfbb 5225 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5226 esac
5227else
5062cc19 5228 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5229 enable_gdbtk=yes
5230 else
5231 enable_gdbtk=no
5232 fi
81ecdfbb
RW
5233fi
5234
c0993dbe
UW
5235# We unconditionally disable gdbtk tests on selected platforms.
5236case $host_os in
5237 go32* | windows*)
81ecdfbb
RW
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5239$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5240 enable_gdbtk=no ;;
5241esac
5242
05e7c244 5243# Libunwind support for ia64.
bec39cab 5244
05e7c244
JK
5245
5246# Check whether --with-libunwind-ia64 was given.
5247if test "${with_libunwind_ia64+set}" = set; then :
5248 withval=$with_libunwind_ia64;
bec39cab 5249else
05e7c244
JK
5250 with_libunwind_ia64=auto
5251fi
bec39cab 5252
05e7c244
JK
5253
5254# Backward compatibility option.
5255if test "${with_libunwind+set}" = set; then
5256 if test x"$with_libunwind_ia64" != xauto; then
5257 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5258 fi
5259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5260$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5261 with_libunwind_ia64="$with_libunwind"
5262fi
5263
5264case "$with_libunwind_ia64" in
5265 yes | no)
5266 ;;
5267 auto)
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 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5281 ;;
5282 *)
5283 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5284 ;;
5285esac
bec39cab 5286
05e7c244 5287if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5288 for ac_header in libunwind-ia64.h
81ecdfbb 5289do :
b54a8fd7
PA
5290 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5291if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5292 cat >>confdefs.h <<_ACEOF
b54a8fd7 5293#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5294_ACEOF
5295
5296fi
5297
5298done
5299
05e7c244
JK
5300 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5301 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5302 fi
5303 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5304 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5305 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5306fi
5307
cb01cfba
JB
5308opt_curses=no
5309
81ecdfbb
RW
5310# Check whether --with-curses was given.
5311if test "${with_curses+set}" = set; then :
5312 withval=$with_curses; opt_curses=$withval
5313fi
5314
cb01cfba 5315
76a39ba7 5316prefer_curses=no
cb01cfba 5317if test "$opt_curses" = "yes"; then
76a39ba7 5318 prefer_curses=yes
cb01cfba
JB
5319fi
5320
a9322a30 5321# Profiling support.
81ecdfbb
RW
5322# Check whether --enable-profiling was given.
5323if test "${enable_profiling+set}" = set; then :
5324 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5325 yes | no)
5326 ;;
5327 *)
81ecdfbb 5328 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5329 esac
5330else
5331 enable_profiling=no
81ecdfbb 5332fi
bec39cab 5333
a9322a30
TT
5334
5335for ac_func in monstartup _mcleanup
81ecdfbb
RW
5336do :
5337 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5338ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5339eval as_val=\$$as_ac_var
5340 if test "x$as_val" = x""yes; then :
5341 cat >>confdefs.h <<_ACEOF
5342#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5343_ACEOF
a9322a30 5344
81ecdfbb
RW
5345fi
5346done
a9322a30 5347
81ecdfbb
RW
5348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5349$as_echo_n "checking for _etext... " >&6; }
5350if test "${ac_cv_var__etext+set}" = set; then :
5351 $as_echo_n "(cached) " >&6
5352else
5353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354/* end confdefs.h. */
5355#include <stdlib.h>
5356extern char _etext;
a9322a30
TT
5357
5358int
5359main ()
5360{
5361free (&_etext);
5362 ;
5363 return 0;
5364}
bec39cab 5365_ACEOF
81ecdfbb 5366if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5367 ac_cv_var__etext=yes
bec39cab 5368else
81ecdfbb 5369 ac_cv_var__etext=no
bec39cab 5370fi
81ecdfbb
RW
5371rm -f core conftest.err conftest.$ac_objext \
5372 conftest$ac_exeext conftest.$ac_ext
bec39cab 5373fi
81ecdfbb
RW
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5375$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5376if test $ac_cv_var__etext = yes; then
60ca704f 5377
81ecdfbb 5378$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5379
bec39cab 5380fi
81ecdfbb
RW
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5382$as_echo_n "checking for etext... " >&6; }
5383if test "${ac_cv_var_etext+set}" = set; then :
5384 $as_echo_n "(cached) " >&6
bec39cab 5385else
81ecdfbb 5386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5387/* end confdefs.h. */
a9322a30
TT
5388#include <stdlib.h>
5389extern char etext;
bec39cab
AC
5390
5391int
5392main ()
5393{
a9322a30 5394free (&etext);
bec39cab
AC
5395 ;
5396 return 0;
5397}
5398_ACEOF
81ecdfbb 5399if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5400 ac_cv_var_etext=yes
bec39cab 5401else
81ecdfbb 5402 ac_cv_var_etext=no
bec39cab 5403fi
81ecdfbb
RW
5404rm -f core conftest.err conftest.$ac_objext \
5405 conftest$ac_exeext conftest.$ac_ext
bec39cab 5406fi
81ecdfbb
RW
5407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5408$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5409if test $ac_cv_var_etext = yes; then
5410
81ecdfbb 5411$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5412
5413fi
a9322a30
TT
5414if test "$enable_profiling" = yes ; then
5415 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5416 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5417 fi
5418 PROFILE_CFLAGS=-pg
5419 OLD_CFLAGS="$CFLAGS"
5420 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5421
81ecdfbb
RW
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5423$as_echo_n "checking whether $CC supports -pg... " >&6; }
5424if test "${ac_cv_cc_supports_pg+set}" = set; then :
5425 $as_echo_n "(cached) " >&6
bec39cab 5426else
81ecdfbb 5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5428/* end confdefs.h. */
bec39cab
AC
5429
5430int
5431main ()
5432{
a9322a30 5433int x;
bec39cab
AC
5434 ;
5435 return 0;
5436}
5437_ACEOF
81ecdfbb 5438if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5439 ac_cv_cc_supports_pg=yes
bec39cab 5440else
81ecdfbb 5441 ac_cv_cc_supports_pg=no
bec39cab 5442fi
81ecdfbb 5443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5444fi
81ecdfbb
RW
5445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5446$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5447
a9322a30 5448 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5449 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5450 fi
bec39cab 5451
a9322a30 5452 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5453fi
5454
c16158bc
JM
5455
5456
81ecdfbb
RW
5457# Check whether --with-pkgversion was given.
5458if test "${with_pkgversion+set}" = set; then :
5459 withval=$with_pkgversion; case "$withval" in
5460 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5461 no) PKGVERSION= ;;
5462 *) PKGVERSION="($withval) " ;;
5463 esac
5464else
5465 PKGVERSION="(GDB) "
5466
81ecdfbb 5467fi
c16158bc
JM
5468
5469
5470
5471
81ecdfbb
RW
5472
5473# Check whether --with-bugurl was given.
5474if test "${with_bugurl+set}" = set; then :
5475 withval=$with_bugurl; case "$withval" in
5476 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5477 no) BUGURL=
5478 ;;
5479 *) BUGURL="$withval"
5480 ;;
5481 esac
5482else
5483 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5484
81ecdfbb
RW
5485fi
5486
c16158bc
JM
5487 case ${BUGURL} in
5488 "")
5489 REPORT_BUGS_TO=
5490 REPORT_BUGS_TEXI=
5491 ;;
5492 *)
5493 REPORT_BUGS_TO="<$BUGURL>"
5494 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5495 ;;
5496 esac;
5497
5498
5499
5500
5501cat >>confdefs.h <<_ACEOF
5502#define PKGVERSION "$PKGVERSION"
5503_ACEOF
5504
5505
5506cat >>confdefs.h <<_ACEOF
5507#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5508_ACEOF
5509
5510
bec39cab
AC
5511# --------------------- #
5512# Checks for programs. #
5513# --------------------- #
5514
5515for ac_prog in gawk mawk nawk awk
5516do
5517 # Extract the first word of "$ac_prog", so it can be a program name with args.
5518set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5520$as_echo_n "checking for $ac_word... " >&6; }
5521if test "${ac_cv_prog_AWK+set}" = set; then :
5522 $as_echo_n "(cached) " >&6
bec39cab
AC
5523else
5524 if test -n "$AWK"; then
5525 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5526else
5527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5528for as_dir in $PATH
5529do
5530 IFS=$as_save_IFS
5531 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5532 for ac_exec_ext in '' $ac_executable_extensions; do
5533 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5534 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5536 break 2
5537 fi
5538done
81ecdfbb
RW
5539 done
5540IFS=$as_save_IFS
bec39cab
AC
5541
5542fi
5543fi
5544AWK=$ac_cv_prog_AWK
5545if test -n "$AWK"; then
81ecdfbb
RW
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5547$as_echo "$AWK" >&6; }
bec39cab 5548else
81ecdfbb
RW
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5550$as_echo "no" >&6; }
bec39cab
AC
5551fi
5552
bec39cab 5553
81ecdfbb 5554 test -n "$AWK" && break
bec39cab
AC
5555done
5556
c971b7fa
PA
5557# Find a good install program. We prefer a C program (faster),
5558# so one script is as good as another. But avoid the broken or
5559# incompatible versions:
5560# SysV /etc/install, /usr/sbin/install
5561# SunOS /usr/etc/install
5562# IRIX /sbin/install
5563# AIX /bin/install
5564# AmigaOS /C/install, which installs bootblocks on floppy discs
5565# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5566# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5567# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5568# OS/2's system install, which has a completely different semantic
5569# ./install, which can be erroneously created by make from ./install.sh.
5570# Reject install programs that cannot install multiple files.
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5572$as_echo_n "checking for a BSD-compatible install... " >&6; }
5573if test -z "$INSTALL"; then
5574if test "${ac_cv_path_install+set}" = set; then :
5575 $as_echo_n "(cached) " >&6
5576else
5577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578for as_dir in $PATH
5579do
5580 IFS=$as_save_IFS
5581 test -z "$as_dir" && as_dir=.
5582 # Account for people who put trailing slashes in PATH elements.
5583case $as_dir/ in #((
5584 ./ | .// | /[cC]/* | \
5585 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5586 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5587 /usr/ucb/* ) ;;
5588 *)
5589 # OSF1 and SCO ODT 3.0 have their own names for install.
5590 # Don't use installbsd from OSF since it installs stuff as root
5591 # by default.
5592 for ac_prog in ginstall scoinst install; do
5593 for ac_exec_ext in '' $ac_executable_extensions; do
5594 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5595 if test $ac_prog = install &&
5596 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5597 # AIX install. It has an incompatible calling convention.
5598 :
5599 elif test $ac_prog = install &&
5600 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5601 # program-specific install script used by HP pwplus--don't use.
5602 :
5603 else
5604 rm -rf conftest.one conftest.two conftest.dir
5605 echo one > conftest.one
5606 echo two > conftest.two
5607 mkdir conftest.dir
5608 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5609 test -s conftest.one && test -s conftest.two &&
5610 test -s conftest.dir/conftest.one &&
5611 test -s conftest.dir/conftest.two
5612 then
5613 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5614 break 3
5615 fi
5616 fi
5617 fi
5618 done
5619 done
5620 ;;
5621esac
5622
5623 done
5624IFS=$as_save_IFS
5625
5626rm -rf conftest.one conftest.two conftest.dir
5627
5628fi
5629 if test "${ac_cv_path_install+set}" = set; then
5630 INSTALL=$ac_cv_path_install
5631 else
5632 # As a last resort, use the slow shell script. Don't cache a
5633 # value for INSTALL within a source directory, because that will
5634 # break other packages using the cache if that directory is
5635 # removed, or if the value is a relative name.
5636 INSTALL=$ac_install_sh
5637 fi
5638fi
5639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5640$as_echo "$INSTALL" >&6; }
5641
5642# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5643# It thinks the first close brace ends the variable substitution.
5644test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5645
5646test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5647
5648test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5649
81ecdfbb
RW
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5651$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5652LN_S=$as_ln_s
5653if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5655$as_echo "yes" >&6; }
bec39cab 5656else
81ecdfbb
RW
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5658$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5659fi
5660
5661if test -n "$ac_tool_prefix"; then
5662 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5663set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5665$as_echo_n "checking for $ac_word... " >&6; }
5666if test "${ac_cv_prog_RANLIB+set}" = set; then :
5667 $as_echo_n "(cached) " >&6
bec39cab
AC
5668else
5669 if test -n "$RANLIB"; then
5670 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5671else
5672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675 IFS=$as_save_IFS
5676 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5677 for ac_exec_ext in '' $ac_executable_extensions; do
5678 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5679 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5681 break 2
5682 fi
5683done
81ecdfbb
RW
5684 done
5685IFS=$as_save_IFS
bec39cab
AC
5686
5687fi
5688fi
5689RANLIB=$ac_cv_prog_RANLIB
5690if test -n "$RANLIB"; then
81ecdfbb
RW
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5692$as_echo "$RANLIB" >&6; }
bec39cab 5693else
81ecdfbb
RW
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695$as_echo "no" >&6; }
bec39cab
AC
5696fi
5697
81ecdfbb 5698
bec39cab
AC
5699fi
5700if test -z "$ac_cv_prog_RANLIB"; then
5701 ac_ct_RANLIB=$RANLIB
5702 # Extract the first word of "ranlib", so it can be a program name with args.
5703set dummy ranlib; ac_word=$2
81ecdfbb
RW
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5705$as_echo_n "checking for $ac_word... " >&6; }
5706if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5707 $as_echo_n "(cached) " >&6
bec39cab
AC
5708else
5709 if test -n "$ac_ct_RANLIB"; then
5710 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5711else
5712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715 IFS=$as_save_IFS
5716 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5717 for ac_exec_ext in '' $ac_executable_extensions; do
5718 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5719 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5721 break 2
5722 fi
5723done
81ecdfbb
RW
5724 done
5725IFS=$as_save_IFS
bec39cab 5726
bec39cab
AC
5727fi
5728fi
5729ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5730if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5732$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5733else
81ecdfbb
RW
5734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
bec39cab
AC
5736fi
5737
81ecdfbb
RW
5738 if test "x$ac_ct_RANLIB" = x; then
5739 RANLIB=":"
5740 else
5741 case $cross_compiling:$ac_tool_warned in
5742yes:)
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5745ac_tool_warned=yes ;;
5746esac
5747 RANLIB=$ac_ct_RANLIB
5748 fi
bec39cab
AC
5749else
5750 RANLIB="$ac_cv_prog_RANLIB"
5751fi
5752
5753for ac_prog in 'bison -y' byacc
5754do
5755 # Extract the first word of "$ac_prog", so it can be a program name with args.
5756set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if test "${ac_cv_prog_YACC+set}" = set; then :
5760 $as_echo_n "(cached) " >&6
bec39cab
AC
5761else
5762 if test -n "$YACC"; then
5763 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5764else
5765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766for as_dir in $PATH
5767do
5768 IFS=$as_save_IFS
5769 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5770 for ac_exec_ext in '' $ac_executable_extensions; do
5771 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5772 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5774 break 2
5775 fi
5776done
81ecdfbb
RW
5777 done
5778IFS=$as_save_IFS
bec39cab
AC
5779
5780fi
5781fi
5782YACC=$ac_cv_prog_YACC
5783if test -n "$YACC"; then
81ecdfbb
RW
5784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5785$as_echo "$YACC" >&6; }
bec39cab 5786else
81ecdfbb
RW
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
bec39cab
AC
5789fi
5790
81ecdfbb 5791
bec39cab
AC
5792 test -n "$YACC" && break
5793done
5794test -n "$YACC" || YACC="yacc"
5795
5796
5797if test -n "$ac_tool_prefix"; then
5798 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5799set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5801$as_echo_n "checking for $ac_word... " >&6; }
5802if test "${ac_cv_prog_AR+set}" = set; then :
5803 $as_echo_n "(cached) " >&6
bec39cab
AC
5804else
5805 if test -n "$AR"; then
5806 ac_cv_prog_AR="$AR" # Let the user override the test.
5807else
5808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809for as_dir in $PATH
5810do
5811 IFS=$as_save_IFS
5812 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5813 for ac_exec_ext in '' $ac_executable_extensions; do
5814 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5815 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5817 break 2
5818 fi
5819done
81ecdfbb
RW
5820 done
5821IFS=$as_save_IFS
bec39cab
AC
5822
5823fi
5824fi
5825AR=$ac_cv_prog_AR
5826if test -n "$AR"; then
81ecdfbb
RW
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5828$as_echo "$AR" >&6; }
bec39cab 5829else
81ecdfbb
RW
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831$as_echo "no" >&6; }
bec39cab
AC
5832fi
5833
81ecdfbb 5834
bec39cab
AC
5835fi
5836if test -z "$ac_cv_prog_AR"; then
5837 ac_ct_AR=$AR
5838 # Extract the first word of "ar", so it can be a program name with args.
5839set dummy ar; ac_word=$2
81ecdfbb
RW
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5843 $as_echo_n "(cached) " >&6
bec39cab
AC
5844else
5845 if test -n "$ac_ct_AR"; then
5846 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5847else
5848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5853 for ac_exec_ext in '' $ac_executable_extensions; do
5854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5855 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5857 break 2
5858 fi
5859done
81ecdfbb
RW
5860 done
5861IFS=$as_save_IFS
bec39cab
AC
5862
5863fi
5864fi
5865ac_ct_AR=$ac_cv_prog_ac_ct_AR
5866if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5868$as_echo "$ac_ct_AR" >&6; }
bec39cab 5869else
81ecdfbb
RW
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
bec39cab
AC
5872fi
5873
81ecdfbb
RW
5874 if test "x$ac_ct_AR" = x; then
5875 AR=""
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 AR=$ac_ct_AR
5884 fi
bec39cab
AC
5885else
5886 AR="$ac_cv_prog_AR"
5887fi
5888
5889if test -n "$ac_tool_prefix"; then
5890 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5891set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5895 $as_echo_n "(cached) " >&6
bec39cab
AC
5896else
5897 if test -n "$DLLTOOL"; then
5898 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5899else
5900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901for as_dir in $PATH
5902do
5903 IFS=$as_save_IFS
5904 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5905 for ac_exec_ext in '' $ac_executable_extensions; do
5906 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5907 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5909 break 2
5910 fi
5911done
81ecdfbb
RW
5912 done
5913IFS=$as_save_IFS
bec39cab
AC
5914
5915fi
5916fi
5917DLLTOOL=$ac_cv_prog_DLLTOOL
5918if test -n "$DLLTOOL"; then
81ecdfbb
RW
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5920$as_echo "$DLLTOOL" >&6; }
bec39cab 5921else
81ecdfbb
RW
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923$as_echo "no" >&6; }
bec39cab
AC
5924fi
5925
81ecdfbb 5926
bec39cab
AC
5927fi
5928if test -z "$ac_cv_prog_DLLTOOL"; then
5929 ac_ct_DLLTOOL=$DLLTOOL
5930 # Extract the first word of "dlltool", so it can be a program name with args.
5931set dummy dlltool; ac_word=$2
81ecdfbb
RW
5932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933$as_echo_n "checking for $ac_word... " >&6; }
5934if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5935 $as_echo_n "(cached) " >&6
bec39cab
AC
5936else
5937 if test -n "$ac_ct_DLLTOOL"; then
5938 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5939else
5940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943 IFS=$as_save_IFS
5944 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5945 for ac_exec_ext in '' $ac_executable_extensions; do
5946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5947 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 5948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5949 break 2
5950 fi
5951done
81ecdfbb
RW
5952 done
5953IFS=$as_save_IFS
bec39cab
AC
5954
5955fi
5956fi
5957ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5958if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5960$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 5961else
81ecdfbb
RW
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
bec39cab
AC
5964fi
5965
81ecdfbb
RW
5966 if test "x$ac_ct_DLLTOOL" = x; then
5967 DLLTOOL=""
5968 else
5969 case $cross_compiling:$ac_tool_warned in
5970yes:)
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5973ac_tool_warned=yes ;;
5974esac
5975 DLLTOOL=$ac_ct_DLLTOOL
5976 fi
bec39cab
AC
5977else
5978 DLLTOOL="$ac_cv_prog_DLLTOOL"
5979fi
5980
5981if test -n "$ac_tool_prefix"; then
5982 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
5983set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if test "${ac_cv_prog_WINDRES+set}" = set; then :
5987 $as_echo_n "(cached) " >&6
bec39cab
AC
5988else
5989 if test -n "$WINDRES"; then
5990 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5991else
5992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995 IFS=$as_save_IFS
5996 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5997 for ac_exec_ext in '' $ac_executable_extensions; do
5998 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5999 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6001 break 2
6002 fi
6003done
81ecdfbb
RW
6004 done
6005IFS=$as_save_IFS
bec39cab
AC
6006
6007fi
6008fi
6009WINDRES=$ac_cv_prog_WINDRES
6010if test -n "$WINDRES"; then
81ecdfbb
RW
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6012$as_echo "$WINDRES" >&6; }
bec39cab 6013else
81ecdfbb
RW
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
bec39cab
AC
6016fi
6017
81ecdfbb 6018
bec39cab
AC
6019fi
6020if test -z "$ac_cv_prog_WINDRES"; then
6021 ac_ct_WINDRES=$WINDRES
6022 # Extract the first word of "windres", so it can be a program name with args.
6023set dummy windres; ac_word=$2
81ecdfbb
RW
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6025$as_echo_n "checking for $ac_word... " >&6; }
6026if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6027 $as_echo_n "(cached) " >&6
bec39cab
AC
6028else
6029 if test -n "$ac_ct_WINDRES"; then
6030 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6031else
6032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6033for as_dir in $PATH
6034do
6035 IFS=$as_save_IFS
6036 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6037 for ac_exec_ext in '' $ac_executable_extensions; do
6038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6039 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6041 break 2
6042 fi
6043done
81ecdfbb
RW
6044 done
6045IFS=$as_save_IFS
bec39cab
AC
6046
6047fi
6048fi
6049ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6050if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6052$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6053else
81ecdfbb
RW
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
c906108c 6056fi
bec39cab 6057
81ecdfbb
RW
6058 if test "x$ac_ct_WINDRES" = x; then
6059 WINDRES=""
6060 else
6061 case $cross_compiling:$ac_tool_warned in
6062yes:)
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6065ac_tool_warned=yes ;;
6066esac
6067 WINDRES=$ac_ct_WINDRES
6068 fi
c906108c 6069else
bec39cab 6070 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6071fi
6072
bec39cab
AC
6073
6074# Needed for GNU/Hurd.
6075if test -n "$ac_tool_prefix"; then
6076 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6077set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6079$as_echo_n "checking for $ac_word... " >&6; }
6080if test "${ac_cv_prog_MIG+set}" = set; then :
6081 $as_echo_n "(cached) " >&6
c906108c 6082else
bec39cab
AC
6083 if test -n "$MIG"; then
6084 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6085else
6086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6087for as_dir in $PATH
6088do
6089 IFS=$as_save_IFS
6090 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6091 for ac_exec_ext in '' $ac_executable_extensions; do
6092 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6093 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6095 break 2
6096 fi
6097done
81ecdfbb
RW
6098 done
6099IFS=$as_save_IFS
bec39cab 6100
c906108c 6101fi
bec39cab
AC
6102fi
6103MIG=$ac_cv_prog_MIG
6104if test -n "$MIG"; then
81ecdfbb
RW
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6106$as_echo "$MIG" >&6; }
c906108c 6107else
81ecdfbb
RW
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6109$as_echo "no" >&6; }
c906108c
SS
6110fi
6111
81ecdfbb 6112
bec39cab
AC
6113fi
6114if test -z "$ac_cv_prog_MIG"; then
6115 ac_ct_MIG=$MIG
6116 # Extract the first word of "mig", so it can be a program name with args.
6117set dummy mig; ac_word=$2
81ecdfbb
RW
6118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6119$as_echo_n "checking for $ac_word... " >&6; }
6120if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6121 $as_echo_n "(cached) " >&6
bec39cab
AC
6122else
6123 if test -n "$ac_ct_MIG"; then
6124 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6125else
6126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6127for as_dir in $PATH
6128do
6129 IFS=$as_save_IFS
6130 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6131 for ac_exec_ext in '' $ac_executable_extensions; do
6132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6133 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6135 break 2
6136 fi
6137done
81ecdfbb
RW
6138 done
6139IFS=$as_save_IFS
c906108c 6140
bec39cab
AC
6141fi
6142fi
6143ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6144if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6146$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6147else
81ecdfbb
RW
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6149$as_echo "no" >&6; }
bec39cab 6150fi
c906108c 6151
81ecdfbb
RW
6152 if test "x$ac_ct_MIG" = x; then
6153 MIG=""
6154 else
6155 case $cross_compiling:$ac_tool_warned in
6156yes:)
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6159ac_tool_warned=yes ;;
6160esac
6161 MIG=$ac_ct_MIG
6162 fi
bec39cab
AC
6163else
6164 MIG="$ac_cv_prog_MIG"
6165fi
c906108c 6166
c906108c 6167
bec39cab
AC
6168# ---------------------- #
6169# Checks for libraries. #
6170# ---------------------- #
c906108c 6171
bec39cab 6172# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6174$as_echo_n "checking for main in -lm... " >&6; }
6175if test "${ac_cv_lib_m_main+set}" = set; then :
6176 $as_echo_n "(cached) " >&6
bec39cab
AC
6177else
6178 ac_check_lib_save_LIBS=$LIBS
6179LIBS="-lm $LIBS"
81ecdfbb 6180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6181/* end confdefs.h. */
c906108c 6182
c906108c 6183
bec39cab
AC
6184int
6185main ()
6186{
81ecdfbb 6187return main ();
bec39cab
AC
6188 ;
6189 return 0;
6190}
6191_ACEOF
81ecdfbb 6192if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6193 ac_cv_lib_m_main=yes
6194else
81ecdfbb 6195 ac_cv_lib_m_main=no
bec39cab 6196fi
81ecdfbb
RW
6197rm -f core conftest.err conftest.$ac_objext \
6198 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6199LIBS=$ac_check_lib_save_LIBS
6200fi
81ecdfbb
RW
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6202$as_echo "$ac_cv_lib_m_main" >&6; }
6203if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6204 cat >>confdefs.h <<_ACEOF
6205#define HAVE_LIBM 1
6206_ACEOF
6207
6208 LIBS="-lm $LIBS"
c906108c 6209
c906108c 6210fi
bec39cab
AC
6211
6212
6213# We need to link with -lw to get `wctype' on Solaris before Solaris
6214# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6215# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6216# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6217ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6218if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6219
c906108c 6220else
81ecdfbb
RW
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6222$as_echo_n "checking for wctype in -lw... " >&6; }
6223if test "${ac_cv_lib_w_wctype+set}" = set; then :
6224 $as_echo_n "(cached) " >&6
bec39cab
AC
6225else
6226 ac_check_lib_save_LIBS=$LIBS
6227LIBS="-lw $LIBS"
81ecdfbb 6228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6229/* end confdefs.h. */
c906108c 6230
81ecdfbb
RW
6231/* Override any GCC internal prototype to avoid an error.
6232 Use char because int might match the return type of a GCC
6233 builtin and then its argument prototype would still apply. */
bec39cab
AC
6234#ifdef __cplusplus
6235extern "C"
6236#endif
bec39cab
AC
6237char wctype ();
6238int
6239main ()
6240{
81ecdfbb 6241return wctype ();
bec39cab
AC
6242 ;
6243 return 0;
6244}
6245_ACEOF
81ecdfbb 6246if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6247 ac_cv_lib_w_wctype=yes
6248else
81ecdfbb 6249 ac_cv_lib_w_wctype=no
bec39cab 6250fi
81ecdfbb
RW
6251rm -f core conftest.err conftest.$ac_objext \
6252 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6253LIBS=$ac_check_lib_save_LIBS
6254fi
81ecdfbb
RW
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6256$as_echo "$ac_cv_lib_w_wctype" >&6; }
6257if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6258 cat >>confdefs.h <<_ACEOF
6259#define HAVE_LIBW 1
6260_ACEOF
c906108c 6261
bec39cab 6262 LIBS="-lw $LIBS"
c906108c 6263
bec39cab 6264fi
c906108c 6265
bec39cab 6266fi
c906108c 6267
ddc9cd0f 6268
bec39cab 6269# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6271$as_echo_n "checking for library containing gethostbyname... " >&6; }
6272if test "${ac_cv_search_gethostbyname+set}" = set; then :
6273 $as_echo_n "(cached) " >&6
bec39cab
AC
6274else
6275 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6277/* end confdefs.h. */
ddc9cd0f 6278
81ecdfbb
RW
6279/* Override any GCC internal prototype to avoid an error.
6280 Use char because int might match the return type of a GCC
6281 builtin and then its argument prototype would still apply. */
bec39cab
AC
6282#ifdef __cplusplus
6283extern "C"
6284#endif
bec39cab
AC
6285char gethostbyname ();
6286int
6287main ()
6288{
81ecdfbb 6289return gethostbyname ();
bec39cab
AC
6290 ;
6291 return 0;
6292}
6293_ACEOF
81ecdfbb
RW
6294for ac_lib in '' nsl; do
6295 if test -z "$ac_lib"; then
6296 ac_res="none required"
6297 else
6298 ac_res=-l$ac_lib
b4e70030 6299 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6300 fi
6301 if ac_fn_c_try_link "$LINENO"; then :
6302 ac_cv_search_gethostbyname=$ac_res
6303fi
6304rm -f core conftest.err conftest.$ac_objext \
6305 conftest$ac_exeext
6306 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6307 break
6308fi
6309done
6310if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6311
bec39cab 6312else
81ecdfbb 6313 ac_cv_search_gethostbyname=no
bec39cab 6314fi
81ecdfbb 6315rm conftest.$ac_ext
bec39cab
AC
6316LIBS=$ac_func_search_save_LIBS
6317fi
81ecdfbb
RW
6318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6319$as_echo "$ac_cv_search_gethostbyname" >&6; }
6320ac_res=$ac_cv_search_gethostbyname
6321if test "$ac_res" != no; then :
6322 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6323
bec39cab 6324fi
96baa820 6325
c906108c 6326
b4e70030 6327# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6329$as_echo_n "checking for library containing socketpair... " >&6; }
6330if test "${ac_cv_search_socketpair+set}" = set; then :
6331 $as_echo_n "(cached) " >&6
b4e70030
JB
6332else
6333 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6335/* end confdefs.h. */
6336
81ecdfbb
RW
6337/* Override any GCC internal prototype to avoid an error.
6338 Use char because int might match the return type of a GCC
6339 builtin and then its argument prototype would still apply. */
b4e70030
JB
6340#ifdef __cplusplus
6341extern "C"
6342#endif
b4e70030
JB
6343char socketpair ();
6344int
6345main ()
6346{
81ecdfbb 6347return socketpair ();
b4e70030
JB
6348 ;
6349 return 0;
6350}
6351_ACEOF
81ecdfbb
RW
6352for ac_lib in '' socket; do
6353 if test -z "$ac_lib"; then
6354 ac_res="none required"
6355 else
6356 ac_res=-l$ac_lib
b4e70030 6357 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6358 fi
6359 if ac_fn_c_try_link "$LINENO"; then :
6360 ac_cv_search_socketpair=$ac_res
6361fi
6362rm -f core conftest.err conftest.$ac_objext \
6363 conftest$ac_exeext
6364 if test "${ac_cv_search_socketpair+set}" = set; then :
6365 break
6366fi
6367done
6368if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6369
b4e70030 6370else
81ecdfbb 6371 ac_cv_search_socketpair=no
b4e70030 6372fi
81ecdfbb 6373rm conftest.$ac_ext
b4e70030
JB
6374LIBS=$ac_func_search_save_LIBS
6375fi
81ecdfbb
RW
6376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6377$as_echo "$ac_cv_search_socketpair" >&6; }
6378ac_res=$ac_cv_search_socketpair
6379if test "$ac_res" != no; then :
6380 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6381
6382fi
6383
6384
233a11ab 6385# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6386
6387 # See if the user specified whether he wants zlib support or not.
6388
6389# Check whether --with-zlib was given.
6390if test "${with_zlib+set}" = set; then :
6391 withval=$with_zlib;
6392else
6393 with_zlib=auto
6394fi
6395
6396
6397 if test "$with_zlib" != "no"; then
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6399$as_echo_n "checking for library containing zlibVersion... " >&6; }
6400if test "${ac_cv_search_zlibVersion+set}" = set; then :
6401 $as_echo_n "(cached) " >&6
233a11ab
CS
6402else
6403 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6405/* end confdefs.h. */
6406
81ecdfbb
RW
6407/* Override any GCC internal prototype to avoid an error.
6408 Use char because int might match the return type of a GCC
233a11ab 6409 builtin and then its argument prototype would still apply. */
233a11ab
CS
6410#ifdef __cplusplus
6411extern "C"
6412#endif
233a11ab
CS
6413char zlibVersion ();
6414int
6415main ()
6416{
81ecdfbb 6417return zlibVersion ();
233a11ab
CS
6418 ;
6419 return 0;
6420}
6421_ACEOF
81ecdfbb
RW
6422for ac_lib in '' z; do
6423 if test -z "$ac_lib"; then
6424 ac_res="none required"
233a11ab 6425 else
81ecdfbb
RW
6426 ac_res=-l$ac_lib
6427 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6428 fi
81ecdfbb
RW
6429 if ac_fn_c_try_link "$LINENO"; then :
6430 ac_cv_search_zlibVersion=$ac_res
233a11ab 6431fi
81ecdfbb
RW
6432rm -f core conftest.err conftest.$ac_objext \
6433 conftest$ac_exeext
6434 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6435 break
233a11ab 6436fi
81ecdfbb
RW
6437done
6438if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6439
233a11ab 6440else
81ecdfbb 6441 ac_cv_search_zlibVersion=no
233a11ab 6442fi
81ecdfbb
RW
6443rm conftest.$ac_ext
6444LIBS=$ac_func_search_save_LIBS
233a11ab 6445fi
81ecdfbb
RW
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6447$as_echo "$ac_cv_search_zlibVersion" >&6; }
6448ac_res=$ac_cv_search_zlibVersion
6449if test "$ac_res" != no; then :
6450 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6451 for ac_header in zlib.h
6452do :
6453 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6454if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6455 cat >>confdefs.h <<_ACEOF
81ecdfbb 6456#define HAVE_ZLIB_H 1
233a11ab
CS
6457_ACEOF
6458
6459fi
6460
6461done
6462
6463fi
6464
b040ad30
JB
6465 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6466 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6467 fi
6468 fi
6469
233a11ab 6470
77f120bf 6471# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6473$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6474if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6475 $as_echo_n "(cached) " >&6
bec39cab
AC
6476else
6477 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6479/* end confdefs.h. */
c906108c 6480
81ecdfbb
RW
6481/* Override any GCC internal prototype to avoid an error.
6482 Use char because int might match the return type of a GCC
6483 builtin and then its argument prototype would still apply. */
bec39cab
AC
6484#ifdef __cplusplus
6485extern "C"
6486#endif
77f120bf 6487char dlgetmodinfo ();
bec39cab
AC
6488int
6489main ()
6490{
81ecdfbb 6491return dlgetmodinfo ();
bec39cab
AC
6492 ;
6493 return 0;
6494}
6495_ACEOF
81ecdfbb
RW
6496for ac_lib in '' dl xpdl; do
6497 if test -z "$ac_lib"; then
6498 ac_res="none required"
6499 else
6500 ac_res=-l$ac_lib
b4e70030 6501 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6502 fi
6503 if ac_fn_c_try_link "$LINENO"; then :
6504 ac_cv_search_dlgetmodinfo=$ac_res
6505fi
6506rm -f core conftest.err conftest.$ac_objext \
6507 conftest$ac_exeext
6508 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6509 break
6510fi
6511done
6512if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6513
4e8d927d 6514else
81ecdfbb 6515 ac_cv_search_dlgetmodinfo=no
1ba607ad 6516fi
81ecdfbb 6517rm conftest.$ac_ext
bec39cab
AC
6518LIBS=$ac_func_search_save_LIBS
6519fi
81ecdfbb
RW
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6521$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6522ac_res=$ac_cv_search_dlgetmodinfo
6523if test "$ac_res" != no; then :
6524 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6525
8bb2c122 6526fi
8bb2c122 6527
8bb2c122 6528
77f120bf 6529
77f120bf 6530
6c7a06a3 6531
81ecdfbb
RW
6532# Check whether --with-libiconv-prefix was given.
6533if test "${with_libiconv_prefix+set}" = set; then :
6534 withval=$with_libiconv_prefix;
6c7a06a3 6535 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6536 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6537 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6538 done
6539
81ecdfbb
RW
6540fi
6541
6c7a06a3 6542
f18c4681 6543 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6544 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6545
81ecdfbb
RW
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6547$as_echo_n "checking for iconv... " >&6; }
6548if test "${am_cv_func_iconv+set}" = set; then :
6549 $as_echo_n "(cached) " >&6
d542061a 6550else
6c7a06a3
TT
6551
6552 am_cv_func_iconv="no, consider installing GNU libiconv"
6553 am_cv_lib_iconv=no
6554 am_cv_use_build_libiconv=no
f0f20949 6555 am_cv_build_libiconv_path=
4edb1e84
JB
6556
6557 # If libiconv is part of the build tree, then try using it over
6558 # any system iconv.
6559 if test -d ../libiconv; then
f18c4681
JB
6560 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6561 am_save_LIBS="$LIBS"
6562 am_save_CPPFLAGS="$CPPFLAGS"
6563 LIBS="$LIBS $lib_dir/libiconv.a"
6564 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6566/* end confdefs.h. */
6c7a06a3
TT
6567#include <stdlib.h>
6568#include <iconv.h>
d542061a
UW
6569int
6570main ()
6571{
6c7a06a3 6572iconv_t cd = iconv_open("","");
f18c4681
JB
6573 iconv(cd,NULL,NULL,NULL,NULL);
6574 iconv_close(cd);
d542061a
UW
6575 ;
6576 return 0;
6577}
6578_ACEOF
81ecdfbb 6579if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6580 am_cv_use_build_libiconv=yes
f0f20949 6581 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6582 am_cv_lib_iconv=yes
6583 am_cv_func_iconv=yes
d542061a 6584fi
81ecdfbb
RW
6585rm -f core conftest.err conftest.$ac_objext \
6586 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6587 LIBS="$am_save_LIBS"
6588 CPPFLAGS="$am_save_CPPFLAGS"
6589 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6590 break
6591 fi
6592 done
4edb1e84 6593 fi
94ae1714 6594
4edb1e84 6595 # Next, try to find iconv in libc.
6c7a06a3 6596 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6598/* end confdefs.h. */
6c7a06a3
TT
6599#include <stdlib.h>
6600#include <iconv.h>
d542061a
UW
6601int
6602main ()
6603{
6c7a06a3
TT
6604iconv_t cd = iconv_open("","");
6605 iconv(cd,NULL,NULL,NULL,NULL);
6606 iconv_close(cd);
d542061a
UW
6607 ;
6608 return 0;
6609}
6610_ACEOF
81ecdfbb 6611if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6612 am_cv_func_iconv=yes
d542061a 6613fi
81ecdfbb
RW
6614rm -f core conftest.err conftest.$ac_objext \
6615 conftest$ac_exeext conftest.$ac_ext
77f120bf 6616 fi
94ae1714 6617
4edb1e84
JB
6618 # If iconv was not in libc, try -liconv. In this case, arrange to
6619 # look in the libiconv prefix, if it was specified by the user.
6620 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6621 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6622 am_save_LIBS="$LIBS"
6623 if test -n "$LIBICONV_INCLUDE"; then
6624 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6625 LIBS="$LIBS $LIBICONV_LIBDIR"
6626 fi
6627 LIBS="$LIBS -liconv"
81ecdfbb 6628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6629/* end confdefs.h. */
6c7a06a3
TT
6630#include <stdlib.h>
6631#include <iconv.h>
bec39cab
AC
6632int
6633main ()
6634{
6c7a06a3
TT
6635iconv_t cd = iconv_open("","");
6636 iconv(cd,NULL,NULL,NULL,NULL);
6637 iconv_close(cd);
bec39cab
AC
6638 ;
6639 return 0;
6640}
6641_ACEOF
81ecdfbb 6642if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6643 am_cv_lib_iconv=yes
6c7a06a3 6644 am_cv_func_iconv=yes
627af7ea 6645fi
81ecdfbb
RW
6646rm -f core conftest.err conftest.$ac_objext \
6647 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6648 LIBS="$am_save_LIBS"
fc3b640d 6649 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6650 fi
6651
6652fi
81ecdfbb
RW
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6654$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6655
6656 # Set the various flags based on the cache variables. We can't rely
6657 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6658 LIBICONV=
6659 if test "$am_cv_lib_iconv" = yes; then
6660 LIBICONV="-liconv"
94ae1714
TT
6661 else
6662 LIBICONV_LIBDIR=
6663 LIBICONV_INCLUDE=
fc3b640d
TT
6664 fi
6665 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6666 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6667 LIBICONV_LIBDIR=""
fc3b640d
TT
6668 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6669 fi
6670 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6671 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6672
6c7a06a3
TT
6673 if test "$am_cv_func_iconv" = yes; then
6674
81ecdfbb 6675$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6676
81ecdfbb
RW
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6678$as_echo_n "checking for iconv declaration... " >&6; }
6679 if test "${am_cv_proto_iconv+set}" = set; then :
6680 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6681else
6682
81ecdfbb 6683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6684/* end confdefs.h. */
6685
6c7a06a3
TT
6686#include <stdlib.h>
6687#include <iconv.h>
6688extern
b4e70030 6689#ifdef __cplusplus
6c7a06a3 6690"C"
b4e70030 6691#endif
6c7a06a3
TT
6692#if defined(__STDC__) || defined(__cplusplus)
6693size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6694#else
6695size_t iconv();
6696#endif
6697
b4e70030
JB
6698int
6699main ()
6700{
6c7a06a3 6701
b4e70030
JB
6702 ;
6703 return 0;
6704}
6705_ACEOF
81ecdfbb 6706if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6707 am_cv_proto_iconv_arg1=""
4e8d927d 6708else
81ecdfbb 6709 am_cv_proto_iconv_arg1="const"
b4e70030 6710fi
81ecdfbb 6711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6712 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);"
6713fi
6714
6715 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6717 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6718$as_echo "${ac_t:-
6719 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6720
6721cat >>confdefs.h <<_ACEOF
6722#define ICONV_CONST $am_cv_proto_iconv_arg1
6723_ACEOF
6724
6725 fi
6c7a06a3
TT
6726
6727
478aac75
DE
6728# GDB may fork/exec the iconv program to get the list of supported character
6729# sets. Allow the user to specify where to find it.
6730# There are several factors affecting the choice of option name:
6731# - There is already --with-libiconv-prefix but we can't use it, it specifies
6732# the build-time location of libiconv files.
6733# - The program we need to find is iconv, which comes with glibc. The user
6734# doesn't necessarily have libiconv installed. Therefore naming this
6735# --with-libiconv-foo feels wrong.
6736# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6737# defined to work on directories not files (though it really doesn't know
6738# the difference).
6739# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6740# with --with-libiconv-prefix.
6741# Putting these together is why the option name is --with-iconv-bin.
6742
6743
6744# Check whether --with-iconv-bin was given.
6745if test "${with_iconv_bin+set}" = set; then :
6746 withval=$with_iconv_bin; iconv_bin="${withval}"
6747
6748cat >>confdefs.h <<_ACEOF
6749#define ICONV_BIN "${iconv_bin}"
6750_ACEOF
6751
6752
6753 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6754 if test "x$prefix" = xNONE; then
6755 test_prefix=/usr/local
6756 else
6757 test_prefix=$prefix
6758 fi
6759 else
6760 test_prefix=$exec_prefix
6761 fi
6762 value=0
6763 case ${iconv_bin} in
6764 "${test_prefix}"|"${test_prefix}/"*|\
6765 '${exec_prefix}'|'${exec_prefix}/'*)
6766 value=1
6767 ;;
6768 esac
6769
6770cat >>confdefs.h <<_ACEOF
6771#define ICONV_BIN_RELOCATABLE $value
6772_ACEOF
6773
6774
6775
6776fi
6777
6778
6c7a06a3
TT
6779# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6780# There is a very specific comment in /usr/include/curses.h explaining that
6781# termcap routines built into libcurses must not be used.
6782#
6783# The symptoms we observed so far is GDB unexpectedly changing
6784# the terminal settings when tgetent is called - this is particularly
6785# visible as the output is missing carriage returns, and so rapidly
6786# becomes very hard to read.
6787#
6788# The readline configure script has already decided that libtermcap
6789# was enough for its purposes, and so decided to build readline using
6790# libtermcap. Since the TUI mode requires curses, building GDB with
6791# TUI enabled results in both libraries to be used at the same time,
6792# which is not allowed. This basically means that GDB with TUI is
6793# broken on alpha-osf.
6794
6795case $host_os in
6bcc772d
RO
6796 osf* )
6797 if test x"$enable_tui" = xyes; then
81ecdfbb 6798 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6799 fi
6bcc772d 6800 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6801 enable_tui=no
6802 fi
6803 ;;
6804esac
6805
cb01cfba 6806# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6807if test x"$enable_tui" != xno; then
cb01cfba
JB
6808 prefer_curses=yes
6809fi
6810
6811curses_found=no
6812if test x"$prefer_curses" = xyes; then
6813 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6814 # curses library because the latter might not provide all the
6815 # functionality we need. However, this leads to problems on systems
6816 # where the linker searches /usr/local/lib, but the compiler doesn't
6817 # search /usr/local/include, if ncurses is installed in /usr/local. A
6818 # default installation of ncurses on alpha*-dec-osf* will lead to such
6819 # a situation.
81ecdfbb
RW
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6821$as_echo_n "checking for library containing waddstr... " >&6; }
6822if test "${ac_cv_search_waddstr+set}" = set; then :
6823 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6824else
6825 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6827/* end confdefs.h. */
6828
81ecdfbb
RW
6829/* Override any GCC internal prototype to avoid an error.
6830 Use char because int might match the return type of a GCC
6831 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6832#ifdef __cplusplus
6833extern "C"
6834#endif
6c7a06a3
TT
6835char waddstr ();
6836int
6837main ()
6838{
81ecdfbb 6839return waddstr ();
6c7a06a3
TT
6840 ;
6841 return 0;
6842}
6843_ACEOF
81ecdfbb
RW
6844for ac_lib in '' ncurses cursesX curses; do
6845 if test -z "$ac_lib"; then
6846 ac_res="none required"
6847 else
6848 ac_res=-l$ac_lib
6849 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6850 fi
6851 if ac_fn_c_try_link "$LINENO"; then :
6852 ac_cv_search_waddstr=$ac_res
6853fi
6854rm -f core conftest.err conftest.$ac_objext \
6855 conftest$ac_exeext
6856 if test "${ac_cv_search_waddstr+set}" = set; then :
6857 break
6858fi
6859done
6860if test "${ac_cv_search_waddstr+set}" = set; then :
6861
6c7a06a3 6862else
81ecdfbb
RW
6863 ac_cv_search_waddstr=no
6864fi
6865rm conftest.$ac_ext
6866LIBS=$ac_func_search_save_LIBS
6867fi
6868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6869$as_echo "$ac_cv_search_waddstr" >&6; }
6870ac_res=$ac_cv_search_waddstr
6871if test "$ac_res" != no; then :
6872 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6873
6874fi
6875
6876
cb01cfba
JB
6877 if test "$ac_cv_search_waddstr" != no; then
6878 curses_found=yes
6879 fi
6880fi
6881
6882# Check whether we should enable the TUI, but only do so if we really
6883# can.
6884if test x"$enable_tui" != xno; then
6885 if test -d $srcdir/tui; then
6886 if test "$curses_found" != no; then
6c7a06a3
TT
6887 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6888 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6889 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6890 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6891 else
6892 if test x"$enable_tui" = xyes; then
81ecdfbb 6893 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6894 else
81ecdfbb
RW
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6896$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6897 fi
6898 fi
6899 fi
6900fi
6901
6902# Since GDB uses Readline, we need termcap functionality. In many
6903# cases this will be provided by the curses library, but some systems
6904# have a seperate termcap library, or no curses library at all.
6905
6906case $host_os in
6907 cygwin*)
6908 if test -d $srcdir/libtermcap; then
6909 LIBS="../libtermcap/libtermcap.a $LIBS"
6910 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6911 fi ;;
6912 go32* | *djgpp*)
6913 ac_cv_search_tgetent="none required"
6914 ;;
6915 *mingw32*)
6916 ac_cv_search_tgetent="none required"
6917 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6918 ;;
6919esac
6920
6921# These are the libraries checked by Readline.
81ecdfbb
RW
6922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6923$as_echo_n "checking for library containing tgetent... " >&6; }
6924if test "${ac_cv_search_tgetent+set}" = set; then :
6925 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6926else
6927 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6929/* end confdefs.h. */
6930
81ecdfbb
RW
6931/* Override any GCC internal prototype to avoid an error.
6932 Use char because int might match the return type of a GCC
6933 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6934#ifdef __cplusplus
6935extern "C"
6936#endif
6c7a06a3
TT
6937char tgetent ();
6938int
6939main ()
6940{
81ecdfbb 6941return tgetent ();
6c7a06a3
TT
6942 ;
6943 return 0;
6944}
6945_ACEOF
81ecdfbb
RW
6946for ac_lib in '' termcap tinfo curses ncurses; do
6947 if test -z "$ac_lib"; then
6948 ac_res="none required"
6949 else
6950 ac_res=-l$ac_lib
6c7a06a3 6951 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6952 fi
6953 if ac_fn_c_try_link "$LINENO"; then :
6954 ac_cv_search_tgetent=$ac_res
6955fi
6956rm -f core conftest.err conftest.$ac_objext \
6957 conftest$ac_exeext
6958 if test "${ac_cv_search_tgetent+set}" = set; then :
6959 break
6960fi
6961done
6962if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 6963
6c7a06a3 6964else
81ecdfbb 6965 ac_cv_search_tgetent=no
6c7a06a3 6966fi
81ecdfbb 6967rm conftest.$ac_ext
6c7a06a3
TT
6968LIBS=$ac_func_search_save_LIBS
6969fi
81ecdfbb
RW
6970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
6971$as_echo "$ac_cv_search_tgetent" >&6; }
6972ac_res=$ac_cv_search_tgetent
6973if test "$ac_res" != no; then :
6974 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 6975
06825bd1
MK
6976fi
6977
06825bd1 6978
bec39cab 6979if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 6980 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
6981fi
6982
3841debe 6983
81ecdfbb
RW
6984# Check whether --with-system-readline was given.
6985if test "${with_system_readline+set}" = set; then :
6986 withval=$with_system_readline;
6987fi
6a30b0a5 6988
6a30b0a5
AS
6989
6990if test "$with_system_readline" = yes; then
6991 READLINE=-lreadline
6992 READLINE_DEPS=
6993 READLINE_CFLAGS=
39037522 6994 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
6995else
6996 READLINE='$(READLINE_DIR)/libreadline.a'
6997 READLINE_DEPS='$(READLINE)'
6998 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 6999 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7000fi
7001
7002
7003
7004
7005
f997c383
SD
7006# Generate jit-reader.h
7007
7008# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7009TARGET_PTR=
7010
7011# The cast to long int works around a bug in the HP C Compiler
7012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7014# This bug is HP SR number 8606223364.
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7016$as_echo_n "checking size of unsigned long long... " >&6; }
7017if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7018 $as_echo_n "(cached) " >&6
7019else
7020 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7021
7022else
7023 if test "$ac_cv_type_unsigned_long_long" = yes; then
7024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7026{ as_fn_set_status 77
7027as_fn_error "cannot compute sizeof (unsigned long long)
7028See \`config.log' for more details." "$LINENO" 5; }; }
7029 else
7030 ac_cv_sizeof_unsigned_long_long=0
7031 fi
7032fi
7033
7034fi
7035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7036$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7037
7038
7039
7040cat >>confdefs.h <<_ACEOF
7041#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7042_ACEOF
7043
7044
7045# The cast to long int works around a bug in the HP C Compiler
7046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7048# This bug is HP SR number 8606223364.
7049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7050$as_echo_n "checking size of unsigned long... " >&6; }
7051if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7052 $as_echo_n "(cached) " >&6
7053else
7054 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7055
7056else
7057 if test "$ac_cv_type_unsigned_long" = yes; then
7058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7059$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7060{ as_fn_set_status 77
7061as_fn_error "cannot compute sizeof (unsigned long)
7062See \`config.log' for more details." "$LINENO" 5; }; }
7063 else
7064 ac_cv_sizeof_unsigned_long=0
7065 fi
7066fi
7067
7068fi
7069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7070$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7071
7072
7073
7074cat >>confdefs.h <<_ACEOF
7075#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7076_ACEOF
7077
7078
7079# The cast to long int works around a bug in the HP C Compiler
7080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7082# This bug is HP SR number 8606223364.
7083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7084$as_echo_n "checking size of unsigned __int128... " >&6; }
7085if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7086 $as_echo_n "(cached) " >&6
7087else
7088 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7089
7090else
7091 if test "$ac_cv_type_unsigned___int128" = yes; then
7092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7094{ as_fn_set_status 77
7095as_fn_error "cannot compute sizeof (unsigned __int128)
7096See \`config.log' for more details." "$LINENO" 5; }; }
7097 else
7098 ac_cv_sizeof_unsigned___int128=0
7099 fi
7100fi
7101
7102fi
7103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7104$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7105
7106
7107
7108cat >>confdefs.h <<_ACEOF
7109#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7110_ACEOF
7111
7112
7113
7114if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7115 TARGET_PTR="unsigned long"
7116elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7117 TARGET_PTR="unsigned long long"
7118elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7119 TARGET_PTR="unsigned __int128"
7120else
7121 TARGET_PTR="unsigned long"
7122fi
7123
7124
7125ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7126
7127
a2d08b9e
SD
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7129$as_echo_n "checking for library containing dlopen... " >&6; }
7130if test "${ac_cv_search_dlopen+set}" = set; then :
7131 $as_echo_n "(cached) " >&6
7132else
7133 ac_func_search_save_LIBS=$LIBS
7134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7135/* end confdefs.h. */
7136
7137/* Override any GCC internal prototype to avoid an error.
7138 Use char because int might match the return type of a GCC
7139 builtin and then its argument prototype would still apply. */
7140#ifdef __cplusplus
7141extern "C"
7142#endif
7143char dlopen ();
7144int
7145main ()
7146{
7147return dlopen ();
7148 ;
7149 return 0;
7150}
7151_ACEOF
7152for ac_lib in '' dl; do
7153 if test -z "$ac_lib"; then
7154 ac_res="none required"
7155 else
7156 ac_res=-l$ac_lib
7157 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7158 fi
7159 if ac_fn_c_try_link "$LINENO"; then :
7160 ac_cv_search_dlopen=$ac_res
7161fi
7162rm -f core conftest.err conftest.$ac_objext \
7163 conftest$ac_exeext
7164 if test "${ac_cv_search_dlopen+set}" = set; then :
7165 break
7166fi
7167done
7168if test "${ac_cv_search_dlopen+set}" = set; then :
7169
7170else
7171 ac_cv_search_dlopen=no
7172fi
7173rm conftest.$ac_ext
7174LIBS=$ac_func_search_save_LIBS
7175fi
7176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7177$as_echo "$ac_cv_search_dlopen" >&6; }
7178ac_res=$ac_cv_search_dlopen
7179if test "$ac_res" != no; then :
7180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7181
7182fi
7183
7184
39037522 7185
b8e0a31c
SD
7186
7187# Check whether --with-jit-reader-dir was given.
7188if test "${with_jit_reader_dir+set}" = set; then :
7189 withval=$with_jit_reader_dir;
7190 JIT_READER_DIR=$withval
7191else
7192 JIT_READER_DIR=${libdir}/gdb
7193fi
7194
7195
7196 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7197 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7198 ac_define_dir=`eval echo $JIT_READER_DIR`
7199 ac_define_dir=`eval echo $ac_define_dir`
7200
7201cat >>confdefs.h <<_ACEOF
7202#define JIT_READER_DIR "$ac_define_dir"
7203_ACEOF
7204
7205
7206
7207
7208 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7209 if test "x$prefix" = xNONE; then
7210 test_prefix=/usr/local
7211 else
7212 test_prefix=$prefix
7213 fi
7214 else
7215 test_prefix=$exec_prefix
7216 fi
7217 value=0
7218 case ${ac_define_dir} in
7219 "${test_prefix}"|"${test_prefix}/"*|\
7220 '${exec_prefix}'|'${exec_prefix}/'*)
7221 value=1
7222 ;;
7223 esac
7224
7225cat >>confdefs.h <<_ACEOF
7226#define JIT_READER_DIR_RELOCATABLE $value
7227_ACEOF
7228
7229
7230
7231
7232
81ecdfbb
RW
7233# Check whether --with-expat was given.
7234if test "${with_expat+set}" = set; then :
7235 withval=$with_expat;
5c39566f
DJ
7236else
7237 with_expat=auto
81ecdfbb
RW
7238fi
7239
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7241$as_echo_n "checking whether to use expat... " >&6; }
7242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7243$as_echo "$with_expat" >&6; }
5c39566f
DJ
7244
7245if test "${with_expat}" = no; then
81ecdfbb
RW
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7247$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7248 HAVE_LIBEXPAT=no
7249else
7250
3841debe
DJ
7251 if test "X$prefix" = "XNONE"; then
7252 acl_final_prefix="$ac_default_prefix"
7253 else
7254 acl_final_prefix="$prefix"
7255 fi
7256 if test "X$exec_prefix" = "XNONE"; then
7257 acl_final_exec_prefix='${prefix}'
7258 else
7259 acl_final_exec_prefix="$exec_prefix"
7260 fi
7261 acl_save_prefix="$prefix"
7262 prefix="$acl_final_prefix"
7263 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7264 prefix="$acl_save_prefix"
7265
7266
81ecdfbb
RW
7267# Check whether --with-gnu-ld was given.
7268if test "${with_gnu_ld+set}" = set; then :
7269 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7270else
7271 with_gnu_ld=no
81ecdfbb
RW
7272fi
7273
3841debe
DJ
7274# Prepare PATH_SEPARATOR.
7275# The user is always right.
7276if test "${PATH_SEPARATOR+set}" != set; then
7277 echo "#! /bin/sh" >conf$$.sh
7278 echo "exit 0" >>conf$$.sh
7279 chmod +x conf$$.sh
7280 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7281 PATH_SEPARATOR=';'
7282 else
7283 PATH_SEPARATOR=:
7284 fi
7285 rm -f conf$$.sh
7286fi
7287ac_prog=ld
7288if test "$GCC" = yes; then
7289 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7291$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7292 case $host in
7293 *-*-mingw*)
7294 # gcc leaves a trailing carriage return which upsets mingw
7295 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7296 *)
7297 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7298 esac
7299 case $ac_prog in
7300 # Accept absolute paths.
7301 [\\/]* | [A-Za-z]:[\\/]*)
7302 re_direlt='/[^/][^/]*/\.\./'
7303 # Canonicalize the path of ld
7304 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7305 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7306 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7307 done
7308 test -z "$LD" && LD="$ac_prog"
7309 ;;
7310 "")
7311 # If it fails, then pretend we aren't using GCC.
7312 ac_prog=ld
7313 ;;
7314 *)
7315 # If it is relative, then search for the first ld in PATH.
7316 with_gnu_ld=unknown
7317 ;;
7318 esac
7319elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7321$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7322else
81ecdfbb
RW
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7324$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7325fi
81ecdfbb
RW
7326if test "${acl_cv_path_LD+set}" = set; then :
7327 $as_echo_n "(cached) " >&6
3841debe
DJ
7328else
7329 if test -z "$LD"; then
7330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7331 for ac_dir in $PATH; do
7332 test -z "$ac_dir" && ac_dir=.
7333 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7334 acl_cv_path_LD="$ac_dir/$ac_prog"
7335 # Check to see if the program is GNU ld. I'd rather use --version,
7336 # but apparently some GNU ld's only accept -v.
7337 # Break only if it was the GNU/non-GNU ld that we prefer.
7338 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7339 test "$with_gnu_ld" != no && break
7340 else
7341 test "$with_gnu_ld" != yes && break
7342 fi
7343 fi
7344 done
7345 IFS="$ac_save_ifs"
7346else
7347 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7348fi
7349fi
7350
7351LD="$acl_cv_path_LD"
7352if test -n "$LD"; then
81ecdfbb
RW
7353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7354$as_echo "$LD" >&6; }
3841debe 7355else
81ecdfbb
RW
7356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357$as_echo "no" >&6; }
3841debe 7358fi
81ecdfbb
RW
7359test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7361$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7362if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7363 $as_echo_n "(cached) " >&6
3841debe
DJ
7364else
7365 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7366if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7367 acl_cv_prog_gnu_ld=yes
7368else
7369 acl_cv_prog_gnu_ld=no
7370fi
7371fi
81ecdfbb
RW
7372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7373$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7374with_gnu_ld=$acl_cv_prog_gnu_ld
7375
7376
7377
81ecdfbb
RW
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7379$as_echo_n "checking for shared library run path origin... " >&6; }
7380if test "${acl_cv_rpath+set}" = set; then :
7381 $as_echo_n "(cached) " >&6
3841debe
DJ
7382else
7383
7384 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7385 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7386 . ./conftest.sh
7387 rm -f ./conftest.sh
7388 acl_cv_rpath=done
7389
7390fi
81ecdfbb
RW
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7392$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7393 wl="$acl_cv_wl"
7394 libext="$acl_cv_libext"
7395 shlibext="$acl_cv_shlibext"
7396 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7397 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7398 hardcode_direct="$acl_cv_hardcode_direct"
7399 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7400 # Check whether --enable-rpath was given.
7401if test "${enable_rpath+set}" = set; then :
7402 enableval=$enable_rpath; :
3841debe
DJ
7403else
7404 enable_rpath=yes
81ecdfbb
RW
7405fi
7406
3841debe
DJ
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416 use_additional=yes
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
81ecdfbb
RW
7430# Check whether --with-libexpat-prefix was given.
7431if test "${with_libexpat_prefix+set}" = set; then :
7432 withval=$with_libexpat_prefix;
3841debe
DJ
7433 if test "X$withval" = "Xno"; then
7434 use_additional=no
7435 else
7436 if test "X$withval" = "X"; then
7437
7438 acl_save_prefix="$prefix"
7439 prefix="$acl_final_prefix"
7440 acl_save_exec_prefix="$exec_prefix"
7441 exec_prefix="$acl_final_exec_prefix"
7442
7443 eval additional_includedir=\"$includedir\"
7444 eval additional_libdir=\"$libdir\"
7445
7446 exec_prefix="$acl_save_exec_prefix"
7447 prefix="$acl_save_prefix"
7448
7449 else
7450 additional_includedir="$withval/include"
7451 additional_libdir="$withval/lib"
7452 fi
7453 fi
7454
81ecdfbb
RW
7455fi
7456
3841debe
DJ
7457 LIBEXPAT=
7458 LTLIBEXPAT=
7459 INCEXPAT=
7460 rpathdirs=
7461 ltrpathdirs=
7462 names_already_handled=
7463 names_next_round='expat '
7464 while test -n "$names_next_round"; do
7465 names_this_round="$names_next_round"
7466 names_next_round=
7467 for name in $names_this_round; do
7468 already_handled=
7469 for n in $names_already_handled; do
7470 if test "$n" = "$name"; then
7471 already_handled=yes
7472 break
7473 fi
7474 done
7475 if test -z "$already_handled"; then
7476 names_already_handled="$names_already_handled $name"
7477 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7478 eval value=\"\$HAVE_LIB$uppername\"
7479 if test -n "$value"; then
7480 if test "$value" = yes; then
7481 eval value=\"\$LIB$uppername\"
7482 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7483 eval value=\"\$LTLIB$uppername\"
7484 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7485 else
7486 :
7487 fi
7488 else
7489 found_dir=
7490 found_la=
7491 found_so=
7492 found_a=
7493 if test $use_additional = yes; then
7494 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7495 found_dir="$additional_libdir"
7496 found_so="$additional_libdir/lib$name.$shlibext"
7497 if test -f "$additional_libdir/lib$name.la"; then
7498 found_la="$additional_libdir/lib$name.la"
7499 fi
7500 else
7501 if test -f "$additional_libdir/lib$name.$libext"; then
7502 found_dir="$additional_libdir"
7503 found_a="$additional_libdir/lib$name.$libext"
7504 if test -f "$additional_libdir/lib$name.la"; then
7505 found_la="$additional_libdir/lib$name.la"
7506 fi
7507 fi
7508 fi
7509 fi
7510 if test "X$found_dir" = "X"; then
7511 for x in $LDFLAGS $LTLIBEXPAT; do
7512
7513 acl_save_prefix="$prefix"
7514 prefix="$acl_final_prefix"
7515 acl_save_exec_prefix="$exec_prefix"
7516 exec_prefix="$acl_final_exec_prefix"
7517 eval x=\"$x\"
7518 exec_prefix="$acl_save_exec_prefix"
7519 prefix="$acl_save_prefix"
7520
7521 case "$x" in
7522 -L*)
7523 dir=`echo "X$x" | sed -e 's/^X-L//'`
7524 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7525 found_dir="$dir"
7526 found_so="$dir/lib$name.$shlibext"
7527 if test -f "$dir/lib$name.la"; then
7528 found_la="$dir/lib$name.la"
7529 fi
7530 else
7531 if test -f "$dir/lib$name.$libext"; then
7532 found_dir="$dir"
7533 found_a="$dir/lib$name.$libext"
7534 if test -f "$dir/lib$name.la"; then
7535 found_la="$dir/lib$name.la"
7536 fi
7537 fi
7538 fi
7539 ;;
7540 esac
7541 if test "X$found_dir" != "X"; then
7542 break
7543 fi
7544 done
7545 fi
7546 if test "X$found_dir" != "X"; then
7547 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7548 if test "X$found_so" != "X"; then
7549 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7550 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7551 else
7552 haveit=
7553 for x in $ltrpathdirs; do
7554 if test "X$x" = "X$found_dir"; then
7555 haveit=yes
7556 break
7557 fi
7558 done
7559 if test -z "$haveit"; then
7560 ltrpathdirs="$ltrpathdirs $found_dir"
7561 fi
7562 if test "$hardcode_direct" = yes; then
7563 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7564 else
7565 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7566 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7567 haveit=
7568 for x in $rpathdirs; do
7569 if test "X$x" = "X$found_dir"; then
7570 haveit=yes
7571 break
7572 fi
7573 done
7574 if test -z "$haveit"; then
7575 rpathdirs="$rpathdirs $found_dir"
7576 fi
7577 else
7578 haveit=
7579 for x in $LDFLAGS $LIBEXPAT; do
7580
7581 acl_save_prefix="$prefix"
7582 prefix="$acl_final_prefix"
7583 acl_save_exec_prefix="$exec_prefix"
7584 exec_prefix="$acl_final_exec_prefix"
7585 eval x=\"$x\"
7586 exec_prefix="$acl_save_exec_prefix"
7587 prefix="$acl_save_prefix"
7588
7589 if test "X$x" = "X-L$found_dir"; then
7590 haveit=yes
7591 break
7592 fi
7593 done
7594 if test -z "$haveit"; then
7595 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7596 fi
7597 if test "$hardcode_minus_L" != no; then
7598 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7599 else
7600 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7601 fi
7602 fi
7603 fi
7604 fi
7605 else
7606 if test "X$found_a" != "X"; then
7607 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7608 else
7609 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7610 fi
7611 fi
7612 additional_includedir=
7613 case "$found_dir" in
7614 */lib | */lib/)
7615 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7616 additional_includedir="$basedir/include"
7617 ;;
7618 esac
7619 if test "X$additional_includedir" != "X"; then
7620 if test "X$additional_includedir" != "X/usr/include"; then
7621 haveit=
7622 if test "X$additional_includedir" = "X/usr/local/include"; then
7623 if test -n "$GCC"; then
7624 case $host_os in
7625 linux*) haveit=yes;;
7626 esac
7627 fi
7628 fi
7629 if test -z "$haveit"; then
7630 for x in $CPPFLAGS $INCEXPAT; do
7631
7632 acl_save_prefix="$prefix"
7633 prefix="$acl_final_prefix"
7634 acl_save_exec_prefix="$exec_prefix"
7635 exec_prefix="$acl_final_exec_prefix"
7636 eval x=\"$x\"
7637 exec_prefix="$acl_save_exec_prefix"
7638 prefix="$acl_save_prefix"
7639
7640 if test "X$x" = "X-I$additional_includedir"; then
7641 haveit=yes
7642 break
7643 fi
7644 done
7645 if test -z "$haveit"; then
7646 if test -d "$additional_includedir"; then
7647 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7648 fi
7649 fi
7650 fi
7651 fi
7652 fi
7653 if test -n "$found_la"; then
7654 save_libdir="$libdir"
7655 case "$found_la" in
7656 */* | *\\*) . "$found_la" ;;
7657 *) . "./$found_la" ;;
7658 esac
7659 libdir="$save_libdir"
7660 for dep in $dependency_libs; do
7661 case "$dep" in
7662 -L*)
7663 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7664 if test "X$additional_libdir" != "X/usr/lib"; then
7665 haveit=
7666 if test "X$additional_libdir" = "X/usr/local/lib"; then
7667 if test -n "$GCC"; then
7668 case $host_os in
7669 linux*) haveit=yes;;
7670 esac
7671 fi
7672 fi
7673 if test -z "$haveit"; then
7674 haveit=
7675 for x in $LDFLAGS $LIBEXPAT; do
7676
7677 acl_save_prefix="$prefix"
7678 prefix="$acl_final_prefix"
7679 acl_save_exec_prefix="$exec_prefix"
7680 exec_prefix="$acl_final_exec_prefix"
7681 eval x=\"$x\"
7682 exec_prefix="$acl_save_exec_prefix"
7683 prefix="$acl_save_prefix"
7684
7685 if test "X$x" = "X-L$additional_libdir"; then
7686 haveit=yes
7687 break
7688 fi
7689 done
7690 if test -z "$haveit"; then
7691 if test -d "$additional_libdir"; then
7692 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7693 fi
7694 fi
7695 haveit=
7696 for x in $LDFLAGS $LTLIBEXPAT; do
7697
7698 acl_save_prefix="$prefix"
7699 prefix="$acl_final_prefix"
7700 acl_save_exec_prefix="$exec_prefix"
7701 exec_prefix="$acl_final_exec_prefix"
7702 eval x=\"$x\"
7703 exec_prefix="$acl_save_exec_prefix"
7704 prefix="$acl_save_prefix"
7705
7706 if test "X$x" = "X-L$additional_libdir"; then
7707 haveit=yes
7708 break
7709 fi
7710 done
7711 if test -z "$haveit"; then
7712 if test -d "$additional_libdir"; then
7713 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7714 fi
7715 fi
7716 fi
7717 fi
7718 ;;
7719 -R*)
7720 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7721 if test "$enable_rpath" != no; then
7722 haveit=
7723 for x in $rpathdirs; do
7724 if test "X$x" = "X$dir"; then
7725 haveit=yes
7726 break
7727 fi
7728 done
7729 if test -z "$haveit"; then
7730 rpathdirs="$rpathdirs $dir"
7731 fi
7732 haveit=
7733 for x in $ltrpathdirs; do
7734 if test "X$x" = "X$dir"; then
7735 haveit=yes
7736 break
7737 fi
7738 done
7739 if test -z "$haveit"; then
7740 ltrpathdirs="$ltrpathdirs $dir"
7741 fi
7742 fi
7743 ;;
7744 -l*)
7745 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7746 ;;
7747 *.la)
7748 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7749 ;;
7750 *)
7751 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7752 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7753 ;;
81ecdfbb
RW
7754 esac
7755 done
7756 fi
7757 else
7758 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7759 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7760 fi
7761 fi
7762 fi
7763 done
7764 done
7765 if test "X$rpathdirs" != "X"; then
7766 if test -n "$hardcode_libdir_separator"; then
7767 alldirs=
7768 for found_dir in $rpathdirs; do
7769 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7770 done
7771 acl_save_libdir="$libdir"
7772 libdir="$alldirs"
7773 eval flag=\"$hardcode_libdir_flag_spec\"
7774 libdir="$acl_save_libdir"
7775 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7776 else
7777 for found_dir in $rpathdirs; do
7778 acl_save_libdir="$libdir"
7779 libdir="$found_dir"
7780 eval flag=\"$hardcode_libdir_flag_spec\"
7781 libdir="$acl_save_libdir"
7782 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7783 done
7784 fi
7785 fi
7786 if test "X$ltrpathdirs" != "X"; then
7787 for found_dir in $ltrpathdirs; do
7788 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7789 done
7790 fi
a9322a30
TT
7791
7792
81ecdfbb 7793 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7794
81ecdfbb
RW
7795 for element in $INCEXPAT; do
7796 haveit=
7797 for x in $CPPFLAGS; do
a9322a30 7798
81ecdfbb
RW
7799 acl_save_prefix="$prefix"
7800 prefix="$acl_final_prefix"
7801 acl_save_exec_prefix="$exec_prefix"
7802 exec_prefix="$acl_final_exec_prefix"
7803 eval x=\"$x\"
7804 exec_prefix="$acl_save_exec_prefix"
7805 prefix="$acl_save_prefix"
a8111142 7806
81ecdfbb
RW
7807 if test "X$x" = "X$element"; then
7808 haveit=yes
7809 break
7810 fi
7811 done
7812 if test -z "$haveit"; then
7813 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7814 fi
7815 done
a9322a30
TT
7816
7817
81ecdfbb
RW
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7819$as_echo_n "checking for libexpat... " >&6; }
7820if test "${ac_cv_libexpat+set}" = set; then :
7821 $as_echo_n "(cached) " >&6
bec39cab 7822else
bec39cab 7823
81ecdfbb
RW
7824 ac_save_LIBS="$LIBS"
7825 LIBS="$LIBS $LIBEXPAT"
7826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7827/* end confdefs.h. */
81ecdfbb
RW
7828#include "expat.h"
7829int
7830main ()
7831{
7832XML_Parser p = XML_ParserCreate (0);
7833 ;
7834 return 0;
7835}
bec39cab 7836_ACEOF
81ecdfbb
RW
7837if ac_fn_c_try_link "$LINENO"; then :
7838 ac_cv_libexpat=yes
c906108c 7839else
81ecdfbb 7840 ac_cv_libexpat=no
bec39cab 7841fi
81ecdfbb
RW
7842rm -f core conftest.err conftest.$ac_objext \
7843 conftest$ac_exeext conftest.$ac_ext
7844 LIBS="$ac_save_LIBS"
c906108c 7845
95ca63c4 7846fi
81ecdfbb
RW
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7848$as_echo "$ac_cv_libexpat" >&6; }
7849 if test "$ac_cv_libexpat" = yes; then
7850 HAVE_LIBEXPAT=yes
bec39cab 7851
81ecdfbb 7852$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7853
81ecdfbb
RW
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7855$as_echo_n "checking how to link with libexpat... " >&6; }
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7857$as_echo "$LIBEXPAT" >&6; }
7858 else
7859 HAVE_LIBEXPAT=no
7860 CPPFLAGS="$ac_save_CPPFLAGS"
7861 LIBEXPAT=
7862 LTLIBEXPAT=
7863 fi
95ca63c4
CF
7864
7865
7866
7cb9022a
MK
7867
7868
bec39cab 7869
81ecdfbb
RW
7870 if test "$HAVE_LIBEXPAT" != yes; then
7871 if test "$with_expat" = yes; then
7872 as_fn_error "expat is missing or unusable" "$LINENO" 5
7873 else
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7875$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7876 fi
7877 else
7878 save_LIBS=$LIBS
7879 LIBS="$LIBS $LIBEXPAT"
7880 for ac_func in XML_StopParser
7881do :
7882 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7883if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7884 cat >>confdefs.h <<_ACEOF
81ecdfbb 7885#define HAVE_XML_STOPPARSER 1
bec39cab 7886_ACEOF
95ca63c4 7887
bec39cab 7888fi
bec39cab 7889done
95ca63c4 7890
81ecdfbb
RW
7891 LIBS=$save_LIBS
7892 fi
a9322a30
TT
7893fi
7894
a9322a30 7895
a9322a30
TT
7896
7897
ec685c5e 7898
0c4a4063 7899
81ecdfbb
RW
7900# Check whether --with-python was given.
7901if test "${with_python+set}" = set; then :
7902 withval=$with_python;
bec39cab 7903else
81ecdfbb 7904 with_python=auto
bec39cab 7905fi
bec39cab 7906
81ecdfbb
RW
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7908$as_echo_n "checking whether to use python... " >&6; }
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7910$as_echo "$with_python" >&6; }
9a156167 7911
81ecdfbb
RW
7912if test "${with_python}" = no; then
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7914$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7915 have_libpython=no
bec39cab 7916else
81ecdfbb 7917 case "${with_python}" in
8c85a4e2 7918 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7919 if test -d ${with_python}; then
7920 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7921 python_prog="${with_python}/bin/python"
0c4a4063 7922 python_prefix=
9c4ea6c5
JB
7923 # If python does not exit ${with_python}/bin, then try in
7924 # ${with_python}. On Windows/MinGW, this is where the Python
7925 # executable is.
7926 if test ! -x "${python_prog}"; then
7927 python_prog="${with_python}/python"
7928 python_prefix=
7929 fi
e7a30f46 7930 if test ! -x "${python_prog}"; then
ec685c5e
DE
7931 # Fall back to gdb 7.0/7.1 behaviour.
7932 python_prog=missing
0c4a4063 7933 python_prefix=${with_python}
ec685c5e 7934 fi
e7a30f46 7935 elif test -x "${with_python}"; then
ec685c5e
DE
7936 # While we can't run python compiled for $host (unless host == build),
7937 # the user could write a script that provides the needed information,
7938 # so we support that.
ec685c5e 7939 python_prog=${with_python}
0c4a4063 7940 python_prefix=
ec685c5e
DE
7941 else
7942 as_fn_error "invalid value for --with-python" "$LINENO" 5
7943 fi
81ecdfbb 7944 ;;
ec685c5e
DE
7945 */*)
7946 # Disallow --with-python=foo/bar.
81ecdfbb
RW
7947 as_fn_error "invalid value for --with-python" "$LINENO" 5
7948 ;;
ec685c5e
DE
7949 *)
7950 # The user has either specified auto, yes, or the name of the python
7951 # program assumed to be in $PATH.
7952 python_prefix=
7953 case "${with_python}" in
7954 yes | auto)
7955 if test ${build} = ${host}; then
7956 # Extract the first word of "python", so it can be a program name with args.
7957set dummy python; ac_word=$2
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7959$as_echo_n "checking for $ac_word... " >&6; }
7960if test "${ac_cv_path_python_prog_path+set}" = set; then :
7961 $as_echo_n "(cached) " >&6
7962else
7963 case $python_prog_path in
7964 [\\/]* | ?:[\\/]*)
7965 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
7966 ;;
7967 *)
7968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7969for as_dir in $PATH
7970do
7971 IFS=$as_save_IFS
7972 test -z "$as_dir" && as_dir=.
7973 for ac_exec_ext in '' $ac_executable_extensions; do
7974 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7975 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
7976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7977 break 2
7978 fi
7979done
7980 done
7981IFS=$as_save_IFS
7982
7983 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
7984 ;;
7985esac
7986fi
7987python_prog_path=$ac_cv_path_python_prog_path
7988if test -n "$python_prog_path"; then
7989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
7990$as_echo "$python_prog_path" >&6; }
7991else
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7993$as_echo "no" >&6; }
7994fi
7995
7996
7997 if test "${python_prog_path}" = missing; then
7998 python_prog=missing
7999 else
8000 python_prog=${python_prog_path}
8001 fi
8002 else
8003 # Not much we can do except assume the cross-compiler will find the
8004 # right files.
8005 python_prog=missing
8006 fi
8007 ;;
8008 *)
8009 # While we can't run python compiled for $host (unless host == build),
8010 # the user could write a script that provides the needed information,
8011 # so we support that.
8012 python_prog="${with_python}"
8013 # Extract the first word of "${python_prog}", so it can be a program name with args.
8014set dummy ${python_prog}; ac_word=$2
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8016$as_echo_n "checking for $ac_word... " >&6; }
8017if test "${ac_cv_path_python_prog_path+set}" = set; then :
8018 $as_echo_n "(cached) " >&6
8019else
8020 case $python_prog_path in
8021 [\\/]* | ?:[\\/]*)
8022 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8023 ;;
8024 *)
8025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8026for as_dir in $PATH
8027do
8028 IFS=$as_save_IFS
8029 test -z "$as_dir" && as_dir=.
8030 for ac_exec_ext in '' $ac_executable_extensions; do
8031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8032 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8034 break 2
8035 fi
8036done
8037 done
8038IFS=$as_save_IFS
8039
8040 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8041 ;;
8042esac
8043fi
8044python_prog_path=$ac_cv_path_python_prog_path
8045if test -n "$python_prog_path"; then
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8047$as_echo "$python_prog_path" >&6; }
8048else
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8050$as_echo "no" >&6; }
8051fi
8052
8053
8054 if test "${python_prog_path}" = missing; then
8055 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8056 fi
8057 ;;
8058 esac
81ecdfbb
RW
8059 esac
8060
ec685c5e 8061 if test "${python_prog}" != missing; then
e7a30f46
DE
8062 # We have a python program to use, but it may be too old.
8063 # Don't flag an error for --with-python=auto (the default).
8064 have_python_config=yes
ec685c5e
DE
8065 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8066 if test $? != 0; then
e7a30f46
DE
8067 have_python_config=failed
8068 if test "${with_python}" != auto; then
8069 as_fn_error "failure running python-config --includes" "$LINENO" 5
8070 fi
ec685c5e
DE
8071 fi
8072 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8073 if test $? != 0; then
e7a30f46
DE
8074 have_python_config=failed
8075 if test "${with_python}" != auto; then
8076 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8077 fi
ec685c5e 8078 fi
0c4a4063
DE
8079 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8080 if test $? != 0; then
e7a30f46
DE
8081 have_python_config=failed
8082 if test "${with_python}" != auto; then
8083 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8084 fi
0c4a4063 8085 fi
ec685c5e 8086 else
ac534cba
JB
8087 # We do not have a python executable we can use to determine where
8088 # to find the Python headers and libs. We cannot guess the include
8089 # path from the python_prefix either, because that include path
8090 # depends on the Python version. So, there is nothing much we can
8091 # do except assume that the compiler will be able to find those files.
8092 python_includes=
8093 python_libs=
0c4a4063 8094 have_python_config=no
ec685c5e 8095 fi
bec39cab 8096
ec685c5e
DE
8097 # If we have python-config, only try the configuration it provides.
8098 # Otherwise fallback on the old way of trying different versions of
8099 # python in turn.
81ecdfbb 8100
ec685c5e
DE
8101 have_libpython=no
8102 if test "${have_python_config}" = yes; then
c1039e3c
JB
8103 # Determine the Python version by extracting "-lpython<version>"
8104 # part of the python_libs. <version> is usually X.Y with X and Y
8105 # being decimal numbers, but can also be XY (seen on Windows).
8106 #
8107 # The extraction is performed using sed with a regular expression.
8108 # Initially, the regexp used was using the '?' quantifier to make
8109 # the dot in the version number optional. Unfortunately, this
8110 # does not work with non-GNU versions of sed because, because of
8111 # what looks like a limitation (the '?' quantifier does not work
8112 # with back-references). We work around this limitation by using
8113 # the '*' quantifier instead. It means that, in theory, we might
8114 # match unexpected version strings such as "-lpython2..7", but
8115 # this seems unlikely in practice. And even if that happens,
8116 # an error will be triggered later on, when checking that version
8117 # number.
ec685c5e 8118 python_version=`echo " ${python_libs} " \
c1039e3c 8119 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8120 case "${python_version}" in
8121 python*)
ec685c5e
DE
8122
8123 version=${python_version}
8124
8125 new_CPPFLAGS=${python_includes}
8126 new_LIBS=${python_libs}
81ecdfbb
RW
8127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8128$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8129 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8130 save_LIBS=$LIBS
ec685c5e
DE
8131 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8132 LIBS="$LIBS $new_LIBS"
8133 found_usable_python=no
81ecdfbb 8134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8135/* end confdefs.h. */
ac534cba 8136#include "Python.h"
81ecdfbb
RW
8137int
8138main ()
8139{
8140Py_Initialize ();
8141 ;
8142 return 0;
8143}
bec39cab 8144_ACEOF
81ecdfbb 8145if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8146 have_libpython=${version}
8147 found_usable_python=yes
ac534cba
JB
8148 PYTHON_CPPFLAGS=$new_CPPFLAGS
8149 PYTHON_LIBS=$new_LIBS
9a156167 8150fi
81ecdfbb
RW
8151rm -f core conftest.err conftest.$ac_objext \
8152 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8153 CPPFLAGS=$save_CPPFLAGS
8154 LIBS=$save_LIBS
ec685c5e
DE
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8156$as_echo "${found_usable_python}" >&6; }
9a156167 8157
0c4a4063
DE
8158 ;;
8159 *)
ec685c5e 8160 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8161 ;;
8162 esac
e7a30f46 8163 elif test "${have_python_config}" != failed; then
ec685c5e 8164 if test "${have_libpython}" = no; then
9a156167 8165
420697bb
TT
8166 version=python2.7
8167
8168 new_CPPFLAGS=${python_includes}
8169 new_LIBS="${python_libs} -lpython2.7"
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8171$as_echo_n "checking for ${version}... " >&6; }
8172 save_CPPFLAGS=$CPPFLAGS
8173 save_LIBS=$LIBS
8174 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8175 LIBS="$LIBS $new_LIBS"
8176 found_usable_python=no
8177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178/* end confdefs.h. */
ac534cba 8179#include "Python.h"
420697bb
TT
8180int
8181main ()
8182{
8183Py_Initialize ();
8184 ;
8185 return 0;
8186}
8187_ACEOF
8188if ac_fn_c_try_link "$LINENO"; then :
8189 have_libpython=${version}
8190 found_usable_python=yes
ac534cba
JB
8191 PYTHON_CPPFLAGS=$new_CPPFLAGS
8192 PYTHON_LIBS=$new_LIBS
420697bb
TT
8193fi
8194rm -f core conftest.err conftest.$ac_objext \
8195 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8196 CPPFLAGS=$save_CPPFLAGS
8197 LIBS=$save_LIBS
420697bb
TT
8198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8199$as_echo "${found_usable_python}" >&6; }
8200
8201 fi
8202 if test "${have_libpython}" = no; then
8203
ec685c5e
DE
8204 version=python2.6
8205
8206 new_CPPFLAGS=${python_includes}
8207 new_LIBS="${python_libs} -lpython2.6"
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8209$as_echo_n "checking for ${version}... " >&6; }
8210 save_CPPFLAGS=$CPPFLAGS
8211 save_LIBS=$LIBS
8212 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8213 LIBS="$LIBS $new_LIBS"
8214 found_usable_python=no
8215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216/* end confdefs.h. */
ac534cba 8217#include "Python.h"
ec685c5e
DE
8218int
8219main ()
8220{
8221Py_Initialize ();
8222 ;
8223 return 0;
8224}
8225_ACEOF
8226if ac_fn_c_try_link "$LINENO"; then :
8227 have_libpython=${version}
8228 found_usable_python=yes
ac534cba
JB
8229 PYTHON_CPPFLAGS=$new_CPPFLAGS
8230 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8231fi
8232rm -f core conftest.err conftest.$ac_objext \
8233 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8234 CPPFLAGS=$save_CPPFLAGS
8235 LIBS=$save_LIBS
ec685c5e
DE
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8237$as_echo "${found_usable_python}" >&6; }
9a156167 8238
81ecdfbb 8239 fi
ec685c5e 8240 if test ${have_libpython} = no; then
9a156167 8241
81ecdfbb 8242 version=python2.5
9a156167 8243
ec685c5e
DE
8244 new_CPPFLAGS=${python_includes}
8245 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8247$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8248 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8249 save_LIBS=$LIBS
ec685c5e
DE
8250 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8251 LIBS="$LIBS $new_LIBS"
8252 found_usable_python=no
81ecdfbb 8253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8254/* end confdefs.h. */
ac534cba 8255#include "Python.h"
81ecdfbb
RW
8256int
8257main ()
8258{
8259Py_Initialize ();
8260 ;
8261 return 0;
8262}
436868fb 8263_ACEOF
81ecdfbb 8264if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8265 have_libpython=${version}
8266 found_usable_python=yes
ac534cba
JB
8267 PYTHON_CPPFLAGS=$new_CPPFLAGS
8268 PYTHON_LIBS=$new_LIBS
436868fb 8269fi
81ecdfbb
RW
8270rm -f core conftest.err conftest.$ac_objext \
8271 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8272 CPPFLAGS=$save_CPPFLAGS
8273 LIBS=$save_LIBS
ec685c5e
DE
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8275$as_echo "${found_usable_python}" >&6; }
a9322a30 8276
81ecdfbb 8277 fi
ec685c5e 8278 if test ${have_libpython} = no; then
a9322a30 8279
81ecdfbb 8280 version=python2.4
a9322a30 8281
ec685c5e
DE
8282 new_CPPFLAGS=${python_includes}
8283 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8285$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8286 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8287 save_LIBS=$LIBS
ec685c5e
DE
8288 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8289 LIBS="$LIBS $new_LIBS"
8290 found_usable_python=no
81ecdfbb 8291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8292/* end confdefs.h. */
ac534cba 8293#include "Python.h"
a9322a30
TT
8294int
8295main ()
8296{
81ecdfbb 8297Py_Initialize ();
a9322a30
TT
8298 ;
8299 return 0;
8300}
436868fb 8301_ACEOF
81ecdfbb 8302if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8303 have_libpython=${version}
8304 found_usable_python=yes
ac534cba
JB
8305 PYTHON_CPPFLAGS=$new_CPPFLAGS
8306 PYTHON_LIBS=$new_LIBS
436868fb 8307fi
81ecdfbb
RW
8308rm -f core conftest.err conftest.$ac_objext \
8309 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8310 CPPFLAGS=$save_CPPFLAGS
8311 LIBS=$save_LIBS
ec685c5e
DE
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8313$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8314
ec685c5e
DE
8315 fi
8316 fi
9c4ea6c5 8317 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8318
8319$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8320
9c4ea6c5 8321 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8322
8323$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8324
9c4ea6c5 8325 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8326
8327$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8328
9c4ea6c5 8329 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8330
8331$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8332
81ecdfbb 8333 fi
ec685c5e
DE
8334
8335 if test "${have_libpython}" = no; then
81ecdfbb
RW
8336 case "${with_python}" in
8337 yes)
8338 as_fn_error "python is missing or unusable" "$LINENO" 5
8339 ;;
8340 auto)
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8342$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8343 ;;
8344 *)
8345 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8346 ;;
8347 esac
0c4a4063
DE
8348 else
8349 if test -n "${python_prefix}"; then
8350
8351cat >>confdefs.h <<_ACEOF
8352#define WITH_PYTHON_PATH "${python_prefix}"
8353_ACEOF
8354
8355
8356 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8357 if test "x$prefix" = xNONE; then
8358 test_prefix=/usr/local
8359 else
8360 test_prefix=$prefix
8361 fi
8362 else
8363 test_prefix=$exec_prefix
8364 fi
8365 value=0
8366 case ${python_prefix} in
8367 "${test_prefix}"|"${test_prefix}/"*|\
8368 '${exec_prefix}'|'${exec_prefix}/'*)
8369 value=1
8370 ;;
8371 esac
8372
8373cat >>confdefs.h <<_ACEOF
8374#define PYTHON_PATH_RELOCATABLE $value
8375_ACEOF
8376
8377
8378 fi
81ecdfbb 8379 fi
436868fb 8380fi
436868fb 8381
ec685c5e 8382if test "${have_libpython}" != no; then
436868fb 8383
81ecdfbb 8384$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8385
81ecdfbb
RW
8386 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8387 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8388 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8389 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8390 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8391
81ecdfbb
RW
8392 # Flags needed to compile Python code (taken from python-config --cflags).
8393 # We cannot call python-config directly because it will output whatever was
8394 # used when compiling the Python interpreter itself, including flags which
8395 # would make the python-related objects be compiled differently from the
8396 # rest of GDB (e.g., -O2 and -fPIC).
8397 if test "${GCC}" = yes; then
8398 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8399 fi
436868fb 8400
81ecdfbb
RW
8401 if test "x${tentative_python_cflags}" != x; then
8402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8403$as_echo_n "checking compiler flags for python code... " >&6; }
8404 for flag in ${tentative_python_cflags}; do
8405 # Check that the compiler accepts it
8406 saved_CFLAGS="$CFLAGS"
8407 CFLAGS="$CFLAGS $flag"
8408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8409/* end confdefs.h. */
81ecdfbb 8410
a9322a30
TT
8411int
8412main ()
8413{
a9322a30
TT
8414
8415 ;
8416 return 0;
8417}
bec39cab 8418_ACEOF
81ecdfbb
RW
8419if ac_fn_c_try_compile "$LINENO"; then :
8420 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8421fi
81ecdfbb
RW
8422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8423 CFLAGS="$saved_CFLAGS"
8424 done
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8426$as_echo "${PYTHON_CFLAGS}" >&6; }
8427 fi
043b6510
JB
8428
8429 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8430 # #if _SGIAPI
8431 # #define siginfo __siginfo
8432 # #endif
8433 # The problem is that including Python causes some XOPEN macros to be
8434 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8435 # to false. So, we work around this issue by defining siginfo ourself
8436 # though the command-line.
8437 case "$gdb_host" in
8438 irix*) if test "${GCC}" = yes; then
8439 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8440 fi
8441 ;;
8442 esac
81ecdfbb
RW
8443else
8444 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8445 # included.
8446 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8447 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8448 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8449fi
9a156167 8450
9a156167 8451
ac534cba
JB
8452
8453
81ecdfbb
RW
8454# ------------------------- #
8455# Checks for header files. #
8456# ------------------------- #
c890192f 8457
81ecdfbb
RW
8458ac_header_dirent=no
8459for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8460 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8462$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8464 $as_echo_n "(cached) " >&6
bec39cab 8465else
81ecdfbb 8466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8467/* end confdefs.h. */
81ecdfbb
RW
8468#include <sys/types.h>
8469#include <$ac_hdr>
8470
a9322a30
TT
8471int
8472main ()
8473{
81ecdfbb
RW
8474if ((DIR *) 0)
8475return 0;
a9322a30
TT
8476 ;
8477 return 0;
8478}
bec39cab 8479_ACEOF
81ecdfbb
RW
8480if ac_fn_c_try_compile "$LINENO"; then :
8481 eval "$as_ac_Header=yes"
bec39cab 8482else
81ecdfbb 8483 eval "$as_ac_Header=no"
bec39cab 8484fi
81ecdfbb 8485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8486fi
81ecdfbb
RW
8487eval ac_res=\$$as_ac_Header
8488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8489$as_echo "$ac_res" >&6; }
8490eval as_val=\$$as_ac_Header
8491 if test "x$as_val" = x""yes; then :
8492 cat >>confdefs.h <<_ACEOF
8493#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8494_ACEOF
bec39cab 8495
81ecdfbb
RW
8496ac_header_dirent=$ac_hdr; break
8497fi
bec39cab 8498
81ecdfbb
RW
8499done
8500# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8501if test $ac_header_dirent = dirent.h; then
8502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8503$as_echo_n "checking for library containing opendir... " >&6; }
8504if test "${ac_cv_search_opendir+set}" = set; then :
8505 $as_echo_n "(cached) " >&6
c890192f 8506else
81ecdfbb
RW
8507 ac_func_search_save_LIBS=$LIBS
8508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8509/* end confdefs.h. */
8510
8511/* Override any GCC internal prototype to avoid an error.
8512 Use char because int might match the return type of a GCC
8513 builtin and then its argument prototype would still apply. */
8514#ifdef __cplusplus
8515extern "C"
8516#endif
8517char opendir ();
8518int
8519main ()
8520{
8521return opendir ();
8522 ;
8523 return 0;
8524}
bec39cab 8525_ACEOF
81ecdfbb
RW
8526for ac_lib in '' dir; do
8527 if test -z "$ac_lib"; then
8528 ac_res="none required"
8529 else
8530 ac_res=-l$ac_lib
8531 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8532 fi
8533 if ac_fn_c_try_link "$LINENO"; then :
8534 ac_cv_search_opendir=$ac_res
8535fi
8536rm -f core conftest.err conftest.$ac_objext \
8537 conftest$ac_exeext
8538 if test "${ac_cv_search_opendir+set}" = set; then :
8539 break
8540fi
8541done
8542if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8543
81ecdfbb
RW
8544else
8545 ac_cv_search_opendir=no
8546fi
8547rm conftest.$ac_ext
8548LIBS=$ac_func_search_save_LIBS
8549fi
8550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8551$as_echo "$ac_cv_search_opendir" >&6; }
8552ac_res=$ac_cv_search_opendir
8553if test "$ac_res" != no; then :
8554 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8555
bec39cab 8556fi
81ecdfbb 8557
bec39cab 8558else
81ecdfbb
RW
8559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8560$as_echo_n "checking for library containing opendir... " >&6; }
8561if test "${ac_cv_search_opendir+set}" = set; then :
8562 $as_echo_n "(cached) " >&6
8563else
8564 ac_func_search_save_LIBS=$LIBS
8565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8566/* end confdefs.h. */
81ecdfbb
RW
8567
8568/* Override any GCC internal prototype to avoid an error.
8569 Use char because int might match the return type of a GCC
8570 builtin and then its argument prototype would still apply. */
8571#ifdef __cplusplus
8572extern "C"
8573#endif
8574char opendir ();
a9322a30
TT
8575int
8576main ()
8577{
81ecdfbb 8578return opendir ();
a9322a30
TT
8579 ;
8580 return 0;
8581}
bec39cab 8582_ACEOF
81ecdfbb
RW
8583for ac_lib in '' x; do
8584 if test -z "$ac_lib"; then
8585 ac_res="none required"
8586 else
8587 ac_res=-l$ac_lib
8588 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8589 fi
8590 if ac_fn_c_try_link "$LINENO"; then :
8591 ac_cv_search_opendir=$ac_res
8592fi
8593rm -f core conftest.err conftest.$ac_objext \
8594 conftest$ac_exeext
8595 if test "${ac_cv_search_opendir+set}" = set; then :
8596 break
8597fi
8598done
8599if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8600
81ecdfbb
RW
8601else
8602 ac_cv_search_opendir=no
bec39cab 8603fi
81ecdfbb
RW
8604rm conftest.$ac_ext
8605LIBS=$ac_func_search_save_LIBS
a9322a30 8606fi
81ecdfbb
RW
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8608$as_echo "$ac_cv_search_opendir" >&6; }
8609ac_res=$ac_cv_search_opendir
8610if test "$ac_res" != no; then :
8611 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8612
81ecdfbb 8613fi
bec39cab 8614
81ecdfbb 8615fi
bec39cab 8616
81ecdfbb
RW
8617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8618$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
8619if test "${ac_cv_header_stat_broken+set}" = set; then :
8620 $as_echo_n "(cached) " >&6
9a156167 8621else
81ecdfbb
RW
8622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8623/* end confdefs.h. */
8624#include <sys/types.h>
8625#include <sys/stat.h>
8626
8627#if defined S_ISBLK && defined S_IFDIR
8628extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8629#endif
8630
8631#if defined S_ISBLK && defined S_IFCHR
8632extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8633#endif
8634
8635#if defined S_ISLNK && defined S_IFREG
8636extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8637#endif
8638
8639#if defined S_ISSOCK && defined S_IFREG
8640extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8641#endif
8642
bec39cab 8643_ACEOF
81ecdfbb
RW
8644if ac_fn_c_try_compile "$LINENO"; then :
8645 ac_cv_header_stat_broken=no
8646else
8647 ac_cv_header_stat_broken=yes
8648fi
8649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8650fi
8651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8652$as_echo "$ac_cv_header_stat_broken" >&6; }
8653if test $ac_cv_header_stat_broken = yes; then
9a156167 8654
81ecdfbb 8655$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
06825bd1 8656
bec39cab 8657fi
81ecdfbb
RW
8658
8659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8660$as_echo_n "checking for ANSI C header files... " >&6; }
8661if test "${ac_cv_header_stdc+set}" = set; then :
8662 $as_echo_n "(cached) " >&6
bec39cab 8663else
81ecdfbb 8664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8665/* end confdefs.h. */
81ecdfbb
RW
8666#include <stdlib.h>
8667#include <stdarg.h>
8668#include <string.h>
8669#include <float.h>
8670
a9322a30
TT
8671int
8672main ()
8673{
a9322a30
TT
8674
8675 ;
8676 return 0;
8677}
bec39cab 8678_ACEOF
81ecdfbb
RW
8679if ac_fn_c_try_compile "$LINENO"; then :
8680 ac_cv_header_stdc=yes
bec39cab 8681else
81ecdfbb 8682 ac_cv_header_stdc=no
a9322a30 8683fi
81ecdfbb 8684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8685
81ecdfbb
RW
8686if test $ac_cv_header_stdc = yes; then
8687 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8689/* end confdefs.h. */
8690#include <string.h>
bec39cab 8691
81ecdfbb
RW
8692_ACEOF
8693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8694 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8695
bec39cab 8696else
81ecdfbb
RW
8697 ac_cv_header_stdc=no
8698fi
8699rm -f conftest*
8700
8701fi
8702
8703if test $ac_cv_header_stdc = yes; then
8704 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8706/* end confdefs.h. */
8707#include <stdlib.h>
8708
bec39cab 8709_ACEOF
81ecdfbb
RW
8710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8711 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8712
81ecdfbb
RW
8713else
8714 ac_cv_header_stdc=no
8715fi
8716rm -f conftest*
bec39cab 8717
bec39cab 8718fi
81ecdfbb
RW
8719
8720if test $ac_cv_header_stdc = yes; then
8721 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8722 if test "$cross_compiling" = yes; then :
8723 :
bec39cab 8724else
81ecdfbb 8725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8726/* end confdefs.h. */
81ecdfbb
RW
8727#include <ctype.h>
8728#include <stdlib.h>
8729#if ((' ' & 0x0FF) == 0x020)
8730# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8731# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8732#else
8733# define ISLOWER(c) \
8734 (('a' <= (c) && (c) <= 'i') \
8735 || ('j' <= (c) && (c) <= 'r') \
8736 || ('s' <= (c) && (c) <= 'z'))
8737# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8738#endif
8739
8740#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8741int
8742main ()
8743{
81ecdfbb
RW
8744 int i;
8745 for (i = 0; i < 256; i++)
8746 if (XOR (islower (i), ISLOWER (i))
8747 || toupper (i) != TOUPPER (i))
8748 return 2;
a9322a30
TT
8749 return 0;
8750}
bec39cab 8751_ACEOF
81ecdfbb
RW
8752if ac_fn_c_try_run "$LINENO"; then :
8753
bec39cab 8754else
81ecdfbb
RW
8755 ac_cv_header_stdc=no
8756fi
8757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8758 conftest.$ac_objext conftest.beam conftest.$ac_ext
8759fi
bec39cab 8760
bec39cab 8761fi
a9322a30 8762fi
81ecdfbb
RW
8763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8764$as_echo "$ac_cv_header_stdc" >&6; }
8765if test $ac_cv_header_stdc = yes; then
bec39cab 8766
81ecdfbb 8767$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8768
81ecdfbb 8769fi
bec39cab 8770
81ecdfbb
RW
8771# elf_hp.h is for HP/UX 64-bit shared library support.
8772# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
8773# unconditionally, so what's the point in checking these?
8774for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8775 thread_db.h gnu/libc-version.h signal.h stddef.h \
8776 stdlib.h string.h memory.h strings.h sys/fault.h \
8777 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8778 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8779 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8780 sys/types.h sys/wait.h wait.h termios.h termio.h \
a2d08b9e 8781 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \
2fa291ac 8782 dlfcn.h sys/socket.h sys/un.h
81ecdfbb
RW
8783do :
8784 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8785ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8786eval as_val=\$$as_ac_Header
8787 if test "x$as_val" = x""yes; then :
bec39cab 8788 cat >>confdefs.h <<_ACEOF
81ecdfbb 8789#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8790_ACEOF
c906108c 8791
bec39cab 8792fi
81ecdfbb
RW
8793
8794done
8795
8796for ac_header in link.h
8797do :
8798 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8799# include <sys/types.h>
8800#endif
8801#if HAVE_NLIST_H
8802# include <nlist.h>
a9322a30
TT
8803#endif
8804
81ecdfbb
RW
8805"
8806if test "x$ac_cv_header_link_h" = x""yes; then :
8807 cat >>confdefs.h <<_ACEOF
8808#define HAVE_LINK_H 1
bec39cab 8809_ACEOF
bec39cab 8810
a9322a30 8811fi
bec39cab 8812
81ecdfbb 8813done
c906108c 8814
81ecdfbb
RW
8815for ac_header in sys/proc.h
8816do :
8817 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8818# include <sys/param.h>
8819#endif
c906108c 8820
81ecdfbb
RW
8821"
8822if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8823 cat >>confdefs.h <<_ACEOF
81ecdfbb 8824#define HAVE_SYS_PROC_H 1
bec39cab 8825_ACEOF
5ee754fc 8826
bec39cab 8827fi
81ecdfbb
RW
8828
8829done
8830
8831for ac_header in sys/user.h
8832do :
8833 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8834# include <sys/param.h>
a9322a30
TT
8835#endif
8836
81ecdfbb
RW
8837"
8838if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8839 cat >>confdefs.h <<_ACEOF
8840#define HAVE_SYS_USER_H 1
bec39cab 8841_ACEOF
bec39cab 8842
a9322a30 8843fi
bec39cab 8844
81ecdfbb 8845done
5ee754fc 8846
5ee754fc 8847
81ecdfbb
RW
8848# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8849# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8850# think that we don't have <curses.h> if we're using GCC.
8851case $host_os in
8852 solaris2.[789])
8853 if test "$GCC" = yes; then
8854
8855$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8856
8857 fi ;;
8858esac
8859for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8860do :
8861 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8862ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8863eval as_val=\$$as_ac_Header
8864 if test "x$as_val" = x""yes; then :
bec39cab 8865 cat >>confdefs.h <<_ACEOF
81ecdfbb 8866#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8867_ACEOF
5ee754fc
MK
8868
8869fi
8870
81ecdfbb 8871done
bec39cab 8872
81ecdfbb
RW
8873for ac_header in term.h
8874do :
8875 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8876# include <curses.h>
8877#endif
bec39cab 8878
81ecdfbb
RW
8879"
8880if test "x$ac_cv_header_term_h" = x""yes; then :
8881 cat >>confdefs.h <<_ACEOF
8882#define HAVE_TERM_H 1
a8111142 8883_ACEOF
a8111142 8884
a8111142 8885fi
a8111142 8886
81ecdfbb 8887done
a8111142
TT
8888
8889
81ecdfbb
RW
8890# ------------------------- #
8891# Checks for declarations. #
8892# ------------------------- #
a9322a30 8893
81ecdfbb
RW
8894ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8895if test "x$ac_cv_have_decl_free" = x""yes; then :
8896 ac_have_decl=1
bec39cab 8897else
81ecdfbb
RW
8898 ac_have_decl=0
8899fi
8900
8901cat >>confdefs.h <<_ACEOF
8902#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8903_ACEOF
81ecdfbb
RW
8904ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8905if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8906 ac_have_decl=1
8907else
8908 ac_have_decl=0
8909fi
8910
8911cat >>confdefs.h <<_ACEOF
8912#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 8913_ACEOF
81ecdfbb
RW
8914ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
8915if test "x$ac_cv_have_decl_realloc" = x""yes; then :
8916 ac_have_decl=1
bec39cab 8917else
81ecdfbb
RW
8918 ac_have_decl=0
8919fi
bec39cab 8920
81ecdfbb
RW
8921cat >>confdefs.h <<_ACEOF
8922#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 8923_ACEOF
81ecdfbb
RW
8924ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
8925if test "x$ac_cv_have_decl_strerror" = x""yes; then :
8926 ac_have_decl=1
8927else
8928 ac_have_decl=0
8929fi
8930
8931cat >>confdefs.h <<_ACEOF
8932#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 8933_ACEOF
81ecdfbb
RW
8934ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
8935if test "x$ac_cv_have_decl_strstr" = x""yes; then :
8936 ac_have_decl=1
bec39cab 8937else
81ecdfbb
RW
8938 ac_have_decl=0
8939fi
5ee754fc 8940
81ecdfbb
RW
8941cat >>confdefs.h <<_ACEOF
8942#define HAVE_DECL_STRSTR $ac_have_decl
8943_ACEOF
8944ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
8945if test "x$ac_cv_have_decl_getopt" = x""yes; then :
8946 ac_have_decl=1
8947else
8948 ac_have_decl=0
5ee754fc 8949fi
81ecdfbb
RW
8950
8951cat >>confdefs.h <<_ACEOF
8952#define HAVE_DECL_GETOPT $ac_have_decl
8953_ACEOF
8954ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
8955if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
8956 ac_have_decl=1
8957else
8958 ac_have_decl=0
5ee754fc 8959fi
81ecdfbb
RW
8960
8961cat >>confdefs.h <<_ACEOF
8962#define HAVE_DECL_SNPRINTF $ac_have_decl
8963_ACEOF
8964ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
8965if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
8966 ac_have_decl=1
8967else
8968 ac_have_decl=0
5ee754fc
MK
8969fi
8970
a9322a30 8971cat >>confdefs.h <<_ACEOF
81ecdfbb 8972#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 8973_ACEOF
5ee754fc 8974
5ee754fc 8975
81ecdfbb
RW
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
8977$as_echo_n "checking for LC_MESSAGES... " >&6; }
8978if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
8979 $as_echo_n "(cached) " >&6
bec39cab 8980else
81ecdfbb 8981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8982/* end confdefs.h. */
81ecdfbb 8983#include <locale.h>
a9322a30
TT
8984int
8985main ()
8986{
81ecdfbb 8987return LC_MESSAGES
a9322a30
TT
8988 ;
8989 return 0;
8990}
bec39cab 8991_ACEOF
81ecdfbb
RW
8992if ac_fn_c_try_link "$LINENO"; then :
8993 am_cv_val_LC_MESSAGES=yes
bec39cab 8994else
81ecdfbb
RW
8995 am_cv_val_LC_MESSAGES=no
8996fi
8997rm -f core conftest.err conftest.$ac_objext \
8998 conftest$ac_exeext conftest.$ac_ext
8999fi
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9001$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9002 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9003
81ecdfbb
RW
9004$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9005
9006 fi
9007
9008
9009# ----------------------- #
9010# Checks for structures. #
9011# ----------------------- #
9012
9013ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9014if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9015
9016cat >>confdefs.h <<_ACEOF
9017#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9018_ACEOF
7eb368b3 9019
81ecdfbb 9020
7eb368b3 9021fi
81ecdfbb
RW
9022ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9023if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9024
a9322a30
TT
9025cat >>confdefs.h <<_ACEOF
9026#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9027_ACEOF
9028
a9322a30 9029
7eb368b3
NR
9030fi
9031
7eb368b3 9032
a9322a30
TT
9033# ------------------ #
9034# Checks for types. #
9035# ------------------ #
7eb368b3 9036
81ecdfbb
RW
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9038$as_echo_n "checking return type of signal handlers... " >&6; }
9039if test "${ac_cv_type_signal+set}" = set; then :
9040 $as_echo_n "(cached) " >&6
bec39cab 9041else
81ecdfbb 9042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9043/* end confdefs.h. */
a9322a30
TT
9044#include <sys/types.h>
9045#include <signal.h>
7cb9022a 9046
a9322a30
TT
9047int
9048main ()
9049{
81ecdfbb 9050return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9051 ;
9052 return 0;
9053}
bec39cab 9054_ACEOF
81ecdfbb
RW
9055if ac_fn_c_try_compile "$LINENO"; then :
9056 ac_cv_type_signal=int
bec39cab 9057else
81ecdfbb 9058 ac_cv_type_signal=void
bec39cab 9059fi
81ecdfbb 9060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9061fi
81ecdfbb
RW
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9063$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9064
a9322a30
TT
9065cat >>confdefs.h <<_ACEOF
9066#define RETSIGTYPE $ac_cv_type_signal
9067_ACEOF
5ee754fc 9068
bec39cab 9069
81ecdfbb 9070ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9071#include <sys/socket.h>
9072
81ecdfbb
RW
9073"
9074if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9075
a9322a30
TT
9076cat >>confdefs.h <<_ACEOF
9077#define HAVE_SOCKLEN_T 1
9078_ACEOF
9079
9080
9081fi
9082
9083
9084# ------------------------------------- #
9085# Checks for compiler characteristics. #
9086# ------------------------------------- #
9087
81ecdfbb
RW
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9089$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9090if test "${ac_cv_c_const+set}" = set; then :
9091 $as_echo_n "(cached) " >&6
a9322a30 9092else
81ecdfbb 9093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9094/* end confdefs.h. */
a9322a30
TT
9095
9096int
9097main ()
9098{
9099/* FIXME: Include the comments suggested by Paul. */
9100#ifndef __cplusplus
9101 /* Ultrix mips cc rejects this. */
9102 typedef int charset[2];
81ecdfbb 9103 const charset cs;
a9322a30 9104 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9105 char const *const *pcpcc;
9106 char **ppc;
a9322a30
TT
9107 /* NEC SVR4.0.2 mips cc rejects this. */
9108 struct point {int x, y;};
9109 static struct point const zero = {0,0};
9110 /* AIX XL C 1.02.0.0 rejects this.
9111 It does not let you subtract one const X* pointer from another in
9112 an arm of an if-expression whose if-part is not a constant
9113 expression */
9114 const char *g = "string";
81ecdfbb 9115 pcpcc = &g + (g ? g-g : 0);
a9322a30 9116 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9117 ++pcpcc;
9118 ppc = (char**) pcpcc;
9119 pcpcc = (char const *const *) ppc;
a9322a30
TT
9120 { /* SCO 3.2v4 cc rejects this. */
9121 char *t;
9122 char const *s = 0 ? (char *) 0 : (char const *) 0;
9123
9124 *t++ = 0;
81ecdfbb 9125 if (s) return 0;
a9322a30
TT
9126 }
9127 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9128 int x[] = {25, 17};
9129 const int *foo = &x[0];
9130 ++foo;
9131 }
9132 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9133 typedef const int *iptr;
9134 iptr p = 0;
9135 ++p;
9136 }
9137 { /* AIX XL C 1.02.0.0 rejects this saying
9138 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9139 struct s { int j; const int *ap[3]; };
9140 struct s *b; b->j = 5;
9141 }
9142 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9143 const int foo = 10;
81ecdfbb 9144 if (!foo) return 0;
a9322a30 9145 }
81ecdfbb 9146 return !cs[0] && !zero.x;
a9322a30
TT
9147#endif
9148
9149 ;
9150 return 0;
9151}
bec39cab 9152_ACEOF
81ecdfbb 9153if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9154 ac_cv_c_const=yes
5ee754fc 9155else
81ecdfbb 9156 ac_cv_c_const=no
5ee754fc 9157fi
81ecdfbb 9158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9159fi
81ecdfbb
RW
9160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9161$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9162if test $ac_cv_c_const = no; then
bec39cab 9163
81ecdfbb 9164$as_echo "#define const /**/" >>confdefs.h
bec39cab 9165
5ee754fc 9166fi
bec39cab 9167
81ecdfbb
RW
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9169$as_echo_n "checking for inline... " >&6; }
9170if test "${ac_cv_c_inline+set}" = set; then :
9171 $as_echo_n "(cached) " >&6
bec39cab 9172else
a9322a30
TT
9173 ac_cv_c_inline=no
9174for ac_kw in inline __inline__ __inline; do
81ecdfbb 9175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9176/* end confdefs.h. */
a9322a30
TT
9177#ifndef __cplusplus
9178typedef int foo_t;
9179static $ac_kw foo_t static_foo () {return 0; }
9180$ac_kw foo_t foo () {return 0; }
9181#endif
9182
bec39cab 9183_ACEOF
81ecdfbb
RW
9184if ac_fn_c_try_compile "$LINENO"; then :
9185 ac_cv_c_inline=$ac_kw
bec39cab 9186fi
81ecdfbb
RW
9187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9188 test "$ac_cv_c_inline" != no && break
a9322a30 9189done
bec39cab 9190
5ee754fc 9191fi
81ecdfbb
RW
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9193$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9194
a9322a30
TT
9195case $ac_cv_c_inline in
9196 inline | yes) ;;
9197 *)
9198 case $ac_cv_c_inline in
9199 no) ac_val=;;
9200 *) ac_val=$ac_cv_c_inline;;
9201 esac
9202 cat >>confdefs.h <<_ACEOF
9203#ifndef __cplusplus
9204#define inline $ac_val
9205#endif
9206_ACEOF
bec39cab
AC
9207 ;;
9208esac
bec39cab 9209
81ecdfbb
RW
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9211$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9212if test "${ac_cv_c_bigendian+set}" = set; then :
9213 $as_echo_n "(cached) " >&6
bec39cab 9214else
81ecdfbb
RW
9215 ac_cv_c_bigendian=unknown
9216 # See if we're dealing with a universal compiler.
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218/* end confdefs.h. */
9219#ifndef __APPLE_CC__
9220 not a universal capable compiler
9221 #endif
9222 typedef int dummy;
9223
9224_ACEOF
9225if ac_fn_c_try_compile "$LINENO"; then :
9226
9227 # Check for potential -arch flags. It is not universal unless
9228 # there are at least two -arch flags with different values.
9229 ac_arch=
9230 ac_prev=
9231 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9232 if test -n "$ac_prev"; then
9233 case $ac_word in
9234 i?86 | x86_64 | ppc | ppc64)
9235 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9236 ac_arch=$ac_word
9237 else
9238 ac_cv_c_bigendian=universal
9239 break
9240 fi
9241 ;;
9242 esac
9243 ac_prev=
9244 elif test "x$ac_word" = "x-arch"; then
9245 ac_prev=arch
9246 fi
9247 done
9248fi
9249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9250 if test $ac_cv_c_bigendian = unknown; then
9251 # See if sys/param.h defines the BYTE_ORDER macro.
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{
81ecdfbb
RW
9260#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9261 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9262 && LITTLE_ENDIAN)
9263 bogus endian macros
9264 #endif
a9322a30
TT
9265
9266 ;
9267 return 0;
9268}
bec39cab 9269_ACEOF
81ecdfbb 9270if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9271 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9273/* end confdefs.h. */
a9322a30 9274#include <sys/types.h>
81ecdfbb 9275 #include <sys/param.h>
a9322a30
TT
9276
9277int
9278main ()
9279{
9280#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9281 not big endian
9282 #endif
a9322a30
TT
9283
9284 ;
9285 return 0;
9286}
bec39cab 9287_ACEOF
81ecdfbb 9288if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9289 ac_cv_c_bigendian=yes
5ee754fc 9290else
81ecdfbb 9291 ac_cv_c_bigendian=no
5ee754fc 9292fi
81ecdfbb
RW
9293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9294fi
9295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9296 fi
9297 if test $ac_cv_c_bigendian = unknown; then
9298 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9300/* end confdefs.h. */
9301#include <limits.h>
bec39cab 9302
81ecdfbb
RW
9303int
9304main ()
9305{
9306#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9307 bogus endian macros
9308 #endif
9309
9310 ;
9311 return 0;
9312}
7eb368b3 9313_ACEOF
81ecdfbb
RW
9314if ac_fn_c_try_compile "$LINENO"; then :
9315 # It does; now see whether it defined to _BIG_ENDIAN or not.
9316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9317/* end confdefs.h. */
81ecdfbb
RW
9318#include <limits.h>
9319
7eb368b3
NR
9320int
9321main ()
9322{
81ecdfbb
RW
9323#ifndef _BIG_ENDIAN
9324 not big endian
9325 #endif
9326
7eb368b3
NR
9327 ;
9328 return 0;
9329}
9330_ACEOF
81ecdfbb 9331if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9332 ac_cv_c_bigendian=yes
81ecdfbb
RW
9333else
9334 ac_cv_c_bigendian=no
a9322a30 9335fi
81ecdfbb 9336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9337fi
81ecdfbb
RW
9338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9339 fi
9340 if test $ac_cv_c_bigendian = unknown; then
9341 # Compile a test program.
9342 if test "$cross_compiling" = yes; then :
9343 # Try to guess by grepping values from an object file.
9344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9345/* end confdefs.h. */
9346short int ascii_mm[] =
9347 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9348 short int ascii_ii[] =
9349 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9350 int use_ascii (int i) {
9351 return ascii_mm[i] + ascii_ii[i];
9352 }
9353 short int ebcdic_ii[] =
9354 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9355 short int ebcdic_mm[] =
9356 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9357 int use_ebcdic (int i) {
9358 return ebcdic_mm[i] + ebcdic_ii[i];
9359 }
9360 extern int foo;
7eb368b3 9361
81ecdfbb
RW
9362int
9363main ()
9364{
9365return use_ascii (foo) == use_ebcdic (foo);
9366 ;
9367 return 0;
9368}
9369_ACEOF
9370if ac_fn_c_try_compile "$LINENO"; then :
9371 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9372 ac_cv_c_bigendian=yes
9373 fi
9374 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9375 if test "$ac_cv_c_bigendian" = unknown; then
9376 ac_cv_c_bigendian=no
9377 else
9378 # finding both strings is unlikely to happen, but who knows?
9379 ac_cv_c_bigendian=unknown
9380 fi
9381 fi
7eb368b3 9382fi
81ecdfbb 9383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9384else
81ecdfbb 9385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9386/* end confdefs.h. */
81ecdfbb 9387$ac_includes_default
d3ea6809
MM
9388int
9389main ()
9390{
81ecdfbb
RW
9391
9392 /* Are we little or big endian? From Harbison&Steele. */
9393 union
9394 {
9395 long int l;
9396 char c[sizeof (long int)];
9397 } u;
9398 u.l = 1;
9399 return u.c[sizeof (long int) - 1] == 1;
9400
9401 ;
9402 return 0;
d3ea6809
MM
9403}
9404_ACEOF
81ecdfbb 9405if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9406 ac_cv_c_bigendian=no
d3ea6809 9407else
81ecdfbb 9408 ac_cv_c_bigendian=yes
d3ea6809 9409fi
81ecdfbb
RW
9410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9411 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9412fi
a9322a30 9413
81ecdfbb
RW
9414 fi
9415fi
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9417$as_echo "$ac_cv_c_bigendian" >&6; }
9418 case $ac_cv_c_bigendian in #(
9419 yes)
9420 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9421;; #(
9422 no)
9423 ;; #(
9424 universal)
9425
9426$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9427
9428 ;; #(
9429 *)
9430 as_fn_error "unknown endianness
9431 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9432 esac
d3ea6809
MM
9433
9434
a9322a30
TT
9435# ------------------------------ #
9436# Checks for library functions. #
9437# ------------------------------ #
d3ea6809 9438
a9322a30
TT
9439# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9440# for constant arguments. Useless!
81ecdfbb
RW
9441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9442$as_echo_n "checking for working alloca.h... " >&6; }
9443if test "${ac_cv_working_alloca_h+set}" = set; then :
9444 $as_echo_n "(cached) " >&6
d3ea6809 9445else
81ecdfbb 9446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9447/* end confdefs.h. */
a9322a30 9448#include <alloca.h>
bec39cab
AC
9449int
9450main ()
9451{
a9322a30 9452char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9453 if (p) return 0;
bec39cab
AC
9454 ;
9455 return 0;
9456}
9457_ACEOF
81ecdfbb 9458if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9459 ac_cv_working_alloca_h=yes
bec39cab 9460else
81ecdfbb 9461 ac_cv_working_alloca_h=no
bec39cab 9462fi
81ecdfbb
RW
9463rm -f core conftest.err conftest.$ac_objext \
9464 conftest$ac_exeext conftest.$ac_ext
bec39cab 9465fi
81ecdfbb
RW
9466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9467$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9468if test $ac_cv_working_alloca_h = yes; then
9469
81ecdfbb 9470$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9471
c906108c 9472fi
bec39cab 9473
81ecdfbb
RW
9474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9475$as_echo_n "checking for alloca... " >&6; }
9476if test "${ac_cv_func_alloca_works+set}" = set; then :
9477 $as_echo_n "(cached) " >&6
bec39cab 9478else
81ecdfbb 9479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9480/* end confdefs.h. */
a9322a30
TT
9481#ifdef __GNUC__
9482# define alloca __builtin_alloca
b4e70030 9483#else
a9322a30
TT
9484# ifdef _MSC_VER
9485# include <malloc.h>
9486# define alloca _alloca
9487# else
81ecdfbb 9488# ifdef HAVE_ALLOCA_H
a9322a30
TT
9489# include <alloca.h>
9490# else
9491# ifdef _AIX
9492 #pragma alloca
9493# else
9494# ifndef alloca /* predefined by HP cc +Olibcalls */
9495char *alloca ();
9496# endif
9497# endif
9498# endif
9499# endif
c906108c 9500#endif
97bf5e38 9501
bec39cab
AC
9502int
9503main ()
9504{
a9322a30 9505char *p = (char *) alloca (1);
81ecdfbb 9506 if (p) return 0;
bec39cab
AC
9507 ;
9508 return 0;
9509}
9510_ACEOF
81ecdfbb 9511if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9512 ac_cv_func_alloca_works=yes
bec39cab 9513else
81ecdfbb 9514 ac_cv_func_alloca_works=no
bec39cab 9515fi
81ecdfbb
RW
9516rm -f core conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
bec39cab 9518fi
81ecdfbb
RW
9519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9520$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9521
9522if test $ac_cv_func_alloca_works = yes; then
9523
81ecdfbb 9524$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9525
a9322a30
TT
9526else
9527 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9528# that cause trouble. Some versions do not even contain alloca or
9529# contain a buggy version. If you still want to use their alloca,
9530# use ar to extract alloca.o from them instead of compiling alloca.c.
9531
81ecdfbb 9532ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9533
81ecdfbb 9534$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9535
bec39cab 9536
81ecdfbb
RW
9537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9538$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9539if test "${ac_cv_os_cray+set}" = set; then :
9540 $as_echo_n "(cached) " >&6
a9322a30 9541else
81ecdfbb 9542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9543/* end confdefs.h. */
81ecdfbb 9544#if defined CRAY && ! defined CRAY2
a9322a30
TT
9545webecray
9546#else
9547wenotbecray
9548#endif
9549
9550_ACEOF
9551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9552 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9553 ac_cv_os_cray=yes
9554else
81ecdfbb 9555 ac_cv_os_cray=no
bec39cab 9556fi
81ecdfbb
RW
9557rm -f conftest*
9558
bec39cab 9559fi
81ecdfbb
RW
9560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9561$as_echo "$ac_cv_os_cray" >&6; }
9562if test $ac_cv_os_cray = yes; then
9563 for ac_func in _getb67 GETB67 getb67; do
9564 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9565ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9566eval as_val=\$$as_ac_var
9567 if test "x$as_val" = x""yes; then :
a9322a30
TT
9568
9569cat >>confdefs.h <<_ACEOF
9570#define CRAY_STACKSEG_END $ac_func
bec39cab 9571_ACEOF
c906108c 9572
a9322a30 9573 break
c906108c
SS
9574fi
9575
a9322a30
TT
9576 done
9577fi
bec39cab 9578
81ecdfbb
RW
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9580$as_echo_n "checking stack direction for C alloca... " >&6; }
9581if test "${ac_cv_c_stack_direction+set}" = set; then :
9582 $as_echo_n "(cached) " >&6
a9322a30 9583else
81ecdfbb 9584 if test "$cross_compiling" = yes; then :
a9322a30 9585 ac_cv_c_stack_direction=0
bec39cab 9586else
81ecdfbb 9587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9588/* end confdefs.h. */
81ecdfbb 9589$ac_includes_default
a9322a30
TT
9590int
9591find_stack_direction ()
b4e70030 9592{
a9322a30
TT
9593 static char *addr = 0;
9594 auto char dummy;
9595 if (addr == 0)
9596 {
9597 addr = &dummy;
9598 return find_stack_direction ();
9599 }
9600 else
9601 return (&dummy > addr) ? 1 : -1;
b4e70030 9602}
b757528f 9603
bec39cab
AC
9604int
9605main ()
9606{
81ecdfbb 9607 return find_stack_direction () < 0;
bec39cab
AC
9608}
9609_ACEOF
81ecdfbb 9610if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9611 ac_cv_c_stack_direction=1
9612else
81ecdfbb 9613 ac_cv_c_stack_direction=-1
a9322a30 9614fi
81ecdfbb
RW
9615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9616 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9617fi
a9322a30 9618
81ecdfbb
RW
9619fi
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9621$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9622cat >>confdefs.h <<_ACEOF
9623#define STACK_DIRECTION $ac_cv_c_stack_direction
9624_ACEOF
9625
9626
9627fi
9628
a9322a30 9629for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9630do :
9631 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9632ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9633eval as_val=\$$as_ac_Header
9634 if test "x$as_val" = x""yes; then :
bec39cab 9635 cat >>confdefs.h <<_ACEOF
81ecdfbb 9636#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9637_ACEOF
b757528f 9638
b757528f 9639fi
bec39cab 9640
a9322a30 9641done
a3828db0 9642
a9322a30 9643for ac_func in getpagesize
81ecdfbb
RW
9644do :
9645 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9646if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9647 cat >>confdefs.h <<_ACEOF
81ecdfbb 9648#define HAVE_GETPAGESIZE 1
bec39cab 9649_ACEOF
bcb3dc3d 9650
bcb3dc3d
MK
9651fi
9652done
9653
81ecdfbb
RW
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9655$as_echo_n "checking for working mmap... " >&6; }
9656if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9657 $as_echo_n "(cached) " >&6
a9322a30 9658else
81ecdfbb 9659 if test "$cross_compiling" = yes; then :
a9322a30 9660 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9661else
81ecdfbb 9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9663/* end confdefs.h. */
a9322a30
TT
9664$ac_includes_default
9665/* malloc might have been renamed as rpl_malloc. */
9666#undef malloc
bec39cab 9667
a9322a30
TT
9668/* Thanks to Mike Haertel and Jim Avera for this test.
9669 Here is a matrix of mmap possibilities:
9670 mmap private not fixed
9671 mmap private fixed at somewhere currently unmapped
9672 mmap private fixed at somewhere already mapped
9673 mmap shared not fixed
9674 mmap shared fixed at somewhere currently unmapped
9675 mmap shared fixed at somewhere already mapped
9676 For private mappings, we should verify that changes cannot be read()
9677 back from the file, nor mmap's back from the file at a different
9678 address. (There have been systems where private was not correctly
9679 implemented like the infamous i386 svr4.0, and systems where the
9680 VM page cache was not coherent with the file system buffer cache
9681 like early versions of FreeBSD and possibly contemporary NetBSD.)
9682 For shared mappings, we should conversely verify that changes get
9683 propagated back to all the places they're supposed to be.
bec39cab 9684
a9322a30
TT
9685 Grep wants private fixed already mapped.
9686 The main things grep needs to know about mmap are:
9687 * does it exist and is it safe to write into the mmap'd area
9688 * how to use it (BSD variants) */
8b9cf735 9689
a9322a30
TT
9690#include <fcntl.h>
9691#include <sys/mman.h>
8b9cf735 9692
81ecdfbb 9693#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9694char *malloc ();
a3828db0
MK
9695#endif
9696
a9322a30 9697/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9698#ifndef HAVE_GETPAGESIZE
a9322a30 9699/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9700# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9701# define HAVE_SYS_PARAM_H 1
9702# endif
9703
9704# ifdef _SC_PAGESIZE
9705# define getpagesize() sysconf(_SC_PAGESIZE)
9706# else /* no _SC_PAGESIZE */
81ecdfbb 9707# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9708# include <sys/param.h>
9709# ifdef EXEC_PAGESIZE
9710# define getpagesize() EXEC_PAGESIZE
9711# else /* no EXEC_PAGESIZE */
9712# ifdef NBPG
9713# define getpagesize() NBPG * CLSIZE
9714# ifndef CLSIZE
9715# define CLSIZE 1
9716# endif /* no CLSIZE */
9717# else /* no NBPG */
9718# ifdef NBPC
9719# define getpagesize() NBPC
9720# else /* no NBPC */
9721# ifdef PAGESIZE
9722# define getpagesize() PAGESIZE
9723# endif /* PAGESIZE */
9724# endif /* no NBPC */
9725# endif /* no NBPG */
9726# endif /* no EXEC_PAGESIZE */
9727# else /* no HAVE_SYS_PARAM_H */
9728# define getpagesize() 8192 /* punt totally */
9729# endif /* no HAVE_SYS_PARAM_H */
9730# endif /* no _SC_PAGESIZE */
9731
9732#endif /* no HAVE_GETPAGESIZE */
9733
bec39cab
AC
9734int
9735main ()
9736{
a9322a30
TT
9737 char *data, *data2, *data3;
9738 int i, pagesize;
9739 int fd;
9740
9741 pagesize = getpagesize ();
9742
9743 /* First, make a file with some known garbage in it. */
9744 data = (char *) malloc (pagesize);
9745 if (!data)
81ecdfbb 9746 return 1;
a9322a30
TT
9747 for (i = 0; i < pagesize; ++i)
9748 *(data + i) = rand ();
9749 umask (0);
9750 fd = creat ("conftest.mmap", 0600);
9751 if (fd < 0)
81ecdfbb 9752 return 1;
a9322a30 9753 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9754 return 1;
a9322a30
TT
9755 close (fd);
9756
9757 /* Next, try to mmap the file at a fixed address which already has
9758 something else allocated at it. If we can, also make sure that
9759 we see the same garbage. */
9760 fd = open ("conftest.mmap", O_RDWR);
9761 if (fd < 0)
81ecdfbb 9762 return 1;
a9322a30
TT
9763 data2 = (char *) malloc (2 * pagesize);
9764 if (!data2)
81ecdfbb
RW
9765 return 1;
9766 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9767 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9768 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9769 return 1;
a9322a30
TT
9770 for (i = 0; i < pagesize; ++i)
9771 if (*(data + i) != *(data2 + i))
81ecdfbb 9772 return 1;
a9322a30
TT
9773
9774 /* Finally, make sure that changes to the mapped area do not
9775 percolate back to the file as seen by read(). (This is a bug on
9776 some variants of i386 svr4.0.) */
9777 for (i = 0; i < pagesize; ++i)
9778 *(data2 + i) = *(data2 + i) + 1;
9779 data3 = (char *) malloc (pagesize);
9780 if (!data3)
81ecdfbb 9781 return 1;
a9322a30 9782 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9783 return 1;
a9322a30
TT
9784 for (i = 0; i < pagesize; ++i)
9785 if (*(data + i) != *(data3 + i))
81ecdfbb 9786 return 1;
a9322a30 9787 close (fd);
81ecdfbb 9788 return 0;
bec39cab
AC
9789}
9790_ACEOF
81ecdfbb 9791if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9792 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9793else
81ecdfbb 9794 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9795fi
81ecdfbb
RW
9796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9797 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9798fi
81ecdfbb 9799
a9322a30 9800fi
81ecdfbb
RW
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9802$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9803if test $ac_cv_func_mmap_fixed_mapped = yes; then
9804
81ecdfbb 9805$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9806
086ec9eb 9807fi
a9322a30 9808rm -f conftest.mmap
a3828db0 9809
81ecdfbb
RW
9810ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9811if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9812
a9322a30
TT
9813else
9814
9815cat >>confdefs.h <<_ACEOF
9816#define pid_t int
bec39cab 9817_ACEOF
086ec9eb
MK
9818
9819fi
9820
81ecdfbb
RW
9821for ac_header in vfork.h
9822do :
9823 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9824if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9825 cat >>confdefs.h <<_ACEOF
81ecdfbb 9826#define HAVE_VFORK_H 1
bec39cab 9827_ACEOF
c906108c
SS
9828
9829fi
a9322a30 9830
a3828db0 9831done
c906108c 9832
a9322a30 9833for ac_func in fork vfork
81ecdfbb
RW
9834do :
9835 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9836ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9837eval as_val=\$$as_ac_var
9838 if test "x$as_val" = x""yes; then :
a3828db0 9839 cat >>confdefs.h <<_ACEOF
81ecdfbb 9840#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9841_ACEOF
b83266a0 9842
97bf5e38 9843fi
a3828db0 9844done
b83266a0 9845
a9322a30 9846if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9848$as_echo_n "checking for working fork... " >&6; }
9849if test "${ac_cv_func_fork_works+set}" = set; then :
9850 $as_echo_n "(cached) " >&6
a9322a30 9851else
81ecdfbb 9852 if test "$cross_compiling" = yes; then :
a9322a30
TT
9853 ac_cv_func_fork_works=cross
9854else
81ecdfbb
RW
9855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856/* end confdefs.h. */
9857$ac_includes_default
9858int
9859main ()
9860{
9861
9862 /* By Ruediger Kuhlmann. */
9863 return fork () < 0;
9864
9865 ;
9866 return 0;
9867}
a9322a30 9868_ACEOF
81ecdfbb 9869if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9870 ac_cv_func_fork_works=yes
9871else
81ecdfbb 9872 ac_cv_func_fork_works=no
a9322a30 9873fi
81ecdfbb
RW
9874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9875 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9876fi
81ecdfbb 9877
a9322a30 9878fi
81ecdfbb
RW
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9880$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9881
9882else
9883 ac_cv_func_fork_works=$ac_cv_func_fork
9884fi
9885if test "x$ac_cv_func_fork_works" = xcross; then
9886 case $host in
9887 *-*-amigaos* | *-*-msdosdjgpp*)
9888 # Override, as these systems have only a dummy fork() stub
9889 ac_cv_func_fork_works=no
9890 ;;
9891 *)
9892 ac_cv_func_fork_works=yes
9893 ;;
9894 esac
81ecdfbb
RW
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9896$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9897fi
9898ac_cv_func_vfork_works=$ac_cv_func_vfork
9899if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9901$as_echo_n "checking for working vfork... " >&6; }
9902if test "${ac_cv_func_vfork_works+set}" = set; then :
9903 $as_echo_n "(cached) " >&6
a9322a30 9904else
81ecdfbb 9905 if test "$cross_compiling" = yes; then :
a9322a30
TT
9906 ac_cv_func_vfork_works=cross
9907else
81ecdfbb 9908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9909/* end confdefs.h. */
9910/* Thanks to Paul Eggert for this test. */
81ecdfbb 9911$ac_includes_default
a9322a30 9912#include <sys/wait.h>
81ecdfbb 9913#ifdef HAVE_VFORK_H
a9322a30
TT
9914# include <vfork.h>
9915#endif
9916/* On some sparc systems, changes by the child to local and incoming
9917 argument registers are propagated back to the parent. The compiler
9918 is told about this with #include <vfork.h>, but some compilers
9919 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9920 static variable whose address is put into a register that is
9921 clobbered by the vfork. */
9922static void
9923#ifdef __cplusplus
9924sparc_address_test (int arg)
9925# else
9926sparc_address_test (arg) int arg;
9927#endif
9928{
9929 static pid_t child;
9930 if (!child) {
9931 child = vfork ();
9932 if (child < 0) {
9933 perror ("vfork");
9934 _exit(2);
9935 }
9936 if (!child) {
9937 arg = getpid();
9938 write(-1, "", 0);
9939 _exit (arg);
9940 }
9941 }
9942}
9943
9944int
9945main ()
9946{
9947 pid_t parent = getpid ();
9948 pid_t child;
9949
9950 sparc_address_test (0);
9951
9952 child = vfork ();
9953
9954 if (child == 0) {
9955 /* Here is another test for sparc vfork register problems. This
9956 test uses lots of local variables, at least as many local
9957 variables as main has allocated so far including compiler
9958 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9959 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9960 reuse the register of parent for one of the local variables,
9961 since it will think that parent can't possibly be used any more
9962 in this routine. Assigning to the local variable will thus
9963 munge parent in the parent process. */
9964 pid_t
9965 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9966 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9967 /* Convince the compiler that p..p7 are live; otherwise, it might
9968 use the same hardware register for all 8 local variables. */
9969 if (p != p1 || p != p2 || p != p3 || p != p4
9970 || p != p5 || p != p6 || p != p7)
9971 _exit(1);
9972
9973 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9974 from child file descriptors. If the child closes a descriptor
9975 before it execs or exits, this munges the parent's descriptor
9976 as well. Test for this by closing stdout in the child. */
9977 _exit(close(fileno(stdout)) != 0);
9978 } else {
9979 int status;
9980 struct stat st;
9981
9982 while (wait(&status) != child)
9983 ;
81ecdfbb 9984 return (
a9322a30
TT
9985 /* Was there some problem with vforking? */
9986 child < 0
9987
9988 /* Did the child fail? (This shouldn't happen.) */
9989 || status
9990
9991 /* Did the vfork/compiler bug occur? */
9992 || parent != getpid()
9993
9994 /* Did the file descriptor bug occur? */
9995 || fstat(fileno(stdout), &st) != 0
9996 );
9997 }
9998}
9999_ACEOF
81ecdfbb 10000if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10001 ac_cv_func_vfork_works=yes
10002else
81ecdfbb 10003 ac_cv_func_vfork_works=no
a9322a30 10004fi
81ecdfbb
RW
10005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10006 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10007fi
81ecdfbb 10008
a9322a30 10009fi
81ecdfbb
RW
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10011$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10012
10013fi;
10014if test "x$ac_cv_func_fork_works" = xcross; then
10015 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10017$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10018fi
10019
10020if test "x$ac_cv_func_vfork_works" = xyes; then
10021
81ecdfbb 10022$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10023
10024else
10025
81ecdfbb 10026$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10027
10028fi
10029if test "x$ac_cv_func_fork_works" = xyes; then
10030
81ecdfbb 10031$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10032
10033fi
10034
7313baad 10035for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10036 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10037 sbrk setpgid setpgrp setsid \
a9322a30 10038 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10039 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10040 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10041do :
10042 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10043ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10044eval as_val=\$$as_ac_var
10045 if test "x$as_val" = x""yes; then :
6c7a06a3 10046 cat >>confdefs.h <<_ACEOF
81ecdfbb 10047#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10048_ACEOF
10049
10050fi
10051done
10052
10053
81ecdfbb
RW
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10055$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10056if test "${am_cv_langinfo_codeset+set}" = set; then :
10057 $as_echo_n "(cached) " >&6
6c7a06a3 10058else
81ecdfbb 10059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10060/* end confdefs.h. */
10061#include <langinfo.h>
10062int
10063main ()
10064{
10065char* cs = nl_langinfo(CODESET);
bec39cab
AC
10066 ;
10067 return 0;
10068}
10069_ACEOF
81ecdfbb 10070if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10071 am_cv_langinfo_codeset=yes
a4db0f07 10072else
81ecdfbb 10073 am_cv_langinfo_codeset=no
a4db0f07 10074fi
81ecdfbb
RW
10075rm -f core conftest.err conftest.$ac_objext \
10076 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10077
a4db0f07 10078fi
81ecdfbb
RW
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10080$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10081 if test $am_cv_langinfo_codeset = yes; then
10082
81ecdfbb 10083$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10084
6c7a06a3 10085 fi
c906108c 10086
06825bd1 10087
a3828db0
MK
10088# Check the return and argument types of ptrace. No canned test for
10089# this, so roll our own.
10090gdb_ptrace_headers='
10091#if HAVE_SYS_TYPES_H
10092# include <sys/types.h>
10093#endif
10094#if HAVE_SYS_PTRACE_H
10095# include <sys/ptrace.h>
10096#endif
10097#if HAVE_UNISTD_H
10098# include <unistd.h>
10099#endif
10100'
10101# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10102ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10103"
10104if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10105 ac_have_decl=1
06825bd1 10106else
81ecdfbb 10107 ac_have_decl=0
06825bd1 10108fi
06825bd1 10109
a3828db0 10110cat >>confdefs.h <<_ACEOF
81ecdfbb 10111#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10112_ACEOF
81ecdfbb 10113if test $ac_have_decl = 1; then :
bec39cab 10114
a3828db0 10115else
a3828db0
MK
10116
10117 : ${gdb_cv_func_ptrace_ret='int'}
10118 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10119
06825bd1
MK
10120fi
10121
064ef605
DJ
10122# Check return type. Varargs (used on GNU/Linux) conflict with the
10123# empty argument list, so check for that explicitly.
81ecdfbb
RW
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10125$as_echo_n "checking return type of ptrace... " >&6; }
10126if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10127 $as_echo_n "(cached) " >&6
bec39cab 10128else
81ecdfbb 10129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10130/* end confdefs.h. */
a3828db0 10131$gdb_ptrace_headers
bec39cab
AC
10132int
10133main ()
10134{
064ef605
DJ
10135extern long ptrace (enum __ptrace_request, ...);
10136 ;
10137 return 0;
10138}
10139_ACEOF
81ecdfbb 10140if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10141 gdb_cv_func_ptrace_ret='long'
10142else
81ecdfbb 10143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10144/* end confdefs.h. */
10145$gdb_ptrace_headers
10146int
10147main ()
10148{
a3828db0 10149extern int ptrace ();
bec39cab
AC
10150 ;
10151 return 0;
10152}
10153_ACEOF
81ecdfbb 10154if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10155 gdb_cv_func_ptrace_ret='int'
70f9f479 10156else
81ecdfbb 10157 gdb_cv_func_ptrace_ret='long'
70f9f479 10158fi
81ecdfbb 10159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10160fi
81ecdfbb 10161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10162fi
81ecdfbb
RW
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10164$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10165
a3828db0
MK
10166cat >>confdefs.h <<_ACEOF
10167#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10168_ACEOF
70f9f479 10169
a3828db0 10170# Check argument types.
81ecdfbb
RW
10171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10172$as_echo_n "checking types of arguments for ptrace... " >&6; }
10173if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10174 $as_echo_n "(cached) " >&6
bec39cab 10175else
a3828db0 10176
81ecdfbb 10177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10178/* end confdefs.h. */
10179$gdb_ptrace_headers
10180int
10181main ()
10182{
10183extern long ptrace (enum __ptrace_request, ...);
10184 ;
10185 return 0;
10186}
10187_ACEOF
81ecdfbb 10188if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10189 gdb_cv_func_ptrace_args='int,int,long,long'
10190else
064ef605 10191
a3828db0
MK
10192for gdb_arg1 in 'int' 'long'; do
10193 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10194 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10195 for gdb_arg4 in '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);
10205
bec39cab
AC
10206 ;
10207 return 0;
10208}
10209_ACEOF
81ecdfbb 10210if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10211 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10212 break 4;
5c7f2947 10213fi
81ecdfbb 10214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10215 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10217/* end confdefs.h. */
a3828db0 10218$gdb_ptrace_headers
bec39cab
AC
10219int
10220main ()
10221{
a3828db0
MK
10222
10223extern $gdb_cv_func_ptrace_ret
10224 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10225
bec39cab
AC
10226 ;
10227 return 0;
10228}
10229_ACEOF
81ecdfbb 10230if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10231
10232gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10233 break 5;
78434e59 10234fi
81ecdfbb 10235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10236 done
10237 done
10238 done
10239 done
10240done
10241# Provide a safe default value.
10242: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10243
064ef605 10244fi
81ecdfbb 10245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10246fi
81ecdfbb
RW
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10248$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10249ac_save_IFS=$IFS; IFS=','
10250set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10251IFS=$ac_save_IFS
10252shift
bec39cab 10253
a3828db0
MK
10254cat >>confdefs.h <<_ACEOF
10255#define PTRACE_TYPE_ARG3 $3
10256_ACEOF
10257
10258if test -n "$5"; then
10259
10260cat >>confdefs.h <<_ACEOF
10261#define PTRACE_TYPE_ARG5 $5
bec39cab 10262_ACEOF
78434e59
MK
10263
10264fi
10265
a3828db0 10266if test "$cross_compiling" = no; then
81ecdfbb
RW
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10268$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10269if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10270 $as_echo_n "(cached) " >&6
a3828db0 10271else
81ecdfbb
RW
10272 if test "$cross_compiling" = yes; then :
10273 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10274else
81ecdfbb 10275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10276/* end confdefs.h. */
81ecdfbb 10277$ac_includes_default
bec39cab
AC
10278int
10279main ()
10280{
a3828db0
MK
10281/* If this system has a BSD-style setpgrp which takes arguments,
10282 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10283 exit successfully. */
81ecdfbb 10284 return setpgrp (1,1) != -1;
bec39cab
AC
10285 ;
10286 return 0;
10287}
10288_ACEOF
81ecdfbb 10289if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10290 ac_cv_func_setpgrp_void=no
c906108c 10291else
81ecdfbb 10292 ac_cv_func_setpgrp_void=yes
c906108c 10293fi
81ecdfbb
RW
10294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10295 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10296fi
81ecdfbb 10297
a3828db0 10298fi
81ecdfbb
RW
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10300$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10301if test $ac_cv_func_setpgrp_void = yes; then
10302
81ecdfbb 10303$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10304
10305fi
a3828db0
MK
10306
10307else
81ecdfbb
RW
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10309$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10310if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10311 $as_echo_n "(cached) " >&6
97bf5e38 10312else
81ecdfbb 10313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10314/* end confdefs.h. */
a3828db0
MK
10315
10316#include <unistd.h>
10317
bec39cab
AC
10318int
10319main ()
10320{
a3828db0
MK
10321
10322 if (setpgrp(1,1) == -1)
10323 exit (0);
10324 else
10325 exit (1);
10326
bec39cab
AC
10327 ;
10328 return 0;
10329}
10330_ACEOF
81ecdfbb 10331if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10332 ac_cv_func_setpgrp_void=no
c906108c 10333else
81ecdfbb 10334 ac_cv_func_setpgrp_void=yes
c906108c 10335fi
81ecdfbb 10336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10337fi
81ecdfbb
RW
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10339$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10340if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10341 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10342
a3828db0 10343fi
c906108c
SS
10344fi
10345
a3828db0
MK
10346# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10347# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10349$as_echo_n "checking for sigsetjmp... " >&6; }
10350if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10351 $as_echo_n "(cached) " >&6
bec39cab 10352else
81ecdfbb 10353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10354/* end confdefs.h. */
a3828db0
MK
10355
10356#include <setjmp.h>
10357
bec39cab
AC
10358int
10359main ()
10360{
a3828db0 10361sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10362 ;
10363 return 0;
10364}
10365_ACEOF
81ecdfbb 10366if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10367 gdb_cv_func_sigsetjmp=yes
c906108c 10368else
81ecdfbb 10369 gdb_cv_func_sigsetjmp=no
c906108c 10370fi
81ecdfbb 10371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10372fi
81ecdfbb
RW
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10374$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10375if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10376
81ecdfbb 10377$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10378
97bf5e38 10379fi
c906108c 10380
a3828db0
MK
10381# Assume we'll default to using the included libiberty regex.
10382gdb_use_included_regex=yes
10383
10384# However, if the system regex is GNU regex, then default to *not*
10385# using the included regex.
81ecdfbb
RW
10386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10387$as_echo_n "checking for GNU regex... " >&6; }
10388if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10389 $as_echo_n "(cached) " >&6
bec39cab 10390else
81ecdfbb 10391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10392/* end confdefs.h. */
a3828db0 10393#include <gnu-versions.h>
bec39cab
AC
10394int
10395main ()
10396{
81ecdfbb
RW
10397#define REGEX_INTERFACE_VERSION 1
10398#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10399# error "Version mismatch"
10400#endif
5c45e068
MK
10401 ;
10402 return 0;
10403}
10404_ACEOF
81ecdfbb
RW
10405if ac_fn_c_try_compile "$LINENO"; then :
10406 gdb_cv_have_gnu_regex=yes
5c45e068 10407else
81ecdfbb
RW
10408 gdb_cv_have_gnu_regex=no
10409fi
10410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10411fi
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10413$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10414if test $gdb_cv_have_gnu_regex = yes; then
10415 gdb_use_included_regex=no
5c45e068 10416fi
81ecdfbb
RW
10417
10418
10419# Check whether --with-included-regex was given.
10420if test "${with_included_regex+set}" = set; then :
10421 withval=$with_included_regex; gdb_with_regex=$withval
10422else
10423 gdb_with_regex=$gdb_use_included_regex
c906108c 10424fi
81ecdfbb
RW
10425
10426if test "$gdb_with_regex" = yes; then
10427
10428$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10429
c906108c 10430fi
81ecdfbb
RW
10431
10432# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10433ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10434#include <sys/proc.h>
10435
10436"
10437if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10438
5c45e068 10439cat >>confdefs.h <<_ACEOF
a3828db0 10440#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10441_ACEOF
c906108c 10442
5c45e068 10443
97bf5e38 10444fi
c906108c 10445
5c45e068 10446
a3828db0 10447# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10449$as_echo_n "checking for struct lwp... " >&6; }
10450if test "${gdb_cv_struct_lwp+set}" = set; then :
10451 $as_echo_n "(cached) " >&6
bec39cab 10452else
81ecdfbb 10453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10454/* end confdefs.h. */
a3828db0
MK
10455#include <sys/param.h>
10456#include <sys/lwp.h>
bec39cab
AC
10457int
10458main ()
10459{
a3828db0 10460struct lwp l;
bec39cab
AC
10461 ;
10462 return 0;
10463}
10464_ACEOF
81ecdfbb 10465if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10466 gdb_cv_struct_lwp=yes
c906108c 10467else
81ecdfbb 10468 gdb_cv_struct_lwp=no
c906108c 10469fi
81ecdfbb 10470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10471fi
81ecdfbb
RW
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10473$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10474if test $gdb_cv_struct_lwp = yes; then
c906108c 10475
81ecdfbb 10476$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10477
97bf5e38 10478fi
c906108c 10479
a3828db0 10480# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10482$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10483if test "${gdb_cv_struct_reg+set}" = set; then :
10484 $as_echo_n "(cached) " >&6
bec39cab 10485else
81ecdfbb 10486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10487/* end confdefs.h. */
a3828db0
MK
10488#include <sys/types.h>
10489#include <machine/reg.h>
bec39cab
AC
10490int
10491main ()
10492{
a3828db0 10493struct reg r;
bec39cab
AC
10494 ;
10495 return 0;
10496}
10497_ACEOF
81ecdfbb 10498if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10499 gdb_cv_struct_reg=yes
27ca5dad 10500else
81ecdfbb 10501 gdb_cv_struct_reg=no
27ca5dad 10502fi
81ecdfbb 10503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10504fi
81ecdfbb
RW
10505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10506$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10507if test $gdb_cv_struct_reg = yes; then
bec39cab 10508
81ecdfbb 10509$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10510
10511fi
97bf5e38 10512
a3828db0
MK
10513# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10514# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10515ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10516"
10517if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10518
10519cat >>confdefs.h <<_ACEOF
a3828db0 10520#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10521_ACEOF
3862412b 10522
5c45e068 10523
97bf5e38 10524fi
81ecdfbb
RW
10525ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10526"
10527if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10528
10529cat >>confdefs.h <<_ACEOF
a3828db0 10530#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10531_ACEOF
3862412b 10532
5c45e068 10533
97bf5e38 10534fi
3862412b 10535
5c45e068 10536
a3828db0 10537# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10539$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10540if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10541 $as_echo_n "(cached) " >&6
451928c5 10542else
81ecdfbb 10543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10544/* end confdefs.h. */
a3828db0 10545#include <sys/ptrace.h>
bec39cab
AC
10546int
10547main ()
10548{
a3828db0 10549PTRACE_GETREGS;
bec39cab
AC
10550 ;
10551 return 0;
10552}
10553_ACEOF
81ecdfbb 10554if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10555 gdb_cv_have_ptrace_getregs=yes
451928c5 10556else
81ecdfbb 10557 gdb_cv_have_ptrace_getregs=no
451928c5 10558fi
81ecdfbb 10559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10560fi
10561
81ecdfbb
RW
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10563$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10564if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10565
81ecdfbb 10566$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10567
97bf5e38 10568fi
451928c5 10569
a3828db0 10570# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10572$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10573if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10574 $as_echo_n "(cached) " >&6
451928c5 10575else
81ecdfbb 10576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10577/* end confdefs.h. */
a3828db0 10578#include <sys/ptrace.h>
bec39cab
AC
10579int
10580main ()
10581{
a3828db0 10582PTRACE_GETFPXREGS;
bec39cab
AC
10583 ;
10584 return 0;
10585}
10586_ACEOF
81ecdfbb 10587if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10588 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10589else
81ecdfbb 10590 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10591fi
81ecdfbb 10592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10593fi
10594
81ecdfbb
RW
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10596$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10597if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10598
81ecdfbb 10599$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10600
97bf5e38 10601fi
451928c5 10602
a3828db0 10603# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10605$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10606if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10607 $as_echo_n "(cached) " >&6
3862412b 10608else
81ecdfbb 10609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10610/* end confdefs.h. */
a3828db0
MK
10611#include <sys/types.h>
10612#include <sys/ptrace.h>
bec39cab
AC
10613int
10614main ()
10615{
a3828db0 10616PT_GETDBREGS;
bec39cab
AC
10617 ;
10618 return 0;
10619}
10620_ACEOF
81ecdfbb 10621if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10622 gdb_cv_have_pt_getdbregs=yes
3862412b 10623else
81ecdfbb 10624 gdb_cv_have_pt_getdbregs=no
3862412b 10625fi
81ecdfbb 10626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10627fi
10628
81ecdfbb
RW
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10630$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10631if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10632
81ecdfbb 10633$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10634
97bf5e38 10635fi
3862412b 10636
a3828db0 10637# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10639$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10640if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10641 $as_echo_n "(cached) " >&6
3862412b 10642else
81ecdfbb 10643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10644/* end confdefs.h. */
a3828db0
MK
10645#include <sys/types.h>
10646#include <sys/ptrace.h>
bec39cab
AC
10647int
10648main ()
10649{
a3828db0 10650PT_GETXMMREGS;
bec39cab
AC
10651 ;
10652 return 0;
10653}
10654_ACEOF
81ecdfbb 10655if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10656 gdb_cv_have_pt_getxmmregs=yes
3862412b 10657else
81ecdfbb 10658 gdb_cv_have_pt_getxmmregs=no
3862412b 10659fi
81ecdfbb 10660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10661fi
10662
81ecdfbb
RW
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10664$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10665if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10666
81ecdfbb 10667$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10668
97bf5e38 10669fi
3862412b 10670
eb368090 10671# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
10672
10673if test "${target}" = "${host}"; then
10674 case "${host}" in
97bf5e38 10675 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10676
81ecdfbb 10677$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10678
10679 ;;
c162e8c9 10680 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10681
81ecdfbb 10682$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10683
10684 ;;
10685 mips-sgi-irix5*)
10686 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10687
81ecdfbb 10688$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10689
10690 ;;
10691 esac
10692fi
10693
10694if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10696$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10697 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10698 $as_echo_n "(cached) " >&6
bec39cab 10699else
81ecdfbb 10700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10701/* end confdefs.h. */
596c9d4b
KB
10702
10703#define _SYSCALL32
d30c5336
JK
10704/* Needed for new procfs interface on sparc-solaris. */
10705#define _STRUCTURED_PROC 1
596c9d4b 10706#include <sys/procfs.h>
bec39cab
AC
10707int
10708main ()
10709{
97bf5e38 10710pstatus_t avar
bec39cab
AC
10711 ;
10712 return 0;
10713}
10714_ACEOF
81ecdfbb 10715if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10716 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10717else
81ecdfbb 10718 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10719
596c9d4b 10720fi
81ecdfbb 10721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10722fi
10723
97bf5e38 10724 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10725
81ecdfbb 10726$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10727
10728 fi
81ecdfbb
RW
10729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10730$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10731
81ecdfbb
RW
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10733$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10734 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10735 $as_echo_n "(cached) " >&6
596c9d4b 10736else
81ecdfbb 10737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10738/* end confdefs.h. */
596c9d4b
KB
10739
10740#define _SYSCALL32
d30c5336
JK
10741/* Needed for new procfs interface on sparc-solaris. */
10742#define _STRUCTURED_PROC 1
596c9d4b 10743#include <sys/procfs.h>
bec39cab
AC
10744int
10745main ()
10746{
97bf5e38 10747prrun_t avar
bec39cab
AC
10748 ;
10749 return 0;
10750}
10751_ACEOF
81ecdfbb 10752if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10753 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10754else
81ecdfbb 10755 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10756
596c9d4b 10757fi
81ecdfbb 10758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10759fi
10760
97bf5e38 10761 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10762
81ecdfbb 10763$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10764
10765 fi
81ecdfbb
RW
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10767$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10768
81ecdfbb
RW
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10770$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10771 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10772 $as_echo_n "(cached) " >&6
596c9d4b 10773else
81ecdfbb 10774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10775/* end confdefs.h. */
596c9d4b
KB
10776
10777#define _SYSCALL32
d30c5336
JK
10778/* Needed for new procfs interface on sparc-solaris. */
10779#define _STRUCTURED_PROC 1
596c9d4b 10780#include <sys/procfs.h>
bec39cab
AC
10781int
10782main ()
10783{
97bf5e38 10784gregset_t avar
bec39cab
AC
10785 ;
10786 return 0;
10787}
10788_ACEOF
81ecdfbb 10789if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10790 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10791else
81ecdfbb 10792 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10793
596c9d4b 10794fi
81ecdfbb 10795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10796fi
10797
97bf5e38 10798 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10799
81ecdfbb 10800$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10801
10802 fi
81ecdfbb
RW
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10804$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10805
81ecdfbb
RW
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10807$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10808 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10809 $as_echo_n "(cached) " >&6
d84dd0c5 10810else
81ecdfbb 10811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10812/* end confdefs.h. */
97bf5e38
MK
10813
10814#define _SYSCALL32
d30c5336
JK
10815/* Needed for new procfs interface on sparc-solaris. */
10816#define _STRUCTURED_PROC 1
d84dd0c5 10817#include <sys/procfs.h>
bec39cab
AC
10818int
10819main ()
10820{
97bf5e38 10821fpregset_t avar
bec39cab
AC
10822 ;
10823 return 0;
10824}
10825_ACEOF
81ecdfbb 10826if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10827 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10828else
81ecdfbb 10829 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10830
d84dd0c5 10831fi
81ecdfbb 10832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10833fi
10834
97bf5e38 10835 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10836
81ecdfbb 10837$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10838
97bf5e38 10839 fi
81ecdfbb
RW
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10841$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 10842
81ecdfbb
RW
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
10844$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
10845 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
10846 $as_echo_n "(cached) " >&6
c906108c 10847else
81ecdfbb 10848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10849/* end confdefs.h. */
c906108c 10850
97bf5e38 10851#define _SYSCALL32
d30c5336
JK
10852/* Needed for new procfs interface on sparc-solaris. */
10853#define _STRUCTURED_PROC 1
97bf5e38 10854#include <sys/procfs.h>
bec39cab
AC
10855int
10856main ()
10857{
97bf5e38 10858prgregset_t avar
bec39cab
AC
10859 ;
10860 return 0;
10861}
10862_ACEOF
81ecdfbb 10863if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10864 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 10865else
81ecdfbb 10866 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 10867
c906108c 10868fi
81ecdfbb 10869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
10870fi
10871
97bf5e38 10872 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 10873
81ecdfbb 10874$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 10875
97bf5e38 10876 fi
81ecdfbb
RW
10877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
10878$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 10879
81ecdfbb
RW
10880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
10881$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
10882 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
10883 $as_echo_n "(cached) " >&6
d45fe813 10884else
81ecdfbb 10885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10886/* end confdefs.h. */
97bf5e38
MK
10887
10888#define _SYSCALL32
d30c5336
JK
10889/* Needed for new procfs interface on sparc-solaris. */
10890#define _STRUCTURED_PROC 1
97bf5e38 10891#include <sys/procfs.h>
bec39cab
AC
10892int
10893main ()
10894{
97bf5e38 10895prfpregset_t avar
bec39cab
AC
10896 ;
10897 return 0;
10898}
10899_ACEOF
81ecdfbb 10900if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10901 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 10902else
81ecdfbb 10903 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 10904
d45fe813 10905fi
81ecdfbb 10906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10907fi
10908
97bf5e38 10909 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 10910
81ecdfbb 10911$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 10912
97bf5e38 10913 fi
81ecdfbb
RW
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
10915$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 10916
81ecdfbb
RW
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
10918$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
10919 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
10920 $as_echo_n "(cached) " >&6
d45fe813 10921else
81ecdfbb 10922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10923/* end confdefs.h. */
97bf5e38
MK
10924
10925#define _SYSCALL32
d30c5336
JK
10926/* Needed for new procfs interface on sparc-solaris. */
10927#define _STRUCTURED_PROC 1
97bf5e38 10928#include <sys/procfs.h>
bec39cab
AC
10929int
10930main ()
10931{
97bf5e38 10932prgregset32_t avar
bec39cab
AC
10933 ;
10934 return 0;
10935}
10936_ACEOF
81ecdfbb 10937if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10938 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 10939else
81ecdfbb 10940 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 10941
d45fe813 10942fi
81ecdfbb 10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10944fi
10945
97bf5e38 10946 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 10947
81ecdfbb 10948$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 10949
97bf5e38 10950 fi
81ecdfbb
RW
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
10952$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 10953
81ecdfbb
RW
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
10955$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
10956 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
10957 $as_echo_n "(cached) " >&6
d45fe813 10958else
81ecdfbb 10959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10960/* end confdefs.h. */
97bf5e38
MK
10961
10962#define _SYSCALL32
d30c5336
JK
10963/* Needed for new procfs interface on sparc-solaris. */
10964#define _STRUCTURED_PROC 1
97bf5e38 10965#include <sys/procfs.h>
bec39cab
AC
10966int
10967main ()
10968{
97bf5e38 10969prfpregset32_t avar
bec39cab
AC
10970 ;
10971 return 0;
10972}
10973_ACEOF
81ecdfbb 10974if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10975 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 10976else
81ecdfbb 10977 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 10978
d45fe813 10979fi
81ecdfbb 10980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
10981fi
10982
97bf5e38 10983 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 10984
81ecdfbb 10985$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 10986
97bf5e38 10987 fi
81ecdfbb
RW
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
10989$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 10990
81ecdfbb
RW
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
10992$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
10993 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
10994 $as_echo_n "(cached) " >&6
d45fe813 10995else
81ecdfbb 10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10997/* end confdefs.h. */
97bf5e38 10998
d45fe813 10999#define _SYSCALL32
d30c5336
JK
11000/* Needed for new procfs interface on sparc-solaris. */
11001#define _STRUCTURED_PROC 1
97bf5e38 11002#include <sys/procfs.h>
bec39cab
AC
11003int
11004main ()
11005{
97bf5e38 11006lwpid_t avar
bec39cab
AC
11007 ;
11008 return 0;
11009}
11010_ACEOF
81ecdfbb 11011if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11012 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11013else
81ecdfbb 11014 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11015
d45fe813 11016fi
81ecdfbb 11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11018fi
11019
97bf5e38 11020 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11021
81ecdfbb 11022$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11023
97bf5e38 11024 fi
81ecdfbb
RW
11025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11026$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11027
81ecdfbb
RW
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11029$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11030 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11031 $as_echo_n "(cached) " >&6
c906108c 11032else
81ecdfbb 11033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11034/* end confdefs.h. */
c906108c 11035
97bf5e38 11036#define _SYSCALL32
d30c5336
JK
11037/* Needed for new procfs interface on sparc-solaris. */
11038#define _STRUCTURED_PROC 1
97bf5e38 11039#include <sys/procfs.h>
bec39cab
AC
11040int
11041main ()
11042{
97bf5e38 11043psaddr_t avar
bec39cab
AC
11044 ;
11045 return 0;
11046}
11047_ACEOF
81ecdfbb 11048if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11049 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11050else
81ecdfbb 11051 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11052
c906108c 11053fi
81ecdfbb 11054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11055fi
11056
97bf5e38 11057 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11058
81ecdfbb 11059$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11060
97bf5e38 11061 fi
81ecdfbb
RW
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11063$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11064
81ecdfbb
RW
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11066$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11067 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11068 $as_echo_n "(cached) " >&6
c906108c 11069else
81ecdfbb 11070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11071/* end confdefs.h. */
c906108c 11072
97bf5e38 11073#define _SYSCALL32
d30c5336
JK
11074/* Needed for new procfs interface on sparc-solaris. */
11075#define _STRUCTURED_PROC 1
97bf5e38 11076#include <sys/procfs.h>
bec39cab
AC
11077int
11078main ()
11079{
97bf5e38 11080prsysent_t avar
bec39cab
AC
11081 ;
11082 return 0;
11083}
11084_ACEOF
81ecdfbb 11085if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11086 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11087else
81ecdfbb 11088 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11089
c906108c 11090fi
81ecdfbb 11091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11092fi
11093
97bf5e38 11094 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11095
81ecdfbb 11096$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11097
97bf5e38 11098 fi
81ecdfbb
RW
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11100$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11101
81ecdfbb
RW
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11103$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11104 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11105 $as_echo_n "(cached) " >&6
c906108c 11106else
81ecdfbb 11107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11108/* end confdefs.h. */
c906108c 11109
97bf5e38 11110#define _SYSCALL32
d30c5336
JK
11111/* Needed for new procfs interface on sparc-solaris. */
11112#define _STRUCTURED_PROC 1
97bf5e38 11113#include <sys/procfs.h>
bec39cab
AC
11114int
11115main ()
11116{
97bf5e38 11117pr_sigset_t avar
bec39cab
AC
11118 ;
11119 return 0;
11120}
11121_ACEOF
81ecdfbb 11122if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11123 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11124else
81ecdfbb 11125 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11126
c906108c 11127fi
81ecdfbb 11128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11129fi
11130
97bf5e38 11131 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11132
81ecdfbb 11133$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11134
97bf5e38 11135 fi
81ecdfbb
RW
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11137$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11138
81ecdfbb
RW
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11140$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11141 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11142 $as_echo_n "(cached) " >&6
c906108c 11143else
81ecdfbb 11144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11145/* end confdefs.h. */
c906108c 11146
97bf5e38 11147#define _SYSCALL32
d30c5336
JK
11148/* Needed for new procfs interface on sparc-solaris. */
11149#define _STRUCTURED_PROC 1
97bf5e38 11150#include <sys/procfs.h>
bec39cab
AC
11151int
11152main ()
11153{
97bf5e38 11154pr_sigaction64_t avar
bec39cab
AC
11155 ;
11156 return 0;
11157}
11158_ACEOF
81ecdfbb 11159if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11160 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11161else
81ecdfbb 11162 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11163
c906108c 11164fi
81ecdfbb 11165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11166fi
11167
97bf5e38 11168 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11169
81ecdfbb 11170$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11171
97bf5e38 11172 fi
81ecdfbb
RW
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11174$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11175
81ecdfbb
RW
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11177$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11178 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11179 $as_echo_n "(cached) " >&6
97bf5e38 11180else
81ecdfbb 11181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11182/* end confdefs.h. */
97bf5e38
MK
11183
11184#define _SYSCALL32
d30c5336
JK
11185/* Needed for new procfs interface on sparc-solaris. */
11186#define _STRUCTURED_PROC 1
97bf5e38 11187#include <sys/procfs.h>
bec39cab
AC
11188int
11189main ()
11190{
97bf5e38 11191pr_siginfo64_t avar
bec39cab
AC
11192 ;
11193 return 0;
11194}
11195_ACEOF
81ecdfbb 11196if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11197 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11198else
81ecdfbb 11199 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11200
97bf5e38 11201fi
81ecdfbb 11202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11203fi
c906108c 11204
97bf5e38 11205 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11206
81ecdfbb 11207$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11208
97bf5e38 11209 fi
81ecdfbb
RW
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11211$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11212
11213
97bf5e38
MK
11214
11215
11216
97bf5e38 11217 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11219$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11220 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11221 $as_echo_n "(cached) " >&6
c906108c 11222else
81ecdfbb 11223 if test "$cross_compiling" = yes; then :
97bf5e38 11224 gdb_cv_prfpregset_t_broken=yes
c906108c 11225else
81ecdfbb 11226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11227/* end confdefs.h. */
97bf5e38
MK
11228#include <sys/procfs.h>
11229 int main ()
11230 {
11231 if (sizeof (prfpregset_t) == sizeof (void *))
11232 return 1;
11233 return 0;
11234 }
bec39cab 11235_ACEOF
81ecdfbb 11236if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11237 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11238else
11239 gdb_cv_prfpregset_t_broken=yes
c906108c 11240fi
81ecdfbb
RW
11241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11242 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11243fi
81ecdfbb 11244
c906108c
SS
11245fi
11246
81ecdfbb
RW
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11248$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11249 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11250
81ecdfbb 11251$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11252
97bf5e38
MK
11253 fi
11254 fi
c906108c 11255
bec39cab 11256
81ecdfbb
RW
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11258$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11259 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11260 $as_echo_n "(cached) " >&6
c906108c 11261else
81ecdfbb 11262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11263/* end confdefs.h. */
97bf5e38
MK
11264#include <unistd.h>
11265#include <sys/types.h>
11266#include <sys/procfs.h>
11267
bec39cab
AC
11268int
11269main ()
11270{
97bf5e38
MK
11271
11272 int dummy;;
11273 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11274
11275 ;
11276 return 0;
11277}
11278_ACEOF
81ecdfbb 11279if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11280 gdb_cv_have_procfs_piocset=yes
c906108c 11281else
81ecdfbb 11282 gdb_cv_have_procfs_piocset=no
c906108c 11283fi
81ecdfbb 11284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11285fi
97bf5e38 11286
81ecdfbb
RW
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11288$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11289 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11290
81ecdfbb 11291$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11292
11293 fi
c906108c 11294fi
c906108c 11295
97bf5e38 11296if test ${host} = ${target} ; then
bec39cab 11297
81ecdfbb
RW
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11299$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11300 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11301 $as_echo_n "(cached) " >&6
bec39cab 11302else
81ecdfbb 11303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11304/* end confdefs.h. */
97bf5e38 11305#include <link.h>
bec39cab
AC
11306int
11307main ()
11308{
97bf5e38 11309struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11310 ;
11311 return 0;
11312}
11313_ACEOF
81ecdfbb 11314if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11315 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11316else
81ecdfbb 11317 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11318fi
81ecdfbb 11319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11320fi
11321
81ecdfbb
RW
11322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11323$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11324 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11325
81ecdfbb 11326$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11327
11328 fi
11329
bec39cab 11330
81ecdfbb
RW
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11332$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11333 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11334 $as_echo_n "(cached) " >&6
c906108c 11335else
81ecdfbb 11336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11337/* end confdefs.h. */
97bf5e38
MK
11338#include <sys/types.h>
11339#include <link.h>
bec39cab
AC
11340int
11341main ()
11342{
97bf5e38 11343struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11344 ;
11345 return 0;
11346}
11347_ACEOF
81ecdfbb 11348if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11349 gdb_cv_have_struct_link_map_with_lm_members=yes
11350else
81ecdfbb 11351 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11352fi
81ecdfbb 11353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11354fi
c906108c 11355
81ecdfbb
RW
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11357$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11358 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11359
81ecdfbb 11360$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11361
11362 fi
11363
bec39cab 11364
81ecdfbb
RW
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11366$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11367 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11368 $as_echo_n "(cached) " >&6
c906108c 11369else
81ecdfbb 11370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11371/* end confdefs.h. */
97bf5e38
MK
11372#include <sys/types.h>
11373#ifdef HAVE_NLIST_H
11374#include <nlist.h>
11375#endif
11376#include <link.h>
bec39cab
AC
11377int
11378main ()
11379{
97bf5e38 11380struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11381 ;
11382 return 0;
11383}
11384_ACEOF
81ecdfbb 11385if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11386 gdb_cv_have_struct_so_map_with_som_members=yes
11387else
81ecdfbb 11388 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11389fi
81ecdfbb 11390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11391fi
c906108c 11392
81ecdfbb
RW
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11394$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11395 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11396
81ecdfbb 11397$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11398
97bf5e38 11399 fi
c906108c 11400
bec39cab 11401
81ecdfbb
RW
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11403$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11404 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11405 $as_echo_n "(cached) " >&6
97bf5e38 11406else
81ecdfbb 11407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11408/* end confdefs.h. */
97bf5e38
MK
11409#define _SYSCALL32
11410#include <sys/link.h>
bec39cab
AC
11411int
11412main ()
11413{
97bf5e38 11414struct link_map32 l;
bec39cab
AC
11415 ;
11416 return 0;
11417}
11418_ACEOF
81ecdfbb 11419if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11420 gdb_cv_have_struct_link_map32=yes
11421else
81ecdfbb 11422 gdb_cv_have_struct_link_map32=no
97bf5e38 11423fi
81ecdfbb 11424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11425fi
c906108c 11426
81ecdfbb
RW
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11428$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11429 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11430
81ecdfbb 11431$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11432
60ca704f 11433
81ecdfbb 11434$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11435
97bf5e38
MK
11436 fi
11437fi
c906108c 11438
bc8bcb4b 11439# Check if the compiler supports the `long long' type.
c906108c 11440
81ecdfbb
RW
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11442$as_echo_n "checking for long long support in compiler... " >&6; }
11443if test "${gdb_cv_c_long_long+set}" = set; then :
11444 $as_echo_n "(cached) " >&6
97bf5e38 11445else
81ecdfbb 11446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11447/* end confdefs.h. */
bc8bcb4b 11448extern long long foo;
bec39cab
AC
11449int
11450main ()
11451{
bc8bcb4b 11452switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11453 ;
11454 return 0;
11455}
11456_ACEOF
81ecdfbb 11457if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11458 gdb_cv_c_long_long=yes
11459else
81ecdfbb 11460 gdb_cv_c_long_long=no
97bf5e38 11461fi
81ecdfbb 11462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11463fi
81ecdfbb
RW
11464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11465$as_echo "$gdb_cv_c_long_long" >&6; }
97bf5e38 11466if test $gdb_cv_c_long_long = yes; then
bc8bcb4b 11467
81ecdfbb 11468$as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11469
11470fi
11471
bc8bcb4b 11472# Check if the compiler and runtime support printing long longs.
97bf5e38 11473
81ecdfbb
RW
11474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11475$as_echo_n "checking for long long support in printf... " >&6; }
11476if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11477 $as_echo_n "(cached) " >&6
97bf5e38 11478else
81ecdfbb 11479 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11480 gdb_cv_printf_has_long_long=no
11481else
81ecdfbb 11482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11483/* end confdefs.h. */
bc8bcb4b
MK
11484$ac_includes_default
11485int
11486main ()
11487{
11488char buf[32];
97bf5e38
MK
11489 long long l = 0;
11490 l = (l << 16) + 0x0123;
11491 l = (l << 16) + 0x4567;
11492 l = (l << 16) + 0x89ab;
11493 l = (l << 16) + 0xcdef;
11494 sprintf (buf, "0x%016llx", l);
11495 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11496 ;
11497 return 0;
c906108c 11498}
bec39cab 11499_ACEOF
81ecdfbb 11500if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11501 gdb_cv_printf_has_long_long=yes
11502else
81ecdfbb 11503 gdb_cv_printf_has_long_long=no
97bf5e38 11504fi
81ecdfbb
RW
11505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11506 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11507fi
81ecdfbb 11508
97bf5e38 11509fi
81ecdfbb
RW
11510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11511$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11512if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11513
81ecdfbb 11514$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11515
11516fi
97bf5e38 11517
1a619819
LM
11518# Check if the compiler and runtime support printing decfloats.
11519
81ecdfbb
RW
11520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11521$as_echo_n "checking for decfloat support in printf... " >&6; }
11522if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11523 $as_echo_n "(cached) " >&6
1a619819 11524else
81ecdfbb 11525 if test "$cross_compiling" = yes; then :
1a619819
LM
11526 gdb_cv_printf_has_decfloat=no
11527else
81ecdfbb 11528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11529/* end confdefs.h. */
11530$ac_includes_default
11531int
11532main ()
11533{
11534char buf[64];
11535 _Decimal32 d32 = 1.2345df;
11536 _Decimal64 d64 = 1.2345dd;
11537 _Decimal128 d128 = 1.2345dl;
11538 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11539 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11540 ;
11541 return 0;
11542}
11543_ACEOF
81ecdfbb 11544if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11545 gdb_cv_printf_has_decfloat=yes
11546else
81ecdfbb 11547 gdb_cv_printf_has_decfloat=no
1a619819 11548fi
81ecdfbb
RW
11549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11550 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11551fi
81ecdfbb 11552
1a619819 11553fi
81ecdfbb
RW
11554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11555$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11556if test $gdb_cv_printf_has_decfloat = yes; then
11557
81ecdfbb 11558$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11559
11560fi
11561
bc8bcb4b
MK
11562# Check if the compiler supports the `long double' type. We can't use
11563# AC_C_LONG_DOUBLE because that one does additional checks on the
11564# constants defined in <float.h> that fail on some systems,
11565# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11566
81ecdfbb
RW
11567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11568$as_echo_n "checking for long double support in compiler... " >&6; }
11569if test "${gdb_cv_c_long_double+set}" = set; then :
11570 $as_echo_n "(cached) " >&6
97bf5e38 11571else
81ecdfbb 11572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11573/* end confdefs.h. */
97bf5e38 11574long double foo;
bec39cab 11575_ACEOF
81ecdfbb 11576if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11577 gdb_cv_c_long_double=yes
97bf5e38 11578else
81ecdfbb 11579 gdb_cv_c_long_double=no
97bf5e38 11580fi
81ecdfbb 11581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11582fi
81ecdfbb
RW
11583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11584$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11585if test $gdb_cv_c_long_double = yes; then
c906108c 11586
81ecdfbb 11587$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11588
11589fi
11590
bc8bcb4b 11591# Check if the compiler and runtime support printing long doubles.
97bf5e38 11592
81ecdfbb
RW
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11594$as_echo_n "checking for long double support in printf... " >&6; }
11595if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11596 $as_echo_n "(cached) " >&6
97bf5e38 11597else
81ecdfbb 11598 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11599 gdb_cv_printf_has_long_double=no
11600else
81ecdfbb 11601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11602/* end confdefs.h. */
bc8bcb4b
MK
11603$ac_includes_default
11604int
11605main ()
11606{
11607char buf[16];
97bf5e38
MK
11608 long double f = 3.141592653;
11609 sprintf (buf, "%Lg", f);
11610 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11611 ;
11612 return 0;
97bf5e38 11613}
bec39cab 11614_ACEOF
81ecdfbb 11615if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11616 gdb_cv_printf_has_long_double=yes
c906108c 11617else
81ecdfbb 11618 gdb_cv_printf_has_long_double=no
c906108c 11619fi
81ecdfbb
RW
11620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11621 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11622fi
81ecdfbb 11623
c906108c 11624fi
81ecdfbb
RW
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11626$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11627if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11628
81ecdfbb 11629$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11630
11631fi
97bf5e38 11632
bc8bcb4b 11633# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11634
81ecdfbb
RW
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11636$as_echo_n "checking for long double support in scanf... " >&6; }
11637if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11638 $as_echo_n "(cached) " >&6
97bf5e38 11639else
81ecdfbb 11640 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11641 gdb_cv_scanf_has_long_double=no
11642else
81ecdfbb 11643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11644/* end confdefs.h. */
bc8bcb4b
MK
11645#include <stdio.h>
11646int
11647main ()
11648{
11649char *buf = "3.141592653";
97bf5e38
MK
11650 long double f = 0;
11651 sscanf (buf, "%Lg", &f);
11652 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11653 ;
11654 return 0;
97bf5e38 11655}
bec39cab 11656_ACEOF
81ecdfbb 11657if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11658 gdb_cv_scanf_has_long_double=yes
11659else
81ecdfbb 11660 gdb_cv_scanf_has_long_double=no
97bf5e38 11661fi
81ecdfbb
RW
11662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11663 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11664fi
81ecdfbb 11665
c906108c 11666fi
81ecdfbb
RW
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11668$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11669if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11670
81ecdfbb 11671$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11672
11673fi
c906108c 11674
438013df
AO
11675case ${host_os} in
11676aix*)
81ecdfbb
RW
11677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11678$as_echo_n "checking for -bbigtoc option... " >&6; }
11679if test "${gdb_cv_bigtoc+set}" = set; then :
11680 $as_echo_n "(cached) " >&6
438013df 11681else
bec39cab 11682
438013df
AO
11683 SAVE_LDFLAGS=$LDFLAGS
11684
11685 case $GCC in
11686 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11687 *) gdb_cv_bigtoc=-bbigtoc ;;
11688 esac
11689
11690 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11692/* end confdefs.h. */
438013df 11693
bec39cab
AC
11694int
11695main ()
11696{
438013df 11697int i;
bec39cab
AC
11698 ;
11699 return 0;
11700}
11701_ACEOF
81ecdfbb 11702if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11703
81ecdfbb
RW
11704else
11705 gdb_cv_bigtoc=
438013df 11706fi
81ecdfbb
RW
11707rm -f core conftest.err conftest.$ac_objext \
11708 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11709 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11710
bec39cab 11711fi
81ecdfbb
RW
11712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11713$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11714 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11715 ;;
11716esac
11717
38f6b338 11718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11719$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11720dynamic_list=false
11721if test "${gdb_native}" = yes; then
11722 # The dynamically loaded libthread_db needs access to symbols in the gdb
11723 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11724 # may not be supported there.
11725 old_LDFLAGS="$LDFLAGS"
11726 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11727 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11728 LDFLAGS="$LDFLAGS $RDYNAMIC"
11729 if test "${have_libpython}" = no; then
11730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11731/* end confdefs.h. */
11732
11733int
11734main ()
11735{
11736
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11742 dynamic_list=true
11743fi
11744rm -f core conftest.err conftest.$ac_objext \
11745 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11746 else
11747 # Workaround http://bugs.python.org/issue4434 where static
11748 # libpythonX.Y.a would get its symbols required for
11749 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11750 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11751 old_CFLAGS="$CFLAGS"
11752 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
11753 if test "$cross_compiling" = yes; then :
3bebe2f2 11754 true
f6528abd 11755else
3bebe2f2
JK
11756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11757/* end confdefs.h. */
11758#include "${have_libpython}/Python.h"
11759int
11760main ()
11761{
11762int err;
38f6b338
JK
11763 Py_Initialize ();
11764 err = PyRun_SimpleString ("import itertools\n");
11765 Py_Finalize ();
11766 return err == 0 ? 0 : 1;
3bebe2f2
JK
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771if ac_fn_c_try_run "$LINENO"; then :
11772 dynamic_list=true
11773fi
11774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11775 conftest.$ac_objext conftest.beam conftest.$ac_ext
11776fi
11777
38f6b338
JK
11778 CFLAGS="$old_CFLAGS"
11779 fi
11780 LDFLAGS="$old_LDFLAGS"
11781fi
11782if $dynamic_list; then
11783 found="-Wl,--dynamic-list"
11784 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11785else
38f6b338
JK
11786 found="-rdynamic"
11787 RDYNAMIC="-rdynamic"
f6528abd 11788fi
f6528abd 11789
38f6b338 11790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11791$as_echo "$found" >&6; }
0407b3f1 11792
f6528abd 11793
0407b3f1 11794if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11795 case ${host_os} in
c906108c 11796 solaris*)
d92419e5
JB
11797 # See if thread_db library is around for Solaris thread debugging.
11798 # Note that we must explicitly test for version 1 of the library
11799 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11800 # the same API.
81ecdfbb
RW
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11802$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11803 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11805$as_echo "yes" >&6; }
60ca704f 11806
81ecdfbb 11807$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11808
3483b318 11809 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11810 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11812$as_echo_n "checking for dlopen in -ldl... " >&6; }
11813if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11814 $as_echo_n "(cached) " >&6
c906108c 11815else
bec39cab 11816 ac_check_lib_save_LIBS=$LIBS
c906108c 11817LIBS="-ldl $LIBS"
81ecdfbb 11818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11819/* end confdefs.h. */
11820
81ecdfbb
RW
11821/* Override any GCC internal prototype to avoid an error.
11822 Use char because int might match the return type of a GCC
11823 builtin and then its argument prototype would still apply. */
bec39cab
AC
11824#ifdef __cplusplus
11825extern "C"
11826#endif
bec39cab
AC
11827char dlopen ();
11828int
11829main ()
11830{
81ecdfbb 11831return dlopen ();
bec39cab
AC
11832 ;
11833 return 0;
11834}
11835_ACEOF
81ecdfbb 11836if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11837 ac_cv_lib_dl_dlopen=yes
11838else
81ecdfbb 11839 ac_cv_lib_dl_dlopen=no
bec39cab 11840fi
81ecdfbb
RW
11841rm -f core conftest.err conftest.$ac_objext \
11842 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11843LIBS=$ac_check_lib_save_LIBS
11844fi
81ecdfbb
RW
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11846$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11847if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11848 cat >>confdefs.h <<_ACEOF
11849#define HAVE_LIBDL 1
11850_ACEOF
c906108c
SS
11851
11852 LIBS="-ldl $LIBS"
11853
c906108c
SS
11854fi
11855
f6528abd 11856 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
11857 # Sun randomly tweaked the prototypes in <proc_service.h>
11858 # at one point.
81ecdfbb
RW
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
11860$as_echo_n "checking if <proc_service.h> is old... " >&6; }
11861 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
11862 $as_echo_n "(cached) " >&6
c906108c 11863else
bec39cab 11864
81ecdfbb 11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11866/* end confdefs.h. */
c906108c
SS
11867
11868 #include <proc_service.h>
11869 ps_err_e ps_pdwrite
11870 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 11871
bec39cab
AC
11872int
11873main ()
11874{
11875
11876 ;
11877 return 0;
11878}
11879_ACEOF
81ecdfbb 11880if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
11881 gdb_cv_proc_service_is_old=no
11882else
81ecdfbb 11883 gdb_cv_proc_service_is_old=yes
c906108c 11884fi
81ecdfbb 11885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11886
c906108c
SS
11887fi
11888
81ecdfbb
RW
11889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
11890$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 11891 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 11892
81ecdfbb 11893$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
11894
11895 fi
11896 else
81ecdfbb
RW
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11898$as_echo "no" >&6; }
c906108c
SS
11899 fi
11900 ;;
d92419e5 11901 aix*)
81ecdfbb
RW
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
11903$as_echo_n "checking for AiX thread debugging library... " >&6; }
11904 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
11905 $as_echo_n "(cached) " >&6
bec39cab 11906else
81ecdfbb 11907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11908/* end confdefs.h. */
d92419e5 11909#include <sys/pthdebug.h>
bec39cab
AC
11910int
11911main ()
11912{
d92419e5
JB
11913#ifndef PTHDB_VERSION_3
11914 #error
11915 #endif
bec39cab
AC
11916 ;
11917 return 0;
11918}
11919_ACEOF
81ecdfbb 11920if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
11921 gdb_cv_have_aix_thread_debug=yes
11922else
81ecdfbb 11923 gdb_cv_have_aix_thread_debug=no
d92419e5 11924fi
81ecdfbb 11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
11926fi
11927
81ecdfbb
RW
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
11929$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
11930 if test $gdb_cv_have_aix_thread_debug = yes; then
11931 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 11932 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 11933 LIBS="$LIBS -lpthdebug"
d645e32e
JB
11934
11935 # Older versions of AIX do not provide the declaration for
11936 # the getthrds function (it appears that it was introduced
11937 # with AIX 6.x).
11938 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
11939"
11940if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
11941 ac_have_decl=1
11942else
11943 ac_have_decl=0
11944fi
11945
11946cat >>confdefs.h <<_ACEOF
11947#define HAVE_DECL_GETTHRDS $ac_have_decl
11948_ACEOF
11949
d92419e5
JB
11950 fi
11951 ;;
c906108c 11952 esac
bec39cab 11953
c906108c
SS
11954fi
11955
3f47be5c 11956if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
11958$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
11959if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
11960 $as_echo_n "(cached) " >&6
bec39cab 11961else
81ecdfbb 11962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11963/* end confdefs.h. */
3f47be5c 11964#include <thread_db.h>
bec39cab
AC
11965int
11966main ()
11967{
3f47be5c 11968int i = TD_NOTALLOC;
bec39cab
AC
11969 ;
11970 return 0;
11971}
11972_ACEOF
81ecdfbb 11973if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
11974 gdb_cv_thread_db_h_has_td_notalloc=yes
11975else
81ecdfbb 11976 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 11977
3f47be5c 11978fi
81ecdfbb 11979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 11980
bec39cab 11981fi
81ecdfbb
RW
11982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
11983$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
11985$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
11986if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
11987 $as_echo_n "(cached) " >&6
59f80f10 11988else
81ecdfbb 11989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
11990/* end confdefs.h. */
11991#include <thread_db.h>
11992int
11993main ()
11994{
11995int i = TD_VERSION;
11996 ;
11997 return 0;
11998}
11999_ACEOF
81ecdfbb 12000if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12001 gdb_cv_thread_db_h_has_td_version=yes
12002else
81ecdfbb 12003 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12004
12005fi
81ecdfbb 12006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12007
12008fi
81ecdfbb
RW
12009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12010$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12012$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12013if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12014 $as_echo_n "(cached) " >&6
59f80f10 12015else
81ecdfbb 12016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12017/* end confdefs.h. */
12018#include <thread_db.h>
12019int
12020main ()
12021{
12022int i = TD_NOTLS;
12023 ;
12024 return 0;
12025}
12026_ACEOF
81ecdfbb 12027if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12028 gdb_cv_thread_db_h_has_td_notls=yes
12029else
81ecdfbb 12030 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12031
12032fi
81ecdfbb 12033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12034
12035fi
81ecdfbb
RW
12036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12037$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12038fi
12039if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12040
81ecdfbb 12041$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12042
59f80f10
DJ
12043fi
12044if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12045
81ecdfbb 12046$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12047
12048fi
12049if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12050
81ecdfbb 12051$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12052
3f47be5c
EZ
12053fi
12054
b757528f 12055if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12057$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12058if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12059 $as_echo_n "(cached) " >&6
bec39cab 12060else
81ecdfbb 12061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12062/* end confdefs.h. */
b757528f 12063#include <sys/syscall.h>
bec39cab
AC
12064int
12065main ()
12066{
b757528f 12067int i = __NR_tkill;
bec39cab
AC
12068 ;
12069 return 0;
12070}
12071_ACEOF
81ecdfbb 12072if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12073 gdb_cv_sys_syscall_h_has_tkill=yes
12074else
81ecdfbb 12075 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12076
b757528f 12077fi
81ecdfbb 12078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12079
bec39cab 12080fi
81ecdfbb
RW
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12082$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12083fi
12084if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12085
81ecdfbb 12086$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12087
12088fi
12089
81ecdfbb
RW
12090ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12091"
12092if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12093 ac_have_decl=1
10568435 12094else
81ecdfbb 12095 ac_have_decl=0
10568435 12096fi
10568435
JK
12097
12098cat >>confdefs.h <<_ACEOF
81ecdfbb 12099#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12100_ACEOF
12101
12102
81ecdfbb
RW
12103if test "$cross_compiling" = yes; then :
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12105/* end confdefs.h. */
12106#include <sys/personality.h>
12107int
12108main ()
12109{
12110
12111# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12112# define ADDR_NO_RANDOMIZE 0x0040000
12113# endif
12114 /* Test the flag could be set and stays set. */
12115 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12116 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12117 return 1
12118 ;
12119 return 0;
12120}
12121_ACEOF
81ecdfbb 12122if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12123 have_personality=true
12124else
81ecdfbb 12125 have_personality=false
10568435 12126fi
81ecdfbb
RW
12127rm -f core conftest.err conftest.$ac_objext \
12128 conftest$ac_exeext conftest.$ac_ext
10568435 12129else
81ecdfbb 12130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12131/* end confdefs.h. */
12132#include <sys/personality.h>
12133int
12134main ()
12135{
12136
12137# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12138# define ADDR_NO_RANDOMIZE 0x0040000
12139# endif
12140 /* Test the flag could be set and stays set. */
12141 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12142 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12143 return 1
12144 ;
12145 return 0;
12146}
12147_ACEOF
81ecdfbb 12148if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12149 have_personality=true
12150else
81ecdfbb 12151 have_personality=false
10568435 12152fi
81ecdfbb
RW
12153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12154 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12155fi
81ecdfbb 12156
10568435
JK
12157if $have_personality
12158then
12159
81ecdfbb 12160$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12161
12162fi
12163
fb40c209 12164
f83d8a90
DE
12165# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12166# except that the argument to --with-sysroot is optional.
12167# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12168if test "x$with_sysroot" = xyes; then
12169 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12170fi
bec39cab 12171
81ecdfbb
RW
12172# Check whether --with-sysroot was given.
12173if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12174 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12175else
12176 TARGET_SYSTEM_ROOT=
12177fi
030292b7 12178
030292b7 12179
f83d8a90
DE
12180 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12181 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12182 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12183 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12184
f83d8a90
DE
12185cat >>confdefs.h <<_ACEOF
12186#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12187_ACEOF
bec39cab 12188
030292b7 12189
b14b1491 12190
f83d8a90
DE
12191
12192 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12193 if test "x$prefix" = xNONE; then
12194 test_prefix=/usr/local
12195 else
12196 test_prefix=$prefix
12197 fi
12198 else
12199 test_prefix=$exec_prefix
12200 fi
12201 value=0
12202 case ${ac_define_dir} in
12203 "${test_prefix}"|"${test_prefix}/"*|\
12204 '${exec_prefix}'|'${exec_prefix}/'*)
12205 value=1
12206 ;;
12207 esac
12208
12209cat >>confdefs.h <<_ACEOF
12210#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12211_ACEOF
030292b7
DJ
12212
12213
12214
16e7150e 12215
16e7150e 12216
81ecdfbb
RW
12217# Check whether --with-system-gdbinit was given.
12218if test "${with_system_gdbinit+set}" = set; then :
12219 withval=$with_system_gdbinit;
b14b1491
TT
12220 SYSTEM_GDBINIT=$withval
12221else
12222 SYSTEM_GDBINIT=
81ecdfbb
RW
12223fi
12224
16e7150e
JG
12225
12226 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12227 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12228 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12229 ac_define_dir=`eval echo $ac_define_dir`
12230
12231cat >>confdefs.h <<_ACEOF
12232#define SYSTEM_GDBINIT "$ac_define_dir"
12233_ACEOF
12234
12235
12236
0c4a4063 12237
b14b1491
TT
12238 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12239 if test "x$prefix" = xNONE; then
12240 test_prefix=/usr/local
12241 else
12242 test_prefix=$prefix
12243 fi
12244 else
12245 test_prefix=$exec_prefix
12246 fi
12247 value=0
12248 case ${ac_define_dir} in
12249 "${test_prefix}"|"${test_prefix}/"*|\
12250 '${exec_prefix}'|'${exec_prefix}/'*)
12251 value=1
12252 ;;
12253 esac
16e7150e 12254
b14b1491
TT
12255cat >>confdefs.h <<_ACEOF
12256#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12257_ACEOF
12258
b14b1491 12259
16e7150e 12260
0c4a4063 12261
81ecdfbb
RW
12262# Check whether --enable-werror was given.
12263if test "${enable_werror+set}" = set; then :
12264 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12265 yes | y) ERROR_ON_WARNING="yes" ;;
12266 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12267 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12268 esac
81ecdfbb
RW
12269fi
12270
094a342e
MK
12271
12272# Enable -Werror by default when using gcc
12273if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
12274 ERROR_ON_WARNING=yes
12275fi
12276
12277WERROR_CFLAGS=""
12278if test "${ERROR_ON_WARNING}" = yes ; then
12279 WERROR_CFLAGS="-Werror"
12280fi
12281
aa79a185
DJ
12282# The entries after -Wno-pointer-sign are disabled warnings which may
12283# be enabled in the future, which can not currently be used to build
12284# GDB.
12285# NOTE: If you change this list, remember to update
3b851bce 12286# gdb/doc/gdbint.texinfo.
aa79a185
DJ
12287build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12288-Wformat-nonliteral -Wno-pointer-sign \
1cb5e2a4 12289-Wno-unused -Wunused-value -Wunused-function \
b03a2011 12290-Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
a3b362c4 12291
3526781e
DJ
12292# Enable -Wno-format by default when using gcc on mingw since many
12293# GCC versions complain about %I64.
12294case "${host}" in
12295 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12296esac
12297
81ecdfbb
RW
12298# Check whether --enable-build-warnings was given.
12299if test "${enable_build_warnings+set}" = set; then :
12300 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12301 yes) ;;
12302 no) build_warnings="-w";;
12303 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12304 build_warnings="${build_warnings} ${t}";;
12305 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12306 build_warnings="${t} ${build_warnings}";;
12307 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12308esac
d4f3574e 12309if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12310 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12311fi
81ecdfbb
RW
12312fi
12313# Check whether --enable-gdb-build-warnings was given.
12314if test "${enable_gdb_build_warnings+set}" = set; then :
12315 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12316 yes) ;;
12317 no) build_warnings="-w";;
12318 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12319 build_warnings="${build_warnings} ${t}";;
12320 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12321 build_warnings="${t} ${build_warnings}";;
12322 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12323esac
12324if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12325 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12326fi
81ecdfbb
RW
12327fi
12328WARN_CFLAGS=""
c906108c
SS
12329if test "x${build_warnings}" != x -a "x$GCC" = xyes
12330then
81ecdfbb
RW
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12332$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12333 # Separate out the -Werror flag as some files just cannot be
12334 # compiled with it enabled.
12335 for w in ${build_warnings}; do
12336 case $w in
12337 -Werr*) WERROR_CFLAGS=-Werror ;;
12338 *) # Check that GCC accepts it
4536bbc6
AC
12339 saved_CFLAGS="$CFLAGS"
12340 CFLAGS="$CFLAGS $w"
81ecdfbb 12341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12342/* end confdefs.h. */
4536bbc6 12343
bec39cab
AC
12344int
12345main ()
12346{
4536bbc6 12347
bec39cab
AC
12348 ;
12349 return 0;
12350}
12351_ACEOF
81ecdfbb 12352if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12353 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12354fi
81ecdfbb 12355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12356 CFLAGS="$saved_CFLAGS"
746a987d
AC
12357 esac
12358 done
81ecdfbb
RW
12359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12360$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12361fi
12362
12363
104c1213 12364
7a292a7a 12365# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12367$as_echo_n "checking for cygwin... " >&6; }
12368if test "${gdb_cv_os_cygwin+set}" = set; then :
12369 $as_echo_n "(cached) " >&6
bec39cab 12370else
81ecdfbb 12371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12372/* end confdefs.h. */
7a292a7a
SS
12373
12374#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12375lose
12376#endif
bec39cab 12377_ACEOF
7a292a7a 12378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12379 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12380 gdb_cv_os_cygwin=yes
12381else
7a292a7a
SS
12382 gdb_cv_os_cygwin=no
12383fi
12384rm -f conftest*
12385
12386fi
81ecdfbb
RW
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12388$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12389
aff38e61 12390
3eb25fda 12391SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12392case ${host} in
95cbc983
AC
12393 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12394 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12395 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12396esac
12397
12398
cd0fc7c3
SS
12399# libreadline needs libuser32.a in a cygwin environment
12400WIN32LIBS=
12401if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12402 WIN32LIBS="-luser32"
12403 case "${target}" in
12404 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12405 ;;
12406 esac
cd0fc7c3 12407fi
c906108c 12408
b4505029
MM
12409# The ser-tcp.c module requires sockets.
12410case ${host} in
12411 *mingw32*)
12412
81ecdfbb 12413$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12414
12415 WIN32LIBS="$WIN32LIBS -lws2_32"
12416 ;;
12417esac
12418
7a292a7a 12419
31d99776
DJ
12420# Add ELF support to GDB, but only if BFD includes ELF support.
12421OLD_CFLAGS=$CFLAGS
12422OLD_LDFLAGS=$LDFLAGS
12423OLD_LIBS=$LIBS
12cd34f3
PA
12424# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12425# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12426# always want our bfd.
12427CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5579a92e 12428LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
7b3200f9 12429intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
075ff26d
JK
12430# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12431if test "$plugins" = "yes"; then
12432 LIBS="-ldl $LIBS"
12433fi
0f72fb1c 12434LIBS="-lbfd -liberty $intl $LIBS"
81ecdfbb
RW
12435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
12436$as_echo_n "checking for ELF support in BFD... " >&6; }
12437if test "${gdb_cv_var_elf+set}" = set; then :
12438 $as_echo_n "(cached) " >&6
31d99776 12439else
81ecdfbb 12440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12441/* end confdefs.h. */
12442#include <stdlib.h>
12443#include "bfd.h"
12444#include "elf-bfd.h"
12445
12446int
12447main ()
12448{
12449bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
12450 ;
12451 return 0;
12452}
12453_ACEOF
81ecdfbb 12454if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12455 gdb_cv_var_elf=yes
12456else
81ecdfbb 12457 gdb_cv_var_elf=no
31d99776 12458fi
81ecdfbb
RW
12459rm -f core conftest.err conftest.$ac_objext \
12460 conftest$ac_exeext conftest.$ac_ext
31d99776 12461fi
81ecdfbb
RW
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12463$as_echo "$gdb_cv_var_elf" >&6; }
31d99776
DJ
12464if test $gdb_cv_var_elf = yes; then
12465 CONFIG_OBS="$CONFIG_OBS elfread.o"
12466
81ecdfbb 12467$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12468
075ff26d
JK
12469 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12470 if test "$plugins" = "yes"; then
12471 OLD_LIBS="-ldl $OLD_LIBS"
12472 fi
31d99776
DJ
12473fi
12474CFLAGS=$OLD_CFLAGS
12475LDFLAGS=$OLD_LDFLAGS
12476LIBS=$OLD_LIBS
12477
121ce6e5
DJ
12478# Add any host-specific objects to GDB.
12479CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12480
3fc11d3e
JM
12481LIBGUI="../libgui/src/libgui.a"
12482GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
12483
12484
7a292a7a 12485
3fc11d3e
JM
12486WIN32LDAPP=
12487
12488
12489
d91670b9 12490case "${host}" in
686a5eed 12491*-*-cygwin* | *-*-mingw* )
d91670b9
CV
12492 configdir="win"
12493 ;;
12494*)
12495 configdir="unix"
12496 ;;
12497esac
3fc11d3e
JM
12498
12499GDBTKLIBS=
12500if test "${enable_gdbtk}" = "yes"; then
12501
d1c3b63a
KS
12502 # Gdbtk must have an absolute path to srcdir in order to run
12503 # properly when not installed.
12504 here=`pwd`
12505 cd ${srcdir}
12506 GDBTK_SRC_DIR=`pwd`
12507 cd $here
12508
bec39cab 12509
5062cc19
KS
12510 #
12511 # Ok, lets find the tcl configuration
12512 # First, look for one uninstalled.
12513 # the alternative search directory is invoked by --with-tcl
12514 #
3fc11d3e 12515
5062cc19
KS
12516 if test x"${no_tcl}" = x ; then
12517 # we reset no_tcl in case something fails here
12518 no_tcl=true
bec39cab 12519
81ecdfbb
RW
12520# Check whether --with-tcl was given.
12521if test "${with_tcl+set}" = set; then :
12522 withval=$with_tcl; with_tclconfig=${withval}
12523fi
12524
12525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
12526$as_echo_n "checking for Tcl configuration... " >&6; }
12527 if test "${ac_cv_c_tclconfig+set}" = set; then :
12528 $as_echo_n "(cached) " >&6
3fc11d3e 12529else
bec39cab 12530
3fc11d3e 12531
5062cc19
KS
12532 # First check to see if --with-tcl was specified.
12533 case "${host}" in
12534 *-*-cygwin*) platDir="win" ;;
12535 *) platDir="unix" ;;
12536 esac
12537 if test x"${with_tclconfig}" != x ; then
12538 if test -f "${with_tclconfig}/tclConfig.sh" ; then
12539 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
12540 else
81ecdfbb 12541 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
12542 fi
12543 fi
12544
12545 # then check for a private Tcl installation
12546 if test x"${ac_cv_c_tclconfig}" = x ; then
12547 for i in \
12548 ../tcl \
12549 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12550 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
12551 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
12552 ../../tcl \
12553 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12554 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
12555 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
12556 ../../../tcl \
12557 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12558 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
12559 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
12560 if test -f "$i/$platDir/tclConfig.sh" ; then
12561 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12562 break
12563 fi
12564 done
12565 fi
12566
12567 # on Darwin, check in Framework installation locations
12568 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
12569 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12570 `ls -d /Library/Frameworks 2>/dev/null` \
12571 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12572 `ls -d /System/Library/Frameworks 2>/dev/null` \
12573 ; do
12574 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
12575 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
12576 break
12577 fi
12578 done
12579 fi
12580
12581 # check in a few common install locations
12582 if test x"${ac_cv_c_tclconfig}" = x ; then
12583 for i in `ls -d ${libdir} 2>/dev/null` \
12584 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12585 `ls -d ${prefix}/lib 2>/dev/null` \
12586 `ls -d /usr/local/lib 2>/dev/null` \
12587 `ls -d /usr/contrib/lib 2>/dev/null` \
12588 `ls -d /usr/lib 2>/dev/null` \
12589 ; do
12590 if test -f "$i/tclConfig.sh" ; then
12591 ac_cv_c_tclconfig=`(cd $i; pwd)`
12592 break
12593 fi
12594 done
12595 fi
3fc11d3e 12596
5062cc19
KS
12597 # check in a few other private locations
12598 if test x"${ac_cv_c_tclconfig}" = x ; then
12599 for i in \
12600 ${srcdir}/../tcl \
12601 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
12602 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
12603 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
12604 if test -f "$i/$platDir/tclConfig.sh" ; then
12605 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
12606 break
12607 fi
12608 done
12609 fi
bec39cab 12610
3fc11d3e
JM
12611fi
12612
5062cc19
KS
12613
12614 if test x"${ac_cv_c_tclconfig}" = x ; then
12615 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
12617$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
12618 else
12619 no_tcl=
12620 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
12622$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
12623 fi
12624 fi
3fc11d3e 12625
bec39cab 12626
85541719
DE
12627 # If $no_tk is nonempty, then we can't do Tk, and there is no
12628 # point to doing Tcl.
bec39cab 12629
5062cc19
KS
12630 #
12631 # Ok, lets find the tk configuration
12632 # First, look for one uninstalled.
12633 # the alternative search directory is invoked by --with-tk
12634 #
3fc11d3e 12635
5062cc19
KS
12636 if test x"${no_tk}" = x ; then
12637 # we reset no_tk in case something fails here
12638 no_tk=true
bec39cab 12639
81ecdfbb
RW
12640# Check whether --with-tk was given.
12641if test "${with_tk+set}" = set; then :
12642 withval=$with_tk; with_tkconfig=${withval}
12643fi
12644
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
12646$as_echo_n "checking for Tk configuration... " >&6; }
12647 if test "${ac_cv_c_tkconfig+set}" = set; then :
12648 $as_echo_n "(cached) " >&6
bec39cab 12649else
3fc11d3e
JM
12650
12651
5062cc19
KS
12652 # First check to see if --with-tkconfig was specified.
12653 if test x"${with_tkconfig}" != x ; then
12654 if test -f "${with_tkconfig}/tkConfig.sh" ; then
12655 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
12656 else
81ecdfbb 12657 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
12658 fi
12659 fi
3fc11d3e 12660
5062cc19
KS
12661 # then check for a private Tk library
12662 case "${host}" in
12663 *-*-cygwin*) platDir="win" ;;
12664 *) platDir="unix" ;;
12665 esac
12666 if test x"${ac_cv_c_tkconfig}" = x ; then
12667 for i in \
12668 ../tk \
12669 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12670 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
12671 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
12672 ../../tk \
12673 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12674 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
12675 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
12676 ../../../tk \
12677 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12678 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
12679 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
12680 if test -f "$i/$platDir/tkConfig.sh" ; then
12681 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12682 break
12683 fi
12684 done
12685 fi
12686
12687 # on Darwin, check in Framework installation locations
12688 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
12689 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
12690 `ls -d /Library/Frameworks 2>/dev/null` \
12691 `ls -d /Network/Library/Frameworks 2>/dev/null` \
12692 `ls -d /System/Library/Frameworks 2>/dev/null` \
12693 ; do
12694 if test -f "$i/Tk.framework/tkConfig.sh" ; then
12695 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
12696 break
12697 fi
12698 done
12699 fi
12700
12701 # check in a few common install locations
12702 if test x"${ac_cv_c_tkconfig}" = x ; then
12703 for i in `ls -d ${libdir} 2>/dev/null` \
12704 `ls -d ${exec_prefix}/lib 2>/dev/null` \
12705 `ls -d ${prefix}/lib 2>/dev/null` \
12706 `ls -d /usr/local/lib 2>/dev/null` \
12707 `ls -d /usr/contrib/lib 2>/dev/null` \
12708 `ls -d /usr/lib 2>/dev/null` \
12709 ; do
12710 if test -f "$i/tkConfig.sh" ; then
12711 ac_cv_c_tkconfig=`(cd $i; pwd)`
12712 break
12713 fi
12714 done
12715 fi
12716 # check in a few other private locations
12717 if test x"${ac_cv_c_tkconfig}" = x ; then
12718 for i in \
12719 ${srcdir}/../tk \
12720 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
12721 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
12722 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
12723 if test -f "$i/$platDir/tkConfig.sh" ; then
12724 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
12725 break
12726 fi
12727 done
12728 fi
3fc11d3e 12729
3fc11d3e
JM
12730fi
12731
12732
5062cc19
KS
12733 if test x"${ac_cv_c_tkconfig}" = x ; then
12734 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
12736$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
12737 else
12738 no_tk=
12739 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
12741$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 12742 fi
3fc11d3e 12743 fi
dd2504ab 12744
dd2504ab 12745
85541719
DE
12746 if test -z "${no_tcl}" -a -z "${no_tk}"; then
12747
81ecdfbb
RW
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
12749$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
12750
12751 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12753$as_echo "loading" >&6; }
85541719
DE
12754 . ${TCL_BIN_DIR}/tclConfig.sh
12755 else
81ecdfbb
RW
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
12757$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
12758 fi
12759
12760 # eval is required to do the TCL_DBGX substitution
12761 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
12762 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
12763
12764 # If the TCL_BIN_DIR is the build directory (not the install directory),
12765 # then set the common variable name to the value of the build variables.
12766 # For example, the variable TCL_LIB_SPEC will be set to the value
12767 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
12768 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
12769 # installed and uninstalled version of Tcl.
12770 if test -f "${TCL_BIN_DIR}/Makefile" ; then
12771 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
12772 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
12773 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
12774 elif test "`uname -s`" = "Darwin"; then
12775 # If Tcl was built as a framework, attempt to use the libraries
12776 # from the framework at the given location so that linking works
12777 # against Tcl.framework installed in an arbitary location.
12778 case ${TCL_DEFS} in
12779 *TCL_FRAMEWORK*)
12780 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
12781 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
12782 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
12783 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
12784 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
12785 break
12786 fi
12787 done
12788 fi
12789 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
12790 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
12791 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
12792 fi
12793 ;;
12794 esac
12795 fi
12796
12797 # eval is required to do the TCL_DBGX substitution
12798 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
12799 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
12800 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
12801 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817 # Check for in-tree tcl
12818 here=`pwd`
12819 cd ${srcdir}/..
12820 topdir=`pwd`
12821 cd ${here}
12822
12823 intree="no"
12824 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
12825 intree="yes"
12826 fi
12827
12828 # Find Tcl private headers
12829 if test x"${intree}" = xno; then
12830
81ecdfbb
RW
12831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
12832$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
12833 private_dir=""
12834 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
12835 if test -f ${dir}/tclInt.h ; then
12836 private_dir=${dir}
12837 fi
12838
12839 if test x"${private_dir}" = x; then
81ecdfbb 12840 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
12841 else
12842 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12844$as_echo "${private_dir}" >&6; }
85541719
DE
12845 fi
12846
12847 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
12848 TCL_LIBRARY="${TCL_LIB_SPEC}"
12849 TCL_DEPS=""
12850 else
12851 # If building tcl in the same src tree, private headers
12852 # are not needed, but we need to be sure to use the right
12853 # headers library
12854 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
12855 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
12856 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
12857 fi
12858
12859
12860
12861
12862
81ecdfbb
RW
12863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
12864$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 12865
5062cc19 12866 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
12868$as_echo "loading" >&6; }
5062cc19 12869 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 12870 else
81ecdfbb
RW
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
12872$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 12873 fi
bec39cab 12874
5062cc19
KS
12875 # eval is required to do the TK_DBGX substitution
12876 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
12877 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
12878
12879 # If the TK_BIN_DIR is the build directory (not the install directory),
12880 # then set the common variable name to the value of the build variables.
12881 # For example, the variable TK_LIB_SPEC will be set to the value
12882 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
12883 # instead of TK_BUILD_LIB_SPEC since it will work with both an
12884 # installed and uninstalled version of Tcl.
85541719 12885 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
12886 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
12887 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
12888 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
12889 elif test "`uname -s`" = "Darwin"; then
12890 # If Tk was built as a framework, attempt to use the libraries
12891 # from the framework at the given location so that linking works
12892 # against Tk.framework installed in an arbitary location.
12893 case ${TK_DEFS} in
12894 *TK_FRAMEWORK*)
85541719 12895 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
12896 for i in "`cd ${TK_BIN_DIR}; pwd`" \
12897 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
12898 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
12899 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
12900 break
12901 fi
12902 done
12903 fi
85541719 12904 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
12905 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
12906 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
12907 fi
12908 ;;
12909 esac
3fc11d3e
JM
12910 fi
12911
5062cc19
KS
12912 # eval is required to do the TK_DBGX substitution
12913 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
12914 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
12915 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
12916 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 12917
3fc11d3e
JM
12918
12919
bec39cab
AC
12920
12921
12922
12923
12924
12925
12926
3fc11d3e 12927
3fc11d3e 12928
bec39cab 12929
bec39cab 12930
85541719
DE
12931 # Check for in-tree Tk
12932 intree="no"
12933 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
12934 intree="yes"
12935 fi
3fc11d3e 12936
85541719
DE
12937 # Find Tk private headers
12938 if test x"${intree}" = xno; then
3fc11d3e 12939
81ecdfbb
RW
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
12941$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
12942 private_dir=""
12943 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
12944 if test -f ${dir}/tkInt.h; then
12945 private_dir=${dir}
3fc11d3e 12946 fi
bec39cab 12947
5062cc19 12948 if test x"${private_dir}" = x; then
81ecdfbb 12949 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 12950 else
5062cc19 12951 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
12953$as_echo "${private_dir}" >&6; }
3fc11d3e 12954 fi
3fc11d3e 12955
85541719
DE
12956 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
12957 TK_LIBRARY=${TK_LIB_SPEC}
12958 TK_DEPS=""
12959 else
12960 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
12961 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
12962 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
12963 fi
3fc11d3e
JM
12964
12965
3fc11d3e
JM
12966
12967
3fc11d3e 12968
85541719 12969 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 12970
85541719
DE
12971 # Include some libraries that Tcl and Tk want.
12972 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
12973 # Yes, the ordering seems wrong here. But it isn't.
12974 # TK_LIBS is the list of libraries that need to be linked
12975 # after Tcl/Tk. Note that this isn't put into LIBS. If it
12976 # were in LIBS then any link tests after this point would
12977 # try to include things like `$(LIBGUI)', which wouldn't work.
12978 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 12979
85541719
DE
12980 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
12981 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
12982 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
12983 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
12984 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
12985 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
12986 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 12987
85541719
DE
12988 if test x$gdb_cv_os_cygwin = xyes; then
12989 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
12990 WIN32LDAPP="-Wl,--subsystem,console"
12991 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 12992 fi
ffc6a242 12993
81ecdfbb 12994 subdirs="$subdirs gdbtk"
3ace7edb 12995
85541719 12996 fi
3fc11d3e
JM
12997fi
12998
12999
13000
13001
13002
13003
13004
13005
81ecdfbb
RW
13006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13007$as_echo_n "checking for X... " >&6; }
bec39cab 13008
c906108c 13009
81ecdfbb
RW
13010# Check whether --with-x was given.
13011if test "${with_x+set}" = set; then :
13012 withval=$with_x;
13013fi
c906108c
SS
13014
13015# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13016if test "x$with_x" = xno; then
13017 # The user explicitly disabled X.
13018 have_x=disabled
13019else
81ecdfbb
RW
13020 case $x_includes,$x_libraries in #(
13021 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13022 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13023 $as_echo_n "(cached) " >&6
c906108c
SS
13024else
13025 # One or both of the vars are not set, and there is no cached value.
bec39cab 13026ac_x_includes=no ac_x_libraries=no
81ecdfbb 13027rm -f -r conftest.dir
bec39cab
AC
13028if mkdir conftest.dir; then
13029 cd conftest.dir
bec39cab 13030 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13031incroot:
13032 @echo incroot='${INCROOT}'
13033usrlibdir:
13034 @echo usrlibdir='${USRLIBDIR}'
13035libdir:
13036 @echo libdir='${LIBDIR}'
13037_ACEOF
13038 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13039 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13040 for ac_var in incroot usrlibdir libdir; do
13041 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13042 done
c906108c 13043 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13044 for ac_extension in a so sl dylib la dll; do
13045 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13046 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13047 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13048 fi
13049 done
13050 # Screen out bogus values from the imake configuration. They are
13051 # bogus both because they are the default anyway, and because
13052 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13053 case $ac_im_incroot in
81ecdfbb 13054 /usr/include) ac_x_includes= ;;
bec39cab 13055 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13056 esac
bec39cab 13057 case $ac_im_usrlibdir in
81ecdfbb 13058 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13059 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13060 esac
13061 fi
13062 cd ..
81ecdfbb 13063 rm -f -r conftest.dir
c906108c
SS
13064fi
13065
bec39cab
AC
13066# Standard set of common directories for X headers.
13067# Check X11 before X11Rn because it is often a symlink to the current release.
13068ac_x_header_dirs='
13069/usr/X11/include
81ecdfbb 13070/usr/X11R7/include
bec39cab
AC
13071/usr/X11R6/include
13072/usr/X11R5/include
13073/usr/X11R4/include
13074
13075/usr/include/X11
81ecdfbb 13076/usr/include/X11R7
bec39cab
AC
13077/usr/include/X11R6
13078/usr/include/X11R5
13079/usr/include/X11R4
13080
13081/usr/local/X11/include
81ecdfbb 13082/usr/local/X11R7/include
bec39cab
AC
13083/usr/local/X11R6/include
13084/usr/local/X11R5/include
13085/usr/local/X11R4/include
13086
13087/usr/local/include/X11
81ecdfbb 13088/usr/local/include/X11R7
bec39cab
AC
13089/usr/local/include/X11R6
13090/usr/local/include/X11R5
13091/usr/local/include/X11R4
13092
13093/usr/X386/include
13094/usr/x386/include
13095/usr/XFree86/include/X11
13096
13097/usr/include
13098/usr/local/include
13099/usr/unsupported/include
13100/usr/athena/include
13101/usr/local/x11r5/include
13102/usr/lpp/Xamples/include
13103
13104/usr/openwin/include
13105/usr/openwin/share/include'
13106
13107if test "$ac_x_includes" = no; then
81ecdfbb 13108 # Guess where to find include files, by looking for Xlib.h.
c906108c 13109 # First, try using that file with no special directory specified.
81ecdfbb 13110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13111/* end confdefs.h. */
81ecdfbb 13112#include <X11/Xlib.h>
bec39cab 13113_ACEOF
81ecdfbb 13114if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13115 # We can compile using X headers with no special include directory.
13116ac_x_includes=
13117else
bec39cab 13118 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13119 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13120 ac_x_includes=$ac_dir
13121 break
13122 fi
13123done
c906108c 13124fi
bec39cab
AC
13125rm -f conftest.err conftest.$ac_ext
13126fi # $ac_x_includes = no
c906108c 13127
bec39cab 13128if test "$ac_x_libraries" = no; then
c906108c 13129 # Check for the libraries.
c906108c
SS
13130 # See if we find them without any special options.
13131 # Don't add to $LIBS permanently.
bec39cab 13132 ac_save_LIBS=$LIBS
81ecdfbb
RW
13133 LIBS="-lX11 $LIBS"
13134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13135/* end confdefs.h. */
81ecdfbb 13136#include <X11/Xlib.h>
bec39cab
AC
13137int
13138main ()
13139{
81ecdfbb 13140XrmInitialize ()
bec39cab
AC
13141 ;
13142 return 0;
13143}
13144_ACEOF
81ecdfbb 13145if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13146 LIBS=$ac_save_LIBS
c906108c
SS
13147# We can link X programs with no special library path.
13148ac_x_libraries=
13149else
81ecdfbb
RW
13150 LIBS=$ac_save_LIBS
13151for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13152do
bec39cab 13153 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13154 for ac_extension in a so sl dylib la dll; do
13155 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13156 ac_x_libraries=$ac_dir
13157 break 2
13158 fi
13159 done
13160done
13161fi
81ecdfbb
RW
13162rm -f core conftest.err conftest.$ac_objext \
13163 conftest$ac_exeext conftest.$ac_ext
bec39cab 13164fi # $ac_x_libraries = no
c906108c 13165
81ecdfbb
RW
13166case $ac_x_includes,$ac_x_libraries in #(
13167 no,* | *,no | *\'*)
13168 # Didn't find X, or a directory has "'" in its name.
13169 ac_cv_have_x="have_x=no";; #(
13170 *)
13171 # Record where we found X for the cache.
13172 ac_cv_have_x="have_x=yes\
13173 ac_x_includes='$ac_x_includes'\
13174 ac_x_libraries='$ac_x_libraries'"
13175esac
c906108c 13176fi
81ecdfbb
RW
13177;; #(
13178 *) have_x=yes;;
13179 esac
c906108c
SS
13180 eval "$ac_cv_have_x"
13181fi # $with_x != no
13182
13183if test "$have_x" != yes; then
81ecdfbb
RW
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13185$as_echo "$have_x" >&6; }
c906108c
SS
13186 no_x=yes
13187else
13188 # If each of the values was on the command line, it overrides each guess.
13189 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13190 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13191 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13192 ac_cv_have_x="have_x=yes\
13193 ac_x_includes='$x_includes'\
13194 ac_x_libraries='$x_libraries'"
13195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13196$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13197fi
13198
13199
bec39cab 13200# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13201# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13202# This code just checks for a few cases where we'd like to ignore those
13203# definitions, even when they're present in the '.mt' file. These cases
13204# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13205# not part of the source tree.
7a292a7a 13206#
81ecdfbb
RW
13207# Check whether --enable-sim was given.
13208if test "${enable_sim+set}" = set; then :
13209 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13210 echo "enableval = ${enableval}";
13211 case "${enableval}" in
13212 yes) ignore_sim=false ;;
13213 no) ignore_sim=true ;;
13214 *) ignore_sim=false ;;
13215 esac
13216else
13217 ignore_sim=false
81ecdfbb
RW
13218fi
13219
7a292a7a
SS
13220
13221if test ! -d "${srcdir}/../sim"; then
13222 ignore_sim=true
13223fi
13224
9b624dbe
UW
13225SIM=
13226SIM_OBS=
13227if test "${ignore_sim}" = "false"; then
13228 if test x"${gdb_sim}" != x ; then
13229 SIM="${gdb_sim}"
13230 SIM_OBS="remote-sim.o"
60ca704f 13231
81ecdfbb 13232$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13233
9b624dbe 13234 fi
7a292a7a
SS
13235fi
13236
13237
13238
c906108c
SS
13239
13240
13241
13242
13243
13244
dfcd3bfb 13245
e56ac5c3
AC
13246
13247
b3a90332
AC
13248
13249
c35f4ffc 13250# List of host floatformats.
bec39cab
AC
13251
13252cat >>confdefs.h <<_ACEOF
c35f4ffc 13253#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 13254_ACEOF
c35f4ffc 13255
bec39cab
AC
13256
13257cat >>confdefs.h <<_ACEOF
c35f4ffc 13258#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
13259_ACEOF
13260
c35f4ffc 13261
bec39cab 13262cat >>confdefs.h <<_ACEOF
c35f4ffc 13263#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 13264_ACEOF
c35f4ffc
AC
13265
13266
c906108c
SS
13267# target_subdir is used by the testsuite to find the target libraries.
13268target_subdir=
13269if test "${host}" != "${target}"; then
13270 target_subdir="${target_alias}/"
13271fi
13272
13273
13274frags=
771b4502 13275if test "${gdb_native}" = "yes"; then
0dad8a66
MK
13276 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
13277 if test ! -f ${host_makefile_frag}; then
81ecdfbb 13278 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
13279 fi
13280 frags="$frags $host_makefile_frag"
13281else
13282 host_makefile_frag=/dev/null
c906108c 13283fi
c906108c 13284
c906108c
SS
13285
13286
13287
771b4502 13288if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
13289# We pick this up from the host configuration file (.mh) because we
13290# do not have a native configuration Makefile fragment.
c906108c
SS
13291nativefile=`sed -n '
13292s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
13293' ${host_makefile_frag}`
c906108c
SS
13294fi
13295
13296
b00a8037 13297if test x"${gdb_osabi}" != x ; then
bec39cab
AC
13298
13299cat >>confdefs.h <<_ACEOF
b00a8037 13300#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 13301_ACEOF
b00a8037
DJ
13302
13303fi
13304
8dcde887 13305# Enable multi-ice-gdb-server.
81ecdfbb
RW
13306# Check whether --enable-multi-ice was given.
13307if test "${enable_multi_ice+set}" = set; then :
13308 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
13309 yes | no)
13310 ;;
81ecdfbb 13311 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 13312 esac
81ecdfbb 13313fi
b4e70030 13314
81ecdfbb
RW
13315if test "x$enable_multi_ice" = xyes; then
13316 subdirs="$subdirs multi-ice"
3ace7edb 13317
a85f51e7
DJ
13318fi
13319
496c0e1b
JB
13320# Check whether --enable-gdbserver was given.
13321if test "${enable_gdbserver+set}" = set; then :
13322 enableval=$enable_gdbserver; case "${enableval}" in
13323 yes| no|auto) ;;
13324 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
13325esac
13326else
13327 enable_gdbserver=auto
13328fi
13329
13330
13331# We only build gdbserver automatically in a native configuration, and
13332# only if the user did not explicitly disable its build.
13333if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
13334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
13335$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 13336 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
13337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13338$as_echo "yes" >&6; }
13339 subdirs="$subdirs gdbserver"
3ace7edb 13340
496c0e1b 13341 gdbserver_build_enabled=yes
8dcde887 13342 else
81ecdfbb
RW
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
8dcde887
MK
13345 fi
13346fi
13347
496c0e1b
JB
13348# If the user explicitly request the gdbserver to be built, verify that
13349# we were in fact able to enable it.
13350if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
13351 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
13352fi
13353
db985757 13354# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 13355# to an empty version.
c906108c
SS
13356
13357files=
13358links=
5a2402b8 13359
c906108c
SS
13360rm -f nm.h
13361if test "${nativefile}" != ""; then
0f475e27
AC
13362 case "${nativefile}" in
13363 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
13364 * ) GDB_NM_FILE="${nativefile}"
13365 esac
5a2402b8
AC
13366 files="${files} ${GDB_NM_FILE}"
13367 links="${links} nm.h"
60ca704f
SE
13368
13369cat >>confdefs.h <<_ACEOF
b78960be 13370#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 13371_ACEOF
5a2402b8 13372
c906108c 13373fi
5a2402b8
AC
13374
13375
bec39cab
AC
13376ac_sources="$files"
13377ac_dests="$links"
13378while test -n "$ac_sources"; do
13379 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
13380 set $ac_sources; ac_source=$1; shift; ac_sources=$*
13381 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
13382done
81ecdfbb 13383ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
13384
13385
c906108c
SS
13386
13387
c906108c 13388
81ecdfbb 13389$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 13390
bec39cab 13391
c971b7fa 13392ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
13393
13394ac_config_commands="$ac_config_commands default"
89a34d1b 13395
bec39cab
AC
13396cat >confcache <<\_ACEOF
13397# This file is a shell script that caches the results of configure
13398# tests run on this system so they can be shared between configure
13399# scripts and configure runs, see configure's option --config-cache.
13400# It is not useful on other systems. If it contains results you don't
13401# want to keep, you may remove or edit it.
13402#
13403# config.status only pays attention to the cache file if you give it
13404# the --recheck option to rerun configure.
13405#
13406# `ac_cv_env_foo' variables (set or unset) will be overridden when
13407# loading this file, other *unset* `ac_cv_foo' will be assigned the
13408# following values.
13409
13410_ACEOF
13411
13412# The following way of writing the cache mishandles newlines in values,
13413# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 13414# So, we kill variables containing newlines.
bec39cab
AC
13415# Ultrix sh set writes to stderr and can't be redirected directly,
13416# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
13417(
13418 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13419 eval ac_val=\$$ac_var
13420 case $ac_val in #(
13421 *${as_nl}*)
13422 case $ac_var in #(
13423 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13424$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13425 esac
13426 case $ac_var in #(
13427 _ | IFS | as_nl) ;; #(
13428 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13429 *) { eval $ac_var=; unset $ac_var;} ;;
13430 esac ;;
13431 esac
13432 done
13433
bec39cab 13434 (set) 2>&1 |
81ecdfbb
RW
13435 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13436 *${as_nl}ac_space=\ *)
13437 # `set' does not quote correctly, so add quotes: double-quote
13438 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
13439 sed -n \
13440 "s/'/'\\\\''/g;
13441 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 13442 ;; #(
bec39cab
AC
13443 *)
13444 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 13445 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 13446 ;;
81ecdfbb
RW
13447 esac |
13448 sort
13449) |
bec39cab 13450 sed '
81ecdfbb 13451 /^ac_cv_env_/b end
bec39cab 13452 t clear
81ecdfbb 13453 :clear
bec39cab
AC
13454 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13455 t end
81ecdfbb
RW
13456 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13457 :end' >>confcache
13458if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13459 if test -w "$cache_file"; then
13460 test "x$cache_file" != "x/dev/null" &&
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13462$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
13463 cat confcache >$cache_file
13464 else
81ecdfbb
RW
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13466$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
13467 fi
13468fi
13469rm -f confcache
13470
13471test "x$prefix" = xNONE && prefix=$ac_default_prefix
13472# Let make expand exec_prefix.
13473test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13474
bec39cab
AC
13475DEFS=-DHAVE_CONFIG_H
13476
13477ac_libobjs=
13478ac_ltlibobjs=
13479for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13480 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
13481 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13482 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13483 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13484 # will be set to the directory where LIBOBJS objects are built.
13485 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13486 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
13487done
13488LIBOBJS=$ac_libobjs
13489
13490LTLIBOBJS=$ac_ltlibobjs
13491
13492
85981d60 13493if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
13494 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
13495Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 13496fi
a417dc56 13497if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
13498 as_fn_error "conditional \"GMAKE\" was never defined.
13499Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 13500fi
81ecdfbb
RW
13501
13502
bec39cab 13503: ${CONFIG_STATUS=./config.status}
81ecdfbb 13504ac_write_fail=0
bec39cab
AC
13505ac_clean_files_save=$ac_clean_files
13506ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13508$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13509as_write_fail=0
13510cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
13511#! $SHELL
13512# Generated by $as_me.
13513# Run this file to recreate the current configuration.
13514# Compiler output produced by configure, useful for debugging
13515# configure, is in config.log if it exists.
13516
13517debug=false
13518ac_cs_recheck=false
13519ac_cs_silent=false
bec39cab 13520
81ecdfbb
RW
13521SHELL=\${CONFIG_SHELL-$SHELL}
13522export SHELL
13523_ASEOF
13524cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13525## -------------------- ##
13526## M4sh Initialization. ##
13527## -------------------- ##
13528
13529# Be more Bourne compatible
13530DUALCASE=1; export DUALCASE # for MKS sh
13531if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
13532 emulate sh
13533 NULLCMD=:
81ecdfbb 13534 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
13535 # is contrary to our usage. Disable this feature.
13536 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
13537 setopt NO_GLOB_SUBST
13538else
13539 case `(set -o) 2>/dev/null` in #(
13540 *posix*) :
13541 set -o posix ;; #(
13542 *) :
13543 ;;
13544esac
bec39cab 13545fi
bec39cab 13546
81ecdfbb
RW
13547
13548as_nl='
13549'
13550export as_nl
13551# Printing a long string crashes Solaris 7 /usr/bin/printf.
13552as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13553as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13554as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13555# Prefer a ksh shell builtin over an external printf program on Solaris,
13556# but without wasting forks for bash or zsh.
13557if test -z "$BASH_VERSION$ZSH_VERSION" \
13558 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13559 as_echo='print -r --'
13560 as_echo_n='print -rn --'
13561elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13562 as_echo='printf %s\n'
13563 as_echo_n='printf %s'
13564else
13565 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13566 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13567 as_echo_n='/usr/ucb/echo -n'
13568 else
13569 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13570 as_echo_n_body='eval
13571 arg=$1;
13572 case $arg in #(
13573 *"$as_nl"*)
13574 expr "X$arg" : "X\\(.*\\)$as_nl";
13575 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13576 esac;
13577 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13578 '
13579 export as_echo_n_body
13580 as_echo_n='sh -c $as_echo_n_body as_echo'
13581 fi
13582 export as_echo_body
13583 as_echo='sh -c $as_echo_body as_echo'
13584fi
13585
13586# The user is always right.
13587if test "${PATH_SEPARATOR+set}" != set; then
13588 PATH_SEPARATOR=:
13589 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13590 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13591 PATH_SEPARATOR=';'
13592 }
bec39cab
AC
13593fi
13594
13595
81ecdfbb
RW
13596# IFS
13597# We need space, tab and new line, in precisely that order. Quoting is
13598# there to prevent editors from complaining about space-tab.
13599# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13600# splitting by setting IFS to empty value.)
13601IFS=" "" $as_nl"
13602
13603# Find who we are. Look in the path if we contain no directory separator.
13604case $0 in #((
13605 *[\\/]* ) as_myself=$0 ;;
13606 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13607for as_dir in $PATH
13608do
13609 IFS=$as_save_IFS
13610 test -z "$as_dir" && as_dir=.
13611 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13612 done
13613IFS=$as_save_IFS
13614
13615 ;;
13616esac
13617# We did not find ourselves, most probably we were run as `sh COMMAND'
13618# in which case we are not to be found in the path.
13619if test "x$as_myself" = x; then
13620 as_myself=$0
13621fi
13622if test ! -f "$as_myself"; then
13623 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13624 exit 1
13625fi
13626
13627# Unset variables that we do not need and which cause bugs (e.g. in
13628# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13629# suppresses any "Segmentation fault" message there. '((' could
13630# trigger a bug in pdksh 5.2.14.
13631for as_var in BASH_ENV ENV MAIL MAILPATH
13632do eval test x\${$as_var+set} = xset \
13633 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13634done
bec39cab
AC
13635PS1='$ '
13636PS2='> '
13637PS4='+ '
13638
13639# NLS nuisances.
81ecdfbb
RW
13640LC_ALL=C
13641export LC_ALL
13642LANGUAGE=C
13643export LANGUAGE
13644
13645# CDPATH.
13646(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13647
13648
13649# as_fn_error ERROR [LINENO LOG_FD]
13650# ---------------------------------
13651# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13652# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13653# script with status $?, using 1 if that was 0.
13654as_fn_error ()
13655{
13656 as_status=$?; test $as_status -eq 0 && as_status=1
13657 if test "$3"; then
13658 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13659 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13660 fi
13661 $as_echo "$as_me: error: $1" >&2
13662 as_fn_exit $as_status
13663} # as_fn_error
13664
13665
13666# as_fn_set_status STATUS
13667# -----------------------
13668# Set $? to STATUS, without forking.
13669as_fn_set_status ()
13670{
13671 return $1
13672} # as_fn_set_status
13673
13674# as_fn_exit STATUS
13675# -----------------
13676# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13677as_fn_exit ()
13678{
13679 set +e
13680 as_fn_set_status $1
13681 exit $1
13682} # as_fn_exit
13683
13684# as_fn_unset VAR
13685# ---------------
13686# Portably unset VAR.
13687as_fn_unset ()
13688{
13689 { eval $1=; unset $1;}
13690}
13691as_unset=as_fn_unset
13692# as_fn_append VAR VALUE
13693# ----------------------
13694# Append the text in VALUE to the end of the definition contained in VAR. Take
13695# advantage of any shell optimizations that allow amortized linear growth over
13696# repeated appends, instead of the typical quadratic growth present in naive
13697# implementations.
13698if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13699 eval 'as_fn_append ()
13700 {
13701 eval $1+=\$2
13702 }'
13703else
13704 as_fn_append ()
13705 {
13706 eval $1=\$$1\$2
13707 }
13708fi # as_fn_append
13709
13710# as_fn_arith ARG...
13711# ------------------
13712# Perform arithmetic evaluation on the ARGs, and store the result in the
13713# global $as_val. Take advantage of shells that can avoid forks. The arguments
13714# must be portable across $(()) and expr.
13715if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13716 eval 'as_fn_arith ()
13717 {
13718 as_val=$(( $* ))
13719 }'
13720else
13721 as_fn_arith ()
13722 {
13723 as_val=`expr "$@" || test $? -eq 1`
13724 }
13725fi # as_fn_arith
bec39cab 13726
81ecdfbb
RW
13727
13728if expr a : '\(a\)' >/dev/null 2>&1 &&
13729 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
13730 as_expr=expr
13731else
13732 as_expr=false
13733fi
13734
81ecdfbb 13735if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
13736 as_basename=basename
13737else
13738 as_basename=false
13739fi
13740
81ecdfbb
RW
13741if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13742 as_dirname=dirname
13743else
13744 as_dirname=false
13745fi
bec39cab 13746
81ecdfbb 13747as_me=`$as_basename -- "$0" ||
bec39cab
AC
13748$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13749 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
13750 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13751$as_echo X/"$0" |
13752 sed '/^.*\/\([^/][^/]*\)\/*$/{
13753 s//\1/
13754 q
13755 }
13756 /^X\/\(\/\/\)$/{
13757 s//\1/
13758 q
13759 }
13760 /^X\/\(\/\).*/{
13761 s//\1/
13762 q
13763 }
13764 s/.*/./; q'`
b4e70030 13765
b4e70030
JB
13766# Avoid depending upon Character Ranges.
13767as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13768as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13769as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13770as_cr_digits='0123456789'
13771as_cr_alnum=$as_cr_Letters$as_cr_digits
13772
81ecdfbb
RW
13773ECHO_C= ECHO_N= ECHO_T=
13774case `echo -n x` in #(((((
13775-n*)
13776 case `echo 'xy\c'` in
13777 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13778 xy) ECHO_C='\c';;
13779 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13780 ECHO_T=' ';;
13781 esac;;
13782*)
13783 ECHO_N='-n';;
bec39cab
AC
13784esac
13785
81ecdfbb
RW
13786rm -f conf$$ conf$$.exe conf$$.file
13787if test -d conf$$.dir; then
13788 rm -f conf$$.dir/conf$$.file
bec39cab 13789else
81ecdfbb
RW
13790 rm -f conf$$.dir
13791 mkdir conf$$.dir 2>/dev/null
bec39cab 13792fi
81ecdfbb
RW
13793if (echo >conf$$.file) 2>/dev/null; then
13794 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 13795 as_ln_s='ln -s'
81ecdfbb
RW
13796 # ... but there are two gotchas:
13797 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13798 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13799 # In both cases, we have to default to `cp -p'.
13800 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13801 as_ln_s='cp -p'
13802 elif ln conf$$.file conf$$ 2>/dev/null; then
13803 as_ln_s=ln
13804 else
13805 as_ln_s='cp -p'
b4e70030 13806 fi
bec39cab
AC
13807else
13808 as_ln_s='cp -p'
13809fi
81ecdfbb
RW
13810rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13811rmdir conf$$.dir 2>/dev/null
13812
13813
13814# as_fn_mkdir_p
13815# -------------
13816# Create "$as_dir" as a directory, including parents if necessary.
13817as_fn_mkdir_p ()
13818{
13819
13820 case $as_dir in #(
13821 -*) as_dir=./$as_dir;;
13822 esac
13823 test -d "$as_dir" || eval $as_mkdir_p || {
13824 as_dirs=
13825 while :; do
13826 case $as_dir in #(
13827 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13828 *) as_qdir=$as_dir;;
13829 esac
13830 as_dirs="'$as_qdir' $as_dirs"
13831 as_dir=`$as_dirname -- "$as_dir" ||
13832$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13833 X"$as_dir" : 'X\(//\)[^/]' \| \
13834 X"$as_dir" : 'X\(//\)$' \| \
13835 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13836$as_echo X"$as_dir" |
13837 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13838 s//\1/
13839 q
13840 }
13841 /^X\(\/\/\)[^/].*/{
13842 s//\1/
13843 q
13844 }
13845 /^X\(\/\/\)$/{
13846 s//\1/
13847 q
13848 }
13849 /^X\(\/\).*/{
13850 s//\1/
13851 q
13852 }
13853 s/.*/./; q'`
13854 test -d "$as_dir" && break
13855 done
13856 test -z "$as_dirs" || eval "mkdir $as_dirs"
13857 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13858
bec39cab 13859
81ecdfbb 13860} # as_fn_mkdir_p
bec39cab 13861if mkdir -p . 2>/dev/null; then
81ecdfbb 13862 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
13863else
13864 test -d ./-p && rmdir ./-p
13865 as_mkdir_p=false
13866fi
13867
81ecdfbb
RW
13868if test -x / >/dev/null 2>&1; then
13869 as_test_x='test -x'
13870else
13871 if ls -dL / >/dev/null 2>&1; then
13872 as_ls_L_option=L
13873 else
13874 as_ls_L_option=
13875 fi
13876 as_test_x='
13877 eval sh -c '\''
13878 if test -d "$1"; then
13879 test -d "$1/.";
13880 else
13881 case $1 in #(
13882 -*)set "./$1";;
13883 esac;
13884 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
13885 ???[sx]*):;;*)false;;esac;fi
13886 '\'' sh
13887 '
13888fi
13889as_executable_p=$as_test_x
bec39cab
AC
13890
13891# Sed expression to map a string onto a valid CPP name.
13892as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13893
13894# Sed expression to map a string onto a valid variable name.
13895as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13896
13897
bec39cab 13898exec 6>&1
81ecdfbb
RW
13899## ----------------------------------- ##
13900## Main body of $CONFIG_STATUS script. ##
13901## ----------------------------------- ##
13902_ASEOF
13903test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13904
13905cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13906# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 13907# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
13908# values after options handling.
13909ac_log="
bec39cab 13910This file was extended by $as_me, which was
81ecdfbb 13911generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
13912
13913 CONFIG_FILES = $CONFIG_FILES
13914 CONFIG_HEADERS = $CONFIG_HEADERS
13915 CONFIG_LINKS = $CONFIG_LINKS
13916 CONFIG_COMMANDS = $CONFIG_COMMANDS
13917 $ $0 $@
13918
81ecdfbb
RW
13919on `(hostname || uname -n) 2>/dev/null | sed 1q`
13920"
13921
bec39cab
AC
13922_ACEOF
13923
81ecdfbb
RW
13924case $ac_config_files in *"
13925"*) set x $ac_config_files; shift; ac_config_files=$*;;
13926esac
234b45d4 13927
81ecdfbb
RW
13928case $ac_config_headers in *"
13929"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13930esac
b4e70030 13931
b4e70030 13932
81ecdfbb
RW
13933cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13934# Files that config.status was made for.
13935config_files="$ac_config_files"
13936config_headers="$ac_config_headers"
13937config_links="$ac_config_links"
13938config_commands="$ac_config_commands"
234b45d4 13939
81ecdfbb 13940_ACEOF
b4e70030 13941
81ecdfbb 13942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 13943ac_cs_usage="\
81ecdfbb
RW
13944\`$as_me' instantiates files and other configuration actions
13945from templates according to the current configuration. Unless the files
13946and actions are specified as TAGs, all are instantiated by default.
234b45d4 13947
81ecdfbb 13948Usage: $0 [OPTION]... [TAG]...
234b45d4 13949
bec39cab 13950 -h, --help print this help, then exit
81ecdfbb
RW
13951 -V, --version print version number and configuration settings, then exit
13952 -q, --quiet, --silent
13953 do not print progress messages
bec39cab
AC
13954 -d, --debug don't remove temporary files
13955 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
13956 --file=FILE[:TEMPLATE]
13957 instantiate the configuration file FILE
13958 --header=FILE[:TEMPLATE]
13959 instantiate the configuration header FILE
234b45d4 13960
bec39cab
AC
13961Configuration files:
13962$config_files
234b45d4 13963
bec39cab
AC
13964Configuration headers:
13965$config_headers
234b45d4 13966
bec39cab
AC
13967Configuration links:
13968$config_links
234b45d4 13969
bec39cab
AC
13970Configuration commands:
13971$config_commands
13972
81ecdfbb 13973Report bugs to the package provider."
b4e70030 13974
81ecdfbb
RW
13975_ACEOF
13976cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
13977ac_cs_version="\\
13978config.status
81ecdfbb
RW
13979configured by $0, generated by GNU Autoconf 2.64,
13980 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 13981
81ecdfbb 13982Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
13983This config.status script is free software; the Free Software Foundation
13984gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
13985
13986ac_pwd='$ac_pwd'
13987srcdir='$srcdir'
13988INSTALL='$INSTALL'
81ecdfbb
RW
13989AWK='$AWK'
13990test -n "\$AWK" || AWK=awk
bec39cab
AC
13991_ACEOF
13992
81ecdfbb
RW
13993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13994# The default lists apply if the user does not specify any file.
bec39cab
AC
13995ac_need_defaults=:
13996while test $# != 0
13997do
13998 case $1 in
13999 --*=*)
81ecdfbb
RW
14000 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14001 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 14002 ac_shift=:
c906108c 14003 ;;
81ecdfbb 14004 *)
bec39cab
AC
14005 ac_option=$1
14006 ac_optarg=$2
14007 ac_shift=shift
c906108c 14008 ;;
bec39cab 14009 esac
c906108c 14010
bec39cab
AC
14011 case $ac_option in
14012 # Handling of the options.
bec39cab
AC
14013 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14014 ac_cs_recheck=: ;;
81ecdfbb
RW
14015 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14016 $as_echo "$ac_cs_version"; exit ;;
14017 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
14018 debug=: ;;
14019 --file | --fil | --fi | --f )
14020 $ac_shift
81ecdfbb
RW
14021 case $ac_optarg in
14022 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14023 esac
14024 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
14025 ac_need_defaults=false;;
14026 --header | --heade | --head | --hea )
14027 $ac_shift
81ecdfbb
RW
14028 case $ac_optarg in
14029 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14030 esac
14031 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 14032 ac_need_defaults=false;;
81ecdfbb
RW
14033 --he | --h)
14034 # Conflict between --help and --header
14035 as_fn_error "ambiguous option: \`$1'
14036Try \`$0 --help' for more information.";;
14037 --help | --hel | -h )
14038 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
14039 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14040 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14041 ac_cs_silent=: ;;
c906108c 14042
bec39cab 14043 # This is an error.
81ecdfbb
RW
14044 -*) as_fn_error "unrecognized option: \`$1'
14045Try \`$0 --help' for more information." ;;
c906108c 14046
81ecdfbb
RW
14047 *) as_fn_append ac_config_targets " $1"
14048 ac_need_defaults=false ;;
c906108c 14049
bec39cab
AC
14050 esac
14051 shift
14052done
c906108c 14053
bec39cab 14054ac_configure_extra_args=
c906108c 14055
bec39cab
AC
14056if $ac_cs_silent; then
14057 exec 6>/dev/null
14058 ac_configure_extra_args="$ac_configure_extra_args --silent"
14059fi
c906108c 14060
bec39cab 14061_ACEOF
81ecdfbb 14062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 14063if \$ac_cs_recheck; then
81ecdfbb
RW
14064 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14065 shift
14066 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14067 CONFIG_SHELL='$SHELL'
14068 export CONFIG_SHELL
14069 exec "\$@"
bec39cab
AC
14070fi
14071
14072_ACEOF
81ecdfbb
RW
14073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14074exec 5>>config.log
14075{
14076 echo
14077 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14078## Running $as_me. ##
14079_ASBOX
14080 $as_echo "$ac_log"
14081} >&5
bec39cab 14082
81ecdfbb
RW
14083_ACEOF
14084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 14085#
81ecdfbb 14086# INIT-COMMANDS
c906108c 14087#
a417dc56 14088ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 14089
bec39cab
AC
14090_ACEOF
14091
81ecdfbb 14092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 14093
81ecdfbb 14094# Handling of arguments.
bec39cab 14095for ac_config_target in $ac_config_targets
c906108c 14096do
81ecdfbb
RW
14097 case $ac_config_target in
14098 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
14099 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 14100 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb
RW
14101 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
14102 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 14103 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 14104 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 14105 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
14106 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14107
14108 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
14109 esac
14110done
14111
81ecdfbb 14112
bec39cab
AC
14113# If the user did not use the arguments to specify the items to instantiate,
14114# then the envvar interface is used. Set only those that are not.
14115# We use the long form for the default assignment because of an extremely
14116# bizarre bug on SunOS 4.1.3.
14117if $ac_need_defaults; then
14118 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14119 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14120 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
14121 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14122fi
14123
b4e70030 14124# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 14125# simply because there is no reason against having it here, and in addition,
b4e70030 14126# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
14127# Hook for its removal unless debugging.
14128# Note that there is a small window in which the directory will not be cleaned:
14129# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
14130$debug ||
14131{
81ecdfbb
RW
14132 tmp=
14133 trap 'exit_status=$?
14134 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14135' 0
14136 trap 'as_fn_exit 1' 1 2 13 15
14137}
14138# Create a (secure) tmp directory for tmp files.
14139
14140{
14141 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14142 test -n "$tmp" && test -d "$tmp"
14143} ||
14144{
14145 tmp=./conf$$-$RANDOM
14146 (umask 077 && mkdir "$tmp")
14147} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
14148
14149# Set up the scripts for CONFIG_FILES section.
14150# No need to generate them if there are no CONFIG_FILES.
14151# This happens for instance with `./config.status config.h'.
14152if test -n "$CONFIG_FILES"; then
14153
14154if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
14155 ac_cs_awk_getline=:
14156 ac_cs_awk_pipe_init=
14157 ac_cs_awk_read_file='
14158 while ((getline aline < (F[key])) > 0)
14159 print(aline)
14160 close(F[key])'
14161 ac_cs_awk_pipe_fini=
14162else
14163 ac_cs_awk_getline=false
14164 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
14165 ac_cs_awk_read_file='
14166 print "|#_!!_#|"
14167 print "cat " F[key] " &&"
14168 '$ac_cs_awk_pipe_init
14169 # The final `:' finishes the AND list.
14170 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
14171fi
14172ac_cr=`echo X | tr X '\015'`
14173# On cygwin, bash can eat \r inside `` if the user requested igncr.
14174# But we know of no other shell where ac_cr would be empty at this
14175# point, so we can use a bashism as a fallback.
14176if test "x$ac_cr" = x; then
14177 eval ac_cr=\$\'\\r\'
14178fi
14179ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14180if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14181 ac_cs_awk_cr='\r'
14182else
14183 ac_cs_awk_cr=$ac_cr
14184fi
14185
14186echo 'BEGIN {' >"$tmp/subs1.awk" &&
14187_ACEOF
14188
14189# Create commands to substitute file output variables.
14190{
14191 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
14192 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
14193 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
14194 echo "_ACAWK" &&
14195 echo "_ACEOF"
14196} >conf$$files.sh &&
14197. ./conf$$files.sh ||
14198 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14199rm -f conf$$files.sh
14200
14201{
14202 echo "cat >conf$$subs.awk <<_ACEOF" &&
14203 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14204 echo "_ACEOF"
14205} >conf$$subs.sh ||
14206 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14207ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
14208ac_delim='%!_!# '
14209for ac_last_try in false false false false false :; do
14210 . ./conf$$subs.sh ||
14211 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14212
14213 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14214 if test $ac_delim_n = $ac_delim_num; then
14215 break
14216 elif $ac_last_try; then
14217 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14218 else
14219 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14220 fi
14221done
14222rm -f conf$$subs.sh
14223
14224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14225cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14226_ACEOF
14227sed -n '
14228h
14229s/^/S["/; s/!.*/"]=/
14230p
14231g
14232s/^[^!]*!//
14233:repl
14234t repl
14235s/'"$ac_delim"'$//
14236t delim
14237:nl
14238h
14239s/\(.\{148\}\).*/\1/
14240t more1
14241s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14242p
14243n
14244b repl
14245:more1
14246s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14247p
14248g
14249s/.\{148\}//
14250t nl
14251:delim
14252h
14253s/\(.\{148\}\).*/\1/
14254t more2
14255s/["\\]/\\&/g; s/^/"/; s/$/"/
14256p
14257b
14258:more2
14259s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14260p
14261g
14262s/.\{148\}//
14263t delim
14264' <conf$$subs.awk | sed '
14265/^[^""]/{
14266 N
14267 s/\n//
14268}
14269' >>$CONFIG_STATUS || ac_write_fail=1
14270rm -f conf$$subs.awk
14271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14272_ACAWK
14273cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14274 for (key in S) S_is_set[key] = 1
14275 FS = "\a"
14276 \$ac_cs_awk_pipe_init
14277}
14278{
14279 line = $ 0
14280 nfields = split(line, field, "@")
14281 substed = 0
14282 len = length(field[1])
14283 for (i = 2; i < nfields; i++) {
14284 key = field[i]
14285 keylen = length(key)
14286 if (S_is_set[key]) {
14287 value = S[key]
14288 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14289 len += length(value) + length(field[++i])
14290 substed = 1
14291 } else
14292 len += 1 + keylen
14293 }
14294 if (nfields == 3 && !substed) {
14295 key = field[2]
14296 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
14297 \$ac_cs_awk_read_file
14298 next
14299 }
14300 }
14301 print line
b4e70030 14302}
81ecdfbb
RW
14303\$ac_cs_awk_pipe_fini
14304_ACAWK
14305_ACEOF
14306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14307if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14308 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14309else
14310 cat
14311fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14312 || as_fn_error "could not setup config files machinery" "$LINENO" 5
14313_ACEOF
14314
14315# VPATH may cause trouble with some makes, so we remove $(srcdir),
14316# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14317# trailing colons and then remove the whole line if VPATH becomes empty
14318# (actually we leave an empty line to preserve line numbers).
14319if test "x$srcdir" = x.; then
14320 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14321s/:*\$(srcdir):*/:/
14322s/:*\${srcdir}:*/:/
14323s/:*@srcdir@:*/:/
14324s/^\([^=]*=[ ]*\):*/\1/
14325s/:*$//
14326s/^[^=]*=[ ]*$//
14327}'
14328fi
14329
14330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14331fi # test -n "$CONFIG_FILES"
14332
14333# Set up the scripts for CONFIG_HEADERS section.
14334# No need to generate them if there are no CONFIG_HEADERS.
14335# This happens for instance with `./config.status Makefile'.
14336if test -n "$CONFIG_HEADERS"; then
14337cat >"$tmp/defines.awk" <<\_ACAWK ||
14338BEGIN {
14339_ACEOF
14340
14341# Transform confdefs.h into an awk script `defines.awk', embedded as
14342# here-document in config.status, that substitutes the proper values into
14343# config.h.in to produce config.h.
4e8d927d 14344
81ecdfbb
RW
14345# Create a delimiter string that does not exist in confdefs.h, to ease
14346# handling of long lines.
14347ac_delim='%!_!# '
14348for ac_last_try in false false :; do
14349 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14350 if test -z "$ac_t"; then
14351 break
14352 elif $ac_last_try; then
14353 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14354 else
14355 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14356 fi
14357done
4e8d927d 14358
81ecdfbb
RW
14359# For the awk script, D is an array of macro values keyed by name,
14360# likewise P contains macro parameters if any. Preserve backslash
14361# newline sequences.
14362
14363ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14364sed -n '
14365s/.\{148\}/&'"$ac_delim"'/g
14366t rset
14367:rset
14368s/^[ ]*#[ ]*define[ ][ ]*/ /
14369t def
14370d
14371:def
14372s/\\$//
14373t bsnl
14374s/["\\]/\\&/g
14375s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14376D["\1"]=" \3"/p
14377s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14378d
14379:bsnl
14380s/["\\]/\\&/g
14381s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14382D["\1"]=" \3\\\\\\n"\\/p
14383t cont
14384s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14385t cont
14386d
14387:cont
14388n
14389s/.\{148\}/&'"$ac_delim"'/g
14390t clear
14391:clear
14392s/\\$//
14393t bsnlc
14394s/["\\]/\\&/g; s/^/"/; s/$/"/p
14395d
14396:bsnlc
14397s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14398b cont
14399' <confdefs.h | sed '
14400s/'"$ac_delim"'/"\\\
14401"/g' >>$CONFIG_STATUS || ac_write_fail=1
14402
14403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14404 for (key in D) D_is_set[key] = 1
14405 FS = "\a"
14406}
14407/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14408 line = \$ 0
14409 split(line, arg, " ")
14410 if (arg[1] == "#") {
14411 defundef = arg[2]
14412 mac1 = arg[3]
14413 } else {
14414 defundef = substr(arg[1], 2)
14415 mac1 = arg[2]
14416 }
14417 split(mac1, mac2, "(") #)
14418 macro = mac2[1]
14419 prefix = substr(line, 1, index(line, defundef) - 1)
14420 if (D_is_set[macro]) {
14421 # Preserve the white space surrounding the "#".
14422 print prefix "define", macro P[macro] D[macro]
14423 next
14424 } else {
14425 # Replace #undef with comments. This is necessary, for example,
14426 # in the case of _POSIX_SOURCE, which is predefined and required
14427 # on some systems where configure will not decide to define it.
14428 if (defundef == "undef") {
14429 print "/*", prefix defundef, macro, "*/"
14430 next
14431 }
14432 }
b4e70030 14433}
81ecdfbb
RW
14434{ print }
14435_ACAWK
b4e70030 14436_ACEOF
81ecdfbb
RW
14437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14438 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14439fi # test -n "$CONFIG_HEADERS"
4e8d927d 14440
4e8d927d 14441
81ecdfbb
RW
14442eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
14443shift
14444for ac_tag
14445do
14446 case $ac_tag in
14447 :[FHLC]) ac_mode=$ac_tag; continue;;
14448 esac
14449 case $ac_mode$ac_tag in
14450 :[FHL]*:*);;
14451 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
14452 :[FH]-) ac_tag=-:-;;
14453 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14454 esac
14455 ac_save_IFS=$IFS
14456 IFS=:
14457 set x $ac_tag
14458 IFS=$ac_save_IFS
14459 shift
14460 ac_file=$1
14461 shift
4e8d927d 14462
81ecdfbb
RW
14463 case $ac_mode in
14464 :L) ac_source=$1;;
14465 :[FH])
14466 ac_file_inputs=
14467 for ac_f
14468 do
14469 case $ac_f in
14470 -) ac_f="$tmp/stdin";;
14471 *) # Look for the file first in the build tree, then in the source tree
14472 # (if the path is not absolute). The absolute path cannot be DOS-style,
14473 # because $ac_f cannot contain `:'.
14474 test -f "$ac_f" ||
14475 case $ac_f in
14476 [\\/$]*) false;;
14477 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14478 esac ||
14479 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14480 esac
14481 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14482 as_fn_append ac_file_inputs " '$ac_f'"
14483 done
14484
14485 # Let's still pretend it is `configure' which instantiates (i.e., don't
14486 # use $as_me), people would be surprised to read:
14487 # /* config.h. Generated by config.status. */
14488 configure_input='Generated from '`
14489 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14490 `' by configure.'
14491 if test x"$ac_file" != x-; then
14492 configure_input="$ac_file. $configure_input"
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14494$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 14495 fi
81ecdfbb
RW
14496 # Neutralize special characters interpreted by sed in replacement strings.
14497 case $configure_input in #(
14498 *\&* | *\|* | *\\* )
14499 ac_sed_conf_input=`$as_echo "$configure_input" |
14500 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14501 *) ac_sed_conf_input=$configure_input;;
14502 esac
4e8d927d 14503
81ecdfbb
RW
14504 case $ac_tag in
14505 *:-:* | *:-) cat >"$tmp/stdin" \
14506 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
14507 esac
14508 ;;
c906108c
SS
14509 esac
14510
81ecdfbb 14511 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
14512$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14513 X"$ac_file" : 'X\(//\)[^/]' \| \
14514 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
14515 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14516$as_echo X"$ac_file" |
14517 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14518 s//\1/
14519 q
14520 }
14521 /^X\(\/\/\)[^/].*/{
14522 s//\1/
14523 q
14524 }
14525 /^X\(\/\/\)$/{
14526 s//\1/
14527 q
14528 }
14529 /^X\(\/\).*/{
14530 s//\1/
14531 q
14532 }
14533 s/.*/./; q'`
14534 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14535 ac_builddir=.
14536
81ecdfbb
RW
14537case "$ac_dir" in
14538.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14539*)
14540 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14541 # A ".." for each directory in $ac_dir_suffix.
14542 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14543 case $ac_top_builddir_sub in
14544 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14545 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14546 esac ;;
14547esac
14548ac_abs_top_builddir=$ac_pwd
14549ac_abs_builddir=$ac_pwd$ac_dir_suffix
14550# for backward compatibility:
14551ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14552
14553case $srcdir in
81ecdfbb 14554 .) # We are building in place.
bec39cab 14555 ac_srcdir=.
81ecdfbb
RW
14556 ac_top_srcdir=$ac_top_builddir_sub
14557 ac_abs_top_srcdir=$ac_pwd ;;
14558 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14559 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14560 ac_top_srcdir=$srcdir
14561 ac_abs_top_srcdir=$srcdir ;;
14562 *) # Relative name.
14563 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14564 ac_top_srcdir=$ac_top_build_prefix$srcdir
14565 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14566esac
81ecdfbb 14567ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 14568
c906108c 14569
81ecdfbb
RW
14570 case $ac_mode in
14571 :F)
14572 #
14573 # CONFIG_FILE
14574 #
c906108c 14575
bec39cab
AC
14576 case $INSTALL in
14577 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 14578 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 14579 esac
81ecdfbb 14580_ACEOF
121ce6e5 14581
81ecdfbb
RW
14582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14583# If the template does not know about datarootdir, expand it.
14584# FIXME: This hack should be removed a few years after 2.60.
14585ac_datarootdir_hack=; ac_datarootdir_seen=
14586ac_sed_dataroot='
14587/datarootdir/ {
14588 p
14589 q
14590}
14591/@datadir@/p
14592/@docdir@/p
14593/@infodir@/p
14594/@localedir@/p
14595/@mandir@/p'
14596case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14597*datarootdir*) ac_datarootdir_seen=yes;;
14598*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14600$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14601_ACEOF
14602cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14603 ac_datarootdir_hack='
14604 s&@datadir@&$datadir&g
14605 s&@docdir@&$docdir&g
14606 s&@infodir@&$infodir&g
14607 s&@localedir@&$localedir&g
14608 s&@mandir@&$mandir&g
14609 s&\\\${datarootdir}&$datarootdir&g' ;;
14610esac
4e8d927d 14611_ACEOF
81ecdfbb
RW
14612
14613# Neutralize VPATH when `$srcdir' = `.'.
14614# Shell code in configure.ac might set extrasub.
14615# FIXME: do we really want to maintain this feature?
14616cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14617ac_sed_extra="$ac_vpsub
bec39cab
AC
14618$extrasub
14619_ACEOF
81ecdfbb 14620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
14621:t
14622/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
14623s|@configure_input@|$ac_sed_conf_input|;t t
14624s&@top_builddir@&$ac_top_builddir_sub&;t t
14625s&@top_build_prefix@&$ac_top_build_prefix&;t t
14626s&@srcdir@&$ac_srcdir&;t t
14627s&@abs_srcdir@&$ac_abs_srcdir&;t t
14628s&@top_srcdir@&$ac_top_srcdir&;t t
14629s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14630s&@builddir@&$ac_builddir&;t t
14631s&@abs_builddir@&$ac_abs_builddir&;t t
14632s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14633s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
14634$ac_datarootdir_hack
14635"
14636eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
14637if $ac_cs_awk_getline; then
14638 $AWK -f "$tmp/subs.awk"
14639else
14640 $AWK -f "$tmp/subs.awk" | $SHELL
14641fi >$tmp/out \
14642 || as_fn_error "could not create $ac_file" "$LINENO" 5
14643
14644test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14645 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14646 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14648which seems to be undefined. Please make sure it is defined." >&5
14649$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14650which seems to be undefined. Please make sure it is defined." >&2;}
14651
14652 rm -f "$tmp/stdin"
bec39cab 14653 case $ac_file in
81ecdfbb
RW
14654 -) cat "$tmp/out" && rm -f "$tmp/out";;
14655 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14656 esac \
14657 || as_fn_error "could not create $ac_file" "$LINENO" 5
14658 ;;
14659 :H)
14660 #
14661 # CONFIG_HEADER
14662 #
bec39cab 14663 if test x"$ac_file" != x-; then
81ecdfbb
RW
14664 {
14665 $as_echo "/* $configure_input */" \
14666 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14667 } >"$tmp/config.h" \
14668 || as_fn_error "could not create $ac_file" "$LINENO" 5
14669 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14670 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14671$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 14672 else
81ecdfbb
RW
14673 rm -f "$ac_file"
14674 mv "$tmp/config.h" "$ac_file" \
14675 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
14676 fi
14677 else
81ecdfbb
RW
14678 $as_echo "/* $configure_input */" \
14679 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14680 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 14681 fi
81ecdfbb
RW
14682 ;;
14683 :L)
14684 #
14685 # CONFIG_LINK
14686 #
c906108c 14687
81ecdfbb
RW
14688 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
14689 :
b4e70030 14690 else
81ecdfbb
RW
14691 # Prefer the file from the source tree if names are identical.
14692 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
14693 ac_source=$srcdir/$ac_source
14694 fi
b4e70030 14695
81ecdfbb
RW
14696 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
14697$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 14698
81ecdfbb
RW
14699 if test ! -r "$ac_source"; then
14700 as_fn_error "$ac_source: file not found" "$LINENO" 5
14701 fi
14702 rm -f "$ac_file"
bec39cab 14703
81ecdfbb
RW
14704 # Try a relative symlink, then a hard link, then a copy.
14705 case $srcdir in
14706 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
14707 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
14708 esac
14709 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
14710 ln "$ac_source" "$ac_file" 2>/dev/null ||
14711 cp -p "$ac_source" "$ac_file" ||
14712 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
14713 fi
14714 ;;
14715 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14716$as_echo "$as_me: executing $ac_file commands" >&6;}
14717 ;;
c906108c 14718 esac
b4e70030 14719
bec39cab 14720
81ecdfbb
RW
14721 case $ac_file$ac_mode in
14722 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
81ecdfbb 14723 "default":C)
c906108c
SS
14724case x$CONFIG_HEADERS in
14725xconfig.h:config.in)
14726echo > stamp-h ;;
14727esac
bec39cab 14728 ;;
81ecdfbb 14729
bec39cab 14730 esac
81ecdfbb 14731done # for ac_tag
c906108c 14732
bec39cab 14733
81ecdfbb 14734as_fn_exit 0
bec39cab 14735_ACEOF
bec39cab
AC
14736ac_clean_files=$ac_clean_files_save
14737
81ecdfbb
RW
14738test $ac_write_fail = 0 ||
14739 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14740
bec39cab
AC
14741
14742# configure is writing to config.log, and then calls config.status.
14743# config.status does its own redirection, appending to config.log.
14744# Unfortunately, on DOS this fails, as config.log is still kept open
14745# by configure, so config.status won't be able to write to it; its
14746# output is simply discarded. So we exec the FD to /dev/null,
14747# effectively closing config.log, so it can be properly (re)opened and
14748# appended to by config.status. When coming back to configure, we
14749# need to make the FD available again.
14750if test "$no_create" != yes; then
14751 ac_cs_success=:
14752 ac_config_status_args=
14753 test "$silent" = yes &&
14754 ac_config_status_args="$ac_config_status_args --quiet"
14755 exec 5>/dev/null
14756 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14757 exec 5>>config.log
14758 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14759 # would make configure fail if this is the last instruction.
81ecdfbb 14760 $ac_cs_success || as_fn_exit $?
bec39cab 14761fi
c906108c 14762
bec39cab 14763#
81ecdfbb 14764# CONFIG_SUBDIRS section.
bec39cab 14765#
c906108c
SS
14766if test "$no_recursion" != yes; then
14767
81ecdfbb
RW
14768 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
14769 # so they do not pile up.
c906108c
SS
14770 ac_sub_configure_args=
14771 ac_prev=
fdc59709
PB
14772 eval "set x $ac_configure_args"
14773 shift
14774 for ac_arg
14775 do
c906108c
SS
14776 if test -n "$ac_prev"; then
14777 ac_prev=
14778 continue
14779 fi
bec39cab 14780 case $ac_arg in
c906108c
SS
14781 -cache-file | --cache-file | --cache-fil | --cache-fi \
14782 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14783 ac_prev=cache_file ;;
14784 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
14785 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
14786 | --c=*)
14787 ;;
14788 --config-cache | -C)
c906108c
SS
14789 ;;
14790 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14791 ac_prev=srcdir ;;
14792 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14793 ;;
bec39cab
AC
14794 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14795 ac_prev=prefix ;;
14796 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14797 ;;
81ecdfbb
RW
14798 --disable-option-checking)
14799 ;;
fdc59709
PB
14800 *)
14801 case $ac_arg in
81ecdfbb 14802 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14803 esac
81ecdfbb 14804 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
14805 esac
14806 done
14807
bec39cab
AC
14808 # Always prepend --prefix to ensure using the same prefix
14809 # in subdir configurations.
fdc59709
PB
14810 ac_arg="--prefix=$prefix"
14811 case $ac_arg in
81ecdfbb 14812 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 14813 esac
81ecdfbb
RW
14814 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
14815
14816 # Pass --silent
14817 if test "$silent" = yes; then
14818 ac_sub_configure_args="--silent $ac_sub_configure_args"
14819 fi
14820
14821 # Always prepend --disable-option-checking to silence warnings, since
14822 # different subdirs can have different --enable and --with options.
14823 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 14824
b4e70030 14825 ac_popdir=`pwd`
bec39cab 14826 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
14827
14828 # Do not complain, so a configure script can configure whichever
14829 # parts of a large source tree are present.
fdc59709 14830 test -d "$srcdir/$ac_dir" || continue
c906108c 14831
81ecdfbb
RW
14832 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
14833 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
14834 $as_echo "$ac_msg" >&6
14835 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
14836 ac_builddir=.
14837
81ecdfbb
RW
14838case "$ac_dir" in
14839.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14840*)
14841 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14842 # A ".." for each directory in $ac_dir_suffix.
14843 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14844 case $ac_top_builddir_sub in
14845 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14846 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14847 esac ;;
14848esac
14849ac_abs_top_builddir=$ac_pwd
14850ac_abs_builddir=$ac_pwd$ac_dir_suffix
14851# for backward compatibility:
14852ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
14853
14854case $srcdir in
81ecdfbb 14855 .) # We are building in place.
bec39cab 14856 ac_srcdir=.
81ecdfbb
RW
14857 ac_top_srcdir=$ac_top_builddir_sub
14858 ac_abs_top_srcdir=$ac_pwd ;;
14859 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 14860 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
14861 ac_top_srcdir=$srcdir
14862 ac_abs_top_srcdir=$srcdir ;;
14863 *) # Relative name.
14864 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14865 ac_top_srcdir=$ac_top_build_prefix$srcdir
14866 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 14867esac
81ecdfbb 14868ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 14869
c906108c 14870
fdc59709 14871 cd "$ac_dir"
c906108c
SS
14872
14873 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
14874 if test -f "$ac_srcdir/configure.gnu"; then
14875 ac_sub_configure=$ac_srcdir/configure.gnu
14876 elif test -f "$ac_srcdir/configure"; then
14877 ac_sub_configure=$ac_srcdir/configure
14878 elif test -f "$ac_srcdir/configure.in"; then
14879 # This should be Cygnus configure.
14880 ac_sub_configure=$ac_aux_dir/configure
c906108c 14881 else
81ecdfbb
RW
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
14883$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
14884 ac_sub_configure=
14885 fi
14886
14887 # The recursion is here.
14888 if test -n "$ac_sub_configure"; then
c906108c 14889 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
14890 case $cache_file in
14891 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
14892 *) # Relative name.
14893 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 14894 esac
c906108c 14895
81ecdfbb
RW
14896 { $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
14897$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 14898 # The eval makes quoting arguments work.
fdc59709
PB
14899 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
14900 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 14901 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
14902 fi
14903
fdc59709 14904 cd "$ac_popdir"
c906108c
SS
14905 done
14906fi
81ecdfbb
RW
14907if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14909$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14910fi
c906108c
SS
14911
14912
14913exit 0
This page took 2.188323 seconds and 4 git commands to generate.